diff --git a/src/main/java/com/hbm/blocks/generic/BlockMotherOfAllOres.java b/src/main/java/com/hbm/blocks/generic/BlockMotherOfAllOres.java index 0efa14a13..79227996b 100644 --- a/src/main/java/com/hbm/blocks/generic/BlockMotherOfAllOres.java +++ b/src/main/java/com/hbm/blocks/generic/BlockMotherOfAllOres.java @@ -9,6 +9,7 @@ import java.util.Random; import com.google.common.collect.HashBiMap; import com.hbm.blocks.IBlockMultiPass; import com.hbm.blocks.ModBlocks; +import com.hbm.config.WorldConfig; import com.hbm.inventory.RecipesCommon.ComparableStack; import com.hbm.items.ModItems; import com.hbm.lib.RefStrings; @@ -290,21 +291,25 @@ public class BlockMotherOfAllOres extends BlockContainer implements IBlockMultiP public static void init() { - for(Object b : Block.blockRegistry.getKeys()) { - Block block = Block.getBlockFromName((String) b); - if(block != null && Item.getItemFromBlock(block) != null) - uniqueItems.add(new ComparableStack(block)); - } - - for(Object i : Item.itemRegistry.getKeys()) { - Item item = (Item) Item.itemRegistry.getObject((String) i); - uniqueItems.add(new ComparableStack(item)); - } - - for(String i : OreDictionary.getOreNames()) { - for(ItemStack stack : OreDictionary.getOres(i)) { - uniqueItems.add(new ComparableStack(stack)); + if(WorldConfig.enableRandom) { + for(Object b : Block.blockRegistry.getKeys()) { + Block block = Block.getBlockFromName((String) b); + if(block != null && Item.getItemFromBlock(block) != null) + uniqueItems.add(new ComparableStack(block)); } + + for(Object i : Item.itemRegistry.getKeys()) { + Item item = (Item) Item.itemRegistry.getObject((String) i); + uniqueItems.add(new ComparableStack(item)); + } + + for(String i : OreDictionary.getOreNames()) { + for(ItemStack stack : OreDictionary.getOres(i)) { + uniqueItems.add(new ComparableStack(stack)); + } + } + } else { + uniqueItems.add(new ComparableStack(ModItems.nothing)); } int i = 0; diff --git a/src/main/java/com/hbm/blocks/network/BlockFluidDuct.java b/src/main/java/com/hbm/blocks/network/BlockFluidDuct.java index 37eee94f2..b14fa899e 100644 --- a/src/main/java/com/hbm/blocks/network/BlockFluidDuct.java +++ b/src/main/java/com/hbm/blocks/network/BlockFluidDuct.java @@ -1,6 +1,12 @@ package com.hbm.blocks.network; +import java.util.ArrayList; +import java.util.List; + +import com.hbm.blocks.ILookOverlay; import com.hbm.tileentity.conductor.TileEntityFluidDuct; +import com.hbm.tileentity.conductor.TileEntityFluidDuctSimple; +import com.hbm.util.I18nUtil; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; @@ -8,8 +14,9 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre; -public class BlockFluidDuct extends BlockContainer { +public class BlockFluidDuct extends BlockContainer implements ILookOverlay { public BlockFluidDuct(Material p_i45386_1_) { super(p_i45386_1_); @@ -79,4 +86,18 @@ public class BlockFluidDuct extends BlockContainer { return false; } + @Override + public void printHook(Pre event, World world, int x, int y, int z) { + + TileEntity te = world.getTileEntity(x, y, z); + + if(!(te instanceof TileEntityFluidDuctSimple)) + return; + + TileEntityFluidDuctSimple duct = (TileEntityFluidDuctSimple) te; + + List text = new ArrayList(); + text.add("&[" + duct.getType().getColor() + "&]" +I18nUtil.resolveKey(duct.getType().getUnlocalizedName())); + ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text); + } } diff --git a/src/main/java/com/hbm/blocks/network/BlockFluidDuctSolid.java b/src/main/java/com/hbm/blocks/network/BlockFluidDuctSolid.java index 21c75992e..08031fe84 100644 --- a/src/main/java/com/hbm/blocks/network/BlockFluidDuctSolid.java +++ b/src/main/java/com/hbm/blocks/network/BlockFluidDuctSolid.java @@ -1,8 +1,13 @@ package com.hbm.blocks.network; +import java.util.ArrayList; +import java.util.List; + import com.hbm.blocks.IBlockMultiPass; +import com.hbm.blocks.ILookOverlay; import com.hbm.render.block.RenderBlockMultipass; import com.hbm.tileentity.conductor.TileEntityFluidDuctSimple; +import com.hbm.util.I18nUtil; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -13,8 +18,9 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre; -public class BlockFluidDuctSolid extends BlockContainer implements IBlockMultiPass { +public class BlockFluidDuctSolid extends BlockContainer implements IBlockMultiPass, ILookOverlay { public BlockFluidDuctSolid(Material mat) { super(mat); @@ -64,4 +70,19 @@ public class BlockFluidDuctSolid extends BlockContainer implements IBlockMultiPa return 0xffffff; } + + @Override + public void printHook(Pre event, World world, int x, int y, int z) { + + TileEntity te = world.getTileEntity(x, y, z); + + if(!(te instanceof TileEntityFluidDuctSimple)) + return; + + TileEntityFluidDuctSimple duct = (TileEntityFluidDuctSimple) te; + + List text = new ArrayList(); + text.add("&[" + duct.getType().getColor() + "&]" +I18nUtil.resolveKey(duct.getType().getUnlocalizedName())); + ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text); + } } diff --git a/src/main/java/com/hbm/config/WorldConfig.java b/src/main/java/com/hbm/config/WorldConfig.java index a6c5b2c50..34e6d18a1 100644 --- a/src/main/java/com/hbm/config/WorldConfig.java +++ b/src/main/java/com/hbm/config/WorldConfig.java @@ -47,7 +47,8 @@ public class WorldConfig { public static int endTikiteSpawn = 8; - public static int randomSpawn = 16; + public static boolean enableRandom = false; + public static int randomSpawn = 0; public static int radioStructure = 500; public static int antennaStructure = 250; @@ -126,7 +127,8 @@ public class WorldConfig { endTikiteSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.E00_tikiteSpawnrate", "Amount of end trixite per chunk", 8); - randomSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.R00_randomOreSpawnrate", "Amount of random ore per chunk", 16); + enableRandom = CommonConfig.createConfigBool(config, CATEGORY_OREGEN, "2.R00_enableRandomOre", "Amount of random ore per chunk", false); + randomSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.R01_randomOreSpawnrate", "Amount of random ore per chunk", 0); final String CATEGORY_DUNGEON = "04_dungeons"; radioStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.00_radioSpawn", "Spawn radio station on every nTH chunk", 500); diff --git a/src/main/java/com/hbm/handler/guncfg/Gun12GaugeFactory.java b/src/main/java/com/hbm/handler/guncfg/Gun12GaugeFactory.java index adb850968..1ab0b2d26 100644 --- a/src/main/java/com/hbm/handler/guncfg/Gun12GaugeFactory.java +++ b/src/main/java/com/hbm/handler/guncfg/Gun12GaugeFactory.java @@ -41,7 +41,7 @@ public class Gun12GaugeFactory { config.name = "Franchi SPAS-12"; config.manufacturer = "Black Mesa Armory"; - config.comment.add("\"Here, I have a more suitable gun for you. You'll need it — Catch!\""); + config.comment.add("\"Here, I have a more suitable gun for you. You'll need it - Catch!\""); config.comment.add("Alt-fire with Mouse 2 (Right-click) to fire 2 shells at once"); config.config = new ArrayList(); diff --git a/src/main/java/com/hbm/hazard/type/HazardTypeBlinding.java b/src/main/java/com/hbm/hazard/type/HazardTypeBlinding.java index 6a5f207db..126fb1eba 100644 --- a/src/main/java/com/hbm/hazard/type/HazardTypeBlinding.java +++ b/src/main/java/com/hbm/hazard/type/HazardTypeBlinding.java @@ -21,7 +21,7 @@ public class HazardTypeBlinding extends HazardTypeBase { public void onUpdate(EntityLivingBase target, float level, ItemStack stack) { if(!ArmorRegistry.hasProtection(target, 3, HazardClass.LIGHT)) { - target.addPotionEffect(new PotionEffect(Potion.blindness.id, (int)level, 0)); + target.addPotionEffect(new PotionEffect(Potion.blindness.id, (int)Math.ceil(level), 0)); } } diff --git a/src/main/java/com/hbm/hazard/type/HazardTypeRadiation.java b/src/main/java/com/hbm/hazard/type/HazardTypeRadiation.java index 622e6af7d..0a7c90389 100644 --- a/src/main/java/com/hbm/hazard/type/HazardTypeRadiation.java +++ b/src/main/java/com/hbm/hazard/type/HazardTypeRadiation.java @@ -55,6 +55,9 @@ public class HazardTypeRadiation extends HazardTypeBase { level = HazardModifier.evalAllModifiers(stack, player, level, modifiers); + if(level < 1e-5) + return; + list.add(EnumChatFormatting.GREEN + "[" + I18nUtil.resolveKey("trait.radioactive") + "]"); String rad = "" + (Math.floor(level* 1000) / 1000); list.add(EnumChatFormatting.YELLOW + (rad + "RAD/s")); diff --git a/src/main/java/com/hbm/inventory/FluidTank.java b/src/main/java/com/hbm/inventory/FluidTank.java index bb81f70c3..497d122b5 100644 --- a/src/main/java/com/hbm/inventory/FluidTank.java +++ b/src/main/java/com/hbm/inventory/FluidTank.java @@ -126,16 +126,19 @@ public class FluidTank { } if(slots[in] != null && inType.getName().equals(type.getName()) && fluid + FluidContainerRegistry.getFluidContent(slots[in], type) <= maxFluid) { + + ItemStack emptyContainer = FluidContainerRegistry.getEmptyContainer(slots[in]); + if(slots[out] == null) { fluid += FluidContainerRegistry.getFluidContent(slots[in], type); - slots[out] = FluidContainerRegistry.getEmptyContainer(slots[in]); + slots[out] = emptyContainer; slots[in].stackSize--; if(slots[in].stackSize <= 0) slots[in] = null; - } else if(slots[out] != null && (FluidContainerRegistry.getEmptyContainer(slots[in]) == null || slots[out].getItem() == FluidContainerRegistry.getEmptyContainer(slots[in]).getItem()) && slots[out].stackSize < slots[out].getMaxStackSize()) { + } else if(slots[out] != null && (emptyContainer == null || (slots[out].getItem() == emptyContainer.getItem() && slots[out].getItemDamage() == emptyContainer.getItemDamage() && slots[out].stackSize < slots[out].getMaxStackSize()))) { fluid += FluidContainerRegistry.getFluidContent(slots[in], type); - if(FluidContainerRegistry.getEmptyContainer(slots[in]) != null) + if(emptyContainer != null) slots[out].stackSize++; slots[in].stackSize--; @@ -213,13 +216,14 @@ public class FluidTank { return; if(slots[in] != null && fluid - FluidContainerRegistry.getFluidContent(full, type) >= 0) { + ItemStack fullContainer = FluidContainerRegistry.getFullContainer(slots[in], type); if(slots[out] == null) { fluid -= FluidContainerRegistry.getFluidContent(full, type); slots[out] = full.copy(); slots[in].stackSize--; if(slots[in].stackSize <= 0) slots[in] = null; - } else if(slots[out] != null && slots[out].getItem() == FluidContainerRegistry.getFullContainer(slots[in], type).getItem() && slots[out].stackSize < slots[out].getMaxStackSize()) { + } else if(slots[out] != null && slots[out].getItem() == fullContainer.getItem() && slots[out].getItemDamage() == fullContainer.getItemDamage() && slots[out].stackSize < slots[out].getMaxStackSize()) { fluid -= FluidContainerRegistry.getFluidContent(full, type); slots[in].stackSize--; if(slots[in].stackSize <= 0) diff --git a/src/main/java/com/hbm/inventory/OreDictManager.java b/src/main/java/com/hbm/inventory/OreDictManager.java index 7a133f322..2a5eb7b1f 100644 --- a/src/main/java/com/hbm/inventory/OreDictManager.java +++ b/src/main/java/com/hbm/inventory/OreDictManager.java @@ -305,11 +305,11 @@ public class OreDictManager { AC227 .rad(HazardRegistry.ac227) .nugget(nugget_actinium) .billet(billet_actinium) .ingot(ingot_actinium) .dust(powder_actinium) .block(block_actinium) .dustSmall(powder_actinium_tiny); CO60 .rad(HazardRegistry.co60) .hot(1) .nugget(nugget_co60) .billet(billet_co60) .ingot(ingot_co60) .dust(powder_co60); AU198 .rad(HazardRegistry.au198) .hot(5) .nugget(nugget_au198) .billet(billet_au198) .ingot(ingot_au198) .dust(powder_au198); - PB209 .rad(HazardRegistry.pb209) .blinding(3F) .hot(7) .nugget(nugget_pb209) .billet(billet_pb209) .ingot(ingot_pb209); - SA326 .rad(HazardRegistry.sa326) .blinding(3F) .nugget(nugget_schrabidium) .billet(billet_schrabidium) .ingot(ingot_schrabidium) .dust(powder_schrabidium) .plate(plate_schrabidium) .block(block_schrabidium) .ore(ore_schrabidium, ore_gneiss_schrabidium, ore_nether_schrabidium) .oreNether(ore_nether_schrabidium); - SA327 .rad(HazardRegistry.sa327) .blinding(3F) .nugget(nugget_solinium) .billet(billet_solinium) .ingot(ingot_solinium) .block(block_solinium); - SBD .rad(HazardRegistry.sb) .blinding(1F) .ingot(ingot_schrabidate) .dust(powder_schrabidate) .block(block_schrabidate); - SRN .rad(HazardRegistry.sr) .blinding(1F) .ingot(ingot_schraranium) .block(block_schraranium); + PB209 .rad(HazardRegistry.pb209) .blinding(50F) .hot(7) .nugget(nugget_pb209) .billet(billet_pb209) .ingot(ingot_pb209); + SA326 .rad(HazardRegistry.sa326) .blinding(50F) .nugget(nugget_schrabidium) .billet(billet_schrabidium) .ingot(ingot_schrabidium) .dust(powder_schrabidium) .plate(plate_schrabidium) .block(block_schrabidium) .ore(ore_schrabidium, ore_gneiss_schrabidium, ore_nether_schrabidium) .oreNether(ore_nether_schrabidium); + SA327 .rad(HazardRegistry.sa327) .blinding(50F) .nugget(nugget_solinium) .billet(billet_solinium) .ingot(ingot_solinium) .block(block_solinium); + SBD .rad(HazardRegistry.sb) .blinding(50F) .ingot(ingot_schrabidate) .dust(powder_schrabidate) .block(block_schrabidate); + SRN .rad(HazardRegistry.sr) .blinding(50F) .ingot(ingot_schraranium) .block(block_schraranium); GH336 .rad(HazardRegistry.gh336) .nugget(nugget_gh336) .billet(billet_gh336) .ingot(ingot_gh336); /* diff --git a/src/main/java/com/hbm/inventory/fluid/Fluids.java b/src/main/java/com/hbm/inventory/fluid/Fluids.java index b95348530..abc94ef59 100644 --- a/src/main/java/com/hbm/inventory/fluid/Fluids.java +++ b/src/main/java/com/hbm/inventory/fluid/Fluids.java @@ -114,15 +114,15 @@ public class Fluids { ULTRAHOTSTEAM = new FluidType( "ULTRAHOTSTEAM", 0xE39393, 4, 0, 0, EnumSymbol.NONE).setTemp(600); COOLANT = new FluidType( "COOLANT", 0xd8fcff, 1, 0, 0, EnumSymbol.NONE); LAVA = new FluidType( "LAVA", 0xFF3300, 4, 0, 0, EnumSymbol.NOWATER).setTemp(1200); - DEUTERIUM = new FluidTypeCombustible( "DEUTERIUM", 0x0000FF, 3, 4, 0, EnumSymbol.NONE); - TRITIUM = new FluidTypeCombustible( "TRITIUM", 0x000099, 3, 4, 0, EnumSymbol.RADIATION); + DEUTERIUM = new FluidTypeCombustible( "DEUTERIUM", 0x0000FF, 3, 4, 0, EnumSymbol.NONE).setCombustionEnergy(FuelGrade.HIGH, 10_000).setHeatEnergy(5_000); + TRITIUM = new FluidTypeCombustible( "TRITIUM", 0x000099, 3, 4, 0, EnumSymbol.RADIATION).setCombustionEnergy(FuelGrade.HIGH, 10_000).setHeatEnergy(5_000); OIL = new FluidTypeFlammable( "OIL", 0x020202, 2, 1, 0, EnumSymbol.NONE).addContainers(0x424242, ExtContainer.CANISTER); HOTOIL = new FluidTypeFlammable( "HOTOIL", 0x300900, 2, 3, 0, EnumSymbol.NONE).setTemp(350); HEAVYOIL = new FluidTypeFlammable( "HEAVYOIL", 0x141312, 2, 1, 0, EnumSymbol.NONE).addContainers(0x513F39, ExtContainer.CANISTER); BITUMEN = new FluidType( "BITUMEN", 0x1f2426, 2, 0, 0, EnumSymbol.NONE).addContainers(0x5A5877, ExtContainer.CANISTER); SMEAR = new FluidTypeFlammable( "SMEAR", 0x190f01, 2, 1, 0, EnumSymbol.NONE).setHeatEnergy(50_000).addContainers(0x624F3B, ExtContainer.CANISTER); - HEATINGOIL = new FluidTypeCombustible( "HEATINGOIL", 0x211806, 2, 2, 0, EnumSymbol.NONE).setHeatEnergy(75_000).addContainers(0x694235, ExtContainer.CANISTER); //TODO: and so forth - RECLAIMED = new FluidTypeCombustible( "RECLAIMED", 0x332b22, 2, 2, 0, EnumSymbol.NONE).setHeatEnergy(100_000).addContainers(0xF65723, ExtContainer.CANISTER); + HEATINGOIL = new FluidTypeCombustible( "HEATINGOIL", 0x211806, 2, 2, 0, EnumSymbol.NONE).setCombustionEnergy(FuelGrade.LOW, 100_000).setHeatEnergy(150_000).addContainers(0x694235, ExtContainer.CANISTER); //TODO: and so forth + RECLAIMED = new FluidTypeCombustible( "RECLAIMED", 0x332b22, 2, 2, 0, EnumSymbol.NONE).setCombustionEnergy(FuelGrade.LOW, 200_000).setHeatEnergy(100_000).addContainers(0xF65723, ExtContainer.CANISTER); PETROIL = new FluidTypeCombustible( "PETROIL", 0x44413d, 1, 3, 0, EnumSymbol.NONE).setCombustionEnergy(FuelGrade.MEDIUM, 300_000).setHeatEnergy(125_000).addContainers(0x2369F6, ExtContainer.CANISTER); LUBRICANT = new FluidType( "LUBRICANT", 0x606060, 2, 1, 0, EnumSymbol.NONE).addContainers(0xF1CC05, ExtContainer.CANISTER); NAPHTHA = new FluidTypeFlammable( "NAPHTHA", 0x595744, 2, 1, 0, EnumSymbol.NONE).addContainers(0x5F6D44, ExtContainer.CANISTER); @@ -173,8 +173,8 @@ public class Fluids { NAPHTHA_CRACK = new FluidTypeFlammable( "NAPHTHA_CRACK", 0x595744, 2, 1, 0, EnumSymbol.NONE); LIGHTOIL_CRACK = new FluidTypeFlammable( "LIGHTOIL_CRACK", 0x8c7451, 1, 2, 0, EnumSymbol.NONE); DIESEL_CRACK = new FluidTypeCombustible( "DIESEL_CRACK", 0xf2eed5, 1, 2, 0, EnumSymbol.NONE).setCombustionEnergy(FuelGrade.HIGH, 450_000).setHeatEnergy(200_000); - AROMATICS = new FluidTypeFlammable( "AROMATICS", 0xfffeed, 1, 4, 1, EnumSymbol.NONE); - UNSATURATEDS = new FluidTypeFlammable( "UNSATURATEDS", 0xfffeed, 1, 4, 1, EnumSymbol.NONE); + AROMATICS = new FluidTypeFlammable( "AROMATICS", 0x68A09A, 1, 4, 1, EnumSymbol.NONE); + UNSATURATEDS = new FluidTypeFlammable( "UNSATURATEDS", 0x628FAE, 1, 4, 1, EnumSymbol.NONE); SALIENT = new FluidType(69, "SALIENT", 0x457F2D, 0, 0, 0, EnumSymbol.NONE); XPJUICE = new FluidType( "XPJUICE", 0xBBFF09, 0, 0, 0, EnumSymbol.NONE); ENDERJUICE = new FluidType( "ENDERJUICE", 0x127766, 0, 0, 0, EnumSymbol.NONE); diff --git a/src/main/java/com/hbm/lib/RefStrings.java b/src/main/java/com/hbm/lib/RefStrings.java index 26cba2c9b..5df6e4e57 100644 --- a/src/main/java/com/hbm/lib/RefStrings.java +++ b/src/main/java/com/hbm/lib/RefStrings.java @@ -3,7 +3,7 @@ package com.hbm.lib; public class RefStrings { public static final String MODID = "hbm"; public static final String NAME = "Hbm's Nuclear Tech Mod"; - public static final String VERSION = "1.0.27 BETA (4191)"; + public static final String VERSION = "1.0.27 BETA (4193)"; //HBM's Beta Naming Convention: //V T (X) //V -> next release version diff --git a/src/main/java/com/hbm/main/ModEventHandler.java b/src/main/java/com/hbm/main/ModEventHandler.java index 4673e984f..7cce6df80 100644 --- a/src/main/java/com/hbm/main/ModEventHandler.java +++ b/src/main/java/com/hbm/main/ModEventHandler.java @@ -385,10 +385,16 @@ public class ModEventHandler { return; if(entity instanceof EntityZombie) { - if(rand.nextInt(64) == 0) - entity.setCurrentItemOrArmor(4, new ItemStack(ModItems.gas_mask_m65, 1, world.rand.nextInt(100))); - if(rand.nextInt(128) == 0) - entity.setCurrentItemOrArmor(4, new ItemStack(ModItems.gas_mask_olde, 1, world.rand.nextInt(100))); + if(rand.nextInt(64) == 0) { + ItemStack mask = new ItemStack(ModItems.gas_mask_m65); + ArmorUtil.installGasMaskFilter(mask, new ItemStack(ModItems.gas_mask_filter)); + entity.setCurrentItemOrArmor(4, mask); + } + if(rand.nextInt(128) == 0) { + ItemStack mask = new ItemStack(ModItems.gas_mask_olde); + ArmorUtil.installGasMaskFilter(mask, new ItemStack(ModItems.gas_mask_filter)); + entity.setCurrentItemOrArmor(4, mask); + } if(rand.nextInt(256) == 0) entity.setCurrentItemOrArmor(4, new ItemStack(ModItems.mask_of_infamy, 1, world.rand.nextInt(100))); if(rand.nextInt(1024) == 0) @@ -414,8 +420,11 @@ public class ModEventHandler { entity.setCurrentItemOrArmor(0, new ItemStack(ModItems.chernobylsign)); } if(entity instanceof EntitySkeleton) { - if(rand.nextInt(16) == 0) - entity.setCurrentItemOrArmor(4, new ItemStack(ModItems.gas_mask_m65, 1, world.rand.nextInt(100))); + if(rand.nextInt(16) == 0) { + ItemStack mask = new ItemStack(ModItems.gas_mask_m65); + ArmorUtil.installGasMaskFilter(mask, new ItemStack(ModItems.gas_mask_filter)); + entity.setCurrentItemOrArmor(4, mask); + } if(rand.nextInt(64) == 0) entity.setCurrentItemOrArmor(3, new ItemStack(ModItems.steel_plate, 1, world.rand.nextInt(ModItems.steel_plate.getMaxDamage()))); } diff --git a/src/main/java/com/hbm/particle/ParticleAmatFlash.java b/src/main/java/com/hbm/particle/ParticleAmatFlash.java index f7432e305..e01a28dca 100644 --- a/src/main/java/com/hbm/particle/ParticleAmatFlash.java +++ b/src/main/java/com/hbm/particle/ParticleAmatFlash.java @@ -29,7 +29,9 @@ public class ParticleAmatFlash extends EntityFX { float pX = (float) ((this.prevPosX + (this.posX - this.prevPosX) * (double) interp - interpPosX)); float pY = (float) ((this.prevPosY + (this.posY - this.prevPosY) * (double) interp - interpPosY)); float pZ = (float) ((this.prevPosZ + (this.posZ - this.prevPosZ) * (double) interp - interpPosZ)); - + + + GL11.glPushMatrix(); GL11.glTranslatef(pX, pY, pZ); GL11.glScalef(0.2F * particleScale, 0.2F * particleScale, 0.2F * particleScale); @@ -49,8 +51,6 @@ public class ParticleAmatFlash extends EntityFX { GL11.glEnable(GL11.GL_CULL_FACE); GL11.glDepthMask(false); - GL11.glPushMatrix(); - float scale = 0.5F; for(int i = 0; i < 100; i++) { diff --git a/src/main/java/com/hbm/tileentity/machine/oil/TileEntityMachineCatalyticCracker.java b/src/main/java/com/hbm/tileentity/machine/oil/TileEntityMachineCatalyticCracker.java index 1d9159be3..bb4eeb3c8 100644 --- a/src/main/java/com/hbm/tileentity/machine/oil/TileEntityMachineCatalyticCracker.java +++ b/src/main/java/com/hbm/tileentity/machine/oil/TileEntityMachineCatalyticCracker.java @@ -78,12 +78,14 @@ public class TileEntityMachineCatalyticCracker extends TileEntity implements IFl int left = quart.getKey().fill; int right = quart.getValue().fill; - if(tanks[0].getFill() >= 100 && tanks[1].getFill() >= 100 && hasSpace(left, right)) { - tanks[0].setFill(tanks[0].getFill() - 100); - tanks[1].setFill(tanks[1].getFill() - 200); - tanks[2].setFill(tanks[2].getFill() + left); - tanks[3].setFill(tanks[3].getFill() + right); - tanks[4].setFill(tanks[4].getFill() + 2); //LPS has the density of WATER not STEAM (1%!) + for(int i = 0; i < 2; i++) { + if(tanks[0].getFill() >= 100 && tanks[1].getFill() >= 100 && hasSpace(left, right)) { + tanks[0].setFill(tanks[0].getFill() - 100); + tanks[1].setFill(tanks[1].getFill() - 200); + tanks[2].setFill(tanks[2].getFill() + left); + tanks[3].setFill(tanks[3].getFill() + right); + tanks[4].setFill(tanks[4].getFill() + 2); //LPS has the density of WATER not STEAM (1%!) + } } } } diff --git a/src/main/java/com/hbm/tileentity/machine/pile/TileEntityPileFuel.java b/src/main/java/com/hbm/tileentity/machine/pile/TileEntityPileFuel.java index c3249d10b..4549d5d23 100644 --- a/src/main/java/com/hbm/tileentity/machine/pile/TileEntityPileFuel.java +++ b/src/main/java/com/hbm/tileentity/machine/pile/TileEntityPileFuel.java @@ -4,7 +4,6 @@ import com.hbm.blocks.ModBlocks; import com.hbm.config.GeneralConfig; import api.hbm.block.IPileNeutronReceiver; -import net.minecraft.init.Blocks; import net.minecraft.nbt.NBTTagCompound; public class TileEntityPileFuel extends TileEntityPileBase implements IPileNeutronReceiver { @@ -65,11 +64,15 @@ public class TileEntityPileFuel extends TileEntityPileBase implements IPileNeutr public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); this.heat = nbt.getInteger("heat"); + this.progress = nbt.getInteger("progress"); + this.neutrons = nbt.getInteger("neutrons"); } @Override public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); nbt.setInteger("heat", this.heat); + nbt.setInteger("progress", this.progress); + nbt.setInteger("neutrons", this.neutrons); } } diff --git a/src/main/java/com/hbm/tileentity/network/TileEntityConnector.java b/src/main/java/com/hbm/tileentity/network/TileEntityConnector.java index cda2f59ca..122e71ae5 100644 --- a/src/main/java/com/hbm/tileentity/network/TileEntityConnector.java +++ b/src/main/java/com/hbm/tileentity/network/TileEntityConnector.java @@ -1,5 +1,8 @@ package com.hbm.tileentity.network; +import java.util.ArrayList; +import java.util.List; + import api.hbm.energy.IEnergyConductor; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.Vec3; @@ -21,31 +24,15 @@ public class TileEntityConnector extends TileEntityPylonBase { public double getMaxWireLength() { return 10; } - + @Override - protected void connect() { + public List getConnectionPoints() { + List pos = new ArrayList(connected); - super.connect(); - - ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata()).getOpposite(); - - TileEntity te = worldObj.getTileEntity(xCoord + dir.offsetX, yCoord + dir.offsetY, zCoord + dir.offsetZ); - - if(te instanceof IEnergyConductor) { - - IEnergyConductor conductor = (IEnergyConductor) te; - - if(!conductor.canConnect(dir.getOpposite())) - return; - - if(this.getPowerNet() == null && conductor.getPowerNet() != null) { - conductor.getPowerNet().joinLink(this); - } - - if(this.getPowerNet() != null && conductor.getPowerNet() != null && this.getPowerNet() != conductor.getPowerNet()) { - conductor.getPowerNet().joinNetworks(this.getPowerNet()); - } + for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) { + pos.add(new int[] {xCoord + dir.offsetX, yCoord + dir.offsetY, zCoord + dir.offsetZ}); } + return pos; } @Override diff --git a/src/main/resources/assets/hbm/lang/de_DE.lang b/src/main/resources/assets/hbm/lang/de_DE.lang index e61347c6d..0417bff05 100644 --- a/src/main/resources/assets/hbm/lang/de_DE.lang +++ b/src/main/resources/assets/hbm/lang/de_DE.lang @@ -3557,7 +3557,9 @@ tile.solar_mirror.name=Heliostatspiegel tile.soyuz_capsule.name=Landekapsel tile.soyuz_launcher.name=Soyuz-Startplatform tile.spikes.name=Stacheln +tile.stalactite.asbestos.name=Asbest-Stalaktit tile.stalactite.sulfur.name=Schwefelhaltiger Stalaktit +tile.stalagmite.asbestos.name=Asbest-Stalagmit tile.stalagmite.sulfur.name=Schwefelhaltiger Stalagmit tile.steel_beam.name=Stahlträger tile.steel_corner.name=Stahlwand (Ecke) @@ -3570,6 +3572,7 @@ tile.stone_depth.name=Tiefenfels tile.stone_depth_nether.name=Nether-Tiefenfels tile.stone_gneiss.name=Graphitschiefer tile.stone_porous.name=Poröser Stein +tile.stone_resource.asbestos.name=Chrysotil tile.stone_resource.sulfur.name=Schwefelhaltiger Stein tile.struct_iter_core.name=Fusionsreaktor-Kernkomponente tile.struct_launcher.name=Startrampe-Komponentenblock diff --git a/src/main/resources/assets/hbm/lang/en_US.lang b/src/main/resources/assets/hbm/lang/en_US.lang index a36e920ad..d913ffc38 100644 --- a/src/main/resources/assets/hbm/lang/en_US.lang +++ b/src/main/resources/assets/hbm/lang/en_US.lang @@ -3930,7 +3930,9 @@ tile.solar_mirror.name=Heliostat Mirror tile.soyuz_capsule.name=Cargo Landing Capsule tile.soyuz_launcher.name=Soyuz Launch Platform tile.spikes.name=Spikes +tile.stalactite.asbestos.name=Asbestos Stalactite tile.stalactite.sulfur.name=Sulfurous Stalactite +tile.stalagmite.asbestos.name=Asbestos Stalagmite tile.stalagmite.sulfur.name=Sulfurous Stalagmite tile.steel_beam.name=Steel Beam tile.steel_corner.name=Steel Wall Corner @@ -3943,6 +3945,7 @@ tile.stone_depth.name=Depth Rock tile.stone_depth_nether.name=Nether Depth Rock tile.stone_gneiss.name=Graphitic Schist tile.stone_porous.name=Porous Stone +tile.stone_resource.asbestos.name=Chrysotile tile.stone_resource.sulfur.name=Sulfurous Stone tile.struct_iter_core.name=Fusion Reactor Core Component tile.struct_launcher.name=Launch Pad Component Block diff --git a/src/main/resources/assets/hbm/textures/gui/fluids/crackoil.png b/src/main/resources/assets/hbm/textures/gui/fluids/crackoil.png new file mode 100644 index 000000000..74f771fa1 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/gui/fluids/crackoil.png differ diff --git a/src/main/resources/assets/hbm/textures/models/machines/chemfac.png b/src/main/resources/assets/hbm/textures/models/machines/chemfac.png index 5686695b8..b6b29ac6c 100644 Binary files a/src/main/resources/assets/hbm/textures/models/machines/chemfac.png and b/src/main/resources/assets/hbm/textures/models/machines/chemfac.png differ diff --git a/src/main/resources/assets/hbm/textures/models/network/pipe_anchor.png b/src/main/resources/assets/hbm/textures/models/network/pipe_anchor.png new file mode 100644 index 000000000..48e045fef Binary files /dev/null and b/src/main/resources/assets/hbm/textures/models/network/pipe_anchor.png differ diff --git a/src/main/resources/assets/hbm/textures/models/tank_label/tank_CRACKOIL.png b/src/main/resources/assets/hbm/textures/models/tank_label/tank_CRACKOIL.png new file mode 100644 index 000000000..0f2f3e3d9 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/models/tank_label/tank_CRACKOIL.png differ diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info index fe91e7960..c4974df8f 100755 --- a/src/main/resources/mcmod.info +++ b/src/main/resources/mcmod.info @@ -3,7 +3,7 @@ "modid": "hbm", "name": "Hbm's Nuclear Tech", "description": "A mod that adds weapons, nuclear themed stuff and machines", - "version":"1.0.27_X4191", + "version":"1.0.27_X4193", "mcversion": "1.7.10", "url": "", "updateUrl": "",