diff --git a/src/main/java/com/hbm/blocks/machine/MachineReactorSmall.java b/src/main/java/com/hbm/blocks/machine/MachineReactorSmall.java index 05220d0ed..ea2f2859f 100644 --- a/src/main/java/com/hbm/blocks/machine/MachineReactorSmall.java +++ b/src/main/java/com/hbm/blocks/machine/MachineReactorSmall.java @@ -2,15 +2,19 @@ package com.hbm.blocks.machine; import java.util.Random; +import com.hbm.blocks.BlockDummyable; import com.hbm.blocks.ModBlocks; import com.hbm.handler.BossSpawnHandler; import com.hbm.handler.MultiblockHandler; +import com.hbm.handler.MultiblockHandlerXR; import com.hbm.interfaces.IMultiblock; import com.hbm.main.MainRegistry; -import com.hbm.tileentity.machine.TileEntityDummy; +import com.hbm.tileentity.TileEntityProxyCombo; import com.hbm.tileentity.machine.TileEntityMachineReactorSmall; import cpw.mods.fml.common.network.internal.FMLNetworkHandler; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; @@ -23,122 +27,23 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; -public class MachineReactorSmall extends BlockContainer implements IMultiblock { - - private final Random field_149933_a = new Random(); - private static boolean keepInventory; +public class MachineReactorSmall extends BlockDummyable implements IMultiblock { - public MachineReactorSmall(Material p_i45386_1_) { - super(p_i45386_1_); + public MachineReactorSmall(Material mat) { + super(mat); } @Override - public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) - { - return Item.getItemFromBlock(ModBlocks.machine_reactor_small); - } + public TileEntity createNewTileEntity(World world, int meta) { - @Override - public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { - return new TileEntityMachineReactorSmall(); - } + if(meta >= 12) + return new TileEntityMachineReactorSmall(); + if(meta >= 6) + return new TileEntityProxyCombo(false, true, true); - @Override - public int getRenderType() { - return -1; - } - - @Override - public boolean isOpaqueCube() { - return false; - } - - @Override - public boolean renderAsNormalBlock() { - return false; - } - - @Override - public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_) - { - if (!keepInventory) - { - ISidedInventory tileentityfurnace = (ISidedInventory)p_149749_1_.getTileEntity(p_149749_2_, p_149749_3_, p_149749_4_); - - if (tileentityfurnace != null) - { - for (int i1 = 0; i1 < tileentityfurnace.getSizeInventory(); ++i1) - { - ItemStack itemstack = tileentityfurnace.getStackInSlot(i1); - - if (itemstack != null) - { - float f = this.field_149933_a.nextFloat() * 0.8F + 0.1F; - float f1 = this.field_149933_a.nextFloat() * 0.8F + 0.1F; - float f2 = this.field_149933_a.nextFloat() * 0.8F + 0.1F; - - while (itemstack.stackSize > 0) - { - int j1 = this.field_149933_a.nextInt(21) + 10; - - if (j1 > itemstack.stackSize) - { - j1 = itemstack.stackSize; - } - - itemstack.stackSize -= j1; - EntityItem entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1, p_149749_4_ + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); - - if (itemstack.hasTagCompound()) - { - entityitem.getEntityItem().setTagCompound((NBTTagCompound)itemstack.getTagCompound().copy()); - } - - float f3 = 0.05F; - entityitem.motionX = (float)this.field_149933_a.nextGaussian() * f3; - entityitem.motionY = (float)this.field_149933_a.nextGaussian() * f3 + 0.2F; - entityitem.motionZ = (float)this.field_149933_a.nextGaussian() * f3; - p_149749_1_.spawnEntityInWorld(entityitem); - } - } - } - - p_149749_1_.func_147453_f(p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_); - } - } - - super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_); - } - - @Override - public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) { - - if(MultiblockHandler.checkSpace(world, x, y, z, MultiblockHandler.reactorSmallDimension)) { - - // - DummyBlockMachine.safeBreak = true; - world.setBlock(x, y + 1, z, ModBlocks.dummy_block_reactor_small); - TileEntity te = world.getTileEntity(x, y + 1, z); - if(te instanceof TileEntityDummy) { - TileEntityDummy dummy = (TileEntityDummy)te; - dummy.targetX = x; - dummy.targetY = y; - dummy.targetZ = z; - } - world.setBlock(x, y + 2, z, ModBlocks.dummy_port_reactor_small); - TileEntity te2 = world.getTileEntity(x, y + 2, z); - if(te2 instanceof TileEntityDummy) { - TileEntityDummy dummy = (TileEntityDummy)te2; - dummy.targetX = x; - dummy.targetY = y; - dummy.targetZ = z; - } - DummyBlockMachine.safeBreak = false; - // - - } else - world.func_147480_a(x, y, z, true); + return null; } @Override @@ -147,14 +52,56 @@ public class MachineReactorSmall extends BlockContainer implements IMultiblock { return true; } else if(!player.isSneaking()) { BossSpawnHandler.markFBI(player); + + int[] pos = this.findCore(world, x, y, z); - TileEntityMachineReactorSmall entity = (TileEntityMachineReactorSmall) world.getTileEntity(x, y, z); - if(entity != null) { - FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_reactor_small, world, x, y, z); - } + if(pos == null) + return false; + + FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_reactor_small, world, pos[0], pos[1], pos[2]); return true; } else { return false; } } + + @Override + @SideOnly(Side.CLIENT) + public void randomDisplayTick(World world, int x, int y, int z, Random rand) { + super.randomDisplayTick(world, x, y, z, rand); + + for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) { + + if(dir == ForgeDirection.DOWN || dir == ForgeDirection.UP) + continue; + + if(world.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ).getMaterial() == Material.water) { + + double ix = x + 0.5F + dir.offsetX + rand.nextDouble() - 0.5D; + double iy = y + 0.5F + dir.offsetY + rand.nextDouble() - 0.5D; + double iz = z + 0.5F + dir.offsetZ + rand.nextDouble() - 0.5D; + + if(dir.offsetX != 0) + ix = x + 0.5F + dir.offsetX * 0.5 + rand.nextDouble() * 0.125 * dir.offsetX; + if(dir.offsetZ != 0) + iz = z + 0.5F + dir.offsetZ * 0.5 + rand.nextDouble() * 0.125 * dir.offsetZ; + + world.spawnParticle("bubble", ix, iy, iz, 0.0, 0.2, 0.0); + } + } + } + + @Override + public int[] getDimensions() { + return new int[] {2, 0, 0, 0, 0, 0,}; + } + + @Override + public int getOffset() { + return 0; + } + + protected void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) { + super.fillSpace(world, x, y, z, dir, o); + } } diff --git a/src/main/java/com/hbm/blocks/machine/ReactorZirnox.java b/src/main/java/com/hbm/blocks/machine/ReactorZirnox.java index 42251a71f..c6e55200d 100644 --- a/src/main/java/com/hbm/blocks/machine/ReactorZirnox.java +++ b/src/main/java/com/hbm/blocks/machine/ReactorZirnox.java @@ -3,6 +3,7 @@ package com.hbm.blocks.machine; import com.hbm.blocks.BlockDummyable; import com.hbm.blocks.ModBlocks; +import com.hbm.handler.BossSpawnHandler; import com.hbm.handler.MultiblockHandlerXR; import com.hbm.interfaces.IMultiblock; import com.hbm.main.MainRegistry; @@ -36,11 +37,11 @@ public class ReactorZirnox extends BlockDummyable implements IMultiblock { @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { - if(world.isRemote) - { + if(world.isRemote) { return true; - } else if(!player.isSneaking()) - { + } else if(!player.isSneaking()) { + BossSpawnHandler.markFBI(player); + int[] pos = this.findCore(world, x, y, z); if(pos == null) diff --git a/src/main/java/com/hbm/crafting/RodRecipes.java b/src/main/java/com/hbm/crafting/RodRecipes.java index ba7a9a219..bd521348c 100644 --- a/src/main/java/com/hbm/crafting/RodRecipes.java +++ b/src/main/java/com/hbm/crafting/RodRecipes.java @@ -34,11 +34,6 @@ public class RodRecipes { addRodBilletUnload(SA326, ModItems.billet_schrabidium, ModItems.rod_schrabidium); addRodBilletUnload(SA327, ModItems.billet_solinium, ModItems.rod_solinium); addRodBilletUnload(ModItems.egg_balefire_shard, ModItems.rod_balefire); - addFuelRodBillet(ModItems.billet_uranium_fuel, ModItems.rod_uranium_fuel); - addFuelRodBillet(ModItems.billet_thorium_fuel, ModItems.rod_thorium_fuel); - addFuelRodBillet(ModItems.billet_plutonium_fuel, ModItems.rod_plutonium_fuel); - addFuelRodBillet(ModItems.billet_mox_fuel, ModItems.rod_mox_fuel); - addFuelRodBillet(ModItems.billet_schrabidium_fuel, ModItems.rod_schrabidium_fuel); CraftingManager.addShapelessAuto(new ItemStack(ModItems.rod_lead, 1), new Object[] { ModItems.rod_empty, PB.nugget(), PB.nugget(), PB.nugget(), PB.nugget(), PB.nugget(), PB.nugget() }); CraftingManager.addShapelessAuto(new ItemStack(ModItems.nugget_lead, 6), new Object[] { ModItems.rod_lead }); CraftingManager.addShapelessAuto(new ItemStack(ModItems.rod_lithium, 1), new Object[] { ModItems.rod_empty, LI.ingot() }); @@ -64,11 +59,6 @@ public class RodRecipes { addDualRodBilletUnload(SA326, ModItems.billet_schrabidium, ModItems.rod_dual_schrabidium); addDualRodBilletUnload(SA327, ModItems.billet_solinium, ModItems.rod_dual_solinium); addDualRodBilletUnload(ModItems.egg_balefire_shard, ModItems.rod_dual_balefire); - addDualFuelRodBillet(ModItems.billet_uranium_fuel, ModItems.rod_dual_uranium_fuel); - addDualFuelRodBillet(ModItems.billet_thorium_fuel, ModItems.rod_dual_thorium_fuel); - addDualFuelRodBillet(ModItems.billet_plutonium_fuel, ModItems.rod_dual_plutonium_fuel); - addDualFuelRodBillet(ModItems.billet_mox_fuel, ModItems.rod_dual_mox_fuel); - addDualFuelRodBillet(ModItems.billet_schrabidium_fuel, ModItems.rod_dual_schrabidium_fuel); CraftingManager.addShapelessAuto(new ItemStack(ModItems.rod_dual_lead, 1), new Object[] { ModItems.rod_dual_empty, PB.ingot(), PB.nugget(), PB.nugget(), PB.nugget() }); CraftingManager.addShapelessAuto(new ItemStack(ModItems.nugget_lead, 12), new Object[] { ModItems.rod_dual_lead }); CraftingManager.addShapelessAuto(new ItemStack(ModItems.rod_dual_lithium, 1), new Object[] { ModItems.rod_dual_empty, LI.ingot(), LI.ingot() }); @@ -93,11 +83,6 @@ public class RodRecipes { addQuadRodBilletUnload(SA326, ModItems.billet_schrabidium, ModItems.rod_quad_schrabidium); addQuadRodBilletUnload(SA327, ModItems.billet_solinium, ModItems.rod_quad_solinium); addQuadRodBilletUnload(ModItems.egg_balefire_shard, ModItems.rod_quad_balefire); - addQuadFuelRodBillet(ModItems.billet_uranium_fuel, ModItems.rod_quad_uranium_fuel); - addQuadFuelRodBillet(ModItems.billet_thorium_fuel, ModItems.rod_quad_thorium_fuel); - addQuadFuelRodBillet(ModItems.billet_plutonium_fuel, ModItems.rod_quad_plutonium_fuel); - addQuadFuelRodBillet(ModItems.billet_mox_fuel, ModItems.rod_quad_mox_fuel); - addQuadFuelRodBillet(ModItems.billet_schrabidium_fuel, ModItems.rod_quad_schrabidium_fuel); CraftingManager.addShapelessAuto(new ItemStack(ModItems.rod_quad_lead, 1), new Object[] { ModItems.rod_quad_empty, PB.ingot(), PB.ingot(), PB.nugget(), PB.nugget(), PB.nugget(), PB.nugget(), PB.nugget(), PB.nugget() }); CraftingManager.addShapelessAuto(new ItemStack(ModItems.nugget_lead, 24), new Object[] { ModItems.rod_quad_lead }); CraftingManager.addShapelessAuto(new ItemStack(ModItems.rod_quad_lithium, 1), new Object[] { ModItems.rod_quad_empty, LI.ingot(), LI.ingot(), LI.ingot(), LI.ingot() }); @@ -116,14 +101,14 @@ public class RodRecipes { addZIRNOXRod(ModItems.billet_u235, ModItems.rod_zirnox_u235_fuel); addZIRNOXRod(ModItems.billet_les, ModItems.rod_zirnox_les_fuel); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_natural_uranium_hot, 2), new Object[] { ModItems.rod_zirnox_natural_uranium_fuel_depleted }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_uranium_hot, 2), new Object[] { ModItems.rod_zirnox_uranium_fuel_depleted }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_thorium_hot, 2), new Object[] { ModItems.rod_zirnox_thorium_fuel_depleted }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_mox_hot, 2), new Object[] { ModItems.rod_zirnox_mox_fuel_depleted }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_plutonium_hot, 2), new Object[] { ModItems.rod_zirnox_plutonium_fuel_depleted }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_u233_hot, 2), new Object[] { ModItems.rod_zirnox_u233_fuel_depleted }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_u235_hot, 2), new Object[] { ModItems.rod_zirnox_u235_fuel_depleted }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_schrabidium_hot, 2), new Object[] { ModItems.rod_zirnox_les_fuel_depleted }); + CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_natural_uranium, 2, 1), new Object[] { ModItems.rod_zirnox_natural_uranium_fuel_depleted }); + CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_uranium, 2, 1), new Object[] { ModItems.rod_zirnox_uranium_fuel_depleted }); + CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_thorium, 2, 1), new Object[] { ModItems.rod_zirnox_thorium_fuel_depleted }); + CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_mox, 2, 1), new Object[] { ModItems.rod_zirnox_mox_fuel_depleted }); + CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_plutonium, 2, 1), new Object[] { ModItems.rod_zirnox_plutonium_fuel_depleted }); + CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_u233, 2, 1), new Object[] { ModItems.rod_zirnox_u233_fuel_depleted }); + CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_u235, 2, 1), new Object[] { ModItems.rod_zirnox_u235_fuel_depleted }); + CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_schrabidium, 2, 1), new Object[] { ModItems.rod_zirnox_les_fuel_depleted }); @@ -172,23 +157,6 @@ public class RodRecipes { CraftingManager.addShapelessAuto(new ItemStack(ModItems.billet_nuclear_waste, 1), new Object[] { ModItems.rod_waste }); CraftingManager.addShapelessAuto(new ItemStack(ModItems.billet_nuclear_waste, 2), new Object[] { ModItems.rod_dual_waste }); CraftingManager.addShapelessAuto(new ItemStack(ModItems.billet_nuclear_waste, 4), new Object[] { ModItems.rod_quad_waste }); - - //Depleted fuel recycling - CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_uranium_hot, 1), new Object[] { ModItems.rod_uranium_fuel_depleted }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_uranium_hot, 2), new Object[] { ModItems.rod_dual_uranium_fuel_depleted }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_uranium_hot, 4), new Object[] { ModItems.rod_quad_uranium_fuel_depleted }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_thorium_hot, 1), new Object[] { ModItems.rod_thorium_fuel_depleted }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_thorium_hot, 2), new Object[] { ModItems.rod_dual_thorium_fuel_depleted }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_thorium_hot, 4), new Object[] { ModItems.rod_quad_thorium_fuel_depleted }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_plutonium_hot, 1), new Object[] { ModItems.rod_plutonium_fuel_depleted }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_plutonium_hot, 2), new Object[] { ModItems.rod_dual_plutonium_fuel_depleted }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_plutonium_hot, 4), new Object[] { ModItems.rod_quad_plutonium_fuel_depleted }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_mox_hot, 1), new Object[] { ModItems.rod_mox_fuel_depleted }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_mox_hot, 2), new Object[] { ModItems.rod_dual_mox_fuel_depleted }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_mox_hot, 4), new Object[] { ModItems.rod_quad_mox_fuel_depleted }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_schrabidium_hot, 1), new Object[] { ModItems.rod_schrabidium_fuel_depleted }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_schrabidium_hot, 2), new Object[] { ModItems.rod_dual_schrabidium_fuel_depleted }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_schrabidium_hot, 4), new Object[] { ModItems.rod_quad_schrabidium_fuel_depleted }); } //Fill rods with one billet. For fuels only, therefore no unloading or ore dict diff --git a/src/main/java/com/hbm/crafting/WeaponRecipes.java b/src/main/java/com/hbm/crafting/WeaponRecipes.java index 5490b6eaf..a2f006241 100644 --- a/src/main/java/com/hbm/crafting/WeaponRecipes.java +++ b/src/main/java/com/hbm/crafting/WeaponRecipes.java @@ -100,10 +100,10 @@ public class WeaponRecipes { CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_ks23, 1), new Object[] { "PPM", "SWL", 'P', STEEL.plate(), 'M', ModItems.mechanism_rifle_1, 'S', KEY_STICK, 'W', ModItems.wire_tungsten, 'L', KEY_LOG }); CraftingManager.addShapelessAuto(new ItemStack(ModItems.gun_sauer, 1), new Object[] { ModItems.ducttape, ModItems.gun_ks23, Blocks.lever, ModItems.gun_ks23 }); CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_xvl1456, 1), new Object[] { "PBB", "ACC", "PRY", 'P', STEEL.plate(), 'R', ModItems.redcoil_capacitor, 'A', ModItems.coil_advanced_alloy, 'B', ModItems.battery_generic, 'C', ModItems.coil_advanced_torus, 'Y', ModItems.mechanism_special }); - CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_xvl1456_ammo, 64), new Object[] { "SSS", "SRS", "SSS", 'S', STEEL.plate(), 'R', ModItems.rod_quad_uranium_fuel_depleted }); - CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_xvl1456_ammo, 32), new Object[] { " S ", "SRS", " S ", 'S', STEEL.plate(), 'R', ModItems.rod_dual_uranium_fuel_depleted }); - CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_xvl1456_ammo, 16), new Object[] { " S ", " R ", " S ", 'S', STEEL.plate(), 'R', ModItems.rod_uranium_fuel_depleted }); - CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_xvl1456_ammo, 16), new Object[] { "SRS", 'S', STEEL.plate(), 'R', ModItems.rod_uranium_fuel_depleted }); + CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_xvl1456_ammo, 64), new Object[] { "SSS", "SRS", "SSS", 'S', STEEL.plate(), 'R', ModItems.waste_natural_uranium }); + CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_xvl1456_ammo, 32), new Object[] { " S ", "SRS", " S ", 'S', STEEL.plate(), 'R', ModItems.waste_uranium }); + CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_xvl1456_ammo, 16), new Object[] { " S ", " R ", " S ", 'S', STEEL.plate(), 'R', ModItems.waste_plate_u235 }); + CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_xvl1456_ammo, 16), new Object[] { "SRS", 'S', STEEL.plate(), 'R', ModItems.waste_u235 }); CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_xvl1456_ammo, 16), new Object[] { " S ", " R ", " S ", 'S', STEEL.plate(), 'R', U238.ingot() }); CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_xvl1456_ammo, 16), new Object[] { "SRS", 'S', STEEL.plate(), 'R', U238.ingot() }); CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_osipr, 1), new Object[] { "CCT", "WWI", "MCC", 'C', CMB.plate(), 'T', W.ingot(), 'W', ModItems.wire_magnetized_tungsten, 'I', ModItems.mechanism_rifle_2, 'M', ModItems.coil_magnetized_tungsten }); diff --git a/src/main/java/com/hbm/entity/mob/EntityRADBeast.java b/src/main/java/com/hbm/entity/mob/EntityRADBeast.java index 6f7b98b22..868a99e30 100644 --- a/src/main/java/com/hbm/entity/mob/EntityRADBeast.java +++ b/src/main/java/com/hbm/entity/mob/EntityRADBeast.java @@ -163,7 +163,7 @@ public class EntityRADBeast extends EntityMob implements IRadiationImmune { } protected Item getDropItem() { - return ModItems.rod_uranium_fuel_depleted; + return ModItems.rod_zirnox_uranium_fuel_depleted; } @Override @@ -194,13 +194,13 @@ public class EntityRADBeast extends EntityMob implements IRadiationImmune { int r = this.rand.nextInt(3); if(r == 0) { - this.dropItem(this.isWet() ? ModItems.waste_uranium : ModItems.rod_uranium_fuel_depleted, 1); + this.dropItem(this.isWet() ? ModItems.waste_uranium : ModItems.rod_zirnox_uranium_fuel_depleted, this.isWet() ? 2 : 1); } else if(r == 1) { - this.dropItem(this.isWet() ? ModItems.waste_mox : ModItems.rod_mox_fuel_depleted, 1); + this.dropItem(this.isWet() ? ModItems.waste_mox : ModItems.rod_zirnox_mox_fuel_depleted, this.isWet() ? 2 : 1); } else if(r == 2) { - this.dropItem(this.isWet() ? ModItems.waste_plutonium : ModItems.rod_plutonium_fuel_depleted, 1); + this.dropItem(this.isWet() ? ModItems.waste_plutonium : ModItems.rod_zirnox_plutonium_fuel_depleted, this.isWet() ? 2 : 1); } } diff --git a/src/main/java/com/hbm/hazard/HazardRegistry.java b/src/main/java/com/hbm/hazard/HazardRegistry.java index 25453ca75..e834e124b 100644 --- a/src/main/java/com/hbm/hazard/HazardRegistry.java +++ b/src/main/java/com/hbm/hazard/HazardRegistry.java @@ -191,42 +191,47 @@ public class HazardRegistry { HazardSystem.register(block_corium_cobble, makeData(RADIATION, 150F)); HazardSystem.register(sand_gold198, makeData(RADIATION, au198 * block * powder_mult)); - HazardSystem.register(rod_zirnox_natural_uranium_fuel, makeData(RADIATION, u * rod_dual)); - HazardSystem.register(rod_zirnox_uranium_fuel, makeData(RADIATION, uf * rod_dual)); - HazardSystem.register(rod_zirnox_th232, makeData(RADIATION, th232 * rod_dual)); - HazardSystem.register(rod_zirnox_thorium_fuel, makeData(RADIATION, thf * rod_dual)); - HazardSystem.register(rod_zirnox_mox_fuel, makeData(RADIATION, mox * rod_dual)); - HazardSystem.register(rod_zirnox_plutonium_fuel, makeData(RADIATION, puf * rod_dual)); - HazardSystem.register(rod_zirnox_u233_fuel, makeData(RADIATION, u233 * rod_dual)); - HazardSystem.register(rod_zirnox_u235_fuel, makeData(RADIATION, u235 * rod_dual)); + registerOtherFuel(rod_zirnox_natural_uranium_fuel, u * rod_dual, u * rod_dual * 100); + registerOtherFuel(rod_zirnox_uranium_fuel, uf * rod_dual, uf * rod_dual * 100); + registerOtherFuel(rod_zirnox_th232, th232 * rod_dual, thf * rod_dual); + registerOtherFuel(rod_zirnox_thorium_fuel, thf * rod_dual, u233 * rod_dual * 10); + registerOtherFuel(rod_zirnox_mox_fuel, mox * rod_dual, mox * rod_dual * 100); + registerOtherFuel(rod_zirnox_plutonium_fuel, puf * rod_dual, puf * rod_dual * 100); + registerOtherFuel(rod_zirnox_u233_fuel, u233 * rod_dual, u233 * rod_dual * 100); + registerOtherFuel(rod_zirnox_u235_fuel, u235 * rod_dual, u235 * rod_dual * 100); + registerOtherFuel(rod_zirnox_les_fuel, saf * rod_dual, saf * rod_dual * 100); + registerOtherFuel(rod_zirnox_lithium, 0, 0.001F * rod_dual); - HazardSystem.register(rod_zirnox_les_fuel, makeData(RADIATION, saf * rod_dual)); + HazardSystem.register(rod_zirnox_natural_uranium_fuel_depleted, makeData(RADIATION, u * rod_dual * 100)); + HazardSystem.register(rod_zirnox_uranium_fuel_depleted, makeData(RADIATION, uf * rod_dual * 100)); + HazardSystem.register(rod_zirnox_thorium_fuel_depleted, makeData(RADIATION, u233 * rod_dual * 10)); + HazardSystem.register(rod_zirnox_mox_fuel_depleted, makeData(RADIATION, mox * rod_dual * 100)); + HazardSystem.register(rod_zirnox_plutonium_fuel_depleted, makeData(RADIATION, 100F + 30F)); + HazardSystem.register(rod_zirnox_u233_fuel_depleted, makeData(RADIATION, u233 * rod_dual * 100)); + HazardSystem.register(rod_zirnox_u235_fuel_depleted, makeData(RADIATION, u235 * rod_dual * 100)); + HazardSystem.register(rod_zirnox_les_fuel_depleted, new HazardData().addEntry(RADIATION, saf * rod_dual * 100).addEntry(BLINDING, 5F)); + HazardSystem.register(rod_zirnox_tritium, makeData(RADIATION, 0.01F * rod_dual)); - HazardSystem.register(rod_zirnox_natural_uranium_fuel_depleted, makeData(RADIATION, 70F)); - HazardSystem.register(rod_zirnox_uranium_fuel_depleted, makeData(RADIATION, 80F)); - HazardSystem.register(rod_zirnox_thorium_fuel_depleted, makeData(RADIATION, 60F)); - HazardSystem.register(rod_zirnox_mox_fuel_depleted, makeData(RADIATION, 100F)); - HazardSystem.register(rod_zirnox_plutonium_fuel_depleted, makeData(RADIATION, 110F)); - HazardSystem.register(rod_zirnox_u233_fuel_depleted, makeData(RADIATION, 120F)); - HazardSystem.register(rod_zirnox_u235_fuel_depleted, makeData(RADIATION, 110F)); - HazardSystem.register(rod_zirnox_les_fuel_depleted, new HazardData().addEntry(RADIATION, 120F).addEntry(BLINDING, 5F)); + registerOtherWaste(waste_natural_uranium, u * billet * 100); + registerOtherWaste(waste_uranium, uf * billet * 100); + registerOtherWaste(waste_u233, u233 * billet * 100); + registerOtherWaste(waste_u235, u235 * billet * 100); + registerOtherWaste(waste_thorium, u233 * billet * 10); + registerOtherWaste(waste_plutonium, puf * billet * 100); + registerOtherWaste(waste_mox, mox * billet * 100); + registerOtherWaste(waste_schrabidium, saf * billet * 100); - HazardSystem.register(waste_natural_uranium, makeData(RADIATION, 30F)); - HazardSystem.register(waste_uranium, makeData(RADIATION, 30F)); - HazardSystem.register(waste_u233, makeData(RADIATION, 55F)); - HazardSystem.register(waste_u235, makeData(RADIATION, 50F)); - HazardSystem.register(waste_thorium, makeData(RADIATION, 20F)); - HazardSystem.register(waste_plutonium, makeData(RADIATION, 50F)); - HazardSystem.register(waste_mox, makeData(RADIATION, 40F)); - HazardSystem.register(waste_schrabidium, new HazardData().addEntry(RADIATION, 45F).addEntry(HOT, 5F)); - HazardSystem.register(waste_natural_uranium_hot, new HazardData().addEntry(RADIATION, 35F).addEntry(HOT, 5F)); - HazardSystem.register(waste_uranium_hot, new HazardData().addEntry(RADIATION, 40F).addEntry(HOT, 5F)); - HazardSystem.register(waste_u233_hot, new HazardData().addEntry(RADIATION, 60F).addEntry(HOT, 5F)); - HazardSystem.register(waste_u235_hot, new HazardData().addEntry(RADIATION, 55F).addEntry(HOT, 5F)); - HazardSystem.register(waste_thorium_hot, new HazardData().addEntry(RADIATION, 30F).addEntry(HOT, 5F)); - HazardSystem.register(waste_plutonium_hot, new HazardData().addEntry(RADIATION, 55F).addEntry(HOT, 5F)); - HazardSystem.register(waste_mox_hot, new HazardData().addEntry(RADIATION, 50F).addEntry(HOT, 5F)); - HazardSystem.register(waste_schrabidium_hot, new HazardData().addEntry(RADIATION, 60F).addEntry(HOT, 5F).addEntry(BLINDING, 5F)); + registerOtherFuel(plate_fuel_u233, u233 * ingot, u233 * ingot * 100); + registerOtherFuel(plate_fuel_u235, u235 * ingot, u235 * ingot * 100); + registerOtherFuel(plate_fuel_mox, mox * ingot, mox * ingot * 100); + registerOtherFuel(plate_fuel_pu239, pu239 * ingot, pu239 * ingot * 100); + registerOtherFuel(plate_fuel_sa326, sa326 * ingot, sa326 * ingot * 100); + + registerOtherWaste(waste_plate_u233, u233 * ingot * 100); + registerOtherWaste(waste_plate_u235, u235 * ingot * 100); + registerOtherWaste(waste_plate_mox, mox * ingot * 100); + registerOtherWaste(waste_plate_pu239, pu239 * ingot * 100); + registerOtherWaste(waste_plate_sa326, sa326 * ingot * 100); HazardSystem.register(debris_graphite, new HazardData().addEntry(RADIATION, 70F).addEntry(HOT, 5F)); HazardSystem.register(debris_metal, makeData(RADIATION, 5F)); @@ -282,12 +287,12 @@ public class HazardRegistry { HazardSystem.register(billet_ra226be, makeData(RADIATION, rabe * billet)); HazardSystem.register(billet_pu238be, makeData(RADIATION, pube * billet)); - HazardSystem.register(pellet_rtg, new HazardData().addEntry(RADIATION, pu238 * billet * 3).addEntry(HOT, 5F)); - HazardSystem.register(pellet_rtg_radium, makeData(RADIATION, ra226 * billet * 3)); + HazardSystem.register(pellet_rtg, new HazardData().addEntry(RADIATION, pu238 * rtg).addEntry(HOT, 5F)); + HazardSystem.register(pellet_rtg_radium, makeData(RADIATION, ra226 * rtg)); HazardSystem.register(pellet_rtg_weak, makeData(RADIATION, (pu238 + (u238 * 2)) * billet)); - HazardSystem.register(pellet_rtg_polonium, new HazardData().addEntry(RADIATION, po210 * billet * 3).addEntry(HOT, 5F)); - HazardSystem.register(pellet_rtg_gold, new HazardData().addEntry(RADIATION, au198 * billet * 3).addEntry(HOT, 5F)); - HazardSystem.register(pellet_rtg_americium, makeData(RADIATION, am241 * billet * 3)); + HazardSystem.register(pellet_rtg_polonium, new HazardData().addEntry(RADIATION, po210 * rtg).addEntry(HOT, 5F)); + HazardSystem.register(pellet_rtg_gold, new HazardData().addEntry(RADIATION, au198 * rtg).addEntry(HOT, 5F)); + HazardSystem.register(pellet_rtg_americium, makeData(RADIATION, am241 * rtg)); registerRodRadiation(rod_th232, rod_dual_th232, rod_quad_th232, th232); registerRodRadiation(rod_uranium, rod_dual_uranium, rod_quad_uranium, u); @@ -385,4 +390,20 @@ public class HazardRegistry { if(blinding > 0) data.addEntry(new HazardEntry(BLINDING, blinding)); HazardSystem.register(rod, data); } + + private static void registerOtherFuel(Item fuel, float base, float target) { + + HazardData data = new HazardData(); + data.addEntry(new HazardEntry(RADIATION, base).addMod(new HazardModifierFuelRadiation(target))); + HazardSystem.register(fuel, data); + } + + private static void registerOtherWaste(Item waste, float base) { + HazardSystem.register(new ItemStack(waste, 1, 0), makeData(RADIATION, base * 0.75F)); + + HazardData data = new HazardData(); + data.addEntry(new HazardEntry(RADIATION, base)); + data.addEntry(new HazardEntry(HOT, 5F)); + HazardSystem.register(new ItemStack(waste, 1, 1), data); + } } diff --git a/src/main/java/com/hbm/hazard/modifier/HazardModifierFuelRadiation.java b/src/main/java/com/hbm/hazard/modifier/HazardModifierFuelRadiation.java new file mode 100644 index 000000000..7dfb687f1 --- /dev/null +++ b/src/main/java/com/hbm/hazard/modifier/HazardModifierFuelRadiation.java @@ -0,0 +1,30 @@ +package com.hbm.hazard.modifier; + +import com.hbm.hazard.HazardRegistry; +import com.hbm.items.machine.ItemFuelRod; + +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.item.ItemStack; + +public class HazardModifierFuelRadiation extends HazardModifier { + +float target; + + public HazardModifierFuelRadiation(float target) { + this.target = target; + } + + @Override + public float modify(ItemStack stack, EntityLivingBase holder, float level) { + + if(stack.getItem() instanceof ItemFuelRod) { + ItemFuelRod fuel = (ItemFuelRod) stack.getItem(); + double depletion = fuel.getDurabilityForDisplay(stack); + + level = (float) (level + (this.target - level) * depletion); + + } + + return level; + } +} diff --git a/src/main/java/com/hbm/inventory/container/ContainerMachineReactorSmall.java b/src/main/java/com/hbm/inventory/container/ContainerMachineReactorSmall.java index 8abf8eee3..f488949a7 100644 --- a/src/main/java/com/hbm/inventory/container/ContainerMachineReactorSmall.java +++ b/src/main/java/com/hbm/inventory/container/ContainerMachineReactorSmall.java @@ -30,12 +30,6 @@ private TileEntityMachineReactorSmall seleniumEngine; this.addSlotToContainer(new Slot(tedf, 10, 98, 90)); this.addSlotToContainer(new Slot(tedf, 11, 134, 90)); - //Fluid IO - this.addSlotToContainer(new Slot(tedf, 12, 8, 90)); - this.addSlotToContainer(new SlotMachineOutput(tedf, 13, 8, 108)); - this.addSlotToContainer(new Slot(tedf, 14, 26, 90)); - this.addSlotToContainer(new SlotMachineOutput(tedf, 15, 26, 108)); - for(int i = 0; i < 3; i++) { for(int j = 0; j < 9; j++) @@ -61,16 +55,14 @@ private TileEntityMachineReactorSmall seleniumEngine; ItemStack var5 = var4.getStack(); var3 = var5.copy(); - if (par2 <= 16) { - if (!this.mergeItemStack(var5, 17, this.inventorySlots.size(), true)) + if (par2 <= 12) { + if (!this.mergeItemStack(var5, 13, this.inventorySlots.size(), true)) { return null; } } else { if (!this.mergeItemStack(var5, 0, 13, true)) - if (!this.mergeItemStack(var5, 14, 15, true)) - if (!this.mergeItemStack(var5, 16, 17, true)) - return null; + return null; } if (var5.stackSize == 0) diff --git a/src/main/java/com/hbm/inventory/gui/GUIMachineReactorSmall.java b/src/main/java/com/hbm/inventory/gui/GUIMachineReactorSmall.java index da5ecf795..936a33c11 100644 --- a/src/main/java/com/hbm/inventory/gui/GUIMachineReactorSmall.java +++ b/src/main/java/com/hbm/inventory/gui/GUIMachineReactorSmall.java @@ -17,28 +17,21 @@ import net.minecraft.util.ResourceLocation; public class GUIMachineReactorSmall extends GuiInfoContainer { private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_reactor_experimental.png"); - private static ResourceLocation overlay = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_reactor_overlay_experimental.png"); - private TileEntityMachineReactorSmall diFurnace; - private boolean toggleOverlay = false; + private TileEntityMachineReactorSmall reactor; public GUIMachineReactorSmall(InventoryPlayer invPlayer, TileEntityMachineReactorSmall tedf) { super(new ContainerMachineReactorSmall(invPlayer, tedf)); - diFurnace = tedf; + reactor = tedf; this.xSize = 176; this.ySize = 222; } - @SuppressWarnings("incomplete-switch") @Override public void drawScreen(int mouseX, int mouseY, float f) { super.drawScreen(mouseX, mouseY, f); - - diFurnace.tanks[0].renderTankInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 36, 16, 52); - diFurnace.tanks[1].renderTankInfo(this, mouseX, mouseY, guiLeft + 26, guiTop + 36, 16, 52); - diFurnace.tanks[2].renderTankInfo(this, mouseX, mouseY, guiLeft + 80, guiTop + 108, 88, 4); - this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 80, guiTop + 114, 88, 4, new String[] { "Hull Temperature:", " " + Math.round((diFurnace.hullHeat) * 0.00001 * 980 + 20) + "°C" }); - this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 80, guiTop + 120, 88, 4, new String[] { "Core Temperature:", " " + Math.round((diFurnace.coreHeat) * 0.00002 * 980 + 20) + "°C" }); + + this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 80, guiTop + 120, 88, 4, new String[] { "Core Temperature:", " " + Math.round((reactor.heat) * 0.00002 * 480 + 20) + "°C" }); String[] text = new String[] { "Coolant will move heat from the core to", "the hull. Water will use that heat and", @@ -57,157 +50,60 @@ public class GUIMachineReactorSmall extends GuiInfoContainer { "using the button next to the", "fluid gauges." }; this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36 + 16, 16, 16, guiLeft - 8, guiTop + 36 + 16, text1); - - if(diFurnace.tanks[0].getFill() <= 0) { - String[] text2 = new String[] { "Error: Water is required for", - "the reactor to function properly!" }; - this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36 + 32, 16, 16, guiLeft - 8, guiTop + 36 + 32 + 16, text2); - } - - if(diFurnace.tanks[1].getFill() <= 0) { - String[] text3 = new String[] { "Error: Coolant is required for", - "the reactor to function properly!" }; - this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36 + 32 + 16, 16, 16, guiLeft - 8, guiTop + 36 + 32 + 16, text3); - } - String s = "0"; - - switch(diFurnace.tanks[2].getTankType()) { - case STEAM: s = "1x"; break; - case HOTSTEAM:s = "10x"; break; - case SUPERHOTSTEAM: s = "100x"; break; - } - - String[] text4 = new String[] { "Steam compression switch", - "Current compression level: " + s}; - this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 63, guiTop + 107, 14, 18, mouseX, mouseY, text4); - - String[] text5 = new String[] { diFurnace.retracting ? "Raise control rods" : "Lower control rods"}; + String[] text5 = new String[] { reactor.retracting ? "Raise control rods" : "Lower control rods"}; this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 52, guiTop + 53, 18, 18, mouseX, mouseY, text5); } @Override protected void drawGuiContainerForegroundLayer(int i, int j) { - String name = this.diFurnace.hasCustomInventoryName() ? this.diFurnace.getInventoryName() : I18n.format(this.diFurnace.getInventoryName()); + String name = this.reactor.hasCustomInventoryName() ? this.reactor.getInventoryName() : I18n.format(this.reactor.getInventoryName()); this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752); this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752); } - @SuppressWarnings("incomplete-switch") - protected void mouseClicked(int x, int y, int i) { + protected void mouseClicked(int x, int y, int i) { super.mouseClicked(x, y, i); if(guiLeft + 52 <= x && guiLeft + 52 + 16 > x && guiTop + 53 < y && guiTop + 53 + 16 >= y) { mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F)); - PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(diFurnace.xCoord, diFurnace.yCoord, diFurnace.zCoord, diFurnace.retracting ? 0 : 1, 0)); - } - - if(guiLeft + 63 <= x && guiLeft + 63 + 14 > x && guiTop + 107 < y && guiTop + 107 + 18 >= y) { - - mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F)); - int c = 0; - - switch(diFurnace.tanks[2].getTankType()) { - case STEAM: c = 0; break; - case HOTSTEAM: c = 1; break; - case SUPERHOTSTEAM: c = 2; break; - } - - PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(diFurnace.xCoord, diFurnace.yCoord, diFurnace.zCoord, c, 1)); + PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(reactor.xCoord, reactor.yCoord, reactor.zCoord, reactor.retracting ? 0 : 1, 0)); } } - @SuppressWarnings("incomplete-switch") @Override protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - - if(toggleOverlay) - Minecraft.getMinecraft().getTextureManager().bindTexture(overlay); - else - Minecraft.getMinecraft().getTextureManager().bindTexture(texture); + Minecraft.getMinecraft().getTextureManager().bindTexture(texture); drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); - if(diFurnace.tanks[2].getFill() > 0) { - int i = diFurnace.getSteamScaled(88); - - int offset = 234; - - switch(diFurnace.tanks[2].getTankType()) { - case HOTSTEAM: offset += 4; break; - case SUPERHOTSTEAM: offset += 8; break; - } - - drawTexturedModalRect(guiLeft + 80, guiTop + 108, 0, offset, i, 4); - } - - if(diFurnace.hasHullHeat()) { - int i = diFurnace.getHullHeatScaled(88); - - i = (int) Math.min(i, 160); - - drawTexturedModalRect(guiLeft + 80, guiTop + 114, 0, 226, i, 4); - } - - if(diFurnace.hasCoreHeat()) { - int i = diFurnace.getCoreHeatScaled(88); + if(reactor.hasHeat()) { + int i = reactor.getHeatScaled(88); i = (int) Math.min(i, 160); drawTexturedModalRect(guiLeft + 80, guiTop + 120, 0, 230, i, 4); } - if(!diFurnace.retracting) + if(!reactor.retracting) drawTexturedModalRect(guiLeft + 52, guiTop + 53, 212, 0, 18, 18); - if(!toggleOverlay) { - if(diFurnace.rods >= diFurnace.rodsMax) { + if(reactor.rods >= reactor.rodsMax) { + for(int x = 0; x < 3; x++) + for(int y = 0; y < 3; y++) + drawTexturedModalRect(guiLeft + 79 + 36 * x, guiTop + 17 + 36 * y, 176, 0, 18, 18); - for(int x = 0; x < 3; x++) - for(int y = 0; y < 3; y++) - drawTexturedModalRect(guiLeft + 79 + 36 * x, guiTop + 17 + 36 * y, 176, 0, 18, 18); - - } else if(diFurnace.rods > 0) { - - for(int x = 0; x < 3; x++) - for(int y = 0; y < 3; y++) - drawTexturedModalRect(guiLeft + 79 + 36 * x, guiTop + 17 + 36 * y, 194, 0, 18, 18); + } else if(reactor.rods > 0) { + for(int x = 0; x < 3; x++) + for(int y = 0; y < 3; y++) + drawTexturedModalRect(guiLeft + 79 + 36 * x, guiTop + 17 + 36 * y, 194, 0, 18, 18); } - } - - switch(diFurnace.tanks[2].getTankType()) { - case STEAM: drawTexturedModalRect(guiLeft + 63, guiTop + 107, 176, 18, 14, 18); break; - case HOTSTEAM: drawTexturedModalRect(guiLeft + 63, guiTop + 107, 190, 18, 14, 18); break; - case SUPERHOTSTEAM: drawTexturedModalRect(guiLeft + 63, guiTop + 107, 204, 18, 14, 18); break; - } this.drawInfoPanel(guiLeft - 16, guiTop + 36, 16, 16, 2); this.drawInfoPanel(guiLeft - 16, guiTop + 36 + 16, 16, 16, 3); - - if(diFurnace.tanks[0].getFill() <= 0) - this.drawInfoPanel(guiLeft - 16, guiTop + 36 + 32, 16, 16, 6); - - if(diFurnace.tanks[1].getFill() <= 0) - this.drawInfoPanel(guiLeft - 16, guiTop + 36 + 32 + 16, 16, 16, 7); - - Minecraft.getMinecraft().getTextureManager().bindTexture(diFurnace.tanks[0].getSheet()); - diFurnace.tanks[0].renderTank(this, guiLeft + 8, guiTop + 88, diFurnace.tanks[0].getTankType().textureX() * FluidTank.x, diFurnace.tanks[0].getTankType().textureY() * FluidTank.y, 16, 52); - Minecraft.getMinecraft().getTextureManager().bindTexture(diFurnace.tanks[1].getSheet()); - diFurnace.tanks[1].renderTank(this, guiLeft + 26, guiTop + 88, diFurnace.tanks[1].getTankType().textureX() * FluidTank.x, diFurnace.tanks[1].getTankType().textureY() * FluidTank.y, 16, 52); } - - protected void keyTyped(char p_73869_1_, int p_73869_2_) - { - super.keyTyped(p_73869_1_, p_73869_2_); - - if (p_73869_2_ == 56) - { - this.toggleOverlay = !this.toggleOverlay; - } - - } } diff --git a/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java b/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java index d56a8b622..cf7c07330 100644 --- a/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java @@ -197,7 +197,7 @@ public class AssemblerRecipes { makeRecipe(new ComparableStack(ModItems.sat_head_radar, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 4), new OreDictStack(TI.plate(), 32), new ComparableStack(ModItems.magnetron, 12), new ComparableStack(ModItems.plate_polymer, 16), new ComparableStack(ModItems.wire_red_copper, 16), new ComparableStack(ModItems.coil_gold, 3), new ComparableStack(ModItems.circuit_gold, 5), new ComparableStack(Items.diamond, 1), },400); makeRecipe(new ComparableStack(ModItems.sat_head_laser, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 12), new OreDictStack(W.ingot(), 16), new OreDictStack(POLYMER.ingot(), 6), new ComparableStack(ModItems.plate_polymer, 16), new ComparableStack(ModItems.board_copper, 24), new ComparableStack(ModItems.circuit_targeting_tier5, 2), new OreDictStack(REDSTONE.dust(), 16), new ComparableStack(Items.diamond, 5), new ComparableStack(Blocks.glass_pane, 16), },450); makeRecipe(new ComparableStack(ModItems.sat_head_resonator, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 32), new OreDictStack(POLYMER.ingot(), 48), new ComparableStack(ModItems.plate_polymer, 8), new ComparableStack(ModItems.crystal_xen, 1), new OreDictStack(STAR.ingot(), 7), new ComparableStack(ModItems.circuit_targeting_tier5, 6), new ComparableStack(ModItems.circuit_targeting_tier6, 2), },1000); - makeRecipe(new ComparableStack(ModItems.sat_foeq, 1), new AStack[] {new OreDictStack(STEEL.plate(), 8), new OreDictStack(TI.plate(), 12), new ComparableStack(ModItems.plate_desh, 8), new ComparableStack(ModItems.hull_big_titanium, 3), new ComparableStack(ModItems.fluid_barrel_full, 1, FluidType.HYDROGEN.ordinal()), new ComparableStack(ModItems.photo_panel, 16), new ComparableStack(ModItems.thruster_nuclear, 1), new ComparableStack(ModItems.rod_quad_uranium_fuel, 2), new ComparableStack(ModItems.circuit_targeting_tier5, 6), new ComparableStack(ModItems.magnetron, 3), new ComparableStack(ModItems.battery_lithium_cell_6, 1), },1200); + makeRecipe(new ComparableStack(ModItems.sat_foeq, 1), new AStack[] {new OreDictStack(STEEL.plate(), 8), new OreDictStack(TI.plate(), 12), new ComparableStack(ModItems.plate_desh, 8), new ComparableStack(ModItems.hull_big_titanium, 3), new ComparableStack(ModItems.fluid_barrel_full, 1, FluidType.HYDROGEN.ordinal()), new ComparableStack(ModItems.photo_panel, 16), new ComparableStack(ModItems.thruster_nuclear, 1), new ComparableStack(ModItems.ingot_uranium_fuel, 6), new ComparableStack(ModItems.circuit_targeting_tier5, 6), new ComparableStack(ModItems.magnetron, 3), new ComparableStack(ModItems.battery_lithium_cell_6, 1), },1200); makeRecipe(new ComparableStack(ModItems.sat_miner, 1), new AStack[] {new OreDictStack(BIGMT.plate(), 24), new ComparableStack(ModItems.plate_desh, 8), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.drill_titanium, 2), new ComparableStack(ModItems.circuit_targeting_tier4, 2), new ComparableStack(ModItems.fluid_barrel_full, 1, FluidType.KEROSENE.ordinal()), new ComparableStack(ModItems.thruster_small, 1), new ComparableStack(ModItems.photo_panel, 12), new ComparableStack(ModItems.centrifuge_element, 4), new ComparableStack(ModItems.magnetron, 3), new ComparableStack(ModItems.plate_polymer, 12), new ComparableStack(ModItems.battery_lithium_cell_6, 1), },600); makeRecipe(new ComparableStack(ModItems.sat_lunar_miner, 1), new AStack[] {new ComparableStack(ModItems.ingot_meteorite, 24), new ComparableStack(ModItems.plate_desh, 4), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.drill_titanium, 2), new ComparableStack(ModItems.circuit_targeting_tier4, 2), new ComparableStack(ModItems.fluid_barrel_full, 1, FluidType.KEROSENE.ordinal()), new ComparableStack(ModItems.thruster_small, 1), new ComparableStack(ModItems.photo_panel, 12), new ComparableStack(ModItems.magnetron, 3), new ComparableStack(ModItems.plate_polymer, 12), new ComparableStack(ModItems.battery_lithium_cell_6, 1), },600); makeRecipe(new ComparableStack(ModItems.chopper_head, 1), new AStack[] {new ComparableStack(ModBlocks.reinforced_glass, 2), new ComparableStack(ModBlocks.fwatz_computer, 1), new OreDictStack(CMB.ingot(), 22), new ComparableStack(ModItems.wire_magnetized_tungsten, 4), },300); diff --git a/src/main/java/com/hbm/inventory/recipes/CentrifugeRecipes.java b/src/main/java/com/hbm/inventory/recipes/CentrifugeRecipes.java index eb720bd7c..520f7dd49 100644 --- a/src/main/java/com/hbm/inventory/recipes/CentrifugeRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/CentrifugeRecipes.java @@ -30,8 +30,8 @@ public class CentrifugeRecipes { new ItemStack(ModItems.nuclear_waste_tiny, 2) }); recipes.put(new ComparableStack(ModItems.waste_uranium), new ItemStack[] { - new ItemStack(ModItems.nugget_u238, 1), - new ItemStack(ModItems.nugget_pu_mix, 2), + new ItemStack(ModItems.nugget_pu_mix, 1), + new ItemStack(ModItems.nugget_plutonium, 1), new ItemStack(ModItems.nugget_technetium, 1), new ItemStack(ModItems.nuclear_waste_tiny, 2) }); diff --git a/src/main/java/com/hbm/inventory/recipes/anvil/AnvilRecipes.java b/src/main/java/com/hbm/inventory/recipes/anvil/AnvilRecipes.java index 966d62935..874a50d76 100644 --- a/src/main/java/com/hbm/inventory/recipes/anvil/AnvilRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/anvil/AnvilRecipes.java @@ -253,6 +253,11 @@ public class AnvilRecipes { pullFromAssembler(new ComparableStack(ModItems.plate_mixed, 4), 3); + constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.ingot_u233, 1), new AnvilOutput(new ItemStack(ModItems.plate_fuel_u233))).setTier(4)); + constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.ingot_u235, 1), new AnvilOutput(new ItemStack(ModItems.plate_fuel_u235))).setTier(4)); + constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.ingot_mox_fuel, 1), new AnvilOutput(new ItemStack(ModItems.plate_fuel_mox))).setTier(4)); + constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.ingot_pu239, 1), new AnvilOutput(new ItemStack(ModItems.plate_fuel_pu239))).setTier(4)); + constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.ingot_schrabidium, 1), new AnvilOutput(new ItemStack(ModItems.plate_fuel_sa326))).setTier(4)); } public static void registerConstructionAmmo() { diff --git a/src/main/java/com/hbm/items/ModItems.java b/src/main/java/com/hbm/items/ModItems.java index ea9dd5937..39e076147 100644 --- a/src/main/java/com/hbm/items/ModItems.java +++ b/src/main/java/com/hbm/items/ModItems.java @@ -12,6 +12,7 @@ import com.hbm.items.bomb.*; import com.hbm.items.food.*; import com.hbm.items.machine.*; import com.hbm.items.machine.ItemMachineUpgrade.UpgradeType; +import com.hbm.items.machine.ItemPlateFuel.FunctionEnum; import com.hbm.items.machine.ItemRBMKRod.EnumBurnFunc; import com.hbm.items.machine.ItemStamp.StampType; import com.hbm.items.special.*; @@ -1012,22 +1013,6 @@ public class ModItems { public static Item rod_quad_balefire; public static Item rod_quad_balefire_blazing; - public static Item rod_uranium_fuel; - public static Item rod_dual_uranium_fuel; - public static Item rod_quad_uranium_fuel; - public static Item rod_thorium_fuel; - public static Item rod_dual_thorium_fuel; - public static Item rod_quad_thorium_fuel; - public static Item rod_plutonium_fuel; - public static Item rod_dual_plutonium_fuel; - public static Item rod_quad_plutonium_fuel; - public static Item rod_mox_fuel; - public static Item rod_dual_mox_fuel; - public static Item rod_quad_mox_fuel; - public static Item rod_schrabidium_fuel; - public static Item rod_dual_schrabidium_fuel; - public static Item rod_quad_schrabidium_fuel; - public static Item rod_water; public static Item rod_dual_water; public static Item rod_quad_water; @@ -1066,20 +1051,24 @@ public class ModItems { public static Item waste_u233; public static Item waste_u235; public static Item waste_schrabidium; - public static Item waste_natural_uranium_hot; - public static Item waste_uranium_hot; - public static Item waste_thorium_hot; - public static Item waste_mox_hot; - public static Item waste_plutonium_hot; - public static Item waste_u233_hot; - public static Item waste_u235_hot; - public static Item waste_schrabidium_hot; - + + public static Item waste_plate_u233; + public static Item waste_plate_u235; + public static Item waste_plate_mox; + public static Item waste_plate_pu239; + public static Item waste_plate_sa326; + public static Item pile_rod_uranium; public static Item pile_rod_plutonium; public static Item pile_rod_source; public static Item pile_rod_boron; + public static Item plate_fuel_u233; + public static Item plate_fuel_u235; + public static Item plate_fuel_mox; + public static Item plate_fuel_pu239; + public static Item plate_fuel_sa326; + public static Item rbmk_lid; public static Item rbmk_lid_glass; public static Item rbmk_fuel_empty; @@ -1160,21 +1149,6 @@ public class ModItems { public static Item nuclear_waste_tiny; public static Item nuclear_waste_vitrified; public static Item nuclear_waste_vitrified_tiny; - public static Item rod_uranium_fuel_depleted; - public static Item rod_dual_uranium_fuel_depleted; - public static Item rod_quad_uranium_fuel_depleted; - public static Item rod_thorium_fuel_depleted; - public static Item rod_dual_thorium_fuel_depleted; - public static Item rod_quad_thorium_fuel_depleted; - public static Item rod_plutonium_fuel_depleted; - public static Item rod_dual_plutonium_fuel_depleted; - public static Item rod_quad_plutonium_fuel_depleted; - public static Item rod_mox_fuel_depleted; - public static Item rod_dual_mox_fuel_depleted; - public static Item rod_quad_mox_fuel_depleted; - public static Item rod_schrabidium_fuel_depleted; - public static Item rod_dual_schrabidium_fuel_depleted; - public static Item rod_quad_schrabidium_fuel_depleted; public static Item rod_waste; public static Item rod_dual_waste; public static Item rod_quad_waste; @@ -3553,23 +3527,7 @@ public class ModItems { rod_quad_solinium = new ItemHazard(ItemHazard.sa327 * ItemHazard.rod_quad, false, true).setUnlocalizedName("rod_quad_solinium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_solinium"); rod_quad_balefire = new ItemHazard(600000F).setUnlocalizedName("rod_quad_balefire").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_balefire"); rod_quad_balefire_blazing = new ItemHazard(1000000F, true).setUnlocalizedName("rod_quad_balefire_blazing").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_balefire_blazing"); - - rod_thorium_fuel = new ItemFuelRod(100000, 10).setUnlocalizedName("rod_thorium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_thorium_fuel"); - rod_dual_thorium_fuel = new ItemFuelRod(100000, 20).setUnlocalizedName("rod_dual_thorium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_thorium_fuel"); - rod_quad_thorium_fuel = new ItemFuelRod(100000, 40).setUnlocalizedName("rod_quad_thorium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_thorium_fuel"); - rod_uranium_fuel = new ItemFuelRod(100000, 15).setUnlocalizedName("rod_uranium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_uranium_fuel"); - rod_dual_uranium_fuel = new ItemFuelRod(100000, 30).setUnlocalizedName("rod_dual_uranium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_uranium_fuel"); - rod_quad_uranium_fuel = new ItemFuelRod( 100000, 60).setUnlocalizedName("rod_quad_uranium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_uranium_fuel"); - rod_plutonium_fuel = new ItemFuelRod(75000, 25).setUnlocalizedName("rod_plutonium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_plutonium_fuel"); - rod_dual_plutonium_fuel = new ItemFuelRod(75000, 50).setUnlocalizedName("rod_dual_plutonium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_plutonium_fuel"); - rod_quad_plutonium_fuel = new ItemFuelRod(75000, 100).setUnlocalizedName("rod_quad_plutonium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_plutonium_fuel"); - rod_mox_fuel = new ItemFuelRod(150000, 10).setUnlocalizedName("rod_mox_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_mox_fuel"); - rod_dual_mox_fuel = new ItemFuelRod(150000, 20).setUnlocalizedName("rod_dual_mox_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_mox_fuel"); - rod_quad_mox_fuel = new ItemFuelRod(150000, 40).setUnlocalizedName("rod_quad_mox_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_mox_fuel"); - rod_schrabidium_fuel = new ItemFuelRod(500000, 250).setUnlocalizedName("rod_schrabidium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_schrabidium_fuel"); - rod_dual_schrabidium_fuel = new ItemFuelRod(500000, 500).setUnlocalizedName("rod_dual_schrabidium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_schrabidium_fuel"); - rod_quad_schrabidium_fuel = new ItemFuelRod(500000, 1000).setUnlocalizedName("rod_quad_schrabidium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_schrabidium_fuel"); - + rod_zirnox_empty = new Item().setUnlocalizedName("rod_zirnox_empty").setMaxStackSize(64).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rod_zirnox_empty"); rod_zirnox_natural_uranium_fuel = new ItemZirnoxRod(120000, 35).setUnlocalizedName("rod_zirnox_natural_uranium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_zirnox_empty).setTextureName(RefStrings.MODID + ":rod_zirnox_natural_uranium_fuel"); rod_zirnox_uranium_fuel = new ItemZirnoxRod(100000, 50).setUnlocalizedName("rod_zirnox_uranium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_zirnox_empty).setTextureName(RefStrings.MODID + ":rod_zirnox_uranium_fuel"); @@ -3592,23 +3550,21 @@ public class ModItems { rod_zirnox_u235_fuel_depleted = new Item().setUnlocalizedName("rod_zirnox_u235_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_zirnox_empty).setTextureName(RefStrings.MODID + ":rod_zirnox_u235_fuel_depleted"); rod_zirnox_les_fuel_depleted = new Item().setUnlocalizedName("rod_zirnox_les_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_zirnox_empty).setTextureName(RefStrings.MODID + ":rod_zirnox_les_fuel_depleted"); - waste_natural_uranium = new ItemNuclearWaste().setUnlocalizedName("waste_natural_uranium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_uranium"); - waste_uranium = new ItemNuclearWaste().setUnlocalizedName("waste_uranium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_uranium"); - waste_thorium = new ItemNuclearWaste().setUnlocalizedName("waste_thorium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_thorium"); - waste_mox = new ItemNuclearWaste().setUnlocalizedName("waste_mox").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_mox"); - waste_plutonium = new ItemNuclearWaste().setUnlocalizedName("waste_plutonium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_plutonium"); - waste_u233 = new ItemNuclearWaste().setUnlocalizedName("waste_u233").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_uranium"); - waste_u235 = new ItemNuclearWaste().setUnlocalizedName("waste_u235").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_uranium"); - waste_schrabidium = new ItemNuclearWaste().setUnlocalizedName("waste_schrabidium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_schrabidium"); - waste_natural_uranium_hot = new ItemNuclearWaste().setUnlocalizedName("waste_natural_uranium_hot").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_uranium_hot"); - waste_uranium_hot = new ItemNuclearWaste().setUnlocalizedName("waste_uranium_hot").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_uranium_hot"); - waste_thorium_hot = new ItemNuclearWaste().setUnlocalizedName("waste_thorium_hot").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_thorium_hot"); - waste_mox_hot = new ItemNuclearWaste().setUnlocalizedName("waste_mox_hot").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_mox_hot"); - waste_plutonium_hot = new ItemNuclearWaste().setUnlocalizedName("waste_plutonium_hot").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_plutonium_hot"); - waste_u233_hot = new ItemNuclearWaste().setUnlocalizedName("waste_u233_hot").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_uranium_hot"); - waste_u235_hot = new ItemNuclearWaste().setUnlocalizedName("waste_u235_hot").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_uranium_hot"); - waste_schrabidium_hot = new ItemNuclearWaste().setUnlocalizedName("waste_schrabidium_hot").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_schrabidium_hot"); - + waste_natural_uranium = new ItemDepletedFuel().setUnlocalizedName("waste_natural_uranium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_uranium"); + waste_uranium = new ItemDepletedFuel().setUnlocalizedName("waste_uranium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_uranium"); + waste_thorium = new ItemDepletedFuel().setUnlocalizedName("waste_thorium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_thorium"); + waste_mox = new ItemDepletedFuel().setUnlocalizedName("waste_mox").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_mox"); + waste_plutonium = new ItemDepletedFuel().setUnlocalizedName("waste_plutonium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_plutonium"); + waste_u233 = new ItemDepletedFuel().setUnlocalizedName("waste_u233").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_uranium"); + waste_u235 = new ItemDepletedFuel().setUnlocalizedName("waste_u235").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_uranium"); + waste_schrabidium = new ItemDepletedFuel().setUnlocalizedName("waste_schrabidium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_schrabidium"); + + waste_plate_u233 = new ItemDepletedFuel().setUnlocalizedName("waste_plate_u233").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_plate_uranium"); + waste_plate_u235 = new ItemDepletedFuel().setUnlocalizedName("waste_plate_u235").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_plate_uranium"); + waste_plate_mox = new ItemDepletedFuel().setUnlocalizedName("waste_plate_mox").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_plate_mox"); + waste_plate_pu239 = new ItemDepletedFuel().setUnlocalizedName("waste_plate_pu239").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_plate_mox"); + waste_plate_sa326 = new ItemDepletedFuel().setUnlocalizedName("waste_plate_sa326").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_plate_sa326"); + rod_water = new ItemCustomLore().setUnlocalizedName("rod_water").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_water"); rod_dual_water = new ItemCustomLore().setUnlocalizedName("rod_dual_water").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_water"); rod_quad_water = new ItemCustomLore().setUnlocalizedName("rod_quad_water").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_water"); @@ -3630,6 +3586,12 @@ public class ModItems { pile_rod_source = new ItemPileRod().setUnlocalizedName("pile_rod_source").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pile_rod_source"); pile_rod_boron = new ItemPileRod().setUnlocalizedName("pile_rod_boron").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pile_rod_boron"); + plate_fuel_u233 = new ItemPlateFuel(1100000).setFunction(FunctionEnum.SQUARE_ROOT, 50).setUnlocalizedName("plate_fuel_u233").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":plate_fuel_u233"); + plate_fuel_u235 = new ItemPlateFuel(1100000).setFunction(FunctionEnum.SQUARE_ROOT, 40).setUnlocalizedName("plate_fuel_u235").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":plate_fuel_u235"); + plate_fuel_mox = new ItemPlateFuel(1400000).setFunction(FunctionEnum.LOGARITHM, 50).setUnlocalizedName("plate_fuel_mox").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":plate_fuel_mox"); + plate_fuel_pu239 = new ItemPlateFuel(1000000).setFunction(FunctionEnum.NEGATIVE_QUADRATIC, 25).setUnlocalizedName("plate_fuel_pu239").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":plate_fuel_pu239"); + plate_fuel_sa326 = new ItemPlateFuel(1000000).setFunction(FunctionEnum.LINEAR, 40).setUnlocalizedName("plate_fuel_sa326").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":plate_fuel_sa326"); + rbmk_lid = new ItemRBMKLid().setUnlocalizedName("rbmk_lid").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rbmk_lid"); rbmk_lid_glass = new ItemRBMKLid().setUnlocalizedName("rbmk_lid_glass").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rbmk_lid_glass"); @@ -3888,21 +3850,6 @@ public class ModItems { scrap = new Item().setUnlocalizedName("scrap").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":scrap"); scrap_nuclear = new Item().setUnlocalizedName("scrap_nuclear").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":scrap_nuclear"); containment_box = new ItemLeadBox().setUnlocalizedName("containment_box").setCreativeTab(null).setTextureName(RefStrings.MODID + ":containment_box"); - rod_thorium_fuel_depleted = new ItemHazard(10F, true).setUnlocalizedName("rod_thorium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_thorium_fuel_depleted"); - rod_dual_thorium_fuel_depleted = new ItemHazard(20F, true).setUnlocalizedName("rod_dual_thorium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_thorium_fuel_depleted"); - rod_quad_thorium_fuel_depleted = new ItemHazard(40F, true).setUnlocalizedName("rod_quad_thorium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_thorium_fuel_depleted"); - rod_uranium_fuel_depleted = new ItemHazard(15F, true).setUnlocalizedName("rod_uranium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_uranium_fuel_depleted"); - rod_dual_uranium_fuel_depleted = new ItemHazard(30F, true).setUnlocalizedName("rod_dual_uranium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_uranium_fuel_depleted"); - rod_quad_uranium_fuel_depleted = new ItemHazard(60F, true).setUnlocalizedName("rod_quad_uranium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_uranium_fuel_depleted"); - rod_plutonium_fuel_depleted = new ItemHazard(15F, true).setUnlocalizedName("rod_plutonium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_plutonium_fuel_depleted"); - rod_dual_plutonium_fuel_depleted = new ItemHazard(30F, true).setUnlocalizedName("rod_dual_plutonium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_plutonium_fuel_depleted"); - rod_quad_plutonium_fuel_depleted = new ItemHazard(60F, true).setUnlocalizedName("rod_quad_plutonium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_plutonium_fuel_depleted"); - rod_mox_fuel_depleted = new ItemHazard(15F, true).setUnlocalizedName("rod_mox_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_mox_fuel_depleted"); - rod_dual_mox_fuel_depleted = new ItemHazard(30F, true).setUnlocalizedName("rod_dual_mox_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_mox_fuel_depleted"); - rod_quad_mox_fuel_depleted = new ItemHazard(60F, true).setUnlocalizedName("rod_quad_mox_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_mox_fuel_depleted"); - rod_schrabidium_fuel_depleted = new ItemHazard(40F, true).setUnlocalizedName("rod_schrabidium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_schrabidium_fuel_depleted"); - rod_dual_schrabidium_fuel_depleted = new ItemHazard(80F, true).setUnlocalizedName("rod_dual_schrabidium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_schrabidium_fuel_depleted"); - rod_quad_schrabidium_fuel_depleted = new ItemHazard(160F, true).setUnlocalizedName("rod_quad_schrabidium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_schrabidium_fuel_depleted"); rod_waste = new ItemHazard(15F).setUnlocalizedName("rod_waste").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_waste"); rod_dual_waste = new ItemHazard(30F).setUnlocalizedName("rod_dual_waste").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_waste"); rod_quad_waste = new ItemHazard(60F).setUnlocalizedName("rod_quad_waste").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_waste"); @@ -6647,26 +6594,6 @@ public class ModItems { GameRegistry.registerItem(rod_dual_solinium, rod_dual_solinium.getUnlocalizedName()); GameRegistry.registerItem(rod_quad_solinium, rod_quad_solinium.getUnlocalizedName()); - GameRegistry.registerItem(rod_uranium_fuel, rod_uranium_fuel.getUnlocalizedName()); - GameRegistry.registerItem(rod_dual_uranium_fuel, rod_dual_uranium_fuel.getUnlocalizedName()); - GameRegistry.registerItem(rod_quad_uranium_fuel, rod_quad_uranium_fuel.getUnlocalizedName()); - - GameRegistry.registerItem(rod_thorium_fuel, rod_thorium_fuel.getUnlocalizedName()); - GameRegistry.registerItem(rod_dual_thorium_fuel, rod_dual_thorium_fuel.getUnlocalizedName()); - GameRegistry.registerItem(rod_quad_thorium_fuel, rod_quad_thorium_fuel.getUnlocalizedName()); - - GameRegistry.registerItem(rod_plutonium_fuel, rod_plutonium_fuel.getUnlocalizedName()); - GameRegistry.registerItem(rod_dual_plutonium_fuel, rod_dual_plutonium_fuel.getUnlocalizedName()); - GameRegistry.registerItem(rod_quad_plutonium_fuel, rod_quad_plutonium_fuel.getUnlocalizedName()); - - GameRegistry.registerItem(rod_mox_fuel, rod_mox_fuel.getUnlocalizedName()); - GameRegistry.registerItem(rod_dual_mox_fuel, rod_dual_mox_fuel.getUnlocalizedName()); - GameRegistry.registerItem(rod_quad_mox_fuel, rod_quad_mox_fuel.getUnlocalizedName()); - - GameRegistry.registerItem(rod_schrabidium_fuel, rod_schrabidium_fuel.getUnlocalizedName()); - GameRegistry.registerItem(rod_dual_schrabidium_fuel, rod_dual_schrabidium_fuel.getUnlocalizedName()); - GameRegistry.registerItem(rod_quad_schrabidium_fuel, rod_quad_schrabidium_fuel.getUnlocalizedName()); - GameRegistry.registerItem(rod_water, rod_water.getUnlocalizedName()); GameRegistry.registerItem(rod_dual_water, rod_dual_water.getUnlocalizedName()); GameRegistry.registerItem(rod_quad_water, rod_quad_water.getUnlocalizedName()); @@ -6700,26 +6627,6 @@ public class ModItems { GameRegistry.registerItem(rod_verticium, rod_verticium.getUnlocalizedName()); //Nuclear Waste - GameRegistry.registerItem(rod_uranium_fuel_depleted, rod_uranium_fuel_depleted.getUnlocalizedName()); - GameRegistry.registerItem(rod_dual_uranium_fuel_depleted, rod_dual_uranium_fuel_depleted.getUnlocalizedName()); - GameRegistry.registerItem(rod_quad_uranium_fuel_depleted, rod_quad_uranium_fuel_depleted.getUnlocalizedName()); - - GameRegistry.registerItem(rod_thorium_fuel_depleted, rod_thorium_fuel_depleted.getUnlocalizedName()); - GameRegistry.registerItem(rod_dual_thorium_fuel_depleted, rod_dual_thorium_fuel_depleted.getUnlocalizedName()); - GameRegistry.registerItem(rod_quad_thorium_fuel_depleted, rod_quad_thorium_fuel_depleted.getUnlocalizedName()); - - GameRegistry.registerItem(rod_plutonium_fuel_depleted, rod_plutonium_fuel_depleted.getUnlocalizedName()); - GameRegistry.registerItem(rod_dual_plutonium_fuel_depleted, rod_dual_plutonium_fuel_depleted.getUnlocalizedName()); - GameRegistry.registerItem(rod_quad_plutonium_fuel_depleted, rod_quad_plutonium_fuel_depleted.getUnlocalizedName()); - - GameRegistry.registerItem(rod_mox_fuel_depleted, rod_mox_fuel_depleted.getUnlocalizedName()); - GameRegistry.registerItem(rod_dual_mox_fuel_depleted, rod_dual_mox_fuel_depleted.getUnlocalizedName()); - GameRegistry.registerItem(rod_quad_mox_fuel_depleted, rod_quad_mox_fuel_depleted.getUnlocalizedName()); - - GameRegistry.registerItem(rod_schrabidium_fuel_depleted, rod_schrabidium_fuel_depleted.getUnlocalizedName()); - GameRegistry.registerItem(rod_dual_schrabidium_fuel_depleted, rod_dual_schrabidium_fuel_depleted.getUnlocalizedName()); - GameRegistry.registerItem(rod_quad_schrabidium_fuel_depleted, rod_quad_schrabidium_fuel_depleted.getUnlocalizedName()); - GameRegistry.registerItem(rod_quad_euphemium, rod_quad_euphemium.getUnlocalizedName()); GameRegistry.registerItem(rod_waste, rod_waste.getUnlocalizedName()); @@ -6748,15 +6655,8 @@ public class ModItems { GameRegistry.registerItem(rod_zirnox_u233_fuel_depleted, rod_zirnox_u233_fuel_depleted.getUnlocalizedName()); GameRegistry.registerItem(rod_zirnox_u235_fuel_depleted, rod_zirnox_u235_fuel_depleted.getUnlocalizedName()); GameRegistry.registerItem(rod_zirnox_les_fuel_depleted, rod_zirnox_les_fuel_depleted.getUnlocalizedName()); - - GameRegistry.registerItem(waste_natural_uranium_hot, waste_natural_uranium_hot.getUnlocalizedName()); - GameRegistry.registerItem(waste_uranium_hot, waste_uranium_hot.getUnlocalizedName()); - GameRegistry.registerItem(waste_thorium_hot, waste_thorium_hot.getUnlocalizedName()); - GameRegistry.registerItem(waste_mox_hot, waste_mox_hot.getUnlocalizedName()); - GameRegistry.registerItem(waste_plutonium_hot, waste_plutonium_hot.getUnlocalizedName()); - GameRegistry.registerItem(waste_u233_hot, waste_u233_hot.getUnlocalizedName()); - GameRegistry.registerItem(waste_u235_hot, waste_u235_hot.getUnlocalizedName()); - GameRegistry.registerItem(waste_schrabidium_hot, waste_schrabidium_hot.getUnlocalizedName()); + + //Depleted Fuel GameRegistry.registerItem(waste_natural_uranium, waste_natural_uranium.getUnlocalizedName()); GameRegistry.registerItem(waste_uranium, waste_uranium.getUnlocalizedName()); GameRegistry.registerItem(waste_thorium, waste_thorium.getUnlocalizedName()); @@ -6765,13 +6665,26 @@ public class ModItems { GameRegistry.registerItem(waste_u233, waste_u233.getUnlocalizedName()); GameRegistry.registerItem(waste_u235, waste_u235.getUnlocalizedName()); GameRegistry.registerItem(waste_schrabidium, waste_schrabidium.getUnlocalizedName()); - + + GameRegistry.registerItem(waste_plate_u233, waste_plate_u233.getUnlocalizedName()); + GameRegistry.registerItem(waste_plate_u235, waste_plate_u235.getUnlocalizedName()); + GameRegistry.registerItem(waste_plate_mox, waste_plate_mox.getUnlocalizedName()); + GameRegistry.registerItem(waste_plate_pu239, waste_plate_pu239.getUnlocalizedName()); + GameRegistry.registerItem(waste_plate_sa326, waste_plate_sa326.getUnlocalizedName()); + //Pile parts GameRegistry.registerItem(pile_rod_uranium, pile_rod_uranium.getUnlocalizedName()); GameRegistry.registerItem(pile_rod_plutonium, pile_rod_plutonium.getUnlocalizedName()); GameRegistry.registerItem(pile_rod_source, pile_rod_source.getUnlocalizedName()); GameRegistry.registerItem(pile_rod_boron, pile_rod_boron.getUnlocalizedName()); + //Plate Fuels + GameRegistry.registerItem(plate_fuel_u233, plate_fuel_u233.getUnlocalizedName()); + GameRegistry.registerItem(plate_fuel_u235, plate_fuel_u235.getUnlocalizedName()); + GameRegistry.registerItem(plate_fuel_mox, plate_fuel_mox.getUnlocalizedName()); + GameRegistry.registerItem(plate_fuel_pu239, plate_fuel_pu239.getUnlocalizedName()); + GameRegistry.registerItem(plate_fuel_sa326, plate_fuel_sa326.getUnlocalizedName()); + //RBMK parts GameRegistry.registerItem(rbmk_lid, rbmk_lid.getUnlocalizedName()); GameRegistry.registerItem(rbmk_lid_glass, rbmk_lid_glass.getUnlocalizedName()); diff --git a/src/main/java/com/hbm/items/machine/ItemDepletedFuel.java b/src/main/java/com/hbm/items/machine/ItemDepletedFuel.java new file mode 100644 index 000000000..11ead81e9 --- /dev/null +++ b/src/main/java/com/hbm/items/machine/ItemDepletedFuel.java @@ -0,0 +1,46 @@ +package com.hbm.items.machine; + +import java.util.List; + +import com.hbm.items.special.ItemNuclearWaste; +import com.hbm.lib.Library; +import com.hbm.main.MainRegistry; +import com.hbm.util.I18nUtil; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IIcon; + +public class ItemDepletedFuel extends ItemNuclearWaste { + + public ItemDepletedFuel() { + this.setHasSubtypes(true); + this.setMaxDamage(0); + } + + @Override + @SideOnly(Side.CLIENT) + public void getSubItems(Item item, CreativeTabs tabs, List list) { + for(int i = 0; i < 2; i++) { + list.add(new ItemStack(item, 1, i)); + } + } + + @Override + @SideOnly(Side.CLIENT) + public int getColorFromItemStack(ItemStack p_82790_1_, int p_82790_2_) + { + return p_82790_1_.getItemDamage() > 0 ? 0xFFBFA5 : 16777215; + } + + @Override + public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) { + if (itemstack.getItemDamage() > 0) + list.add(EnumChatFormatting.GOLD + I18nUtil.resolveKey("desc.item.wasteCooling")); + } +} diff --git a/src/main/java/com/hbm/items/machine/ItemFuelRod.java b/src/main/java/com/hbm/items/machine/ItemFuelRod.java index 8cae46ca2..3fa3cd46e 100644 --- a/src/main/java/com/hbm/items/machine/ItemFuelRod.java +++ b/src/main/java/com/hbm/items/machine/ItemFuelRod.java @@ -13,24 +13,12 @@ import net.minecraft.util.EnumChatFormatting; public class ItemFuelRod extends Item { public int lifeTime; - public int heat; - public ItemFuelRod(int life, int heat) { + public ItemFuelRod(int life) { this.lifeTime = life; - this.heat = heat; this.canRepair = false; } - @Override - public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) { - - list.add(EnumChatFormatting.YELLOW + "[Reactor Fuel Rod]"); - list.add(EnumChatFormatting.DARK_AQUA + " Generates " + heat + " heat per tick"); - list.add(EnumChatFormatting.DARK_AQUA + " Lasts " + Library.getShortNumber(lifeTime) + " ticks"); - - super.addInformation(itemstack, player, list, bool); - } - public static void setLifeTime(ItemStack stack, int time) { if(!stack.hasTagCompound()) diff --git a/src/main/java/com/hbm/items/machine/ItemPlateFuel.java b/src/main/java/com/hbm/items/machine/ItemPlateFuel.java new file mode 100644 index 000000000..65d70519e --- /dev/null +++ b/src/main/java/com/hbm/items/machine/ItemPlateFuel.java @@ -0,0 +1,70 @@ +package com.hbm.items.machine; + +import java.util.List; + +import com.hbm.lib.Library; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.world.World; + +public class ItemPlateFuel extends ItemFuelRod { + + public int reactivity; + public FunctionEnum function; + + public ItemPlateFuel(int life) { + super(life); + this.canRepair = false; + } + + public ItemPlateFuel setFunction(FunctionEnum function, int reactivity) { + this.function = function; + this.reactivity = reactivity; + return this; + } + + @Override + public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) { + + list.add(EnumChatFormatting.YELLOW + "[Reactor Plate Fuel]"); + list.add(EnumChatFormatting.DARK_AQUA + " " + getFunctionDesc()); + list.add(EnumChatFormatting.DARK_AQUA + " Yield of " + Library.getShortNumber(lifeTime) + " events"); + + super.addInformation(itemstack, player, list, bool); + } + + public static enum FunctionEnum { + LOGARITHM(), + SQUARE_ROOT(), + NEGATIVE_QUADRATIC(), + LINEAR(); + + private FunctionEnum() { } + } + + public String getFunctionDesc() { + switch(this.function) { + case LOGARITHM: return "log10(x + 1) * 0.5 * " + reactivity; + case SQUARE_ROOT: return "sqrt(x) * " + reactivity + " / 10"; + case NEGATIVE_QUADRATIC: return "[x - (x² / 10000)] / 100 * " + reactivity; + case LINEAR: return "x / 100 * " + reactivity; + default: return "x"; + } + } + + public int react(World world, ItemStack stack, int flux) { + setLifeTime(stack, getLifeTime(stack) + flux); + + switch(this.function) { + case LOGARITHM: return (int) (Math.log10(flux + 1) * 0.5D * reactivity); + case SQUARE_ROOT: return (int) (Math.sqrt(flux) * this.reactivity / 10); + case NEGATIVE_QUADRATIC: return (int) (Math.max(flux - (flux * flux / 10000) / 100 * reactivity, 0)); + case LINEAR: return (int) (flux / 100 * reactivity); + default: return 0; + } + } +} diff --git a/src/main/java/com/hbm/items/machine/ItemRBMKRod.java b/src/main/java/com/hbm/items/machine/ItemRBMKRod.java index bb8cabb35..aa7527bd6 100644 --- a/src/main/java/com/hbm/items/machine/ItemRBMKRod.java +++ b/src/main/java/com/hbm/items/machine/ItemRBMKRod.java @@ -221,7 +221,7 @@ public class ItemRBMKRod extends Item { } /** - * @param flux [0;100] ...or at least those are sane levels + * @param reactivity [0;100] ...or at least those are sane levels * @return the amount of reactivity yielded, unmodified by xenon */ public double reactivityFunc(double in, double enrichment) { diff --git a/src/main/java/com/hbm/items/machine/ItemZirnoxRod.java b/src/main/java/com/hbm/items/machine/ItemZirnoxRod.java index d125833ed..263fc015c 100644 --- a/src/main/java/com/hbm/items/machine/ItemZirnoxRod.java +++ b/src/main/java/com/hbm/items/machine/ItemZirnoxRod.java @@ -9,9 +9,12 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; public class ItemZirnoxRod extends ItemFuelRod { - + + public int heat; + public ItemZirnoxRod(int life, int heat) { - super(life, heat); + super(life); + this.heat = heat; } @Override diff --git a/src/main/java/com/hbm/lib/HbmChestContents.java b/src/main/java/com/hbm/lib/HbmChestContents.java index 395071e9e..2fbfa68ba 100644 --- a/src/main/java/com/hbm/lib/HbmChestContents.java +++ b/src/main/java/com/hbm/lib/HbmChestContents.java @@ -135,15 +135,15 @@ public class HbmChestContents { new WeightedRandomChestContent(ModItems.rod_dual_pu239, 0, 1, 1, 3), new WeightedRandomChestContent(ModItems.rod_quad_u235, 0, 1, 1, 3), new WeightedRandomChestContent(ModItems.rod_quad_pu239, 0, 1, 1, 3), - new WeightedRandomChestContent(ModItems.rod_uranium_fuel, 0, 1, 1, 4), - new WeightedRandomChestContent(ModItems.rod_plutonium_fuel, 0, 1, 1, 4), - new WeightedRandomChestContent(ModItems.rod_mox_fuel, 0, 1, 1, 4), - new WeightedRandomChestContent(ModItems.rod_dual_uranium_fuel, 0, 1, 1, 3), - new WeightedRandomChestContent(ModItems.rod_dual_plutonium_fuel, 0, 1, 1, 3), - new WeightedRandomChestContent(ModItems.rod_dual_mox_fuel, 0, 1, 1, 3), - new WeightedRandomChestContent(ModItems.rod_quad_uranium_fuel, 0, 1, 1, 1), - new WeightedRandomChestContent(ModItems.rod_quad_plutonium_fuel, 0, 1, 1, 1), - new WeightedRandomChestContent(ModItems.rod_quad_mox_fuel, 0, 1, 1, 1), + new WeightedRandomChestContent(ModItems.rod_zirnox_uranium_fuel, 0, 1, 1, 4), + new WeightedRandomChestContent(ModItems.rod_zirnox_plutonium_fuel, 0, 1, 1, 4), + new WeightedRandomChestContent(ModItems.rod_zirnox_mox_fuel, 0, 1, 1, 4), + new WeightedRandomChestContent(ModItems.rod_zirnox_lithium, 0, 1, 1, 3), + new WeightedRandomChestContent(ModItems.rod_zirnox_th232, 0, 1, 1, 3), + new WeightedRandomChestContent(ModItems.rod_zirnox_thorium_fuel, 0, 1, 1, 3), + new WeightedRandomChestContent(ModItems.rod_zirnox_tritium, 0, 1, 1, 1), + new WeightedRandomChestContent(ModItems.rod_zirnox_u233_fuel, 0, 1, 1, 1), + new WeightedRandomChestContent(ModItems.rod_zirnox_u235_fuel, 0, 1, 1, 1), new WeightedRandomChestContent(ModItems.pellet_rtg, 0, 1, 1, 3), new WeightedRandomChestContent(ModItems.powder_thorium, 0, 1, 1, 1), new WeightedRandomChestContent(ModItems.powder_neptunium, 0, 1, 1, 1), @@ -167,9 +167,9 @@ public class HbmChestContents { new WeightedRandomChestContent(ModItems.gun_kit_1, 0, 2, 3, 4), new WeightedRandomChestContent(ModItems.gun_rpg, 0, 1, 1, 3), new WeightedRandomChestContent(ModItems.ammo_rocket, 0, 1, 6, 3), - new WeightedRandomChestContent(ModItems.rod_uranium_fuel, 0, 1, 1, 2), - new WeightedRandomChestContent(ModItems.rod_dual_uranium_fuel, 0, 1, 1, 2), - new WeightedRandomChestContent(ModItems.rod_quad_uranium_fuel, 0, 1, 1, 2), + new WeightedRandomChestContent(ModItems.nugget_uranium_fuel, 0, 1, 1, 2), + new WeightedRandomChestContent(ModItems.billet_uranium_fuel, 0, 1, 1, 2), + new WeightedRandomChestContent(ModItems.ingot_uranium_fuel, 0, 1, 1, 2), new WeightedRandomChestContent(ModItems.ammo_nuke_safe, 0, 1, 2, 1), new WeightedRandomChestContent(ModItems.gun_fatman, 0, 1, 1, 1), new WeightedRandomChestContent(ModItems.bottle_nuka, 0, 1, 3, 6), diff --git a/src/main/java/com/hbm/packet/AuxButtonPacket.java b/src/main/java/com/hbm/packet/AuxButtonPacket.java index 6d4605267..865f59afc 100644 --- a/src/main/java/com/hbm/packet/AuxButtonPacket.java +++ b/src/main/java/com/hbm/packet/AuxButtonPacket.java @@ -86,23 +86,6 @@ public class AuxButtonPacket implements IMessage { if(m.id == 0) reactor.retracting = m.value == 1; - - if(m.id == 1) { - FluidType type = FluidType.STEAM; - int fill = reactor.tanks[2].getFill(); - - switch(m.value) { - case 0: type = FluidType.HOTSTEAM; fill = (int)Math.floor(fill / 10D); break; - case 1: type = FluidType.SUPERHOTSTEAM; fill = (int)Math.floor(fill / 10D); break; - case 2: type = FluidType.STEAM; fill = (int)Math.floor(fill * 100); break; - } - - if(fill > reactor.tanks[2].getMaxFill()) - fill = reactor.tanks[2].getMaxFill(); - - reactor.tanks[2].setTankType(type); - reactor.tanks[2].setFill(fill); - } } if (te instanceof TileEntityRadioRec) { @@ -123,7 +106,7 @@ public class AuxButtonPacket implements IMessage { field.isOn = !field.isOn; } - if (te instanceof TileEntityReactorControl) { + /*if (te instanceof TileEntityReactorControl) { TileEntityReactorControl control = (TileEntityReactorControl)te; if(m.id == 1) @@ -181,7 +164,7 @@ public class AuxButtonPacket implements IMessage { } } } - } + }*/ if (te instanceof TileEntityMachineReactorLarge) { TileEntityMachineReactorLarge reactor = (TileEntityMachineReactorLarge)te; diff --git a/src/main/java/com/hbm/packet/AuxGaugePacket.java b/src/main/java/com/hbm/packet/AuxGaugePacket.java index 78f2a3a88..c8c2bfb79 100644 --- a/src/main/java/com/hbm/packet/AuxGaugePacket.java +++ b/src/main/java/com/hbm/packet/AuxGaugePacket.java @@ -135,18 +135,6 @@ public class AuxGaugePacket implements IMessage { selenium.powerCap = m.value; } - if (te instanceof TileEntityMachineReactorSmall) { - TileEntityMachineReactorSmall reactor = (TileEntityMachineReactorSmall)te; - - if(m.id == 0) - reactor.rods = m.value; - if(m.id == 1) - reactor.retracting = m.value == 1; - if(m.id == 2) - reactor.coreHeat = m.value; - if(m.id == 3) - reactor.hullHeat = m.value; - } if (te instanceof TileEntityBomber) { TileEntityBomber bomber = (TileEntityBomber)te; diff --git a/src/main/java/com/hbm/render/tileentity/RenderSmallReactor.java b/src/main/java/com/hbm/render/tileentity/RenderSmallReactor.java index e2deecf55..55e9e6709 100644 --- a/src/main/java/com/hbm/render/tileentity/RenderSmallReactor.java +++ b/src/main/java/com/hbm/render/tileentity/RenderSmallReactor.java @@ -25,14 +25,14 @@ public class RenderSmallReactor extends TileEntitySpecialRenderer { ResourceManager.reactor_small_base.renderAll(); GL11.glPushMatrix(); - GL11.glTranslated(0.0D, reactor.rods / 100D, 0.0D); + GL11.glTranslated(0.0D, (double) reactor.rods / reactor.rodsMax, 0.0D); bindTexture(ResourceManager.reactor_small_rods_tex); ResourceManager.reactor_small_rods.renderAll(); GL11.glPopMatrix(); - if(reactor.coreHeat > 0 && reactor.isSubmerged()) { + if(reactor.hasHeat() && reactor.isSubmerged()) { GL11.glDisable(GL11.GL_TEXTURE_2D); GL11.glEnable(GL11.GL_BLEND); diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineGenerator.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineGenerator.java index c33aa1271..95ed346d1 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineGenerator.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineGenerator.java @@ -230,7 +230,7 @@ public class TileEntityMachineGenerator extends TileEntity implements ISidedInve i == 6 || i == 7 || i == 8) - if(itemStack.getItem() == ModItems.rod_uranium_fuel_depleted || + /*if(itemStack.getItem() == ModItems.rod_uranium_fuel_depleted || itemStack.getItem() == ModItems.rod_dual_uranium_fuel_depleted || itemStack.getItem() == ModItems.rod_quad_uranium_fuel_depleted || itemStack.getItem() == ModItems.rod_plutonium_fuel_depleted || @@ -241,7 +241,7 @@ public class TileEntityMachineGenerator extends TileEntity implements ISidedInve itemStack.getItem() == ModItems.rod_quad_mox_fuel_depleted || itemStack.getItem() == ModItems.rod_schrabidium_fuel_depleted || itemStack.getItem() == ModItems.rod_dual_schrabidium_fuel_depleted || - itemStack.getItem() == ModItems.rod_quad_schrabidium_fuel_depleted) + itemStack.getItem() == ModItems.rod_quad_schrabidium_fuel_depleted)*/ return true; if(i == 9 || i == 10) if(itemStack.getItem() == Items.bucket || itemStack.getItem() == ModItems.rod_empty || itemStack.getItem() == ModItems.rod_dual_empty || itemStack.getItem() == ModItems.rod_quad_empty) @@ -283,7 +283,7 @@ public class TileEntityMachineGenerator extends TileEntity implements ISidedInve //Batteries power = Library.chargeItemsFromTE(slots, 11, power, powerMax); - for(int i = 0; i < 9; i++) + /*for(int i = 0; i < 9; i++) { if(slots[i] != null && slots[i].getItem() == ModItems.rod_uranium_fuel) { @@ -429,7 +429,7 @@ public class TileEntityMachineGenerator extends TileEntity implements ISidedInve this.slots[i] = new ItemStack(ModItems.rod_quad_schrabidium_fuel_depleted); } } - } + }*/ if(this.power > powerMax) { diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineReactorLarge.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineReactorLarge.java index 63fb2cb94..5dac387fd 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineReactorLarge.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineReactorLarge.java @@ -573,30 +573,30 @@ public class TileEntityMachineReactorLarge extends TileEntity IInventory chest = (IInventory)te; - Item waste = ModItems.waste_uranium_hot; + Item waste = ModItems.waste_uranium; switch(type) { case PLUTONIUM: - waste = ModItems.waste_plutonium_hot; + waste = ModItems.waste_plutonium; break; case MOX: - waste = ModItems.waste_mox_hot; + waste = ModItems.waste_mox; break; case SCHRABIDIUM: - waste = ModItems.waste_schrabidium_hot; + waste = ModItems.waste_schrabidium; break; case THORIUM: - waste = ModItems.waste_thorium_hot; + waste = ModItems.waste_thorium; break; default: - waste = ModItems.waste_uranium_hot; + waste = ModItems.waste_uranium; break; } for(int i = 0; i < chest.getSizeInventory(); i++) { - if(chest.isItemValidForSlot(i, new ItemStack(waste)) && chest.getStackInSlot(i) != null && chest.getStackInSlot(i).getItem() == waste && chest.getStackInSlot(i).stackSize < chest.getStackInSlot(i).getMaxStackSize()) { - chest.setInventorySlotContents(i, new ItemStack(waste, chest.getStackInSlot(i).stackSize + 1)); + if(chest.isItemValidForSlot(i, new ItemStack(waste, 1, 1)) && chest.getStackInSlot(i) != null && chest.getStackInSlot(i).getItem() == waste && chest.getStackInSlot(i).stackSize < chest.getStackInSlot(i).getMaxStackSize()) { + chest.setInventorySlotContents(i, new ItemStack(waste, chest.getStackInSlot(i).stackSize + 1, 1)); this.waste -= wSize; return; } @@ -604,8 +604,8 @@ public class TileEntityMachineReactorLarge extends TileEntity for(int i = 0; i < chest.getSizeInventory(); i++) { - if(chest.isItemValidForSlot(i, new ItemStack(waste)) && chest.getStackInSlot(i) == null) { - chest.setInventorySlotContents(i, new ItemStack(waste)); + if(chest.isItemValidForSlot(i, new ItemStack(waste, 1, 1)) && chest.getStackInSlot(i) == null) { + chest.setInventorySlotContents(i, new ItemStack(waste, 1, 1)); this.waste -= wSize; return; } @@ -923,48 +923,18 @@ public class TileEntityMachineReactorLarge extends TileEntity TileEntityMachineReactorLarge.registerFuelEntry(1, ReactorFuelType.URANIUM, ModItems.nugget_uranium_fuel); TileEntityMachineReactorLarge.registerFuelEntry(9, ReactorFuelType.URANIUM, ModItems.ingot_uranium_fuel); - TileEntityMachineReactorLarge.registerFuelEntry(6, ReactorFuelType.URANIUM, ModItems.rod_uranium_fuel); - TileEntityMachineReactorLarge.registerFuelEntry(12, ReactorFuelType.URANIUM, ModItems.rod_dual_uranium_fuel); - TileEntityMachineReactorLarge.registerFuelEntry(24, ReactorFuelType.URANIUM, ModItems.rod_quad_uranium_fuel); - TileEntityMachineReactorLarge.registerWasteEntry(6, ReactorFuelType.URANIUM, ModItems.rod_empty, ModItems.rod_uranium_fuel_depleted); - TileEntityMachineReactorLarge.registerWasteEntry(12, ReactorFuelType.URANIUM, ModItems.rod_dual_empty, ModItems.rod_dual_uranium_fuel_depleted); - TileEntityMachineReactorLarge.registerWasteEntry(24, ReactorFuelType.URANIUM, ModItems.rod_quad_empty, ModItems.rod_quad_uranium_fuel_depleted); TileEntityMachineReactorLarge.registerFuelEntry(1, ReactorFuelType.PLUTONIUM, ModItems.nugget_plutonium_fuel); TileEntityMachineReactorLarge.registerFuelEntry(9, ReactorFuelType.PLUTONIUM, ModItems.ingot_plutonium_fuel); - TileEntityMachineReactorLarge.registerFuelEntry(6, ReactorFuelType.PLUTONIUM, ModItems.rod_plutonium_fuel); - TileEntityMachineReactorLarge.registerFuelEntry(12, ReactorFuelType.PLUTONIUM, ModItems.rod_dual_plutonium_fuel); - TileEntityMachineReactorLarge.registerFuelEntry(24, ReactorFuelType.PLUTONIUM, ModItems.rod_quad_plutonium_fuel); - TileEntityMachineReactorLarge.registerWasteEntry(6, ReactorFuelType.PLUTONIUM, ModItems.rod_empty, ModItems.rod_plutonium_fuel_depleted); - TileEntityMachineReactorLarge.registerWasteEntry(12, ReactorFuelType.PLUTONIUM, ModItems.rod_dual_empty, ModItems.rod_dual_plutonium_fuel_depleted); - TileEntityMachineReactorLarge.registerWasteEntry(24, ReactorFuelType.PLUTONIUM, ModItems.rod_quad_empty, ModItems.rod_quad_plutonium_fuel_depleted); - + TileEntityMachineReactorLarge.registerFuelEntry(1, ReactorFuelType.MOX, ModItems.nugget_mox_fuel); TileEntityMachineReactorLarge.registerFuelEntry(9, ReactorFuelType.MOX, ModItems.ingot_mox_fuel); - TileEntityMachineReactorLarge.registerFuelEntry(6, ReactorFuelType.MOX, ModItems.rod_mox_fuel); - TileEntityMachineReactorLarge.registerFuelEntry(12, ReactorFuelType.MOX, ModItems.rod_dual_mox_fuel); - TileEntityMachineReactorLarge.registerFuelEntry(24, ReactorFuelType.MOX, ModItems.rod_quad_mox_fuel); - TileEntityMachineReactorLarge.registerWasteEntry(6, ReactorFuelType.MOX, ModItems.rod_empty, ModItems.rod_mox_fuel_depleted); - TileEntityMachineReactorLarge.registerWasteEntry(12, ReactorFuelType.MOX, ModItems.rod_dual_empty, ModItems.rod_dual_mox_fuel_depleted); - TileEntityMachineReactorLarge.registerWasteEntry(24, ReactorFuelType.MOX, ModItems.rod_quad_empty, ModItems.rod_quad_mox_fuel_depleted); TileEntityMachineReactorLarge.registerFuelEntry(10, ReactorFuelType.SCHRABIDIUM, ModItems.nugget_schrabidium_fuel); TileEntityMachineReactorLarge.registerFuelEntry(90, ReactorFuelType.SCHRABIDIUM, ModItems.ingot_schrabidium_fuel); - TileEntityMachineReactorLarge.registerFuelEntry(60, ReactorFuelType.SCHRABIDIUM, ModItems.rod_schrabidium_fuel); - TileEntityMachineReactorLarge.registerFuelEntry(120, ReactorFuelType.SCHRABIDIUM, ModItems.rod_dual_schrabidium_fuel); - TileEntityMachineReactorLarge.registerFuelEntry(240, ReactorFuelType.SCHRABIDIUM, ModItems.rod_quad_schrabidium_fuel); - TileEntityMachineReactorLarge.registerWasteEntry(60, ReactorFuelType.SCHRABIDIUM, ModItems.rod_empty, ModItems.rod_schrabidium_fuel_depleted); - TileEntityMachineReactorLarge.registerWasteEntry(120, ReactorFuelType.SCHRABIDIUM, ModItems.rod_dual_empty, ModItems.rod_dual_schrabidium_fuel_depleted); - TileEntityMachineReactorLarge.registerWasteEntry(240, ReactorFuelType.SCHRABIDIUM, ModItems.rod_quad_empty, ModItems.rod_quad_schrabidium_fuel_depleted); TileEntityMachineReactorLarge.registerFuelEntry(1, ReactorFuelType.THORIUM, ModItems.nugget_thorium_fuel); TileEntityMachineReactorLarge.registerFuelEntry(9, ReactorFuelType.THORIUM, ModItems.ingot_thorium_fuel); - TileEntityMachineReactorLarge.registerFuelEntry(6, ReactorFuelType.THORIUM, ModItems.rod_thorium_fuel); - TileEntityMachineReactorLarge.registerFuelEntry(12, ReactorFuelType.THORIUM, ModItems.rod_dual_thorium_fuel); - TileEntityMachineReactorLarge.registerFuelEntry(24, ReactorFuelType.THORIUM, ModItems.rod_quad_thorium_fuel); - TileEntityMachineReactorLarge.registerWasteEntry(6, ReactorFuelType.THORIUM, ModItems.rod_empty, ModItems.rod_thorium_fuel_depleted); - TileEntityMachineReactorLarge.registerWasteEntry(12, ReactorFuelType.THORIUM, ModItems.rod_dual_empty, ModItems.rod_dual_thorium_fuel_depleted); - TileEntityMachineReactorLarge.registerWasteEntry(24, ReactorFuelType.THORIUM, ModItems.rod_quad_empty, ModItems.rod_quad_thorium_fuel_depleted); } public static void registerFuelEntry(int nuggets, ReactorFuelType type, Item fuel) { diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineReactorSmall.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineReactorSmall.java index 3504a92a5..d6d816b1b 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineReactorSmall.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineReactorSmall.java @@ -1,23 +1,22 @@ package com.hbm.tileentity.machine; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; import com.hbm.blocks.ModBlocks; import com.hbm.blocks.machine.MachineReactor; +import com.hbm.blocks.machine.MachineReactorSmall; import com.hbm.config.MobConfig; import com.hbm.explosion.ExplosionNukeGeneric; -import com.hbm.handler.FluidTypeHandler.FluidType; import com.hbm.handler.radiation.ChunkRadiationManager; -import com.hbm.interfaces.IFluidAcceptor; -import com.hbm.interfaces.IFluidContainer; -import com.hbm.interfaces.IFluidSource; import com.hbm.inventory.FluidTank; +import com.hbm.inventory.RecipesCommon.ComparableStack; import com.hbm.items.ModItems; -import com.hbm.items.machine.ItemFuelRod; +import com.hbm.items.machine.ItemPlateFuel; import com.hbm.lib.Library; -import com.hbm.packet.AuxGaugePacket; import com.hbm.packet.PacketDispatcher; +import com.hbm.tileentity.TileEntityMachineBase; import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint; import cpw.mods.fml.relauncher.Side; @@ -34,239 +33,237 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; +import net.minecraftforge.common.util.ForgeDirection; -public class TileEntityMachineReactorSmall extends TileEntity implements ISidedInventory, IFluidContainer, IFluidAcceptor, IFluidSource { +//TODO: Fix all unneeded methods; fix reactor control; Add seven digit displays for total flux + heat; revamp gui; revamp breeder to rely on reactor and use total flux calcs; +public class TileEntityMachineReactorSmall extends TileEntityMachineBase implements ISidedInventory { - private ItemStack slots[]; - - public int hullHeat; - public final int maxHullHeat = 100000; - public int coreHeat; - public final int maxCoreHeat = 50000; + public int heat; + public final int maxHeat = 50000; public int rods; - public final int rodsMax = 100; + public static final int rodsMax = 50; public boolean retracting = true; - public int age = 0; - public List list = new ArrayList(); - public FluidTank[] tanks; + public int[] slotFlux = new int[12]; + int totalFlux = 0; private static final int[] slots_top = new int[] { 0 }; private static final int[] slots_bottom = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15 }; private static final int[] slots_side = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14 }; - private String customName; - public TileEntityMachineReactorSmall() { - slots = new ItemStack[16]; - tanks = new FluidTank[3]; - tanks[0] = new FluidTank(FluidType.WATER, 32000, 0); - tanks[1] = new FluidTank(FluidType.COOLANT, 16000, 1); - tanks[2] = new FluidTank(FluidType.STEAM, 8000, 2); + super(12); } - - @Override - public int getSizeInventory() { - return slots.length; + + private static final HashMap fuelMap = new HashMap(); + static { + fuelMap.put(new ComparableStack(ModItems.plate_fuel_u233), new ItemStack(ModItems.waste_plate_u233, 1, 1)); + fuelMap.put(new ComparableStack(ModItems.plate_fuel_u235), new ItemStack(ModItems.waste_plate_u235, 1, 1)); + fuelMap.put(new ComparableStack(ModItems.plate_fuel_mox), new ItemStack(ModItems.waste_plate_mox, 1, 1)); + fuelMap.put(new ComparableStack(ModItems.plate_fuel_pu239), new ItemStack(ModItems.waste_plate_pu239, 1, 1)); + fuelMap.put(new ComparableStack(ModItems.plate_fuel_sa326), new ItemStack(ModItems.waste_plate_sa326, 1, 1)); } - - @Override - public ItemStack getStackInSlot(int i) { - return slots[i]; - } - - @Override - public ItemStack getStackInSlotOnClosing(int i) { - if(slots[i] != null) { - ItemStack itemStack = slots[i]; - slots[i] = null; - return itemStack; - } else { - return null; - } - } - - @Override - public void setInventorySlotContents(int i, ItemStack itemStack) { - slots[i] = itemStack; - if(itemStack != null && itemStack.stackSize > getInventoryStackLimit()) { - itemStack.stackSize = getInventoryStackLimit(); - } - } - - @Override - public String getInventoryName() { - return this.hasCustomInventoryName() ? this.customName : "container.reactorSmall"; - } - - @Override - public boolean hasCustomInventoryName() { - return this.customName != null && this.customName.length() > 0; - } - - public void setCustomName(String name) { - this.customName = name; - } - - @Override - public int getInventoryStackLimit() { - return 64; - } - - @Override - public boolean isUseableByPlayer(EntityPlayer player) { - if(worldObj.getTileEntity(xCoord, yCoord, zCoord) != this) { - return false; - } else { - return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <= 64; - } - } - - // You scrubs aren't needed for anything (right now) - @Override - public void openInventory() { - } - - @Override - public void closeInventory() { + + public String getName() { + return "container.reactorSmall"; } @Override public boolean isItemValidForSlot(int i, ItemStack itemStack) { - if(i == 0 || i == 1 || i == 2 || i == 3 || i == 4 || i == 5 || i == 6 || i == 7 || i == 8 || i == 9 || i == 10 || i == 11) - if(itemStack.getItem().getClass() == ItemFuelRod.class) - return true; - if(i == 12) - if(itemStack.getItem() == ModItems.rod_water || itemStack.getItem() == ModItems.rod_dual_water || itemStack.getItem() == ModItems.rod_quad_water || itemStack.getItem() == Items.water_bucket) - return true; - if(i == 14) - if(itemStack.getItem() == ModItems.rod_coolant || itemStack.getItem() == ModItems.rod_dual_coolant || itemStack.getItem() == ModItems.rod_quad_coolant) + if(i < 12 && i <= 0) + if(itemStack.getItem().getClass() == ItemPlateFuel.class) return true; return false; } - @Override - public ItemStack decrStackSize(int i, int j) { - if(slots[i] != null) { - if(slots[i].stackSize <= j) { - ItemStack itemStack = slots[i]; - slots[i] = null; - return itemStack; - } - ItemStack itemStack1 = slots[i].splitStack(j); - if(slots[i].stackSize == 0) { - slots[i] = null; - } - - return itemStack1; - } else { - return null; - } - } - @Override public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); - NBTTagList list = nbt.getTagList("items", 10); - - coreHeat = nbt.getInteger("heat"); - hullHeat = nbt.getInteger("hullHeat"); + heat = nbt.getInteger("heat"); rods = nbt.getInteger("rods"); retracting = nbt.getBoolean("ret"); - slots = new ItemStack[getSizeInventory()]; - tanks[0].readFromNBT(nbt, "water"); - tanks[1].readFromNBT(nbt, "coolant"); - tanks[2].readFromNBT(nbt, "steam"); - - for(int i = 0; i < list.tagCount(); i++) { - NBTTagCompound nbt1 = list.getCompoundTagAt(i); - byte b0 = nbt1.getByte("slot"); - if(b0 >= 0 && b0 < slots.length) { - slots[b0] = ItemStack.loadItemStackFromNBT(nbt1); - } - } } @Override public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); - nbt.setInteger("heat", coreHeat); - nbt.setInteger("hullHeat", hullHeat); + nbt.setInteger("heat", heat); nbt.setInteger("rods", rods); nbt.setBoolean("ret", retracting); - NBTTagList list = new NBTTagList(); - tanks[0].writeToNBT(nbt, "water"); - tanks[1].writeToNBT(nbt, "coolant"); - tanks[2].writeToNBT(nbt, "steam"); - - for(int i = 0; i < slots.length; i++) { - if(slots[i] != null) { - NBTTagCompound nbt1 = new NBTTagCompound(); - nbt1.setByte("slot", (byte) i); - slots[i].writeToNBT(nbt1); - list.appendTag(nbt1); - } - } - nbt.setTag("items", list); } @Override - public int[] getAccessibleSlotsFromSide(int p_94128_1_) { - return p_94128_1_ == 0 ? slots_bottom : (p_94128_1_ == 1 ? slots_top : slots_side); + public int[] getAccessibleSlotsFromSide(int side) { + return side == 0 ? slots_bottom : (side == 1 ? slots_top : slots_side); } @Override - public boolean canInsertItem(int i, ItemStack itemStack, int j) { - return this.isItemValidForSlot(i, itemStack); - } - - @Override - public boolean canExtractItem(int i, ItemStack itemStack, int j) { - if(i == 0 || i == 1 || i == 2 || i == 3 || i == 4 || i == 5 || i == 6 || i == 7 || i == 8 || i == 9 || i == 10 || i == 11) - if(itemStack.getItem() == ModItems.rod_uranium_fuel_depleted || - itemStack.getItem() == ModItems.rod_dual_uranium_fuel_depleted || - itemStack.getItem() == ModItems.rod_quad_uranium_fuel_depleted || - itemStack.getItem() == ModItems.rod_thorium_fuel_depleted || - itemStack.getItem() == ModItems.rod_dual_thorium_fuel_depleted || - itemStack.getItem() == ModItems.rod_quad_thorium_fuel_depleted || - itemStack.getItem() == ModItems.rod_plutonium_fuel_depleted || - itemStack.getItem() == ModItems.rod_dual_plutonium_fuel_depleted || - itemStack.getItem() == ModItems.rod_quad_plutonium_fuel_depleted || - itemStack.getItem() == ModItems.rod_mox_fuel_depleted || - itemStack.getItem() == ModItems.rod_dual_mox_fuel_depleted || - itemStack.getItem() == ModItems.rod_quad_mox_fuel_depleted || - itemStack.getItem() == ModItems.rod_schrabidium_fuel_depleted || - itemStack.getItem() == ModItems.rod_dual_schrabidium_fuel_depleted || - itemStack.getItem() == ModItems.rod_quad_schrabidium_fuel_depleted) + public boolean canExtractItem(int i, ItemStack stack, int j) { + if(i < 12 && i >= 0) + if(fuelMap.containsValue(stack)) return true; - if(i == 13 || i == 15) - if(itemStack.getItem() == Items.bucket || itemStack.getItem() == ModItems.rod_empty || itemStack.getItem() == ModItems.rod_dual_empty || itemStack.getItem() == ModItems.rod_quad_empty || itemStack.getItem() == ModItems.fluid_tank_empty || itemStack.getItem() == ModItems.fluid_barrel_empty) - return true; - + return false; } - public int getCoreHeatScaled(int i) { - return (coreHeat * i) / maxCoreHeat; + public int getHeatScaled(int i) { + return (heat * i) / maxHeat; + } + + public boolean hasHeat() { + return heat > 0; + } + + @Override + public void updateEntity() { + + if(!worldObj.isRemote) { + + if(retracting && rods > 0) { + + if(rods == rodsMax) + this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.reactorStart", 1.0F, 0.75F); + + rods --; + if(rods == 0) + this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.reactorStop", 1.0F, 1.0F); + } + if(!retracting && rods < rodsMax) { + + if(rods == 0) + this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.reactorStart", 1.0F, 0.75F); + + rods ++; + + if(rods == rodsMax) + this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.reactorStop", 1.0F, 1.0F); + } + + if(rods > rodsMax) + rods = rodsMax; + if(rods < 0) + rods = 0; + + if(rods > 0) + reaction(); + for(byte i = 0; i < slotFlux.length; i++) { + totalFlux += slotFlux[i]; + } + + getInteractions(); + + if(this.heat > 0) { + byte water = getWater(); + + if(water > 0) { + this.heat -= (this.heat * (float) 0.07 * water / 12); + } else if(water == 0) { + this.heat -= 1; + } + + if(this.heat < 0) + this.heat = 0; + } + + if(this.heat > maxHeat) { + this.explode(); + } + + if(rods > 0 && heat > 0 && !(blocksRad(xCoord + 1, yCoord + 1, zCoord) && blocksRad(xCoord - 1, yCoord + 1, zCoord) && blocksRad(xCoord, yCoord + 1, zCoord + 1) && blocksRad(xCoord, yCoord + 1, zCoord - 1))) { + float rad = (float) heat / (float) maxHeat * 50F; + ChunkRadiationManager.proxy.incrementRad(worldObj, xCoord, yCoord, zCoord, rad); + } + + NBTTagCompound data = new NBTTagCompound(); + data.setInteger("heat", heat); + data.setInteger("rods", rods); + data.setBoolean("ret", retracting); + data.setIntArray("slotFlux", slotFlux); + this.networkPack(data, 150); + } + } + + public void networkUnpack(NBTTagCompound data) { + this.heat = data.getInteger("heat"); + this.rods = data.getInteger("rods"); + this.retracting = data.getBoolean("ret"); + this.slotFlux = data.getIntArray("slotFlux"); + } + + private byte getWater() { + byte water = 0; + + for(byte d = 0; d < 6; d++) { + ForgeDirection dir = ForgeDirection.getOrientation(d); + if(d < 2) { + if(worldObj.getBlock(xCoord, yCoord + 1 + dir.offsetY * 2, zCoord).getMaterial() == Material.water) + water++; + } else { + for(byte i = 0; i < 3; i++) { + if(worldObj.getBlock(xCoord + dir.offsetX, yCoord + i, zCoord + dir.offsetZ).getMaterial() == Material.water) + water++; + } + } + } + + return water; + } + + public boolean isSubmerged() { + + return worldObj.getBlock(xCoord + 1, yCoord + 1, zCoord).getMaterial() == Material.water || + worldObj.getBlock(xCoord, yCoord + 1, zCoord + 1).getMaterial() == Material.water || + worldObj.getBlock(xCoord - 1, yCoord + 1, zCoord).getMaterial() == Material.water || + worldObj.getBlock(xCoord, yCoord + 1, zCoord - 1).getMaterial() == Material.water; + } + + private void getInteractions() { + getInteractionForBlock(xCoord + 1, yCoord + 1, zCoord); + getInteractionForBlock(xCoord - 1, yCoord + 1, zCoord); + getInteractionForBlock(xCoord, yCoord + 1, zCoord + 1); + getInteractionForBlock(xCoord, yCoord + 1, zCoord - 1); } - public int getHullHeatScaled(int i) { - return (hullHeat * i) / maxHullHeat; + private void getInteractionForBlock(int x, int y, int z) { + + Block b = worldObj.getBlock(x, y, z); + TileEntity te = worldObj.getTileEntity(x, y, z); + + if(b == ModBlocks.machine_reactor) { + + int[] pos = ((MachineReactor) ModBlocks.machine_reactor).findCore(worldObj, x, y, z); + + if(pos != null) { + + TileEntity tile = worldObj.getTileEntity(pos[0], pos[1], pos[2]); + + if(tile instanceof TileEntityMachineReactor) { + + TileEntityMachineReactor reactor = (TileEntityMachineReactor) tile; + + if(reactor.charge <= 1 && this.heat > 0) { + reactor.charge = 1; + reactor.heat = (int) Math.floor(heat * 4 / maxHeat) + 1; + } + } + } + } } - public int getSteamScaled(int i) { - return (tanks[2].getFill() * i) / tanks[2].getMaxFill(); - } + private boolean blocksRad(int x, int y, int z) { - public boolean hasCoreHeat() { - return coreHeat > 0; - } + Block b = worldObj.getBlock(x, y, z); - public boolean hasHullHeat() { - return hullHeat > 0; - } + if(b == ModBlocks.block_lead || b == ModBlocks.block_desh || b == ModBlocks.machine_reactor_small || b == ModBlocks.machine_reactor) + return true; - private int[] getNeighbouringSlots(int id) { + if(b.getExplosionResistance(null) >= 100) + return true; + + return false; + } + + private int[] getNeighboringSlots(int id) { switch(id) { case 0: @@ -297,401 +294,34 @@ public class TileEntityMachineReactorSmall extends TileEntity implements ISidedI return null; } - - public int getFuelPercent() { - - if(getRodCount() == 0) - return 0; - - int rodMax = 0; - int rod = 0; - - for(int i = 0; i < 12; i++) { - - if(slots[i] != null && slots[i].getItem().getClass() == ItemFuelRod.class) { - rodMax += ((ItemFuelRod) slots[i].getItem()).lifeTime; - rod += ((ItemFuelRod) slots[i].getItem()).lifeTime - ItemFuelRod.getLifeTime(slots[i]); - } - } - - if(rodMax == 0) - return 0; - - return rod * 100 / rodMax; - } - - @Override - public void updateEntity() { - - if(!worldObj.isRemote) { - - age++; - if(age >= 20) { - age = 0; - } - - if(age == 9 || age == 19) - fillFluidInit(tanks[2].getTankType()); - - tanks[0].loadTank(12, 13, slots); - tanks[1].loadTank(14, 15, slots); - - if(retracting && rods > 0) { - - if(rods == rodsMax) - this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.reactorStart", 1.0F, 0.75F); - - rods--; - - if(rods == 0) - this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.reactorStop", 1.0F, 1.0F); - } - if(!retracting && rods < rodsMax) { - - if(rods == 0) - this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.reactorStart", 1.0F, 0.75F); - - rods++; - - if(rods == rodsMax) - this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.reactorStop", 1.0F, 1.0F); - } - - if(rods >= rodsMax) + + private void reaction() { + for(byte i = 0; i < 12; i++) { + if(slots[i] == null) + continue; + + if(slots[i].getItem() instanceof ItemPlateFuel) { + ItemPlateFuel rod = (ItemPlateFuel) slots[i].getItem(); - for(int i = 0; i < 12; i++) { - - if(slots[i] != null) { - if(slots[i].getItem().getClass() == ItemFuelRod.class) - decay(i); - else if(slots[i].getItem() == ModItems.meteorite_sword_bred) - slots[i] = new ItemStack(ModItems.meteorite_sword_irradiated); - } + int outFlux = rod.react(worldObj, slots[i], slotFlux[i] + 10); + rod.setLifeTime(slots[i], rod.getLifeTime(slots[i]) + outFlux); + this.heat += outFlux * 2; + slotFlux[i] = 0; + + int[] neighborSlots = getNeighboringSlots(i); + + if(ItemPlateFuel.getLifeTime(slots[i]) > rod.lifeTime) { + slots[i] = fuelMap.get(new ComparableStack(slots[i])).copy(); } - - coreHeatMod = 1.0; - hullHeatMod = 1.0; - conversionMod = 1.0; - decayMod = 1.0; - - getInteractions(); - - if(this.coreHeat > 0 && this.tanks[1].getFill() > 0 && this.hullHeat < this.maxHullHeat) { - this.hullHeat += this.coreHeat * 0.175 * hullHeatMod; - this.coreHeat -= this.coreHeat * 0.1; - - this.tanks[1].setFill(this.tanks[1].getFill() - 10); - - if(this.tanks[1].getFill() < 0) - this.tanks[1].setFill(0); - } - - if(this.hullHeat > maxHullHeat) { - this.hullHeat = maxHullHeat; - } - - if(this.hullHeat > 0 && this.tanks[0].getFill() > 0) { - generateSteam(); - this.hullHeat -= this.hullHeat * 0.085; - } - - if(this.coreHeat > maxCoreHeat) { - this.explode(); - } - - if(rods > 0 && coreHeat > 0 && !(blocksRad(xCoord + 1, yCoord + 1, zCoord) && blocksRad(xCoord - 1, yCoord + 1, zCoord) && blocksRad(xCoord, yCoord + 1, zCoord + 1) && blocksRad(xCoord, yCoord + 1, zCoord - 1))) { - - /* - * List list = (List) - * worldObj.getEntitiesWithinAABBExcludingEntity(null, - * AxisAlignedBB.getBoundingBox(xCoord + 0.5 - 5, yCoord + 1.5 - - * 5, zCoord + 0.5 - 5, xCoord + 0.5 + 5, yCoord + 1.5 + 5, - * zCoord + 0.5 + 5)); - * - * for (Entity e : list) { if (e instanceof EntityLivingBase) - * Library.applyRadiation((EntityLivingBase)e, 80, 24, 60, 19); - * } - */ - - float rad = (float) coreHeat / (float) maxCoreHeat * 50F; - ChunkRadiationManager.proxy.incrementRad(worldObj, xCoord, yCoord, zCoord, rad); - } - - for(int i = 0; i < 3; i++) - tanks[i].updateTank(xCoord, yCoord, zCoord, worldObj.provider.dimensionId); - - PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, rods, 0), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 150)); - PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, retracting ? 1 : 0, 1), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50)); - PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, coreHeat, 2), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50)); - PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, hullHeat, 3), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50)); - } - } - - @SuppressWarnings("incomplete-switch") - private void generateSteam() { - - // function of SHS produced per tick - // maxes out at heat% * tank capacity / 20 - double steam = (((double) hullHeat / (double) maxHullHeat) * ((double) tanks[2].getMaxFill() / 50D)) * conversionMod; - - double water = steam; - - switch(tanks[2].getTankType()) { - case STEAM: - water /= 100D; - break; - case HOTSTEAM: - water /= 10; - break; - case SUPERHOTSTEAM: - break; - } - - tanks[0].setFill(tanks[0].getFill() - (int) Math.ceil(water)); - tanks[2].setFill(tanks[2].getFill() + (int) Math.floor(steam)); - - if(tanks[0].getFill() < 0) - tanks[0].setFill(0); - - if(tanks[2].getFill() > tanks[2].getMaxFill()) - tanks[2].setFill(tanks[2].getMaxFill()); - - } - - private void getInteractions() { - - getInteractionForBlock(xCoord + 1, yCoord + 1, zCoord); - getInteractionForBlock(xCoord - 1, yCoord + 1, zCoord); - getInteractionForBlock(xCoord, yCoord + 1, zCoord + 1); - getInteractionForBlock(xCoord, yCoord + 1, zCoord - 1); - - TileEntity te1 = worldObj.getTileEntity(xCoord + 2, yCoord, zCoord); - TileEntity te2 = worldObj.getTileEntity(xCoord - 2, yCoord, zCoord); - TileEntity te3 = worldObj.getTileEntity(xCoord, yCoord, zCoord + 2); - TileEntity te4 = worldObj.getTileEntity(xCoord, yCoord, zCoord - 2); - - boolean b1 = blocksRad(xCoord + 1, yCoord + 1, zCoord); - boolean b2 = blocksRad(xCoord - 1, yCoord + 1, zCoord); - boolean b3 = blocksRad(xCoord, yCoord + 1, zCoord + 1); - boolean b4 = blocksRad(xCoord, yCoord + 1, zCoord - 1); - - TileEntityMachineReactorSmall[] reactors = new TileEntityMachineReactorSmall[4]; - - reactors[0] = ((te1 instanceof TileEntityMachineReactorSmall && !b1) ? (TileEntityMachineReactorSmall) te1 : null); - reactors[1] = ((te2 instanceof TileEntityMachineReactorSmall && !b2) ? (TileEntityMachineReactorSmall) te2 : null); - reactors[2] = ((te3 instanceof TileEntityMachineReactorSmall && !b3) ? (TileEntityMachineReactorSmall) te3 : null); - reactors[3] = ((te4 instanceof TileEntityMachineReactorSmall && !b4) ? (TileEntityMachineReactorSmall) te4 : null); - - for(int i = 0; i < 4; i++) { - - if(reactors[i] != null && reactors[i].rods >= rodsMax && reactors[i].getRodCount() > 0) { - decayMod += reactors[i].getRodCount() / 2D; - } - } - } - - private double decayMod = 1.0D; - private double coreHeatMod = 1.0D; - private double hullHeatMod = 1.0D; - private double conversionMod = 1.0D; - - private void getInteractionForBlock(int x, int y, int z) { - - Block b = worldObj.getBlock(x, y, z); - TileEntity te = worldObj.getTileEntity(x, y, z); - - if(b == Blocks.lava || b == Blocks.flowing_lava) { - hullHeatMod *= 3; - conversionMod *= 0.5; - - } else if(b == Blocks.redstone_block) { - conversionMod *= 1.15; - - } else if(b == ModBlocks.block_lead) { - decayMod += 1; - - } else if(b == Blocks.water || b == Blocks.flowing_water) { - tanks[0].setFill(tanks[0].getFill() + 25); - - if(tanks[0].getFill() > tanks[0].getMaxFill()) - tanks[0].setFill(tanks[0].getMaxFill()); - - } else if(b == ModBlocks.block_niter || b == ModBlocks.block_niter_reinforced) { - if(tanks[0].getFill() >= 50 && tanks[1].getFill() + 5 <= tanks[1].getMaxFill()) { - tanks[0].setFill(tanks[0].getFill() - 50); - tanks[1].setFill(tanks[1].getFill() + 5); - } - - } else if(b == ModBlocks.machine_reactor) { - - int[] pos = ((MachineReactor) ModBlocks.machine_reactor).findCore(worldObj, x, y, z); - - if(pos != null) { - - TileEntity tile = worldObj.getTileEntity(pos[0], pos[1], pos[2]); - - if(tile instanceof TileEntityMachineReactor) { - - TileEntityMachineReactor reactor = (TileEntityMachineReactor) tile; - - if(reactor.charge <= 1 && this.hullHeat > 0) { - reactor.charge = 1; - reactor.heat = (int) Math.floor(hullHeat * 4 / maxHullHeat) + 1; - } + + for(byte j = 0; j < neighborSlots.length; j++) { + slotFlux[neighborSlots[j]] += outFlux * (rods / rodsMax); } + continue; } - - } else if(te instanceof TileEntityNukeFurnace) { - TileEntityNukeFurnace reactor = (TileEntityNukeFurnace) te; - if(reactor.dualPower < 1 && this.coreHeat > 0) - reactor.dualPower = 1; - - } else if(b == ModBlocks.block_uranium) { - coreHeatMod *= 1.05; - - } else if(b == Blocks.coal_block) { - hullHeatMod *= 1.1; - - } else if(b == ModBlocks.block_beryllium) { - hullHeatMod *= 0.95; - conversionMod *= 1.05; - - } else if(b == ModBlocks.block_schrabidium) { - decayMod += 1; - conversionMod *= 1.25; - hullHeatMod *= 1.1; - - } else if(b == ModBlocks.block_waste) { - decayMod += 3; - - } - } - - private boolean blocksRad(int x, int y, int z) { - - Block b = worldObj.getBlock(x, y, z); - - if(b == ModBlocks.block_lead || b == ModBlocks.block_desh || b == ModBlocks.brick_concrete) - return true; - - if(b.getExplosionResistance(null) >= 100) - return true; - - return false; - } - - public int getRodCount() { - - int count = 0; - - for(int i = 0; i < 12; i++) { - - if(slots[i] != null && slots[i].getItem().getClass() == ItemFuelRod.class) - count++; - } - - return count; - } - - private boolean hasFuelRod(int id) { - if(id > 11) - return false; - - if(slots[id] != null) - return slots[id].getItem().getClass() == ItemFuelRod.class; - - return false; - } - - private int getNeightbourCount(int id) { - - int[] neighbours = this.getNeighbouringSlots(id); - - if(neighbours == null) - return 0; - - int count = 0; - - for(int i = 0; i < neighbours.length; i++) - if(hasFuelRod(neighbours[i])) - count++; - - return count; - - } - - // itemstack in slots[id] has to contain ItemFuelRod item - private void decay(int id) { - if(id > 11) - return; - - int decay = getNeightbourCount(id) + 1; - - decay *= decayMod; - - for(int i = 0; i < decay; i++) { - ItemFuelRod rod = ((ItemFuelRod) slots[id].getItem()); - this.coreHeat += rod.heat * coreHeatMod; - ItemFuelRod.setLifeTime(slots[id], ItemFuelRod.getLifeTime(slots[id]) + 1); - - if(ItemFuelRod.getLifeTime(slots[id]) > ((ItemFuelRod) slots[id].getItem()).lifeTime) { - onRunOut(id); - return; - } - } - } - - // itemstack in slots[id] has to contain ItemFuelRod item - private void onRunOut(int id) { - - // System.out.println("aaa"); - - Item item = slots[id].getItem(); - - if(item == ModItems.rod_uranium_fuel) { - slots[id] = new ItemStack(ModItems.rod_uranium_fuel_depleted); - - } else if(item == ModItems.rod_thorium_fuel) { - slots[id] = new ItemStack(ModItems.rod_thorium_fuel_depleted); - - } else if(item == ModItems.rod_plutonium_fuel) { - slots[id] = new ItemStack(ModItems.rod_plutonium_fuel_depleted); - - } else if(item == ModItems.rod_mox_fuel) { - slots[id] = new ItemStack(ModItems.rod_mox_fuel_depleted); - - } else if(item == ModItems.rod_schrabidium_fuel) { - slots[id] = new ItemStack(ModItems.rod_schrabidium_fuel_depleted); - - } else if(item == ModItems.rod_dual_uranium_fuel) { - slots[id] = new ItemStack(ModItems.rod_dual_uranium_fuel_depleted); - - } else if(item == ModItems.rod_dual_thorium_fuel) { - slots[id] = new ItemStack(ModItems.rod_dual_thorium_fuel_depleted); - - } else if(item == ModItems.rod_dual_plutonium_fuel) { - slots[id] = new ItemStack(ModItems.rod_dual_plutonium_fuel_depleted); - - } else if(item == ModItems.rod_dual_mox_fuel) { - slots[id] = new ItemStack(ModItems.rod_dual_mox_fuel_depleted); - - } else if(item == ModItems.rod_dual_schrabidium_fuel) { - slots[id] = new ItemStack(ModItems.rod_dual_schrabidium_fuel_depleted); - - } else if(item == ModItems.rod_quad_uranium_fuel) { - slots[id] = new ItemStack(ModItems.rod_quad_uranium_fuel_depleted); - - } else if(item == ModItems.rod_quad_thorium_fuel) { - slots[id] = new ItemStack(ModItems.rod_quad_thorium_fuel_depleted); - - } else if(item == ModItems.rod_quad_plutonium_fuel) { - slots[id] = new ItemStack(ModItems.rod_quad_plutonium_fuel_depleted); - - } else if(item == ModItems.rod_quad_mox_fuel) { - slots[id] = new ItemStack(ModItems.rod_quad_mox_fuel_depleted); - - } else if(item == ModItems.rod_quad_schrabidium_fuel) { - slots[id] = new ItemStack(ModItems.rod_quad_schrabidium_fuel_depleted); + + if(slots[i].getItem() == ModItems.meteorite_sword_bred) + slots[i] = new ItemStack(ModItems.meteorite_sword_irradiated); } } @@ -700,13 +330,28 @@ public class TileEntityMachineReactorSmall extends TileEntity implements ISidedI for(int i = 0; i < slots.length; i++) { this.slots[i] = null; } - + worldObj.setBlockToAir(this.xCoord, this.yCoord, this.zCoord); + + for(byte d = 0; d < 6; d++) { + ForgeDirection dir = ForgeDirection.getOrientation(d); + if(d < 2) { + if(worldObj.getBlock(xCoord, yCoord + 1 + dir.offsetY * 2, zCoord).getMaterial() == Material.water) + worldObj.setBlockToAir(xCoord, yCoord + 1 + dir.offsetY * 2, zCoord); + } else { + for(byte i = 0; i < 3; i++) { + if(worldObj.getBlock(xCoord + dir.offsetX, yCoord + i, zCoord + dir.offsetZ).getMaterial() == Material.water) + worldObj.setBlockToAir(xCoord + dir.offsetX, yCoord + i, zCoord + dir.offsetZ); + } + } + } + worldObj.createExplosion(null, this.xCoord, this.yCoord, this.zCoord, 18.0F, true); - ExplosionNukeGeneric.waste(worldObj, this.xCoord, this.yCoord, this.zCoord, 35); - worldObj.setBlock(this.xCoord, this.yCoord, this.zCoord, ModBlocks.toxic_block); + worldObj.setBlock(this.xCoord, this.yCoord, this.zCoord, ModBlocks.deco_steel); + worldObj.setBlock(this.xCoord, this.yCoord + 1, this.zCoord, ModBlocks.corium_block); + worldObj.setBlock(this.xCoord, this.yCoord + 2, this.zCoord, ModBlocks.deco_steel); - ChunkRadiationManager.proxy.incrementRad(worldObj, xCoord, yCoord, zCoord, 1000); + ChunkRadiationManager.proxy.incrementRad(worldObj, xCoord, yCoord, zCoord, 50); if(MobConfig.enableElementals) { List players = worldObj.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5).expand(100, 100, 100)); @@ -717,96 +362,6 @@ public class TileEntityMachineReactorSmall extends TileEntity implements ISidedI } } - @Override - public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) { - Library.transmitFluid(x, y, z, newTact, this, worldObj, type); - } - - @Override - public void fillFluidInit(FluidType type) { - fillFluid(this.xCoord - 1, this.yCoord, this.zCoord, getTact(), type); - fillFluid(this.xCoord + 1, this.yCoord, this.zCoord, getTact(), type); - fillFluid(this.xCoord, this.yCoord, this.zCoord - 1, getTact(), type); - fillFluid(this.xCoord, this.yCoord, this.zCoord + 1, getTact(), type); - - fillFluid(this.xCoord - 1, this.yCoord + 2, this.zCoord, getTact(), type); - fillFluid(this.xCoord + 1, this.yCoord + 2, this.zCoord, getTact(), type); - fillFluid(this.xCoord, this.yCoord + 2, this.zCoord - 1, getTact(), type); - fillFluid(this.xCoord, this.yCoord + 2, this.zCoord + 1, getTact(), type); - } - - @Override - public boolean getTact() { - if(age >= 0 && age < 10) { - return true; - } - - return false; - } - - @Override - public int getMaxFluidFill(FluidType type) { - if(type.name().equals(tanks[0].getTankType().name())) - return tanks[0].getMaxFill(); - else if(type.name().equals(tanks[1].getTankType().name())) - return tanks[1].getMaxFill(); - else - return 0; - } - - @Override - public void setFluidFill(int i, FluidType type) { - if(type.name().equals(tanks[0].getTankType().name())) - tanks[0].setFill(i); - else if(type.name().equals(tanks[1].getTankType().name())) - tanks[1].setFill(i); - else if(type.name().equals(tanks[2].getTankType().name())) - tanks[2].setFill(i); - } - - @Override - public int getFluidFill(FluidType type) { - if(type.name().equals(tanks[0].getTankType().name())) - return tanks[0].getFill(); - else if(type.name().equals(tanks[1].getTankType().name())) - return tanks[1].getFill(); - else if(type.name().equals(tanks[2].getTankType().name())) - return tanks[2].getFill(); - else - return 0; - } - - @Override - public void setFillstate(int fill, int index) { - if(index < 3 && tanks[index] != null) - tanks[index].setFill(fill); - } - - @Override - public void setType(FluidType type, int index) { - if(index < 3 && tanks[index] != null) - tanks[index].setTankType(type); - } - - @Override - public List getTanks() { - List list = new ArrayList(); - list.add(tanks[0]); - list.add(tanks[1]); - list.add(tanks[2]); - - return list; - } - - @Override - public List getFluidList(FluidType type) { - return list; - } - - @Override - public void clearFluidList(FluidType type) { - list.clear(); - } @Override public AxisAlignedBB getRenderBoundingBox() { @@ -818,12 +373,4 @@ public class TileEntityMachineReactorSmall extends TileEntity implements ISidedI public double getMaxRenderDistanceSquared() { return 65536.0D; } - - public boolean isSubmerged() { - - return worldObj.getBlock(xCoord + 1, yCoord + 1, zCoord).getMaterial() == Material.water || - worldObj.getBlock(xCoord, yCoord + 1, zCoord + 1).getMaterial() == Material.water || - worldObj.getBlock(xCoord - 1, yCoord + 1, zCoord).getMaterial() == Material.water || - worldObj.getBlock(xCoord, yCoord + 1, zCoord - 1).getMaterial() == Material.water; - } } \ No newline at end of file diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityReactorControl.java b/src/main/java/com/hbm/tileentity/machine/TileEntityReactorControl.java index 8afad0e50..1dd00a2f6 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityReactorControl.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityReactorControl.java @@ -206,7 +206,7 @@ public class TileEntityReactorControl extends TileEntity implements ISidedInvent @Override public void updateEntity() { - if(!worldObj.isRemote) + /*if(!worldObj.isRemote) { if(slots[0] != null && slots[0].getItem() == ModItems.reactor_sensor && slots[0].stackTagCompound != null) @@ -352,6 +352,6 @@ public class TileEntityReactorControl extends TileEntity implements ISidedInvent } PacketDispatcher.wrapper.sendToAllAround(new TEControlPacket(xCoord, yCoord, zCoord, hullHeat, coreHeat, fuel, water, cool, steam, maxWater, maxCool, maxSteam, compression, rods, maxRods, isOn, auto, isLinked), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 30)); - } + }*/ } } diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityWasteDrum.java b/src/main/java/com/hbm/tileentity/machine/TileEntityWasteDrum.java index 2d014eab1..bf0b1a538 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityWasteDrum.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityWasteDrum.java @@ -26,14 +26,20 @@ public class TileEntityWasteDrum extends TileEntity implements ISidedInventory { private static final HashMap wasteMap = new HashMap(); static { - wasteMap.put(new ComparableStack(ModItems.waste_natural_uranium_hot), new ItemStack(ModItems.waste_natural_uranium)); - wasteMap.put(new ComparableStack(ModItems.waste_uranium_hot), new ItemStack(ModItems.waste_uranium)); - wasteMap.put(new ComparableStack(ModItems.waste_thorium_hot), new ItemStack(ModItems.waste_thorium)); - wasteMap.put(new ComparableStack(ModItems.waste_mox_hot), new ItemStack(ModItems.waste_mox)); - wasteMap.put(new ComparableStack(ModItems.waste_plutonium_hot), new ItemStack(ModItems.waste_plutonium)); - wasteMap.put(new ComparableStack(ModItems.waste_u233_hot), new ItemStack(ModItems.waste_u233)); - wasteMap.put(new ComparableStack(ModItems.waste_u235_hot), new ItemStack(ModItems.waste_u235)); - wasteMap.put(new ComparableStack(ModItems.waste_schrabidium_hot), new ItemStack(ModItems.waste_schrabidium)); + wasteMap.put(new ComparableStack(new ItemStack(ModItems.waste_natural_uranium, 1, 1)), new ItemStack(ModItems.waste_natural_uranium)); + wasteMap.put(new ComparableStack(new ItemStack(ModItems.waste_uranium, 1, 1)), new ItemStack(ModItems.waste_uranium)); + wasteMap.put(new ComparableStack(new ItemStack(ModItems.waste_thorium, 1, 1)), new ItemStack(ModItems.waste_thorium)); + wasteMap.put(new ComparableStack(new ItemStack(ModItems.waste_mox, 1, 1)), new ItemStack(ModItems.waste_mox)); + wasteMap.put(new ComparableStack(new ItemStack(ModItems.waste_plutonium, 1, 1)), new ItemStack(ModItems.waste_plutonium)); + wasteMap.put(new ComparableStack(new ItemStack(ModItems.waste_u233, 1, 1)), new ItemStack(ModItems.waste_u233)); + wasteMap.put(new ComparableStack(new ItemStack(ModItems.waste_u235, 1, 1)), new ItemStack(ModItems.waste_u235)); + wasteMap.put(new ComparableStack(new ItemStack(ModItems.waste_schrabidium, 1, 1)), new ItemStack(ModItems.waste_schrabidium)); + + wasteMap.put(new ComparableStack(new ItemStack(ModItems.waste_plate_u233, 1, 1)), new ItemStack(ModItems.waste_plate_u233)); + wasteMap.put(new ComparableStack(new ItemStack(ModItems.waste_plate_u235, 1, 1)), new ItemStack(ModItems.waste_plate_u235)); + wasteMap.put(new ComparableStack(new ItemStack(ModItems.waste_plate_mox, 1, 1)), new ItemStack(ModItems.waste_plate_mox)); + wasteMap.put(new ComparableStack(new ItemStack(ModItems.waste_plate_pu239, 1, 1)), new ItemStack(ModItems.waste_plate_pu239)); + wasteMap.put(new ComparableStack(new ItemStack(ModItems.waste_plate_sa326, 1, 1)), new ItemStack(ModItems.waste_plate_sa326)); } public TileEntityWasteDrum() { diff --git a/src/main/resources/assets/hbm/lang/de_DE.lang b/src/main/resources/assets/hbm/lang/de_DE.lang index 75a25f27f..feee31739 100644 --- a/src/main/resources/assets/hbm/lang/de_DE.lang +++ b/src/main/resources/assets/hbm/lang/de_DE.lang @@ -2657,21 +2657,13 @@ item.warhead_thermo_endo.name=Endothermischer Sprengkopf item.warhead_thermo_exo.name=Exothermischer Sprengkopf item.warhead_volcano.name=Tektonischer Sprengkopf item.waste_mox.name=Erschöpfter MOX-Kernbrennstoff -item.waste_mox_hot.name=Erschöpfter MOX-Kernbrennstoff (Heiß) item.waste_natural_uranium.name=Erschöpfter Natururankernbrennstoff -item.waste_natural_uranium_hot.name=Erschöpfter Natururankernbrennstoff (Heiß) item.waste_plutonium.name=Erschöpfter Plutoniumkernbrennstoff -item.waste_plutonium_hot.name=Erschöpfter Plutoniumkernbrennstoff (Heiß) item.waste_schrabidium.name=Erschöpfter Schrabidiumkernbrennstoff -item.waste_schrabidium_hot.name=Erschöpfter Schrabidiumkernbrennstoff (Heiß) item.waste_thorium.name=Erschöpfter Thoriumkernbrennstoff -item.waste_thorium_hot.name=Erschöpfter Thoriumkernbrennstoff (Heiß) item.waste_u235.name=Erschöpfter Uran-235-Kernbrennstoff -item.waste_u235_hot.name=Erschöpfter Uran-235-Kernbrennstoff (Heiß) item.waste_u233.name=Erschöpfter Uran-233-Kernbrennstoff -item.waste_u233_hot.name=Erschöpfter Uran-233-Kernbrennstoff (Heiß) item.waste_uranium.name=Erschöpfter Urankernbrennstoff -item.waste_uranium_hot.name=Erschöpfter Urankernbrennstoff (Heiß) item.watch.name=Zerbrochene Taschenuhr item.weapon_bat.name=Richards Standard item.weapon_bat_nail.name=Das Klischee diff --git a/src/main/resources/assets/hbm/lang/en_NT.lang b/src/main/resources/assets/hbm/lang/en_NT.lang index ff192cc4c..1667e5909 100644 --- a/src/main/resources/assets/hbm/lang/en_NT.lang +++ b/src/main/resources/assets/hbm/lang/en_NT.lang @@ -1142,11 +1142,6 @@ item.waste_thorium.name=Depleted Thorium Fuel item.waste_plutonium.name=Depleted Plutonium Fuel item.waste_mox.name=Depleted MOX Fuel item.waste_schrabidium.name=Depleted Schrabidium Fuel -item.waste_uranium_hot.name=Depleted Uranium Fuel (Hot) -item.waste_thorium_hot.name=Depleted Thorium Fuel (Hot) -item.waste_plutonium_hot.name=Depleted Plutonium Fuel (Hot) -item.waste_mox_hot.name=Depleted MOX Fuel (Hot) -item.waste_schrabidium_hot.name=Depleted Schrabidium Fuel (Hot) item.scrap.name=Scrap item.ingot_uranium_fuel.name=Ingot of Uranium Fuel diff --git a/src/main/resources/assets/hbm/lang/en_US.lang b/src/main/resources/assets/hbm/lang/en_US.lang index b740ad405..bd75d3feb 100644 --- a/src/main/resources/assets/hbm/lang/en_US.lang +++ b/src/main/resources/assets/hbm/lang/en_US.lang @@ -467,6 +467,7 @@ death.attack.tauBlast=%1$s charged the XVL1456 for too long and was blown into p death.attack.teleporter=%1$s was teleported into nothingness. desc.item.rtgHeat=Power Level: %s +desc.item.wasteCooling=Cool in a Spent Fuel Pool Drum desc.gui.rtgBFurnace.desc=Requires at least 15 heat to process$The more heat on top of that, the faster it runs$Heat going over maximum speed will have no effect$Gold-198 may decay into Mercury desc.gui.rtgBFurnace.heat=§eCurrent heat level: %s desc.gui.rtgBFurnace.pellets=Accepted Pellets: @@ -2184,6 +2185,11 @@ item.plate_dalekanium.name=Angry Metal item.plate_desh.name=Desh Compound Plate item.plate_dineutronium.name=Dineutronium Compound Plate item.plate_euphemium.name=Euphemium Compound Plate +item.plate_fuel_u233.name=HEU-233 Plate Fuel +item.plate_fuel_u235.name=HEU-235 Plate Fuel +item.plate_fuel_mox.name=HEMOX Plate Fuel +item.plate_fuel_pu239.name=HEP-239 Plate Fuel +item.plate_fuel_sa326.name=HES-326 Plate Fuel item.plate_gold.name=Gold Plate item.plate_iron.name=Iron Plate item.plate_kevlar.name=Kevlar-Ceramic Compound @@ -2784,21 +2790,18 @@ item.warhead_thermo_endo.name=Endothermic Warhead item.warhead_thermo_exo.name=Exothermic Warhead item.warhead_volcano.name=Tectonic Warhead item.waste_mox.name=Depleted MOX Fuel -item.waste_mox_hot.name=Depleted MOX Fuel (Hot) item.waste_natural_uranium.name=Depleted Natural Uranium Fuel -item.waste_natural_uranium_hot.name=Depleted Natural Uranium Fuel (Hot) +item.waste_plate_mox.name=Depleted HEMOX Plate Fuel +item.waste_plate_pu239.name=Depleted HEP-239 Plate Fuel +item.waste_plate_sa326.name=Depleted HES-326 Plate Fuel +item.waste_plate_u233.name=Depleted HEU-233 Plate Fuel +item.waste_plate_u235.name=Depleted HEU-235 Plate Fuel item.waste_plutonium.name=Depleted Plutonium Fuel -item.waste_plutonium_hot.name=Depleted Plutonium Fuel (Hot) item.waste_schrabidium.name=Depleted Schrabidium Fuel -item.waste_schrabidium_hot.name=Depleted Schrabidium Fuel (Hot) item.waste_thorium.name=Depleted Thorium Fuel -item.waste_thorium_hot.name=Depleted Thorium Fuel (Hot) item.waste_u235.name=Depleted Uranium-235 Fuel -item.waste_u235_hot.name=Depleted Uranium-235 Fuel (Hot) item.waste_u233.name=Depleted Uranium-233 Fuel -item.waste_u233_hot.name=Depleted Uranium-233 Fuel (Hot) item.waste_uranium.name=Depleted Uranium Fuel -item.waste_uranium_hot.name=Depleted Uranium Fuel (Hot) item.watch.name=Broken Pocket Watch item.weapon_bat.name=Richard's Default item.weapon_bat_nail.name=The Cliché diff --git a/src/main/resources/assets/hbm/textures/items/plate_fuel_mox.png b/src/main/resources/assets/hbm/textures/items/plate_fuel_mox.png new file mode 100644 index 000000000..c409d12e4 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/plate_fuel_mox.png differ diff --git a/src/main/resources/assets/hbm/textures/items/plate_fuel_pu239.png b/src/main/resources/assets/hbm/textures/items/plate_fuel_pu239.png new file mode 100644 index 000000000..173c5955e Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/plate_fuel_pu239.png differ diff --git a/src/main/resources/assets/hbm/textures/items/plate_fuel_sa326.png b/src/main/resources/assets/hbm/textures/items/plate_fuel_sa326.png new file mode 100644 index 000000000..bf3317f83 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/plate_fuel_sa326.png differ diff --git a/src/main/resources/assets/hbm/textures/items/plate_fuel_u233.png b/src/main/resources/assets/hbm/textures/items/plate_fuel_u233.png new file mode 100644 index 000000000..92e1988c2 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/plate_fuel_u233.png differ diff --git a/src/main/resources/assets/hbm/textures/items/plate_fuel_u235.png b/src/main/resources/assets/hbm/textures/items/plate_fuel_u235.png new file mode 100644 index 000000000..798a1a61d Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/plate_fuel_u235.png differ diff --git a/src/main/resources/assets/hbm/textures/items/plate_waste_overlay_heat.png b/src/main/resources/assets/hbm/textures/items/plate_waste_overlay_heat.png new file mode 100644 index 000000000..546bd9b09 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/plate_waste_overlay_heat.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rod_waste_overlay_heat.png b/src/main/resources/assets/hbm/textures/items/rod_waste_overlay_heat.png new file mode 100644 index 000000000..e45f44f0c Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/rod_waste_overlay_heat.png differ diff --git a/src/main/resources/assets/hbm/textures/items/waste_mox_hot.png b/src/main/resources/assets/hbm/textures/items/waste_mox_hot.png deleted file mode 100644 index bb625ada5..000000000 Binary files a/src/main/resources/assets/hbm/textures/items/waste_mox_hot.png and /dev/null differ diff --git a/src/main/resources/assets/hbm/textures/items/waste_plate_mox.png b/src/main/resources/assets/hbm/textures/items/waste_plate_mox.png new file mode 100644 index 000000000..76f5f470f Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/waste_plate_mox.png differ diff --git a/src/main/resources/assets/hbm/textures/items/waste_plate_sa326.png b/src/main/resources/assets/hbm/textures/items/waste_plate_sa326.png new file mode 100644 index 000000000..1fa6c02b7 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/waste_plate_sa326.png differ diff --git a/src/main/resources/assets/hbm/textures/items/waste_plate_uranium.png b/src/main/resources/assets/hbm/textures/items/waste_plate_uranium.png new file mode 100644 index 000000000..56592c172 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/waste_plate_uranium.png differ diff --git a/src/main/resources/assets/hbm/textures/items/waste_plutonium_hot.png b/src/main/resources/assets/hbm/textures/items/waste_plutonium_hot.png deleted file mode 100644 index 1a9fd4541..000000000 Binary files a/src/main/resources/assets/hbm/textures/items/waste_plutonium_hot.png and /dev/null differ diff --git a/src/main/resources/assets/hbm/textures/items/waste_schrabidium_hot.png b/src/main/resources/assets/hbm/textures/items/waste_schrabidium_hot.png deleted file mode 100644 index 09343f1b0..000000000 Binary files a/src/main/resources/assets/hbm/textures/items/waste_schrabidium_hot.png and /dev/null differ diff --git a/src/main/resources/assets/hbm/textures/items/waste_thorium_hot.png b/src/main/resources/assets/hbm/textures/items/waste_thorium_hot.png deleted file mode 100644 index f27c69d33..000000000 Binary files a/src/main/resources/assets/hbm/textures/items/waste_thorium_hot.png and /dev/null differ diff --git a/src/main/resources/assets/hbm/textures/items/waste_uranium_hot.png b/src/main/resources/assets/hbm/textures/items/waste_uranium_hot.png deleted file mode 100644 index 8022d23a1..000000000 Binary files a/src/main/resources/assets/hbm/textures/items/waste_uranium_hot.png and /dev/null differ