diff --git a/src/main/java/com/hbm/blocks/ModBlocks.java b/src/main/java/com/hbm/blocks/ModBlocks.java index d61e07c88..d3265d3eb 100644 --- a/src/main/java/com/hbm/blocks/ModBlocks.java +++ b/src/main/java/com/hbm/blocks/ModBlocks.java @@ -616,9 +616,8 @@ public class ModBlocks { public static Block machine_puf6_tank; public static final int guiID_puf6_tank = 8; - public static Block machine_reactor; - public static Block machine_reactor_on; - public static final int guiID_reactor = 9; + public static Block machine_reactor_breeding; + public static final int guiID_reactor_breeding = 9; public static Block machine_nuke_furnace_off; public static Block machine_nuke_furnace_on; @@ -975,8 +974,8 @@ public class ModBlocks { public static Block machine_armor_table; public static final int guiID_armor_table = 102; - public static Block machine_reactor_small; - public static final int guiID_reactor_small = 65; + public static Block reactor_research; + public static final int guiID_reactor_research = 65; public static Block reactor_zirnox; public static final int guiID_reactor_zirnox = 124; public static Block zirnox_destroyed; @@ -1184,8 +1183,6 @@ public class ModBlocks { public static Block dummy_port_ams_base; public static Block dummy_block_radgen; public static Block dummy_port_radgen; - public static Block dummy_block_reactor_small; - public static Block dummy_port_reactor_small; public static Block dummy_block_vault; public static Block dummy_block_blast; public static Block dummy_block_uf6; @@ -1712,8 +1709,7 @@ public class ModBlocks { machine_puf6_tank = new MachinePuF6Tank(Material.iron).setBlockName("machine_puf6_tank").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab); - machine_reactor = new MachineReactor(Material.iron).setBlockName("machine_reactor").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_reactor"); - machine_reactor_on = new MachineReactor(Material.iron).setBlockName("machine_reactor_on").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":machine_reactor_on"); + machine_reactor_breeding = new MachineReactorBreeding(Material.iron).setBlockName("machine_reactor").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_reactor"); machine_nuke_furnace_off = new MachineNukeFurnace(false).setBlockName("machine_nuke_furnace_off").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab); machine_nuke_furnace_on = new MachineNukeFurnace(true).setBlockName("machine_nuke_furnace_on").setHardness(5.0F).setLightLevel(1.0F).setResistance(10.0F); @@ -2043,7 +2039,7 @@ public class ModBlocks { machine_press = new MachinePress(Material.iron).setBlockName("machine_press").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_press"); machine_epress = new MachineEPress(Material.iron).setBlockName("machine_epress").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_epress"); machine_selenium = new MachineSeleniumEngine(Material.iron).setBlockName("machine_selenium").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_selenium"); - machine_reactor_small = new MachineReactorSmall(Material.iron).setBlockName("machine_reactor_small").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_reactor_small"); + reactor_research = new ReactorResearch(Material.iron).setBlockName("machine_reactor_small").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_reactor_small"); reactor_zirnox = new ReactorZirnox(Material.iron).setBlockName("machine_zirnox").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel"); zirnox_destroyed = new ZirnoxDestroyed(Material.iron).setBlockName("zirnox_destroyed").setHardness(100.0F).setResistance(800.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel"); machine_controller = new MachineReactorControl(Material.iron).setBlockName("machine_controller").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab); @@ -2186,8 +2182,6 @@ public class ModBlocks { dummy_port_ams_base = new DummyBlockAMSBase(Material.iron).setBlockName("dummy_port_ams_base").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_copper"); dummy_block_radgen = new DummyBlockRadGen(Material.iron).setBlockName("dummy_block_radgen").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel"); dummy_port_radgen = new DummyBlockRadGen(Material.iron).setBlockName("dummy_port_radgen").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel"); - dummy_block_reactor_small = new DummyBlockMachine(Material.iron, guiID_reactor_small, machine_reactor_small, false).setBlockName("dummy_block_reactor_small").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel"); - dummy_port_reactor_small = new DummyBlockMachine(Material.iron, guiID_reactor_small, machine_reactor_small, false).setBlockName("dummy_port_reactor_small").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel"); dummy_block_vault = new DummyBlockVault(Material.iron).setBlockName("dummy_block_vault").setHardness(10.0F).setResistance(10000.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel"); dummy_block_blast = new DummyBlockBlast(Material.iron).setBlockName("dummy_block_blast").setHardness(10.0F).setResistance(10000.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel"); dummy_block_uf6 = new DummyBlockMachine(Material.iron, guiID_uf6_tank, machine_uf6_tank, false).setBlockName("dummy_block_uf6").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_titanium"); @@ -2799,8 +2793,7 @@ public class ModBlocks { GameRegistry.registerBlock(machine_crystallizer, machine_crystallizer.getUnlocalizedName()); GameRegistry.registerBlock(machine_uf6_tank, machine_uf6_tank.getUnlocalizedName()); GameRegistry.registerBlock(machine_puf6_tank, machine_puf6_tank.getUnlocalizedName()); - GameRegistry.registerBlock(machine_reactor, machine_reactor.getUnlocalizedName()); - //GameRegistry.registerBlock(machine_reactor_on, machine_reactor_on.getUnlocalizedName()); + GameRegistry.registerBlock(machine_reactor_breeding, machine_reactor_breeding.getUnlocalizedName()); GameRegistry.registerBlock(machine_nuke_furnace_off, machine_nuke_furnace_off.getUnlocalizedName()); GameRegistry.registerBlock(machine_nuke_furnace_on, machine_nuke_furnace_on.getUnlocalizedName()); GameRegistry.registerBlock(machine_rtg_furnace_off, machine_rtg_furnace_off.getUnlocalizedName()); @@ -2811,7 +2804,7 @@ public class ModBlocks { GameRegistry.registerBlock(machine_selenium, machine_selenium.getUnlocalizedName()); GameRegistry.registerBlock(machine_generator, machine_generator.getUnlocalizedName()); GameRegistry.registerBlock(machine_controller, machine_controller.getUnlocalizedName()); - GameRegistry.registerBlock(machine_reactor_small, machine_reactor_small.getUnlocalizedName()); + GameRegistry.registerBlock(reactor_research, reactor_research.getUnlocalizedName()); GameRegistry.registerBlock(reactor_zirnox, reactor_zirnox.getUnlocalizedName()); GameRegistry.registerBlock(zirnox_destroyed, zirnox_destroyed.getUnlocalizedName()); GameRegistry.registerBlock(machine_industrial_generator, machine_industrial_generator.getUnlocalizedName()); @@ -3151,8 +3144,6 @@ public class ModBlocks { GameRegistry.registerBlock(dummy_port_ams_base, dummy_port_ams_base.getUnlocalizedName()); GameRegistry.registerBlock(dummy_block_radgen, dummy_block_radgen.getUnlocalizedName()); GameRegistry.registerBlock(dummy_port_radgen, dummy_port_radgen.getUnlocalizedName()); - GameRegistry.registerBlock(dummy_block_reactor_small, dummy_block_reactor_small.getUnlocalizedName()); - GameRegistry.registerBlock(dummy_port_reactor_small, dummy_port_reactor_small.getUnlocalizedName()); GameRegistry.registerBlock(dummy_block_vault, dummy_block_vault.getUnlocalizedName()); GameRegistry.registerBlock(dummy_block_blast, dummy_block_blast.getUnlocalizedName()); GameRegistry.registerBlock(dummy_block_uf6, dummy_block_uf6.getUnlocalizedName()); diff --git a/src/main/java/com/hbm/blocks/generic/BlockCrate.java b/src/main/java/com/hbm/blocks/generic/BlockCrate.java index 331a722e8..de7dfd046 100644 --- a/src/main/java/com/hbm/blocks/generic/BlockCrate.java +++ b/src/main/java/com/hbm/blocks/generic/BlockCrate.java @@ -135,7 +135,7 @@ public class BlockCrate extends BlockFalling { //Metal Crate BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_press), 10); BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_difurnace_off), 9); - BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_reactor), 6); + BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_reactor_breeding), 6); BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_nuke_furnace_off), 7); BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_coal_off), 10); BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_diesel), 8); diff --git a/src/main/java/com/hbm/blocks/machine/MachineReactor.java b/src/main/java/com/hbm/blocks/machine/MachineReactorBreeding.java similarity index 71% rename from src/main/java/com/hbm/blocks/machine/MachineReactor.java rename to src/main/java/com/hbm/blocks/machine/MachineReactorBreeding.java index 7e9fbc1bb..4c83c28bf 100644 --- a/src/main/java/com/hbm/blocks/machine/MachineReactor.java +++ b/src/main/java/com/hbm/blocks/machine/MachineReactorBreeding.java @@ -1,63 +1,64 @@ -package com.hbm.blocks.machine; - - -import com.hbm.blocks.BlockDummyable; -import com.hbm.blocks.ModBlocks; -import com.hbm.main.MainRegistry; -import com.hbm.tileentity.TileEntityProxyInventory; -import com.hbm.tileentity.machine.TileEntityMachineReactor; - -import cpw.mods.fml.common.network.internal.FMLNetworkHandler; -import net.minecraft.block.material.Material; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; - -public class MachineReactor extends BlockDummyable { - - public MachineReactor(Material mat) { - super(mat); - } - - @Override - public TileEntity createNewTileEntity(World world, int meta) { - - if(meta >= 12) - return new TileEntityMachineReactor(); - - return new TileEntityProxyInventory(); - } - - @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) - { - return true; - } else if(!player.isSneaking()) - { - int[] pos = this.findCore(world, x, y, z); - - if(pos == null) - return false; - - TileEntityMachineReactor entity = (TileEntityMachineReactor) world.getTileEntity(pos[0], pos[1], pos[2]); - if(entity != null) - { - FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_reactor, world, pos[0], pos[1], pos[2]); - } - return true; - } else { - return false; - } - } - - @Override - public int[] getDimensions() { - return new int[] { 2, 0, 0, 0, 0, 0 }; - } - - @Override - public int getOffset() { - return 0; - } -} +package com.hbm.blocks.machine; + + +import com.hbm.blocks.BlockDummyable; +import com.hbm.blocks.ModBlocks; +import com.hbm.interfaces.IMultiblock; +import com.hbm.main.MainRegistry; +import com.hbm.tileentity.TileEntityProxyInventory; +import com.hbm.tileentity.machine.TileEntityMachineReactorBreeding; + +import cpw.mods.fml.common.network.internal.FMLNetworkHandler; +import net.minecraft.block.material.Material; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + +public class MachineReactorBreeding extends BlockDummyable implements IMultiblock { + + public MachineReactorBreeding(Material mat) { + super(mat); + } + + @Override + public TileEntity createNewTileEntity(World world, int meta) { + + if(meta >= 12) + return new TileEntityMachineReactorBreeding(); + + return new TileEntityProxyInventory(); + } + + @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) + { + return true; + } else if(!player.isSneaking()) + { + int[] pos = this.findCore(world, x, y, z); + + if(pos == null) + return false; + + TileEntityMachineReactorBreeding entity = (TileEntityMachineReactorBreeding) world.getTileEntity(pos[0], pos[1], pos[2]); + if(entity != null) + { + FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_reactor_breeding, world, pos[0], pos[1], pos[2]); + } + return true; + } else { + return false; + } + } + + @Override + public int[] getDimensions() { + return new int[] { 2, 0, 0, 0, 0, 0 }; + } + + @Override + public int getOffset() { + return 0; + } +} diff --git a/src/main/java/com/hbm/blocks/machine/MachineReactorControl.java b/src/main/java/com/hbm/blocks/machine/MachineReactorControl.java index 6db8bb14d..90685ff7d 100644 --- a/src/main/java/com/hbm/blocks/machine/MachineReactorControl.java +++ b/src/main/java/com/hbm/blocks/machine/MachineReactorControl.java @@ -226,7 +226,7 @@ public class MachineReactorControl extends BlockContainer { if(entity != null) { - return (int)Math.ceil((double)entity.coreHeat * 15D / 50000D); + return (int)Math.ceil((double)entity.heat * 15D / 50000D); } return 0; diff --git a/src/main/java/com/hbm/blocks/machine/MachineReactorSmall.java b/src/main/java/com/hbm/blocks/machine/MachineReactorSmall.java deleted file mode 100644 index 05220d0ed..000000000 --- a/src/main/java/com/hbm/blocks/machine/MachineReactorSmall.java +++ /dev/null @@ -1,160 +0,0 @@ -package com.hbm.blocks.machine; - -import java.util.Random; - -import com.hbm.blocks.ModBlocks; -import com.hbm.handler.BossSpawnHandler; -import com.hbm.handler.MultiblockHandler; -import com.hbm.interfaces.IMultiblock; -import com.hbm.main.MainRegistry; -import com.hbm.tileentity.machine.TileEntityDummy; -import com.hbm.tileentity.machine.TileEntityMachineReactorSmall; - -import cpw.mods.fml.common.network.internal.FMLNetworkHandler; -import net.minecraft.block.Block; -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.ISidedInventory; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; - -public class MachineReactorSmall extends BlockContainer implements IMultiblock { - - private final Random field_149933_a = new Random(); - private static boolean keepInventory; - - public MachineReactorSmall(Material p_i45386_1_) { - super(p_i45386_1_); - } - - @Override - public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) - { - return Item.getItemFromBlock(ModBlocks.machine_reactor_small); - } - - @Override - public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { - return new TileEntityMachineReactorSmall(); - } - - @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); - } - - @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) { - return true; - } else if(!player.isSneaking()) { - BossSpawnHandler.markFBI(player); - - TileEntityMachineReactorSmall entity = (TileEntityMachineReactorSmall) world.getTileEntity(x, y, z); - if(entity != null) { - FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_reactor_small, world, x, y, z); - } - return true; - } else { - return false; - } - } -} diff --git a/src/main/java/com/hbm/blocks/machine/ReactorResearch.java b/src/main/java/com/hbm/blocks/machine/ReactorResearch.java new file mode 100644 index 000000000..067e4e21c --- /dev/null +++ b/src/main/java/com/hbm/blocks/machine/ReactorResearch.java @@ -0,0 +1,103 @@ +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.TileEntityProxyCombo; +import com.hbm.tileentity.machine.TileEntityReactorResearch; + +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; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.item.Item; +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 ReactorResearch extends BlockDummyable implements IMultiblock { + + public ReactorResearch(Material mat) { + super(mat); + } + + @Override + public TileEntity createNewTileEntity(World world, int meta) { + + if(meta >= 12) + return new TileEntityReactorResearch(); + if(meta >= 6) + return new TileEntityProxyCombo(false, true, true); + + return null; + } + + @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) { + return true; + } else if(!player.isSneaking()) { + BossSpawnHandler.markFBI(player); + + int[] pos = this.findCore(world, x, y, z); + + if(pos == null) + return false; + + FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_reactor_research, 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; + } +} 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/MineralRecipes.java b/src/main/java/com/hbm/crafting/MineralRecipes.java index d9931f20c..a92ce03e5 100644 --- a/src/main/java/com/hbm/crafting/MineralRecipes.java +++ b/src/main/java/com/hbm/crafting/MineralRecipes.java @@ -21,7 +21,8 @@ import net.minecraftforge.oredict.ShapelessOreRecipe; public class MineralRecipes { public static void register() { - + + add1To9Pair(ModItems.dust, ModItems.dust_tiny); add1To9Pair(ModItems.powder_coal, ModItems.powder_coal_tiny); add1To9Pair(ModBlocks.sand_gold, ModItems.powder_gold); @@ -47,13 +48,15 @@ public class MineralRecipes { addMineralSet(ModItems.nugget_tantalium, ModItems.ingot_tantalium, ModBlocks.block_tantalium); addMineralSet(ModItems.nugget_zirconium, ModItems.ingot_zirconium, ModBlocks.block_zirconium); addMineralSet(ModItems.nugget_dineutronium, ModItems.ingot_dineutronium, ModBlocks.block_dineutronium); - + + add1To9Pair(ModItems.powder_sr90, ModItems.powder_sr90_tiny); add1To9Pair(ModItems.powder_xe135, ModItems.powder_xe135_tiny); add1To9Pair(ModItems.powder_cs137, ModItems.powder_cs137_tiny); add1To9Pair(ModItems.powder_i131, ModItems.powder_i131_tiny); add1To9Pair(ModItems.ingot_technetium, ModItems.nugget_technetium); add1To9Pair(ModItems.ingot_co60, ModItems.nugget_co60); + add1To9Pair(ModItems.ingot_sr90, ModItems.nugget_sr90); add1To9Pair(ModItems.ingot_au198, ModItems.nugget_au198); add1To9Pair(ModItems.ingot_ra226, ModItems.nugget_ra226); @@ -78,7 +81,10 @@ public class MineralRecipes { addMineralSet(ModItems.nugget_pu_mix, ModItems.ingot_pu_mix, ModBlocks.block_pu_mix); add1To9Pair(ModItems.ingot_neptunium_fuel, ModItems.nugget_neptunium_fuel); - + + addBillet(ModItems.billet_cobalt, ModItems.ingot_cobalt, ModItems.nugget_cobalt); + addBillet(ModItems.billet_co60, ModItems.ingot_co60, ModItems.nugget_co60); + addBillet(ModItems.billet_sr90, ModItems.ingot_sr90, ModItems.nugget_sr90, "nuggetStrontium90", "tinySr90"); addBillet(ModItems.billet_uranium, ModItems.ingot_uranium, ModItems.nugget_uranium, "nuggetUranium"); addBillet(ModItems.billet_u233, ModItems.ingot_u233, ModItems.nugget_u233, "nuggetUranium233", "tinyU233"); addBillet(ModItems.billet_u235, ModItems.ingot_u235, ModItems.nugget_u235, "nuggetUranium235", "tinyU235"); @@ -185,6 +191,7 @@ public class MineralRecipes { GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.pellet_rtg), new Object[] { ModItems.billet_pu238, ModItems.billet_pu238, ModItems.billet_pu238, "plateIron" })); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.pellet_rtg_radium), new Object[] { ModItems.billet_ra226, ModItems.billet_ra226, ModItems.billet_ra226, "plateIron" })); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.pellet_rtg_weak), new Object[] { ModItems.billet_u238, ModItems.billet_u238, ModItems.billet_pu238, "plateIron" })); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.pellet_rtg_strontium), new Object[] { ModItems.billet_sr90, ModItems.billet_sr90, ModItems.billet_sr90, "plateIron" })); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.pellet_rtg_polonium), new Object[] { ModItems.billet_polonium, ModItems.billet_polonium, ModItems.billet_polonium, "plateIron" })); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.pellet_rtg_gold), new Object[] { ModItems.billet_au198, ModItems.billet_au198, ModItems.billet_au198, "plateIron" })); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.pellet_rtg_americium), new Object[] { ModItems.billet_am241, ModItems.billet_am241, ModItems.billet_am241, "plateIron" })); @@ -367,8 +374,6 @@ public class MineralRecipes { GameRegistry.addRecipe(new ItemStack(ModItems.egg_balefire_shard, 1), new Object[] { "##", "##", '#', ModItems.powder_balefire }); add9To1(ModItems.cell_balefire, ModItems.egg_balefire_shard); - GameRegistry.addRecipe(new ItemStack(ModItems.nugget_euphemium, 1), new Object[] { "#", '#', ModItems.rod_quad_euphemium }); - GameRegistry.addRecipe(new ItemStack(ModItems.ingot_euphemium, 1), new Object[] { "###", "###", "###", '#', ModItems.rod_quad_euphemium }); GameRegistry.addRecipe(new ItemStack(ModItems.ingot_euphemium, 1), new Object[] { "###", "###", "###", '#', ModItems.nugget_euphemium }); GameRegistry.addRecipe(new ItemStack(ModItems.nugget_euphemium, 9), new Object[] { "#", '#', ModItems.ingot_euphemium }); diff --git a/src/main/java/com/hbm/crafting/RodRecipes.java b/src/main/java/com/hbm/crafting/RodRecipes.java index ba7a9a219..b664ed0c9 100644 --- a/src/main/java/com/hbm/crafting/RodRecipes.java +++ b/src/main/java/com/hbm/crafting/RodRecipes.java @@ -2,6 +2,7 @@ package com.hbm.crafting; import static com.hbm.inventory.OreDictManager.*; import com.hbm.items.ModItems; +import com.hbm.items.machine.ItemBreedingRod.*; import com.hbm.main.CraftingManager; import cpw.mods.fml.common.registry.GameRegistry; @@ -17,114 +18,60 @@ import net.minecraftforge.oredict.ShapedOreRecipe; public class RodRecipes { public static void register() { - - //Single rods - CraftingManager.addRecipeAuto(new ItemStack(ModItems.rod_empty, 16), new Object[] { "SSS", "L L", "SSS", 'S', STEEL.plate(), 'L', PB.plate() }); - addRodBilletUnload(U, ModItems.billet_uranium, ModItems.rod_uranium); - addRodBilletUnload(U233, ModItems.billet_u233, ModItems.rod_u233); - addRodBilletUnload(U235, ModItems.billet_u235, ModItems.rod_u235); - addRodBilletUnload(U238, ModItems.billet_u238, ModItems.rod_u238); - addRodBilletUnload(TH232, ModItems.billet_th232, ModItems.rod_th232); - addRodBilletUnload(PU, ModItems.billet_plutonium, ModItems.rod_plutonium); - addRodBilletUnload(PU238, ModItems.billet_pu238, ModItems.rod_pu238); - addRodBilletUnload(PU239, ModItems.billet_pu239, ModItems.rod_pu239); - addRodBilletUnload(PU240, ModItems.billet_pu240, ModItems.rod_pu240); - addRodBilletUnload(NP237, ModItems.billet_neptunium, ModItems.rod_neptunium); - addRodBilletUnload(PO210, ModItems.billet_polonium, ModItems.rod_polonium); - 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() }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.rod_zirnox_lithium), new Object[] { ModItems.rod_zirnox_empty, LI.ingot(), LI.ingot() }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.lithium, 1), new Object[] { ModItems.rod_lithium }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.cell_tritium, 1), new Object[] { ModItems.rod_tritium, ModItems.cell_empty }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.cell_tritium, 2), new Object[] { ModItems.rod_zirnox_tritium, ModItems.cell_empty, ModItems.cell_empty }); - - //Dual rods - CraftingManager.addShapelessAuto(new ItemStack(ModItems.rod_empty, 2), new Object[] { ModItems.rod_dual_empty }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.rod_dual_empty, 1), new Object[] { ModItems.rod_empty, ModItems.rod_empty }); - addDualRodBilletUnload(U, ModItems.billet_uranium, ModItems.rod_dual_uranium); - addDualRodBilletUnload(U233, ModItems.billet_u233, ModItems.rod_dual_u233); - addDualRodBilletUnload(U235, ModItems.billet_u235, ModItems.rod_dual_u235); - addDualRodBilletUnload(U238, ModItems.billet_u238, ModItems.rod_dual_u238); - addDualRodBilletUnload(TH232, ModItems.billet_th232, ModItems.rod_dual_th232); - addDualRodBilletUnload(PU, ModItems.billet_plutonium, ModItems.rod_dual_plutonium); - addDualRodBilletUnload(PU238, ModItems.billet_pu238, ModItems.rod_dual_pu238); - addDualRodBilletUnload(PU239, ModItems.billet_pu239, ModItems.rod_dual_pu239); - addDualRodBilletUnload(PU240, ModItems.billet_pu240, ModItems.rod_dual_pu240); - addDualRodBilletUnload(NP237, ModItems.billet_neptunium, ModItems.rod_dual_neptunium); - addDualRodBilletUnload(PO210, ModItems.billet_polonium, ModItems.rod_dual_polonium); - 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() }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.lithium, 2), new Object[] { ModItems.rod_dual_lithium }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.cell_tritium, 2), new Object[] { ModItems.rod_dual_tritium, ModItems.cell_empty, ModItems.cell_empty }); - - //Quad rods - CraftingManager.addShapelessAuto(new ItemStack(ModItems.rod_empty, 4), new Object[] { ModItems.rod_quad_empty }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.rod_quad_empty, 1), new Object[] { ModItems.rod_empty, ModItems.rod_empty, ModItems.rod_empty, ModItems.rod_empty }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.rod_quad_empty, 1), new Object[] { ModItems.rod_dual_empty, ModItems.rod_dual_empty }); - addQuadRodBilletUnload(U, ModItems.billet_uranium, ModItems.rod_quad_uranium); - addQuadRodBilletUnload(U233, ModItems.billet_u233, ModItems.rod_quad_u233); - addQuadRodBilletUnload(U235, ModItems.billet_u235, ModItems.rod_quad_u235); - addQuadRodBilletUnload(U238, ModItems.billet_u238, ModItems.rod_quad_u238); - addQuadRodBilletUnload(TH232, ModItems.billet_th232, ModItems.rod_quad_th232); - addQuadRodBilletUnload(PU, ModItems.billet_plutonium, ModItems.rod_quad_plutonium); - addQuadRodBilletUnload(PU238, ModItems.billet_pu238, ModItems.rod_quad_pu238); - addQuadRodBilletUnload(PU239, ModItems.billet_pu239, ModItems.rod_quad_pu239); - addQuadRodBilletUnload(PU240, ModItems.billet_pu240, ModItems.rod_quad_pu240); - addQuadRodBilletUnload(NP237, ModItems.billet_neptunium, ModItems.rod_quad_neptunium); - addQuadRodBilletUnload(PO210, ModItems.billet_polonium, ModItems.rod_quad_polonium); - 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() }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.lithium, 4), new Object[] { ModItems.rod_quad_lithium }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.cell_tritium, 4), new Object[] { ModItems.rod_quad_tritium, ModItems.cell_empty, ModItems.cell_empty, ModItems.cell_empty, ModItems.cell_empty }); //Zirnox Fuel GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.rod_zirnox_empty, 4), new Object[] { "Z Z", "ZBZ", "Z Z", 'Z', "nuggetZirconium", 'B', "ingotBeryllium" })); - addZIRNOXRod(ModItems.billet_uranium, ModItems.rod_zirnox_natural_uranium_fuel); + addZIRNOXRod(U, ModItems.rod_zirnox_natural_uranium_fuel); addZIRNOXRod(ModItems.billet_uranium_fuel, ModItems.rod_zirnox_uranium_fuel); - addZIRNOXRod(ModItems.billet_th232, ModItems.rod_zirnox_th232); + addZIRNOXRod(TH232, ModItems.rod_zirnox_th232); addZIRNOXRod(ModItems.billet_thorium_fuel, ModItems.rod_zirnox_thorium_fuel); addZIRNOXRod(ModItems.billet_mox_fuel, ModItems.rod_zirnox_mox_fuel); addZIRNOXRod(ModItems.billet_plutonium_fuel, ModItems.rod_zirnox_plutonium_fuel); - addZIRNOXRod(ModItems.billet_u233, ModItems.rod_zirnox_u233_fuel); - addZIRNOXRod(ModItems.billet_u235, ModItems.rod_zirnox_u235_fuel); + addZIRNOXRod(U233, ModItems.rod_zirnox_u233_fuel); + addZIRNOXRod(U235, ModItems.rod_zirnox_u235_fuel); addZIRNOXRod(ModItems.billet_les, ModItems.rod_zirnox_les_fuel); + CraftingManager.addShapelessAuto(new ItemStack(ModItems.rod_zirnox_lithium), new Object[] { ModItems.rod_zirnox_empty, LI.ingot(), LI.ingot() }); + CraftingManager.addShapelessAuto(new ItemStack(ModItems.cell_tritium, 2), new Object[] { ModItems.rod_zirnox_tritium, ModItems.cell_empty, ModItems.cell_empty }); - 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 }); + + //Breeding Rods + CraftingManager.addRecipeAuto(new ItemStack(ModItems.rod_empty, 16), new Object[] { "SSS", "L L", "SSS", 'S', STEEL.plate(), 'L', PB.plate() }); + CraftingManager.addShapelessAuto(new ItemStack(ModItems.rod_empty, 2), new Object[] { ModItems.rod_dual_empty }); + CraftingManager.addShapelessAuto(new ItemStack(ModItems.rod_dual_empty, 1), new Object[] { ModItems.rod_empty, ModItems.rod_empty }); + CraftingManager.addShapelessAuto(new ItemStack(ModItems.rod_empty, 4), new Object[] { ModItems.rod_quad_empty }); + CraftingManager.addShapelessAuto(new ItemStack(ModItems.rod_quad_empty, 1), new Object[] { ModItems.rod_empty, ModItems.rod_empty, ModItems.rod_empty, ModItems.rod_empty }); + CraftingManager.addShapelessAuto(new ItemStack(ModItems.rod_quad_empty, 1), new Object[] { ModItems.rod_dual_empty, ModItems.rod_dual_empty }); + + addBreedingRod(LI, ModItems.lithium, BreedingRodType.LITHIUM); + CraftingManager.addShapelessAuto(new ItemStack(ModItems.cell_tritium, 1), new Object[] { new ItemStack(ModItems.rod_empty, 1, BreedingRodType.TRITIUM.ordinal()), ModItems.cell_empty }); + CraftingManager.addShapelessAuto(new ItemStack(ModItems.cell_tritium, 2), new Object[] { new ItemStack(ModItems.rod_dual_empty, 1, BreedingRodType.TRITIUM.ordinal()), ModItems.cell_empty, ModItems.cell_empty }); + CraftingManager.addShapelessAuto(new ItemStack(ModItems.cell_tritium, 4), new Object[] { new ItemStack(ModItems.rod_quad_empty, 1, BreedingRodType.TRITIUM.ordinal()), ModItems.cell_empty, ModItems.cell_empty, ModItems.cell_empty, ModItems.cell_empty }); + addBreedingRod(CO, ModItems.billet_cobalt, BreedingRodType.CO); + addBreedingRod(CO60, ModItems.billet_co60, BreedingRodType.CO60); + addBreedingRod(TH232, ModItems.billet_th232, BreedingRodType.TH232); + addBreedingRod(ModItems.billet_thorium_fuel, BreedingRodType.THF); + addBreedingRod(U235, ModItems.billet_u235, BreedingRodType.U235); + addBreedingRod(NP237, ModItems.billet_neptunium, BreedingRodType.NP237); + addBreedingRod(U238, ModItems.billet_u238, BreedingRodType.U238); + addBreedingRod(PU238, ModItems.billet_pu238, BreedingRodType.PU238); + addBreedingRod(PU239, ModItems.billet_pu239, BreedingRodType.PU239); + addBreedingRod(ModItems.billet_pu_mix, BreedingRodType.RGP); + addBreedingRod(ModItems.billet_nuclear_waste, BreedingRodType.WASTE); + CraftingManager.addShapelessAuto(new ItemStack(ModItems.rod, 1, BreedingRodType.LEAD.ordinal()), 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[] { new ItemStack(ModItems.rod_empty, 1, BreedingRodType.LEAD.ordinal()) }); + CraftingManager.addShapelessAuto(new ItemStack(ModItems.rod_dual, 1, BreedingRodType.LEAD.ordinal()), new Object[] { ModItems.rod_dual_empty, PB.ingot(), PB.nugget(), PB.nugget(), PB.nugget() }); + CraftingManager.addShapelessAuto(new ItemStack(ModItems.nugget_lead, 12), new Object[] { new ItemStack(ModItems.rod_dual_empty, 1, BreedingRodType.LEAD.ordinal()) }); + CraftingManager.addShapelessAuto(new ItemStack(ModItems.rod_quad, 1, BreedingRodType.LEAD.ordinal()), 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[] { new ItemStack(ModItems.rod_quad_empty, 1, BreedingRodType.LEAD.ordinal()) }); + addBreedingRod(U, ModItems.billet_uranium, BreedingRodType.URANIUM); //Pile fuel @@ -163,32 +110,6 @@ public class RodRecipes { addRBMKRod(ModItems.billet_zfb_pu241, ModItems.rbmk_fuel_zfb_pu241); addRBMKRod(ModItems.billet_zfb_am_mix, ModItems.rbmk_fuel_zfb_am_mix); CraftingManager.addShapelessAuto(new ItemStack(ModItems.rbmk_fuel_drx, 1), new Object[] { ModItems.rbmk_fuel_balefire, ModItems.particle_digamma }); - - //Rod recycling - CraftingManager.addShapelessAuto(new ItemStack(ModItems.nugget_australium, 6), new Object[] { ModItems.rod_australium }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.nugget_euphemium, 6), new Object[] { ModItems.rod_euphemium }); - - //Waste rod recycling - 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 @@ -236,6 +157,42 @@ public class RodRecipes { CraftingManager.addShapelessAuto(new ItemStack(billet, 4), new Object[] { out }); } + /** Single, dual, quad rod loading + unloading **/ + public static void addBreedingRod(Item billet, BreedingRodType type) { + addBreedingRodLoad(billet, type); + addBreedingRodUnload(billet, type); + } + /** Single, dual, quad rod loading + unloading + oredict **/ + public static void addBreedingRod(DictFrame mat, Item billet, BreedingRodType type) { + addBreedingRodLoad(mat, billet, type); + addBreedingRodUnload(mat, billet, type); + } + + /** Single, dual, quad rod loading **/ + public static void addBreedingRodLoad(Item billet, BreedingRodType type) { + CraftingManager.addShapelessAuto(new ItemStack(ModItems.rod, 1, type.ordinal()), new Object[] { ModItems.rod_empty, billet}); + CraftingManager.addShapelessAuto(new ItemStack(ModItems.rod_dual, 1, type.ordinal()), new Object[] { ModItems.rod_dual_empty, billet, billet}); + CraftingManager.addShapelessAuto(new ItemStack(ModItems.rod_quad, 1, type.ordinal()), new Object[] { ModItems.rod_quad_empty, billet, billet, billet, billet}); + } + /** Single, dual, quad rod unloading **/ + public static void addBreedingRodUnload(Item billet, BreedingRodType type) { + CraftingManager.addShapelessAuto(new ItemStack(billet, 1), new Object[] { new ItemStack(ModItems.rod, 1, type.ordinal()) }); + CraftingManager.addShapelessAuto(new ItemStack(billet, 2), new Object[] { new ItemStack(ModItems.rod_dual, 1, type.ordinal()) }); + CraftingManager.addShapelessAuto(new ItemStack(billet, 4), new Object[] { new ItemStack(ModItems.rod_quad, 1, type.ordinal()) }); + } + /** Single, dual, quad rod loading with OreDict **/ + public static void addBreedingRodLoad(DictFrame mat, Item billet, BreedingRodType type) { + CraftingManager.addShapelessAuto(new ItemStack(ModItems.rod, 1, type.ordinal()), new Object[] { ModItems.rod_empty, mat.billet()}); + CraftingManager.addShapelessAuto(new ItemStack(ModItems.rod_dual, 1, type.ordinal()), new Object[] { ModItems.rod_dual_empty, mat.billet(), mat.billet()}); + CraftingManager.addShapelessAuto(new ItemStack(ModItems.rod_quad, 1, type.ordinal()), new Object[] { ModItems.rod_quad_empty, mat.billet(), mat.billet(), mat.billet(), mat.billet()}); + } + /** Single, dual, quad rod unloading with OreDict **/ + public static void addBreedingRodUnload(DictFrame mat, Item billet, BreedingRodType type) { + CraftingManager.addShapelessAuto(new ItemStack(billet, 1), new Object[] { new ItemStack(ModItems.rod, 1, type.ordinal()) }); + CraftingManager.addShapelessAuto(new ItemStack(billet, 2), new Object[] { new ItemStack(ModItems.rod_dual, 1, type.ordinal()) }); + CraftingManager.addShapelessAuto(new ItemStack(billet, 4), new Object[] { new ItemStack(ModItems.rod_quad, 1, type.ordinal()) }); + } + //Fill rods with 8 billets public static void addRBMKRod(DictFrame mat, Item out) { CraftingManager.addShapelessAuto(new ItemStack(out), new Object[] { ModItems.rbmk_fuel_empty, mat.billet(), mat.billet(), mat.billet(), mat.billet(), mat.billet(), mat.billet(), mat.billet(), mat.billet() }); @@ -244,8 +201,13 @@ public class RodRecipes { CraftingManager.addShapelessAuto(new ItemStack(out), new Object[] { ModItems.rbmk_fuel_empty, billet, billet, billet, billet, billet, billet, billet, billet }); } - //Fill rods with 2 billets + /** Fill ZIRNOX rod with two billets **/ public static void addZIRNOXRod(Item billet, Item out) { - GameRegistry.addShapelessRecipe(new ItemStack(out), new Object[] { ModItems.rod_zirnox_empty, billet, billet }); + CraftingManager.addShapelessAuto(new ItemStack(out), new Object[] { ModItems.rod_zirnox_empty, billet, billet }); + } + + /** Fill ZIRNOX rod with two billets with OreDict **/ + public static void addZIRNOXRod(DictFrame mat, Item out) { + CraftingManager.addShapelessAuto(new ItemStack(out), new Object[] { ModItems.rod_zirnox_empty, mat.billet(), mat.billet() }); } } diff --git a/src/main/java/com/hbm/crafting/SmeltingRecipes.java b/src/main/java/com/hbm/crafting/SmeltingRecipes.java index 883cd9b5a..7d1cc87aa 100644 --- a/src/main/java/com/hbm/crafting/SmeltingRecipes.java +++ b/src/main/java/com/hbm/crafting/SmeltingRecipes.java @@ -88,6 +88,7 @@ public class SmeltingRecipes { GameRegistry.addSmelting(ModItems.powder_zirconium, new ItemStack(ModItems.ingot_zirconium), 1.0F); GameRegistry.addSmelting(ModItems.powder_tcalloy, new ItemStack(ModItems.ingot_tcalloy), 1.0F); GameRegistry.addSmelting(ModItems.powder_au198, new ItemStack(ModItems.ingot_au198), 1.0F); + GameRegistry.addSmelting(ModItems.powder_sr90, new ItemStack(ModItems.ingot_sr90), 1.0F); GameRegistry.addSmelting(ModItems.powder_ra226, new ItemStack(ModItems.ingot_ra226), 1.0F); GameRegistry.addSmelting(ModItems.powder_tantalium, new ItemStack(ModItems.ingot_tantalium), 1.0F); GameRegistry.addSmelting(ModItems.powder_niobium, new ItemStack(ModItems.ingot_niobium), 1.0F); diff --git a/src/main/java/com/hbm/crafting/WeaponRecipes.java b/src/main/java/com/hbm/crafting/WeaponRecipes.java index 5490b6eaf..6b010d03a 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, 16), new Object[] { " S ", " SRS ", " S ", 'S', STEEL.plate(), 'R', ModItems.waste_natural_uranium }); + CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_xvl1456_ammo, 16), new Object[] { " S ", "SRS", " S ", 'S', STEEL.plate(), 'R', ModItems.waste_uranium }); + CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_xvl1456_ammo, 20), 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/creativetabs/ControlTab.java b/src/main/java/com/hbm/creativetabs/ControlTab.java index a48f6ebdc..813a0702c 100644 --- a/src/main/java/com/hbm/creativetabs/ControlTab.java +++ b/src/main/java/com/hbm/creativetabs/ControlTab.java @@ -15,9 +15,9 @@ public class ControlTab extends CreativeTabs { @Override public Item getTabIconItem() { - if(ModItems.rod_balefire_blazing != null) + if(ModItems.pellet_rtg != null) { - return ModItems.rod_balefire_blazing; + return ModItems.pellet_rtg; } return Items.iron_pickaxe; diff --git a/src/main/java/com/hbm/entity/mob/EntityFBI.java b/src/main/java/com/hbm/entity/mob/EntityFBI.java index d7ea8273d..fbbd5e6e6 100644 --- a/src/main/java/com/hbm/entity/mob/EntityFBI.java +++ b/src/main/java/com/hbm/entity/mob/EntityFBI.java @@ -160,8 +160,6 @@ public class EntityFBI extends EntityMob implements IRangedAttackMob { canDestroy.add(ModBlocks.dummy_block_assembler); canDestroy.add(ModBlocks.dummy_block_chemplant); canDestroy.add(ModBlocks.machine_crystallizer); - canDestroy.add(ModBlocks.dummy_block_reactor_small); - canDestroy.add(ModBlocks.dummy_port_reactor_small); canDestroy.add(ModBlocks.machine_turbine); canDestroy.add(ModBlocks.machine_large_turbine); canDestroy.add(ModBlocks.crate_iron); 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/handler/GUIHandler.java b/src/main/java/com/hbm/handler/GUIHandler.java index 77accb5d7..9a7280c25 100644 --- a/src/main/java/com/hbm/handler/GUIHandler.java +++ b/src/main/java/com/hbm/handler/GUIHandler.java @@ -84,9 +84,9 @@ public class GUIHandler implements IGuiHandler { return null; } - case ModBlocks.guiID_reactor: { - if(entity instanceof TileEntityMachineReactor) { - return new ContainerReactor(player.inventory, (TileEntityMachineReactor) entity); + case ModBlocks.guiID_reactor_breeding: { + if(entity instanceof TileEntityMachineReactorBreeding) { + return new ContainerMachineReactorBreeding(player.inventory, (TileEntityMachineReactorBreeding) entity); } return null; } @@ -455,9 +455,9 @@ public class GUIHandler implements IGuiHandler { return null; } - case ModBlocks.guiID_reactor_small: { - if(entity instanceof TileEntityMachineReactorSmall) { - return new ContainerMachineReactorSmall(player.inventory, (TileEntityMachineReactorSmall) entity); + case ModBlocks.guiID_reactor_research: { + if(entity instanceof TileEntityReactorResearch) { + return new ContainerReactorResearch(player.inventory, (TileEntityReactorResearch) entity); } return null; } @@ -933,9 +933,9 @@ public class GUIHandler implements IGuiHandler { return null; } - case ModBlocks.guiID_reactor: { - if(entity instanceof TileEntityMachineReactor) { - return new GUIMachineReactor(player.inventory, (TileEntityMachineReactor) entity); + case ModBlocks.guiID_reactor_breeding: { + if(entity instanceof TileEntityMachineReactorBreeding) { + return new GUIMachineReactorBreeding(player.inventory, (TileEntityMachineReactorBreeding) entity); } return null; } @@ -1304,9 +1304,9 @@ public class GUIHandler implements IGuiHandler { return null; } - case ModBlocks.guiID_reactor_small: { - if(entity instanceof TileEntityMachineReactorSmall) { - return new GUIMachineReactorSmall(player.inventory, (TileEntityMachineReactorSmall) entity); + case ModBlocks.guiID_reactor_research: { + if(entity instanceof TileEntityReactorResearch) { + return new GUIReactorResearch(player.inventory, (TileEntityReactorResearch) entity); } return null; } diff --git a/src/main/java/com/hbm/handler/nei/ReactorRecipeHandler.java b/src/main/java/com/hbm/handler/nei/BreederRecipeHandler.java similarity index 61% rename from src/main/java/com/hbm/handler/nei/ReactorRecipeHandler.java rename to src/main/java/com/hbm/handler/nei/BreederRecipeHandler.java index 68fad78e8..ed488b371 100644 --- a/src/main/java/com/hbm/handler/nei/ReactorRecipeHandler.java +++ b/src/main/java/com/hbm/handler/nei/BreederRecipeHandler.java @@ -1,141 +1,119 @@ -package com.hbm.handler.nei; - -import java.awt.Rectangle; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Map; - -import com.hbm.inventory.gui.GUIMachineReactor; -import com.hbm.inventory.recipes.BreederRecipes; -import com.hbm.inventory.recipes.BreederRecipes.BreederRecipe; - -import codechicken.nei.NEIServerUtils; -import codechicken.nei.PositionedStack; -import codechicken.nei.recipe.TemplateRecipeHandler; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.item.ItemStack; - -public class ReactorRecipeHandler extends TemplateRecipeHandler { - - public class BreedingSet extends TemplateRecipeHandler.CachedRecipe { - - PositionedStack input; - PositionedStack result; - public int heat; - public ArrayList fuels; - - public BreedingSet(ItemStack input, ItemStack result, int heat) { - input.stackSize = 1; - this.input = new PositionedStack(input, 51, 6); - this.result = new PositionedStack(result, 111, 24); - this.heat = heat; - - fuels = new ArrayList(); - - for(ItemStack sta : BreederRecipes.getAllFuelsFromHEAT(heat)) { - fuels.add(new Fuel(sta)); - } - } - - @Override - public List getIngredients() { - return getCycledIngredients(cycleticks / 48, Arrays.asList(new PositionedStack[] { input })); - } - - @Override - public PositionedStack getOtherStack() { - return fuels.get((cycleticks / 48) % fuels.size()).stack; - } - - @Override - public PositionedStack getResult() { - return result; - } - } - - public static class Fuel { - - public Fuel(ItemStack ingred) { - - this.stack = new PositionedStack(ingred, 51, 42, false); - } - - public PositionedStack stack; - } - - @Override - public String getRecipeName() { - return "Breeding Reactor"; - } - - @Override - public String getGuiTexture() { - return GUIMachineReactor.texture.toString(); - } - - @Override - public void loadCraftingRecipes(String outputId, Object... results) { - - if((outputId.equals("breeding")) && getClass() == ReactorRecipeHandler.class) { - - Map recipes = BreederRecipes.getAllRecipes(); - - for(Map.Entry recipe : recipes.entrySet()) { - this.arecipes.add(new BreedingSet(recipe.getKey(), recipe.getValue().output, recipe.getValue().heat)); - } - } else { - super.loadCraftingRecipes(outputId, results); - } - } - - @Override - public void loadCraftingRecipes(ItemStack result) { - - Map recipes = BreederRecipes.getAllRecipes(); - - for(Map.Entry recipe : recipes.entrySet()) { - if(NEIServerUtils.areStacksSameType(recipe.getValue().output, result)) - this.arecipes.add(new BreedingSet(recipe.getKey(), recipe.getValue().output, recipe.getValue().heat)); - } - } - - @Override - public void loadUsageRecipes(String inputId, Object... ingredients) { - if((inputId.equals("breeding")) && getClass() == ReactorRecipeHandler.class) { - loadCraftingRecipes("breeding", new Object[0]); - } else { - super.loadUsageRecipes(inputId, ingredients); - } - } - - @Override - public void loadUsageRecipes(ItemStack ingredient) { - - Map recipes = BreederRecipes.getAllRecipes(); - - for(Map.Entry recipe : recipes.entrySet()) { - if(NEIServerUtils.areStacksSameType(ingredient, (ItemStack) recipe.getKey())) - this.arecipes.add(new BreedingSet(recipe.getKey(), recipe.getValue().output, recipe.getValue().heat)); - } - } - - @Override - public Class getGuiClass() { - return GUIMachineReactor.class; - } - - @Override - public void loadTransferRects() { - transferRects.add(new RecipeTransferRect(new Rectangle(74, 23, 24, 18), "breeding")); - } - - @Override - public void drawExtras(int recipe) { - drawProgressBar(50, 24, 176, 0, 14, 14, 48 * 3, 7); - drawProgressBar(75, 23, 176, 16, 24, 16, 48, 0); - - int heat = ((BreedingSet) this.arecipes.get(recipe)).heat; - drawProgressBar(43, 24, 194, 0, 4, 16, (float) 1 - heat / 4F, 7); - } -} +package com.hbm.handler.nei; + +import java.awt.Rectangle; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +import com.hbm.inventory.gui.GUIMachineReactorBreeding; +import com.hbm.inventory.recipes.BreederRecipes; +import com.hbm.inventory.recipes.BreederRecipes.BreederRecipe; + +import codechicken.lib.gui.GuiDraw; +import codechicken.nei.NEIServerUtils; +import codechicken.nei.PositionedStack; +import codechicken.nei.recipe.TemplateRecipeHandler; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.item.ItemStack; + +public class BreederRecipeHandler extends TemplateRecipeHandler { + + public class BreedingSet extends TemplateRecipeHandler.CachedRecipe { + + PositionedStack input; + PositionedStack result; + public int flux; + + public BreedingSet(ItemStack input, ItemStack result, int flux) { + input.stackSize = 1; + this.input = new PositionedStack(input, 30, 24); + this.result = new PositionedStack(result, 120, 24); + this.flux = flux; + } + + @Override + public List getIngredients() { + return getCycledIngredients(cycleticks / 48, Arrays.asList(new PositionedStack[] { input })); + } + + @Override + public PositionedStack getResult() { + return result; + } + } + + @Override + public String getRecipeName() { + return "Breeding Reactor"; + } + + @Override + public String getGuiTexture() { + return GUIMachineReactorBreeding.texture.toString(); + } + + @Override + public void loadCraftingRecipes(String outputId, Object... results) { + + if((outputId.equals("breeding")) && getClass() == BreederRecipeHandler.class) { + + Map recipes = BreederRecipes.getAllRecipes(); + + for(Map.Entry recipe : recipes.entrySet()) { + this.arecipes.add(new BreedingSet(recipe.getKey(), recipe.getValue().output, recipe.getValue().flux)); + } + } else { + super.loadCraftingRecipes(outputId, results); + } + } + + @Override + public void loadCraftingRecipes(ItemStack result) { + + Map recipes = BreederRecipes.getAllRecipes(); + + for(Map.Entry recipe : recipes.entrySet()) { + if(NEIServerUtils.areStacksSameType(recipe.getValue().output, result)) + this.arecipes.add(new BreedingSet(recipe.getKey(), recipe.getValue().output, recipe.getValue().flux)); + } + } + + @Override + public void loadUsageRecipes(String inputId, Object... ingredients) { + if((inputId.equals("breeding")) && getClass() == BreederRecipeHandler.class) { + loadCraftingRecipes("breeding", new Object[0]); + } else { + super.loadUsageRecipes(inputId, ingredients); + } + } + + @Override + public void loadUsageRecipes(ItemStack ingredient) { + + Map recipes = BreederRecipes.getAllRecipes(); + + for(Map.Entry recipe : recipes.entrySet()) { + if(NEIServerUtils.areStacksSameType(ingredient, (ItemStack) recipe.getKey())) + this.arecipes.add(new BreedingSet(recipe.getKey(), recipe.getValue().output, recipe.getValue().flux)); + } + } + + @Override + public Class getGuiClass() { + return GUIMachineReactorBreeding.class; + } + + @Override + public void loadTransferRects() { + transferRects.add(new RecipeTransferRect(new Rectangle(68, 9, 30, 37), "breeding")); + } + + @Override + public void drawExtras(int recipe) { + drawProgressBar(48, 21, 176, 0, 70, 20, 50, 0); + + String flux = ((BreedingSet) this.arecipes.get(recipe)).flux + ""; + GuiDraw.drawString(flux, 83 - GuiDraw.fontRenderer.getStringWidth(flux) / 2, 10, 0x08FF00); + } +} diff --git a/src/main/java/com/hbm/hazard/HazardRegistry.java b/src/main/java/com/hbm/hazard/HazardRegistry.java index 25453ca75..49e7ba714 100644 --- a/src/main/java/com/hbm/hazard/HazardRegistry.java +++ b/src/main/java/com/hbm/hazard/HazardRegistry.java @@ -8,6 +8,7 @@ import com.hbm.hazard.modifier.*; import com.hbm.hazard.transformer.HazardTransformerRadiationNBT; import com.hbm.hazard.type.*; import com.hbm.items.ModItems; +import com.hbm.items.machine.ItemBreedingRod.BreedingRodType; import com.hbm.util.Compat; import com.hbm.util.Compat.ReikaIsotope; @@ -57,6 +58,7 @@ public class HazardRegistry { public static final float gen_10B = 0.1F; public static final float co60 = 30.0F; + public static final float sr90 = 15.0F; public static final float tc99 = 2.75F; public static final float i131 = 150.0F; public static final float xe135 = 1250.0F; @@ -191,42 +193,49 @@ 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.001F * 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); + registerOtherFuel(plate_fuel_ra226be, rabe * ingot, po210 * nugget * 3); + + 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); + registerOtherWaste(waste_plate_ra226be, po210 * nugget * 3); HazardSystem.register(debris_graphite, new HazardData().addEntry(RADIATION, 70F).addEntry(HOT, 5F)); HazardSystem.register(debris_metal, makeData(RADIATION, 5F)); @@ -282,28 +291,25 @@ 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_strontium, makeData(RADIATION, sr90 * rtg)); + 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); - registerRodRadiation(rod_u233, rod_dual_u233, rod_quad_u233, u233); - registerRodRadiation(rod_u235, rod_dual_u235, rod_quad_u235, u235); - registerRodRadiation(rod_u238, rod_dual_u238, rod_quad_u238, u238); - registerRodRadiation(rod_plutonium, rod_dual_plutonium, rod_quad_plutonium, pu); - registerRodRadiation(rod_pu238, rod_dual_pu238, rod_quad_pu238, pu238); - registerRodRadiation(rod_pu239, rod_dual_pu239, rod_quad_pu239, pu239); - registerRodRadiation(rod_pu240, rod_dual_pu240, rod_quad_pu240, pu240); - registerRodRadiation(rod_neptunium, rod_dual_neptunium, rod_quad_neptunium, np237); - registerRodRadiation(rod_polonium, rod_dual_polonium, rod_quad_polonium, po210); - registerRodRadiationExtra(rod_schrabidium, rod_dual_schrabidium, rod_quad_schrabidium, sa326, BLINDING, 3F); - registerRodRadiationExtra(rod_solinium, rod_dual_solinium, rod_quad_solinium, sa327, BLINDING, 3F); - registerRodRadiation(rod_balefire, rod_dual_balefire, rod_quad_balefire, bf); - registerRodRadiationExtra(rod_balefire_blazing, rod_dual_balefire_blazing, rod_quad_balefire_blazing, bfb, HOT, 5F); + registerBreedingRodRadiation(BreedingRodType.TRITIUM, 0.001F); + registerBreedingRodRadiation(BreedingRodType.CO60, co60); + registerBreedingRodRadiation(BreedingRodType.TH232, th232); + registerBreedingRodRadiation(BreedingRodType.THF, thf); + registerBreedingRodRadiation(BreedingRodType.U235, u235); + registerBreedingRodRadiation(BreedingRodType.NP237, np237); + registerBreedingRodRadiation(BreedingRodType.PU238, pu238); //it's in a container :) + registerBreedingRodRadiation(BreedingRodType.PU239, pu239); + registerBreedingRodRadiation(BreedingRodType.RGP, purg); + registerBreedingRodRadiation(BreedingRodType.WASTE, wst); + registerBreedingRodRadiation(BreedingRodType.URANIUM, u); registerRBMKRod(rbmk_fuel_ueu, u * rod_rbmk, u * rod_rbmk * 100); registerRBMKRod(rbmk_fuel_meu, uf * rod_rbmk, uf * rod_rbmk * 100); @@ -353,18 +359,6 @@ public class HazardRegistry { private static HazardData makeData(HazardTypeBase hazard, float level) { return new HazardData().addEntry(hazard, level); } private static HazardData makeData(HazardTypeBase hazard, float level, boolean override) { return new HazardData().addEntry(hazard, level, override); } - private static void registerRodRadiation(Item single, Item dual, Item quad, float base) { - HazardSystem.register(single, makeData(RADIATION, base * rod)); - HazardSystem.register(dual, makeData(RADIATION, base * rod_dual)); - HazardSystem.register(quad, makeData(RADIATION, base * rod_quad)); - } - - private static void registerRodRadiationExtra(Item single, Item dual, Item quad, float base, HazardTypeBase extra, float base2) { - HazardSystem.register(single, new HazardData().addEntry(RADIATION, base * rod).addEntry(extra, base2 * rod)); - HazardSystem.register(dual, new HazardData().addEntry(RADIATION, base * rod_dual).addEntry(extra, base2 * rod_dual)); - HazardSystem.register(quad, new HazardData().addEntry(RADIATION, base * rod_quad).addEntry(extra, base2 * rod_quad)); - } - private static void registerRBMKPellet(Item pellet, float base, float dep) { registerRBMKPellet(pellet, base, dep, 0F); } private static void registerRBMKPellet(Item pellet, float base, float dep, float blinding) { @@ -385,4 +379,26 @@ public class HazardRegistry { if(blinding > 0) data.addEntry(new HazardEntry(BLINDING, blinding)); HazardSystem.register(rod, data); } + + private static void registerBreedingRodRadiation(BreedingRodType type, float base) { + HazardSystem.register(new ItemStack(ModItems.rod, 1, type.ordinal()), makeData(RADIATION, base)); + HazardSystem.register(new ItemStack(ModItems.rod_dual, 1, type.ordinal()), makeData(RADIATION, base * rod_dual)); + HazardSystem.register(new ItemStack(ModItems.rod_quad, 1, type.ordinal()), makeData(RADIATION, base * rod_quad)); + } + + 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/FluidContainerRegistry.java b/src/main/java/com/hbm/inventory/FluidContainerRegistry.java index f5746fe31..2e1481605 100644 --- a/src/main/java/com/hbm/inventory/FluidContainerRegistry.java +++ b/src/main/java/com/hbm/inventory/FluidContainerRegistry.java @@ -21,14 +21,6 @@ public class FluidContainerRegistry { FluidContainerRegistry.registerContainer(new FluidContainer(new ItemStack(ModItems.bucket_mud), new ItemStack(Items.bucket), FluidType.WATZ, 1000)); FluidContainerRegistry.registerContainer(new FluidContainer(new ItemStack(ModItems.bucket_schrabidic_acid), new ItemStack(Items.bucket), FluidType.SCHRABIDIC, 1000)); - FluidContainerRegistry.registerContainer(new FluidContainer(new ItemStack(ModItems.rod_water), new ItemStack(ModItems.rod_empty), FluidType.WATER, 1000)); - FluidContainerRegistry.registerContainer(new FluidContainer(new ItemStack(ModItems.rod_dual_water), new ItemStack(ModItems.rod_dual_empty), FluidType.WATER, 2000)); - FluidContainerRegistry.registerContainer(new FluidContainer(new ItemStack(ModItems.rod_quad_water), new ItemStack(ModItems.rod_quad_empty), FluidType.WATER, 4000)); - - FluidContainerRegistry.registerContainer(new FluidContainer(new ItemStack(ModItems.rod_coolant), new ItemStack(ModItems.rod_empty), FluidType.COOLANT, 1000)); - FluidContainerRegistry.registerContainer(new FluidContainer(new ItemStack(ModItems.rod_dual_coolant), new ItemStack(ModItems.rod_dual_empty), FluidType.COOLANT, 2000)); - FluidContainerRegistry.registerContainer(new FluidContainer(new ItemStack(ModItems.rod_quad_coolant), new ItemStack(ModItems.rod_quad_empty), FluidType.COOLANT, 4000)); - FluidContainerRegistry.registerContainer(new FluidContainer(new ItemStack(ModItems.canister_oil), new ItemStack(ModItems.canister_empty), FluidType.OIL, 1000)); FluidContainerRegistry.registerContainer(new FluidContainer(new ItemStack(ModItems.canister_smear), new ItemStack(ModItems.canister_empty), FluidType.SMEAR, 1000)); FluidContainerRegistry.registerContainer(new FluidContainer(new ItemStack(ModItems.canister_heavyoil), new ItemStack(ModItems.canister_empty), FluidType.HEAVYOIL, 1000)); @@ -59,9 +51,6 @@ public class FluidContainerRegistry { FluidContainerRegistry.registerContainer(new FluidContainer(new ItemStack(ModItems.cell_deuterium), new ItemStack(ModItems.cell_empty), FluidType.DEUTERIUM, 1000)); FluidContainerRegistry.registerContainer(new FluidContainer(new ItemStack(ModItems.cell_tritium), new ItemStack(ModItems.cell_empty), FluidType.TRITIUM, 1000)); - FluidContainerRegistry.registerContainer(new FluidContainer(new ItemStack(ModItems.rod_tritium), new ItemStack(ModItems.rod_empty), FluidType.TRITIUM, 1000)); - FluidContainerRegistry.registerContainer(new FluidContainer(new ItemStack(ModItems.rod_dual_tritium), new ItemStack(ModItems.rod_dual_empty), FluidType.TRITIUM, 2000)); - FluidContainerRegistry.registerContainer(new FluidContainer(new ItemStack(ModItems.rod_quad_tritium), new ItemStack(ModItems.rod_quad_empty), FluidType.TRITIUM, 4000)); FluidContainerRegistry.registerContainer(new FluidContainer(new ItemStack(ModItems.cell_uf6), new ItemStack(ModItems.cell_empty), FluidType.UF6, 1000)); FluidContainerRegistry.registerContainer(new FluidContainer(new ItemStack(ModItems.cell_puf6), new ItemStack(ModItems.cell_empty), FluidType.PUF6, 1000)); FluidContainerRegistry.registerContainer(new FluidContainer(new ItemStack(ModItems.cell_antimatter), new ItemStack(ModItems.cell_empty), FluidType.AMAT, 1000)); diff --git a/src/main/java/com/hbm/inventory/OreDictManager.java b/src/main/java/com/hbm/inventory/OreDictManager.java index 45970845f..3e75722ed 100644 --- a/src/main/java/com/hbm/inventory/OreDictManager.java +++ b/src/main/java/com/hbm/inventory/OreDictManager.java @@ -197,6 +197,7 @@ public class OreDictManager { /* * FISSION FRAGMENTS */ + public static final DictFrame SR90 = new DictFrame("Strontium90", "Sr90"); public static final DictFrame I131 = new DictFrame("Iodine131", "I131"); public static final DictFrame XE135 = new DictFrame("Xenon135", "Xe135"); public static final DictFrame CS137 = new DictFrame("Caesium137", "Cs137"); @@ -267,7 +268,7 @@ public class OreDictManager { COLTAN .ingot(fragment_coltan) .dust(powder_coltan_ore) .block(block_coltan) .ore(ore_coltan); NB .nugget(fragment_niobium) .ingot(ingot_niobium) .dustSmall(powder_niobium_tiny) .dust(powder_niobium) .block(block_niobium); BE .nugget(nugget_beryllium) .billet(billet_beryllium) .ingot(ingot_beryllium) .dust(powder_beryllium) .block(block_beryllium) .ore(ore_beryllium); - CO .nugget(fragment_cobalt) .ingot(ingot_cobalt) .dustSmall(powder_cobalt_tiny) .dust(powder_cobalt) .block(block_cobalt) .ore(ore_cobalt, ore_nether_cobalt); + CO .nugget(fragment_cobalt) .nugget(nugget_cobalt) .billet(billet_cobalt) .ingot(ingot_cobalt) .dust(powder_cobalt) .dustSmall(powder_cobalt_tiny) .block(block_cobalt) .ore(ore_cobalt, ore_nether_cobalt); B .nugget(fragment_boron) .ingot(ingot_boron) .dustSmall(powder_boron_tiny) .dust(powder_boron) .block(block_boron); GRAPHITE .ingot(ingot_graphite) .block(block_graphite); DURA .ingot(ingot_dura_steel) .dust(powder_dura_steel) .block(block_dura_steel); @@ -337,6 +338,7 @@ public class OreDictManager { /* * FISSION FRAGMENTS */ + SR90 .rad(HazardRegistry.sr90) .hot(1F) .hydro(1F) .dustSmall(powder_sr90_tiny) .dust(powder_sr90) .ingot(ingot_sr90) .billet(billet_sr90) .nugget(nugget_sr90); I131 .rad(HazardRegistry.i131) .hot(1F) .dustSmall(powder_i131_tiny) .dust(powder_i131); XE135 .rad(HazardRegistry.xe135) .hot(10F) .dustSmall(powder_xe135_tiny) .dust(powder_xe135); CS137 .rad(HazardRegistry.cs137) .hot(3F) .hydro(3F) .dustSmall(powder_cs137_tiny) .dust(powder_cs137); diff --git a/src/main/java/com/hbm/inventory/container/ContainerMachineReactorBreeding.java b/src/main/java/com/hbm/inventory/container/ContainerMachineReactorBreeding.java new file mode 100644 index 000000000..52649c3bc --- /dev/null +++ b/src/main/java/com/hbm/inventory/container/ContainerMachineReactorBreeding.java @@ -0,0 +1,71 @@ +package com.hbm.inventory.container; + +import com.hbm.inventory.SlotMachineOutput; +import com.hbm.items.machine.ItemBreedingRod; +import com.hbm.tileentity.machine.TileEntityMachineReactorBreeding; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class ContainerMachineReactorBreeding extends Container { + + private TileEntityMachineReactorBreeding reactor; + + public ContainerMachineReactorBreeding(InventoryPlayer invPlayer, TileEntityMachineReactorBreeding tedf) { + + reactor = tedf; + + this.addSlotToContainer(new Slot(tedf, 0, 35, 35)); + this.addSlotToContainer(new SlotMachineOutput(tedf, 1, 125, 35)); + + for(int i = 0; i < 3; i++) { + for(int j = 0; j < 9; j++) { + this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); + } + } + + for(int i = 0; i < 9; i++) { + this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142)); + } + } + + @Override + public ItemStack transferStackInSlot(EntityPlayer player, int index) { + + ItemStack var3 = null; + Slot slot = (Slot) this.inventorySlots.get(index); + + if (slot != null && slot.getHasStack()) { + + ItemStack stack = slot.getStack(); + var3 = stack.copy(); + + if (index <= 2) { + if (!this.mergeItemStack(stack, 2, this.inventorySlots.size(), true)) { + return null; + } + + } else if(stack.getItem() instanceof ItemBreedingRod) + if (!this.mergeItemStack(stack, 0, 1, false)) { + return null; + } + + if (stack.stackSize == 0) { + slot.putStack((ItemStack) null); + + } else { + slot.onSlotChanged(); + } + } + + return var3; + } + + @Override + public boolean canInteractWith(EntityPlayer player) { + return reactor.isUseableByPlayer(player); + } +} diff --git a/src/main/java/com/hbm/inventory/container/ContainerMachineReactorSmall.java b/src/main/java/com/hbm/inventory/container/ContainerMachineReactorSmall.java deleted file mode 100644 index 8abf8eee3..000000000 --- a/src/main/java/com/hbm/inventory/container/ContainerMachineReactorSmall.java +++ /dev/null @@ -1,93 +0,0 @@ -package com.hbm.inventory.container; - -import com.hbm.inventory.SlotMachineOutput; -import com.hbm.tileentity.machine.TileEntityMachineReactorSmall; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -public class ContainerMachineReactorSmall extends Container { - -private TileEntityMachineReactorSmall seleniumEngine; - - public ContainerMachineReactorSmall(InventoryPlayer invPlayer, TileEntityMachineReactorSmall tedf) { - - seleniumEngine = tedf; - - //Rods - this.addSlotToContainer(new Slot(tedf, 0, 98, 18)); - this.addSlotToContainer(new Slot(tedf, 1, 134, 18)); - this.addSlotToContainer(new Slot(tedf, 2, 80, 36)); - this.addSlotToContainer(new Slot(tedf, 3, 116, 36)); - this.addSlotToContainer(new Slot(tedf, 4, 152, 36)); - this.addSlotToContainer(new Slot(tedf, 5, 98, 54)); - this.addSlotToContainer(new Slot(tedf, 6, 134, 54)); - this.addSlotToContainer(new Slot(tedf, 7, 80, 72)); - this.addSlotToContainer(new Slot(tedf, 8, 116, 72)); - this.addSlotToContainer(new Slot(tedf, 9, 152, 72)); - 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++) - { - this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18 + 56)); - } - } - - for(int i = 0; i < 9; i++) - { - this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142 + 56)); - } - } - - @Override - public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2) - { - ItemStack var3 = null; - Slot var4 = (Slot) this.inventorySlots.get(par2); - - if (var4 != null && var4.getHasStack()) - { - ItemStack var5 = var4.getStack(); - var3 = var5.copy(); - - if (par2 <= 16) { - if (!this.mergeItemStack(var5, 17, 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; - } - - if (var5.stackSize == 0) - { - var4.putStack((ItemStack) null); - } - else - { - var4.onSlotChanged(); - } - } - - return var3; - } - - @Override - public boolean canInteractWith(EntityPlayer player) { - return seleniumEngine.isUseableByPlayer(player); - } -} diff --git a/src/main/java/com/hbm/inventory/container/ContainerReactor.java b/src/main/java/com/hbm/inventory/container/ContainerReactor.java deleted file mode 100644 index a31938521..000000000 --- a/src/main/java/com/hbm/inventory/container/ContainerReactor.java +++ /dev/null @@ -1,73 +0,0 @@ -package com.hbm.inventory.container; - -import com.hbm.inventory.SlotMachineOutput; -import com.hbm.tileentity.machine.TileEntityMachineReactor; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -public class ContainerReactor extends Container { - - private TileEntityMachineReactor diFurnace; - - public ContainerReactor(InventoryPlayer invPlayer, TileEntityMachineReactor tedf) { - - diFurnace = tedf; - - this.addSlotToContainer(new Slot(tedf, 0, 56, 53)); - this.addSlotToContainer(new Slot(tedf, 1, 56, 17)); - this.addSlotToContainer(new SlotMachineOutput(tedf, 2, 116, 35)); - - for(int i = 0; i < 3; i++) { - for(int j = 0; j < 9; j++) { - this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); - } - } - - for(int i = 0; i < 9; i++) { - this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142)); - } - } - - @Override - public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2) { - - ItemStack var3 = null; - Slot var4 = (Slot) this.inventorySlots.get(par2); - - if (var4 != null && var4.getHasStack()) { - - ItemStack var5 = var4.getStack(); - var3 = var5.copy(); - - if (par2 <= 2) { - if (!this.mergeItemStack(var5, 3, this.inventorySlots.size(), true)) - { - return null; - } - - //Changing priorities without swapping the actual slots - } else if (!this.mergeItemStack(var5, 1, 2, false)) { - if (!this.mergeItemStack(var5, 0, 1, false)) - return null; - } - - if (var5.stackSize == 0) { - var4.putStack((ItemStack) null); - - } else { - var4.onSlotChanged(); - } - } - - return var3; - } - - @Override - public boolean canInteractWith(EntityPlayer player) { - return diFurnace.isUseableByPlayer(player); - } -} diff --git a/src/main/java/com/hbm/inventory/container/ContainerReactorControl.java b/src/main/java/com/hbm/inventory/container/ContainerReactorControl.java index 9bbe2042e..d6cf909ec 100644 --- a/src/main/java/com/hbm/inventory/container/ContainerReactorControl.java +++ b/src/main/java/com/hbm/inventory/container/ContainerReactorControl.java @@ -10,20 +10,16 @@ import net.minecraft.item.ItemStack; public class ContainerReactorControl extends Container { - private TileEntityReactorControl testNuke; - private int heat; + private TileEntityReactorControl control; public ContainerReactorControl(InventoryPlayer invPlayer, TileEntityReactorControl tedf) { - heat = 0; - testNuke = tedf; + control = tedf; - this.addSlotToContainer(new Slot(tedf, 0, 26, 53)); + this.addSlotToContainer(new Slot(tedf, 0, 92, 38)); - for(int i = 0; i < 3; i++) - { - for(int j = 0; j < 9; j++) - { + for(int i = 0; i < 3; i++) { + for(int j = 0; j < 9; j++) { this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); } } @@ -71,6 +67,6 @@ public class ContainerReactorControl extends Container { @Override public boolean canInteractWith(EntityPlayer player) { - return testNuke.isUseableByPlayer(player); + return control.isUseableByPlayer(player); } } diff --git a/src/main/java/com/hbm/inventory/container/ContainerReactorResearch.java b/src/main/java/com/hbm/inventory/container/ContainerReactorResearch.java new file mode 100644 index 000000000..5bea2c066 --- /dev/null +++ b/src/main/java/com/hbm/inventory/container/ContainerReactorResearch.java @@ -0,0 +1,83 @@ +package com.hbm.inventory.container; + +import com.hbm.inventory.SlotMachineOutput; +import com.hbm.items.machine.ItemPlateFuel; +import com.hbm.tileentity.machine.TileEntityReactorResearch; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class ContainerReactorResearch extends Container { + +private TileEntityReactorResearch reactor; + + public ContainerReactorResearch(InventoryPlayer invPlayer, TileEntityReactorResearch tedf) { + + reactor = tedf; + + //Rods + this.addSlotToContainer(new Slot(tedf, 0, 95, 22)); + this.addSlotToContainer(new Slot(tedf, 1, 131, 22)); + this.addSlotToContainer(new Slot(tedf, 2, 77, 40)); + this.addSlotToContainer(new Slot(tedf, 3, 113, 40)); + this.addSlotToContainer(new Slot(tedf, 4, 149, 40)); + this.addSlotToContainer(new Slot(tedf, 5, 95, 58)); + this.addSlotToContainer(new Slot(tedf, 6, 131, 58)); + this.addSlotToContainer(new Slot(tedf, 7, 77, 76)); + this.addSlotToContainer(new Slot(tedf, 8, 113, 76)); + this.addSlotToContainer(new Slot(tedf, 9, 149, 76)); + this.addSlotToContainer(new Slot(tedf, 10, 95, 94)); + this.addSlotToContainer(new Slot(tedf, 11, 131, 94)); + + for(int i = 0; i < 3; i++) + { + for(int j = 0; j < 9; j++) + { + this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18 + 56)); + } + } + + for(int i = 0; i < 9; i++) + { + this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142 + 56)); + } + } + + @Override + public ItemStack transferStackInSlot(EntityPlayer player, int index) { + ItemStack var3 = null; + Slot slot = (Slot) this.inventorySlots.get(index); + + if (slot != null && slot.getHasStack()) { + ItemStack stack = slot.getStack(); + var3 = stack.copy(); + + if (index <= 12) { + if (!this.mergeItemStack(stack, 13, this.inventorySlots.size(), true)){ + return null; + } + } else { + if(stack.getItem() instanceof ItemPlateFuel) { + if (!this.mergeItemStack(stack, 0, 12, true)) + return null; + } else { + return null; + } + } + if (stack.stackSize == 0) { + slot.putStack((ItemStack) null); + } else { + slot.onSlotChanged(); + } + } + + return var3; + } + + @Override + public boolean canInteractWith(EntityPlayer player) { + return reactor.isUseableByPlayer(player); + } +} diff --git a/src/main/java/com/hbm/inventory/container/ContainerReactorZirnox.java b/src/main/java/com/hbm/inventory/container/ContainerReactorZirnox.java index 0acad28ca..110394329 100644 --- a/src/main/java/com/hbm/inventory/container/ContainerReactorZirnox.java +++ b/src/main/java/com/hbm/inventory/container/ContainerReactorZirnox.java @@ -92,6 +92,8 @@ public class ContainerReactorZirnox extends Container { if(!this.mergeItemStack(stack, 0, 24, true)) return null; + } else { + return null; } } } diff --git a/src/main/java/com/hbm/inventory/gui/GUIMachineReactor.java b/src/main/java/com/hbm/inventory/gui/GUIMachineReactorBreeding.java similarity index 58% rename from src/main/java/com/hbm/inventory/gui/GUIMachineReactor.java rename to src/main/java/com/hbm/inventory/gui/GUIMachineReactorBreeding.java index 653ff03eb..efe6032ad 100644 --- a/src/main/java/com/hbm/inventory/gui/GUIMachineReactor.java +++ b/src/main/java/com/hbm/inventory/gui/GUIMachineReactorBreeding.java @@ -1,74 +1,71 @@ -package com.hbm.inventory.gui; - -import org.lwjgl.opengl.GL11; - -import com.hbm.inventory.container.ContainerReactor; -import com.hbm.inventory.recipes.BreederRecipes; -import com.hbm.lib.RefStrings; -import com.hbm.tileentity.machine.TileEntityMachineReactor; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.resources.I18n; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.util.ResourceLocation; - -public class GUIMachineReactor extends GuiInfoContainer { - - public static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/processing/gui_breeder.png"); - private TileEntityMachineReactor breeder; - - public GUIMachineReactor(InventoryPlayer invPlayer, TileEntityMachineReactor tedf) { - super(new ContainerReactor(invPlayer, tedf)); - breeder = tedf; - - this.xSize = 176; - this.ySize = 166; - } - - @Override - public void drawScreen(int mouseX, int mouseY, float f) { - super.drawScreen(mouseX, mouseY, f); - - String tooltip = BreederRecipes.getHEATString(breeder.heat + " HEAT", breeder.heat); - - this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 47, guiTop + 34, 6, 18, mouseX, mouseY, new String[] { tooltip }); - this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 55, guiTop + 34, 18, 18, mouseX, mouseY, new String[] { breeder.charge + " operation(s) left" }); - } - - @Override - protected void drawGuiContainerForegroundLayer(int i, int j) { - String name = this.breeder.hasCustomInventoryName() ? this.breeder.getInventoryName() : I18n.format(this.breeder.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); - } - - @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); - Minecraft.getMinecraft().getTextureManager().bindTexture(texture); - drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); - - /* - * A dud is a tile entity which did not survive a block state change (i.e. a furnace becoming lit) on the client. - * Usually, most functionality is preserved since vanilla interacts with the open GUI screen rather than the TE - * itself, though this does not apply to NTM packets. The client will think the TE bound to the GUI is invalid, - * and therefore miss out on NTM status packets, but it will still require the old TE for slot changes. The refreshed - * "dud" is only used for status bars, it will not replace the actual invalid TE instance in the GUI screen. - */ - TileEntityMachineReactor dud = breeder; - - if(breeder.isInvalid() && breeder.getWorldObj().getTileEntity(breeder.xCoord, breeder.yCoord, breeder.zCoord) instanceof TileEntityMachineReactor) - dud = (TileEntityMachineReactor) breeder.getWorldObj().getTileEntity(breeder.xCoord, breeder.yCoord, breeder.zCoord); - - if(dud.hasPower()) - drawTexturedModalRect(guiLeft + 55, guiTop + 35, 176, 0, 18, 16); - - int i = dud.getProgressScaled(23); - drawTexturedModalRect(guiLeft + 80, guiTop + 34, 176, 16, i, 16); - - int j = dud.getHeatScaled(16); - drawTexturedModalRect(guiLeft + 48, guiTop + 51 - j, 194, 16 - j, 4, j); - } - +package com.hbm.inventory.gui; + +import org.lwjgl.opengl.GL11; + +import com.hbm.inventory.container.ContainerMachineReactorBreeding; +import com.hbm.inventory.recipes.BreederRecipes; +import com.hbm.lib.RefStrings; +import com.hbm.tileentity.machine.TileEntityMachineReactorBreeding; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.ResourceLocation; + +public class GUIMachineReactorBreeding extends GuiInfoContainer { + + public static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/processing/gui_breeder.png"); + private TileEntityMachineReactorBreeding breeder; + + public GUIMachineReactorBreeding(InventoryPlayer invPlayer, TileEntityMachineReactorBreeding tedf) { + super(new ContainerMachineReactorBreeding(invPlayer, tedf)); + breeder = tedf; + + this.xSize = 176; + this.ySize = 166; + } + + @Override + public void drawScreen(int mouseX, int mouseY, float f) { + super.drawScreen(mouseX, mouseY, f); + + String[] text = new String[] { + "The reactor has to recieve", + "neutron flux from adjacent", + "research reactors to breed." + }; + this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 16, 16, 16, guiLeft - 8, guiTop + 16 + 16, text); + } + + @Override + protected void drawGuiContainerForegroundLayer(int i, int j) { + String name = this.breeder.hasCustomInventoryName() ? this.breeder.getInventoryName() : I18n.format(this.breeder.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); + this.fontRendererObj.drawString(breeder.flux + "", 88 - this.fontRendererObj.getStringWidth(breeder.flux + "") / 2, 21, 0x08FF00); + } + + @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); + Minecraft.getMinecraft().getTextureManager().bindTexture(texture); + drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); + + /* + * A dud is a tile entity which did not survive a block state change (i.e. a furnace becoming lit) on the client. + * Usually, most functionality is preserved since vanilla interacts with the open GUI screen rather than the TE + * itself, though this does not apply to NTM packets. The client will think the TE bound to the GUI is invalid, + * and therefore miss out on NTM status packets, but it will still require the old TE for slot changes. The refreshed + * "dud" is only used for status bars, it will not replace the actual invalid TE instance in the GUI screen. + * + * what? + */ + + int i = breeder.getProgressScaled(70); + drawTexturedModalRect(guiLeft + 53, guiTop + 32, 176, 0, i, 20); + + this.drawInfoPanel(guiLeft - 16, guiTop + 16, 16, 16, 3); + } + } \ No newline at end of file diff --git a/src/main/java/com/hbm/inventory/gui/GUIMachineReactorSmall.java b/src/main/java/com/hbm/inventory/gui/GUIMachineReactorSmall.java deleted file mode 100644 index da5ecf795..000000000 --- a/src/main/java/com/hbm/inventory/gui/GUIMachineReactorSmall.java +++ /dev/null @@ -1,213 +0,0 @@ -package com.hbm.inventory.gui; - -import org.lwjgl.opengl.GL11; - -import com.hbm.inventory.FluidTank; -import com.hbm.inventory.container.ContainerMachineReactorSmall; -import com.hbm.lib.RefStrings; -import com.hbm.packet.AuxButtonPacket; -import com.hbm.packet.PacketDispatcher; -import com.hbm.tileentity.machine.TileEntityMachineReactorSmall; -import net.minecraft.client.Minecraft; -import net.minecraft.client.audio.PositionedSoundRecord; -import net.minecraft.client.resources.I18n; -import net.minecraft.entity.player.InventoryPlayer; -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; - - public GUIMachineReactorSmall(InventoryPlayer invPlayer, TileEntityMachineReactorSmall tedf) { - super(new ContainerMachineReactorSmall(invPlayer, tedf)); - diFurnace = 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" }); - - String[] text = new String[] { "Coolant will move heat from the core to", - "the hull. Water will use that heat and", - "generate steam.", - "Water consumption rate:", - " 100 mB/t", - " 2000 mB/s", - "Coolant consumption rate:", - " 10 mB/t", - " 200 mB/s", - "Water next to the reactor's open", - "sides will pour into the tank." }; - this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36, 16, 16, guiLeft - 8, guiTop + 36 + 16, text); - - String[] text1 = new String[] { "Raise/lower the control rods", - "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"}; - 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()); - - 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) { - 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)); - } - } - - @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); - - 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); - - i = (int) Math.min(i, 160); - - drawTexturedModalRect(guiLeft + 80, guiTop + 120, 0, 230, i, 4); - } - - if(!diFurnace.retracting) - drawTexturedModalRect(guiLeft + 52, guiTop + 53, 212, 0, 18, 18); - - if(!toggleOverlay) { - if(diFurnace.rods >= diFurnace.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); - - } 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); - - } - } - - 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/gui/GUIReactorControl.java b/src/main/java/com/hbm/inventory/gui/GUIReactorControl.java index 63cdc00aa..d4b58cc43 100644 --- a/src/main/java/com/hbm/inventory/gui/GUIReactorControl.java +++ b/src/main/java/com/hbm/inventory/gui/GUIReactorControl.java @@ -1,18 +1,30 @@ package com.hbm.inventory.gui; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.apache.commons.lang3.ArrayUtils; +import org.apache.commons.lang3.math.NumberUtils; +import org.lwjgl.input.Keyboard; import org.lwjgl.input.Mouse; import org.lwjgl.opengl.GL11; import com.hbm.inventory.container.ContainerReactorControl; +import com.hbm.inventory.gui.GuiInfoContainer.NumberDisplay; import com.hbm.lib.RefStrings; -import com.hbm.packet.AuxButtonPacket; +import com.hbm.packet.NBTControlPacket; import com.hbm.packet.PacketDispatcher; import com.hbm.tileentity.machine.TileEntityReactorControl; import net.minecraft.client.Minecraft; import net.minecraft.client.audio.PositionedSoundRecord; +import net.minecraft.client.gui.GuiTextField; +import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.resources.I18n; import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.MathHelper; import net.minecraft.util.ResourceLocation; public class GUIReactorControl extends GuiInfoContainer { @@ -20,89 +32,113 @@ public class GUIReactorControl extends GuiInfoContainer { private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_reactor_control.png"); private TileEntityReactorControl control; + private final NumberDisplay[] displays = new NumberDisplay[3]; + private GuiTextField[] fields; + public GUIReactorControl(InventoryPlayer invPlayer, TileEntityReactorControl tedf) { super(new ContainerReactorControl(invPlayer, tedf)); control = tedf; + displays[0] = new NumberDisplay(6, 20, 0x08FF00).setDigitLength(3); + displays[1] = new NumberDisplay(66, 20, 0x08FF00).setDigitLength(4); + displays[2] = new NumberDisplay(126, 20, 0x08FF00).setDigitLength(3); + + fields = new GuiTextField[4]; this.xSize = 176; this.ySize = 166; } + public void initGui() { + super.initGui(); + Keyboard.enableRepeatEvents(true); + + //rod extraction fields + for(byte i = 0; i < 2; i++) { + this.fields[i] = new GuiTextField(this.fontRendererObj, guiLeft + 35 + 30 * i, guiTop + 38, 26, 7); + this.fields[i].setTextColor(0x08FF00); + this.fields[i].setDisabledTextColour(-1); + this.fields[i].setEnableBackgroundDrawing(false); + + this.fields[i].setMaxStringLength(3); + } + + //heat fields + for(byte i = 0; i < 2; i++) { + this.fields[i + 2] = new GuiTextField(this.fontRendererObj, guiLeft + 35 + 30 * i, guiTop + 49, 26, 7); + this.fields[i + 2].setTextColor(0x08FF00); + this.fields[i + 2].setDisabledTextColour(-1); + this.fields[i + 2].setEnableBackgroundDrawing(false); + + this.fields[i + 2].setMaxStringLength(4); + } + + this.fields[0].setText(String.valueOf((int)control.levelUpper)); + this.fields[1].setText(String.valueOf((int)control.levelLower)); + this.fields[2].setText(String.valueOf((int)control.heatUpper / 50)); + this.fields[3].setText(String.valueOf((int)control.heatLower / 50)); + } + + @Override public void drawScreen(int mouseX, int mouseY, float f) { super.drawScreen(mouseX, mouseY, f); - - this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 80, guiTop + 34, 88, 4, new String[] { "Fuel: " + control.fuel + "%" }); - this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 80, guiTop + 40, 88, 4, new String[] { "Water: " + control.water + "/" + control.maxWater + "mB" }); - this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 80, guiTop + 46, 88, 4, new String[] { "Coolant: " + control.cool + "/" + control.maxCool + "mB" }); - - this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 7, guiTop + 16, 18, 18, new String[] { "Reactor Status: " + (control.isOn ? "ON" : "OFF") }); - this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 43, guiTop + 16, 18, 18, new String[] { "Automatic Shutdown: " + (control.auto ? "ENABLED" : "DISABLED") }); - - if(!control.isLinked) { - this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 79, guiTop + 16, 18, 18, new String[] { "Reactor link not found!" }); - } - - if(control.water < control.maxWater * 0.1) { - this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 79 + 18, guiTop + 16, 18, 18, new String[] { "Water level low!" }); - } - - if(control.cool < control.maxCool * 0.1) { - this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 79 + 18 * 2, guiTop + 16, 18, 18, new String[] { "Coolant level low!" }); - } - - if(control.steam > control.maxSteam * 0.95) { - this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 79 + 18 * 3, guiTop + 16, 18, 18, new String[] { "Steam buffer full!" }); - } - - if(control.coreHeat > (50000 * 0.85)) { - this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 79 + 18 * 4, guiTop + 16, 18, 18, new String[] { "CORE TEMPERATURE CRITICAL!!" }); - } - - String s = ""; - switch(control.compression) { - case 0: s = "Steam"; break; - case 1: s = "Dense Steam"; break; - case 2: s = "Super Dense Steam"; break; - } - this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 80, guiTop + 52, 88, 4, new String[] { s + ": " + control.steam + "/" + control.maxSteam + "mB" }); - - this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 80, guiTop + 58, 88, 4, new String[] { "Hull Heat: " + Math.round((control.hullHeat) * 0.00001 * 980 + 20) + "°C" }); - this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 80, guiTop + 64, 88, 4, new String[] { "Core Heat: " + Math.round((control.coreHeat) * 0.00002 * 980 + 20) + "°C" }); } protected void mouseClicked(int x, int y, int i) { super.mouseClicked(x, y, i); + + for(int j = 0; j < 4; j++) { + this.fields[j].mouseClicked(x, y, i); + } - if(guiLeft + 7 <= x && guiLeft + 7 + 18 > x && guiTop + 16 < y && guiTop + 16 + 18 >= y) { - + if(guiLeft + 33 <= x && guiLeft + 33 + 58 > x && guiTop + 59 < y && guiTop + 59 + 10 >= y) { + mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F)); - PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(control.xCoord, control.yCoord, control.zCoord, control.isOn ? 0 : 1, 0)); - } + NBTTagCompound data = new NBTTagCompound(); + + double[] vals = new double[] {0D ,0D, 0D, 0D}; + + for(int k = 0; k < 4; k++) { + + double clamp = k < 2 ? 100 : 1000; + int mod = k < 2 ? 1 : 50; + + if(NumberUtils.isDigits(fields[k].getText())) { + int j = (int)MathHelper.clamp_double(Double.parseDouble(fields[k].getText()), 0, clamp); + fields[k].setText(j + ""); + vals[k] = j * mod; + } else { + fields[k].setText("0"); + } + } + + data.setDouble("levelUpper", vals[0]); + data.setDouble("levelLower", vals[1]); + data.setDouble("heatUpper", vals[2]); + data.setDouble("heatLower", vals[3]); + + PacketDispatcher.wrapper.sendToServer(new NBTControlPacket(data, control.xCoord, control.yCoord, control.zCoord)); + } - if(guiLeft + 43 <= x && guiLeft + 43 + 18 > x && guiTop + 16 < y && guiTop + 16 + 18 >= y) { - - mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F)); - PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(control.xCoord, control.yCoord, control.zCoord, control.auto ? 0 : 1, 1)); - } - - if(guiLeft + 63 <= x && guiLeft + 63 + 14 > x && guiTop + 52 < y && guiTop + 52 + 18 >= y) { - - mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F)); - PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(control.xCoord, control.yCoord, control.zCoord, (control.compression + 1) % 3, 2)); - } + for(int k = 0; k < 3; k++) { + if(guiLeft + 7 <= x && guiLeft + 7 + 22 > x && guiTop + 37 + k * 11 < y && guiTop + 37 + 10 + k * 11 >= y) { + + mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F)); + NBTTagCompound data = new NBTTagCompound(); + data.setInteger("function", k); + PacketDispatcher.wrapper.sendToServer(new NBTControlPacket(data, control.xCoord, control.yCoord, control.zCoord)); + } + } } @Override - protected void drawGuiContainerForegroundLayer( int i, int j) { + protected void drawGuiContainerForegroundLayer(int i, int j) { String name = this.control.hasCustomInventoryName() ? this.control.getInventoryName() : I18n.format(this.control.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); - - this.fontRendererObj.drawString("Rods: " + control.rods + "%", 8, 40, 4210752); } @Override @@ -111,155 +147,41 @@ public class GUIReactorControl extends GuiInfoContainer { Minecraft.getMinecraft().getTextureManager().bindTexture(texture); drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); - if(control.hullHeat > 0) { - int i = (control.hullHeat * 88 / 100000); - - i = (int) Math.min(i, 160); - - drawTexturedModalRect(guiLeft + 80, guiTop + 59, 0, 166, i, 4); + GL11.glPopMatrix(); + Tessellator tess = Tessellator.instance; + GL11.glDisable(GL11.GL_TEXTURE_2D); + GL11.glLineWidth(3F); + tess.startDrawing(3); + tess.setColorOpaque_I(0x08FF00); + + for(int i = 0; i < 40; i++) { + tess.addVertex(guiLeft + 128 + i, guiTop + 39 + MathHelper.clamp_double(control.getTargetLevel(control.function, i * 1250) / 100 * 28, 0, 28), this.zLevel); } - if(control.coreHeat > 0) { - int i = (control.coreHeat * 88 / 50000); - - i = (int) Math.min(i, 160); - - drawTexturedModalRect(guiLeft + 80, guiTop + 65, 0, 170, i, 4); - } + tess.draw(); + GL11.glEnable(GL11.GL_TEXTURE_2D); + GL11.glPushMatrix(); - if(control.steam > 0) { - int i = (control.steam * 88 / control.maxSteam); - - i = (int) Math.min(i, 160); - - drawTexturedModalRect(guiLeft + 80, guiTop + 53, 0, 174 + 4 * control.compression, i, 4); - } + for(byte i = 0; i < 3; i++) + displays[i].drawNumber(control.getDisplayData()[i]); - if(control.cool > 0) { - int i = (control.cool * 88 / control.maxCool); - - i = (int) Math.min(i, 160); - - drawTexturedModalRect(guiLeft + 80, guiTop + 47, 0, 194, i, 4); - } - - if(control.water > 0) { - int i = (control.water * 88 / control.maxWater); - - i = (int) Math.min(i, 160); - - drawTexturedModalRect(guiLeft + 80, guiTop + 41, 0, 190, i, 4); - } - - if(control.fuel > 0) { - int i = (control.fuel * 88 / 100); - - i = (int) Math.min(i, 160); - - drawTexturedModalRect(guiLeft + 80, guiTop + 35, 0, 186, i, 4); - } - - if(control.isOn) { - drawTexturedModalRect(guiLeft + 7, guiTop + 16, 218, 0, 18, 18); - } - - if(control.auto) { - drawTexturedModalRect(guiLeft + 43, guiTop + 16, 236, 0, 18, 18); - } - - drawTexturedModalRect(guiLeft + 63, guiTop + 52, 176 + 14 * control.compression, 0, 14, 18); - - if(!control.isLinked) { - drawTexturedModalRect(guiLeft + 79, guiTop + 16, 88, 166, 18, 18); - } - - if(control.water < control.maxWater * 0.1) { - drawTexturedModalRect(guiLeft + 79 + 18, guiTop + 16, 88 + 18, 166, 18, 18); - } - - if(control.cool < control.maxCool * 0.1) { - drawTexturedModalRect(guiLeft + 79 + 18 * 2, guiTop + 16, 88 + 18 * 2, 166, 18, 18); - } - - if(control.steam > control.maxSteam * 0.95) { - drawTexturedModalRect(guiLeft + 79 + 18 * 3, guiTop + 16, 88 + 18 * 3, 166, 18, 18); - } - - if(control.coreHeat > (50000 * 0.85)) { - drawTexturedModalRect(guiLeft + 79 + 18 * 4, guiTop + 16, 88 + 18 * 4, 166, 18, 18); - } - - if(control.rods == control.maxRods && control.rods != 0) { - drawTexturedModalRect(guiLeft + 25, guiTop + 16, 176, 18, 18, 18); - } else if(control.rods > 0) { - drawTexturedModalRect(guiLeft + 25, guiTop + 16, 194, 18, 18, 18); - } + for(int i = 0; i < 4; i++) + this.fields[i].drawTextBox(); } - protected void keyTyped(char ch, int i) - { - super.keyTyped(ch, i); - - switch(ch) { - case '0': - mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F)); - PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(control.xCoord, control.yCoord, control.zCoord, 0, 0)); break; - case '1': - mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F)); - PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(control.xCoord, control.yCoord, control.zCoord, 10, 0)); break; - case '2': - mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F)); - PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(control.xCoord, control.yCoord, control.zCoord, 20, 0)); break; - case '3': - mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F)); - PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(control.xCoord, control.yCoord, control.zCoord, 30, 0)); break; - case '4': - mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F)); - PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(control.xCoord, control.yCoord, control.zCoord, 40, 0)); break; - case '5': - mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F)); - PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(control.xCoord, control.yCoord, control.zCoord, 50, 0)); break; - case '6': - mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F)); - PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(control.xCoord, control.yCoord, control.zCoord, 60, 0)); break; - case '7': - mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F)); - PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(control.xCoord, control.yCoord, control.zCoord, 70, 0)); break; - case '8': - mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F)); - PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(control.xCoord, control.yCoord, control.zCoord, 80, 0)); break; - case '9': - mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F)); - PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(control.xCoord, control.yCoord, control.zCoord, 90, 0)); break; - } - - } - - public void handleMouseInput() - { - super.handleMouseInput(); - int i = Mouse.getEventDWheel(); - - if(i != 0) { - if (i > 0) - { - i = 1; - } - - if (i < 0) - { - i = -1; - } - - int rods = control.rods + i; - - if(rods < 0) - rods = 0; - - if(rods > 100) - rods = 100; - - PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(control.xCoord, control.yCoord, control.zCoord, rods, 0)); - } - } + @Override + protected void keyTyped(char c, int i) { + + for(byte j = 0; j < 4; j++) { + if(this.fields[j].textboxKeyTyped(c, i)) + return; + } + + if(i == 1 || i == this.mc.gameSettings.keyBindInventory.getKeyCode()) { + this.mc.thePlayer.closeScreen(); + return; + } + + super.keyTyped(c, i); + } } diff --git a/src/main/java/com/hbm/inventory/gui/GUIReactorResearch.java b/src/main/java/com/hbm/inventory/gui/GUIReactorResearch.java new file mode 100644 index 000000000..bb5ca372a --- /dev/null +++ b/src/main/java/com/hbm/inventory/gui/GUIReactorResearch.java @@ -0,0 +1,158 @@ +package com.hbm.inventory.gui; + +import org.apache.commons.lang3.math.NumberUtils; +import org.lwjgl.input.Keyboard; +import org.lwjgl.opengl.GL11; + +import com.hbm.inventory.FluidTank; +import com.hbm.inventory.container.ContainerReactorResearch; +import com.hbm.lib.RefStrings; +import com.hbm.packet.NBTControlPacket; +import com.hbm.packet.PacketDispatcher; +import com.hbm.tileentity.machine.TileEntityReactorResearch; +import net.minecraft.client.Minecraft; +import net.minecraft.client.audio.PositionedSoundRecord; +import net.minecraft.client.gui.GuiTextField; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.MathHelper; +import net.minecraft.util.ResourceLocation; + +public class GUIReactorResearch extends GuiInfoContainer { + + private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/reactors/gui_research_reactor.png"); + private TileEntityReactorResearch reactor; + private final NumberDisplay[] displays = new NumberDisplay[3]; + byte timer; + + private GuiTextField field; + + public GUIReactorResearch(InventoryPlayer invPlayer, TileEntityReactorResearch te) { + super(new ContainerReactorResearch(invPlayer, te)); + reactor = te; + this.xSize = 176; + this.ySize = 222; + displays[0] = new NumberDisplay(14, 25, 0x08FF00).setDigitLength(4); + displays[1] = new NumberDisplay(12, 63, 0x08FF00).setDigitLength(3); + displays[2] = new NumberDisplay(5, 101, 0x08FF00).setDigitLength(3); + } + + @Override + public void initGui() { + super.initGui(); + + this.guiLeft = (this.width - this.xSize) / 2; + this.guiTop = (this.height - this.ySize) / 2; + + Keyboard.enableRepeatEvents(true); + + this.field = new GuiTextField(this.fontRendererObj, guiLeft + 8, guiTop + 99, 33, 16); + this.field.setEnableBackgroundDrawing(false); + this.field.setMaxStringLength(3); + + //this.field.setText((int) (reactor.level * 100) + ""); + } + + @Override + public void drawScreen(int mouseX, int mouseY, float f) { + super.drawScreen(mouseX, mouseY, f); + + String[] text = new String[] { + "The reactor has to be submerged", + "in water on its sides to cool.", + "The neutron flux is provided to", + "adjacent breeding reactors." + }; + this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 14, guiTop + 23, 16, 16, guiLeft - 6, guiTop + 23 + 16, text); + } + + @Override + protected void drawGuiContainerForegroundLayer(int i, int j) { + String name = this.reactor.hasCustomInventoryName() ? this.reactor.getInventoryName() : I18n.format(this.reactor.getInventoryName()); + final String[] labels = { "Flux", "Heat", "Control" }; + + this.fontRendererObj.drawString(name, 121 - this.fontRendererObj.getStringWidth(name) / 2, 6, 15066597); + this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752); + this.fontRendererObj.drawString(labels[0], 6, 13, 15066597); + this.fontRendererObj.drawString(labels[1], 6, 51, 15066597); + this.fontRendererObj.drawString(labels[2], 6, 89, 15066597); + } + + protected void mouseClicked(int mouseX, int mouseY, int i) { + super.mouseClicked(mouseX, mouseY, i); + this.field.mouseClicked(mouseX, mouseY, i); + + if(guiLeft + 44 <= mouseX && guiLeft + 44 + 11 > mouseX && guiTop + 97 < mouseY && guiTop + 97 + 20 >= mouseY) { + + double level; + + if(NumberUtils.isNumber(field.getText())) { + int j = (int)MathHelper.clamp_double(Double.parseDouble(field.getText()), 0, 100); + field.setText(j + ""); + level = j * 0.01D; + } else { + return; + } + + NBTTagCompound control = new NBTTagCompound(); + control.setDouble("level", level); + timer = 15; + + PacketDispatcher.wrapper.sendToServer(new NBTControlPacket(control, reactor.xCoord, reactor.yCoord, reactor.zCoord)); + mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("hbm:block.rbmk_az5_cover"), 0.5F)); + } + } + + @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); + Minecraft.getMinecraft().getTextureManager().bindTexture(texture); + + drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); + + if(reactor.level <= 0.5D) { + for(int x = 0; x < 3; x++) + for(int y = 0; y < 3; y++) + drawTexturedModalRect(guiLeft + 81 + 36 * x, guiTop + 26 + 36 * y, 176, 0, 8, 8); + for(int x = 0; x < 2; x++) + for(int y = 0; y < 2; y++) + drawTexturedModalRect(guiLeft + 99 + 36 * x, guiTop + 44 + 36 * y, 176, 0, 8, 8); + } + + if(timer > 0) { + drawTexturedModalRect(guiLeft + 44, guiTop + 97, 176, 8, 11, 20); + timer--; + } + + for(byte i = 0; i < 2; i++) + displays[i].drawNumber(reactor.getDisplayData()[i]); + + if(NumberUtils.isDigits(field.getText())) { + int level = (int)MathHelper.clamp_double(Double.parseDouble(field.getText()), 0, 100); + field.setText(level + ""); + displays[2].drawNumber(level); + } else { + field.setText(0 + ""); + displays[2].drawNumber(0); + } + + this.drawInfoPanel(guiLeft - 14, guiTop + 23, 16, 16, 3); + + } + + @Override + protected void keyTyped(char c, int i) { + + if(this.field.textboxKeyTyped(c, i)) + return; + + if(i == 1 || i == this.mc.gameSettings.keyBindInventory.getKeyCode()) { + this.mc.thePlayer.closeScreen(); + return; + } + + super.keyTyped(c, i); + } +} diff --git a/src/main/java/com/hbm/inventory/gui/GUIReactorZirnox.java b/src/main/java/com/hbm/inventory/gui/GUIReactorZirnox.java index 05fe1f7a4..a85f81984 100644 --- a/src/main/java/com/hbm/inventory/gui/GUIReactorZirnox.java +++ b/src/main/java/com/hbm/inventory/gui/GUIReactorZirnox.java @@ -5,6 +5,7 @@ import org.lwjgl.opengl.GL11; import com.hbm.inventory.container.ContainerReactorZirnox; import com.hbm.lib.RefStrings; import com.hbm.packet.AuxButtonPacket; +import com.hbm.packet.NBTControlPacket; import com.hbm.packet.PacketDispatcher; import com.hbm.tileentity.machine.TileEntityReactorZirnox; @@ -12,6 +13,7 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.audio.PositionedSoundRecord; import net.minecraft.client.resources.I18n; import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.ResourceLocation; public class GUIReactorZirnox extends GuiInfoContainer { @@ -62,18 +64,23 @@ public class GUIReactorZirnox extends GuiInfoContainer { protected void mouseClicked(int x, int y, int i) { super.mouseClicked(x, y, i); + + NBTTagCompound control = new NBTTagCompound(); + if(guiLeft + 144 <= x && guiLeft + 144 + 14 > x && guiTop + 35 < y && guiTop + 35 + 14 >= y) { - - mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F)); - PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(zirnox.xCoord, zirnox.yCoord, zirnox.zCoord, 0, 0)); + control.setBoolean("control", true); + + PacketDispatcher.wrapper.sendToServer(new NBTControlPacket(control, zirnox.xCoord, zirnox.yCoord, zirnox.zCoord)); + mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("hbm:block.rbmk_az5_cover"), 0.5F)); } if(guiLeft + 151 <= x && guiLeft + 151 + 36 > x && guiTop + 51 < y && guiTop + 51 + 36 >= y) { - - mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F)); - PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(zirnox.xCoord, zirnox.yCoord, zirnox.zCoord, 0, 1)); - } + control.setBoolean("vent", true); //sus impostre like amogus + + PacketDispatcher.wrapper.sendToServer(new NBTControlPacket(control, zirnox.xCoord, zirnox.yCoord, zirnox.zCoord)); + mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("hbm:block.rbmk_az5_cover"), 0.5F)); + } } @Override diff --git a/src/main/java/com/hbm/inventory/gui/GuiInfoContainer.java b/src/main/java/com/hbm/inventory/gui/GuiInfoContainer.java index c408ef126..73a28534d 100644 --- a/src/main/java/com/hbm/inventory/gui/GuiInfoContainer.java +++ b/src/main/java/com/hbm/inventory/gui/GuiInfoContainer.java @@ -1,18 +1,29 @@ package com.hbm.inventory.gui; +import java.awt.Color; +import java.math.BigDecimal; +import java.math.RoundingMode; import java.util.Arrays; +import javax.annotation.Nonnegative; + +import org.lwjgl.opengl.GL11; + +import com.google.common.annotations.Beta; import com.hbm.lib.Library; import com.hbm.lib.RefStrings; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.Tessellator; import net.minecraft.inventory.Container; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.MathHelper; import net.minecraft.util.ResourceLocation; public abstract class GuiInfoContainer extends GuiContainer { - ResourceLocation guiUtil = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_utility.png"); + static final ResourceLocation guiUtil = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_utility.png"); public GuiInfoContainer(Container p_i1072_1_) { super(p_i1072_1_); @@ -81,5 +92,405 @@ public abstract class GuiInfoContainer extends GuiContainer { drawTexturedModalRect(x, y, 24, 32, 16, 16); break; } } + + /** + * Seven segment style displays for GUIs, tried to be as adaptable as possible. Still has some bugs that need to be ironed out but it works for the most part. + * @author UFFR + * + */ + @Beta + public class NumberDisplay + { + /** The display's X coordinate **/ + private int displayX; + /** The display's Y coordinate **/ + private int displayY; + /** The display's color, in hexadecimal **/ + private int color; + /** The amount of padding between digits, default 3 **/ + @Nonnegative + private byte padding = 3; + /** Does it blink or not, default false, not yet used **/ + private boolean blink = false; + /** Max number the display can handle **/ + private float maxNum; + /** Min number the display can handle **/ + private float minNum; + private boolean customBounds = false; + // Should it be a decimal number? + private boolean isFloat = false; + // How many trailing zeros? + private byte floatPad = 1; + /** Does it pad out with zeros **/ + private boolean pads = false; + /** Max number of digits the display has, default 3 **/ + @Nonnegative + private byte digitLength = 3; + private Number numIn = 0; + private char[] toDisp = {'0', '0', '0'}; + @Nonnegative + private short dispOffset = 0; + /** + * Construct a new number display + * @param dX X coordinate of the display + * @param dY Y coordinate of the display + * @param c Enum Color to use, invalid enums will default to yellow + */ + public NumberDisplay(int x, int y, EnumChatFormatting c) + { + this(x, y); + setColor(enumToColor(c)); + } + /** + * Construct a new number display + * @param x X coordinate of the display + * @param y Y coordinate of the display + * @param color Color to use, valid hexadecimal value required + */ + public NumberDisplay(int x, int y, int color) + { + this(x, y); + setColor(color); + } + /** + * Construct a new number display, color is yellow + * @param x X coordinate of the display + * @param y Y coordinate of the display + */ + public NumberDisplay(int x, int y) + { + displayX = x; + displayY = y; + setColor(0xFFFF55); + } + /** + * Returns a hexadecimal from EnumChatFormatting + * @param c Color to use + * @return + */ + private int enumToColor(EnumChatFormatting c) + { + int hex; + if(c.isColor()) + switch(c) + { + case AQUA: + return 0x55FFFF; + case BLACK: + return 0x000000; + case BLUE: + return 0x5555FF; + case DARK_AQUA: + return 0x00AAAA; + case DARK_BLUE: + return 0x0000AA; + case DARK_GRAY: + return 0x555555; + case DARK_GREEN: + return 0x00AA00; + case DARK_PURPLE: + return 0xAA00AA; + case DARK_RED: + return 0xAA0000; + case GOLD: + return 0xFFAA00; + case GRAY: + return 0xAAAAAA; + case GREEN: + return 0x55FF55; + case LIGHT_PURPLE: + return 0xFF55FF; + case RED: + return 0xFF5555; + case WHITE: + return 0xFFFFFF; + case YELLOW: + return 0xFFFF55; + default: + } + + return 0xFFFF55; + } + /** + * Sets color + * @param color - The color in hexadecimal + **/ + public void setColor(int color) { + this.color = color; + } + /** + * Draw custom number + * @param num - The char array that has the number + */ + public void drawNumber(char[] num) + { + if (blink && !Library.getBlink()) + return; + + short gap = (short) (digitLength - num.length); + for (int i = 0; i < num.length; i++) + { + if (num[i] == '.') + gap--; + dispOffset = (short) ((padding + 6) * (i + gap)); + drawChar(num[i]); + } + if (pads) + padOut(gap); + } + /** Draw the previously provided number **/ + public void drawNumber() + { + if (isFloat) + formatForFloat(); + drawNumber(toDisp); + } + public void drawNumber(Number num) + { + setNumber(num); + drawNumber(); + } + private void padOut(short gap) + { + if (gap == 0) + return; + for (int i = 0; i < gap; i++) + { + dispOffset = (short) ((padding + 6) * i); + drawChar('0'); + } + } + + /** Draw a single character (requires dispOffset to be set) **/ + public void drawChar(char num) + { + switch (num) + { + case '1': + drawVertical(1, 0); + drawVertical(1, 1); + break; + case '2': + drawHorizontal(0); + drawVertical(1, 0); + drawHorizontal(1); + drawVertical(0, 1); + drawHorizontal(2); + break; + case '3': + drawHorizontal(0); + drawHorizontal(1); + drawHorizontal(2); + drawVertical(1, 0); + drawVertical(1, 1); + break; + case '4': + drawVertical(0, 0); + drawVertical(1, 0); + drawVertical(1, 1); + drawHorizontal(1); + break; + case '5': + drawHorizontal(0); + drawHorizontal(1); + drawHorizontal(2); + drawVertical(0, 0); + drawVertical(1, 1); + break; + case '6': + drawHorizontal(0); + drawHorizontal(1); + drawHorizontal(2); + drawVertical(0, 0); + drawVertical(0, 1); + drawVertical(1, 1); + break; + case '7': + drawHorizontal(0); + drawVertical(1, 0); + drawVertical(1, 1); + break; + case '8': + drawHorizontal(0); + drawHorizontal(1); + drawHorizontal(2); + drawVertical(0, 0); + drawVertical(1, 0); + drawVertical(0, 1); + drawVertical(1, 1); + break; + case '9': + drawHorizontal(0); + drawHorizontal(1); + drawHorizontal(2); + drawVertical(0, 0); + drawVertical(1, 0); + drawVertical(1, 1); + break; + case '0': + drawHorizontal(0); + drawHorizontal(2); + drawVertical(0, 0); + drawVertical(0, 1); + drawVertical(1, 0); + drawVertical(1, 1); + break; + case '-': + drawHorizontal(1); + break; + case '.': + drawPeriod(); + break; + case 'E': + default: + drawHorizontal(0); + drawHorizontal(1); + drawHorizontal(2); + drawVertical(0, 0); + drawVertical(0, 1); + break; + } + } + + private void drawHorizontal(int pos) + { + byte offset = (byte) (pos * 6); + renderSegment(guiLeft + displayX + dispOffset + 1, guiTop + displayY + offset, 4, 1); + } + + private void drawPeriod() + { + renderSegment(guiLeft + displayX + dispOffset + padding - (int) Math.ceil(padding / 2) + 5, guiTop + displayY + 12, 1, 1); + } + + private void drawVertical(int posX, int posY) + { + byte offsetX = (byte) (posX * 5); + byte offsetY = (byte) (posY * 6); + renderSegment(guiLeft + displayX + offsetX + dispOffset, guiTop + displayY + offsetY + 1, 1, 5); + } + /** + * drawTexturedModalRect() for cool kids + * @param renX X coordinate to render the part + * @param renY Y coordinate to render the part + * @param width Relevant for horizontals + * @param height Relevant for verticals + */ + private void renderSegment(int renX, int renY, int width, int height) + { + final Tessellator tess = Tessellator.instance; + final float z = GuiInfoContainer.this.zLevel; + + GL11.glDisable(GL11.GL_TEXTURE_2D); + tess.startDrawingQuads(); + tess.setColorOpaque_I(color); + tess.addVertex(renX, renY + height, z); + tess.addVertex(renX + width, renY + height, z); + tess.addVertex(renX + width, renY + 0, z); + tess.addVertex(renX, renY, z); + tess.draw(); + GL11.glEnable(GL11.GL_TEXTURE_2D); + } + public void setNumber(Number num) + { + numIn = num; + if (customBounds) + numIn = MathHelper.clamp_double(num.doubleValue(), minNum, maxNum); + if (isFloat) + formatForFloat(); + else + { + toDisp = new Long(Math.round(numIn.doubleValue())).toString().toCharArray(); + toDisp = truncOrExpand(); + } + } + /** Get the set number **/ + public Number getNumber() + { + return numIn; + } + /** Get the char array for display **/ + public char[] getDispNumber() + { + return toDisp.clone(); + } + /** Make the display blink **/ + public NumberDisplay setBlinks() + { + blink = true; + return this; + } + /** Padding between digits, default 3 **/ + public NumberDisplay setPadding(@Nonnegative int p) + { + padding = (byte) p; + return this; + } + /** Max number of digits **/ + public NumberDisplay setDigitLength(@Nonnegative int l) + { + digitLength = (byte) l; + toDisp = truncOrExpand(); + return this; + } + /** Set custom number bounds **/ + public NumberDisplay setMaxMin(float max, float min) + { + if (min > max) + throw new IllegalArgumentException("Minimum value is larger than maximum value!"); + maxNum = max; + minNum = min; + customBounds = true; + return this; + } + /** Pad out the left side of the number with zeros **/ + public NumberDisplay setPadNumber() + { + pads = true; + return this; + } + /** Set the number to be a decimal, default zero trailing is 1 **/ + public NumberDisplay setFloat() + { + return setFloat(1); + } + /** Set the number to be a decimal with specified zero trailing **/ + public NumberDisplay setFloat(@Nonnegative int pad) + { + floatPad = (byte) pad; + isFloat = true; + + formatForFloat(); + + return this; + } + private void formatForFloat() + { + BigDecimal bd = new BigDecimal(numIn.toString()); + bd = bd.setScale(floatPad, RoundingMode.HALF_UP); + +// char[] proc = new Double(bd.doubleValue()).toString().toCharArray(); + char[] proc = bd.toString().toCharArray(); + proc = Double.valueOf(Library.roundDecimal(numIn.doubleValue(), floatPad)).toString().toCharArray(); + + if (proc.length == digitLength) + toDisp = proc; + else + toDisp = truncOrExpand(); + } + @Beta + private char[] truncOrExpand() + { + if (isFloat) + { + char[] out = Arrays.copyOf(toDisp, digitLength); + for (int i = 0; i < digitLength; i++) + if (out[i] == '\u0000') + out[i] = '0'; + return out.clone(); + } + return toDisp; + } + } } diff --git a/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java b/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java index d56a8b622..bccb60632 100644 --- a/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java @@ -190,14 +190,14 @@ public class AssemblerRecipes { makeRecipe(new ComparableStack(ModItems.thruster_small, 1), new AStack[] {new OreDictStack(STEEL.plate(), 2), new ComparableStack(ModItems.hull_small_steel, 2), new ComparableStack(ModItems.wire_aluminium, 4), },100); makeRecipe(new ComparableStack(ModItems.thruster_medium, 1), new AStack[] {new ComparableStack(ModItems.thruster_small, 1), new OreDictStack(STEEL.plate(), 2), new ComparableStack(ModItems.hull_small_steel, 1), new ComparableStack(ModItems.hull_big_steel, 1), new ComparableStack(ModItems.wire_copper, 4), },150); makeRecipe(new ComparableStack(ModItems.thruster_large, 1), new AStack[] {new ComparableStack(ModItems.thruster_medium, 1), new OreDictStack(STEEL.plate(), 4), new ComparableStack(ModItems.hull_big_steel, 2), new ComparableStack(ModItems.wire_red_copper, 4), },200); - makeRecipe(new ComparableStack(ModItems.thruster_nuclear, 1), new AStack[] {new ComparableStack(ModItems.thruster_large, 1), new ComparableStack(ModItems.tank_steel, 2), new ComparableStack(ModBlocks.deco_pipe_quad, 3), new ComparableStack(ModItems.board_copper, 6), new ComparableStack(ModItems.motor, 1), new ComparableStack(ModItems.circuit_targeting_tier4, 2), new ComparableStack(ModBlocks.machine_reactor_small, 1), },600); + makeRecipe(new ComparableStack(ModItems.thruster_nuclear, 1), new AStack[] {new ComparableStack(ModItems.thruster_large, 1), new ComparableStack(ModItems.tank_steel, 2), new ComparableStack(ModBlocks.deco_pipe_quad, 3), new ComparableStack(ModItems.board_copper, 6), new ComparableStack(ModItems.motor, 1), new ComparableStack(ModItems.circuit_targeting_tier4, 2), new ComparableStack(ModBlocks.reactor_research, 1), },600); makeRecipe(new ComparableStack(ModItems.sat_base, 1), new AStack[] {new ComparableStack(ModItems.thruster_large, 1), new OreDictStack(STEEL.plate(), 6), new ComparableStack(ModItems.plate_desh, 4), new ComparableStack(ModItems.hull_big_titanium, 3), new ComparableStack(ModItems.fluid_barrel_full, 1, FluidType.KEROSENE.ordinal()), new ComparableStack(ModItems.photo_panel, 24), new ComparableStack(ModItems.board_copper, 12), new ComparableStack(ModItems.circuit_gold, 6), new ComparableStack(ModItems.battery_lithium_cell_6, 1), },500); makeRecipe(new ComparableStack(ModItems.sat_head_mapper, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 4), new OreDictStack(STEEL.plate(), 6), new ComparableStack(ModItems.hull_small_steel, 3), new ComparableStack(ModItems.plate_desh, 2), new ComparableStack(ModItems.circuit_gold, 2), new ComparableStack(ModItems.plate_polymer, 12), new OreDictStack(REDSTONE.dust(), 6), new ComparableStack(Items.diamond, 1), new ComparableStack(Blocks.glass_pane, 6), },400); makeRecipe(new ComparableStack(ModItems.sat_head_scanner, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 6), new OreDictStack(TI.plate(), 32), new ComparableStack(ModItems.plate_desh, 6), new ComparableStack(ModItems.magnetron, 6), new ComparableStack(ModItems.coil_advanced_torus, 2), new ComparableStack(ModItems.circuit_gold, 6), new ComparableStack(ModItems.plate_polymer, 6), new ComparableStack(Items.diamond, 1), },400); 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); @@ -209,10 +209,11 @@ public class AssemblerRecipes { makeRecipe(new ComparableStack(ModItems.circuit_aluminium, 1), new AStack[] {new ComparableStack(ModItems.circuit_raw, 1), },50); makeRecipe(new ComparableStack(ModItems.circuit_copper, 1), new AStack[] {new ComparableStack(ModItems.circuit_aluminium, 1), new ComparableStack(ModItems.wire_copper, 4), new OreDictStack(NETHERQUARTZ.dust(), 1), new OreDictStack(CU.plate(), 1), },100); makeRecipe(new ComparableStack(ModItems.circuit_red_copper, 1), new AStack[] {new ComparableStack(ModItems.circuit_copper, 1), new ComparableStack(ModItems.wire_red_copper, 4), new OreDictStack(GOLD.dust(), 1), new ComparableStack(ModItems.plate_polymer, 1), },150); + makeRecipe(new ComparableStack(ModItems.crt_display, 8), new AStack[] {new OreDictStack(AL.dust(), 2), new ComparableStack(Blocks.glass_pane, 2), new ComparableStack(ModItems.wire_tungsten, 4), new ComparableStack(ModItems.hull_small_steel, 1) }, 100); makeRecipe(new ComparableStack(ModItems.tritium_deuterium_cake, 1), new AStack[] {new ComparableStack(ModItems.cell_deuterium, 6), new ComparableStack(ModItems.cell_tritium, 2), new OreDictStack(LI.ingot(), 4), },150); makeRecipe(new ComparableStack(ModItems.pellet_cluster, 1), new AStack[] {new OreDictStack(STEEL.plate(), 4), new ComparableStack(Blocks.tnt, 1), }, 50); makeRecipe(new ComparableStack(ModItems.pellet_buckshot, 1), new AStack[] {new OreDictStack(PB.nugget(), 6), }, 50); - makeRecipe(new ComparableStack(ModItems.australium_iii, 1), new AStack[] {new ComparableStack(ModItems.rod_australium, 1), new OreDictStack(STEEL.ingot(), 1), new OreDictStack(STEEL.plate(), 6), new OreDictStack(CU.plate(), 2), new ComparableStack(ModItems.wire_copper, 6), },150); + makeRecipe(new ComparableStack(ModItems.australium_iii, 1), new AStack[] {new ComparableStack(ModItems.nugget_australium, 6), new OreDictStack(STEEL.ingot(), 1), new OreDictStack(STEEL.plate(), 6), new OreDictStack(CU.plate(), 2), new ComparableStack(ModItems.wire_copper, 6), },150); makeRecipe(new ComparableStack(ModItems.magnetron, 1), new AStack[] {new OreDictStack(ALLOY.ingot(), 1), new OreDictStack(ALLOY.plate(), 2), new ComparableStack(ModItems.wire_tungsten, 1), new ComparableStack(ModItems.coil_tungsten, 1), },100); makeRecipe(new ComparableStack(ModItems.pellet_schrabidium, 1), new AStack[] {new OreDictStack(SA326.ingot(), 5), new OreDictStack(IRON.plate(), 2), }, 200); makeRecipe(new ComparableStack(ModItems.pellet_hes, 1), new AStack[] {new ComparableStack(ModItems.ingot_hes, 5), new OreDictStack(IRON.plate(), 2), }, 200); @@ -388,7 +389,7 @@ public class AssemblerRecipes { makeRecipe(new ComparableStack(ModBlocks.ams_limiter, 1), new AStack[] {new ComparableStack(ModItems.board_copper, 6), new OreDictStack(STEEL.plate(), 24), new ComparableStack(ModBlocks.steel_scaffold, 20), new ComparableStack(ModItems.crystal_diamond, 1)}, 600); makeRecipe(new ComparableStack(ModBlocks.ams_emitter, 1), new AStack[] {new ComparableStack(ModItems.board_copper, 24), new OreDictStack(STEEL.plate(), 32), new ComparableStack(ModBlocks.steel_scaffold, 40), new ComparableStack(ModItems.crystal_redstone, 5), new ComparableStack(ModBlocks.machine_lithium_battery)}, 600); makeRecipe(new ComparableStack(ModBlocks.ams_base, 1), new AStack[] {new ComparableStack(ModItems.board_copper, 12), new OreDictStack(STEEL.plate(), 28), new ComparableStack(ModBlocks.steel_scaffold, 30), new ComparableStack(ModBlocks.steel_grate, 8), new ComparableStack(ModBlocks.barrel_steel, 2)}, 600); - makeRecipe(new ComparableStack(ModBlocks.machine_radar, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 8), new OreDictStack(STEEL.plate(), 16), new OreDictStack(POLYMER.ingot(), 4), new ComparableStack(ModItems.plate_polymer, 24), new ComparableStack(ModItems.magnetron, 10), new ComparableStack(ModItems.motor, 3), new ComparableStack(ModItems.circuit_gold, 4), new ComparableStack(ModItems.coil_copper, 12), },300); + makeRecipe(new ComparableStack(ModBlocks.machine_radar, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 8), new OreDictStack(STEEL.plate(), 16), new OreDictStack(POLYMER.ingot(), 4), new ComparableStack(ModItems.plate_polymer, 24), new ComparableStack(ModItems.magnetron, 10), new ComparableStack(ModItems.motor, 3), new ComparableStack(ModItems.circuit_gold, 4), new ComparableStack(ModItems.coil_copper, 12), new ComparableStack(ModItems.crt_display, 4), },300); makeRecipe(new ComparableStack(ModBlocks.machine_forcefield, 1), new AStack[] {new OreDictStack(ALLOY.plate(), 8), new ComparableStack(ModItems.plate_desh, 4), new ComparableStack(ModItems.coil_gold_torus, 6), new ComparableStack(ModItems.coil_magnetized_tungsten, 12), new ComparableStack(ModItems.motor, 1), new ComparableStack(ModItems.upgrade_radius, 1), new ComparableStack(ModItems.upgrade_health, 1), new ComparableStack(ModItems.circuit_targeting_tier5, 1), new ComparableStack(ModBlocks.machine_transformer, 1), },1000); makeRecipe(new ComparableStack(ModItems.mp_thruster_10_kerosene, 1), new AStack[] {new ComparableStack(ModItems.seg_10, 1), new ComparableStack(ModBlocks.deco_pipe_quad, 1), new OreDictStack(W.ingot(), 4), new OreDictStack(STEEL.plate(), 4), },100); makeRecipe(new ComparableStack(ModItems.mp_thruster_10_solid, 1), new AStack[] {new ComparableStack(ModItems.seg_10, 1), new ComparableStack(ModItems.coil_tungsten, 1), new OreDictStack(DURA.ingot(), 4), new OreDictStack(STEEL.plate(), 4), },100); @@ -639,7 +640,8 @@ public class AssemblerRecipes { new ComparableStack(ModItems.circuit_targeting_tier3, 1), new ComparableStack(ModItems.pipes_steel, 1), new ComparableStack(ModItems.mechanism_rifle_2, 1), - new ComparableStack(ModBlocks.crate_iron, 1) + new ComparableStack(ModBlocks.crate_iron, 1), + new ComparableStack(ModItems.crt_display, 1) }, 200); makeRecipe(new ComparableStack(ModBlocks.turret_friendly, 1), new AStack[] { new ComparableStack(ModBlocks.machine_battery, 1), @@ -649,7 +651,8 @@ public class AssemblerRecipes { new ComparableStack(ModItems.circuit_targeting_tier2, 1), new ComparableStack(ModItems.pipes_steel, 1), new ComparableStack(ModItems.mechanism_rifle_1, 1), - new ComparableStack(ModBlocks.crate_iron, 1) + new ComparableStack(ModBlocks.crate_iron, 1), + new ComparableStack(ModItems.crt_display, 1) }, 200); makeRecipe(new ComparableStack(ModBlocks.turret_jeremy, 1), new AStack[] { new ComparableStack(ModBlocks.machine_battery, 1), @@ -660,7 +663,8 @@ public class AssemblerRecipes { new ComparableStack(ModItems.motor_desh, 1), new ComparableStack(ModItems.hull_small_steel, 3), new ComparableStack(ModItems.mechanism_launcher_2, 1), - new ComparableStack(ModBlocks.crate_steel, 1) + new ComparableStack(ModBlocks.crate_steel, 1), + new ComparableStack(ModItems.crt_display, 1) }, 200); makeRecipe(new ComparableStack(ModBlocks.turret_tauon, 1), new AStack[] { new ComparableStack(ModBlocks.machine_lithium_battery, 1), @@ -671,7 +675,8 @@ public class AssemblerRecipes { new ComparableStack(ModItems.motor_desh, 1), new OreDictStack(CU.ingot(), 32), new ComparableStack(ModItems.mechanism_special, 1), - new ComparableStack(ModItems.battery_lithium, 1) + new ComparableStack(ModItems.battery_lithium, 1), + new ComparableStack(ModItems.crt_display, 1) }, 200); makeRecipe(new ComparableStack(ModBlocks.turret_richard, 1), new AStack[] { new ComparableStack(ModBlocks.machine_battery, 1), @@ -682,7 +687,8 @@ public class AssemblerRecipes { new OreDictStack(POLYMER.ingot(), 2), new ComparableStack(ModItems.hull_small_steel, 8), new ComparableStack(ModItems.mechanism_launcher_2, 1), - new ComparableStack(ModBlocks.crate_steel, 1) + new ComparableStack(ModBlocks.crate_steel, 1), + new ComparableStack(ModItems.crt_display, 1) }, 200); makeRecipe(new ComparableStack(ModBlocks.turret_howard, 1), new AStack[] { new ComparableStack(ModBlocks.machine_battery, 1), @@ -693,7 +699,8 @@ public class AssemblerRecipes { new ComparableStack(ModItems.circuit_targeting_tier3, 2), new ComparableStack(ModItems.pipes_steel, 2), new ComparableStack(ModItems.mechanism_rifle_2, 2), - new ComparableStack(ModBlocks.crate_steel, 1) + new ComparableStack(ModBlocks.crate_steel, 1), + new ComparableStack(ModItems.crt_display, 1) }, 200); makeRecipe(new ComparableStack(ModBlocks.turret_maxwell, 1), new AStack[] { new ComparableStack(ModBlocks.machine_lithium_battery, 1), @@ -704,7 +711,8 @@ public class AssemblerRecipes { new ComparableStack(ModItems.pipes_steel, 1), new ComparableStack(ModItems.mechanism_special, 3), new ComparableStack(ModItems.magnetron, 16), - new OreDictStack(TCALLOY.ingot(), 8) + new OreDictStack(TCALLOY.ingot(), 8), + new ComparableStack(ModItems.crt_display, 1) }, 200); makeRecipe(new ComparableStack(ModBlocks.turret_fritz, 1), new AStack[] { new ComparableStack(ModBlocks.machine_battery, 1), @@ -714,7 +722,8 @@ public class AssemblerRecipes { new ComparableStack(ModItems.circuit_targeting_tier3, 1), new ComparableStack(ModItems.pipes_steel, 1), new ComparableStack(ModItems.mechanism_launcher_1, 1), - new ComparableStack(ModBlocks.barrel_steel, 1) + new ComparableStack(ModBlocks.barrel_steel, 1), + new ComparableStack(ModItems.crt_display, 1) }, 200); makeRecipe(new ComparableStack(ModBlocks.machine_silex, 1), new AStack[] { @@ -791,8 +800,8 @@ public class AssemblerRecipes { makeRecipe(new ComparableStack(ModBlocks.reactor_conductor, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 4), new OreDictStack(CU.plate(), 12), new ComparableStack(ModItems.wire_tungsten, 4), },130); makeRecipe(new ComparableStack(ModBlocks.reactor_computer, 1), new AStack[] {new ComparableStack(ModBlocks.reactor_conductor, 2), new ComparableStack(ModItems.circuit_targeting_tier3, 4), new ComparableStack(ModItems.circuit_gold, 1), },250); makeRecipe(new ComparableStack(ModBlocks.machine_radgen, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 8), new OreDictStack(STEEL.plate(), 32), new ComparableStack(ModItems.coil_magnetized_tungsten, 6), new ComparableStack(ModItems.wire_magnetized_tungsten, 24), new ComparableStack(ModItems.circuit_gold, 4), new ComparableStack(ModItems.reactor_core, 3), new OreDictStack(STAR.ingot(), 1), new OreDictStack("dyeRed", 1), },400); - makeRecipe(new ComparableStack(ModBlocks.machine_reactor, 1), new AStack[] {new ComparableStack(ModItems.reactor_core, 1), new OreDictStack(STEEL.ingot(), 12), new OreDictStack(PB.plate(), 16), new ComparableStack(ModBlocks.reinforced_glass, 4), new OreDictStack(ASBESTOS.ingot(), 4), new OreDictStack(TCALLOY.ingot(), 4)},150); - makeRecipe(new ComparableStack(ModBlocks.machine_reactor_small, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 6), new OreDictStack(POLYMER.ingot(), 4), new OreDictStack(PB.plate(), 8), new OreDictStack(CU.plate(), 4), new OreDictStack(PB.ingot(), 12), new OreDictStack(MINGRADE.ingot(), 6), new ComparableStack(ModItems.circuit_copper, 8), new ComparableStack(ModItems.circuit_red_copper, 4), },300); + makeRecipe(new ComparableStack(ModBlocks.machine_reactor_breeding, 1), new AStack[] {new ComparableStack(ModItems.reactor_core, 1), new OreDictStack(STEEL.ingot(), 12), new OreDictStack(PB.plate(), 16), new ComparableStack(ModBlocks.reinforced_glass, 4), new OreDictStack(ASBESTOS.ingot(), 4), new OreDictStack(TCALLOY.ingot(), 4), new ComparableStack(ModItems.crt_display, 1)},150); + makeRecipe(new ComparableStack(ModBlocks.reactor_research, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 8), new OreDictStack(TCALLOY.ingot(), 4), new ComparableStack(ModItems.motor_desh, 2), new OreDictStack(B.ingot(), 5), new OreDictStack(PB.ingot(), 12), new OreDictStack(PB.plate(), 2), new OreDictStack(AL.plate(), 4), new ComparableStack(ModItems.crt_display, 3), new ComparableStack(ModItems.circuit_copper, 2), },300); } else { addTantalium(new ComparableStack(ModBlocks.machine_centrifuge, 1), 5); @@ -836,6 +845,7 @@ public class AssemblerRecipes { new ComparableStack(ModItems.plate_polymer, 16), new ComparableStack(ModItems.circuit_gold, 5), new ComparableStack(ModItems.circuit_tantalium, 20), + new ComparableStack(ModItems.crt_display, 8), }, 300); makeRecipe(new ComparableStack(ModBlocks.hadron_core, 1), new AStack[] { @@ -846,6 +856,7 @@ public class AssemblerRecipes { new ComparableStack(ModItems.circuit_gold, 5), new ComparableStack(ModItems.circuit_schrabidium, 5), new ComparableStack(ModItems.circuit_tantalium, 192), + new ComparableStack(ModItems.crt_display, 1), }, 300); makeRecipe(new ComparableStack(ModBlocks.struct_launcher_core, 1), new AStack[] { diff --git a/src/main/java/com/hbm/inventory/recipes/BreederRecipes.java b/src/main/java/com/hbm/inventory/recipes/BreederRecipes.java index e10014143..2d4af394f 100644 --- a/src/main/java/com/hbm/inventory/recipes/BreederRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/BreederRecipes.java @@ -9,6 +9,7 @@ import com.hbm.blocks.ModBlocks; import com.hbm.inventory.RecipesCommon; import com.hbm.inventory.RecipesCommon.ComparableStack; import com.hbm.items.ModItems; +import com.hbm.items.machine.ItemBreedingRod.*; import net.minecraft.init.Blocks; import net.minecraft.item.Item; @@ -18,120 +19,27 @@ import net.minecraft.util.EnumChatFormatting; public class BreederRecipes { private static HashMap recipes = new HashMap(); - private static HashMap fuels = new HashMap(); - //for the int array: [0] => level (1-4) [1] => amount of operations public static void registerRecipes() { - - //lithium and impure rods - recipes.put(new ComparableStack(ModItems.rod_lithium), new BreederRecipe(ModItems.rod_tritium, 1)); - recipes.put(new ComparableStack(ModItems.rod_dual_lithium), new BreederRecipe(ModItems.rod_dual_tritium, 1)); - recipes.put(new ComparableStack(ModItems.rod_quad_lithium), new BreederRecipe(ModItems.rod_quad_tritium, 1)); - recipes.put(new ComparableStack(ModItems.rod_uranium), new BreederRecipe(ModItems.rod_plutonium, 4)); - recipes.put(new ComparableStack(ModItems.rod_dual_uranium), new BreederRecipe(ModItems.rod_dual_plutonium, 4)); - recipes.put(new ComparableStack(ModItems.rod_quad_uranium), new BreederRecipe(ModItems.rod_quad_plutonium, 4)); - recipes.put(new ComparableStack(ModItems.rod_plutonium), new BreederRecipe(ModItems.rod_waste, 4)); - recipes.put(new ComparableStack(ModItems.rod_dual_plutonium), new BreederRecipe(ModItems.rod_dual_waste, 4)); - recipes.put(new ComparableStack(ModItems.rod_quad_plutonium), new BreederRecipe(ModItems.rod_quad_waste, 4)); - //isotopes - recipes.put(new ComparableStack(ModItems.rod_th232), new BreederRecipe(ModItems.rod_u233, 2)); - recipes.put(new ComparableStack(ModItems.rod_dual_th232), new BreederRecipe(ModItems.rod_dual_u233, 2)); - recipes.put(new ComparableStack(ModItems.rod_quad_th232), new BreederRecipe(ModItems.rod_quad_u233, 2)); - recipes.put(new ComparableStack(ModItems.rod_u233), new BreederRecipe(ModItems.rod_u235, 2)); - recipes.put(new ComparableStack(ModItems.rod_dual_u233), new BreederRecipe(ModItems.rod_dual_u235, 2)); - recipes.put(new ComparableStack(ModItems.rod_quad_u233), new BreederRecipe(ModItems.rod_quad_u235, 2)); - recipes.put(new ComparableStack(ModItems.rod_u235), new BreederRecipe(ModItems.rod_neptunium, 3)); - recipes.put(new ComparableStack(ModItems.rod_dual_u235), new BreederRecipe(ModItems.rod_dual_neptunium, 3)); - recipes.put(new ComparableStack(ModItems.rod_quad_u235), new BreederRecipe(ModItems.rod_quad_neptunium, 3)); - recipes.put(new ComparableStack(ModItems.rod_u238), new BreederRecipe(ModItems.rod_pu239, 3)); - recipes.put(new ComparableStack(ModItems.rod_dual_u238), new BreederRecipe(ModItems.rod_dual_pu239, 3)); - recipes.put(new ComparableStack(ModItems.rod_quad_u238), new BreederRecipe(ModItems.rod_quad_pu239, 3)); - recipes.put(new ComparableStack(ModItems.rod_neptunium), new BreederRecipe(ModItems.rod_pu238, 3)); - recipes.put(new ComparableStack(ModItems.rod_dual_neptunium), new BreederRecipe(ModItems.rod_dual_pu238, 3)); - recipes.put(new ComparableStack(ModItems.rod_quad_neptunium), new BreederRecipe(ModItems.rod_quad_pu238, 3)); - recipes.put(new ComparableStack(ModItems.rod_pu238), new BreederRecipe(ModItems.rod_pu239, 4)); - recipes.put(new ComparableStack(ModItems.rod_dual_pu238), new BreederRecipe(ModItems.rod_dual_pu239, 4)); - recipes.put(new ComparableStack(ModItems.rod_quad_pu238), new BreederRecipe(ModItems.rod_quad_pu239, 4)); - recipes.put(new ComparableStack(ModItems.rod_pu239), new BreederRecipe(ModItems.rod_pu240, 2)); - recipes.put(new ComparableStack(ModItems.rod_dual_pu239), new BreederRecipe(ModItems.rod_dual_pu240, 2)); - recipes.put(new ComparableStack(ModItems.rod_quad_pu239), new BreederRecipe(ModItems.rod_quad_pu240, 2)); - recipes.put(new ComparableStack(ModItems.rod_pu240), new BreederRecipe(ModItems.rod_waste, 3)); - recipes.put(new ComparableStack(ModItems.rod_dual_pu240), new BreederRecipe(ModItems.rod_dual_waste, 3)); - recipes.put(new ComparableStack(ModItems.rod_quad_pu240), new BreederRecipe(ModItems.rod_quad_waste, 3)); - - //advanced - recipes.put(new ComparableStack(ModItems.rod_schrabidium), new BreederRecipe(ModItems.rod_solinium, 3)); - recipes.put(new ComparableStack(ModItems.rod_dual_schrabidium), new BreederRecipe(ModItems.rod_dual_solinium, 3)); - recipes.put(new ComparableStack(ModItems.rod_quad_schrabidium), new BreederRecipe(ModItems.rod_quad_solinium, 3)); - recipes.put(new ComparableStack(ModItems.rod_quad_solinium), new BreederRecipe(ModItems.rod_quad_euphemium, 4)); - recipes.put(new ComparableStack(ModItems.rod_balefire), new BreederRecipe(ModItems.rod_balefire_blazing, 4)); - recipes.put(new ComparableStack(ModItems.rod_dual_balefire), new BreederRecipe(ModItems.rod_dual_balefire_blazing, 4)); - recipes.put(new ComparableStack(ModItems.rod_quad_balefire), new BreederRecipe(ModItems.rod_quad_balefire_blazing, 4)); - - //rocks - recipes.put(new ComparableStack(Blocks.stone), new BreederRecipe(new ItemStack(ModBlocks.sellafield_0), 2)); - recipes.put(new ComparableStack(ModBlocks.sellafield_0), new BreederRecipe(new ItemStack(ModBlocks.sellafield_1), 2)); - recipes.put(new ComparableStack(ModBlocks.sellafield_1), new BreederRecipe(new ItemStack(ModBlocks.sellafield_2), 3)); - recipes.put(new ComparableStack(ModBlocks.sellafield_2), new BreederRecipe(new ItemStack(ModBlocks.sellafield_3), 3)); - recipes.put(new ComparableStack(ModBlocks.sellafield_3), new BreederRecipe(new ItemStack(ModBlocks.sellafield_4), 4)); - recipes.put(new ComparableStack(ModBlocks.sellafield_4), new BreederRecipe(new ItemStack(ModBlocks.sellafield_core), 4)); + setRecipe(BreedingRodType.LITHIUM, BreedingRodType.TRITIUM, 200); + setRecipe(BreedingRodType.CO, BreedingRodType.CO60, 100); + setRecipe(BreedingRodType.TH232, BreedingRodType.THF, 500); + setRecipe(BreedingRodType.U235, BreedingRodType.NP237, 300); + setRecipe(BreedingRodType.NP237, BreedingRodType.PU238, 200); + setRecipe(BreedingRodType.PU238, BreedingRodType.PU239, 1000); + setRecipe(BreedingRodType.U238, BreedingRodType.RGP, 500); + setRecipe(BreedingRodType.URANIUM, BreedingRodType.RGP, 200); + setRecipe(BreedingRodType.RGP, BreedingRodType.WASTE, 200); - recipes.put(new ComparableStack(ModItems.meteorite_sword_etched), new BreederRecipe(new ItemStack(ModItems.meteorite_sword_bred), 4)); + recipes.put(new ComparableStack(ModItems.meteorite_sword_etched), new BreederRecipe(new ItemStack(ModItems.meteorite_sword_bred), 1000)); } - public static void registerFuels() { - fuels.put(new ComparableStack(ModItems.rod_u233), new int[] {2, 2}); - fuels.put(new ComparableStack(ModItems.rod_dual_u233), new int[] {2, 4}); - fuels.put(new ComparableStack(ModItems.rod_quad_u233), new int[] {2, 8}); - - fuels.put(new ComparableStack(ModItems.rod_u235), new int[] {2, 3}); - fuels.put(new ComparableStack(ModItems.rod_dual_u235), new int[] {2, 6}); - fuels.put(new ComparableStack(ModItems.rod_quad_u235), new int[] {2, 12}); - - fuels.put(new ComparableStack(ModItems.rod_u238), new int[] {1, 1}); - fuels.put(new ComparableStack(ModItems.rod_dual_u238), new int[] {1, 2}); - fuels.put(new ComparableStack(ModItems.rod_quad_u238), new int[] {1, 4}); - - fuels.put(new ComparableStack(ModItems.rod_neptunium), new int[] {2, 3}); - fuels.put(new ComparableStack(ModItems.rod_dual_neptunium), new int[] {2, 6}); - fuels.put(new ComparableStack(ModItems.rod_quad_neptunium), new int[] {2, 12}); - - fuels.put(new ComparableStack(ModItems.rod_pu238), new int[] {1, 2}); - fuels.put(new ComparableStack(ModItems.rod_dual_pu238), new int[] {1, 4}); - fuels.put(new ComparableStack(ModItems.rod_quad_pu238), new int[] {1, 8}); - - fuels.put(new ComparableStack(ModItems.rod_pu239), new int[] {3, 5}); - fuels.put(new ComparableStack(ModItems.rod_dual_pu239), new int[] {3, 10}); - fuels.put(new ComparableStack(ModItems.rod_quad_pu239), new int[] {3, 20}); - - fuels.put(new ComparableStack(ModItems.rod_pu240), new int[] {1, 2}); - fuels.put(new ComparableStack(ModItems.rod_dual_pu240), new int[] {1, 4}); - fuels.put(new ComparableStack(ModItems.rod_quad_pu240), new int[] {1, 8}); - - fuels.put(new ComparableStack(ModItems.rod_schrabidium), new int[] {3, 10}); - fuels.put(new ComparableStack(ModItems.rod_dual_schrabidium), new int[] {3, 20}); - fuels.put(new ComparableStack(ModItems.rod_quad_schrabidium), new int[] {3, 40}); - - fuels.put(new ComparableStack(ModItems.rod_solinium), new int[] {3, 15}); - fuels.put(new ComparableStack(ModItems.rod_dual_solinium), new int[] {3, 30}); - fuels.put(new ComparableStack(ModItems.rod_quad_solinium), new int[] {3, 60}); - - fuels.put(new ComparableStack(ModItems.rod_polonium), new int[] {4, 2}); - fuels.put(new ComparableStack(ModItems.rod_dual_polonium), new int[] {4, 4}); - fuels.put(new ComparableStack(ModItems.rod_quad_polonium), new int[] {4, 8}); - - fuels.put(new ComparableStack(ModItems.rod_tritium), new int[] {1, 1}); - fuels.put(new ComparableStack(ModItems.rod_dual_tritium), new int[] {1, 2}); - fuels.put(new ComparableStack(ModItems.rod_quad_tritium), new int[] {1, 4}); - - fuels.put(new ComparableStack(ModItems.rod_balefire), new int[] {2, 150}); - fuels.put(new ComparableStack(ModItems.rod_dual_balefire), new int[] {2, 300}); - fuels.put(new ComparableStack(ModItems.rod_quad_balefire), new int[] {2, 600}); - - fuels.put(new ComparableStack(ModItems.rod_balefire_blazing), new int[] {4, 75}); - fuels.put(new ComparableStack(ModItems.rod_dual_balefire_blazing), new int[] {4, 150}); - fuels.put(new ComparableStack(ModItems.rod_quad_balefire_blazing), new int[] {4, 300}); + /** Sets recipes for single, dual, and quad rods **/ + public static void setRecipe(BreedingRodType inputType, BreedingRodType outputType, int flux) { + recipes.put(new ComparableStack(new ItemStack(ModItems.rod, 1, inputType.ordinal())), new BreederRecipe(new ItemStack(ModItems.rod, 1, outputType.ordinal()), flux)); + recipes.put(new ComparableStack(new ItemStack(ModItems.rod_dual, 1, inputType.ordinal())), new BreederRecipe(new ItemStack(ModItems.rod_dual, 1, outputType.ordinal()), flux * 2)); + recipes.put(new ComparableStack(new ItemStack(ModItems.rod_quad, 1, inputType.ordinal())), new BreederRecipe(new ItemStack(ModItems.rod_quad, 1, outputType.ordinal()), flux * 3)); } public static HashMap getAllRecipes() { @@ -145,74 +53,28 @@ public class BreederRecipes { return map; } - public static List getAllFuelsFromHEAT(int heat) { - - List list = new ArrayList(); - - for(Map.Entry fuel : fuels.entrySet()) { - - if(fuel.getValue()[0] >= heat) { - list.add(fuel.getKey().toStack()); - } - } - - return list; - } - public static BreederRecipe getOutput(ItemStack stack) { if(stack == null) return null; - ComparableStack sta = new ComparableStack(stack); + ComparableStack sta = new ComparableStack(stack).makeSingular(); return BreederRecipes.recipes.get(sta); } - /** - * Returns an integer array of the fuel value of a certain stack - * @param stack - * @return an integer array (possibly null) with two fields, the HEAT value and the amount of operations - */ - public static int[] getFuelValue(ItemStack stack) { - - if(stack == null) - return null; - - ComparableStack sta = new ComparableStack(stack); - int[] ret = BreederRecipes.fuels.get(sta); - - return ret; - } - - public static String getHEATString(String string, int heat) { - - if(heat == 1) - string = EnumChatFormatting.GREEN + string; - if(heat == 2) - string = EnumChatFormatting.YELLOW + string; - if(heat == 3) - string = EnumChatFormatting.GOLD + string; - if(heat == 4) - string = EnumChatFormatting.RED + string; - - return string; //strings are reference types I GET IT - } - //nicer than opaque object arrays public static class BreederRecipe { public ItemStack output; - public int heat; + public int flux; - public BreederRecipe() { } - - public BreederRecipe(Item output, int heat) { - this(new ItemStack(output), heat); + public BreederRecipe(Item output, int flux) { + this(new ItemStack(output), flux); } - public BreederRecipe(ItemStack output, int heat) { + public BreederRecipe(ItemStack output, int flux) { this.output = output; - this.heat = heat; + this.flux = flux; } } diff --git a/src/main/java/com/hbm/inventory/recipes/CentrifugeRecipes.java b/src/main/java/com/hbm/inventory/recipes/CentrifugeRecipes.java index eb720bd7c..050c8f58f 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) }); @@ -55,7 +55,7 @@ public class CentrifugeRecipes { recipes.put(new ComparableStack(ModItems.waste_u233), new ItemStack[] { new ItemStack(ModItems.nugget_u235, 1), - new ItemStack(ModItems.nugget_u235, 1), + new ItemStack(ModItems.nugget_neptunium, 1), new ItemStack(ModItems.nugget_technetium, 1), new ItemStack(ModItems.nuclear_waste_tiny, 3) }); @@ -71,6 +71,42 @@ public class CentrifugeRecipes { new ItemStack(ModItems.nuclear_waste_tiny, 2), new ItemStack(ModItems.nuclear_waste_tiny, 2) }); + recipes.put(new ComparableStack(ModItems.waste_plate_mox), new ItemStack[] { + new ItemStack(ModItems.powder_sr90_tiny, 1), + new ItemStack(ModItems.nugget_pu_mix, 3), + new ItemStack(ModItems.powder_cs137_tiny, 1), + new ItemStack(ModItems.nuclear_waste_tiny, 4) }); + + recipes.put(new ComparableStack(ModItems.waste_plate_pu239), new ItemStack[] { + new ItemStack(ModItems.nugget_pu240, 2), + new ItemStack(ModItems.nugget_technetium, 1), + new ItemStack(ModItems.powder_cs137_tiny, 1), + new ItemStack(ModItems.nuclear_waste_tiny, 5) }); + + recipes.put(new ComparableStack(ModItems.waste_plate_ra226be), new ItemStack[] { + new ItemStack(ModItems.nugget_beryllium, 2), + new ItemStack(ModItems.nugget_polonium, 3), + new ItemStack(ModItems.powder_coal_tiny, 2), + new ItemStack(ModItems.nugget_lead, 2) }); + + recipes.put(new ComparableStack(ModItems.waste_plate_sa326), new ItemStack[] { + new ItemStack(ModItems.nugget_solinium, 1), + new ItemStack(ModItems.powder_neodymium_tiny, 1), + new ItemStack(ModItems.nugget_tantalium, 1), + new ItemStack(ModItems.nuclear_waste_tiny, 6) }); + + recipes.put(new ComparableStack(ModItems.waste_plate_u233), new ItemStack[] { + new ItemStack(ModItems.nugget_u235, 1), + new ItemStack(ModItems.powder_i131_tiny, 1), + new ItemStack(ModItems.powder_sr90_tiny, 1), + new ItemStack(ModItems.nuclear_waste_tiny, 6) }); + + recipes.put(new ComparableStack(ModItems.waste_plate_u235), new ItemStack[] { + new ItemStack(ModItems.nugget_neptunium, 1), + new ItemStack(ModItems.nugget_pu238, 1), + new ItemStack(ModItems.nugget_technetium, 1), + new ItemStack(ModItems.nuclear_waste_tiny, 6) }); + recipes.put(new ComparableStack(ModItems.powder_cloud), new ItemStack[] { new ItemStack(ModItems.powder_copper, 1), new ItemStack(ModItems.sulfur, 1), diff --git a/src/main/java/com/hbm/inventory/recipes/FuelPoolRecipes.java b/src/main/java/com/hbm/inventory/recipes/FuelPoolRecipes.java index c8b96be7e..ef3d35914 100644 --- a/src/main/java/com/hbm/inventory/recipes/FuelPoolRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/FuelPoolRecipes.java @@ -12,13 +12,19 @@ public class FuelPoolRecipes { public static final HashMap recipes = new HashMap(); public static void register() { - recipes.put(new ComparableStack(ModItems.waste_natural_uranium_hot), new ItemStack(ModItems.waste_natural_uranium)); - recipes.put(new ComparableStack(ModItems.waste_uranium_hot), new ItemStack(ModItems.waste_uranium)); - recipes.put(new ComparableStack(ModItems.waste_thorium_hot), new ItemStack(ModItems.waste_thorium)); - recipes.put(new ComparableStack(ModItems.waste_mox_hot), new ItemStack(ModItems.waste_mox)); - recipes.put(new ComparableStack(ModItems.waste_plutonium_hot), new ItemStack(ModItems.waste_plutonium)); - recipes.put(new ComparableStack(ModItems.waste_u233_hot), new ItemStack(ModItems.waste_u233)); - recipes.put(new ComparableStack(ModItems.waste_u235_hot), new ItemStack(ModItems.waste_u235)); - recipes.put(new ComparableStack(ModItems.waste_schrabidium_hot), new ItemStack(ModItems.waste_schrabidium)); + recipes.put(new ComparableStack(new ItemStack(ModItems.waste_natural_uranium, 1, 1)), new ItemStack(ModItems.waste_natural_uranium)); + recipes.put(new ComparableStack(new ItemStack(ModItems.waste_uranium, 1, 1)), new ItemStack(ModItems.waste_uranium)); + recipes.put(new ComparableStack(new ItemStack(ModItems.waste_thorium, 1, 1)), new ItemStack(ModItems.waste_thorium)); + recipes.put(new ComparableStack(new ItemStack(ModItems.waste_mox, 1, 1)), new ItemStack(ModItems.waste_mox)); + recipes.put(new ComparableStack(new ItemStack(ModItems.waste_plutonium, 1, 1)), new ItemStack(ModItems.waste_plutonium)); + recipes.put(new ComparableStack(new ItemStack(ModItems.waste_u233, 1, 1)), new ItemStack(ModItems.waste_u233)); + recipes.put(new ComparableStack(new ItemStack(ModItems.waste_u235, 1, 1)), new ItemStack(ModItems.waste_u235)); + recipes.put(new ComparableStack(new ItemStack(ModItems.waste_schrabidium, 1, 1)), new ItemStack(ModItems.waste_schrabidium)); + recipes.put(new ComparableStack(new ItemStack(ModItems.waste_plate_u233, 1, 1)), new ItemStack(ModItems.waste_plate_u233)); + recipes.put(new ComparableStack(new ItemStack(ModItems.waste_plate_u235, 1, 1)), new ItemStack(ModItems.waste_plate_u235)); + recipes.put(new ComparableStack(new ItemStack(ModItems.waste_plate_mox, 1, 1)), new ItemStack(ModItems.waste_plate_mox)); + recipes.put(new ComparableStack(new ItemStack(ModItems.waste_plate_pu239, 1, 1)), new ItemStack(ModItems.waste_plate_pu239)); + recipes.put(new ComparableStack(new ItemStack(ModItems.waste_plate_sa326, 1, 1)), new ItemStack(ModItems.waste_plate_sa326)); + recipes.put(new ComparableStack(new ItemStack(ModItems.waste_plate_ra226be, 1, 1)), new ItemStack(ModItems.waste_plate_ra226be)); } } diff --git a/src/main/java/com/hbm/inventory/recipes/GasCentrifugeRecipes.java b/src/main/java/com/hbm/inventory/recipes/GasCentrifugeRecipes.java index c781a8f98..45cc2cce0 100644 --- a/src/main/java/com/hbm/inventory/recipes/GasCentrifugeRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/GasCentrifugeRecipes.java @@ -14,7 +14,7 @@ import net.minecraft.item.ItemStack; public class GasCentrifugeRecipes { public static enum PseudoFluidType { - NONE (0, 0, "NONE", "Empty", false, new ItemStack(ModItems.polaroid, 0)), + NONE (0, 0, "NONE", "Empty", false, null), NUF6 (400, 300, "LEUF6", "Natural UF6", false, new ItemStack(ModItems.nugget_u238, 1)), LEUF6 (300, 200, "MEUF6", "Low Enriched UF6", false, new ItemStack(ModItems.nugget_u238, 1), new ItemStack(ModItems.fluorite, 1)), diff --git a/src/main/java/com/hbm/inventory/recipes/SILEXRecipes.java b/src/main/java/com/hbm/inventory/recipes/SILEXRecipes.java index f79bf9d70..3ffbf8da8 100644 --- a/src/main/java/com/hbm/inventory/recipes/SILEXRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/SILEXRecipes.java @@ -84,15 +84,15 @@ public class SILEXRecipes { // UEU // recipes.put(new ComparableStack(ModItems.rbmk_pellet_ueu, 1, i), new SILEXRecipe(600, 100) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u238), 87 - i * 6)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u235), 9 - i * 2)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u238), 88 - i * 6)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u235), 8 - i * 2)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.URANIUM235.ordinal()), 2 + 3 * i)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.URANIUM235.ordinal()), 2 + 5 * i)) ); recipes.put(new ComparableStack(ModItems.rbmk_pellet_ueu, 1, i + 5), new SILEXRecipe(600, 100) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_xe135_tiny), 1)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u238), 87 - i * 6)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u235), 8 - i * 2)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u238), 88 - i * 6)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u235), 7 - i * 2)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.URANIUM235.ordinal()), 2 + 3 * i)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.URANIUM235.ordinal()), 2 + 5 * i)) ); @@ -120,7 +120,7 @@ public class SILEXRecipes { .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.URANIUM233.ordinal()), 4 + 8 * i)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.URANIUM233.ordinal()), 6 + 12 * i)) ); - // MEU // + // HEU235 // recipes.put(new ComparableStack(ModItems.rbmk_pellet_heu235, 1, i), new SILEXRecipe(600, 100) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u235), 90 - i * 20)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.URANIUM235.ordinal()), 4 + 8 * i)) @@ -361,35 +361,37 @@ public class SILEXRecipes { } recipes.put(new ComparableStack(ModItems.nuclear_waste_long, 1, ItemWasteLong.WasteClass.URANIUM235.ordinal()), new SILEXRecipe(900, 100) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_neptunium), 25)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_neptunium), 20)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu239), 45)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu240), 15)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 15)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu240), 20)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_technetium), 15)) ); recipes.put(new ComparableStack(ModItems.nuclear_waste_long_depleted, 1, ItemWasteLong.WasteClass.URANIUM235.ordinal()), new SILEXRecipe(900, 100) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_lead), 65)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_bismuth), 15)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 20)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_bismuth), 20)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.dust_tiny), 15)) ); recipes.put(new ComparableStack(ModItems.nuclear_waste_short, 1, ItemWasteShort.WasteClass.URANIUM235.ordinal()), new SILEXRecipe(900, 100) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_technetium), 30)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_ra226), 20)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_i131_tiny), 5)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_cs137_tiny), 5)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 40)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu238), 12)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_sr90_tiny), 10)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_i131_tiny), 10)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_cs137_tiny), 12)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 56)) ); recipes.put(new ComparableStack(ModItems.nuclear_waste_short_depleted, 1, ItemWasteShort.WasteClass.URANIUM235.ordinal()), new SILEXRecipe(900, 100) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_neptunium), 15)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_lead), 25)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_zirconium), 10)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.dust_tiny), 32)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_lead), 22)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u238), 5)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_bismuth), 15)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 45)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 16)) ); recipes.put(new ComparableStack(ModItems.nuclear_waste_long, 1, ItemWasteLong.WasteClass.URANIUM233.ordinal()), new SILEXRecipe(900, 100) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u235), 15)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_neptunium), 25)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu239), 45)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 15)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_technetium), 15)) ); recipes.put(new ComparableStack(ModItems.nuclear_waste_long_depleted, 1, ItemWasteLong.WasteClass.URANIUM233.ordinal()), new SILEXRecipe(900, 100) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_lead), 65)) @@ -397,58 +399,67 @@ public class SILEXRecipes { .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 20)) ); recipes.put(new ComparableStack(ModItems.nuclear_waste_short, 1, ItemWasteShort.WasteClass.URANIUM233.ordinal()), new SILEXRecipe(900, 100) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u235), 30)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_ra226), 20)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_i131_tiny), 5)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_cs137_tiny), 5)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 40)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu238), 4)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_sr90_tiny), 12)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_i131_tiny), 10)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_cs137_tiny), 14)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 60)) ); recipes.put(new ComparableStack(ModItems.nuclear_waste_short_depleted, 1, ItemWasteShort.WasteClass.URANIUM233.ordinal()), new SILEXRecipe(900, 100) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u235), 15)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_lead), 25)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_bismuth), 15)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 45)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_zirconium), 12)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.dust_tiny), 34)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_lead), 13)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u238), 2)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_bismuth), 10)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 29)) ); recipes.put(new ComparableStack(ModItems.nuclear_waste_short, 1, ItemWasteShort.WasteClass.PLUTONIUM239.ordinal()), new SILEXRecipe(900, 100) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu240), 10)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu241), 25)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_ra226), 15)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_sr90_tiny), 2)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_i131_tiny), 5)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_cs137_tiny), 5)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 40)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_cs137_tiny), 6)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 53)) ); recipes.put(new ComparableStack(ModItems.nuclear_waste_short_depleted, 1, ItemWasteShort.WasteClass.PLUTONIUM239.ordinal()), new SILEXRecipe(900, 100) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u238), 20)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_lead), 35)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 45)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_zirconium), 2)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.dust_tiny), 16)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_lead), 40)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u238), 3)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 39)) ); recipes.put(new ComparableStack(ModItems.nuclear_waste_short, 1, ItemWasteShort.WasteClass.PLUTONIUM240.ordinal()), new SILEXRecipe(900, 100) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu241), 15)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u238), 20)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_ra226), 15)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_neptunium), 5)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_sr90_tiny), 2)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_i131_tiny), 5)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_cs137_tiny), 5)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 40)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_cs137_tiny), 7)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 66)) ); recipes.put(new ComparableStack(ModItems.nuclear_waste_short_depleted, 1, ItemWasteShort.WasteClass.PLUTONIUM240.ordinal()), new SILEXRecipe(900, 100) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u238), 20)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_lead), 35)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 45)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_zirconium), 2)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.dust_tiny), 22)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_bismuth), 20)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_lead), 17)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u238), 3)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 36)) ); recipes.put(new ComparableStack(ModItems.nuclear_waste_short, 1, ItemWasteShort.WasteClass.PLUTONIUM241.ordinal()), new SILEXRecipe(900, 100) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_am241), 25)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_am242), 35)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_i131_tiny), 5)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_cs137_tiny), 5)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 30)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_technetium), 5)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_i131_tiny), 3)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_cs137_tiny), 7)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 25)) ); recipes.put(new ComparableStack(ModItems.nuclear_waste_short_depleted, 1, ItemWasteShort.WasteClass.PLUTONIUM241.ordinal()), new SILEXRecipe(900, 100) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_neptunium), 20)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_bismuth), 55)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 25)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_bismuth), 60)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.dust_tiny), 20)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_lead), 15)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 5)) ); recipes.put(new ComparableStack(ModItems.nuclear_waste_long, 1, ItemWasteLong.WasteClass.THORIUM.ordinal()), new SILEXRecipe(900, 100) @@ -457,39 +468,47 @@ public class SILEXRecipes { .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 25)) ); recipes.put(new ComparableStack(ModItems.nuclear_waste_long_depleted, 1, ItemWasteLong.WasteClass.THORIUM.ordinal()), new SILEXRecipe(900, 100) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_lead), 75)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_bismuth), 15)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_lead), 35)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_bismuth), 40)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.dust_tiny), 15)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 10)) ); recipes.put(new ComparableStack(ModItems.nuclear_waste_long, 1, ItemWasteLong.WasteClass.NEPTUNIUM.ordinal()), new SILEXRecipe(900, 100) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u238), 20)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u238), 15)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu239), 40)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 40)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu240), 15)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_technetium), 15)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 15)) ); recipes.put(new ComparableStack(ModItems.nuclear_waste_long_depleted, 1, ItemWasteLong.WasteClass.NEPTUNIUM.ordinal()), new SILEXRecipe(900, 100) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u238), 16)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_lead), 55)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 45)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.dust_tiny), 20)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 9)) ); recipes.put(new ComparableStack(ModItems.nuclear_waste_short, 1, ItemWasteShort.WasteClass.NEPTUNIUM.ordinal()), new SILEXRecipe(900, 100) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_polonium), 10)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu238), 25)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu239), 15)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu238), 40)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_sr90_tiny), 7)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_i131_tiny), 5)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_cs137_tiny), 5)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_cs137_tiny), 8)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 40)) ); recipes.put(new ComparableStack(ModItems.nuclear_waste_short_depleted, 1, ItemWasteShort.WasteClass.NEPTUNIUM.ordinal()), new SILEXRecipe(900, 100) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u235), 20)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_lead), 35)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 45)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_zirconium), 7)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.dust_tiny), 29)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u238), 2)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_lead), 45)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 17)) ); - recipes.put(new ComparableStack(ModItems.fallout, 1), new SILEXRecipe(100, 100) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.dust), 90)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_co60), 6)) + recipes.put(new ComparableStack(ModItems.fallout, 1), new SILEXRecipe(900, 100) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.dust_tiny), 90)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_co60), 2)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_sr90_tiny), 3)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_i131_tiny), 1)) + .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_cs137_tiny), 3)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_au198), 1)) - .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_ra226), 3)) ); recipes.put(new ComparableStack(Blocks.gravel, 1), new SILEXRecipe(1000, 250) 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..36afb42cc 100644 --- a/src/main/java/com/hbm/inventory/recipes/anvil/AnvilRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/anvil/AnvilRecipes.java @@ -173,7 +173,8 @@ public class AnvilRecipes { new OreDictStack(POLYMER.ingot(), 4), new ComparableStack(ModItems.generator_steel, 2), new ComparableStack(ModItems.turbine_titanium, 1), - new ComparableStack(ModItems.thermo_element, 3) + new ComparableStack(ModItems.thermo_element, 3), + new ComparableStack(ModItems.crt_display, 1) }, new AnvilOutput(new ItemStack(ModBlocks.machine_industrial_generator))).setTier(2)); constructionRecipes.add(new AnvilConstructionRecipe( @@ -253,6 +254,12 @@ 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)); + constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.billet_ra226be, 1), new AnvilOutput(new ItemStack(ModItems.plate_fuel_ra226be))).setTier(4)); } public static void registerConstructionAmmo() { @@ -581,7 +588,7 @@ public class AnvilRecipes { new AnvilOutput(new ItemStack(ModItems.pipes_steel, 2)) }).setTier(4)); constructionRecipes.add(new AnvilConstructionRecipe( - new ComparableStack(ModBlocks.machine_reactor_small), new AnvilOutput[] { + new ComparableStack(ModBlocks.reactor_research), new AnvilOutput[] { new AnvilOutput(new ItemStack(ModItems.ingot_steel, 6)), new AnvilOutput(new ItemStack(ModItems.ingot_polymer, 1)), new AnvilOutput(new ItemStack(ModItems.ingot_polymer, 1), 0.75F), diff --git a/src/main/java/com/hbm/items/ModItems.java b/src/main/java/com/hbm/items/ModItems.java index 88b3f673f..1e862c997 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.*; @@ -81,6 +82,7 @@ public class ModItems { public static Item ingot_polonium; public static Item ingot_technetium; public static Item ingot_co60; + public static Item ingot_sr90; public static Item ingot_au198; public static Item ingot_ra226; public static Item ingot_titanium; @@ -184,7 +186,9 @@ public class ModItems { public static Item billet_neptunium; public static Item billet_polonium; public static Item billet_technetium; + public static Item billet_cobalt; public static Item billet_co60; + public static Item billet_sr90; public static Item billet_au198; public static Item billet_ra226; public static Item billet_schrabidium; @@ -231,7 +235,9 @@ public class ModItems { public static Item nugget_neptunium; public static Item nugget_polonium; public static Item nugget_technetium; + public static Item nugget_cobalt; public static Item nugget_co60; + public static Item nugget_sr90; public static Item nugget_au198; public static Item nugget_ra226; public static Item plate_titanium; @@ -354,6 +360,8 @@ public class ModItems { public static Item powder_neptunium; public static Item powder_polonium; public static Item powder_co60; + public static Item powder_sr90; + public static Item powder_sr90_tiny; public static Item powder_au198; public static Item powder_ra226; public static Item powder_i131; @@ -376,6 +384,7 @@ public class ModItems { public static Item powder_uranium; public static Item powder_plutonium; public static Item dust; + public static Item dust_tiny; public static Item fallout; public static Item powder_power; @@ -509,6 +518,7 @@ public class ModItems { public static Item circuit_bismuth; public static Item circuit_tantalium_raw; public static Item circuit_tantalium; + public static Item crt_display; public static ItemEnumMulti circuit_star_piece; public static ItemEnumMulti circuit_star_component; public static Item circuit_star; @@ -861,9 +871,9 @@ public class ModItems { public static Item radaway_flush; public static Item radx; public static Item siox; + public static Item pirfenidone; public static Item xanax; public static Item fmn; - public static Item pirfenidone; public static Item five_htp; public static Item med_bag; public static Item pill_iodine; @@ -950,91 +960,13 @@ public class ModItems { public static Item coin_worm; public static Item coin_ufo; public static Item coin_siege; - + public static Item rod_empty; - public static Item rod_uranium; - public static Item rod_th232; - public static Item rod_u233; - public static Item rod_u235; - public static Item rod_u238; - public static Item rod_plutonium; - public static Item rod_pu238; - public static Item rod_pu239; - public static Item rod_pu240; - public static Item rod_neptunium; - public static Item rod_polonium; - public static Item rod_lead; - public static Item rod_schrabidium; - public static Item rod_solinium; - public static Item rod_euphemium; - public static Item rod_australium; - public static Item rod_weidanium; - public static Item rod_reiium; - public static Item rod_unobtainium; - public static Item rod_daffergon; - public static Item rod_verticium; - public static Item rod_balefire; - public static Item rod_balefire_blazing; - + public static Item rod; public static Item rod_dual_empty; - public static Item rod_dual_uranium; - public static Item rod_dual_th232; - public static Item rod_dual_u233; - public static Item rod_dual_u235; - public static Item rod_dual_u238; - public static Item rod_dual_plutonium; - public static Item rod_dual_pu238; - public static Item rod_dual_pu239; - public static Item rod_dual_pu240; - public static Item rod_dual_neptunium; - public static Item rod_dual_polonium; - public static Item rod_dual_lead; - public static Item rod_dual_schrabidium; - public static Item rod_dual_solinium; - public static Item rod_dual_balefire; - public static Item rod_dual_balefire_blazing; - + public static Item rod_dual; public static Item rod_quad_empty; - public static Item rod_quad_uranium; - public static Item rod_quad_th232; - public static Item rod_quad_u233; - public static Item rod_quad_u235; - public static Item rod_quad_u238; - public static Item rod_quad_plutonium; - public static Item rod_quad_pu238; - public static Item rod_quad_pu239; - public static Item rod_quad_pu240; - public static Item rod_quad_neptunium; - public static Item rod_quad_polonium; - public static Item rod_quad_lead; - public static Item rod_quad_schrabidium; - public static Item rod_quad_solinium; - 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; - - public static Item rod_coolant; - public static Item rod_dual_coolant; - public static Item rod_quad_coolant; + public static Item rod_quad; public static Item rod_zirnox_empty; public static Item rod_zirnox_natural_uranium_fuel; @@ -1066,20 +998,26 @@ 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_ra226be; + 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_ra226be; + public static Item plate_fuel_sa326; + public static Item rbmk_lid; public static Item rbmk_lid_glass; public static Item rbmk_fuel_empty; @@ -1160,24 +1098,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; public static Item debris_graphite; public static Item debris_metal; @@ -1200,13 +1120,6 @@ public class ModItems { public static Item recycled_nuclear; public static Item recycled_misc; - public static Item rod_lithium; - public static Item rod_dual_lithium; - public static Item rod_quad_lithium; - public static Item rod_tritium; - public static Item rod_dual_tritium; - public static Item rod_quad_tritium; - public static Item test_nuke_igniter; public static Item test_nuke_propellant; public static Item test_nuke_tier1_shielding; @@ -1959,7 +1872,6 @@ public class ModItems { public static Item ingot_euphemium; public static Item nugget_euphemium; - public static Item rod_quad_euphemium; public static Item euphemium_helmet; public static Item euphemium_plate; public static Item euphemium_legs; @@ -2582,6 +2494,7 @@ public class ModItems { ingot_polonium = new ItemHazard(ItemHazard.po210 * ItemHazard.ingot, true).setUnlocalizedName("ingot_polonium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_polonium"); ingot_technetium = new ItemHazard().addRadiation(ItemHazard.tc99 * ItemHazard.ingot).toItem().setUnlocalizedName("ingot_technetium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_technetium"); ingot_co60 = new ItemHazard().addRadiation(ItemHazard.co60 * ItemHazard.ingot).addFire(5).toItem().setUnlocalizedName("ingot_co60").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_co60"); + ingot_sr90 = new Item().setUnlocalizedName("ingot_sr90").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_sr90"); ingot_au198 = new ItemHazard().addRadiation(ItemHazard.au198 * ItemHazard.ingot).addFire(15).toItem().setUnlocalizedName("ingot_au198").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_au198"); ingot_ra226 = new ItemHazard().addRadiation(ItemHazard.ra226 * ItemHazard.ingot).toItem().setUnlocalizedName("ingot_ra226").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_ra226"); ingot_titanium = new Item().setUnlocalizedName("ingot_titanium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_titanium"); @@ -2675,7 +2588,9 @@ public class ModItems { billet_neptunium = new ItemHazard(ItemHazard.np237 * ItemHazard.billet).setUnlocalizedName("billet_neptunium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":billet_neptunium"); billet_polonium = new ItemHazard(ItemHazard.po210 * ItemHazard.billet, true).setUnlocalizedName("billet_polonium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":billet_polonium"); billet_technetium = new ItemHazard().addRadiation(ItemHazard.tc99 * ItemHazard.billet).toItem().setUnlocalizedName("billet_technetium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":billet_technetium"); + billet_cobalt = new Item().setUnlocalizedName("billet_cobalt").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":billet_cobalt"); billet_co60 = new ItemHazard().addRadiation(ItemHazard.co60 * ItemHazard.billet).addFire(5).toItem().setUnlocalizedName("billet_co60").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":billet_co60"); + billet_sr90 = new Item().setUnlocalizedName("billet_sr90").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":billet_sr90"); billet_au198 = new ItemHazard().addRadiation(ItemHazard.au198 * ItemHazard.billet).addFire(15).toItem().setUnlocalizedName("billet_au198").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":billet_au198"); billet_ra226 = new ItemHazard().addRadiation(ItemHazard.ra226 * ItemHazard.billet).toItem().setUnlocalizedName("billet_ra226").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":billet_ra226"); billet_schrabidium = new ItemHazard(ItemHazard.sa326 * ItemHazard.billet, false, true).setUnlocalizedName("billet_schrabidium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":billet_schrabidium"); @@ -2784,7 +2699,9 @@ public class ModItems { nugget_neptunium = new ItemHazard(ItemHazard.np237 * ItemHazard.nugget).setUnlocalizedName("nugget_neptunium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nugget_neptunium"); nugget_polonium = new ItemHazard(ItemHazard.po210 * ItemHazard.nugget, true).setUnlocalizedName("nugget_polonium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nugget_polonium"); nugget_technetium = new ItemHazard().addRadiation(ItemHazard.tc99 * ItemHazard.nugget).toItem().setUnlocalizedName("nugget_technetium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nugget_technetium"); + nugget_cobalt = new Item().setUnlocalizedName("nugget_cobalt").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nugget_cobalt"); nugget_co60 = new ItemHazard().addRadiation(ItemHazard.co60 * ItemHazard.nugget).addFire(5).toItem().setUnlocalizedName("nugget_co60").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nugget_co60"); + nugget_sr90 = new Item().setUnlocalizedName("nugget_sr90").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nugget_sr90"); nugget_au198 = new ItemHazard().addRadiation(ItemHazard.au198 * ItemHazard.nugget).addFire(15).toItem().setUnlocalizedName("nugget_au198").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nugget_au198"); nugget_ra226 = new ItemHazard().addRadiation(ItemHazard.ra226 * ItemHazard.nugget).toItem().setUnlocalizedName("nugget_ra226").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nugget_ra226"); plate_titanium = new Item().setUnlocalizedName("plate_titanium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":plate_titanium"); @@ -2852,6 +2769,8 @@ public class ModItems { powder_neptunium = new ItemHazard(ItemHazard.np237 * ItemHazard.powder, true).setUnlocalizedName("powder_neptunium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_neptunium"); powder_polonium = new ItemHazard(ItemHazard.po210 * ItemHazard.powder, true).setUnlocalizedName("powder_polonium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_polonium"); powder_co60 = new ItemHazard().addRadiation(ItemHazard.co60 * ItemHazard.powder).addFire(5).toItem().setUnlocalizedName("powder_co60").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_co60"); + powder_sr90 = new Item().setUnlocalizedName("powder_sr90").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_sr90"); + powder_sr90_tiny = new Item().setUnlocalizedName("powder_sr90_tiny").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_sr90_tiny"); powder_i131 = new ItemHazard().addRadiation(ItemHazard.i131 * ItemHazard.powder).addFire(15).toItem().setUnlocalizedName("powder_i131").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_i131"); powder_i131_tiny = new ItemHazard().addRadiation(ItemHazard.i131 * ItemHazard.powder_tiny).addFire(15).toItem().setUnlocalizedName("powder_i131_tiny").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_i131_tiny"); powder_xe135 = new ItemHazard().addRadiation(ItemHazard.xe135 * ItemHazard.powder).addFire(15).toItem().setUnlocalizedName("powder_xe135").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_xe135"); @@ -2873,6 +2792,7 @@ public class ModItems { powder_uranium = new ItemHazard().addRadiation(ItemHazard.u * ItemHazard.ingot).addFire(5).toItem().setUnlocalizedName("powder_uranium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_uranium"); powder_plutonium = new ItemHazard().addRadiation(ItemHazard.pu * ItemHazard.ingot).addFire(5).toItem().setUnlocalizedName("powder_plutonium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_plutonium"); dust = new ItemCustomLore().setUnlocalizedName("dust").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":dust"); + dust_tiny = new Item().setUnlocalizedName("dust_tiny").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":dust_tiny"); fallout = new ItemHazard().addRadiation(ItemHazard.fo * ItemHazard.powder).toItem().setUnlocalizedName("fallout").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":fallout"); powder_advanced_alloy = new Item().setUnlocalizedName("powder_advanced_alloy").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_advanced_alloy"); powder_tcalloy = new Item().setUnlocalizedName("powder_tcalloy").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_tcalloy"); @@ -3076,6 +2996,7 @@ public class ModItems { circuit_bismuth = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("circuit_bismuth").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":circuit_bismuth"); circuit_tantalium_raw = new Item().setUnlocalizedName("circuit_tantalium_raw").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":circuit_tantalium_raw"); circuit_tantalium = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("circuit_tantalium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":circuit_tantalium"); + crt_display = new Item().setUnlocalizedName("crt_display").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":crt_display"); circuit_star_piece = (ItemEnumMulti) new ItemEnumMulti(ScrapType.class, true, true).setUnlocalizedName("circuit_star_piece").setCreativeTab(null); circuit_star_component = (ItemEnumMulti) new ItemCircuitStarComponent().setUnlocalizedName("circuit_star_component").setCreativeTab(null); circuit_star = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("circuit_star").setCreativeTab(null).setTextureName(RefStrings.MODID + ":circuit_star"); @@ -3340,10 +3261,9 @@ public class ModItems { med_bag = new ItemSyringe().setUnlocalizedName("med_bag").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":med_bag"); radx = new ItemPill(0).setUnlocalizedName("radx").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":radx"); siox = new ItemPill(0).setUnlocalizedName("siox").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":siox"); - xanax = new ItemPill(0).setUnlocalizedName("xanax").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":xanax_2"); - chocolate = new ItemPill(0).setUnlocalizedName("chocolate").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":chocolate"); - fmn = new ItemPill(0).setUnlocalizedName("fmn").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":tablet"); pirfenidone = new ItemPill(0).setUnlocalizedName("pirfenidone").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":pirfenidone"); + xanax = new ItemPill(0).setUnlocalizedName("xanax").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":xanax_2"); + fmn = new ItemPill(0).setUnlocalizedName("fmn").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":tablet"); five_htp = new ItemPill(0).setUnlocalizedName("five_htp").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":5htp"); pill_iodine = new ItemPill(0).setUnlocalizedName("pill_iodine").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":pill_iodine"); plan_c = new ItemPill(0).setUnlocalizedName("plan_c").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":plan_c"); @@ -3436,6 +3356,7 @@ public class ModItems { chocolate_milk = new ItemEnergy().setUnlocalizedName("chocolate_milk").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":chocolate_milk"); coffee = new ItemEnergy().setUnlocalizedName("coffee").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":coffee"); coffee_radium = new ItemEnergy().setUnlocalizedName("coffee_radium").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":coffee_radium"); + chocolate = new ItemPill(0).setUnlocalizedName("chocolate").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":chocolate"); cap_nuka = new Item().setUnlocalizedName("cap_nuka").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":cap_nuka"); cap_quantum = new Item().setUnlocalizedName("cap_quantum").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":cap_quantum"); cap_sparkle = new Item().setUnlocalizedName("cap_sparkle").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":cap_sparkle"); @@ -3492,84 +3413,14 @@ public class ModItems { recycled_electronic = new Item().setUnlocalizedName("recycled_electronic").setCreativeTab(null).setTextureName(RefStrings.MODID + ":recycled_electronic"); recycled_nuclear = new Item().setUnlocalizedName("recycled_nuclear").setCreativeTab(null).setTextureName(RefStrings.MODID + ":recycled_nuclear"); recycled_misc = new Item().setUnlocalizedName("recycled_misc").setCreativeTab(null).setTextureName(RefStrings.MODID + ":recycled_misc"); - + rod_empty = new Item().setUnlocalizedName("rod_empty").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rod_empty"); - rod_th232 = new ItemHazard().addRadiation(ItemHazard.th232 * ItemHazard.rod).toItem().setUnlocalizedName("rod_th232").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_th232"); - rod_uranium = new ItemHazard(ItemHazard.u * ItemHazard.rod).setUnlocalizedName("rod_uranium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_uranium"); - rod_u233 = new ItemHazard(ItemHazard.u233 * ItemHazard.rod).setUnlocalizedName("rod_u233").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_u233"); - rod_u235 = new ItemHazard(ItemHazard.u235 * ItemHazard.rod).setUnlocalizedName("rod_u235").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_u235"); - rod_u238 = new ItemHazard(ItemHazard.u238 * ItemHazard.rod).setUnlocalizedName("rod_u238").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_u238"); - rod_plutonium = new ItemHazard(ItemHazard.pu * ItemHazard.rod).setUnlocalizedName("rod_plutonium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_plutonium"); - rod_pu238 = new ItemHazard(ItemHazard.pu238 * ItemHazard.rod, true).setUnlocalizedName("rod_pu238").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_pu238"); - rod_pu239 = new ItemHazard(ItemHazard.pu239 * ItemHazard.rod).setUnlocalizedName("rod_pu239").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_pu239"); - rod_pu240 = new ItemHazard(ItemHazard.pu240 * ItemHazard.rod).setUnlocalizedName("rod_pu240").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_pu240"); - rod_neptunium = new ItemHazard(ItemHazard.np237 * ItemHazard.rod).setUnlocalizedName("rod_neptunium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_neptunium"); - rod_polonium = new ItemHazard(ItemHazard.po210 * ItemHazard.rod, true).setUnlocalizedName("rod_polonium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_polonium"); - rod_lead = new Item().setUnlocalizedName("rod_lead").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_lead"); - rod_schrabidium = new ItemHazard(ItemHazard.sa326 * ItemHazard.rod, false, true).setUnlocalizedName("rod_schrabidium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_schrabidium"); - rod_solinium = new ItemHazard(ItemHazard.sa327 * ItemHazard.rod, false, true).setUnlocalizedName("rod_solinium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_solinium"); - rod_euphemium = new ItemCustomLore().setUnlocalizedName("rod_euphemium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_euphemium"); - rod_australium = new ItemCustomLore().setUnlocalizedName("rod_australium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_australium"); - rod_weidanium = new ItemCustomLore().setUnlocalizedName("rod_weidanium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_weidanium"); - rod_reiium = new ItemCustomLore().setUnlocalizedName("rod_reiium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_reiium"); - rod_unobtainium = new ItemCustomLore().setUnlocalizedName("rod_unobtainium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_unobtainium"); - rod_daffergon = new ItemCustomLore().setUnlocalizedName("rod_daffergon").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_daffergon"); - rod_verticium = new ItemCustomLore().setUnlocalizedName("rod_verticium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_verticium"); - rod_balefire = new ItemHazard(150000F).setUnlocalizedName("rod_balefire").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_balefire"); - rod_balefire_blazing = new ItemHazard(250000F, true).setUnlocalizedName("rod_balefire_blazing").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_balefire_blazing"); - + rod = (ItemEnumMulti) new ItemBreedingRod().setUnlocalizedName("rod").setContainerItem(ModItems.rod_empty).setCreativeTab(MainRegistry.controlTab); rod_dual_empty = new Item().setUnlocalizedName("rod_dual_empty").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rod_dual_empty"); - rod_dual_th232 = new ItemHazard(ItemHazard.th232 * ItemHazard.rod_dual).setUnlocalizedName("rod_dual_th232").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_th232"); - rod_dual_uranium = new ItemHazard(ItemHazard.u * ItemHazard.rod_dual).setUnlocalizedName("rod_dual_uranium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_uranium"); - rod_dual_u233 = new ItemHazard(ItemHazard.u233 * ItemHazard.rod_dual).setUnlocalizedName("rod_dual_u233").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_u233"); - rod_dual_u235 = new ItemHazard(ItemHazard.u235 * ItemHazard.rod_dual).setUnlocalizedName("rod_dual_u235").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_u235"); - rod_dual_u238 = new ItemHazard(ItemHazard.u238 * ItemHazard.rod_dual).setUnlocalizedName("rod_dual_u238").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_u238"); - rod_dual_plutonium = new ItemHazard(ItemHazard.pu * ItemHazard.rod_dual).setUnlocalizedName("rod_dual_plutonium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_plutonium"); - rod_dual_pu238 = new ItemHazard(ItemHazard.pu238 * ItemHazard.rod_dual, true).setUnlocalizedName("rod_dual_pu238").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_pu238"); - rod_dual_pu239 = new ItemHazard(ItemHazard.pu239 * ItemHazard.rod_dual).setUnlocalizedName("rod_dual_pu239").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_pu239"); - rod_dual_pu240 = new ItemHazard(ItemHazard.pu240 * ItemHazard.rod_dual).setUnlocalizedName("rod_dual_pu240").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_pu240"); - rod_dual_neptunium = new ItemHazard(ItemHazard.np237 * ItemHazard.rod_dual).setUnlocalizedName("rod_dual_neptunium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_neptunium"); - rod_dual_polonium = new ItemHazard(ItemHazard.po210 * ItemHazard.rod_dual, true).setUnlocalizedName("rod_dual_polonium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_polonium"); - rod_dual_lead = new Item().setUnlocalizedName("rod_dual_lead").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_lead"); - rod_dual_schrabidium = new ItemHazard(ItemHazard.sa326 * ItemHazard.rod_dual, false, true).setUnlocalizedName("rod_dual_schrabidium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_schrabidium"); - rod_dual_solinium = new ItemHazard(ItemHazard.sa327 * ItemHazard.rod_dual, false, true).setUnlocalizedName("rod_dual_solinium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_solinium"); - rod_dual_balefire = new ItemHazard(300000F).setUnlocalizedName("rod_dual_balefire").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_balefire"); - rod_dual_balefire_blazing = new ItemHazard(500000F, true).setUnlocalizedName("rod_dual_balefire_blazing").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_balefire_blazing"); - + rod_dual = (ItemEnumMulti) new ItemBreedingRod().setUnlocalizedName("rod_dual").setContainerItem(ModItems.rod_dual_empty).setCreativeTab(MainRegistry.controlTab); rod_quad_empty = new Item().setUnlocalizedName("rod_quad_empty").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rod_quad_empty"); - rod_quad_th232 = new ItemHazard(ItemHazard.th232 * ItemHazard.rod_quad).setUnlocalizedName("rod_quad_th232").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_th232"); - rod_quad_uranium = new ItemHazard(ItemHazard.u * ItemHazard.rod_quad).setUnlocalizedName("rod_quad_uranium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_uranium"); - rod_quad_u233 = new ItemHazard(ItemHazard.u233 * ItemHazard.rod_quad).setUnlocalizedName("rod_quad_u233").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_u233"); - rod_quad_u235 = new ItemHazard(ItemHazard.u235 * ItemHazard.rod_quad).setUnlocalizedName("rod_quad_u235").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_u235"); - rod_quad_u238 = new ItemHazard(ItemHazard.u238 * ItemHazard.rod_quad).setUnlocalizedName("rod_quad_u238").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_u238"); - rod_quad_plutonium = new ItemHazard(ItemHazard.pu * ItemHazard.rod_quad).setUnlocalizedName("rod_quad_plutonium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_plutonium"); - rod_quad_pu238 = new ItemHazard(ItemHazard.pu238 * ItemHazard.rod_quad, true).setUnlocalizedName("rod_quad_pu238").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_pu238"); - rod_quad_pu239 = new ItemHazard(ItemHazard.pu239 * ItemHazard.rod_quad).setUnlocalizedName("rod_quad_pu239").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_pu239"); - rod_quad_pu240 = new ItemHazard(ItemHazard.pu240 * ItemHazard.rod_quad).setUnlocalizedName("rod_quad_pu240").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_pu240"); - rod_quad_neptunium = new ItemHazard(ItemHazard.np237 * ItemHazard.rod_quad).setUnlocalizedName("rod_quad_neptunium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_neptunium"); - rod_quad_polonium = new ItemHazard(ItemHazard.po210 * ItemHazard.rod_quad, true).setUnlocalizedName("rod_quad_polonium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_polonium"); - rod_quad_lead = new Item().setUnlocalizedName("rod_quad_lead").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_lead"); - rod_quad_schrabidium = new ItemHazard(ItemHazard.sa326 * ItemHazard.rod_quad, false, true).setUnlocalizedName("rod_quad_schrabidium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_schrabidium"); - 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_quad = (ItemEnumMulti) new ItemBreedingRod().setUnlocalizedName("rod_quad").setContainerItem(ModItems.rod_quad_empty).setCreativeTab(MainRegistry.controlTab); + 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,44 +3443,34 @@ 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"); - - 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"); - - rod_coolant = new ItemCustomLore().setUnlocalizedName("rod_coolant").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_coolant"); - rod_dual_coolant = new ItemCustomLore().setUnlocalizedName("rod_dual_coolant").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_coolant"); - rod_quad_coolant = new ItemCustomLore().setUnlocalizedName("rod_quad_coolant").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_coolant"); - - rod_lithium = new ItemHazard().addHydroReactivity().toItem().setUnlocalizedName("rod_lithium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_lithium"); - rod_dual_lithium = new ItemHazard().addHydroReactivity().toItem().setUnlocalizedName("rod_dual_lithium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_lithium"); - rod_quad_lithium = new ItemHazard().addHydroReactivity().toItem().setUnlocalizedName("rod_quad_lithium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_lithium"); - - rod_tritium = new ItemHazard(0.5F).setUnlocalizedName("rod_tritium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_tritium"); - rod_dual_tritium = new ItemHazard(1F).setUnlocalizedName("rod_dual_tritium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_tritium"); - rod_quad_tritium = new ItemHazard(2F).setUnlocalizedName("rod_quad_tritium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_tritium"); - + 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_ra226be = new ItemDepletedFuel().setUnlocalizedName("waste_plate_ra226be").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_plate_ra226be"); + waste_plate_sa326 = new ItemDepletedFuel().setUnlocalizedName("waste_plate_sa326").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_plate_sa326"); + pile_rod_uranium = new ItemPileRod().setUnlocalizedName("pile_rod_uranium").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pile_rod_uranium"); pile_rod_plutonium = new ItemPileRod().setUnlocalizedName("pile_rod_plutonium").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pile_rod_plutonium"); 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(2200000).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(2200000).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(2400000).setFunction(FunctionEnum.LOGARITHM, 50).setUnlocalizedName("plate_fuel_mox").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":plate_fuel_mox"); + plate_fuel_pu239 = new ItemPlateFuel(2000000).setFunction(FunctionEnum.NEGATIVE_QUADRATIC, 25).setUnlocalizedName("plate_fuel_pu239").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":plate_fuel_pu239"); + plate_fuel_ra226be = new ItemPlateFuel(1300000).setFunction(FunctionEnum.PASSIVE, 30).setUnlocalizedName("plate_fuel_ra226be").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":plate_fuel_ra226be"); + plate_fuel_sa326 = new ItemPlateFuel(2000000).setFunction(FunctionEnum.LINEAR, 60).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,25 +3729,7 @@ 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"); - + debris_graphite = new Item().setUnlocalizedName("debris_graphite").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":debris_graphite"); debris_metal = new Item().setUnlocalizedName("debris_metal").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":debris_metal"); debris_fuel = new Item().setUnlocalizedName("debris_fuel").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":debris_fuel"); @@ -4721,7 +4544,6 @@ public class ModItems { ingot_euphemium = new ItemCustomLore().setUnlocalizedName("ingot_euphemium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_euphemium"); nugget_euphemium = new ItemCustomLore().setUnlocalizedName("nugget_euphemium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nugget_euphemium"); - rod_quad_euphemium = new ItemCustomLore().setUnlocalizedName("rod_quad_euphemium").setCreativeTab(MainRegistry.partsTab).setMaxStackSize(1).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_euphemium"); watch = new ItemCustomLore().setUnlocalizedName("watch").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":watch"); apple_euphemium = new ItemAppleEuphemium(20, 100, false).setUnlocalizedName("apple_euphemium").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":apple_euphemium"); @@ -5638,6 +5460,7 @@ public class ModItems { GameRegistry.registerItem(ingot_polonium, ingot_polonium.getUnlocalizedName()); GameRegistry.registerItem(ingot_technetium, ingot_technetium.getUnlocalizedName()); GameRegistry.registerItem(ingot_co60, ingot_co60.getUnlocalizedName()); + GameRegistry.registerItem(ingot_sr90, ingot_sr90.getUnlocalizedName()); GameRegistry.registerItem(ingot_au198, ingot_au198.getUnlocalizedName()); GameRegistry.registerItem(ingot_ra226, ingot_ra226.getUnlocalizedName()); GameRegistry.registerItem(ingot_titanium, ingot_titanium.getUnlocalizedName()); @@ -5729,7 +5552,9 @@ public class ModItems { GameRegistry.registerItem(billet_neptunium, billet_neptunium.getUnlocalizedName()); GameRegistry.registerItem(billet_polonium, billet_polonium.getUnlocalizedName()); GameRegistry.registerItem(billet_technetium, billet_technetium.getUnlocalizedName()); + GameRegistry.registerItem(billet_cobalt, billet_cobalt.getUnlocalizedName()); GameRegistry.registerItem(billet_co60, billet_co60.getUnlocalizedName()); + GameRegistry.registerItem(billet_sr90, billet_sr90.getUnlocalizedName()); GameRegistry.registerItem(billet_au198, billet_au198.getUnlocalizedName()); GameRegistry.registerItem(billet_ra226, billet_ra226.getUnlocalizedName()); GameRegistry.registerItem(billet_schrabidium, billet_schrabidium.getUnlocalizedName()); @@ -5783,6 +5608,8 @@ public class ModItems { GameRegistry.registerItem(powder_neptunium, powder_neptunium.getUnlocalizedName()); GameRegistry.registerItem(powder_polonium, powder_polonium.getUnlocalizedName()); GameRegistry.registerItem(powder_co60, powder_co60.getUnlocalizedName()); + GameRegistry.registerItem(powder_sr90, powder_sr90.getUnlocalizedName()); + GameRegistry.registerItem(powder_sr90_tiny, powder_sr90_tiny.getUnlocalizedName()); GameRegistry.registerItem(powder_i131, powder_i131.getUnlocalizedName()); GameRegistry.registerItem(powder_i131_tiny, powder_i131_tiny.getUnlocalizedName()); GameRegistry.registerItem(powder_xe135, powder_xe135.getUnlocalizedName()); @@ -5865,6 +5692,7 @@ public class ModItems { GameRegistry.registerItem(powder_dineutronium, powder_dineutronium.getUnlocalizedName()); GameRegistry.registerItem(redstone_depleted, redstone_depleted.getUnlocalizedName()); GameRegistry.registerItem(dust, dust.getUnlocalizedName()); + GameRegistry.registerItem(dust_tiny, dust_tiny.getUnlocalizedName()); GameRegistry.registerItem(fallout, fallout.getUnlocalizedName()); //Powders @@ -5942,7 +5770,9 @@ public class ModItems { GameRegistry.registerItem(nugget_am_mix, nugget_am_mix.getUnlocalizedName()); GameRegistry.registerItem(nugget_neptunium, nugget_neptunium.getUnlocalizedName()); GameRegistry.registerItem(nugget_polonium, nugget_polonium.getUnlocalizedName()); + GameRegistry.registerItem(nugget_cobalt, nugget_cobalt.getUnlocalizedName()); GameRegistry.registerItem(nugget_co60, nugget_co60.getUnlocalizedName()); + GameRegistry.registerItem(nugget_sr90, nugget_sr90.getUnlocalizedName()); GameRegistry.registerItem(nugget_technetium, nugget_technetium.getUnlocalizedName()); GameRegistry.registerItem(nugget_au198, nugget_au198.getUnlocalizedName()); GameRegistry.registerItem(nugget_ra226, nugget_ra226.getUnlocalizedName()); @@ -6158,6 +5988,7 @@ public class ModItems { GameRegistry.registerItem(circuit_bismuth, circuit_bismuth.getUnlocalizedName()); GameRegistry.registerItem(circuit_tantalium_raw, circuit_tantalium_raw.getUnlocalizedName()); GameRegistry.registerItem(circuit_tantalium, circuit_tantalium.getUnlocalizedName()); + GameRegistry.registerItem(crt_display, crt_display.getUnlocalizedName()); GameRegistry.registerItem(circuit_star_piece, circuit_star_piece.getUnlocalizedName()); GameRegistry.registerItem(circuit_star_component, circuit_star_component.getUnlocalizedName()); GameRegistry.registerItem(circuit_star, circuit_star.getUnlocalizedName()); @@ -6586,145 +6417,13 @@ public class ModItems { GameRegistry.registerItem(fusion_shield_chlorophyte, fusion_shield_chlorophyte.getUnlocalizedName()); GameRegistry.registerItem(fusion_shield_vaporwave, fusion_shield_vaporwave.getUnlocalizedName()); - //Fuel Rods + //Breeding Rods GameRegistry.registerItem(rod_empty, rod_empty.getUnlocalizedName()); + GameRegistry.registerItem(rod, rod.getUnlocalizedName()); GameRegistry.registerItem(rod_dual_empty, rod_dual_empty.getUnlocalizedName()); + GameRegistry.registerItem(rod_dual, rod_dual.getUnlocalizedName()); GameRegistry.registerItem(rod_quad_empty, rod_quad_empty.getUnlocalizedName()); - - GameRegistry.registerItem(rod_uranium, rod_uranium.getUnlocalizedName()); - GameRegistry.registerItem(rod_dual_uranium, rod_dual_uranium.getUnlocalizedName()); - GameRegistry.registerItem(rod_quad_uranium, rod_quad_uranium.getUnlocalizedName()); - - GameRegistry.registerItem(rod_th232, rod_th232.getUnlocalizedName()); - GameRegistry.registerItem(rod_dual_th232, rod_dual_th232.getUnlocalizedName()); - GameRegistry.registerItem(rod_quad_th232, rod_quad_th232.getUnlocalizedName()); - - GameRegistry.registerItem(rod_u233, rod_u233.getUnlocalizedName()); - GameRegistry.registerItem(rod_dual_u233, rod_dual_u233.getUnlocalizedName()); - GameRegistry.registerItem(rod_quad_u233, rod_quad_u233.getUnlocalizedName()); - - GameRegistry.registerItem(rod_u235, rod_u235.getUnlocalizedName()); - GameRegistry.registerItem(rod_dual_u235, rod_dual_u235.getUnlocalizedName()); - GameRegistry.registerItem(rod_quad_u235, rod_quad_u235.getUnlocalizedName()); - - GameRegistry.registerItem(rod_u238, rod_u238.getUnlocalizedName()); - GameRegistry.registerItem(rod_dual_u238, rod_dual_u238.getUnlocalizedName()); - GameRegistry.registerItem(rod_quad_u238, rod_quad_u238.getUnlocalizedName()); - - GameRegistry.registerItem(rod_plutonium, rod_plutonium.getUnlocalizedName()); - GameRegistry.registerItem(rod_dual_plutonium, rod_dual_plutonium.getUnlocalizedName()); - GameRegistry.registerItem(rod_quad_plutonium, rod_quad_plutonium.getUnlocalizedName()); - - GameRegistry.registerItem(rod_pu238, rod_pu238.getUnlocalizedName()); - GameRegistry.registerItem(rod_dual_pu238, rod_dual_pu238.getUnlocalizedName()); - GameRegistry.registerItem(rod_quad_pu238, rod_quad_pu238.getUnlocalizedName()); - - GameRegistry.registerItem(rod_pu239, rod_pu239.getUnlocalizedName()); - GameRegistry.registerItem(rod_dual_pu239, rod_dual_pu239.getUnlocalizedName()); - GameRegistry.registerItem(rod_quad_pu239, rod_quad_pu239.getUnlocalizedName()); - - GameRegistry.registerItem(rod_pu240, rod_pu240.getUnlocalizedName()); - GameRegistry.registerItem(rod_dual_pu240, rod_dual_pu240.getUnlocalizedName()); - GameRegistry.registerItem(rod_quad_pu240, rod_quad_pu240.getUnlocalizedName()); - - GameRegistry.registerItem(rod_neptunium, rod_neptunium.getUnlocalizedName()); - GameRegistry.registerItem(rod_dual_neptunium, rod_dual_neptunium.getUnlocalizedName()); - GameRegistry.registerItem(rod_quad_neptunium, rod_quad_neptunium.getUnlocalizedName()); - - GameRegistry.registerItem(rod_polonium, rod_polonium.getUnlocalizedName()); - GameRegistry.registerItem(rod_dual_polonium, rod_dual_polonium.getUnlocalizedName()); - GameRegistry.registerItem(rod_quad_polonium, rod_quad_polonium.getUnlocalizedName()); - - GameRegistry.registerItem(rod_lead, rod_lead.getUnlocalizedName()); - GameRegistry.registerItem(rod_dual_lead, rod_dual_lead.getUnlocalizedName()); - GameRegistry.registerItem(rod_quad_lead, rod_quad_lead.getUnlocalizedName()); - - GameRegistry.registerItem(rod_schrabidium, rod_schrabidium.getUnlocalizedName()); - GameRegistry.registerItem(rod_dual_schrabidium, rod_dual_schrabidium.getUnlocalizedName()); - GameRegistry.registerItem(rod_quad_schrabidium, rod_quad_schrabidium.getUnlocalizedName()); - - GameRegistry.registerItem(rod_solinium, rod_solinium.getUnlocalizedName()); - 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()); - - GameRegistry.registerItem(rod_coolant, rod_coolant.getUnlocalizedName()); - GameRegistry.registerItem(rod_dual_coolant, rod_dual_coolant.getUnlocalizedName()); - GameRegistry.registerItem(rod_quad_coolant, rod_quad_coolant.getUnlocalizedName()); - - GameRegistry.registerItem(rod_lithium, rod_lithium.getUnlocalizedName()); - GameRegistry.registerItem(rod_dual_lithium, rod_dual_lithium.getUnlocalizedName()); - GameRegistry.registerItem(rod_quad_lithium, rod_quad_lithium.getUnlocalizedName()); - - GameRegistry.registerItem(rod_tritium, rod_tritium.getUnlocalizedName()); - GameRegistry.registerItem(rod_dual_tritium, rod_dual_tritium.getUnlocalizedName()); - GameRegistry.registerItem(rod_quad_tritium, rod_quad_tritium.getUnlocalizedName()); - - GameRegistry.registerItem(rod_balefire, rod_balefire.getUnlocalizedName()); - GameRegistry.registerItem(rod_dual_balefire, rod_dual_balefire.getUnlocalizedName()); - GameRegistry.registerItem(rod_quad_balefire, rod_quad_balefire.getUnlocalizedName()); - - GameRegistry.registerItem(rod_balefire_blazing, rod_balefire_blazing.getUnlocalizedName()); - GameRegistry.registerItem(rod_dual_balefire_blazing, rod_dual_balefire_blazing.getUnlocalizedName()); - GameRegistry.registerItem(rod_quad_balefire_blazing, rod_quad_balefire_blazing.getUnlocalizedName()); - - GameRegistry.registerItem(rod_euphemium, rod_euphemium.getUnlocalizedName()); - GameRegistry.registerItem(rod_australium, rod_australium.getUnlocalizedName()); - GameRegistry.registerItem(rod_weidanium, rod_weidanium.getUnlocalizedName()); - GameRegistry.registerItem(rod_reiium, rod_reiium.getUnlocalizedName()); - GameRegistry.registerItem(rod_unobtainium, rod_unobtainium.getUnlocalizedName()); - GameRegistry.registerItem(rod_daffergon, rod_daffergon.getUnlocalizedName()); - 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()); - GameRegistry.registerItem(rod_dual_waste, rod_dual_waste.getUnlocalizedName()); - GameRegistry.registerItem(rod_quad_waste, rod_quad_waste.getUnlocalizedName()); + GameRegistry.registerItem(rod_quad, rod_quad.getUnlocalizedName()); //ZIRNOX parts GameRegistry.registerItem(rod_zirnox_empty, rod_zirnox_empty.getUnlocalizedName()); @@ -6748,15 +6447,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 +6457,28 @@ 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_ra226be, waste_plate_ra226be.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_ra226be, plate_fuel_ra226be.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()); @@ -7577,11 +7284,10 @@ public class ModItems { GameRegistry.registerItem(radaway_flush, radaway_flush.getUnlocalizedName()); GameRegistry.registerItem(radx, radx.getUnlocalizedName()); GameRegistry.registerItem(siox, siox.getUnlocalizedName()); + GameRegistry.registerItem(pirfenidone, pirfenidone.getUnlocalizedName()); GameRegistry.registerItem(pill_iodine, pill_iodine.getUnlocalizedName()); GameRegistry.registerItem(xanax, xanax.getUnlocalizedName()); - GameRegistry.registerItem(chocolate, chocolate.getUnlocalizedName()); GameRegistry.registerItem(fmn, fmn.getUnlocalizedName()); - GameRegistry.registerItem(pirfenidone, pirfenidone.getUnlocalizedName()); GameRegistry.registerItem(five_htp, five_htp.getUnlocalizedName()); GameRegistry.registerItem(plan_c, plan_c.getUnlocalizedName()); GameRegistry.registerItem(stealth_boy, stealth_boy.getUnlocalizedName()); @@ -7624,6 +7330,7 @@ public class ModItems { GameRegistry.registerItem(canteen_vodka, canteen_vodka.getUnlocalizedName()); GameRegistry.registerItem(canteen_fab, canteen_fab.getUnlocalizedName()); GameRegistry.registerItem(mucho_mango, mucho_mango.getUnlocalizedName()); + GameRegistry.registerItem(chocolate, chocolate.getUnlocalizedName()); //Energy Drinks GameRegistry.registerItem(can_empty, can_empty.getUnlocalizedName()); diff --git a/src/main/java/com/hbm/items/machine/ItemBreedingRod.java b/src/main/java/com/hbm/items/machine/ItemBreedingRod.java new file mode 100644 index 000000000..76efdb7e6 --- /dev/null +++ b/src/main/java/com/hbm/items/machine/ItemBreedingRod.java @@ -0,0 +1,30 @@ +package com.hbm.items.machine; + +import com.hbm.items.ItemEnumMulti; + +public class ItemBreedingRod extends ItemEnumMulti { + + public ItemBreedingRod() { + super(BreedingRodType.class, true, true); + } + + public enum BreedingRodType { + LITHIUM, + TRITIUM, + CO, + CO60, + TH232, + THF, + U235, + NP237, + U238, + PU238, + PU239, + RGP, + WASTE, + + //Required for prototype + LEAD, + URANIUM + } +} 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..c9b873db0 --- /dev/null +++ b/src/main/java/com/hbm/items/machine/ItemPlateFuel.java @@ -0,0 +1,76 @@ +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(), + PASSIVE(); + + private FunctionEnum() { } + } + + public String getFunctionDesc() { + switch(this.function) { + case LOGARITHM: return "f(x) = log10(x + 1) * 0.5 * " + reactivity; + case SQUARE_ROOT: return "f(x) = sqrt(x) * " + reactivity + " / 10"; + case NEGATIVE_QUADRATIC: return "f(x) = [x - (x² / 10000)] / 100 * " + reactivity; + case LINEAR: return "f(x) = x / 100 * " + reactivity; + case PASSIVE: return "f(x) = " + reactivity; + default: return "x"; + } + } + + public int react(World world, ItemStack stack, int flux) { + if(this.function != FunctionEnum.PASSIVE) + 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); + case PASSIVE: + setLifeTime(stack, getLifeTime(stack) + reactivity); + return 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/ItemReactorSensor.java b/src/main/java/com/hbm/items/machine/ItemReactorSensor.java index ebc05a372..833ee42a9 100644 --- a/src/main/java/com/hbm/items/machine/ItemReactorSensor.java +++ b/src/main/java/com/hbm/items/machine/ItemReactorSensor.java @@ -18,8 +18,7 @@ public class ItemReactorSensor extends Item { Block b = world.getBlock(x, y, z); - if (b == ModBlocks.machine_reactor_small || b == ModBlocks.dummy_block_reactor_small - || b == ModBlocks.dummy_port_reactor_small) { + if (b == ModBlocks.reactor_research) { if (stack.stackTagCompound == null) stack.stackTagCompound = new NBTTagCompound(); @@ -35,36 +34,6 @@ public class ItemReactorSensor extends Item { } - if (b == ModBlocks.reactor_hatch || b == ModBlocks.reactor_ejector - || b == ModBlocks.reactor_inserter) { - - int meta = world.getBlockMetadata(x, y, z); - - switch(meta) { - case 2: z += 2; break; - case 3: z -= 2; break; - case 4: x += 2; break; - case 5: x -= 2; break; - } - } - - b = world.getBlock(x, y, z); - - if (b == ModBlocks.reactor_computer) { - - if (stack.stackTagCompound == null) - stack.stackTagCompound = new NBTTagCompound(); - - stack.stackTagCompound.setInteger("x", x); - stack.stackTagCompound.setInteger("y", y); - stack.stackTagCompound.setInteger("z", z); - - world.playSoundAtEntity(player, "hbm:item.techBoop", 1.0F, 1.0F); - - player.swingItem(); - return true; - } - return false; } 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/items/special/ItemCustomLore.java b/src/main/java/com/hbm/items/special/ItemCustomLore.java index 70274f8e5..cc3a1333e 100644 --- a/src/main/java/com/hbm/items/special/ItemCustomLore.java +++ b/src/main/java/com/hbm/items/special/ItemCustomLore.java @@ -96,12 +96,6 @@ public class ItemCustomLore extends Item { list.add("a great taste in shades of green."); } - if(this == ModItems.rod_quad_euphemium) - { - list.add("A quad fuel rod which contains a"); - list.add("very small ammount of a strange new element."); - } - if(this == ModItems.ingot_euphemium) { list.add("A very special and yet strange element."); @@ -128,21 +122,6 @@ public class ItemCustomLore extends Item { list.add("It stopped ticking at 2:34."); } - if(this == ModItems.rod_lithium) - { - list.add("Turns into Tritium Rod"); - } - - if(this == ModItems.rod_dual_lithium) - { - list.add("Turns into Dual Tritium Rod"); - } - - if(this == ModItems.rod_quad_lithium) - { - list.add("Turns into Quad Tritium Rod"); - } - if(this == ModItems.tritium_deuterium_cake) { list.add("Not actual cake, but great"); @@ -390,7 +369,7 @@ public class ItemCustomLore extends Item { public EnumRarity getRarity(ItemStack p_77613_1_) { if(this == ModItems.nugget_euphemium || this == ModItems.ingot_euphemium || - this == ModItems.rod_quad_euphemium || this == ModItems.plate_euphemium || + this == ModItems.plate_euphemium || this == ModItems.watch || this == ModItems.powder_iodine || this == ModItems.powder_thorium || this == ModItems.powder_neodymium || this == ModItems.powder_neptunium || this == ModItems.powder_astatine || @@ -402,8 +381,7 @@ public class ItemCustomLore extends Item { return EnumRarity.epic; } - if(this == ModItems.rod_schrabidium || this == ModItems.rod_dual_schrabidium || - this == ModItems.rod_quad_schrabidium || this == ModItems.ingot_schrabidium || + if(this == ModItems.ingot_schrabidium || this == ModItems.nugget_schrabidium || this == ModItems.plate_schrabidium || this == ModItems.cell_sas3 || this == ModItems.powder_schrabidium || this == ModItems.wire_schrabidium || this == ModItems.circuit_schrabidium || diff --git a/src/main/java/com/hbm/items/special/ItemStarterKit.java b/src/main/java/com/hbm/items/special/ItemStarterKit.java index 004c1e178..3459aadb9 100644 --- a/src/main/java/com/hbm/items/special/ItemStarterKit.java +++ b/src/main/java/com/hbm/items/special/ItemStarterKit.java @@ -6,6 +6,7 @@ import com.hbm.blocks.ModBlocks; import com.hbm.handler.FluidTypeHandler.FluidType; import com.hbm.items.ModItems; import com.hbm.items.machine.ItemBattery; +import com.hbm.items.machine.ItemBreedingRod.BreedingRodType; import com.hbm.lib.Library; import cpw.mods.fml.relauncher.Side; @@ -107,11 +108,11 @@ public class ItemStarterKit extends Item { player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_difurnace_off, 1)); player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_gascent, 1)); player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_puf6_tank, 1)); - player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_reactor, 1)); + player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_reactor_breeding, 1)); player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_nuke_furnace_off, 1)); player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_assembler, 1)); player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_chemplant, 1)); - player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_reactor_small, 1)); + player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.reactor_research, 1)); player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_turbine, 2)); player.inventory.addItemStackToInventory(new ItemStack(ModItems.radaway, 8)); player.inventory.addItemStackToInventory(new ItemStack(ModItems.radx, 2)); @@ -182,9 +183,9 @@ public class ItemStarterKit extends Item { player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_centrifuge, 2)); player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_uf6_tank, 2)); player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_puf6_tank, 2)); - player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_reactor, 2)); + player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_reactor_breeding, 2)); player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_rtg_furnace_off, 2)); - player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_reactor_small, 4)); + player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.reactor_research, 4)); player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_turbine, 4)); player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_radgen, 1)); player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_rtg_grey, 1)); @@ -256,7 +257,7 @@ public class ItemStarterKit extends Item { player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_nuke_furnace_off, 2)); player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_rtg_furnace_off, 3)); player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_rtg_grey, 2)); - player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_reactor_small, 8)); + player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.reactor_research, 8)); player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_turbine, 16)); player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_lithium_battery, 4)); player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.red_cable, 32)); @@ -509,16 +510,9 @@ public class ItemStarterKit extends Item { player.inventory.addItemStackToInventory(new ItemStack(Item.getItemFromBlock(ModBlocks.nuke_prototype), 1)); player.inventory.addItemStackToInventory(new ItemStack(ModItems.igniter, 1)); player.inventory.addItemStackToInventory(new ItemStack(ModItems.cell_sas3, 4)); - player.inventory.addItemStackToInventory(new ItemStack(ModItems.rod_quad_uranium, 1)); - player.inventory.addItemStackToInventory(new ItemStack(ModItems.rod_quad_uranium, 1)); - player.inventory.addItemStackToInventory(new ItemStack(ModItems.rod_quad_lead, 1)); - player.inventory.addItemStackToInventory(new ItemStack(ModItems.rod_quad_lead, 1)); - player.inventory.addItemStackToInventory(new ItemStack(ModItems.rod_quad_neptunium, 1)); - player.inventory.addItemStackToInventory(new ItemStack(ModItems.rod_quad_neptunium, 1)); - player.inventory.addItemStackToInventory(new ItemStack(ModItems.rod_quad_lead, 1)); - player.inventory.addItemStackToInventory(new ItemStack(ModItems.rod_quad_lead, 1)); - player.inventory.addItemStackToInventory(new ItemStack(ModItems.rod_quad_uranium, 1)); - player.inventory.addItemStackToInventory(new ItemStack(ModItems.rod_quad_uranium, 1)); + player.inventory.addItemStackToInventory(new ItemStack(ModItems.rod_quad, 4, BreedingRodType.URANIUM.ordinal())); + player.inventory.addItemStackToInventory(new ItemStack(ModItems.rod_quad, 4, BreedingRodType.LEAD.ordinal())); + player.inventory.addItemStackToInventory(new ItemStack(ModItems.rod_quad, 2, BreedingRodType.NP237.ordinal())); giveHaz(world, player, 2); } diff --git a/src/main/java/com/hbm/lib/HbmChestContents.java b/src/main/java/com/hbm/lib/HbmChestContents.java index 395071e9e..445eed5f2 100644 --- a/src/main/java/com/hbm/lib/HbmChestContents.java +++ b/src/main/java/com/hbm/lib/HbmChestContents.java @@ -5,6 +5,7 @@ import java.util.Random; import com.hbm.blocks.ModBlocks; import com.hbm.items.ModItems; import com.hbm.items.machine.ItemBattery; +import com.hbm.items.machine.ItemBreedingRod.*; import net.minecraft.init.Items; import net.minecraft.item.Item; @@ -112,13 +113,13 @@ public class HbmChestContents { new WeightedRandomChestContent(ModItems.nugget_u238, 0, 3, 12, 5), new WeightedRandomChestContent(ModItems.nugget_pu240, 0, 3, 8, 5), new WeightedRandomChestContent(ModItems.nugget_neptunium, 0, 1, 4, 3), - new WeightedRandomChestContent(ModItems.rod_u238, 0, 1, 1, 3), - new WeightedRandomChestContent(ModItems.rod_neptunium, 0, 1, 1, 4), - new WeightedRandomChestContent(ModItems.rod_pu240, 0, 1, 1, 3), - new WeightedRandomChestContent(ModItems.rod_dual_u238, 0, 1, 1, 3), - new WeightedRandomChestContent(ModItems.rod_dual_pu240, 0, 1, 1, 3), - new WeightedRandomChestContent(ModItems.rod_quad_u238, 0, 1, 1, 3), - new WeightedRandomChestContent(ModItems.rod_quad_pu240, 0, 1, 1, 3), + new WeightedRandomChestContent(ModItems.rod, BreedingRodType.U238.ordinal(), 1, 1, 3), + new WeightedRandomChestContent(ModItems.rod, BreedingRodType.NP237.ordinal(), 1, 1, 4), + new WeightedRandomChestContent(ModItems.rod, BreedingRodType.RGP.ordinal(), 1, 1, 3), + new WeightedRandomChestContent(ModItems.rod_dual, BreedingRodType.U238.ordinal(), 1, 1, 3), + new WeightedRandomChestContent(ModItems.rod_dual, BreedingRodType.RGP.ordinal(), 1, 1, 3), + new WeightedRandomChestContent(ModItems.rod_quad, BreedingRodType.U238.ordinal(), 1, 1, 3), + new WeightedRandomChestContent(ModItems.rod_quad, BreedingRodType.RGP.ordinal(), 1, 1, 3), new WeightedRandomChestContent(ModItems.bottle_quantum, 0, 1, 1, 1), new WeightedRandomChestContent(ModItems.gas_mask_m65, 60, 1, 1, 5), new WeightedRandomChestContent(ModItems.hazmat_kit, 0, 1, 1, 1), @@ -129,21 +130,21 @@ public class HbmChestContents { new WeightedRandomChestContent(ModItems.nugget_u235, 0, 3, 12, 5), new WeightedRandomChestContent(ModItems.nugget_pu238, 0, 3, 12, 5), new WeightedRandomChestContent(ModItems.nugget_pu239, 0, 3, 12, 5), - new WeightedRandomChestContent(ModItems.rod_u235, 0, 1, 1, 3), - new WeightedRandomChestContent(ModItems.rod_pu239, 0, 1, 1, 3), - new WeightedRandomChestContent(ModItems.rod_dual_u235, 0, 1, 1, 3), - 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, BreedingRodType.U235.ordinal(), 1, 1, 3), + new WeightedRandomChestContent(ModItems.rod, BreedingRodType.PU239.ordinal(), 1, 1, 3), + new WeightedRandomChestContent(ModItems.rod_dual, BreedingRodType.U235.ordinal(), 1, 1, 3), + new WeightedRandomChestContent(ModItems.rod_dual, BreedingRodType.PU239.ordinal(), 1, 1, 3), + new WeightedRandomChestContent(ModItems.rod_quad, BreedingRodType.U235.ordinal(), 1, 1, 3), + new WeightedRandomChestContent(ModItems.rod_quad, BreedingRodType.PU239.ordinal(), 1, 1, 3), + 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_thorium_fuel, 0, 1, 1, 3), + new WeightedRandomChestContent(ModItems.rod_dual, BreedingRodType.THF.ordinal(), 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 +168,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.rod, BreedingRodType.U235.ordinal(), 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/lib/Library.java b/src/main/java/com/hbm/lib/Library.java index b2e14fac0..05d7252cc 100644 --- a/src/main/java/com/hbm/lib/Library.java +++ b/src/main/java/com/hbm/lib/Library.java @@ -1,10 +1,14 @@ package com.hbm.lib; +import java.math.BigDecimal; +import java.math.RoundingMode; import java.util.ArrayList; import java.util.List; import java.util.Random; import java.util.Set; +import javax.annotation.Nonnegative; + import com.google.common.collect.Sets; import com.hbm.blocks.ModBlocks; import com.hbm.calc.UnionOfTileEntitiesAndBooleansForFluids; @@ -83,6 +87,26 @@ public class Library { "5bf069bc-5b46-4179-aafe-35c0a07dee8b", //JMF781 }); + /** + * Rounds a number to so many significant digits + * @param num The number to round + * @param digits Amount of digits + * @return The rounded double + */ + public static double roundDecimal(double num, @Nonnegative int digits) + { + if (digits < 0) + throw new IllegalArgumentException("Attempted negative number in non-negative field! Attempted value: " + digits); + + return new BigDecimal(num).setScale(digits, RoundingMode.HALF_UP).doubleValue(); + } + + + public static boolean getBlink() + { + return System.currentTimeMillis() % 1000 < 500; + } + //the old list that allowed superuser mode for the ZOMG //currently unused public static List superuser = new ArrayList(); @@ -152,7 +176,6 @@ public class Library { world.getBlock(x, y, z) == ModBlocks.dummy_port_ams_limiter || world.getBlock(x, y, z) == ModBlocks.dummy_port_ams_emitter || world.getBlock(x, y, z) == ModBlocks.dummy_port_ams_base || - world.getBlock(x, y, z) == ModBlocks.dummy_port_reactor_small || world.getBlock(x, y, z) == ModBlocks.dummy_port_compact_launcher || world.getBlock(x, y, z) == ModBlocks.dummy_port_launch_table || world.getBlock(x, y, z) == ModBlocks.rbmk_loader) { @@ -518,11 +541,6 @@ public class Library { { tileentity = worldObj.getTileEntity(((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetX, ((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetY, ((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetZ); } - //Small Nuclear Reactor - if(block == ModBlocks.dummy_port_reactor_small) - { - tileentity = worldObj.getTileEntity(((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetX, ((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetY, ((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetZ); - } //Launchers if(block == ModBlocks.dummy_port_compact_launcher || block == ModBlocks.dummy_port_launch_table) { diff --git a/src/main/java/com/hbm/main/ClientProxy.java b/src/main/java/com/hbm/main/ClientProxy.java index de46c9abf..6b3d1776c 100644 --- a/src/main/java/com/hbm/main/ClientProxy.java +++ b/src/main/java/com/hbm/main/ClientProxy.java @@ -182,7 +182,7 @@ public class ClientProxy extends ServerProxy { ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineRadGen.class, new RenderRadGen()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineRadar.class, new RenderRadar()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineSeleniumEngine.class, new RenderSelenium()); - ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineReactorSmall.class, new RenderSmallReactor()); + ClientRegistry.bindTileEntitySpecialRenderer(TileEntityReactorResearch.class, new RenderSmallReactor()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineShredderLarge.class, new RenderMachineShredder()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTesla.class, new RenderTesla()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBarrel.class, new RenderFluidBarrel()); @@ -194,7 +194,7 @@ public class ClientProxy extends ServerProxy { ClientRegistry.bindTileEntitySpecialRenderer(TileEntityForceField.class, new RenderMachineForceField()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineFENSU.class, new RenderFENSU()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineLargeTurbine.class, new RenderBigTurbine()); - ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineReactor.class, new RenderBreeder()); + ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineReactorBreeding.class, new RenderBreeder()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySolarBoiler.class, new RenderSolarBoiler()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityStorageDrum.class, new RenderStorageDrum()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityChungus.class, new RenderChungus()); diff --git a/src/main/java/com/hbm/main/CraftingManager.java b/src/main/java/com/hbm/main/CraftingManager.java index 15baebddc..7a338d8f9 100644 --- a/src/main/java/com/hbm/main/CraftingManager.java +++ b/src/main/java/com/hbm/main/CraftingManager.java @@ -614,7 +614,7 @@ public class CraftingManager { addRecipeAuto(new ItemStack(ModBlocks.vent_pink_cloud), new Object[] { "IGI", "ICI", "IDI", 'I', IRON.plate(), 'G', Blocks.iron_bars, 'C', ModItems.grenade_pink_cloud, 'D', Blocks.dispenser }); addRecipeAuto(new ItemStack(ModBlocks.spikes, 4), new Object[] { "FFF", "BBB", "TTT", 'F', Items.flint, 'B', ModItems.bolt_tungsten, 'T', W.ingot() }); addRecipeAuto(new ItemStack(ModItems.custom_fall, 1), new Object[] { "IIP", "CHW", "IIP", 'I', ModItems.plate_polymer, 'P', BIGMT.plate(), 'C', ModItems.circuit_red_copper, 'H', ModItems.hull_small_steel, 'W', ModItems.coil_copper }); - addRecipeAuto(new ItemStack(ModBlocks.machine_controller, 1), new Object[] { "PGP", "ICI", "PRP", 'P', ModItems.plate_desh, 'G', KEY_ANYPANE, 'I', POLYMER.ingot(), 'R', REDSTONE.block(), 'C', ModItems.circuit_targeting_tier4 }); + addRecipeAuto(new ItemStack(ModBlocks.machine_controller, 1), new Object[] { "TDT", "DCD", "TDT", 'T', TCALLOY.ingot(), 'D', ModItems.crt_display, 'C', ModItems.circuit_targeting_tier3 }); addRecipeAuto(new ItemStack(ModItems.containment_box, 1), new Object[] { "LLL", "LCL", "LLL", 'L', PB.plate(), 'C', Blocks.chest }); addRecipeAuto(new ItemStack(ModBlocks.absorber, 1), new Object[] { "ICI", "CPC", "ICI", 'I', CU.ingot(), 'C', COAL.dust(), 'P', PB.dust() }); @@ -777,7 +777,7 @@ public class CraftingManager { addRecipeAuto(new ItemStack(ModBlocks.rbmk_reflector, 1), new Object[] { "GGG", "GRG", "GGG", 'G', OreDictManager.getReflector(), 'R', ModBlocks.rbmk_blank }); addRecipeAuto(new ItemStack(ModBlocks.rbmk_control, 1), new Object[] { " B ", "GRG", " B ", 'G', GRAPHITE.ingot(), 'B', ModItems.motor, 'R', ModBlocks.rbmk_absorber }); addRecipeAuto(new ItemStack(ModBlocks.rbmk_control_mod, 1), new Object[] { "BGB", "GRG", "BGB", 'G', GRAPHITE.block(), 'R', ModBlocks.rbmk_control, 'B', ModItems.nugget_bismuth }); - addRecipeAuto(new ItemStack(ModBlocks.rbmk_control_auto, 1), new Object[] { "C", "R", "C", 'C', ModItems.circuit_targeting_tier1, 'R', ModBlocks.rbmk_control }); + addRecipeAuto(new ItemStack(ModBlocks.rbmk_control_auto, 1), new Object[] { "C", "R", "D", 'C', ModItems.circuit_targeting_tier1, 'R', ModBlocks.rbmk_control, 'D', ModItems.crt_display }); addRecipeAuto(new ItemStack(ModBlocks.rbmk_rod_reasim, 1), new Object[] { "ZCZ", "ZRZ", "ZCZ", 'C', ModItems.hull_small_steel, 'R', ModBlocks.rbmk_blank, 'Z', ZR.ingot() }); addRecipeAuto(new ItemStack(ModBlocks.rbmk_rod_reasim_mod, 1), new Object[] { "BGB", "GRG", "BGB", 'G', GRAPHITE.block(), 'R', ModBlocks.rbmk_rod_reasim, 'B', TCALLOY.ingot() }); addRecipeAuto(new ItemStack(ModBlocks.rbmk_outgasser, 1), new Object[] { "GHG", "GRG", "GTG", 'G', ModBlocks.steel_grate, 'H', Blocks.hopper, 'T', ModItems.tank_steel, 'R', ModBlocks.rbmk_blank }); diff --git a/src/main/java/com/hbm/main/MainRegistry.java b/src/main/java/com/hbm/main/MainRegistry.java index d00391ee2..732a5ef39 100644 --- a/src/main/java/com/hbm/main/MainRegistry.java +++ b/src/main/java/com/hbm/main/MainRegistry.java @@ -83,6 +83,7 @@ import com.hbm.saveddata.satellites.Satellite; import com.hbm.tileentity.TileMappings; import com.hbm.tileentity.bomb.TileEntityNukeCustom; import com.hbm.tileentity.machine.TileEntityMachineReactorLarge; +import com.hbm.tileentity.machine.TileEntityNukeFurnace; import com.hbm.tileentity.machine.rbmk.RBMKDials; import com.hbm.util.ArmorUtil; import com.hbm.world.feature.SchistStratum; @@ -945,7 +946,7 @@ public class MainRegistry { ShredderRecipes.registerOverrides(); CrystallizerRecipes.register(); CentrifugeRecipes.register(); - BreederRecipes.registerFuels(); + TileEntityNukeFurnace.registerFuels(); BreederRecipes.registerRecipes(); AssemblerRecipes.loadRecipes(); CyclotronRecipes.register(); diff --git a/src/main/java/com/hbm/main/ModEventHandlerClient.java b/src/main/java/com/hbm/main/ModEventHandlerClient.java index ceedd0ab9..53bd115d8 100644 --- a/src/main/java/com/hbm/main/ModEventHandlerClient.java +++ b/src/main/java/com/hbm/main/ModEventHandlerClient.java @@ -51,6 +51,7 @@ import com.hbm.sound.MovingSoundXVL1456; import com.hbm.tileentity.bomb.TileEntityNukeCustom; import com.hbm.tileentity.bomb.TileEntityNukeCustom.CustomNukeEntry; import com.hbm.tileentity.bomb.TileEntityNukeCustom.EnumEntryType; +import com.hbm.tileentity.machine.TileEntityNukeFurnace; import com.hbm.tileentity.machine.rbmk.TileEntityRBMKBase; import com.hbm.util.I18nUtil; import com.hbm.util.ArmorRegistry; @@ -562,13 +563,11 @@ public class ModEventHandlerClient { } } - /// BREEDING /// - int[] breeder = BreederRecipes.getFuelValue(stack); + /// NUCLEAR FURNACE FUELS /// + int breeder = TileEntityNukeFurnace.getFuelValue(stack); - if(breeder != null) { - list.add(BreederRecipes.getHEATString("[" + I18nUtil.resolveKey("trait.heat", breeder[0]) + "]", breeder[0])); - list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("trait.breeding", breeder[1])); - list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("trait.furnace", (breeder[0] * breeder[1] * 5))); + if(breeder != 0) { + list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("trait.furnace", (breeder * 5))); } /// CUSTOM NUKE /// diff --git a/src/main/java/com/hbm/main/NEIConfig.java b/src/main/java/com/hbm/main/NEIConfig.java index 8cdc52b8d..111b93602 100644 --- a/src/main/java/com/hbm/main/NEIConfig.java +++ b/src/main/java/com/hbm/main/NEIConfig.java @@ -20,8 +20,8 @@ public class NEIConfig implements IConfigureNEI { API.registerUsageHandler(new CentrifugeRecipeHandler()); API.registerRecipeHandler(new GasCentrifugeRecipeHandler()); API.registerUsageHandler(new GasCentrifugeRecipeHandler()); - API.registerRecipeHandler(new ReactorRecipeHandler()); - API.registerUsageHandler(new ReactorRecipeHandler()); + API.registerRecipeHandler(new BreederRecipeHandler()); + API.registerUsageHandler(new BreederRecipeHandler()); API.registerRecipeHandler(new ShredderRecipeHandler()); API.registerUsageHandler(new ShredderRecipeHandler()); API.registerRecipeHandler(new CMBFurnaceRecipeHandler()); @@ -95,7 +95,6 @@ public class NEIConfig implements IConfigureNEI { API.hideItem(new ItemStack(ModBlocks.dummy_block_ams_base)); API.hideItem(new ItemStack(ModBlocks.dummy_block_ams_emitter)); API.hideItem(new ItemStack(ModBlocks.dummy_block_ams_limiter)); - API.hideItem(new ItemStack(ModBlocks.dummy_block_reactor_small)); API.hideItem(new ItemStack(ModBlocks.dummy_block_radgen)); API.hideItem(new ItemStack(ModBlocks.dummy_block_vault)); API.hideItem(new ItemStack(ModBlocks.dummy_block_blast)); @@ -115,7 +114,6 @@ public class NEIConfig implements IConfigureNEI { API.hideItem(new ItemStack(ModBlocks.dummy_port_ams_base)); API.hideItem(new ItemStack(ModBlocks.dummy_port_ams_emitter)); API.hideItem(new ItemStack(ModBlocks.dummy_port_ams_limiter)); - API.hideItem(new ItemStack(ModBlocks.dummy_port_reactor_small)); API.hideItem(new ItemStack(ModBlocks.dummy_port_radgen)); API.hideItem(new ItemStack(ModBlocks.dummy_port_compact_launcher)); API.hideItem(new ItemStack(ModBlocks.dummy_port_launch_table)); diff --git a/src/main/java/com/hbm/packet/AuxButtonPacket.java b/src/main/java/com/hbm/packet/AuxButtonPacket.java index 6d4605267..9524aa208 100644 --- a/src/main/java/com/hbm/packet/AuxButtonPacket.java +++ b/src/main/java/com/hbm/packet/AuxButtonPacket.java @@ -15,9 +15,7 @@ import com.hbm.tileentity.machine.TileEntityMachineBattery; import com.hbm.tileentity.machine.TileEntityMachineMiningLaser; import com.hbm.tileentity.machine.TileEntityMachineMissileAssembly; import com.hbm.tileentity.machine.TileEntityMachineReactorLarge; -import com.hbm.tileentity.machine.TileEntityMachineReactorSmall; import com.hbm.tileentity.machine.TileEntityRadioRec; -import com.hbm.tileentity.machine.TileEntityReactorControl; import com.hbm.tileentity.machine.TileEntityReactorZirnox; import com.hbm.tileentity.machine.TileEntitySoyuzLauncher; @@ -81,30 +79,6 @@ public class AuxButtonPacket implements IMessage { //try { TileEntity te = p.worldObj.getTileEntity(m.x, m.y, m.z); - if (te instanceof TileEntityMachineReactorSmall) { - TileEntityMachineReactorSmall reactor = (TileEntityMachineReactorSmall)te; - - 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) { TileEntityRadioRec radio = (TileEntityRadioRec)te; @@ -123,66 +97,6 @@ public class AuxButtonPacket implements IMessage { field.isOn = !field.isOn; } - if (te instanceof TileEntityReactorControl) { - TileEntityReactorControl control = (TileEntityReactorControl)te; - - if(m.id == 1) - control.auto = m.value == 1; - - if(control.linkY > -1) { - TileEntity reac = p.worldObj.getTileEntity(control.linkX, control.linkY, control.linkZ); - - if (reac instanceof TileEntityMachineReactorSmall) { - TileEntityMachineReactorSmall reactor = (TileEntityMachineReactorSmall)reac; - - if(m.id == 0) - reactor.retracting = m.value == 0; - - if(m.id == 2) { - FluidType type = FluidType.STEAM; - int fill = reactor.tanks[2].getFill(); - - switch(m.value) { - case 0: type = FluidType.STEAM; fill = (int)Math.floor(fill * 100); break; - case 1: type = FluidType.HOTSTEAM; fill = (int)Math.floor(fill / 10D); break; - case 2: type = FluidType.SUPERHOTSTEAM; fill = (int)Math.floor(fill / 10D); break; - } - - if(fill > reactor.tanks[2].getMaxFill()) - fill = reactor.tanks[2].getMaxFill(); - - reactor.tanks[2].setTankType(type); - reactor.tanks[2].setFill(fill); - } - } - - if (reac instanceof TileEntityMachineReactorLarge) { - TileEntityMachineReactorLarge reactor = (TileEntityMachineReactorLarge)reac; - - if(m.id == 0) { - reactor.rods = m.value; - } - - if(m.id == 2) { - FluidType type = FluidType.STEAM; - int fill = reactor.tanks[2].getFill(); - - switch(m.value) { - case 0: type = FluidType.STEAM; fill = (int)Math.floor(fill * 100); break; - case 1: type = FluidType.HOTSTEAM; fill = (int)Math.floor(fill / 10D); break; - case 2: type = FluidType.SUPERHOTSTEAM; fill = (int)Math.floor(fill / 10D); 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 TileEntityMachineReactorLarge) { TileEntityMachineReactorLarge reactor = (TileEntityMachineReactorLarge)te; @@ -285,23 +199,6 @@ public class AuxButtonPacket implements IMessage { base.handleButtonPacket(m.value, m.id); } - if(te instanceof TileEntityReactorZirnox) { - TileEntityReactorZirnox zirnox = (TileEntityReactorZirnox)te; - - if(m.id == 0) { - zirnox.isOn = !zirnox.isOn; - } - - if(m.id == 1) { - int fill = zirnox.carbonDioxide.getFill(); - zirnox.carbonDioxide.setFill(fill - 1000); - if(zirnox.carbonDioxide.getFill() < 0) { - zirnox.carbonDioxide.setFill(0); - } - } - - } - //why make new packets when you can just abuse and uglify the existing ones? if(te == null && m.value == 999) { diff --git a/src/main/java/com/hbm/packet/AuxGaugePacket.java b/src/main/java/com/hbm/packet/AuxGaugePacket.java index 78f2a3a88..a1351a5b6 100644 --- a/src/main/java/com/hbm/packet/AuxGaugePacket.java +++ b/src/main/java/com/hbm/packet/AuxGaugePacket.java @@ -23,7 +23,6 @@ import com.hbm.tileentity.machine.TileEntityMachineReactorLarge; import com.hbm.tileentity.machine.TileEntityMachineReactorLarge.ReactorFuelType; import com.hbm.tileentity.turret.TileEntityTurretCIWS; import com.hbm.tileentity.turret.TileEntityTurretCheapo; -import com.hbm.tileentity.machine.TileEntityMachineReactorSmall; import com.hbm.tileentity.machine.TileEntityMachineSeleniumEngine; import com.hbm.tileentity.machine.TileEntityRadioRec; @@ -135,18 +134,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/packet/PacketDispatcher.java b/src/main/java/com/hbm/packet/PacketDispatcher.java index 2ef05a056..da1a20e05 100644 --- a/src/main/java/com/hbm/packet/PacketDispatcher.java +++ b/src/main/java/com/hbm/packet/PacketDispatcher.java @@ -73,8 +73,6 @@ public class PacketDispatcher { wrapper.registerMessage(LoopedEntitySoundPacket.Handler.class, LoopedEntitySoundPacket.class, i++, Side.CLIENT); //Entity sound packet that keeps client and server separated wrapper.registerMessage(TEFFPacket.Handler.class, TEFFPacket.class, i++, Side.CLIENT); - //Information packet for the reactor control block - wrapper.registerMessage(TEControlPacket.Handler.class, TEControlPacket.class, i++, Side.CLIENT); //Sends button information for ItemGunBase wrapper.registerMessage(GunButtonPacket.Handler.class, GunButtonPacket.class, i++, Side.SERVER); //Packet to send block break particles diff --git a/src/main/java/com/hbm/packet/TEControlPacket.java b/src/main/java/com/hbm/packet/TEControlPacket.java deleted file mode 100644 index 8ef4a53b2..000000000 --- a/src/main/java/com/hbm/packet/TEControlPacket.java +++ /dev/null @@ -1,138 +0,0 @@ -package com.hbm.packet; - -import com.hbm.tileentity.machine.TileEntityReactorControl; - -import cpw.mods.fml.common.network.simpleimpl.IMessage; -import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; -import cpw.mods.fml.common.network.simpleimpl.MessageContext; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import io.netty.buffer.ByteBuf; -import net.minecraft.client.Minecraft; -import net.minecraft.tileentity.TileEntity; - -public class TEControlPacket implements IMessage { - - int x; - int y; - int z; - int hullHeat; - int coreHeat; - int fuel; - int water; - int cool; - int steam; - int maxWater; - int maxCool; - int maxSteam; - int compression; - int rods; - int maxRods; - boolean isOn; - boolean auto; - boolean isLinked; - - public TEControlPacket() { - - } - - public TEControlPacket(int x, int y, int z, int hullHeat, int coreHeat, int fuel, int water, int cool, int steam, int maxWater, int maxCool, int maxSteam, int compression, int rods, int maxRods, boolean isOn, boolean auto, boolean isLinked) { - this.x = x; - this.y = y; - this.z = z; - this.hullHeat = hullHeat; - this.coreHeat = coreHeat; - this.fuel = fuel; - this.water = water; - this.cool = cool; - this.steam = steam; - this.maxWater = maxWater; - this.maxCool = maxCool; - this.maxSteam = maxSteam; - this.compression = compression; - this.rods = rods; - this.maxRods = maxRods; - this.isOn = isOn; - this.auto = auto; - this.isLinked = isLinked; - } - - @Override - public void fromBytes(ByteBuf buf) { - x = buf.readInt(); - y = buf.readInt(); - z = buf.readInt(); - hullHeat = buf.readInt(); - coreHeat = buf.readInt(); - fuel = buf.readInt(); - water = buf.readInt(); - cool = buf.readInt(); - steam = buf.readInt(); - maxWater = buf.readInt(); - maxCool = buf.readInt(); - maxSteam = buf.readInt(); - compression = buf.readInt(); - rods = buf.readInt(); - maxRods = buf.readInt(); - isOn = buf.readBoolean(); - auto = buf.readBoolean(); - isLinked = buf.readBoolean(); - } - - @Override - public void toBytes(ByteBuf buf) { - buf.writeInt(x); - buf.writeInt(y); - buf.writeInt(z); - buf.writeInt(hullHeat); - buf.writeInt(coreHeat); - buf.writeInt(fuel); - buf.writeInt(water); - buf.writeInt(cool); - buf.writeInt(steam); - buf.writeInt(maxWater); - buf.writeInt(maxCool); - buf.writeInt(maxSteam); - buf.writeInt(compression); - buf.writeInt(rods); - buf.writeInt(maxRods); - buf.writeBoolean(isOn); - buf.writeBoolean(auto); - buf.writeBoolean(isLinked); - } - - public static class Handler implements IMessageHandler { - - @Override - @SideOnly(Side.CLIENT) - public IMessage onMessage(TEControlPacket m, MessageContext ctx) { - TileEntity te = Minecraft.getMinecraft().theWorld.getTileEntity(m.x, m.y, m.z); - - try { - - if(te instanceof TileEntityReactorControl) { - TileEntityReactorControl control = (TileEntityReactorControl)te; - - control.hullHeat = m.hullHeat; - control.coreHeat = m.coreHeat; - control.fuel = m.fuel; - control.water = m.water; - control.cool = m.cool; - control.steam = m.steam; - control.maxWater = m.maxWater; - control.maxCool = m.maxCool; - control.maxSteam = m.maxSteam; - control.compression = m.compression; - control.rods = m.rods; - control.maxRods = m.maxRods; - control.isOn = m.isOn; - control.auto = m.auto; - control.isLinked = m.isLinked; - } - - } catch (Exception x) { - } - return null; - } - } -} diff --git a/src/main/java/com/hbm/render/item/ItemRenderLibrary.java b/src/main/java/com/hbm/render/item/ItemRenderLibrary.java index a8d512e0d..cd6c28b54 100644 --- a/src/main/java/com/hbm/render/item/ItemRenderLibrary.java +++ b/src/main/java/com/hbm/render/item/ItemRenderLibrary.java @@ -125,7 +125,7 @@ public class ItemRenderLibrary { GL11.glShadeModel(GL11.GL_FLAT); }}); - renderers.put(Item.getItemFromBlock(ModBlocks.machine_reactor), new ItemRenderBase() { + renderers.put(Item.getItemFromBlock(ModBlocks.machine_reactor_breeding), new ItemRenderBase() { public void renderInventory() { GL11.glTranslated(0, -4, 0); GL11.glScaled(4.5, 4.5, 4.5); @@ -172,7 +172,7 @@ public class ItemRenderLibrary { GL11.glEnable(GL11.GL_CULL_FACE); }}); - renderers.put(Item.getItemFromBlock(ModBlocks.machine_reactor_small), new ItemRenderBase() { + renderers.put(Item.getItemFromBlock(ModBlocks.reactor_research), new ItemRenderBase() { public void renderInventory() { GL11.glTranslated(0, -4, 0); GL11.glScaled(4, 4, 4); diff --git a/src/main/java/com/hbm/render/tileentity/RenderBreeder.java b/src/main/java/com/hbm/render/tileentity/RenderBreeder.java index 05d936eec..25c8659b7 100644 --- a/src/main/java/com/hbm/render/tileentity/RenderBreeder.java +++ b/src/main/java/com/hbm/render/tileentity/RenderBreeder.java @@ -5,7 +5,7 @@ import org.lwjgl.opengl.GL11; import com.hbm.blocks.BlockDummyable; import com.hbm.main.ResourceManager; import com.hbm.render.util.RenderSparks; -import com.hbm.tileentity.machine.TileEntityMachineReactor; +import com.hbm.tileentity.machine.TileEntityMachineReactorBreeding; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; @@ -30,9 +30,9 @@ public class RenderBreeder extends TileEntitySpecialRenderer { case 5: GL11.glRotatef(270, 0F, 1F, 0F); break; } - TileEntityMachineReactor breeder = (TileEntityMachineReactor) tile; + TileEntityMachineReactorBreeding breeder = (TileEntityMachineReactorBreeding) tile; - if(breeder.progress > 0) + if(breeder.progress > 0.0F) for(int i = 0; i < 3; i++) { GL11.glPushMatrix(); GL11.glRotatef((float) (Math.PI * i), 0F, 1F, 0F); diff --git a/src/main/java/com/hbm/render/tileentity/RenderSmallReactor.java b/src/main/java/com/hbm/render/tileentity/RenderSmallReactor.java index e2deecf55..9728ae856 100644 --- a/src/main/java/com/hbm/render/tileentity/RenderSmallReactor.java +++ b/src/main/java/com/hbm/render/tileentity/RenderSmallReactor.java @@ -1,9 +1,11 @@ package com.hbm.render.tileentity; +import java.util.Random; + import org.lwjgl.opengl.GL11; import com.hbm.main.ResourceManager; -import com.hbm.tileentity.machine.TileEntityMachineReactorSmall; +import com.hbm.tileentity.machine.TileEntityReactorResearch; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; @@ -19,20 +21,22 @@ public class RenderSmallReactor extends TileEntitySpecialRenderer { GL11.glDisable(GL11.GL_CULL_FACE); GL11.glRotatef(180, 0F, 1F, 0F); - TileEntityMachineReactorSmall reactor = (TileEntityMachineReactorSmall) tileEntity; + TileEntityReactorResearch reactor = (TileEntityReactorResearch) tileEntity; bindTexture(ResourceManager.reactor_small_base_tex); ResourceManager.reactor_small_base.renderAll(); - + + double level = (reactor.lastLevel + (reactor.level - reactor.lastLevel) * f); + GL11.glPushMatrix(); - GL11.glTranslated(0.0D, reactor.rods / 100D, 0.0D); + GL11.glTranslated(0.0D, level, 0.0D); bindTexture(ResourceManager.reactor_small_rods_tex); ResourceManager.reactor_small_rods.renderAll(); GL11.glPopMatrix(); - if(reactor.coreHeat > 0 && reactor.isSubmerged()) { + if(reactor.totalFlux > 10 && reactor.isSubmerged()) { GL11.glDisable(GL11.GL_TEXTURE_2D); GL11.glEnable(GL11.GL_BLEND); @@ -45,7 +49,7 @@ public class RenderSmallReactor extends TileEntitySpecialRenderer { for(double d = 0.285; d < 0.7; d += 0.025) { tess.startDrawingQuads(); - tess.setColorRGBA_F(0.4F, 0.9F, 1.0F, 0.15F); + tess.setColorRGBA_F(0.4F, 0.9F, 1.0F, 0.025F + (float) (Math.random() * 0.015F) + (0.125F * reactor.totalFlux / 1000F)); double top = 1.375; double bottom = 1.375; diff --git a/src/main/java/com/hbm/tileentity/TileMappings.java b/src/main/java/com/hbm/tileentity/TileMappings.java index 1973e4da7..bcabf0e86 100644 --- a/src/main/java/com/hbm/tileentity/TileMappings.java +++ b/src/main/java/com/hbm/tileentity/TileMappings.java @@ -32,7 +32,7 @@ public class TileMappings { put(TileEntityNukeMan.class, "tileentity_nukeman"); put(TileEntityMachineUF6Tank.class, "tileentity_uf6_tank"); put(TileEntityMachinePuF6Tank.class, "tileentity_puf6_tank"); - put(TileEntityMachineReactor.class, "tileentity_reactor"); + put(TileEntityMachineReactorBreeding.class, "tileentity_reactor"); put(TileEntityNukeFurnace.class, "tileentity_nukefurnace"); put(TileEntityRtgFurnace.class, "tileentity_rtgfurnace"); put(TileEntityMachineGenerator.class, "tileentity_generator"); @@ -110,7 +110,7 @@ public class TileMappings { put(TileEntityCelPrimeTanks.class, "tileentity_cel_prime_storage"); put(TileEntityMachineSeleniumEngine.class, "tileentity_selenium_engine"); put(TileEntityMachineSatLinker.class, "tileentity_satlinker"); - put(TileEntityMachineReactorSmall.class, "tileentity_small_reactor"); + put(TileEntityReactorResearch.class, "tileentity_small_reactor"); put(TileEntityVaultDoor.class, "tileentity_vault_door"); put(TileEntityRadiobox.class, "tileentity_radio_broadcaster"); put(TileEntityRadioRec.class, "tileentity_radio_receiver"); diff --git a/src/main/java/com/hbm/tileentity/bomb/TileEntityNukePrototype.java b/src/main/java/com/hbm/tileentity/bomb/TileEntityNukePrototype.java index eb5f9fd7f..f974d943e 100644 --- a/src/main/java/com/hbm/tileentity/bomb/TileEntityNukePrototype.java +++ b/src/main/java/com/hbm/tileentity/bomb/TileEntityNukePrototype.java @@ -1,6 +1,7 @@ package com.hbm.tileentity.bomb; import com.hbm.items.ModItems; +import com.hbm.items.machine.ItemBreedingRod.*; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -174,16 +175,16 @@ public class TileEntityNukePrototype extends TileEntity implements ISidedInvento if(slots[0] != null && slots[1] != null && slots[2] != null && slots[3] != null && slots[4] != null && slots[5] != null && slots[6] != null && slots[7] != null && slots[8] != null && slots[9] != null && slots[10] != null && slots[11] != null && slots[12] != null && slots[13] != null) if(slots[0].getItem() == ModItems.cell_sas3 && slots[1].getItem() == ModItems.cell_sas3 && - slots[2].getItem() == ModItems.rod_quad_uranium && - slots[3].getItem() == ModItems.rod_quad_uranium && - slots[4].getItem() == ModItems.rod_quad_lead && - slots[5].getItem() == ModItems.rod_quad_lead && - slots[6].getItem() == ModItems.rod_quad_neptunium && - slots[7].getItem() == ModItems.rod_quad_neptunium && - slots[8].getItem() == ModItems.rod_quad_lead && - slots[9].getItem() == ModItems.rod_quad_lead && - slots[10].getItem() == ModItems.rod_quad_uranium && - slots[11].getItem() == ModItems.rod_quad_uranium && + slots[2].isItemEqual(new ItemStack(ModItems.rod_quad, 1, BreedingRodType.URANIUM.ordinal())) && + slots[3].isItemEqual(new ItemStack(ModItems.rod_quad, 1, BreedingRodType.URANIUM.ordinal())) && + slots[4].isItemEqual(new ItemStack(ModItems.rod_quad, 1, BreedingRodType.LEAD.ordinal())) && + slots[5].isItemEqual(new ItemStack(ModItems.rod_quad, 1, BreedingRodType.LEAD.ordinal())) && + slots[6].isItemEqual(new ItemStack(ModItems.rod_quad, 1, BreedingRodType.NP237.ordinal())) && + slots[7].isItemEqual(new ItemStack(ModItems.rod_quad, 1, BreedingRodType.NP237.ordinal())) && + slots[8].isItemEqual(new ItemStack(ModItems.rod_quad, 1, BreedingRodType.LEAD.ordinal())) && + slots[9].isItemEqual(new ItemStack(ModItems.rod_quad, 1, BreedingRodType.LEAD.ordinal())) && + slots[10].isItemEqual(new ItemStack(ModItems.rod_quad, 1, BreedingRodType.URANIUM.ordinal())) && + slots[11].isItemEqual(new ItemStack(ModItems.rod_quad, 1, BreedingRodType.URANIUM.ordinal())) && slots[12].getItem() == ModItems.cell_sas3 && slots[13].getItem() == ModItems.cell_sas3) { diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityITER.java b/src/main/java/com/hbm/tileentity/machine/TileEntityITER.java index 0b92ed44d..84e0f2316 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityITER.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityITER.java @@ -208,7 +208,7 @@ public class TileEntityITER extends TileEntityMachineBase implements IEnergyUser int level = FusionRecipes.getBreedingLevel(plasma.getTankType()); - if(out.heat > level) { + if(out.flux > level) { this.progress = 0; return; } diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineCentrifuge.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineCentrifuge.java index 3e785c661..2fa74ea4f 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineCentrifuge.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineCentrifuge.java @@ -211,4 +211,4 @@ public class TileEntityMachineCentrifuge extends TileEntityMachineBase implement public long getMaxPower() { return maxPower; } -} +} \ No newline at end of file diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineDeuterium.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineDeuterium.java index 814b0fff8..b6f70a09f 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineDeuterium.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineDeuterium.java @@ -103,7 +103,7 @@ public class TileEntityMachineDeuterium extends TileEntity implements ISidedInve switch(i) { case 1: - if(stack.getItem() == ModItems.rod_water || stack.getItem() == ModItems.rod_dual_water || stack.getItem() == ModItems.rod_quad_water || stack.getItem() == Items.water_bucket) + if(stack.getItem() == Items.water_bucket) return true; break; case 2: @@ -283,30 +283,6 @@ public class TileEntityMachineDeuterium extends TileEntity implements ISidedInve } } - if (slots[1] != null && slots[1].getItem() == ModItems.rod_water && water + 250 <= maxFill) { - water += 250; - slots[1].stackSize--; - if (slots[1].stackSize == 0) { - this.slots[1] = this.slots[1].getItem().getContainerItem(this.slots[1]); - } - } - - if (slots[1] != null && slots[1].getItem() == ModItems.rod_dual_water && water + 500 <= maxFill) { - water += 500; - slots[1].stackSize--; - if (slots[1].stackSize == 0) { - this.slots[1] = this.slots[1].getItem().getContainerItem(this.slots[1]); - } - } - - if (slots[1] != null && slots[1].getItem() == ModItems.rod_quad_water && water + 1000 <= maxFill) { - water += 1000; - slots[1].stackSize--; - if (slots[1].stackSize == 0) { - this.slots[1] = this.slots[1].getItem().getContainerItem(this.slots[1]); - } - } - if (slots[1] != null && slots[1].getItem() == ModItems.inf_water) { water = maxFill; } diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineGenerator.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineGenerator.java index c33aa1271..0039c5c6a 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineGenerator.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineGenerator.java @@ -131,10 +131,10 @@ public class TileEntityMachineGenerator extends TileEntity implements ISidedInve if(itemStack.getItem() instanceof ItemFuelRod) return true; if(i == 9) - if(itemStack.getItem() == ModItems.rod_water || itemStack.getItem() == ModItems.rod_dual_water || itemStack.getItem() == ModItems.rod_quad_water || itemStack.getItem() == Items.water_bucket) + if(itemStack.getItem() == Items.water_bucket) return true; if(i == 10) - if(itemStack.getItem() == ModItems.rod_coolant || itemStack.getItem() == ModItems.rod_dual_coolant || itemStack.getItem() == ModItems.rod_quad_coolant) + if(itemStack.getItem() == ModItems.fluid_tank_full) return true; if(i == 11) if(itemStack.getItem() instanceof IBatteryItem) @@ -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/TileEntityMachineReactor.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineReactor.java deleted file mode 100644 index 20321ce6e..000000000 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineReactor.java +++ /dev/null @@ -1,270 +0,0 @@ -package com.hbm.tileentity.machine; - -import com.hbm.inventory.recipes.BreederRecipes; -import com.hbm.inventory.recipes.BreederRecipes.BreederRecipe; -import com.hbm.tileentity.TileEntityMachineBase; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.AxisAlignedBB; - -public class TileEntityMachineReactor extends TileEntityMachineBase { - - public int progress; - public int charge; - public int heat; - public static final int maxPower = 1000; - public static final int processingSpeed = 1000; - - private static final int[] slots_top = new int[] { 1 }; - private static final int[] slots_bottom = new int[] { 2, 0 }; - private static final int[] slots_side = new int[] { 0 }; - - public TileEntityMachineReactor() { - super(3); - } - - @Override - public ItemStack getStackInSlot(int i) { - return slots[i]; - } - - @Override - public String getName() { - return "container.reactor"; - } - - @Override - public void updateEntity() { - - if(!worldObj.isRemote) { - - boolean markDirty = false; - - if(charge == 0) { - heat = 0; - } - - if(hasItemPower(slots[0]) && charge == 0) { - - charge += getItemPower(slots[0]); - heat = getItemHeat(slots[0]); - - if(slots[0] != null) { - - slots[0].stackSize--; - - if(slots[0].stackSize == 0) { - slots[0] = slots[0].getItem().getContainerItem(slots[0]); - } - - markDirty = true; - } - } - - if(hasPower() && canProcess()) { - - progress++; - - if(this.progress == TileEntityMachineReactor.processingSpeed) { - this.progress = 0; - this.charge--; - this.processItem(); - markDirty = true; - } - } else { - progress = 0; - } - - boolean trigger = true; - - if(hasPower() && canProcess() && this.progress == 0) - trigger = false; - - if(trigger) { - markDirty = true; - } - - if(markDirty) - this.markDirty(); - - NBTTagCompound data = new NBTTagCompound(); - data.setShort("charge", (short)charge); - data.setShort("progress", (short)progress); - data.setByte("heat", (byte)heat); - this.networkPack(data, 20); - } - } - - public void networkUnpack(NBTTagCompound data) { - - charge = data.getShort("charge"); - progress = data.getShort("progress"); - heat = data.getByte("heat"); - } - - public boolean canProcess() { - - if(slots[1] == null) { - return false; - } - - BreederRecipe recipe = BreederRecipes.getOutput(slots[1]); - - if(recipe == null) - return false; - - if(this.heat < recipe.heat) - return false; - - if(slots[2] == null) - return true; - - if(!slots[2].isItemEqual(recipe.output)) - return false; - - if(slots[2].stackSize < getInventoryStackLimit() && slots[2].stackSize < slots[2].getMaxStackSize()) - return true; - else - return slots[2].stackSize < recipe.output.getMaxStackSize(); - } - - private void processItem() { - - if(canProcess()) { - - BreederRecipe rec = BreederRecipes.getOutput(slots[1]); - - if(rec == null) - return; - - ItemStack itemStack = rec.output; - - if(slots[2] == null) { - slots[2] = itemStack.copy(); - } else if(slots[2].isItemEqual(itemStack)) { - slots[2].stackSize += itemStack.stackSize; - } - - for(int i = 1; i < 2; i++) { - if(slots[i].stackSize <= 0) { - slots[i] = new ItemStack(slots[i].getItem().setFull3D()); - } else { - slots[i].stackSize--; - } - if(slots[i].stackSize <= 0) { - slots[i] = null; - } - } - } - } - - public boolean hasItemPower(ItemStack stack) { - return BreederRecipes.getFuelValue(stack) != null; - } - - private static int getItemPower(ItemStack stack) { - - int[] power = BreederRecipes.getFuelValue(stack); - - if(power == null) - return 0; - - return power[1]; - } - - private static int getItemHeat(ItemStack stack) { - - int[] power = BreederRecipes.getFuelValue(stack); - - if(power == null) - return 0; - - return power[0]; - } - - @Override - public int[] getAccessibleSlotsFromSide(int side) { - return side == 0 ? slots_bottom : (side == 1 ? slots_top : slots_side); - } - - @Override - public boolean isItemValidForSlot(int i, ItemStack itemStack) { - return i == 2 ? false : (i == 0 ? hasItemPower(itemStack) : true); - } - - @Override - public boolean canExtractItem(int i, ItemStack itemStack, int j) { - - if(i == 0) { - if(!hasItemPower(slots[0])) { - return true; - } - - return false; - } - - return true; - } - - public int getProgressScaled(int i) { - return (progress * i) / processingSpeed; - } - - public int getHeatScaled(int i) { - return (heat * i) / 4; - } - - public boolean hasPower() { - return charge > 0; - } - - public boolean isProcessing() { - return this.progress > 0; - } - - @Override - public void readFromNBT(NBTTagCompound nbt) { - super.readFromNBT(nbt); - - charge = nbt.getShort("charge"); - heat = nbt.getShort("heat"); - progress = nbt.getShort("progress"); - } - - @Override - public void writeToNBT(NBTTagCompound nbt) { - super.writeToNBT(nbt); - - nbt.setShort("charge", (short) charge); - nbt.setShort("heat", (short) heat); - nbt.setShort("progress", (short) progress); - } - - AxisAlignedBB bb = null; - - @Override - public AxisAlignedBB getRenderBoundingBox() { - - if(bb == null) { - bb = AxisAlignedBB.getBoundingBox( - xCoord, - yCoord, - zCoord, - xCoord + 1, - yCoord + 3, - zCoord + 1 - ); - } - - return bb; - } - - @Override - @SideOnly(Side.CLIENT) - public double getMaxRenderDistanceSquared() { - return 65536.0D; - } -} \ No newline at end of file diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineReactorBreeding.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineReactorBreeding.java new file mode 100644 index 000000000..613acc242 --- /dev/null +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineReactorBreeding.java @@ -0,0 +1,204 @@ +package com.hbm.tileentity.machine; + +import com.hbm.blocks.ModBlocks; +import com.hbm.blocks.machine.ReactorResearch; +import com.hbm.inventory.recipes.BreederRecipes; +import com.hbm.inventory.recipes.BreederRecipes.BreederRecipe; +import com.hbm.tileentity.TileEntityMachineBase; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.AxisAlignedBB; +import net.minecraftforge.common.util.ForgeDirection; + +public class TileEntityMachineReactorBreeding extends TileEntityMachineBase { + + public int flux; + public float progress; + + private static final int[] slots_io = new int[] { 0, 1 }; + + public TileEntityMachineReactorBreeding() { + super(2); + } + + @Override + public String getName() { + return "container.reactorBreeding"; + } + + @Override + public void updateEntity() { + + if(!worldObj.isRemote) { + this.flux = 0; + getInteractions(); + + if(canProcess()) { + + progress += 0.0025F * (this.flux / BreederRecipes.getOutput(slots[0]).flux); + + if(this.progress >= 1.0F) { + this.progress = 0F; + this.processItem(); + this.markDirty(); + } + } else { + progress = 0.0F; + } + + NBTTagCompound data = new NBTTagCompound(); + data.setInteger("flux", flux); + data.setFloat("progress", progress); + this.networkPack(data, 20); + } + } + + public void networkUnpack(NBTTagCompound data) { + flux = data.getInteger("flux"); + progress = data.getFloat("progress"); + } + + public void getInteractions() { + + for(byte d = 2; d < 6; d++) { + ForgeDirection dir = ForgeDirection.getOrientation(d); + + Block b = worldObj.getBlock(xCoord + dir.offsetX, yCoord, zCoord + dir.offsetZ); + TileEntity te = worldObj.getTileEntity(xCoord + dir.offsetX, yCoord, zCoord + dir.offsetZ); + + if(b == ModBlocks.reactor_research) { + + int[] pos = ((ReactorResearch) ModBlocks.reactor_research).findCore(worldObj, xCoord + dir.offsetX, yCoord, zCoord + dir.offsetZ); + + if(pos != null) { + + TileEntity tile = worldObj.getTileEntity(pos[0], pos[1], pos[2]); + + if(tile instanceof TileEntityReactorResearch) { + + TileEntityReactorResearch reactor = (TileEntityReactorResearch) tile; + + this.flux += reactor.totalFlux; + } + } + } + } + } + + public boolean canProcess() { + + if(slots[0] == null) + return false; + + BreederRecipe recipe = BreederRecipes.getOutput(slots[0]); + + if(recipe == null) + return false; + + if(this.flux < recipe.flux) + return false; + + if(slots[1] == null) + return true; + + if(!slots[1].isItemEqual(recipe.output)) + return false; + + if(slots[1].stackSize < slots[1].getMaxStackSize()) + return true; + else + return false; + } + + private void processItem() { + + if(canProcess()) { + + BreederRecipe rec = BreederRecipes.getOutput(slots[0]); + + if(rec == null) + return; + + ItemStack itemStack = rec.output; + + if(slots[1] == null) { + slots[1] = itemStack.copy(); + } else if(slots[1].isItemEqual(itemStack)) { + slots[1].stackSize += itemStack.stackSize; + } + + slots[0].stackSize--; + + if(slots[0].stackSize <= 0) { + slots[0] = null; + } + } + } + + + + @Override + public int[] getAccessibleSlotsFromSide(int side) { + return slots_io; + } + + @Override + public boolean isItemValidForSlot(int i, ItemStack itemStack) { + return i == 0; + } + + @Override + public boolean canExtractItem(int i, ItemStack itemStack, int j) { + return i == 1; + } + + public int getProgressScaled(int i) { + return (int) (this.progress * i); + } + + @Override + public void readFromNBT(NBTTagCompound nbt) { + super.readFromNBT(nbt); + + flux = nbt.getInteger("flux"); + progress = nbt.getFloat("progress"); + } + + @Override + public void writeToNBT(NBTTagCompound nbt) { + super.writeToNBT(nbt); + + nbt.setInteger("flux", flux); + nbt.setFloat("progress", progress); + } + + AxisAlignedBB bb = null; + + @Override + public AxisAlignedBB getRenderBoundingBox() { + + if(bb == null) { + bb = AxisAlignedBB.getBoundingBox( + xCoord, + yCoord, + zCoord, + xCoord + 1, + yCoord + 3, + zCoord + 1 + ); + } + + return bb; + } + + @Override + @SideOnly(Side.CLIENT) + public double getMaxRenderDistanceSquared() { + return 65536.0D; + } +} \ No newline at end of file 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 deleted file mode 100644 index 3504a92a5..000000000 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineReactorSmall.java +++ /dev/null @@ -1,829 +0,0 @@ -package com.hbm.tileentity.machine; - -import java.util.ArrayList; -import java.util.List; - -import com.hbm.blocks.ModBlocks; -import com.hbm.blocks.machine.MachineReactor; -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.items.ModItems; -import com.hbm.items.machine.ItemFuelRod; -import com.hbm.lib.Library; -import com.hbm.packet.AuxGaugePacket; -import com.hbm.packet.PacketDispatcher; - -import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.inventory.ISidedInventory; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.AxisAlignedBB; - -public class TileEntityMachineReactorSmall extends TileEntity implements ISidedInventory, IFluidContainer, IFluidAcceptor, IFluidSource { - - private ItemStack slots[]; - - public int hullHeat; - public final int maxHullHeat = 100000; - public int coreHeat; - public final int maxCoreHeat = 50000; - public int rods; - public final int rodsMax = 100; - public boolean retracting = true; - public int age = 0; - public List list = new ArrayList(); - public FluidTank[] tanks; - - 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); - } - - @Override - public int getSizeInventory() { - return slots.length; - } - - @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() { - } - - @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) - 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"); - 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("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); - } - - @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) - 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 getHullHeatScaled(int i) { - return (hullHeat * i) / maxHullHeat; - } - - public int getSteamScaled(int i) { - return (tanks[2].getFill() * i) / tanks[2].getMaxFill(); - } - - public boolean hasCoreHeat() { - return coreHeat > 0; - } - - public boolean hasHullHeat() { - return hullHeat > 0; - } - - private int[] getNeighbouringSlots(int id) { - - switch(id) { - case 0: - return new int[] { 1, 5 }; - case 1: - return new int[] { 0, 6 }; - case 2: - return new int[] { 3, 7 }; - case 3: - return new int[] { 2, 4, 8 }; - case 4: - return new int[] { 3, 9 }; - case 5: - return new int[] { 0, 6, 0xA }; - case 6: - return new int[] { 1, 5, 0xB }; - case 7: - return new int[] { 2, 8 }; - case 8: - return new int[] { 3, 7, 9 }; - case 9: - return new int[] { 4, 8 }; - case 10: - return new int[] { 5, 0xB }; - case 11: - return new int[] { 6, 0xA }; - } - - 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) - - 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); - } - } - - 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; - } - } - } - - } 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); - } - } - - private void explode() { - - for(int i = 0; i < slots.length; i++) { - this.slots[i] = null; - } - - worldObj.setBlockToAir(this.xCoord, this.yCoord, this.zCoord); - 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); - - ChunkRadiationManager.proxy.incrementRad(worldObj, xCoord, yCoord, zCoord, 1000); - - 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)); - - for(EntityPlayer player : players) { - player.getEntityData().getCompoundTag(player.PERSISTED_NBT_TAG).setBoolean("radMark", true); - } - } - } - - @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() { - return TileEntity.INFINITE_EXTENT_AABB; - } - - @Override - @SideOnly(Side.CLIENT) - 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/TileEntityNukeFurnace.java b/src/main/java/com/hbm/tileentity/machine/TileEntityNukeFurnace.java index 18ac09520..1c6344060 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityNukeFurnace.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityNukeFurnace.java @@ -1,8 +1,11 @@ package com.hbm.tileentity.machine; +import java.util.HashMap; + import com.hbm.blocks.machine.MachineNukeFurnace; -import com.hbm.inventory.recipes.BreederRecipes; +import com.hbm.inventory.RecipesCommon.ComparableStack; import com.hbm.items.ModItems; +import com.hbm.items.machine.ItemBreedingRod.*; import com.hbm.items.special.ItemCustomLore; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.ISidedInventory; @@ -19,7 +22,7 @@ public class TileEntityNukeFurnace extends TileEntity implements ISidedInventory public int dualCookTime; public int dualPower; public static final int maxPower = 1000; - public static final int processingSpeed = 30; + public static final int processingSpeed = 25; private static final int[] slots_top = new int[] {1}; private static final int[] slots_bottom = new int[] {2, 0}; @@ -111,12 +114,9 @@ public class TileEntityNukeFurnace extends TileEntity implements ISidedInventory return 0; } else { - int[] power = BreederRecipes.getFuelValue(stack); + int power = getFuelValue(stack); - if(power == null) - return 0; - - return power[0] * power[1] * 5; + return power; } } @@ -346,5 +346,48 @@ public class TileEntityNukeFurnace extends TileEntity implements ISidedInventory this.markDirty(); } } - + + private static HashMap fuels = new HashMap(); + //for the int array: [0] => level (1-4) [1] => amount of operations + + /* + * I really don't want to have to do this, but it's better then making a new class, for one TE, for not even recipes but just *fuels* + * + * Who even uses this furnace? Nobody, but it's better then removing it without prior approval + */ + public static void registerFuels() { + setRecipe(BreedingRodType.TRITIUM, 5); + setRecipe(BreedingRodType.CO60, 10); + setRecipe(BreedingRodType.THF, 30); + setRecipe(BreedingRodType.U235, 50); + setRecipe(BreedingRodType.NP237, 30); + setRecipe(BreedingRodType.PU238, 20); + setRecipe(BreedingRodType.PU239, 50); + setRecipe(BreedingRodType.RGP, 30); + setRecipe(BreedingRodType.WASTE, 20); + } + + /** Sets power for single, dual, and quad rods **/ + public static void setRecipe(BreedingRodType type, int power) { + fuels.put(new ComparableStack(new ItemStack(ModItems.rod, 1, type.ordinal())), power); + fuels.put(new ComparableStack(new ItemStack(ModItems.rod_dual, 1, type.ordinal())), power * 2); + fuels.put(new ComparableStack(new ItemStack(ModItems.rod_quad, 1, type.ordinal())), power * 4); + } + + /** + * Returns an integer array of the fuel value of a certain stack + * @param stack + * @return an integer array (possibly null) with two fields, the HEAT value and the amount of operations + */ + public static int getFuelValue(ItemStack stack) { + + if(stack == null) + return 0; + + ComparableStack sta = new ComparableStack(stack).makeSingular(); + if(fuels.get(sta) != null) + return fuels.get(sta); + + return 0; + } } diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityReactorControl.java b/src/main/java/com/hbm/tileentity/machine/TileEntityReactorControl.java index 8afad0e50..543152963 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityReactorControl.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityReactorControl.java @@ -1,9 +1,14 @@ package com.hbm.tileentity.machine; import com.hbm.blocks.ModBlocks; +import com.hbm.blocks.machine.ReactorResearch; +import com.hbm.interfaces.IControlReceiver; import com.hbm.items.ModItems; +import com.hbm.packet.NBTControlPacket; import com.hbm.packet.PacketDispatcher; -import com.hbm.packet.TEControlPacket; +import com.hbm.tileentity.TileEntityMachineBase; +import com.hbm.tileentity.machine.rbmk.TileEntityRBMKControlAuto.RBMKFunction; +import com.hbm.tileentity.machine.rbmk.TileEntityRBMKControlManual.RBMKColor; import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint; import net.minecraft.block.Block; @@ -14,111 +19,20 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.MathHelper; +import net.minecraft.util.Vec3; -public class TileEntityReactorControl extends TileEntity implements ISidedInventory { +public class TileEntityReactorControl extends TileEntityMachineBase implements IControlReceiver { - private ItemStack slots[]; - - private static final int[] slots_top = new int[] {0}; - private static final int[] slots_bottom = new int[] {0}; - private static final int[] slots_side = new int[] {0}; - - private String customName; + private static final int[] slots_io = new int[] {0}; public TileEntityReactorControl() { - slots = new ItemStack[1]; - } - - @Override - public int getSizeInventory() { - return slots.length; - } - - @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.reactorControl"; - } - - @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; - } + super(1); } @Override - public void openInventory() {} - @Override - public void closeInventory() {} - - @Override - public boolean isItemValidForSlot(int i, ItemStack stack) { - 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; - } + public String getName() { + return "container.reactorControl"; } @Override @@ -126,9 +40,12 @@ public class TileEntityReactorControl extends TileEntity implements ISidedInvent super.readFromNBT(nbt); NBTTagList list = nbt.getTagList("items", 10); - redstoned = nbt.getBoolean("red"); - auto = nbt.getBoolean("auto"); - lastRods = nbt.getInteger("lastRods"); + isLinked = nbt.getBoolean("isLinked"); + levelLower = nbt.getDouble("levelLower"); + levelUpper = nbt.getDouble("levelUpper"); + heatLower = nbt.getDouble("heatLower"); + heatUpper = nbt.getDouble("heatUpper"); + function = RodFunction.values()[nbt.getInteger("function")]; slots = new ItemStack[getSizeInventory()]; @@ -148,9 +65,13 @@ public class TileEntityReactorControl extends TileEntity implements ISidedInvent super.writeToNBT(nbt); NBTTagList list = new NBTTagList(); - nbt.setBoolean("red", redstoned); - nbt.setBoolean("auto", auto); - nbt.setInteger("lastRods", lastRods); + nbt.setBoolean("isLinked", isLinked); + nbt.setDouble("levelLower", levelLower); + nbt.setDouble("levelUpper", levelUpper); + nbt.setDouble("heatLower", heatLower); + nbt.setDouble("heatUpper", heatUpper); + nbt.setInteger("function", function.ordinal()); + for(int i = 0; i < slots.length; i++) { @@ -165,193 +86,164 @@ public class TileEntityReactorControl extends TileEntity implements ISidedInvent 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); - } - - @Override - public boolean canInsertItem(int i, ItemStack itemStack, int j) { - return false; - } - - @Override - public boolean canExtractItem(int i, ItemStack itemStack, int j) { - return false; - } + public TileEntityReactorResearch reactor; - public int linkX; - public int linkY; - public int linkZ; - - public int hullHeat; - public int coreHeat; - public int fuel; - public int water; - public int cool; - public int steam; - public int maxWater; - public int maxCool; - public int maxSteam; - public int compression; - public int rods; - public int maxRods; - public boolean isOn; - public boolean auto; public boolean isLinked; - public boolean redstoned; - private int lastRods = 100; + + public int flux; + public double level; + public int heat; + + public double levelLower; + public double levelUpper; + public double heatLower; + public double heatUpper; + public RodFunction function = RodFunction.LINEAR; @Override public void updateEntity() { + + if(!worldObj.isRemote) { + + isLinked = establishLink(); + + if(isLinked) { + + double fauxLevel = 0; - if(!worldObj.isRemote) - { - if(slots[0] != null && slots[0].getItem() == ModItems.reactor_sensor && - slots[0].stackTagCompound != null) - { - int xCoord = slots[0].stackTagCompound.getInteger("x"); - int yCoord = slots[0].stackTagCompound.getInteger("y"); - int zCoord = slots[0].stackTagCompound.getInteger("z"); - - Block b = worldObj.getBlock(xCoord, yCoord, zCoord); - - if(b == ModBlocks.machine_reactor_small || b == ModBlocks.reactor_computer) { - linkX = xCoord; - linkY = yCoord; - linkZ = zCoord; - } else if(b == ModBlocks.dummy_block_reactor_small || b == ModBlocks.dummy_port_reactor_small) { - linkX = ((TileEntityDummy)worldObj.getTileEntity(xCoord, yCoord, zCoord)).targetX; - linkY = ((TileEntityDummy)worldObj.getTileEntity(xCoord, yCoord, zCoord)).targetY; - linkZ = ((TileEntityDummy)worldObj.getTileEntity(xCoord, yCoord, zCoord)).targetZ; - } else { - linkY = -1; - } - } else { - linkY = -1; - } - - if(linkY >= 0 && worldObj.getTileEntity(linkX, linkY, linkZ) instanceof TileEntityMachineReactorSmall) { - TileEntityMachineReactorSmall reactor = (TileEntityMachineReactorSmall)worldObj.getTileEntity(linkX, linkY, linkZ); - - hullHeat = reactor.hullHeat; - coreHeat = reactor.coreHeat; - fuel = reactor.getFuelPercent(); - water = reactor.tanks[0].getFill(); - cool = reactor.tanks[1].getFill(); - steam = reactor.tanks[2].getFill(); - maxWater = reactor.tanks[0].getMaxFill(); - maxCool = reactor.tanks[1].getMaxFill(); - maxSteam = reactor.tanks[2].getMaxFill(); - rods = reactor.rods; - maxRods = reactor.rodsMax; - isOn = !reactor.retracting; - isLinked = true; - - switch(reactor.tanks[2].getTankType()) { - case HOTSTEAM: - compression = 1; break; - case SUPERHOTSTEAM: - compression = 2; break; - default: - compression = 0; break; - } - - if(!redstoned) { - if(worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)) { - redstoned = true; - reactor.retracting = !reactor.retracting; - } - } else { - if(!worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)) { - redstoned = false; - } - } - - if(auto && (water < 100 || cool < 100 || coreHeat > (50000 * 0.95)) && fuel > 0) { - reactor.retracting = true; - } - - } else if(linkY >= 0 && worldObj.getTileEntity(linkX, linkY, linkZ) instanceof TileEntityMachineReactorLarge && ((TileEntityMachineReactorLarge)worldObj.getTileEntity(linkX, linkY, linkZ)).checkBody()) { - TileEntityMachineReactorLarge reactor = (TileEntityMachineReactorLarge)worldObj.getTileEntity(linkX, linkY, linkZ); - - hullHeat = reactor.hullHeat; - coreHeat = reactor.coreHeat; - fuel = reactor.fuel * 100 / Math.max(1, reactor.maxFuel); - water = reactor.tanks[0].getFill(); - cool = reactor.tanks[1].getFill(); - steam = reactor.tanks[2].getFill(); - maxWater = reactor.tanks[0].getMaxFill(); - maxCool = reactor.tanks[1].getMaxFill(); - maxSteam = reactor.tanks[2].getMaxFill(); - rods = reactor.rods; - maxRods = reactor.rodsMax; - isOn = reactor.rods > 0; - isLinked = true; - - switch(reactor.tanks[2].getTankType()) { - case HOTSTEAM: - compression = 1; break; - case SUPERHOTSTEAM: - compression = 2; break; - default: - compression = 0; break; - } - - if(rods != 0) - lastRods = rods; - - if(!redstoned) { - if(worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)) { - redstoned = true; - - if(rods == 0) - rods = lastRods; - else - rods = 0; - } - } else { - if(!worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)) { - redstoned = false; - } - } - - if(auto && (water < 100 || cool < 100 || coreHeat > (50000 * 0.95)) && fuel > 0) { - reactor.rods = 0; - } - - } else { - hullHeat = 0; - coreHeat = 0; - fuel = 0; - water = 0; - cool = 0; - steam = 0; - maxWater = 0; - maxCool = 0; - maxSteam = 0; - rods = 0; - maxRods = 0; - isOn = false; - compression = 0; - isLinked = false; - } - - if(worldObj.getBlock(xCoord, yCoord, zCoord + 1) instanceof BlockRedstoneComparator) { - worldObj.scheduleBlockUpdate(xCoord, yCoord, zCoord + 1, worldObj.getBlock(xCoord, yCoord, zCoord + 1), 1); - } - if(worldObj.getBlock(xCoord, yCoord, zCoord - 1) instanceof BlockRedstoneComparator) { - worldObj.scheduleBlockUpdate(xCoord, yCoord, zCoord - 1, worldObj.getBlock(xCoord, yCoord, zCoord - 1), 1); - } - if(worldObj.getBlock(xCoord + 1, yCoord, zCoord) instanceof BlockRedstoneComparator) { - worldObj.scheduleBlockUpdate(xCoord + 1, yCoord, zCoord, worldObj.getBlock(xCoord + 1, yCoord, zCoord), 1); - } - if(worldObj.getBlock(xCoord - 1, yCoord, zCoord) instanceof BlockRedstoneComparator) { - worldObj.scheduleBlockUpdate(xCoord - 1, yCoord, zCoord, worldObj.getBlock(xCoord - 1, yCoord, zCoord), 1); - } - - 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)); + double lowerBound = Math.min(this.heatLower, this.heatUpper); + double upperBound = Math.max(this.heatLower, this.heatUpper); + + if(this.heat < lowerBound) { + fauxLevel = this.levelLower; + + } else if(this.heat > upperBound) { + fauxLevel = this.levelUpper; + + } else { + fauxLevel = getTargetLevel(this.function, this.heat); + } + + double level = MathHelper.clamp_double((fauxLevel * 0.01D), 0D, 1D); + + if(level != this.level) { + NBTTagCompound control = new NBTTagCompound(); + control.setDouble("level", level); + PacketDispatcher.wrapper.sendToServer(new NBTControlPacket(control, reactor.xCoord, reactor.yCoord, reactor.zCoord)); + } + } + + NBTTagCompound data = new NBTTagCompound(); + data.setInteger("heat", heat); + data.setDouble("level", level); + data.setInteger("flux", flux); + data.setBoolean("isLinked", isLinked); + data.setDouble("levelLower", levelLower); + data.setDouble("levelUpper", levelUpper); + data.setDouble("heatLower", heatLower); + data.setDouble("heatUpper", heatUpper); + data.setInteger("function", function.ordinal()); + this.networkPack(data, 150); } } + + public void networkUnpack(NBTTagCompound data) { + this.heat = data.getInteger("heat"); + this.level = data.getDouble("level"); + this.flux = data.getInteger("flux"); + isLinked = data.getBoolean("isLinked"); + levelLower = data.getDouble("levelLower"); + levelUpper = data.getDouble("levelUpper"); + heatLower = data.getDouble("heatLower"); + heatUpper = data.getDouble("heatUpper"); + function = RodFunction.values()[data.getInteger("function")]; + } + + private boolean establishLink() { + if(slots[0] != null && slots[0].getItem() == ModItems.reactor_sensor && slots[0].stackTagCompound != null) { + int xCoord = slots[0].stackTagCompound.getInteger("x"); + int yCoord = slots[0].stackTagCompound.getInteger("y"); + int zCoord = slots[0].stackTagCompound.getInteger("z"); + + Block b = worldObj.getBlock(xCoord, yCoord, zCoord); + + if(b == ModBlocks.reactor_research) { + + int[] pos = ((ReactorResearch) ModBlocks.reactor_research).findCore(worldObj, xCoord, yCoord, zCoord); + + if(pos != null) { + + TileEntity tile = worldObj.getTileEntity(pos[0], pos[1], pos[2]); + + if(tile instanceof TileEntityReactorResearch) { + reactor = (TileEntityReactorResearch) tile; + + this.flux = reactor.totalFlux; + this.level = reactor.level; + this.heat = reactor.heat; + + return true; + } + } + } + } + + return false; + } + + public double getTargetLevel(RodFunction function, int heat) { + double fauxLevel = 0; + + switch(function) { + case LINEAR: + fauxLevel = (heat - this.heatLower) * ((this.levelUpper - this.levelLower) / (this.heatUpper - this.heatLower)) + this.levelLower; + return fauxLevel; + case LOG: + fauxLevel = Math.pow((heat - this.heatUpper) / (this.heatLower - this.heatUpper), 2) * (this.levelLower - this.levelUpper) + this.levelUpper; + return fauxLevel; + case QUAD: + fauxLevel = Math.pow((heat - this.heatLower) / (this.heatUpper - this.heatLower), 2) * (this.levelUpper - this.levelLower) + this.levelLower; + return fauxLevel; + default: + return 0.0D; + } + } + + public int[] getDisplayData() { + if(this.isLinked) { + int[] data = new int[3]; + data[0] = (int) (this.level * 100); + data[1] = this.flux; + data[2] = (int) Math.round((this.heat) * 0.00002 * 980 + 20); + return data; + } else { + return new int[] { 0, 0, 0 }; + } + } + + @Override + public void receiveControl(NBTTagCompound data) { + + if(data.hasKey("function")) { + this.function = RodFunction.values()[data.getInteger("function")]; + } else { + this.levelLower = data.getDouble("levelLower"); + this.levelUpper = data.getDouble("levelUpper"); + this.heatLower = data.getDouble("heatLower"); + this.heatUpper = data.getDouble("heatUpper"); + } + + this.markDirty(); + } + + @Override + public boolean hasPermission(EntityPlayer player) { + return Vec3.createVectorHelper(xCoord - player.posX, yCoord - player.posY, zCoord - player.posZ).lengthVector() < 20; + } + + public enum RodFunction { + LINEAR, + QUAD, + LOG + } } diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityReactorResearch.java b/src/main/java/com/hbm/tileentity/machine/TileEntityReactorResearch.java new file mode 100644 index 000000000..324fc2005 --- /dev/null +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityReactorResearch.java @@ -0,0 +1,388 @@ +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.MachineReactorBreeding; +import com.hbm.blocks.machine.ReactorResearch; +import com.hbm.config.MobConfig; +import com.hbm.explosion.ExplosionNukeGeneric; +import com.hbm.handler.radiation.ChunkRadiationManager; +import com.hbm.interfaces.IControlReceiver; +import com.hbm.inventory.FluidTank; +import com.hbm.inventory.RecipesCommon.ComparableStack; +import com.hbm.items.ModItems; +import com.hbm.items.machine.ItemPlateFuel; +import com.hbm.lib.Library; +import com.hbm.packet.PacketDispatcher; +import com.hbm.tileentity.TileEntityMachineBase; +import com.hbm.tileentity.machine.rbmk.RBMKDials; + +import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.Vec3; +import net.minecraftforge.common.util.ForgeDirection; + +//TODO: fix reactor control; +public class TileEntityReactorResearch extends TileEntityMachineBase implements IControlReceiver { + + @SideOnly(Side.CLIENT) + public double lastLevel; + public double level; + public double speed = 0.04; + public double targetLevel; + + public int heat; + public byte water; + public final int maxHeat = 50000; + public int[] slotFlux = new int[12]; + public int totalFlux = 0; + + private static final int[] slot_io = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; + + public TileEntityReactorResearch() { + super(12); + } + + 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)); + fuelMap.put(new ComparableStack(ModItems.plate_fuel_ra226be), new ItemStack(ModItems.waste_plate_ra226be, 1, 1)); + } + + public String getName() { + return "container.reactorResearch"; + } + + @Override + public boolean isItemValidForSlot(int i, ItemStack itemStack) { + if(i < 12 && i <= 0) + if(itemStack.getItem().getClass() == ItemPlateFuel.class) + return true; + return false; + } + + @Override + public void readFromNBT(NBTTagCompound nbt) { + super.readFromNBT(nbt); + heat = nbt.getInteger("heat"); + water = nbt.getByte("water"); + level = nbt.getDouble("level"); + targetLevel = nbt.getDouble("targetLevel"); + } + + @Override + public void writeToNBT(NBTTagCompound nbt) { + super.writeToNBT(nbt); + nbt.setInteger("heat", heat); + nbt.setByte("water", water); + nbt.setDouble("level", level); + nbt.setDouble("targetLevel", targetLevel); + } + + @Override + public int[] getAccessibleSlotsFromSide(int side) { + return slot_io; + } + + @Override + public boolean canExtractItem(int i, ItemStack stack, int j) { + if(i < 12 && i >= 0) + if(fuelMap.containsValue(stack)) + return true; + + return false; + + } + + @Override + public void updateEntity() { + + rodControl(); + + if(!worldObj.isRemote) { + totalFlux = 0; + + if(level > 0) { + reaction(); + } + + if(this.heat > 0) { + 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(level > 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.setByte("water", water); + data.setDouble("level", level); + data.setDouble("targetLevel", targetLevel); + data.setIntArray("slotFlux", slotFlux); + data.setInteger("totalFlux", totalFlux); + this.networkPack(data, 150); + } + } + + public void networkUnpack(NBTTagCompound data) { + this.heat = data.getInteger("heat"); + this.water = data.getByte("water"); + this.level = data.getDouble("level"); + this.targetLevel = data.getDouble("targetLevel"); + this.slotFlux = data.getIntArray("slotFlux"); + this.totalFlux = data.getInteger("totalFlux"); + } + + public 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); + } + + private void getInteractionForBlock(int x, int y, int z) { + + Block b = worldObj.getBlock(x, y, z); + TileEntity te = worldObj.getTileEntity(x, y, z); + }*/ + + 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.reactor_research || b == ModBlocks.machine_reactor_breeding) + return true; + + if(b.getExplosionResistance(null) >= 100) + return true; + + return false; + } + + private int[] getNeighboringSlots(int id) { + + switch(id) { + case 0: + return new int[] { 1, 5 }; + case 1: + return new int[] { 0, 6 }; + case 2: + return new int[] { 3, 7 }; + case 3: + return new int[] { 2, 4, 8 }; + case 4: + return new int[] { 3, 9 }; + case 5: + return new int[] { 0, 6, 0xA }; + case 6: + return new int[] { 1, 5, 0xB }; + case 7: + return new int[] { 2, 8 }; + case 8: + return new int[] { 3, 7, 9 }; + case 9: + return new int[] { 4, 8 }; + case 10: + return new int[] { 5, 0xB }; + case 11: + return new int[] { 6, 0xA }; + } + + return null; + } + + private void reaction() { + for(byte i = 0; i < 12; i++) { + if(slots[i] == null) { + slotFlux[i] = 0; + continue; + } + + if(slots[i].getItem() instanceof ItemPlateFuel) { + ItemPlateFuel rod = (ItemPlateFuel) slots[i].getItem(); + + int outFlux = rod.react(worldObj, slots[i], slotFlux[i]); + this.heat += outFlux * 2; + slotFlux[i] = 0; + totalFlux += outFlux; + + int[] neighborSlots = getNeighboringSlots(i); + + if(ItemPlateFuel.getLifeTime(slots[i]) > rod.lifeTime) { + slots[i] = fuelMap.get(new ComparableStack(slots[i])).copy(); + } + + for(byte j = 0; j < neighborSlots.length; j++) { + slotFlux[neighborSlots[j]] += (int) (outFlux * level); + } + continue; + } + + if(slots[i].getItem() == ModItems.meteorite_sword_bred) + slots[i] = new ItemStack(ModItems.meteorite_sword_irradiated); + + slotFlux[i] = 0; + } + } + + private void explode() { + + 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); + 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, 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)); + + for(EntityPlayer player : players) { + player.getEntityData().getCompoundTag(player.PERSISTED_NBT_TAG).setBoolean("radMark", true); + } + } + } + + //Control Rods + @Override + public boolean hasPermission(EntityPlayer player) { + return Vec3.createVectorHelper(xCoord - player.posX, yCoord - player.posY, zCoord - player.posZ).lengthVector() < 20; + } + + @Override + public void receiveControl(NBTTagCompound data) { + if(data.hasKey("level")) { + this.setTarget(data.getDouble("level")); + } + + this.markDirty(); + } + + public void setTarget(double target) { + this.targetLevel = target; + } + + public void rodControl() { + if(worldObj.isRemote) { + + this.lastLevel = this.level; + + } else { + + if(level < targetLevel) { + + level += speed; + + if(level >= targetLevel) + level = targetLevel; + } + + if(level > targetLevel) { + + level -= speed; + + if(level <= targetLevel) + level = targetLevel; + } + } + } + + public int[] getDisplayData() { + int[] data = new int[2]; + data[0] = this.totalFlux; + data[1] = (int) Math.round((this.heat) * 0.00002 * 980 + 20); + return data; + } + + @Override + public AxisAlignedBB getRenderBoundingBox() { + return TileEntity.INFINITE_EXTENT_AABB; + } + + @Override + @SideOnly(Side.CLIENT) + public double getMaxRenderDistanceSquared() { + return 65536.0D; + } +} \ No newline at end of file diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityReactorZirnox.java b/src/main/java/com/hbm/tileentity/machine/TileEntityReactorZirnox.java index f56f8e63c..493b4c0d8 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityReactorZirnox.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityReactorZirnox.java @@ -13,6 +13,7 @@ import com.hbm.explosion.ExplosionNukeGeneric; import com.hbm.handler.FluidTypeHandler.FluidType; import com.hbm.handler.MultiblockHandlerXR; import com.hbm.handler.radiation.ChunkRadiationManager; +import com.hbm.interfaces.IControlReceiver; import com.hbm.interfaces.IFluidAcceptor; import com.hbm.interfaces.IFluidContainer; import com.hbm.interfaces.IFluidSource; @@ -31,9 +32,10 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.Vec3; import net.minecraftforge.common.util.ForgeDirection; -public class TileEntityReactorZirnox extends TileEntityMachineBase implements IFluidContainer, IFluidAcceptor, IFluidSource { +public class TileEntityReactorZirnox extends TileEntityMachineBase implements IFluidContainer, IFluidAcceptor, IFluidSource, IControlReceiver { public int heat; public static final int maxHeat = 100000; @@ -204,7 +206,7 @@ public class TileEntityReactorZirnox extends TileEntityMachineBase implements IF this.pressure = (int) ((float)this.heat * (1.5 * this.carbonDioxide.getFill() / 16000)); if(this.heat > 0 && this.heat < maxHeat) { - if(this.water.getFill() > 0 && this.carbonDioxide.getFill() > 0) { + if(this.water.getFill() > 0 && this.carbonDioxide.getFill() > 0 && this.steam.getFill() < this.steam.getMaxFill()) { generateSteam(); this.heat -= (int) ((float)this.heat * (Math.sqrt(this.carbonDioxide.getFill()) / 1800)); } else { @@ -480,5 +482,26 @@ public class TileEntityReactorZirnox extends TileEntityMachineBase implements IF public double getMaxRenderDistanceSquared() { return 65536.0D; } + + @Override + public boolean hasPermission(EntityPlayer player) { + return Vec3.createVectorHelper(xCoord - player.posX, yCoord - player.posY, zCoord - player.posZ).lengthVector() < 20; + } + + @Override + public void receiveControl(NBTTagCompound data) { + if(data.hasKey("control")) { + this.isOn = !this.isOn; + } + + if(data.hasKey("vent")) { + int fill = this.carbonDioxide.getFill(); + this.carbonDioxide.setFill(fill - 1000); + if(this.carbonDioxide.getFill() < 0) + this.carbonDioxide.setFill(0); + } + + this.markDirty(); + } } \ No newline at end of file diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityWasteDrum.java b/src/main/java/com/hbm/tileentity/machine/TileEntityWasteDrum.java index a406d967a..671a35436 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityWasteDrum.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityWasteDrum.java @@ -213,4 +213,4 @@ public class TileEntityWasteDrum extends TileEntity implements ISidedInventory { } } } -} +} \ No newline at end of file diff --git a/src/main/resources/assets/hbm/lang/de_DE.lang b/src/main/resources/assets/hbm/lang/de_DE.lang index e007f6d33..8ea241ae0 100644 --- a/src/main/resources/assets/hbm/lang/de_DE.lang +++ b/src/main/resources/assets/hbm/lang/de_DE.lang @@ -2664,21 +2664,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 0426c1e43..7f5ca8412 100644 --- a/src/main/resources/assets/hbm/lang/en_US.lang +++ b/src/main/resources/assets/hbm/lang/en_US.lang @@ -390,10 +390,10 @@ container.rbmkOutgasser=RBMK Irradiation Channel container.rbmkReaSim=RBMK Fuel Rod (ReaSim) container.rbmkRod=RBMK Fuel Rod container.rbmkStorage=RBMK Storage Column -container.reactor=Breeding Reactor +container.reactorBreeding=Breeding Reactor container.reactorControl=Reactor Remote Control Block container.reactorLarge=Big Nuclear Reactor -container.reactorSmall=Nuclear Reactor +container.reactorResearch=Research Reactor container.reix=Rei-X Mainframe container.rtg=RT Generator container.rtgFurnace=RTG Furnace @@ -474,6 +474,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: @@ -907,6 +908,7 @@ item.billet_balefire_gold.name=Flashgold Billet item.billet_beryllium.name=Beryllium Billet item.billet_bismuth.name=Bismuth Billet item.billet_co60.name=Cobalt-60 Billet +item.billet_cobalt.name=Cobalt Billet item.billet_hes.name=Highly Enriched Schrabidium Fuel Billet item.billet_les.name=Low Enriched Schrabidium Fuel Billet item.billet_mox_fuel.name=MOX Fuel Billet @@ -928,6 +930,7 @@ item.billet_ra226be.name=Ra226Be Billet item.billet_schrabidium.name=Schrabidium Billet item.billet_schrabidium_fuel.name=Schrabidium Fuel Billet item.billet_solinium.name=Solinium Billet +item.billet_sr90.name=Strontium-90 Billet item.billet_technetium.name=Technetium-99 Billet item.billet_th232.name=Thorium-232 Billet item.billet_thorium_fuel.name=Thorium Fuel Billet @@ -1279,6 +1282,7 @@ item.crystal_trixite.name=Trixite Crystals item.crystal_tungsten.name=Tungsten Crystals item.crystal_uranium.name=Uranium Crystals item.crystal_xen.name=Artificial Xen Crystal +item.crt_display.name= Cathode Ray Tube item.cube_power.name=Electronium Cube item.custom_amat.name=Custom Nuke Antimatter Rod item.custom_dirty.name=Custom Nuke Dirty Rod @@ -1334,6 +1338,7 @@ item.drax_mk2.name=Hardened Terra Drill item.drax_mk3.name=Schrabidic Terra Drill item.ducttape.name=Duct Tape item.dust.name=Dust +item.dust_tiny.name=Tiny Pile of Dust item.dynosphere_base.name=Blank Dynosphere item.dynosphere_desh.name=Desh Dynosphere item.dynosphere_desh_charged.name=Desh Dynosphere (Charged) @@ -1712,6 +1717,7 @@ item.ingot_schraranium.name=Schraranium Ingot item.ingot_semtex.name=Bar of Semtex item.ingot_smore.name=S'more Ingot item.ingot_solinium.name=Solinium Ingot +item.ingot_sr90.name=Strontium-90 Ingot item.ingot_starmetal.name=§9Starmetal Ingot§r item.ingot_steel.name=Steel Ingot item.ingot_steel_dusted.name=Dusted Steel Ingot @@ -2040,6 +2046,7 @@ item.nugget_australium_lesser.name=Lesser Australium Nugget item.nugget_beryllium.name=Beryllium Nugget item.nugget_bismuth.name=Bismuth Nugget item.nugget_co60.name=Cobalt-60 Nugget +item.nugget_cobalt.name=Cobalt Nugget item.nugget_daffergon.name=Daffergon Nugget item.nugget_desh.name=Desh Nugget item.nugget_dineutronium.name=Dineutronium Nugget @@ -2065,6 +2072,7 @@ item.nugget_reiium.name=Reiium Nugget item.nugget_schrabidium.name=Schrabidium Nugget item.nugget_schrabidium_fuel.name=Nugget of Schrabidium Fuel item.nugget_solinium.name=Solinium Nugget +item.nugget_sr90.name=Strontium-90 Nugget item.nugget_tantalium.name=Tantalium Nugget item.nugget_technetium.name=Technetium-99 Nugget item.nugget_th232.name=Thorium-232 Nugget @@ -2159,7 +2167,7 @@ item.pellet_rtg_gold.desc=Made from a rare, highly unstable gold isotope. item.pellet_rtg_polonium.name=Polonium-210 Fuel Pellet item.pellet_rtg_polonium.desc=More powderful RTG pellet, made from finest polonium! item.pellet_rtg_strontium.name=Strontium-90 Fuel Pellet -item.pellet_rtg_strontium.desc= +item.pellet_rtg_strontium.desc=Known to the State of California... item.pellet_rtg_radium.name=Radium-226 Fuel Pellet item.pellet_rtg_radium.desc=Great starter pellet, sourced from all-natural radium! item.pellet_rtg_weak.name=Weak Uranium Fuel Pellet @@ -2191,6 +2199,12 @@ 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_mox.name=HEMOX Plate Fuel +item.plate_fuel_pu239.name=HEP-239 Plate Fuel +item.plate_fuel_ra226be.name=Ra226Be Plate Fuel +item.plate_fuel_sa326.name=HES-326 Plate Fuel +item.plate_fuel_u233.name=HEU-233 Plate Fuel +item.plate_fuel_u235.name=HEU-235 Plate Fuel item.plate_gold.name=Gold Plate item.plate_iron.name=Iron Plate item.plate_kevlar.name=Kevlar-Ceramic Compound @@ -2282,6 +2296,8 @@ item.powder_schrabidate.name=Ferric Schrabidate Powder item.powder_schrabidium.name=Schrabidium Powder item.powder_semtex_mix.name=Semtex Blend item.powder_spark_mix.name=Spark Blend +item.powder_sr90.name=Strontium-90 Powder +item.powder_sr90_tiny.name=Tiny Pile of Strontium-90 Powder item.powder_steel.name=Steel Powder item.powder_steel_tiny.name=Tiny Pile of Steel Powder item.powder_strontium.name=Strontium Powder @@ -2403,6 +2419,54 @@ item.robes_helmet.name=Casual Hoodie item.robes_legs.name=Casual Pants item.robes_plate.name=Casual Sweater item.rocket_fuel.name=Solid Fuel (Rocket Propellant) +item.rod_empty.name=Empty Rod +item.rod.lithium.name=Lithium Rod +item.rod.tritium.name=Tritium Rod +item.rod.co.name=Cobalt Rod +item.rod.co60.name=Cobalt-60 Rod +item.rod.th232.name=Thorium-232 Rod +item.rod.thf.name=Thorium Fuel Rod +item.rod.u235.name=Uranium-235 Rod +item.rod.np237.name=Neptunium-237 Rod +item.rod.u238.name=Uranium-238 Rod +item.rod.pu238.name=Plutonium-238 Rod +item.rod.pu239.name=Plutonium-239 Rod +item.rod.rgp.name=Reactor-Grade Plutonium Rod +item.rod.waste.name=Nuclear Waste Rod +item.rod.lead.name=Lead Rod +item.rod.uranium.name=Uranium Rod +item.rod_dual_empty.name=Empty Dual Rod +item.rod_dual.lithium.name=Lithium Dual Rod +item.rod_dual.tritium.name=Tritium Dual Rod +item.rod_dual.co.name=Cobalt Dual Rod +item.rod_dual.co60.name=Cobalt-60 Dual Rod +item.rod_dual.th232.name=Thorium-232 Dual Rod +item.rod_dual.thf.name=Thorium Fuel Dual Rod +item.rod_dual.u235.name=Uranium-235 Dual Rod +item.rod_dual.np237.name=Neptunium-237 Dual Rod +item.rod_dual.u238.name=Uranium-238 Dual Rod +item.rod_dual.pu238.name=Plutonium-238 Dual Rod +item.rod_dual.pu239.name=Plutonium-239 Dual Rod +item.rod_dual.rgp.name=Reactor-Grade Plutonium Dual Rod +item.rod_dual.waste.name=Nuclear Waste Dual Rod +item.rod_dual.lead.name=Lead Dual Rod +item.rod_dual.uranium.name=Uranium Dual Rod +item.rod_quad_empty.name=Empty Quad Rod +item.rod_quad.lithium.name=Lithium Quad Rod +item.rod_quad.tritium.name=Tritium Quad Rod +item.rod_quad.co.name=Cobalt Quad Rod +item.rod_quad.co60.name=Cobalt-60 Quad Rod +item.rod_quad.th232.name=Thorium-232 Quad Rod +item.rod_quad.thf.name=Thorium Fuel Quad Rod +item.rod_quad.u235.name=Uranium-235 Quad Rod +item.rod_quad.np237.name=Neptunium-237 Quad Rod +item.rod_quad.u238.name=Uranium-238 Quad Rod +item.rod_quad.pu238.name=Plutonium-238 Quad Rod +item.rod_quad.pu239.name=Plutonium-239 Quad Rod +item.rod_quad.rgp.name=Reactor-Grade Plutonium Quad Rod +item.rod_quad.waste.name=Nuclear Waste Quad Rod +item.rod_quad.lead.name=Lead Quad Rod +item.rod_quad.uranium.name=Uranium Quad Rod item.rod_australium.name=Australium Rod item.rod_balefire.name=Balefire Rod item.rod_balefire_blazing.name=Blazing Balefire Rod @@ -2411,7 +2475,6 @@ item.rod_daffergon.name=Daffergon Rod item.rod_dual_balefire.name=Balefire Dual Rod item.rod_dual_balefire_blazing.name=Blazing Balefire Dual Rod item.rod_dual_coolant.name=Dual Coolant Cell -item.rod_dual_empty.name=Empty Dual Rod item.rod_dual_lead.name=Lead Dual Rod item.rod_dual_lithium.name=Dual Lithium Rod item.rod_dual_mox_fuel.name=MOX Dual Fuel Rod @@ -2440,7 +2503,6 @@ item.rod_dual_uranium_fuel.name=Uranium Dual Fuel Rod item.rod_dual_uranium_fuel_depleted.name=Depleted Uranium Dual Fuel Rod item.rod_dual_waste.name=Nuclear Waste Dual Rod item.rod_dual_water.name=Dual Water Cell -item.rod_empty.name=Empty Rod item.rod_euphemium.name=Euphemium Rod item.rod_lead.name=Lead Rod item.rod_lithium.name=Lithium Rod @@ -2458,7 +2520,6 @@ item.rod_pu240.name=Plutonium-240 Rod item.rod_quad_balefire.name=Balefire Quad Rod item.rod_quad_balefire_blazing.name=Blazing Balefire Quad Rod item.rod_quad_coolant.name=Quad Coolant Cell -item.rod_quad_empty.name=Empty Quad Rod item.rod_quad_euphemium.name=Burned Out Quad Schrabidium Rod item.rod_quad_lead.name=Lead Quad Rod item.rod_quad_lithium.name=Quad Lithium Rod @@ -2791,21 +2852,19 @@ 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_ra226be.name=Depleted Ra226Be 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é @@ -3333,8 +3392,6 @@ tile.machine_pumpjack.name=Pumpjack tile.machine_radar.name=Radar tile.machine_radgen.name=Radiation-Powered Engine tile.machine_reactor.name=Breeding Reactor -tile.machine_reactor_on.name=Breeding Reactor -tile.machine_reactor_small.name=Nuclear Reactor tile.machine_refinery.name=Oil Refinery tile.machine_reix_mainframe.name=Rei-X Mainframe (WIP) tile.machine_rtg_blue.name=Convection Generator @@ -3371,7 +3428,6 @@ tile.machine_turbofan.name=Turbofan tile.machine_uf6_tank.name=Uranium Hexafluoride Tank tile.machine_waste_drum.name=Spent Fuel Pool Drum tile.machine_well.name=Oil Derrick -tile.machine_zirnox.name=ZIRNOX Nuclear Reactor tile.marker_structure.name=Multiblock Structure Marker tile.meteor_battery.name=Starmetal Static Electricity Generator tile.meteor_brick.name=Meteor Bricks @@ -3516,6 +3572,8 @@ tile.reactor_ejector.name=Reactor Waste Ejector tile.reactor_element.name=Reactor Chamber tile.reactor_hatch.name=Reactor Access Hatch tile.reactor_inserter.name=Reactor Fuel Inserter +tile.machine_reactor_small.name=Research Reactor +tile.machine_zirnox.name=ZIRNOX Nuclear Reactor tile.red_barrel.name=Explosive Barrel tile.red_cable.name=Red Copper Cable tile.red_connector.name=Electricity Connector @@ -3638,7 +3696,6 @@ tile.yellow_barrel.name=Radioactive Barrel trait.asbestos=Asbestos trait.blinding=Blinding -trait.breeding=Worth %s operations in breeding reactor trait.coal=Coal Dust trait.digamma=Digamma Radiation trait.drop=Dangerous Drop diff --git a/src/main/resources/assets/hbm/textures/gui/gui_reactor_control.png b/src/main/resources/assets/hbm/textures/gui/gui_reactor_control.png index 0d5e3040d..131ae6fdb 100644 Binary files a/src/main/resources/assets/hbm/textures/gui/gui_reactor_control.png and b/src/main/resources/assets/hbm/textures/gui/gui_reactor_control.png differ diff --git a/src/main/resources/assets/hbm/textures/gui/gui_reactor_experimental.png b/src/main/resources/assets/hbm/textures/gui/gui_reactor_experimental.png index 432f2696e..116330970 100644 Binary files a/src/main/resources/assets/hbm/textures/gui/gui_reactor_experimental.png and b/src/main/resources/assets/hbm/textures/gui/gui_reactor_experimental.png differ diff --git a/src/main/resources/assets/hbm/textures/gui/processing/gui_breeder.png b/src/main/resources/assets/hbm/textures/gui/processing/gui_breeder.png index c8823be16..38ea99596 100644 Binary files a/src/main/resources/assets/hbm/textures/gui/processing/gui_breeder.png and b/src/main/resources/assets/hbm/textures/gui/processing/gui_breeder.png differ diff --git a/src/main/resources/assets/hbm/textures/gui/reactors/gui_research_reactor.png b/src/main/resources/assets/hbm/textures/gui/reactors/gui_research_reactor.png new file mode 100644 index 000000000..5046aa3af Binary files /dev/null and b/src/main/resources/assets/hbm/textures/gui/reactors/gui_research_reactor.png differ diff --git a/src/main/resources/assets/hbm/textures/items/billet_cobalt.png b/src/main/resources/assets/hbm/textures/items/billet_cobalt.png new file mode 100644 index 000000000..5f2e78e5b Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/billet_cobalt.png differ diff --git a/src/main/resources/assets/hbm/textures/items/billet_sr90.png b/src/main/resources/assets/hbm/textures/items/billet_sr90.png new file mode 100644 index 000000000..eb5b38c01 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/billet_sr90.png differ diff --git a/src/main/resources/assets/hbm/textures/items/crt_display.png b/src/main/resources/assets/hbm/textures/items/crt_display.png new file mode 100644 index 000000000..24511643b Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/crt_display.png differ diff --git a/src/main/resources/assets/hbm/textures/items/dust_tiny.png b/src/main/resources/assets/hbm/textures/items/dust_tiny.png new file mode 100644 index 000000000..641dca5b1 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/dust_tiny.png differ diff --git a/src/main/resources/assets/hbm/textures/items/ingot_sr90.png b/src/main/resources/assets/hbm/textures/items/ingot_sr90.png new file mode 100644 index 000000000..8a866399e Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/ingot_sr90.png differ diff --git a/src/main/resources/assets/hbm/textures/items/nugget_cobalt.png b/src/main/resources/assets/hbm/textures/items/nugget_cobalt.png new file mode 100644 index 000000000..a1697fdaf Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/nugget_cobalt.png differ diff --git a/src/main/resources/assets/hbm/textures/items/nugget_sr90.png b/src/main/resources/assets/hbm/textures/items/nugget_sr90.png new file mode 100644 index 000000000..5b3567ea8 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/nugget_sr90.png differ 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..2c31daf21 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..aa95f50f5 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_ra226be.png b/src/main/resources/assets/hbm/textures/items/plate_fuel_ra226be.png new file mode 100644 index 000000000..3c8678bc2 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/plate_fuel_ra226be.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..6285b4b9f 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..f799744fd 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..77bd86659 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/powder_sr90.png b/src/main/resources/assets/hbm/textures/items/powder_sr90.png new file mode 100644 index 000000000..08efa4eb2 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/powder_sr90.png differ diff --git a/src/main/resources/assets/hbm/textures/items/powder_sr90_tiny.png b/src/main/resources/assets/hbm/textures/items/powder_sr90_tiny.png new file mode 100644 index 000000000..5ce5ed4c9 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/powder_sr90_tiny.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rod.co.png b/src/main/resources/assets/hbm/textures/items/rod.co.png new file mode 100644 index 000000000..f3fdd2f2a Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/rod.co.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rod.co60.png b/src/main/resources/assets/hbm/textures/items/rod.co60.png new file mode 100644 index 000000000..987e56c27 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/rod.co60.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rod_lead.png b/src/main/resources/assets/hbm/textures/items/rod.lead.png similarity index 100% rename from src/main/resources/assets/hbm/textures/items/rod_lead.png rename to src/main/resources/assets/hbm/textures/items/rod.lead.png diff --git a/src/main/resources/assets/hbm/textures/items/rod_lithium.png b/src/main/resources/assets/hbm/textures/items/rod.lithium.png similarity index 100% rename from src/main/resources/assets/hbm/textures/items/rod_lithium.png rename to src/main/resources/assets/hbm/textures/items/rod.lithium.png diff --git a/src/main/resources/assets/hbm/textures/items/rod_neptunium.png b/src/main/resources/assets/hbm/textures/items/rod.np237.png similarity index 100% rename from src/main/resources/assets/hbm/textures/items/rod_neptunium.png rename to src/main/resources/assets/hbm/textures/items/rod.np237.png diff --git a/src/main/resources/assets/hbm/textures/items/rod_pu238.png b/src/main/resources/assets/hbm/textures/items/rod.pu238.png similarity index 100% rename from src/main/resources/assets/hbm/textures/items/rod_pu238.png rename to src/main/resources/assets/hbm/textures/items/rod.pu238.png diff --git a/src/main/resources/assets/hbm/textures/items/rod_pu239.png b/src/main/resources/assets/hbm/textures/items/rod.pu239.png similarity index 100% rename from src/main/resources/assets/hbm/textures/items/rod_pu239.png rename to src/main/resources/assets/hbm/textures/items/rod.pu239.png diff --git a/src/main/resources/assets/hbm/textures/items/rod.rgp.png b/src/main/resources/assets/hbm/textures/items/rod.rgp.png new file mode 100644 index 000000000..41fde248d Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/rod.rgp.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rod_th232.png b/src/main/resources/assets/hbm/textures/items/rod.th232.png similarity index 100% rename from src/main/resources/assets/hbm/textures/items/rod_th232.png rename to src/main/resources/assets/hbm/textures/items/rod.th232.png diff --git a/src/main/resources/assets/hbm/textures/items/rod_thorium_fuel.png b/src/main/resources/assets/hbm/textures/items/rod.thf.png similarity index 100% rename from src/main/resources/assets/hbm/textures/items/rod_thorium_fuel.png rename to src/main/resources/assets/hbm/textures/items/rod.thf.png diff --git a/src/main/resources/assets/hbm/textures/items/rod_tritium.png b/src/main/resources/assets/hbm/textures/items/rod.tritium.png similarity index 100% rename from src/main/resources/assets/hbm/textures/items/rod_tritium.png rename to src/main/resources/assets/hbm/textures/items/rod.tritium.png diff --git a/src/main/resources/assets/hbm/textures/items/rod_u235.png b/src/main/resources/assets/hbm/textures/items/rod.u235.png similarity index 100% rename from src/main/resources/assets/hbm/textures/items/rod_u235.png rename to src/main/resources/assets/hbm/textures/items/rod.u235.png diff --git a/src/main/resources/assets/hbm/textures/items/rod_u238.png b/src/main/resources/assets/hbm/textures/items/rod.u238.png similarity index 100% rename from src/main/resources/assets/hbm/textures/items/rod_u238.png rename to src/main/resources/assets/hbm/textures/items/rod.u238.png diff --git a/src/main/resources/assets/hbm/textures/items/rod_uranium.png b/src/main/resources/assets/hbm/textures/items/rod.uranium.png similarity index 100% rename from src/main/resources/assets/hbm/textures/items/rod_uranium.png rename to src/main/resources/assets/hbm/textures/items/rod.uranium.png diff --git a/src/main/resources/assets/hbm/textures/items/rod_waste.png b/src/main/resources/assets/hbm/textures/items/rod.waste.png similarity index 100% rename from src/main/resources/assets/hbm/textures/items/rod_waste.png rename to src/main/resources/assets/hbm/textures/items/rod.waste.png diff --git a/src/main/resources/assets/hbm/textures/items/rod_dual.co.png b/src/main/resources/assets/hbm/textures/items/rod_dual.co.png new file mode 100644 index 000000000..66b3ce997 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/rod_dual.co.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rod_dual.co60.png b/src/main/resources/assets/hbm/textures/items/rod_dual.co60.png new file mode 100644 index 000000000..258d69d09 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/rod_dual.co60.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rod_dual_lead.png b/src/main/resources/assets/hbm/textures/items/rod_dual.lead.png similarity index 100% rename from src/main/resources/assets/hbm/textures/items/rod_dual_lead.png rename to src/main/resources/assets/hbm/textures/items/rod_dual.lead.png diff --git a/src/main/resources/assets/hbm/textures/items/rod_dual_lithium.png b/src/main/resources/assets/hbm/textures/items/rod_dual.lithium.png similarity index 100% rename from src/main/resources/assets/hbm/textures/items/rod_dual_lithium.png rename to src/main/resources/assets/hbm/textures/items/rod_dual.lithium.png diff --git a/src/main/resources/assets/hbm/textures/items/rod_dual_neptunium.png b/src/main/resources/assets/hbm/textures/items/rod_dual.np237.png similarity index 100% rename from src/main/resources/assets/hbm/textures/items/rod_dual_neptunium.png rename to src/main/resources/assets/hbm/textures/items/rod_dual.np237.png diff --git a/src/main/resources/assets/hbm/textures/items/rod_dual_pu238.png b/src/main/resources/assets/hbm/textures/items/rod_dual.pu238.png similarity index 100% rename from src/main/resources/assets/hbm/textures/items/rod_dual_pu238.png rename to src/main/resources/assets/hbm/textures/items/rod_dual.pu238.png diff --git a/src/main/resources/assets/hbm/textures/items/rod_dual_pu239.png b/src/main/resources/assets/hbm/textures/items/rod_dual.pu239.png similarity index 100% rename from src/main/resources/assets/hbm/textures/items/rod_dual_pu239.png rename to src/main/resources/assets/hbm/textures/items/rod_dual.pu239.png diff --git a/src/main/resources/assets/hbm/textures/items/rod_dual.rgp.png b/src/main/resources/assets/hbm/textures/items/rod_dual.rgp.png new file mode 100644 index 000000000..66e3c0028 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/rod_dual.rgp.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rod_dual_th232.png b/src/main/resources/assets/hbm/textures/items/rod_dual.th232.png similarity index 100% rename from src/main/resources/assets/hbm/textures/items/rod_dual_th232.png rename to src/main/resources/assets/hbm/textures/items/rod_dual.th232.png diff --git a/src/main/resources/assets/hbm/textures/items/rod_dual_thorium_fuel.png b/src/main/resources/assets/hbm/textures/items/rod_dual.thf.png similarity index 100% rename from src/main/resources/assets/hbm/textures/items/rod_dual_thorium_fuel.png rename to src/main/resources/assets/hbm/textures/items/rod_dual.thf.png diff --git a/src/main/resources/assets/hbm/textures/items/rod_dual_tritium.png b/src/main/resources/assets/hbm/textures/items/rod_dual.tritium.png similarity index 100% rename from src/main/resources/assets/hbm/textures/items/rod_dual_tritium.png rename to src/main/resources/assets/hbm/textures/items/rod_dual.tritium.png diff --git a/src/main/resources/assets/hbm/textures/items/rod_dual_u235.png b/src/main/resources/assets/hbm/textures/items/rod_dual.u235.png similarity index 100% rename from src/main/resources/assets/hbm/textures/items/rod_dual_u235.png rename to src/main/resources/assets/hbm/textures/items/rod_dual.u235.png diff --git a/src/main/resources/assets/hbm/textures/items/rod_dual_u238.png b/src/main/resources/assets/hbm/textures/items/rod_dual.u238.png similarity index 100% rename from src/main/resources/assets/hbm/textures/items/rod_dual_u238.png rename to src/main/resources/assets/hbm/textures/items/rod_dual.u238.png diff --git a/src/main/resources/assets/hbm/textures/items/rod_dual_uranium.png b/src/main/resources/assets/hbm/textures/items/rod_dual.uranium.png similarity index 100% rename from src/main/resources/assets/hbm/textures/items/rod_dual_uranium.png rename to src/main/resources/assets/hbm/textures/items/rod_dual.uranium.png diff --git a/src/main/resources/assets/hbm/textures/items/rod_dual_waste.png b/src/main/resources/assets/hbm/textures/items/rod_dual.waste.png similarity index 100% rename from src/main/resources/assets/hbm/textures/items/rod_dual_waste.png rename to src/main/resources/assets/hbm/textures/items/rod_dual.waste.png diff --git a/src/main/resources/assets/hbm/textures/items/rod_quad.co.png b/src/main/resources/assets/hbm/textures/items/rod_quad.co.png new file mode 100644 index 000000000..b8cef9c1c Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/rod_quad.co.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rod_quad.co60.png b/src/main/resources/assets/hbm/textures/items/rod_quad.co60.png new file mode 100644 index 000000000..b2a401102 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/rod_quad.co60.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rod_quad_lead.png b/src/main/resources/assets/hbm/textures/items/rod_quad.lead.png similarity index 100% rename from src/main/resources/assets/hbm/textures/items/rod_quad_lead.png rename to src/main/resources/assets/hbm/textures/items/rod_quad.lead.png diff --git a/src/main/resources/assets/hbm/textures/items/rod_quad_lithium.png b/src/main/resources/assets/hbm/textures/items/rod_quad.lithium.png similarity index 100% rename from src/main/resources/assets/hbm/textures/items/rod_quad_lithium.png rename to src/main/resources/assets/hbm/textures/items/rod_quad.lithium.png diff --git a/src/main/resources/assets/hbm/textures/items/rod_quad_neptunium.png b/src/main/resources/assets/hbm/textures/items/rod_quad.np237.png similarity index 100% rename from src/main/resources/assets/hbm/textures/items/rod_quad_neptunium.png rename to src/main/resources/assets/hbm/textures/items/rod_quad.np237.png diff --git a/src/main/resources/assets/hbm/textures/items/rod_quad_pu238.png b/src/main/resources/assets/hbm/textures/items/rod_quad.pu238.png similarity index 100% rename from src/main/resources/assets/hbm/textures/items/rod_quad_pu238.png rename to src/main/resources/assets/hbm/textures/items/rod_quad.pu238.png diff --git a/src/main/resources/assets/hbm/textures/items/rod_quad_pu239.png b/src/main/resources/assets/hbm/textures/items/rod_quad.pu239.png similarity index 100% rename from src/main/resources/assets/hbm/textures/items/rod_quad_pu239.png rename to src/main/resources/assets/hbm/textures/items/rod_quad.pu239.png diff --git a/src/main/resources/assets/hbm/textures/items/rod_quad.rgp.png b/src/main/resources/assets/hbm/textures/items/rod_quad.rgp.png new file mode 100644 index 000000000..a614eb0e5 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/rod_quad.rgp.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rod_quad_th232.png b/src/main/resources/assets/hbm/textures/items/rod_quad.th232.png similarity index 100% rename from src/main/resources/assets/hbm/textures/items/rod_quad_th232.png rename to src/main/resources/assets/hbm/textures/items/rod_quad.th232.png diff --git a/src/main/resources/assets/hbm/textures/items/rod_quad_thorium_fuel.png b/src/main/resources/assets/hbm/textures/items/rod_quad.thf.png similarity index 100% rename from src/main/resources/assets/hbm/textures/items/rod_quad_thorium_fuel.png rename to src/main/resources/assets/hbm/textures/items/rod_quad.thf.png diff --git a/src/main/resources/assets/hbm/textures/items/rod_quad_tritium.png b/src/main/resources/assets/hbm/textures/items/rod_quad.tritium.png similarity index 100% rename from src/main/resources/assets/hbm/textures/items/rod_quad_tritium.png rename to src/main/resources/assets/hbm/textures/items/rod_quad.tritium.png diff --git a/src/main/resources/assets/hbm/textures/items/rod_quad_u235.png b/src/main/resources/assets/hbm/textures/items/rod_quad.u235.png similarity index 100% rename from src/main/resources/assets/hbm/textures/items/rod_quad_u235.png rename to src/main/resources/assets/hbm/textures/items/rod_quad.u235.png diff --git a/src/main/resources/assets/hbm/textures/items/rod_quad_u238.png b/src/main/resources/assets/hbm/textures/items/rod_quad.u238.png similarity index 100% rename from src/main/resources/assets/hbm/textures/items/rod_quad_u238.png rename to src/main/resources/assets/hbm/textures/items/rod_quad.u238.png diff --git a/src/main/resources/assets/hbm/textures/items/rod_quad_uranium.png b/src/main/resources/assets/hbm/textures/items/rod_quad.uranium.png similarity index 100% rename from src/main/resources/assets/hbm/textures/items/rod_quad_uranium.png rename to src/main/resources/assets/hbm/textures/items/rod_quad.uranium.png diff --git a/src/main/resources/assets/hbm/textures/items/rod_quad_waste.png b/src/main/resources/assets/hbm/textures/items/rod_quad.waste.png similarity index 100% rename from src/main/resources/assets/hbm/textures/items/rod_quad_waste.png rename to src/main/resources/assets/hbm/textures/items/rod_quad.waste.png diff --git a/src/main/resources/assets/hbm/textures/items/rod_zirnox_les_fuel.png b/src/main/resources/assets/hbm/textures/items/rod_zirnox_les_fuel.png index bf06918cd..0aca52a3d 100644 Binary files a/src/main/resources/assets/hbm/textures/items/rod_zirnox_les_fuel.png and b/src/main/resources/assets/hbm/textures/items/rod_zirnox_les_fuel.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rod_zirnox_mox_fuel.png b/src/main/resources/assets/hbm/textures/items/rod_zirnox_mox_fuel.png index 730470c7a..3f7883f93 100644 Binary files a/src/main/resources/assets/hbm/textures/items/rod_zirnox_mox_fuel.png and b/src/main/resources/assets/hbm/textures/items/rod_zirnox_mox_fuel.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rod_zirnox_plutonium_fuel.png b/src/main/resources/assets/hbm/textures/items/rod_zirnox_plutonium_fuel.png index 9a7b8afa9..f7f4d008f 100644 Binary files a/src/main/resources/assets/hbm/textures/items/rod_zirnox_plutonium_fuel.png and b/src/main/resources/assets/hbm/textures/items/rod_zirnox_plutonium_fuel.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rod_zirnox_thorium_fuel.png b/src/main/resources/assets/hbm/textures/items/rod_zirnox_thorium_fuel.png index 4b53780e9..94ebe0219 100644 Binary files a/src/main/resources/assets/hbm/textures/items/rod_zirnox_thorium_fuel.png and b/src/main/resources/assets/hbm/textures/items/rod_zirnox_thorium_fuel.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rod_zirnox_u233_fuel.png b/src/main/resources/assets/hbm/textures/items/rod_zirnox_u233_fuel.png index eda241127..0342ae95d 100644 Binary files a/src/main/resources/assets/hbm/textures/items/rod_zirnox_u233_fuel.png and b/src/main/resources/assets/hbm/textures/items/rod_zirnox_u233_fuel.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rod_zirnox_u235_fuel.png b/src/main/resources/assets/hbm/textures/items/rod_zirnox_u235_fuel.png index 34ae57632..c12b4a7d5 100644 Binary files a/src/main/resources/assets/hbm/textures/items/rod_zirnox_u235_fuel.png and b/src/main/resources/assets/hbm/textures/items/rod_zirnox_u235_fuel.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rod_zirnox_uranium_fuel.png b/src/main/resources/assets/hbm/textures/items/rod_zirnox_uranium_fuel.png index 90bcacfa4..0db645c6f 100644 Binary files a/src/main/resources/assets/hbm/textures/items/rod_zirnox_uranium_fuel.png and b/src/main/resources/assets/hbm/textures/items/rod_zirnox_uranium_fuel.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_ra226be.png b/src/main/resources/assets/hbm/textures/items/waste_plate_ra226be.png new file mode 100644 index 000000000..cb2ea1956 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/waste_plate_ra226be.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