From a223f5662cd1791ddeec5995ffba8973660fa3b3 Mon Sep 17 00:00:00 2001 From: Vaern Date: Tue, 28 Dec 2021 17:40:22 -0800 Subject: [PATCH 01/17] fixes --- .../com/hbm/inventory/recipes/GasCentrifugeRecipes.java | 2 +- .../tileentity/machine/TileEntityMachineCentrifuge.java | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) 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/tileentity/machine/TileEntityMachineCentrifuge.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineCentrifuge.java index 02f0cf872..75ac5e8ca 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineCentrifuge.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineCentrifuge.java @@ -23,8 +23,6 @@ import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; -//TODO: move this trash to TileEntityMachineBase -//no seriously, this is dreadful public class TileEntityMachineCentrifuge extends TileEntityMachineBase implements ISidedInventory, IEnergyUser { public int progress; @@ -45,7 +43,11 @@ public class TileEntityMachineCentrifuge extends TileEntityMachineBase implement return "container.centrifuge"; } - + @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) { if(i == 2 || i == 3 || i == 4 || i == 5) { From 9be7a1f378d38edaabc91436fd38984ed878efd8 Mon Sep 17 00:00:00 2001 From: Vaern Date: Wed, 29 Dec 2021 22:46:40 -0800 Subject: [PATCH 02/17] attempts to merge --- .../recipes/GasCentrifugeRecipes.java | 2 +- .../machine/TileEntityMachineCentrifuge.java | 40 +++++++------------ 2 files changed, 15 insertions(+), 27 deletions(-) diff --git a/src/main/java/com/hbm/inventory/recipes/GasCentrifugeRecipes.java b/src/main/java/com/hbm/inventory/recipes/GasCentrifugeRecipes.java index a644e0797..45cc2cce0 100644 --- a/src/main/java/com/hbm/inventory/recipes/GasCentrifugeRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/GasCentrifugeRecipes.java @@ -21,7 +21,7 @@ public class GasCentrifugeRecipes { MEUF6 (200, 100, "HEUF6", "Medium Enriched UF6", false, new ItemStack(ModItems.nugget_u238, 1)), HEUF6 (300, 0, "NONE", "High Enriched UF6", true, new ItemStack(ModItems.nugget_u238, 2), new ItemStack(ModItems.nugget_u235, 1), new ItemStack(ModItems.fluorite, 1)), - PF6 (300, 0, "NONE", "Plutonium Hexafluoride", true, new ItemStack(ModItems.nugget_pu238, 1), new ItemStack(ModItems.nugget_pu_mix, 2), new ItemStack(ModItems.fluorite, 1)); + PF6 (300, 0, "NONE", "Plutonium Hexafluoride", false, new ItemStack(ModItems.nugget_pu238, 1), new ItemStack(ModItems.nugget_pu_mix, 2), new ItemStack(ModItems.fluorite, 1)); int fluidConsumed; int fluidProduced; diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineCentrifuge.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineCentrifuge.java index 75ac5e8ca..2fa74ea4f 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineCentrifuge.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineCentrifuge.java @@ -1,29 +1,22 @@ package com.hbm.tileentity.machine; import com.hbm.inventory.recipes.CentrifugeRecipes; -import com.hbm.inventory.recipes.GasCentrifugeRecipes.PseudoFluidType; import com.hbm.lib.Library; import com.hbm.packet.AuxElectricityPacket; -import com.hbm.packet.AuxGaugePacket; import com.hbm.packet.LoopedSoundPacket; import com.hbm.packet.PacketDispatcher; import com.hbm.tileentity.TileEntityMachineBase; -import api.hbm.energy.IBatteryItem; import api.hbm.energy.IEnergyUser; import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Items; -import net.minecraft.inventory.ISidedInventory; 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 TileEntityMachineCentrifuge extends TileEntityMachineBase implements ISidedInventory, IEnergyUser { +public class TileEntityMachineCentrifuge extends TileEntityMachineBase implements IEnergyUser { public int progress; public long power; @@ -31,9 +24,12 @@ public class TileEntityMachineCentrifuge extends TileEntityMachineBase implement public static final int maxPower = 100000; public static final int processingSpeed = 200; - private static final int[] slots_top = new int[] { 0 }; - private static final int[] slots_bottom = new int[] { 2, 3, 4, 5 }; - private static final int[] slots_side = new int[] { 0, 1 }; + /* + * So why do we do this now? You have a funny mekanism/thermal/whatever pipe and you want to output stuff from a side + * that isn't the bottom, what do? Answer: make all slots accessible from all sides and regulate in/output in the + * dedicated methods. Duh. + */ + private static final int[] slot_io = new int[] { 0, 2, 3, 4, 5 }; public TileEntityMachineCentrifuge() { super(6); @@ -43,22 +39,14 @@ public class TileEntityMachineCentrifuge extends TileEntityMachineBase implement return "container.centrifuge"; } - @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) { - if(i == 2 || i == 3 || i == 4 || i == 5) { - return false; - } + return i == 0; + } - if(i == 1) { - return itemStack.getItem() instanceof IBatteryItem; - } - - return !(itemStack.getItem() instanceof IBatteryItem); + @Override + public int[] getAccessibleSlotsFromSide(int side) { + return slot_io; } @Override @@ -77,7 +65,7 @@ public class TileEntityMachineCentrifuge extends TileEntityMachineBase implement @Override public boolean canExtractItem(int i, ItemStack itemStack, int j) { - return j != 0 || i != 1; + return i > 1; } public int getCentrifugeProgressScaled(int i) { @@ -223,4 +211,4 @@ public class TileEntityMachineCentrifuge extends TileEntityMachineBase implement public long getMaxPower() { return maxPower; } -} +} \ No newline at end of file From e40ea77e3ba8beecb6ecb23c06cb66eed7d25818 Mon Sep 17 00:00:00 2001 From: Vaern Date: Wed, 29 Dec 2021 22:48:07 -0800 Subject: [PATCH 03/17] preliminary small reactor revamp --- .../blocks/machine/MachineReactorSmall.java | 175 ++-- .../com/hbm/blocks/machine/ReactorZirnox.java | 9 +- .../java/com/hbm/crafting/RodRecipes.java | 48 +- .../java/com/hbm/crafting/WeaponRecipes.java | 8 +- .../com/hbm/entity/mob/EntityRADBeast.java | 8 +- .../java/com/hbm/hazard/HazardRegistry.java | 97 +- .../modifier/HazardModifierFuelRadiation.java | 30 + .../ContainerMachineReactorSmall.java | 14 +- .../inventory/gui/GUIMachineReactorSmall.java | 144 +-- .../inventory/recipes/AssemblerRecipes.java | 2 +- .../inventory/recipes/CentrifugeRecipes.java | 4 +- .../inventory/recipes/anvil/AnvilRecipes.java | 5 + src/main/java/com/hbm/items/ModItems.java | 191 +--- .../hbm/items/machine/ItemDepletedFuel.java | 46 + .../com/hbm/items/machine/ItemFuelRod.java | 14 +- .../com/hbm/items/machine/ItemPlateFuel.java | 70 ++ .../com/hbm/items/machine/ItemRBMKRod.java | 2 +- .../com/hbm/items/machine/ItemZirnoxRod.java | 7 +- .../java/com/hbm/lib/HbmChestContents.java | 24 +- .../java/com/hbm/packet/AuxButtonPacket.java | 21 +- .../java/com/hbm/packet/AuxGaugePacket.java | 12 - .../render/tileentity/RenderSmallReactor.java | 4 +- .../machine/TileEntityMachineGenerator.java | 8 +- .../TileEntityMachineReactorLarge.java | 52 +- .../TileEntityMachineReactorSmall.java | 911 +++++------------- .../machine/TileEntityReactorControl.java | 4 +- .../machine/TileEntityWasteDrum.java | 22 +- src/main/resources/assets/hbm/lang/de_DE.lang | 8 - src/main/resources/assets/hbm/lang/en_NT.lang | 5 - src/main/resources/assets/hbm/lang/en_US.lang | 19 +- .../hbm/textures/items/plate_fuel_mox.png | Bin 0 -> 269 bytes .../hbm/textures/items/plate_fuel_pu239.png | Bin 0 -> 269 bytes .../hbm/textures/items/plate_fuel_sa326.png | Bin 0 -> 270 bytes .../hbm/textures/items/plate_fuel_u233.png | Bin 0 -> 269 bytes .../hbm/textures/items/plate_fuel_u235.png | Bin 0 -> 269 bytes .../items/plate_waste_overlay_heat.png | Bin 0 -> 418 bytes .../textures/items/rod_waste_overlay_heat.png | Bin 0 -> 353 bytes .../hbm/textures/items/waste_mox_hot.png | Bin 500 -> 0 bytes .../hbm/textures/items/waste_plate_mox.png | Bin 0 -> 266 bytes .../hbm/textures/items/waste_plate_sa326.png | Bin 0 -> 262 bytes .../textures/items/waste_plate_uranium.png | Bin 0 -> 261 bytes .../textures/items/waste_plutonium_hot.png | Bin 508 -> 0 bytes .../textures/items/waste_schrabidium_hot.png | Bin 516 -> 0 bytes .../hbm/textures/items/waste_thorium_hot.png | Bin 506 -> 0 bytes .../hbm/textures/items/waste_uranium_hot.png | Bin 501 -> 0 bytes 45 files changed, 664 insertions(+), 1300 deletions(-) create mode 100644 src/main/java/com/hbm/hazard/modifier/HazardModifierFuelRadiation.java create mode 100644 src/main/java/com/hbm/items/machine/ItemDepletedFuel.java create mode 100644 src/main/java/com/hbm/items/machine/ItemPlateFuel.java create mode 100644 src/main/resources/assets/hbm/textures/items/plate_fuel_mox.png create mode 100644 src/main/resources/assets/hbm/textures/items/plate_fuel_pu239.png create mode 100644 src/main/resources/assets/hbm/textures/items/plate_fuel_sa326.png create mode 100644 src/main/resources/assets/hbm/textures/items/plate_fuel_u233.png create mode 100644 src/main/resources/assets/hbm/textures/items/plate_fuel_u235.png create mode 100644 src/main/resources/assets/hbm/textures/items/plate_waste_overlay_heat.png create mode 100644 src/main/resources/assets/hbm/textures/items/rod_waste_overlay_heat.png delete mode 100644 src/main/resources/assets/hbm/textures/items/waste_mox_hot.png create mode 100644 src/main/resources/assets/hbm/textures/items/waste_plate_mox.png create mode 100644 src/main/resources/assets/hbm/textures/items/waste_plate_sa326.png create mode 100644 src/main/resources/assets/hbm/textures/items/waste_plate_uranium.png delete mode 100644 src/main/resources/assets/hbm/textures/items/waste_plutonium_hot.png delete mode 100644 src/main/resources/assets/hbm/textures/items/waste_schrabidium_hot.png delete mode 100644 src/main/resources/assets/hbm/textures/items/waste_thorium_hot.png delete mode 100644 src/main/resources/assets/hbm/textures/items/waste_uranium_hot.png diff --git a/src/main/java/com/hbm/blocks/machine/MachineReactorSmall.java b/src/main/java/com/hbm/blocks/machine/MachineReactorSmall.java index 05220d0ed..ea2f2859f 100644 --- a/src/main/java/com/hbm/blocks/machine/MachineReactorSmall.java +++ b/src/main/java/com/hbm/blocks/machine/MachineReactorSmall.java @@ -2,15 +2,19 @@ package com.hbm.blocks.machine; import java.util.Random; +import com.hbm.blocks.BlockDummyable; import com.hbm.blocks.ModBlocks; import com.hbm.handler.BossSpawnHandler; import com.hbm.handler.MultiblockHandler; +import com.hbm.handler.MultiblockHandlerXR; import com.hbm.interfaces.IMultiblock; import com.hbm.main.MainRegistry; -import com.hbm.tileentity.machine.TileEntityDummy; +import com.hbm.tileentity.TileEntityProxyCombo; import com.hbm.tileentity.machine.TileEntityMachineReactorSmall; import cpw.mods.fml.common.network.internal.FMLNetworkHandler; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; @@ -23,122 +27,23 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; -public class MachineReactorSmall extends BlockContainer implements IMultiblock { - - private final Random field_149933_a = new Random(); - private static boolean keepInventory; +public class MachineReactorSmall extends BlockDummyable implements IMultiblock { - public MachineReactorSmall(Material p_i45386_1_) { - super(p_i45386_1_); + public MachineReactorSmall(Material mat) { + super(mat); } @Override - public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) - { - return Item.getItemFromBlock(ModBlocks.machine_reactor_small); - } + public TileEntity createNewTileEntity(World world, int meta) { - @Override - public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { - return new TileEntityMachineReactorSmall(); - } + if(meta >= 12) + return new TileEntityMachineReactorSmall(); + if(meta >= 6) + return new TileEntityProxyCombo(false, true, true); - @Override - public int getRenderType() { - return -1; - } - - @Override - public boolean isOpaqueCube() { - return false; - } - - @Override - public boolean renderAsNormalBlock() { - return false; - } - - @Override - public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_) - { - if (!keepInventory) - { - ISidedInventory tileentityfurnace = (ISidedInventory)p_149749_1_.getTileEntity(p_149749_2_, p_149749_3_, p_149749_4_); - - if (tileentityfurnace != null) - { - for (int i1 = 0; i1 < tileentityfurnace.getSizeInventory(); ++i1) - { - ItemStack itemstack = tileentityfurnace.getStackInSlot(i1); - - if (itemstack != null) - { - float f = this.field_149933_a.nextFloat() * 0.8F + 0.1F; - float f1 = this.field_149933_a.nextFloat() * 0.8F + 0.1F; - float f2 = this.field_149933_a.nextFloat() * 0.8F + 0.1F; - - while (itemstack.stackSize > 0) - { - int j1 = this.field_149933_a.nextInt(21) + 10; - - if (j1 > itemstack.stackSize) - { - j1 = itemstack.stackSize; - } - - itemstack.stackSize -= j1; - EntityItem entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1, p_149749_4_ + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); - - if (itemstack.hasTagCompound()) - { - entityitem.getEntityItem().setTagCompound((NBTTagCompound)itemstack.getTagCompound().copy()); - } - - float f3 = 0.05F; - entityitem.motionX = (float)this.field_149933_a.nextGaussian() * f3; - entityitem.motionY = (float)this.field_149933_a.nextGaussian() * f3 + 0.2F; - entityitem.motionZ = (float)this.field_149933_a.nextGaussian() * f3; - p_149749_1_.spawnEntityInWorld(entityitem); - } - } - } - - p_149749_1_.func_147453_f(p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_); - } - } - - super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_); - } - - @Override - public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) { - - if(MultiblockHandler.checkSpace(world, x, y, z, MultiblockHandler.reactorSmallDimension)) { - - // - DummyBlockMachine.safeBreak = true; - world.setBlock(x, y + 1, z, ModBlocks.dummy_block_reactor_small); - TileEntity te = world.getTileEntity(x, y + 1, z); - if(te instanceof TileEntityDummy) { - TileEntityDummy dummy = (TileEntityDummy)te; - dummy.targetX = x; - dummy.targetY = y; - dummy.targetZ = z; - } - world.setBlock(x, y + 2, z, ModBlocks.dummy_port_reactor_small); - TileEntity te2 = world.getTileEntity(x, y + 2, z); - if(te2 instanceof TileEntityDummy) { - TileEntityDummy dummy = (TileEntityDummy)te2; - dummy.targetX = x; - dummy.targetY = y; - dummy.targetZ = z; - } - DummyBlockMachine.safeBreak = false; - // - - } else - world.func_147480_a(x, y, z, true); + return null; } @Override @@ -147,14 +52,56 @@ public class MachineReactorSmall extends BlockContainer implements IMultiblock { return true; } else if(!player.isSneaking()) { BossSpawnHandler.markFBI(player); + + int[] pos = this.findCore(world, x, y, z); - TileEntityMachineReactorSmall entity = (TileEntityMachineReactorSmall) world.getTileEntity(x, y, z); - if(entity != null) { - FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_reactor_small, world, x, y, z); - } + if(pos == null) + return false; + + FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_reactor_small, world, pos[0], pos[1], pos[2]); return true; } else { return false; } } + + @Override + @SideOnly(Side.CLIENT) + public void randomDisplayTick(World world, int x, int y, int z, Random rand) { + super.randomDisplayTick(world, x, y, z, rand); + + for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) { + + if(dir == ForgeDirection.DOWN || dir == ForgeDirection.UP) + continue; + + if(world.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ).getMaterial() == Material.water) { + + double ix = x + 0.5F + dir.offsetX + rand.nextDouble() - 0.5D; + double iy = y + 0.5F + dir.offsetY + rand.nextDouble() - 0.5D; + double iz = z + 0.5F + dir.offsetZ + rand.nextDouble() - 0.5D; + + if(dir.offsetX != 0) + ix = x + 0.5F + dir.offsetX * 0.5 + rand.nextDouble() * 0.125 * dir.offsetX; + if(dir.offsetZ != 0) + iz = z + 0.5F + dir.offsetZ * 0.5 + rand.nextDouble() * 0.125 * dir.offsetZ; + + world.spawnParticle("bubble", ix, iy, iz, 0.0, 0.2, 0.0); + } + } + } + + @Override + public int[] getDimensions() { + return new int[] {2, 0, 0, 0, 0, 0,}; + } + + @Override + public int getOffset() { + return 0; + } + + protected void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) { + super.fillSpace(world, x, y, z, dir, o); + } } diff --git a/src/main/java/com/hbm/blocks/machine/ReactorZirnox.java b/src/main/java/com/hbm/blocks/machine/ReactorZirnox.java index 42251a71f..c6e55200d 100644 --- a/src/main/java/com/hbm/blocks/machine/ReactorZirnox.java +++ b/src/main/java/com/hbm/blocks/machine/ReactorZirnox.java @@ -3,6 +3,7 @@ package com.hbm.blocks.machine; import com.hbm.blocks.BlockDummyable; import com.hbm.blocks.ModBlocks; +import com.hbm.handler.BossSpawnHandler; import com.hbm.handler.MultiblockHandlerXR; import com.hbm.interfaces.IMultiblock; import com.hbm.main.MainRegistry; @@ -36,11 +37,11 @@ public class ReactorZirnox extends BlockDummyable implements IMultiblock { @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { - if(world.isRemote) - { + if(world.isRemote) { return true; - } else if(!player.isSneaking()) - { + } else if(!player.isSneaking()) { + BossSpawnHandler.markFBI(player); + int[] pos = this.findCore(world, x, y, z); if(pos == null) diff --git a/src/main/java/com/hbm/crafting/RodRecipes.java b/src/main/java/com/hbm/crafting/RodRecipes.java index ba7a9a219..bd521348c 100644 --- a/src/main/java/com/hbm/crafting/RodRecipes.java +++ b/src/main/java/com/hbm/crafting/RodRecipes.java @@ -34,11 +34,6 @@ public class RodRecipes { addRodBilletUnload(SA326, ModItems.billet_schrabidium, ModItems.rod_schrabidium); addRodBilletUnload(SA327, ModItems.billet_solinium, ModItems.rod_solinium); addRodBilletUnload(ModItems.egg_balefire_shard, ModItems.rod_balefire); - addFuelRodBillet(ModItems.billet_uranium_fuel, ModItems.rod_uranium_fuel); - addFuelRodBillet(ModItems.billet_thorium_fuel, ModItems.rod_thorium_fuel); - addFuelRodBillet(ModItems.billet_plutonium_fuel, ModItems.rod_plutonium_fuel); - addFuelRodBillet(ModItems.billet_mox_fuel, ModItems.rod_mox_fuel); - addFuelRodBillet(ModItems.billet_schrabidium_fuel, ModItems.rod_schrabidium_fuel); CraftingManager.addShapelessAuto(new ItemStack(ModItems.rod_lead, 1), new Object[] { ModItems.rod_empty, PB.nugget(), PB.nugget(), PB.nugget(), PB.nugget(), PB.nugget(), PB.nugget() }); CraftingManager.addShapelessAuto(new ItemStack(ModItems.nugget_lead, 6), new Object[] { ModItems.rod_lead }); CraftingManager.addShapelessAuto(new ItemStack(ModItems.rod_lithium, 1), new Object[] { ModItems.rod_empty, LI.ingot() }); @@ -64,11 +59,6 @@ public class RodRecipes { addDualRodBilletUnload(SA326, ModItems.billet_schrabidium, ModItems.rod_dual_schrabidium); addDualRodBilletUnload(SA327, ModItems.billet_solinium, ModItems.rod_dual_solinium); addDualRodBilletUnload(ModItems.egg_balefire_shard, ModItems.rod_dual_balefire); - addDualFuelRodBillet(ModItems.billet_uranium_fuel, ModItems.rod_dual_uranium_fuel); - addDualFuelRodBillet(ModItems.billet_thorium_fuel, ModItems.rod_dual_thorium_fuel); - addDualFuelRodBillet(ModItems.billet_plutonium_fuel, ModItems.rod_dual_plutonium_fuel); - addDualFuelRodBillet(ModItems.billet_mox_fuel, ModItems.rod_dual_mox_fuel); - addDualFuelRodBillet(ModItems.billet_schrabidium_fuel, ModItems.rod_dual_schrabidium_fuel); CraftingManager.addShapelessAuto(new ItemStack(ModItems.rod_dual_lead, 1), new Object[] { ModItems.rod_dual_empty, PB.ingot(), PB.nugget(), PB.nugget(), PB.nugget() }); CraftingManager.addShapelessAuto(new ItemStack(ModItems.nugget_lead, 12), new Object[] { ModItems.rod_dual_lead }); CraftingManager.addShapelessAuto(new ItemStack(ModItems.rod_dual_lithium, 1), new Object[] { ModItems.rod_dual_empty, LI.ingot(), LI.ingot() }); @@ -93,11 +83,6 @@ public class RodRecipes { addQuadRodBilletUnload(SA326, ModItems.billet_schrabidium, ModItems.rod_quad_schrabidium); addQuadRodBilletUnload(SA327, ModItems.billet_solinium, ModItems.rod_quad_solinium); addQuadRodBilletUnload(ModItems.egg_balefire_shard, ModItems.rod_quad_balefire); - addQuadFuelRodBillet(ModItems.billet_uranium_fuel, ModItems.rod_quad_uranium_fuel); - addQuadFuelRodBillet(ModItems.billet_thorium_fuel, ModItems.rod_quad_thorium_fuel); - addQuadFuelRodBillet(ModItems.billet_plutonium_fuel, ModItems.rod_quad_plutonium_fuel); - addQuadFuelRodBillet(ModItems.billet_mox_fuel, ModItems.rod_quad_mox_fuel); - addQuadFuelRodBillet(ModItems.billet_schrabidium_fuel, ModItems.rod_quad_schrabidium_fuel); CraftingManager.addShapelessAuto(new ItemStack(ModItems.rod_quad_lead, 1), new Object[] { ModItems.rod_quad_empty, PB.ingot(), PB.ingot(), PB.nugget(), PB.nugget(), PB.nugget(), PB.nugget(), PB.nugget(), PB.nugget() }); CraftingManager.addShapelessAuto(new ItemStack(ModItems.nugget_lead, 24), new Object[] { ModItems.rod_quad_lead }); CraftingManager.addShapelessAuto(new ItemStack(ModItems.rod_quad_lithium, 1), new Object[] { ModItems.rod_quad_empty, LI.ingot(), LI.ingot(), LI.ingot(), LI.ingot() }); @@ -116,14 +101,14 @@ public class RodRecipes { addZIRNOXRod(ModItems.billet_u235, ModItems.rod_zirnox_u235_fuel); addZIRNOXRod(ModItems.billet_les, ModItems.rod_zirnox_les_fuel); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_natural_uranium_hot, 2), new Object[] { ModItems.rod_zirnox_natural_uranium_fuel_depleted }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_uranium_hot, 2), new Object[] { ModItems.rod_zirnox_uranium_fuel_depleted }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_thorium_hot, 2), new Object[] { ModItems.rod_zirnox_thorium_fuel_depleted }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_mox_hot, 2), new Object[] { ModItems.rod_zirnox_mox_fuel_depleted }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_plutonium_hot, 2), new Object[] { ModItems.rod_zirnox_plutonium_fuel_depleted }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_u233_hot, 2), new Object[] { ModItems.rod_zirnox_u233_fuel_depleted }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_u235_hot, 2), new Object[] { ModItems.rod_zirnox_u235_fuel_depleted }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_schrabidium_hot, 2), new Object[] { ModItems.rod_zirnox_les_fuel_depleted }); + CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_natural_uranium, 2, 1), new Object[] { ModItems.rod_zirnox_natural_uranium_fuel_depleted }); + CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_uranium, 2, 1), new Object[] { ModItems.rod_zirnox_uranium_fuel_depleted }); + CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_thorium, 2, 1), new Object[] { ModItems.rod_zirnox_thorium_fuel_depleted }); + CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_mox, 2, 1), new Object[] { ModItems.rod_zirnox_mox_fuel_depleted }); + CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_plutonium, 2, 1), new Object[] { ModItems.rod_zirnox_plutonium_fuel_depleted }); + CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_u233, 2, 1), new Object[] { ModItems.rod_zirnox_u233_fuel_depleted }); + CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_u235, 2, 1), new Object[] { ModItems.rod_zirnox_u235_fuel_depleted }); + CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_schrabidium, 2, 1), new Object[] { ModItems.rod_zirnox_les_fuel_depleted }); @@ -172,23 +157,6 @@ public class RodRecipes { CraftingManager.addShapelessAuto(new ItemStack(ModItems.billet_nuclear_waste, 1), new Object[] { ModItems.rod_waste }); CraftingManager.addShapelessAuto(new ItemStack(ModItems.billet_nuclear_waste, 2), new Object[] { ModItems.rod_dual_waste }); CraftingManager.addShapelessAuto(new ItemStack(ModItems.billet_nuclear_waste, 4), new Object[] { ModItems.rod_quad_waste }); - - //Depleted fuel recycling - CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_uranium_hot, 1), new Object[] { ModItems.rod_uranium_fuel_depleted }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_uranium_hot, 2), new Object[] { ModItems.rod_dual_uranium_fuel_depleted }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_uranium_hot, 4), new Object[] { ModItems.rod_quad_uranium_fuel_depleted }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_thorium_hot, 1), new Object[] { ModItems.rod_thorium_fuel_depleted }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_thorium_hot, 2), new Object[] { ModItems.rod_dual_thorium_fuel_depleted }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_thorium_hot, 4), new Object[] { ModItems.rod_quad_thorium_fuel_depleted }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_plutonium_hot, 1), new Object[] { ModItems.rod_plutonium_fuel_depleted }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_plutonium_hot, 2), new Object[] { ModItems.rod_dual_plutonium_fuel_depleted }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_plutonium_hot, 4), new Object[] { ModItems.rod_quad_plutonium_fuel_depleted }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_mox_hot, 1), new Object[] { ModItems.rod_mox_fuel_depleted }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_mox_hot, 2), new Object[] { ModItems.rod_dual_mox_fuel_depleted }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_mox_hot, 4), new Object[] { ModItems.rod_quad_mox_fuel_depleted }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_schrabidium_hot, 1), new Object[] { ModItems.rod_schrabidium_fuel_depleted }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_schrabidium_hot, 2), new Object[] { ModItems.rod_dual_schrabidium_fuel_depleted }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_schrabidium_hot, 4), new Object[] { ModItems.rod_quad_schrabidium_fuel_depleted }); } //Fill rods with one billet. For fuels only, therefore no unloading or ore dict diff --git a/src/main/java/com/hbm/crafting/WeaponRecipes.java b/src/main/java/com/hbm/crafting/WeaponRecipes.java index 5490b6eaf..a2f006241 100644 --- a/src/main/java/com/hbm/crafting/WeaponRecipes.java +++ b/src/main/java/com/hbm/crafting/WeaponRecipes.java @@ -100,10 +100,10 @@ public class WeaponRecipes { CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_ks23, 1), new Object[] { "PPM", "SWL", 'P', STEEL.plate(), 'M', ModItems.mechanism_rifle_1, 'S', KEY_STICK, 'W', ModItems.wire_tungsten, 'L', KEY_LOG }); CraftingManager.addShapelessAuto(new ItemStack(ModItems.gun_sauer, 1), new Object[] { ModItems.ducttape, ModItems.gun_ks23, Blocks.lever, ModItems.gun_ks23 }); CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_xvl1456, 1), new Object[] { "PBB", "ACC", "PRY", 'P', STEEL.plate(), 'R', ModItems.redcoil_capacitor, 'A', ModItems.coil_advanced_alloy, 'B', ModItems.battery_generic, 'C', ModItems.coil_advanced_torus, 'Y', ModItems.mechanism_special }); - CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_xvl1456_ammo, 64), new Object[] { "SSS", "SRS", "SSS", 'S', STEEL.plate(), 'R', ModItems.rod_quad_uranium_fuel_depleted }); - CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_xvl1456_ammo, 32), new Object[] { " S ", "SRS", " S ", 'S', STEEL.plate(), 'R', ModItems.rod_dual_uranium_fuel_depleted }); - CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_xvl1456_ammo, 16), new Object[] { " S ", " R ", " S ", 'S', STEEL.plate(), 'R', ModItems.rod_uranium_fuel_depleted }); - CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_xvl1456_ammo, 16), new Object[] { "SRS", 'S', STEEL.plate(), 'R', ModItems.rod_uranium_fuel_depleted }); + CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_xvl1456_ammo, 64), new Object[] { "SSS", "SRS", "SSS", 'S', STEEL.plate(), 'R', ModItems.waste_natural_uranium }); + CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_xvl1456_ammo, 32), new Object[] { " S ", "SRS", " S ", 'S', STEEL.plate(), 'R', ModItems.waste_uranium }); + CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_xvl1456_ammo, 16), new Object[] { " S ", " R ", " S ", 'S', STEEL.plate(), 'R', ModItems.waste_plate_u235 }); + CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_xvl1456_ammo, 16), new Object[] { "SRS", 'S', STEEL.plate(), 'R', ModItems.waste_u235 }); CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_xvl1456_ammo, 16), new Object[] { " S ", " R ", " S ", 'S', STEEL.plate(), 'R', U238.ingot() }); CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_xvl1456_ammo, 16), new Object[] { "SRS", 'S', STEEL.plate(), 'R', U238.ingot() }); CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_osipr, 1), new Object[] { "CCT", "WWI", "MCC", 'C', CMB.plate(), 'T', W.ingot(), 'W', ModItems.wire_magnetized_tungsten, 'I', ModItems.mechanism_rifle_2, 'M', ModItems.coil_magnetized_tungsten }); diff --git a/src/main/java/com/hbm/entity/mob/EntityRADBeast.java b/src/main/java/com/hbm/entity/mob/EntityRADBeast.java index 6f7b98b22..868a99e30 100644 --- a/src/main/java/com/hbm/entity/mob/EntityRADBeast.java +++ b/src/main/java/com/hbm/entity/mob/EntityRADBeast.java @@ -163,7 +163,7 @@ public class EntityRADBeast extends EntityMob implements IRadiationImmune { } protected Item getDropItem() { - return ModItems.rod_uranium_fuel_depleted; + return ModItems.rod_zirnox_uranium_fuel_depleted; } @Override @@ -194,13 +194,13 @@ public class EntityRADBeast extends EntityMob implements IRadiationImmune { int r = this.rand.nextInt(3); if(r == 0) { - this.dropItem(this.isWet() ? ModItems.waste_uranium : ModItems.rod_uranium_fuel_depleted, 1); + this.dropItem(this.isWet() ? ModItems.waste_uranium : ModItems.rod_zirnox_uranium_fuel_depleted, this.isWet() ? 2 : 1); } else if(r == 1) { - this.dropItem(this.isWet() ? ModItems.waste_mox : ModItems.rod_mox_fuel_depleted, 1); + this.dropItem(this.isWet() ? ModItems.waste_mox : ModItems.rod_zirnox_mox_fuel_depleted, this.isWet() ? 2 : 1); } else if(r == 2) { - this.dropItem(this.isWet() ? ModItems.waste_plutonium : ModItems.rod_plutonium_fuel_depleted, 1); + this.dropItem(this.isWet() ? ModItems.waste_plutonium : ModItems.rod_zirnox_plutonium_fuel_depleted, this.isWet() ? 2 : 1); } } diff --git a/src/main/java/com/hbm/hazard/HazardRegistry.java b/src/main/java/com/hbm/hazard/HazardRegistry.java index 25453ca75..e834e124b 100644 --- a/src/main/java/com/hbm/hazard/HazardRegistry.java +++ b/src/main/java/com/hbm/hazard/HazardRegistry.java @@ -191,42 +191,47 @@ public class HazardRegistry { HazardSystem.register(block_corium_cobble, makeData(RADIATION, 150F)); HazardSystem.register(sand_gold198, makeData(RADIATION, au198 * block * powder_mult)); - HazardSystem.register(rod_zirnox_natural_uranium_fuel, makeData(RADIATION, u * rod_dual)); - HazardSystem.register(rod_zirnox_uranium_fuel, makeData(RADIATION, uf * rod_dual)); - HazardSystem.register(rod_zirnox_th232, makeData(RADIATION, th232 * rod_dual)); - HazardSystem.register(rod_zirnox_thorium_fuel, makeData(RADIATION, thf * rod_dual)); - HazardSystem.register(rod_zirnox_mox_fuel, makeData(RADIATION, mox * rod_dual)); - HazardSystem.register(rod_zirnox_plutonium_fuel, makeData(RADIATION, puf * rod_dual)); - HazardSystem.register(rod_zirnox_u233_fuel, makeData(RADIATION, u233 * rod_dual)); - HazardSystem.register(rod_zirnox_u235_fuel, makeData(RADIATION, u235 * rod_dual)); + registerOtherFuel(rod_zirnox_natural_uranium_fuel, u * rod_dual, u * rod_dual * 100); + registerOtherFuel(rod_zirnox_uranium_fuel, uf * rod_dual, uf * rod_dual * 100); + registerOtherFuel(rod_zirnox_th232, th232 * rod_dual, thf * rod_dual); + registerOtherFuel(rod_zirnox_thorium_fuel, thf * rod_dual, u233 * rod_dual * 10); + registerOtherFuel(rod_zirnox_mox_fuel, mox * rod_dual, mox * rod_dual * 100); + registerOtherFuel(rod_zirnox_plutonium_fuel, puf * rod_dual, puf * rod_dual * 100); + registerOtherFuel(rod_zirnox_u233_fuel, u233 * rod_dual, u233 * rod_dual * 100); + registerOtherFuel(rod_zirnox_u235_fuel, u235 * rod_dual, u235 * rod_dual * 100); + registerOtherFuel(rod_zirnox_les_fuel, saf * rod_dual, saf * rod_dual * 100); + registerOtherFuel(rod_zirnox_lithium, 0, 0.001F * rod_dual); - HazardSystem.register(rod_zirnox_les_fuel, makeData(RADIATION, saf * rod_dual)); + HazardSystem.register(rod_zirnox_natural_uranium_fuel_depleted, makeData(RADIATION, u * rod_dual * 100)); + HazardSystem.register(rod_zirnox_uranium_fuel_depleted, makeData(RADIATION, uf * rod_dual * 100)); + HazardSystem.register(rod_zirnox_thorium_fuel_depleted, makeData(RADIATION, u233 * rod_dual * 10)); + HazardSystem.register(rod_zirnox_mox_fuel_depleted, makeData(RADIATION, mox * rod_dual * 100)); + HazardSystem.register(rod_zirnox_plutonium_fuel_depleted, makeData(RADIATION, 100F + 30F)); + HazardSystem.register(rod_zirnox_u233_fuel_depleted, makeData(RADIATION, u233 * rod_dual * 100)); + HazardSystem.register(rod_zirnox_u235_fuel_depleted, makeData(RADIATION, u235 * rod_dual * 100)); + HazardSystem.register(rod_zirnox_les_fuel_depleted, new HazardData().addEntry(RADIATION, saf * rod_dual * 100).addEntry(BLINDING, 5F)); + HazardSystem.register(rod_zirnox_tritium, makeData(RADIATION, 0.01F * rod_dual)); - HazardSystem.register(rod_zirnox_natural_uranium_fuel_depleted, makeData(RADIATION, 70F)); - HazardSystem.register(rod_zirnox_uranium_fuel_depleted, makeData(RADIATION, 80F)); - HazardSystem.register(rod_zirnox_thorium_fuel_depleted, makeData(RADIATION, 60F)); - HazardSystem.register(rod_zirnox_mox_fuel_depleted, makeData(RADIATION, 100F)); - HazardSystem.register(rod_zirnox_plutonium_fuel_depleted, makeData(RADIATION, 110F)); - HazardSystem.register(rod_zirnox_u233_fuel_depleted, makeData(RADIATION, 120F)); - HazardSystem.register(rod_zirnox_u235_fuel_depleted, makeData(RADIATION, 110F)); - HazardSystem.register(rod_zirnox_les_fuel_depleted, new HazardData().addEntry(RADIATION, 120F).addEntry(BLINDING, 5F)); + registerOtherWaste(waste_natural_uranium, u * billet * 100); + registerOtherWaste(waste_uranium, uf * billet * 100); + registerOtherWaste(waste_u233, u233 * billet * 100); + registerOtherWaste(waste_u235, u235 * billet * 100); + registerOtherWaste(waste_thorium, u233 * billet * 10); + registerOtherWaste(waste_plutonium, puf * billet * 100); + registerOtherWaste(waste_mox, mox * billet * 100); + registerOtherWaste(waste_schrabidium, saf * billet * 100); - HazardSystem.register(waste_natural_uranium, makeData(RADIATION, 30F)); - HazardSystem.register(waste_uranium, makeData(RADIATION, 30F)); - HazardSystem.register(waste_u233, makeData(RADIATION, 55F)); - HazardSystem.register(waste_u235, makeData(RADIATION, 50F)); - HazardSystem.register(waste_thorium, makeData(RADIATION, 20F)); - HazardSystem.register(waste_plutonium, makeData(RADIATION, 50F)); - HazardSystem.register(waste_mox, makeData(RADIATION, 40F)); - HazardSystem.register(waste_schrabidium, new HazardData().addEntry(RADIATION, 45F).addEntry(HOT, 5F)); - HazardSystem.register(waste_natural_uranium_hot, new HazardData().addEntry(RADIATION, 35F).addEntry(HOT, 5F)); - HazardSystem.register(waste_uranium_hot, new HazardData().addEntry(RADIATION, 40F).addEntry(HOT, 5F)); - HazardSystem.register(waste_u233_hot, new HazardData().addEntry(RADIATION, 60F).addEntry(HOT, 5F)); - HazardSystem.register(waste_u235_hot, new HazardData().addEntry(RADIATION, 55F).addEntry(HOT, 5F)); - HazardSystem.register(waste_thorium_hot, new HazardData().addEntry(RADIATION, 30F).addEntry(HOT, 5F)); - HazardSystem.register(waste_plutonium_hot, new HazardData().addEntry(RADIATION, 55F).addEntry(HOT, 5F)); - HazardSystem.register(waste_mox_hot, new HazardData().addEntry(RADIATION, 50F).addEntry(HOT, 5F)); - HazardSystem.register(waste_schrabidium_hot, new HazardData().addEntry(RADIATION, 60F).addEntry(HOT, 5F).addEntry(BLINDING, 5F)); + registerOtherFuel(plate_fuel_u233, u233 * ingot, u233 * ingot * 100); + registerOtherFuel(plate_fuel_u235, u235 * ingot, u235 * ingot * 100); + registerOtherFuel(plate_fuel_mox, mox * ingot, mox * ingot * 100); + registerOtherFuel(plate_fuel_pu239, pu239 * ingot, pu239 * ingot * 100); + registerOtherFuel(plate_fuel_sa326, sa326 * ingot, sa326 * ingot * 100); + + registerOtherWaste(waste_plate_u233, u233 * ingot * 100); + registerOtherWaste(waste_plate_u235, u235 * ingot * 100); + registerOtherWaste(waste_plate_mox, mox * ingot * 100); + registerOtherWaste(waste_plate_pu239, pu239 * ingot * 100); + registerOtherWaste(waste_plate_sa326, sa326 * ingot * 100); HazardSystem.register(debris_graphite, new HazardData().addEntry(RADIATION, 70F).addEntry(HOT, 5F)); HazardSystem.register(debris_metal, makeData(RADIATION, 5F)); @@ -282,12 +287,12 @@ public class HazardRegistry { HazardSystem.register(billet_ra226be, makeData(RADIATION, rabe * billet)); HazardSystem.register(billet_pu238be, makeData(RADIATION, pube * billet)); - HazardSystem.register(pellet_rtg, new HazardData().addEntry(RADIATION, pu238 * billet * 3).addEntry(HOT, 5F)); - HazardSystem.register(pellet_rtg_radium, makeData(RADIATION, ra226 * billet * 3)); + HazardSystem.register(pellet_rtg, new HazardData().addEntry(RADIATION, pu238 * rtg).addEntry(HOT, 5F)); + HazardSystem.register(pellet_rtg_radium, makeData(RADIATION, ra226 * rtg)); HazardSystem.register(pellet_rtg_weak, makeData(RADIATION, (pu238 + (u238 * 2)) * billet)); - HazardSystem.register(pellet_rtg_polonium, new HazardData().addEntry(RADIATION, po210 * billet * 3).addEntry(HOT, 5F)); - HazardSystem.register(pellet_rtg_gold, new HazardData().addEntry(RADIATION, au198 * billet * 3).addEntry(HOT, 5F)); - HazardSystem.register(pellet_rtg_americium, makeData(RADIATION, am241 * billet * 3)); + HazardSystem.register(pellet_rtg_polonium, new HazardData().addEntry(RADIATION, po210 * rtg).addEntry(HOT, 5F)); + HazardSystem.register(pellet_rtg_gold, new HazardData().addEntry(RADIATION, au198 * rtg).addEntry(HOT, 5F)); + HazardSystem.register(pellet_rtg_americium, makeData(RADIATION, am241 * rtg)); registerRodRadiation(rod_th232, rod_dual_th232, rod_quad_th232, th232); registerRodRadiation(rod_uranium, rod_dual_uranium, rod_quad_uranium, u); @@ -385,4 +390,20 @@ public class HazardRegistry { if(blinding > 0) data.addEntry(new HazardEntry(BLINDING, blinding)); HazardSystem.register(rod, data); } + + private static void registerOtherFuel(Item fuel, float base, float target) { + + HazardData data = new HazardData(); + data.addEntry(new HazardEntry(RADIATION, base).addMod(new HazardModifierFuelRadiation(target))); + HazardSystem.register(fuel, data); + } + + private static void registerOtherWaste(Item waste, float base) { + HazardSystem.register(new ItemStack(waste, 1, 0), makeData(RADIATION, base * 0.75F)); + + HazardData data = new HazardData(); + data.addEntry(new HazardEntry(RADIATION, base)); + data.addEntry(new HazardEntry(HOT, 5F)); + HazardSystem.register(new ItemStack(waste, 1, 1), data); + } } diff --git a/src/main/java/com/hbm/hazard/modifier/HazardModifierFuelRadiation.java b/src/main/java/com/hbm/hazard/modifier/HazardModifierFuelRadiation.java new file mode 100644 index 000000000..7dfb687f1 --- /dev/null +++ b/src/main/java/com/hbm/hazard/modifier/HazardModifierFuelRadiation.java @@ -0,0 +1,30 @@ +package com.hbm.hazard.modifier; + +import com.hbm.hazard.HazardRegistry; +import com.hbm.items.machine.ItemFuelRod; + +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.item.ItemStack; + +public class HazardModifierFuelRadiation extends HazardModifier { + +float target; + + public HazardModifierFuelRadiation(float target) { + this.target = target; + } + + @Override + public float modify(ItemStack stack, EntityLivingBase holder, float level) { + + if(stack.getItem() instanceof ItemFuelRod) { + ItemFuelRod fuel = (ItemFuelRod) stack.getItem(); + double depletion = fuel.getDurabilityForDisplay(stack); + + level = (float) (level + (this.target - level) * depletion); + + } + + return level; + } +} diff --git a/src/main/java/com/hbm/inventory/container/ContainerMachineReactorSmall.java b/src/main/java/com/hbm/inventory/container/ContainerMachineReactorSmall.java index 8abf8eee3..f488949a7 100644 --- a/src/main/java/com/hbm/inventory/container/ContainerMachineReactorSmall.java +++ b/src/main/java/com/hbm/inventory/container/ContainerMachineReactorSmall.java @@ -30,12 +30,6 @@ private TileEntityMachineReactorSmall seleniumEngine; this.addSlotToContainer(new Slot(tedf, 10, 98, 90)); this.addSlotToContainer(new Slot(tedf, 11, 134, 90)); - //Fluid IO - this.addSlotToContainer(new Slot(tedf, 12, 8, 90)); - this.addSlotToContainer(new SlotMachineOutput(tedf, 13, 8, 108)); - this.addSlotToContainer(new Slot(tedf, 14, 26, 90)); - this.addSlotToContainer(new SlotMachineOutput(tedf, 15, 26, 108)); - for(int i = 0; i < 3; i++) { for(int j = 0; j < 9; j++) @@ -61,16 +55,14 @@ private TileEntityMachineReactorSmall seleniumEngine; ItemStack var5 = var4.getStack(); var3 = var5.copy(); - if (par2 <= 16) { - if (!this.mergeItemStack(var5, 17, this.inventorySlots.size(), true)) + if (par2 <= 12) { + if (!this.mergeItemStack(var5, 13, this.inventorySlots.size(), true)) { return null; } } else { if (!this.mergeItemStack(var5, 0, 13, true)) - if (!this.mergeItemStack(var5, 14, 15, true)) - if (!this.mergeItemStack(var5, 16, 17, true)) - return null; + return null; } if (var5.stackSize == 0) diff --git a/src/main/java/com/hbm/inventory/gui/GUIMachineReactorSmall.java b/src/main/java/com/hbm/inventory/gui/GUIMachineReactorSmall.java index da5ecf795..936a33c11 100644 --- a/src/main/java/com/hbm/inventory/gui/GUIMachineReactorSmall.java +++ b/src/main/java/com/hbm/inventory/gui/GUIMachineReactorSmall.java @@ -17,28 +17,21 @@ import net.minecraft.util.ResourceLocation; public class GUIMachineReactorSmall extends GuiInfoContainer { private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_reactor_experimental.png"); - private static ResourceLocation overlay = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_reactor_overlay_experimental.png"); - private TileEntityMachineReactorSmall diFurnace; - private boolean toggleOverlay = false; + private TileEntityMachineReactorSmall reactor; public GUIMachineReactorSmall(InventoryPlayer invPlayer, TileEntityMachineReactorSmall tedf) { super(new ContainerMachineReactorSmall(invPlayer, tedf)); - diFurnace = tedf; + reactor = tedf; this.xSize = 176; this.ySize = 222; } - @SuppressWarnings("incomplete-switch") @Override public void drawScreen(int mouseX, int mouseY, float f) { super.drawScreen(mouseX, mouseY, f); - - diFurnace.tanks[0].renderTankInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 36, 16, 52); - diFurnace.tanks[1].renderTankInfo(this, mouseX, mouseY, guiLeft + 26, guiTop + 36, 16, 52); - diFurnace.tanks[2].renderTankInfo(this, mouseX, mouseY, guiLeft + 80, guiTop + 108, 88, 4); - this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 80, guiTop + 114, 88, 4, new String[] { "Hull Temperature:", " " + Math.round((diFurnace.hullHeat) * 0.00001 * 980 + 20) + "°C" }); - this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 80, guiTop + 120, 88, 4, new String[] { "Core Temperature:", " " + Math.round((diFurnace.coreHeat) * 0.00002 * 980 + 20) + "°C" }); + + this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 80, guiTop + 120, 88, 4, new String[] { "Core Temperature:", " " + Math.round((reactor.heat) * 0.00002 * 480 + 20) + "°C" }); String[] text = new String[] { "Coolant will move heat from the core to", "the hull. Water will use that heat and", @@ -57,157 +50,60 @@ public class GUIMachineReactorSmall extends GuiInfoContainer { "using the button next to the", "fluid gauges." }; this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36 + 16, 16, 16, guiLeft - 8, guiTop + 36 + 16, text1); - - if(diFurnace.tanks[0].getFill() <= 0) { - String[] text2 = new String[] { "Error: Water is required for", - "the reactor to function properly!" }; - this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36 + 32, 16, 16, guiLeft - 8, guiTop + 36 + 32 + 16, text2); - } - - if(diFurnace.tanks[1].getFill() <= 0) { - String[] text3 = new String[] { "Error: Coolant is required for", - "the reactor to function properly!" }; - this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36 + 32 + 16, 16, 16, guiLeft - 8, guiTop + 36 + 32 + 16, text3); - } - String s = "0"; - - switch(diFurnace.tanks[2].getTankType()) { - case STEAM: s = "1x"; break; - case HOTSTEAM:s = "10x"; break; - case SUPERHOTSTEAM: s = "100x"; break; - } - - String[] text4 = new String[] { "Steam compression switch", - "Current compression level: " + s}; - this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 63, guiTop + 107, 14, 18, mouseX, mouseY, text4); - - String[] text5 = new String[] { diFurnace.retracting ? "Raise control rods" : "Lower control rods"}; + String[] text5 = new String[] { reactor.retracting ? "Raise control rods" : "Lower control rods"}; this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 52, guiTop + 53, 18, 18, mouseX, mouseY, text5); } @Override protected void drawGuiContainerForegroundLayer(int i, int j) { - String name = this.diFurnace.hasCustomInventoryName() ? this.diFurnace.getInventoryName() : I18n.format(this.diFurnace.getInventoryName()); + String name = this.reactor.hasCustomInventoryName() ? this.reactor.getInventoryName() : I18n.format(this.reactor.getInventoryName()); this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752); this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752); } - @SuppressWarnings("incomplete-switch") - protected void mouseClicked(int x, int y, int i) { + protected void mouseClicked(int x, int y, int i) { super.mouseClicked(x, y, i); if(guiLeft + 52 <= x && guiLeft + 52 + 16 > x && guiTop + 53 < y && guiTop + 53 + 16 >= y) { mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F)); - PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(diFurnace.xCoord, diFurnace.yCoord, diFurnace.zCoord, diFurnace.retracting ? 0 : 1, 0)); - } - - if(guiLeft + 63 <= x && guiLeft + 63 + 14 > x && guiTop + 107 < y && guiTop + 107 + 18 >= y) { - - mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F)); - int c = 0; - - switch(diFurnace.tanks[2].getTankType()) { - case STEAM: c = 0; break; - case HOTSTEAM: c = 1; break; - case SUPERHOTSTEAM: c = 2; break; - } - - PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(diFurnace.xCoord, diFurnace.yCoord, diFurnace.zCoord, c, 1)); + PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(reactor.xCoord, reactor.yCoord, reactor.zCoord, reactor.retracting ? 0 : 1, 0)); } } - @SuppressWarnings("incomplete-switch") @Override protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - - if(toggleOverlay) - Minecraft.getMinecraft().getTextureManager().bindTexture(overlay); - else - Minecraft.getMinecraft().getTextureManager().bindTexture(texture); + Minecraft.getMinecraft().getTextureManager().bindTexture(texture); drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); - if(diFurnace.tanks[2].getFill() > 0) { - int i = diFurnace.getSteamScaled(88); - - int offset = 234; - - switch(diFurnace.tanks[2].getTankType()) { - case HOTSTEAM: offset += 4; break; - case SUPERHOTSTEAM: offset += 8; break; - } - - drawTexturedModalRect(guiLeft + 80, guiTop + 108, 0, offset, i, 4); - } - - if(diFurnace.hasHullHeat()) { - int i = diFurnace.getHullHeatScaled(88); - - i = (int) Math.min(i, 160); - - drawTexturedModalRect(guiLeft + 80, guiTop + 114, 0, 226, i, 4); - } - - if(diFurnace.hasCoreHeat()) { - int i = diFurnace.getCoreHeatScaled(88); + if(reactor.hasHeat()) { + int i = reactor.getHeatScaled(88); i = (int) Math.min(i, 160); drawTexturedModalRect(guiLeft + 80, guiTop + 120, 0, 230, i, 4); } - if(!diFurnace.retracting) + if(!reactor.retracting) drawTexturedModalRect(guiLeft + 52, guiTop + 53, 212, 0, 18, 18); - if(!toggleOverlay) { - if(diFurnace.rods >= diFurnace.rodsMax) { + if(reactor.rods >= reactor.rodsMax) { + for(int x = 0; x < 3; x++) + for(int y = 0; y < 3; y++) + drawTexturedModalRect(guiLeft + 79 + 36 * x, guiTop + 17 + 36 * y, 176, 0, 18, 18); - for(int x = 0; x < 3; x++) - for(int y = 0; y < 3; y++) - drawTexturedModalRect(guiLeft + 79 + 36 * x, guiTop + 17 + 36 * y, 176, 0, 18, 18); - - } else if(diFurnace.rods > 0) { - - for(int x = 0; x < 3; x++) - for(int y = 0; y < 3; y++) - drawTexturedModalRect(guiLeft + 79 + 36 * x, guiTop + 17 + 36 * y, 194, 0, 18, 18); + } else if(reactor.rods > 0) { + for(int x = 0; x < 3; x++) + for(int y = 0; y < 3; y++) + drawTexturedModalRect(guiLeft + 79 + 36 * x, guiTop + 17 + 36 * y, 194, 0, 18, 18); } - } - - switch(diFurnace.tanks[2].getTankType()) { - case STEAM: drawTexturedModalRect(guiLeft + 63, guiTop + 107, 176, 18, 14, 18); break; - case HOTSTEAM: drawTexturedModalRect(guiLeft + 63, guiTop + 107, 190, 18, 14, 18); break; - case SUPERHOTSTEAM: drawTexturedModalRect(guiLeft + 63, guiTop + 107, 204, 18, 14, 18); break; - } this.drawInfoPanel(guiLeft - 16, guiTop + 36, 16, 16, 2); this.drawInfoPanel(guiLeft - 16, guiTop + 36 + 16, 16, 16, 3); - - if(diFurnace.tanks[0].getFill() <= 0) - this.drawInfoPanel(guiLeft - 16, guiTop + 36 + 32, 16, 16, 6); - - if(diFurnace.tanks[1].getFill() <= 0) - this.drawInfoPanel(guiLeft - 16, guiTop + 36 + 32 + 16, 16, 16, 7); - - Minecraft.getMinecraft().getTextureManager().bindTexture(diFurnace.tanks[0].getSheet()); - diFurnace.tanks[0].renderTank(this, guiLeft + 8, guiTop + 88, diFurnace.tanks[0].getTankType().textureX() * FluidTank.x, diFurnace.tanks[0].getTankType().textureY() * FluidTank.y, 16, 52); - Minecraft.getMinecraft().getTextureManager().bindTexture(diFurnace.tanks[1].getSheet()); - diFurnace.tanks[1].renderTank(this, guiLeft + 26, guiTop + 88, diFurnace.tanks[1].getTankType().textureX() * FluidTank.x, diFurnace.tanks[1].getTankType().textureY() * FluidTank.y, 16, 52); } - - protected void keyTyped(char p_73869_1_, int p_73869_2_) - { - super.keyTyped(p_73869_1_, p_73869_2_); - - if (p_73869_2_ == 56) - { - this.toggleOverlay = !this.toggleOverlay; - } - - } } diff --git a/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java b/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java index d56a8b622..cf7c07330 100644 --- a/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java @@ -197,7 +197,7 @@ public class AssemblerRecipes { makeRecipe(new ComparableStack(ModItems.sat_head_radar, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 4), new OreDictStack(TI.plate(), 32), new ComparableStack(ModItems.magnetron, 12), new ComparableStack(ModItems.plate_polymer, 16), new ComparableStack(ModItems.wire_red_copper, 16), new ComparableStack(ModItems.coil_gold, 3), new ComparableStack(ModItems.circuit_gold, 5), new ComparableStack(Items.diamond, 1), },400); makeRecipe(new ComparableStack(ModItems.sat_head_laser, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 12), new OreDictStack(W.ingot(), 16), new OreDictStack(POLYMER.ingot(), 6), new ComparableStack(ModItems.plate_polymer, 16), new ComparableStack(ModItems.board_copper, 24), new ComparableStack(ModItems.circuit_targeting_tier5, 2), new OreDictStack(REDSTONE.dust(), 16), new ComparableStack(Items.diamond, 5), new ComparableStack(Blocks.glass_pane, 16), },450); makeRecipe(new ComparableStack(ModItems.sat_head_resonator, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 32), new OreDictStack(POLYMER.ingot(), 48), new ComparableStack(ModItems.plate_polymer, 8), new ComparableStack(ModItems.crystal_xen, 1), new OreDictStack(STAR.ingot(), 7), new ComparableStack(ModItems.circuit_targeting_tier5, 6), new ComparableStack(ModItems.circuit_targeting_tier6, 2), },1000); - makeRecipe(new ComparableStack(ModItems.sat_foeq, 1), new AStack[] {new OreDictStack(STEEL.plate(), 8), new OreDictStack(TI.plate(), 12), new ComparableStack(ModItems.plate_desh, 8), new ComparableStack(ModItems.hull_big_titanium, 3), new ComparableStack(ModItems.fluid_barrel_full, 1, FluidType.HYDROGEN.ordinal()), new ComparableStack(ModItems.photo_panel, 16), new ComparableStack(ModItems.thruster_nuclear, 1), new ComparableStack(ModItems.rod_quad_uranium_fuel, 2), new ComparableStack(ModItems.circuit_targeting_tier5, 6), new ComparableStack(ModItems.magnetron, 3), new ComparableStack(ModItems.battery_lithium_cell_6, 1), },1200); + makeRecipe(new ComparableStack(ModItems.sat_foeq, 1), new AStack[] {new OreDictStack(STEEL.plate(), 8), new OreDictStack(TI.plate(), 12), new ComparableStack(ModItems.plate_desh, 8), new ComparableStack(ModItems.hull_big_titanium, 3), new ComparableStack(ModItems.fluid_barrel_full, 1, FluidType.HYDROGEN.ordinal()), new ComparableStack(ModItems.photo_panel, 16), new ComparableStack(ModItems.thruster_nuclear, 1), new ComparableStack(ModItems.ingot_uranium_fuel, 6), new ComparableStack(ModItems.circuit_targeting_tier5, 6), new ComparableStack(ModItems.magnetron, 3), new ComparableStack(ModItems.battery_lithium_cell_6, 1), },1200); makeRecipe(new ComparableStack(ModItems.sat_miner, 1), new AStack[] {new OreDictStack(BIGMT.plate(), 24), new ComparableStack(ModItems.plate_desh, 8), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.drill_titanium, 2), new ComparableStack(ModItems.circuit_targeting_tier4, 2), new ComparableStack(ModItems.fluid_barrel_full, 1, FluidType.KEROSENE.ordinal()), new ComparableStack(ModItems.thruster_small, 1), new ComparableStack(ModItems.photo_panel, 12), new ComparableStack(ModItems.centrifuge_element, 4), new ComparableStack(ModItems.magnetron, 3), new ComparableStack(ModItems.plate_polymer, 12), new ComparableStack(ModItems.battery_lithium_cell_6, 1), },600); makeRecipe(new ComparableStack(ModItems.sat_lunar_miner, 1), new AStack[] {new ComparableStack(ModItems.ingot_meteorite, 24), new ComparableStack(ModItems.plate_desh, 4), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.drill_titanium, 2), new ComparableStack(ModItems.circuit_targeting_tier4, 2), new ComparableStack(ModItems.fluid_barrel_full, 1, FluidType.KEROSENE.ordinal()), new ComparableStack(ModItems.thruster_small, 1), new ComparableStack(ModItems.photo_panel, 12), new ComparableStack(ModItems.magnetron, 3), new ComparableStack(ModItems.plate_polymer, 12), new ComparableStack(ModItems.battery_lithium_cell_6, 1), },600); makeRecipe(new ComparableStack(ModItems.chopper_head, 1), new AStack[] {new ComparableStack(ModBlocks.reinforced_glass, 2), new ComparableStack(ModBlocks.fwatz_computer, 1), new OreDictStack(CMB.ingot(), 22), new ComparableStack(ModItems.wire_magnetized_tungsten, 4), },300); diff --git a/src/main/java/com/hbm/inventory/recipes/CentrifugeRecipes.java b/src/main/java/com/hbm/inventory/recipes/CentrifugeRecipes.java index eb720bd7c..520f7dd49 100644 --- a/src/main/java/com/hbm/inventory/recipes/CentrifugeRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/CentrifugeRecipes.java @@ -30,8 +30,8 @@ public class CentrifugeRecipes { new ItemStack(ModItems.nuclear_waste_tiny, 2) }); recipes.put(new ComparableStack(ModItems.waste_uranium), new ItemStack[] { - new ItemStack(ModItems.nugget_u238, 1), - new ItemStack(ModItems.nugget_pu_mix, 2), + new ItemStack(ModItems.nugget_pu_mix, 1), + new ItemStack(ModItems.nugget_plutonium, 1), new ItemStack(ModItems.nugget_technetium, 1), new ItemStack(ModItems.nuclear_waste_tiny, 2) }); diff --git a/src/main/java/com/hbm/inventory/recipes/anvil/AnvilRecipes.java b/src/main/java/com/hbm/inventory/recipes/anvil/AnvilRecipes.java index 966d62935..874a50d76 100644 --- a/src/main/java/com/hbm/inventory/recipes/anvil/AnvilRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/anvil/AnvilRecipes.java @@ -253,6 +253,11 @@ public class AnvilRecipes { pullFromAssembler(new ComparableStack(ModItems.plate_mixed, 4), 3); + constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.ingot_u233, 1), new AnvilOutput(new ItemStack(ModItems.plate_fuel_u233))).setTier(4)); + constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.ingot_u235, 1), new AnvilOutput(new ItemStack(ModItems.plate_fuel_u235))).setTier(4)); + constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.ingot_mox_fuel, 1), new AnvilOutput(new ItemStack(ModItems.plate_fuel_mox))).setTier(4)); + constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.ingot_pu239, 1), new AnvilOutput(new ItemStack(ModItems.plate_fuel_pu239))).setTier(4)); + constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.ingot_schrabidium, 1), new AnvilOutput(new ItemStack(ModItems.plate_fuel_sa326))).setTier(4)); } public static void registerConstructionAmmo() { diff --git a/src/main/java/com/hbm/items/ModItems.java b/src/main/java/com/hbm/items/ModItems.java index ea9dd5937..39e076147 100644 --- a/src/main/java/com/hbm/items/ModItems.java +++ b/src/main/java/com/hbm/items/ModItems.java @@ -12,6 +12,7 @@ import com.hbm.items.bomb.*; import com.hbm.items.food.*; import com.hbm.items.machine.*; import com.hbm.items.machine.ItemMachineUpgrade.UpgradeType; +import com.hbm.items.machine.ItemPlateFuel.FunctionEnum; import com.hbm.items.machine.ItemRBMKRod.EnumBurnFunc; import com.hbm.items.machine.ItemStamp.StampType; import com.hbm.items.special.*; @@ -1012,22 +1013,6 @@ public class ModItems { public static Item rod_quad_balefire; public static Item rod_quad_balefire_blazing; - public static Item rod_uranium_fuel; - public static Item rod_dual_uranium_fuel; - public static Item rod_quad_uranium_fuel; - public static Item rod_thorium_fuel; - public static Item rod_dual_thorium_fuel; - public static Item rod_quad_thorium_fuel; - public static Item rod_plutonium_fuel; - public static Item rod_dual_plutonium_fuel; - public static Item rod_quad_plutonium_fuel; - public static Item rod_mox_fuel; - public static Item rod_dual_mox_fuel; - public static Item rod_quad_mox_fuel; - public static Item rod_schrabidium_fuel; - public static Item rod_dual_schrabidium_fuel; - public static Item rod_quad_schrabidium_fuel; - public static Item rod_water; public static Item rod_dual_water; public static Item rod_quad_water; @@ -1066,20 +1051,24 @@ public class ModItems { public static Item waste_u233; public static Item waste_u235; public static Item waste_schrabidium; - public static Item waste_natural_uranium_hot; - public static Item waste_uranium_hot; - public static Item waste_thorium_hot; - public static Item waste_mox_hot; - public static Item waste_plutonium_hot; - public static Item waste_u233_hot; - public static Item waste_u235_hot; - public static Item waste_schrabidium_hot; - + + public static Item waste_plate_u233; + public static Item waste_plate_u235; + public static Item waste_plate_mox; + public static Item waste_plate_pu239; + public static Item waste_plate_sa326; + public static Item pile_rod_uranium; public static Item pile_rod_plutonium; public static Item pile_rod_source; public static Item pile_rod_boron; + public static Item plate_fuel_u233; + public static Item plate_fuel_u235; + public static Item plate_fuel_mox; + public static Item plate_fuel_pu239; + public static Item plate_fuel_sa326; + public static Item rbmk_lid; public static Item rbmk_lid_glass; public static Item rbmk_fuel_empty; @@ -1160,21 +1149,6 @@ public class ModItems { public static Item nuclear_waste_tiny; public static Item nuclear_waste_vitrified; public static Item nuclear_waste_vitrified_tiny; - public static Item rod_uranium_fuel_depleted; - public static Item rod_dual_uranium_fuel_depleted; - public static Item rod_quad_uranium_fuel_depleted; - public static Item rod_thorium_fuel_depleted; - public static Item rod_dual_thorium_fuel_depleted; - public static Item rod_quad_thorium_fuel_depleted; - public static Item rod_plutonium_fuel_depleted; - public static Item rod_dual_plutonium_fuel_depleted; - public static Item rod_quad_plutonium_fuel_depleted; - public static Item rod_mox_fuel_depleted; - public static Item rod_dual_mox_fuel_depleted; - public static Item rod_quad_mox_fuel_depleted; - public static Item rod_schrabidium_fuel_depleted; - public static Item rod_dual_schrabidium_fuel_depleted; - public static Item rod_quad_schrabidium_fuel_depleted; public static Item rod_waste; public static Item rod_dual_waste; public static Item rod_quad_waste; @@ -3553,23 +3527,7 @@ public class ModItems { rod_quad_solinium = new ItemHazard(ItemHazard.sa327 * ItemHazard.rod_quad, false, true).setUnlocalizedName("rod_quad_solinium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_solinium"); rod_quad_balefire = new ItemHazard(600000F).setUnlocalizedName("rod_quad_balefire").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_balefire"); rod_quad_balefire_blazing = new ItemHazard(1000000F, true).setUnlocalizedName("rod_quad_balefire_blazing").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_balefire_blazing"); - - rod_thorium_fuel = new ItemFuelRod(100000, 10).setUnlocalizedName("rod_thorium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_thorium_fuel"); - rod_dual_thorium_fuel = new ItemFuelRod(100000, 20).setUnlocalizedName("rod_dual_thorium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_thorium_fuel"); - rod_quad_thorium_fuel = new ItemFuelRod(100000, 40).setUnlocalizedName("rod_quad_thorium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_thorium_fuel"); - rod_uranium_fuel = new ItemFuelRod(100000, 15).setUnlocalizedName("rod_uranium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_uranium_fuel"); - rod_dual_uranium_fuel = new ItemFuelRod(100000, 30).setUnlocalizedName("rod_dual_uranium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_uranium_fuel"); - rod_quad_uranium_fuel = new ItemFuelRod( 100000, 60).setUnlocalizedName("rod_quad_uranium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_uranium_fuel"); - rod_plutonium_fuel = new ItemFuelRod(75000, 25).setUnlocalizedName("rod_plutonium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_plutonium_fuel"); - rod_dual_plutonium_fuel = new ItemFuelRod(75000, 50).setUnlocalizedName("rod_dual_plutonium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_plutonium_fuel"); - rod_quad_plutonium_fuel = new ItemFuelRod(75000, 100).setUnlocalizedName("rod_quad_plutonium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_plutonium_fuel"); - rod_mox_fuel = new ItemFuelRod(150000, 10).setUnlocalizedName("rod_mox_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_mox_fuel"); - rod_dual_mox_fuel = new ItemFuelRod(150000, 20).setUnlocalizedName("rod_dual_mox_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_mox_fuel"); - rod_quad_mox_fuel = new ItemFuelRod(150000, 40).setUnlocalizedName("rod_quad_mox_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_mox_fuel"); - rod_schrabidium_fuel = new ItemFuelRod(500000, 250).setUnlocalizedName("rod_schrabidium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_schrabidium_fuel"); - rod_dual_schrabidium_fuel = new ItemFuelRod(500000, 500).setUnlocalizedName("rod_dual_schrabidium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_schrabidium_fuel"); - rod_quad_schrabidium_fuel = new ItemFuelRod(500000, 1000).setUnlocalizedName("rod_quad_schrabidium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_schrabidium_fuel"); - + rod_zirnox_empty = new Item().setUnlocalizedName("rod_zirnox_empty").setMaxStackSize(64).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rod_zirnox_empty"); rod_zirnox_natural_uranium_fuel = new ItemZirnoxRod(120000, 35).setUnlocalizedName("rod_zirnox_natural_uranium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_zirnox_empty).setTextureName(RefStrings.MODID + ":rod_zirnox_natural_uranium_fuel"); rod_zirnox_uranium_fuel = new ItemZirnoxRod(100000, 50).setUnlocalizedName("rod_zirnox_uranium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_zirnox_empty).setTextureName(RefStrings.MODID + ":rod_zirnox_uranium_fuel"); @@ -3592,23 +3550,21 @@ public class ModItems { rod_zirnox_u235_fuel_depleted = new Item().setUnlocalizedName("rod_zirnox_u235_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_zirnox_empty).setTextureName(RefStrings.MODID + ":rod_zirnox_u235_fuel_depleted"); rod_zirnox_les_fuel_depleted = new Item().setUnlocalizedName("rod_zirnox_les_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_zirnox_empty).setTextureName(RefStrings.MODID + ":rod_zirnox_les_fuel_depleted"); - waste_natural_uranium = new ItemNuclearWaste().setUnlocalizedName("waste_natural_uranium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_uranium"); - waste_uranium = new ItemNuclearWaste().setUnlocalizedName("waste_uranium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_uranium"); - waste_thorium = new ItemNuclearWaste().setUnlocalizedName("waste_thorium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_thorium"); - waste_mox = new ItemNuclearWaste().setUnlocalizedName("waste_mox").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_mox"); - waste_plutonium = new ItemNuclearWaste().setUnlocalizedName("waste_plutonium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_plutonium"); - waste_u233 = new ItemNuclearWaste().setUnlocalizedName("waste_u233").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_uranium"); - waste_u235 = new ItemNuclearWaste().setUnlocalizedName("waste_u235").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_uranium"); - waste_schrabidium = new ItemNuclearWaste().setUnlocalizedName("waste_schrabidium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_schrabidium"); - waste_natural_uranium_hot = new ItemNuclearWaste().setUnlocalizedName("waste_natural_uranium_hot").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_uranium_hot"); - waste_uranium_hot = new ItemNuclearWaste().setUnlocalizedName("waste_uranium_hot").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_uranium_hot"); - waste_thorium_hot = new ItemNuclearWaste().setUnlocalizedName("waste_thorium_hot").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_thorium_hot"); - waste_mox_hot = new ItemNuclearWaste().setUnlocalizedName("waste_mox_hot").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_mox_hot"); - waste_plutonium_hot = new ItemNuclearWaste().setUnlocalizedName("waste_plutonium_hot").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_plutonium_hot"); - waste_u233_hot = new ItemNuclearWaste().setUnlocalizedName("waste_u233_hot").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_uranium_hot"); - waste_u235_hot = new ItemNuclearWaste().setUnlocalizedName("waste_u235_hot").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_uranium_hot"); - waste_schrabidium_hot = new ItemNuclearWaste().setUnlocalizedName("waste_schrabidium_hot").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_schrabidium_hot"); - + waste_natural_uranium = new ItemDepletedFuel().setUnlocalizedName("waste_natural_uranium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_uranium"); + waste_uranium = new ItemDepletedFuel().setUnlocalizedName("waste_uranium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_uranium"); + waste_thorium = new ItemDepletedFuel().setUnlocalizedName("waste_thorium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_thorium"); + waste_mox = new ItemDepletedFuel().setUnlocalizedName("waste_mox").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_mox"); + waste_plutonium = new ItemDepletedFuel().setUnlocalizedName("waste_plutonium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_plutonium"); + waste_u233 = new ItemDepletedFuel().setUnlocalizedName("waste_u233").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_uranium"); + waste_u235 = new ItemDepletedFuel().setUnlocalizedName("waste_u235").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_uranium"); + waste_schrabidium = new ItemDepletedFuel().setUnlocalizedName("waste_schrabidium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_schrabidium"); + + waste_plate_u233 = new ItemDepletedFuel().setUnlocalizedName("waste_plate_u233").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_plate_uranium"); + waste_plate_u235 = new ItemDepletedFuel().setUnlocalizedName("waste_plate_u235").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_plate_uranium"); + waste_plate_mox = new ItemDepletedFuel().setUnlocalizedName("waste_plate_mox").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_plate_mox"); + waste_plate_pu239 = new ItemDepletedFuel().setUnlocalizedName("waste_plate_pu239").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_plate_mox"); + waste_plate_sa326 = new ItemDepletedFuel().setUnlocalizedName("waste_plate_sa326").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_plate_sa326"); + rod_water = new ItemCustomLore().setUnlocalizedName("rod_water").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_water"); rod_dual_water = new ItemCustomLore().setUnlocalizedName("rod_dual_water").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_water"); rod_quad_water = new ItemCustomLore().setUnlocalizedName("rod_quad_water").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_water"); @@ -3630,6 +3586,12 @@ public class ModItems { pile_rod_source = new ItemPileRod().setUnlocalizedName("pile_rod_source").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pile_rod_source"); pile_rod_boron = new ItemPileRod().setUnlocalizedName("pile_rod_boron").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pile_rod_boron"); + plate_fuel_u233 = new ItemPlateFuel(1100000).setFunction(FunctionEnum.SQUARE_ROOT, 50).setUnlocalizedName("plate_fuel_u233").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":plate_fuel_u233"); + plate_fuel_u235 = new ItemPlateFuel(1100000).setFunction(FunctionEnum.SQUARE_ROOT, 40).setUnlocalizedName("plate_fuel_u235").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":plate_fuel_u235"); + plate_fuel_mox = new ItemPlateFuel(1400000).setFunction(FunctionEnum.LOGARITHM, 50).setUnlocalizedName("plate_fuel_mox").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":plate_fuel_mox"); + plate_fuel_pu239 = new ItemPlateFuel(1000000).setFunction(FunctionEnum.NEGATIVE_QUADRATIC, 25).setUnlocalizedName("plate_fuel_pu239").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":plate_fuel_pu239"); + plate_fuel_sa326 = new ItemPlateFuel(1000000).setFunction(FunctionEnum.LINEAR, 40).setUnlocalizedName("plate_fuel_sa326").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":plate_fuel_sa326"); + rbmk_lid = new ItemRBMKLid().setUnlocalizedName("rbmk_lid").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rbmk_lid"); rbmk_lid_glass = new ItemRBMKLid().setUnlocalizedName("rbmk_lid_glass").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rbmk_lid_glass"); @@ -3888,21 +3850,6 @@ public class ModItems { scrap = new Item().setUnlocalizedName("scrap").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":scrap"); scrap_nuclear = new Item().setUnlocalizedName("scrap_nuclear").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":scrap_nuclear"); containment_box = new ItemLeadBox().setUnlocalizedName("containment_box").setCreativeTab(null).setTextureName(RefStrings.MODID + ":containment_box"); - rod_thorium_fuel_depleted = new ItemHazard(10F, true).setUnlocalizedName("rod_thorium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_thorium_fuel_depleted"); - rod_dual_thorium_fuel_depleted = new ItemHazard(20F, true).setUnlocalizedName("rod_dual_thorium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_thorium_fuel_depleted"); - rod_quad_thorium_fuel_depleted = new ItemHazard(40F, true).setUnlocalizedName("rod_quad_thorium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_thorium_fuel_depleted"); - rod_uranium_fuel_depleted = new ItemHazard(15F, true).setUnlocalizedName("rod_uranium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_uranium_fuel_depleted"); - rod_dual_uranium_fuel_depleted = new ItemHazard(30F, true).setUnlocalizedName("rod_dual_uranium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_uranium_fuel_depleted"); - rod_quad_uranium_fuel_depleted = new ItemHazard(60F, true).setUnlocalizedName("rod_quad_uranium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_uranium_fuel_depleted"); - rod_plutonium_fuel_depleted = new ItemHazard(15F, true).setUnlocalizedName("rod_plutonium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_plutonium_fuel_depleted"); - rod_dual_plutonium_fuel_depleted = new ItemHazard(30F, true).setUnlocalizedName("rod_dual_plutonium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_plutonium_fuel_depleted"); - rod_quad_plutonium_fuel_depleted = new ItemHazard(60F, true).setUnlocalizedName("rod_quad_plutonium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_plutonium_fuel_depleted"); - rod_mox_fuel_depleted = new ItemHazard(15F, true).setUnlocalizedName("rod_mox_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_mox_fuel_depleted"); - rod_dual_mox_fuel_depleted = new ItemHazard(30F, true).setUnlocalizedName("rod_dual_mox_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_mox_fuel_depleted"); - rod_quad_mox_fuel_depleted = new ItemHazard(60F, true).setUnlocalizedName("rod_quad_mox_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_mox_fuel_depleted"); - rod_schrabidium_fuel_depleted = new ItemHazard(40F, true).setUnlocalizedName("rod_schrabidium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_schrabidium_fuel_depleted"); - rod_dual_schrabidium_fuel_depleted = new ItemHazard(80F, true).setUnlocalizedName("rod_dual_schrabidium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_schrabidium_fuel_depleted"); - rod_quad_schrabidium_fuel_depleted = new ItemHazard(160F, true).setUnlocalizedName("rod_quad_schrabidium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_schrabidium_fuel_depleted"); rod_waste = new ItemHazard(15F).setUnlocalizedName("rod_waste").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_waste"); rod_dual_waste = new ItemHazard(30F).setUnlocalizedName("rod_dual_waste").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_waste"); rod_quad_waste = new ItemHazard(60F).setUnlocalizedName("rod_quad_waste").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_waste"); @@ -6647,26 +6594,6 @@ public class ModItems { GameRegistry.registerItem(rod_dual_solinium, rod_dual_solinium.getUnlocalizedName()); GameRegistry.registerItem(rod_quad_solinium, rod_quad_solinium.getUnlocalizedName()); - GameRegistry.registerItem(rod_uranium_fuel, rod_uranium_fuel.getUnlocalizedName()); - GameRegistry.registerItem(rod_dual_uranium_fuel, rod_dual_uranium_fuel.getUnlocalizedName()); - GameRegistry.registerItem(rod_quad_uranium_fuel, rod_quad_uranium_fuel.getUnlocalizedName()); - - GameRegistry.registerItem(rod_thorium_fuel, rod_thorium_fuel.getUnlocalizedName()); - GameRegistry.registerItem(rod_dual_thorium_fuel, rod_dual_thorium_fuel.getUnlocalizedName()); - GameRegistry.registerItem(rod_quad_thorium_fuel, rod_quad_thorium_fuel.getUnlocalizedName()); - - GameRegistry.registerItem(rod_plutonium_fuel, rod_plutonium_fuel.getUnlocalizedName()); - GameRegistry.registerItem(rod_dual_plutonium_fuel, rod_dual_plutonium_fuel.getUnlocalizedName()); - GameRegistry.registerItem(rod_quad_plutonium_fuel, rod_quad_plutonium_fuel.getUnlocalizedName()); - - GameRegistry.registerItem(rod_mox_fuel, rod_mox_fuel.getUnlocalizedName()); - GameRegistry.registerItem(rod_dual_mox_fuel, rod_dual_mox_fuel.getUnlocalizedName()); - GameRegistry.registerItem(rod_quad_mox_fuel, rod_quad_mox_fuel.getUnlocalizedName()); - - GameRegistry.registerItem(rod_schrabidium_fuel, rod_schrabidium_fuel.getUnlocalizedName()); - GameRegistry.registerItem(rod_dual_schrabidium_fuel, rod_dual_schrabidium_fuel.getUnlocalizedName()); - GameRegistry.registerItem(rod_quad_schrabidium_fuel, rod_quad_schrabidium_fuel.getUnlocalizedName()); - GameRegistry.registerItem(rod_water, rod_water.getUnlocalizedName()); GameRegistry.registerItem(rod_dual_water, rod_dual_water.getUnlocalizedName()); GameRegistry.registerItem(rod_quad_water, rod_quad_water.getUnlocalizedName()); @@ -6700,26 +6627,6 @@ public class ModItems { GameRegistry.registerItem(rod_verticium, rod_verticium.getUnlocalizedName()); //Nuclear Waste - GameRegistry.registerItem(rod_uranium_fuel_depleted, rod_uranium_fuel_depleted.getUnlocalizedName()); - GameRegistry.registerItem(rod_dual_uranium_fuel_depleted, rod_dual_uranium_fuel_depleted.getUnlocalizedName()); - GameRegistry.registerItem(rod_quad_uranium_fuel_depleted, rod_quad_uranium_fuel_depleted.getUnlocalizedName()); - - GameRegistry.registerItem(rod_thorium_fuel_depleted, rod_thorium_fuel_depleted.getUnlocalizedName()); - GameRegistry.registerItem(rod_dual_thorium_fuel_depleted, rod_dual_thorium_fuel_depleted.getUnlocalizedName()); - GameRegistry.registerItem(rod_quad_thorium_fuel_depleted, rod_quad_thorium_fuel_depleted.getUnlocalizedName()); - - GameRegistry.registerItem(rod_plutonium_fuel_depleted, rod_plutonium_fuel_depleted.getUnlocalizedName()); - GameRegistry.registerItem(rod_dual_plutonium_fuel_depleted, rod_dual_plutonium_fuel_depleted.getUnlocalizedName()); - GameRegistry.registerItem(rod_quad_plutonium_fuel_depleted, rod_quad_plutonium_fuel_depleted.getUnlocalizedName()); - - GameRegistry.registerItem(rod_mox_fuel_depleted, rod_mox_fuel_depleted.getUnlocalizedName()); - GameRegistry.registerItem(rod_dual_mox_fuel_depleted, rod_dual_mox_fuel_depleted.getUnlocalizedName()); - GameRegistry.registerItem(rod_quad_mox_fuel_depleted, rod_quad_mox_fuel_depleted.getUnlocalizedName()); - - GameRegistry.registerItem(rod_schrabidium_fuel_depleted, rod_schrabidium_fuel_depleted.getUnlocalizedName()); - GameRegistry.registerItem(rod_dual_schrabidium_fuel_depleted, rod_dual_schrabidium_fuel_depleted.getUnlocalizedName()); - GameRegistry.registerItem(rod_quad_schrabidium_fuel_depleted, rod_quad_schrabidium_fuel_depleted.getUnlocalizedName()); - GameRegistry.registerItem(rod_quad_euphemium, rod_quad_euphemium.getUnlocalizedName()); GameRegistry.registerItem(rod_waste, rod_waste.getUnlocalizedName()); @@ -6748,15 +6655,8 @@ public class ModItems { GameRegistry.registerItem(rod_zirnox_u233_fuel_depleted, rod_zirnox_u233_fuel_depleted.getUnlocalizedName()); GameRegistry.registerItem(rod_zirnox_u235_fuel_depleted, rod_zirnox_u235_fuel_depleted.getUnlocalizedName()); GameRegistry.registerItem(rod_zirnox_les_fuel_depleted, rod_zirnox_les_fuel_depleted.getUnlocalizedName()); - - GameRegistry.registerItem(waste_natural_uranium_hot, waste_natural_uranium_hot.getUnlocalizedName()); - GameRegistry.registerItem(waste_uranium_hot, waste_uranium_hot.getUnlocalizedName()); - GameRegistry.registerItem(waste_thorium_hot, waste_thorium_hot.getUnlocalizedName()); - GameRegistry.registerItem(waste_mox_hot, waste_mox_hot.getUnlocalizedName()); - GameRegistry.registerItem(waste_plutonium_hot, waste_plutonium_hot.getUnlocalizedName()); - GameRegistry.registerItem(waste_u233_hot, waste_u233_hot.getUnlocalizedName()); - GameRegistry.registerItem(waste_u235_hot, waste_u235_hot.getUnlocalizedName()); - GameRegistry.registerItem(waste_schrabidium_hot, waste_schrabidium_hot.getUnlocalizedName()); + + //Depleted Fuel GameRegistry.registerItem(waste_natural_uranium, waste_natural_uranium.getUnlocalizedName()); GameRegistry.registerItem(waste_uranium, waste_uranium.getUnlocalizedName()); GameRegistry.registerItem(waste_thorium, waste_thorium.getUnlocalizedName()); @@ -6765,13 +6665,26 @@ public class ModItems { GameRegistry.registerItem(waste_u233, waste_u233.getUnlocalizedName()); GameRegistry.registerItem(waste_u235, waste_u235.getUnlocalizedName()); GameRegistry.registerItem(waste_schrabidium, waste_schrabidium.getUnlocalizedName()); - + + GameRegistry.registerItem(waste_plate_u233, waste_plate_u233.getUnlocalizedName()); + GameRegistry.registerItem(waste_plate_u235, waste_plate_u235.getUnlocalizedName()); + GameRegistry.registerItem(waste_plate_mox, waste_plate_mox.getUnlocalizedName()); + GameRegistry.registerItem(waste_plate_pu239, waste_plate_pu239.getUnlocalizedName()); + GameRegistry.registerItem(waste_plate_sa326, waste_plate_sa326.getUnlocalizedName()); + //Pile parts GameRegistry.registerItem(pile_rod_uranium, pile_rod_uranium.getUnlocalizedName()); GameRegistry.registerItem(pile_rod_plutonium, pile_rod_plutonium.getUnlocalizedName()); GameRegistry.registerItem(pile_rod_source, pile_rod_source.getUnlocalizedName()); GameRegistry.registerItem(pile_rod_boron, pile_rod_boron.getUnlocalizedName()); + //Plate Fuels + GameRegistry.registerItem(plate_fuel_u233, plate_fuel_u233.getUnlocalizedName()); + GameRegistry.registerItem(plate_fuel_u235, plate_fuel_u235.getUnlocalizedName()); + GameRegistry.registerItem(plate_fuel_mox, plate_fuel_mox.getUnlocalizedName()); + GameRegistry.registerItem(plate_fuel_pu239, plate_fuel_pu239.getUnlocalizedName()); + GameRegistry.registerItem(plate_fuel_sa326, plate_fuel_sa326.getUnlocalizedName()); + //RBMK parts GameRegistry.registerItem(rbmk_lid, rbmk_lid.getUnlocalizedName()); GameRegistry.registerItem(rbmk_lid_glass, rbmk_lid_glass.getUnlocalizedName()); diff --git a/src/main/java/com/hbm/items/machine/ItemDepletedFuel.java b/src/main/java/com/hbm/items/machine/ItemDepletedFuel.java new file mode 100644 index 000000000..11ead81e9 --- /dev/null +++ b/src/main/java/com/hbm/items/machine/ItemDepletedFuel.java @@ -0,0 +1,46 @@ +package com.hbm.items.machine; + +import java.util.List; + +import com.hbm.items.special.ItemNuclearWaste; +import com.hbm.lib.Library; +import com.hbm.main.MainRegistry; +import com.hbm.util.I18nUtil; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IIcon; + +public class ItemDepletedFuel extends ItemNuclearWaste { + + public ItemDepletedFuel() { + this.setHasSubtypes(true); + this.setMaxDamage(0); + } + + @Override + @SideOnly(Side.CLIENT) + public void getSubItems(Item item, CreativeTabs tabs, List list) { + for(int i = 0; i < 2; i++) { + list.add(new ItemStack(item, 1, i)); + } + } + + @Override + @SideOnly(Side.CLIENT) + public int getColorFromItemStack(ItemStack p_82790_1_, int p_82790_2_) + { + return p_82790_1_.getItemDamage() > 0 ? 0xFFBFA5 : 16777215; + } + + @Override + public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) { + if (itemstack.getItemDamage() > 0) + list.add(EnumChatFormatting.GOLD + I18nUtil.resolveKey("desc.item.wasteCooling")); + } +} diff --git a/src/main/java/com/hbm/items/machine/ItemFuelRod.java b/src/main/java/com/hbm/items/machine/ItemFuelRod.java index 8cae46ca2..3fa3cd46e 100644 --- a/src/main/java/com/hbm/items/machine/ItemFuelRod.java +++ b/src/main/java/com/hbm/items/machine/ItemFuelRod.java @@ -13,24 +13,12 @@ import net.minecraft.util.EnumChatFormatting; public class ItemFuelRod extends Item { public int lifeTime; - public int heat; - public ItemFuelRod(int life, int heat) { + public ItemFuelRod(int life) { this.lifeTime = life; - this.heat = heat; this.canRepair = false; } - @Override - public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) { - - list.add(EnumChatFormatting.YELLOW + "[Reactor Fuel Rod]"); - list.add(EnumChatFormatting.DARK_AQUA + " Generates " + heat + " heat per tick"); - list.add(EnumChatFormatting.DARK_AQUA + " Lasts " + Library.getShortNumber(lifeTime) + " ticks"); - - super.addInformation(itemstack, player, list, bool); - } - public static void setLifeTime(ItemStack stack, int time) { if(!stack.hasTagCompound()) diff --git a/src/main/java/com/hbm/items/machine/ItemPlateFuel.java b/src/main/java/com/hbm/items/machine/ItemPlateFuel.java new file mode 100644 index 000000000..65d70519e --- /dev/null +++ b/src/main/java/com/hbm/items/machine/ItemPlateFuel.java @@ -0,0 +1,70 @@ +package com.hbm.items.machine; + +import java.util.List; + +import com.hbm.lib.Library; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.world.World; + +public class ItemPlateFuel extends ItemFuelRod { + + public int reactivity; + public FunctionEnum function; + + public ItemPlateFuel(int life) { + super(life); + this.canRepair = false; + } + + public ItemPlateFuel setFunction(FunctionEnum function, int reactivity) { + this.function = function; + this.reactivity = reactivity; + return this; + } + + @Override + public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) { + + list.add(EnumChatFormatting.YELLOW + "[Reactor Plate Fuel]"); + list.add(EnumChatFormatting.DARK_AQUA + " " + getFunctionDesc()); + list.add(EnumChatFormatting.DARK_AQUA + " Yield of " + Library.getShortNumber(lifeTime) + " events"); + + super.addInformation(itemstack, player, list, bool); + } + + public static enum FunctionEnum { + LOGARITHM(), + SQUARE_ROOT(), + NEGATIVE_QUADRATIC(), + LINEAR(); + + private FunctionEnum() { } + } + + public String getFunctionDesc() { + switch(this.function) { + case LOGARITHM: return "log10(x + 1) * 0.5 * " + reactivity; + case SQUARE_ROOT: return "sqrt(x) * " + reactivity + " / 10"; + case NEGATIVE_QUADRATIC: return "[x - (x² / 10000)] / 100 * " + reactivity; + case LINEAR: return "x / 100 * " + reactivity; + default: return "x"; + } + } + + public int react(World world, ItemStack stack, int flux) { + setLifeTime(stack, getLifeTime(stack) + flux); + + switch(this.function) { + case LOGARITHM: return (int) (Math.log10(flux + 1) * 0.5D * reactivity); + case SQUARE_ROOT: return (int) (Math.sqrt(flux) * this.reactivity / 10); + case NEGATIVE_QUADRATIC: return (int) (Math.max(flux - (flux * flux / 10000) / 100 * reactivity, 0)); + case LINEAR: return (int) (flux / 100 * reactivity); + default: return 0; + } + } +} diff --git a/src/main/java/com/hbm/items/machine/ItemRBMKRod.java b/src/main/java/com/hbm/items/machine/ItemRBMKRod.java index bb8cabb35..aa7527bd6 100644 --- a/src/main/java/com/hbm/items/machine/ItemRBMKRod.java +++ b/src/main/java/com/hbm/items/machine/ItemRBMKRod.java @@ -221,7 +221,7 @@ public class ItemRBMKRod extends Item { } /** - * @param flux [0;100] ...or at least those are sane levels + * @param reactivity [0;100] ...or at least those are sane levels * @return the amount of reactivity yielded, unmodified by xenon */ public double reactivityFunc(double in, double enrichment) { diff --git a/src/main/java/com/hbm/items/machine/ItemZirnoxRod.java b/src/main/java/com/hbm/items/machine/ItemZirnoxRod.java index d125833ed..263fc015c 100644 --- a/src/main/java/com/hbm/items/machine/ItemZirnoxRod.java +++ b/src/main/java/com/hbm/items/machine/ItemZirnoxRod.java @@ -9,9 +9,12 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; public class ItemZirnoxRod extends ItemFuelRod { - + + public int heat; + public ItemZirnoxRod(int life, int heat) { - super(life, heat); + super(life); + this.heat = heat; } @Override diff --git a/src/main/java/com/hbm/lib/HbmChestContents.java b/src/main/java/com/hbm/lib/HbmChestContents.java index 395071e9e..2fbfa68ba 100644 --- a/src/main/java/com/hbm/lib/HbmChestContents.java +++ b/src/main/java/com/hbm/lib/HbmChestContents.java @@ -135,15 +135,15 @@ public class HbmChestContents { new WeightedRandomChestContent(ModItems.rod_dual_pu239, 0, 1, 1, 3), new WeightedRandomChestContent(ModItems.rod_quad_u235, 0, 1, 1, 3), new WeightedRandomChestContent(ModItems.rod_quad_pu239, 0, 1, 1, 3), - new WeightedRandomChestContent(ModItems.rod_uranium_fuel, 0, 1, 1, 4), - new WeightedRandomChestContent(ModItems.rod_plutonium_fuel, 0, 1, 1, 4), - new WeightedRandomChestContent(ModItems.rod_mox_fuel, 0, 1, 1, 4), - new WeightedRandomChestContent(ModItems.rod_dual_uranium_fuel, 0, 1, 1, 3), - new WeightedRandomChestContent(ModItems.rod_dual_plutonium_fuel, 0, 1, 1, 3), - new WeightedRandomChestContent(ModItems.rod_dual_mox_fuel, 0, 1, 1, 3), - new WeightedRandomChestContent(ModItems.rod_quad_uranium_fuel, 0, 1, 1, 1), - new WeightedRandomChestContent(ModItems.rod_quad_plutonium_fuel, 0, 1, 1, 1), - new WeightedRandomChestContent(ModItems.rod_quad_mox_fuel, 0, 1, 1, 1), + new WeightedRandomChestContent(ModItems.rod_zirnox_uranium_fuel, 0, 1, 1, 4), + new WeightedRandomChestContent(ModItems.rod_zirnox_plutonium_fuel, 0, 1, 1, 4), + new WeightedRandomChestContent(ModItems.rod_zirnox_mox_fuel, 0, 1, 1, 4), + new WeightedRandomChestContent(ModItems.rod_zirnox_lithium, 0, 1, 1, 3), + new WeightedRandomChestContent(ModItems.rod_zirnox_th232, 0, 1, 1, 3), + new WeightedRandomChestContent(ModItems.rod_zirnox_thorium_fuel, 0, 1, 1, 3), + new WeightedRandomChestContent(ModItems.rod_zirnox_tritium, 0, 1, 1, 1), + new WeightedRandomChestContent(ModItems.rod_zirnox_u233_fuel, 0, 1, 1, 1), + new WeightedRandomChestContent(ModItems.rod_zirnox_u235_fuel, 0, 1, 1, 1), new WeightedRandomChestContent(ModItems.pellet_rtg, 0, 1, 1, 3), new WeightedRandomChestContent(ModItems.powder_thorium, 0, 1, 1, 1), new WeightedRandomChestContent(ModItems.powder_neptunium, 0, 1, 1, 1), @@ -167,9 +167,9 @@ public class HbmChestContents { new WeightedRandomChestContent(ModItems.gun_kit_1, 0, 2, 3, 4), new WeightedRandomChestContent(ModItems.gun_rpg, 0, 1, 1, 3), new WeightedRandomChestContent(ModItems.ammo_rocket, 0, 1, 6, 3), - new WeightedRandomChestContent(ModItems.rod_uranium_fuel, 0, 1, 1, 2), - new WeightedRandomChestContent(ModItems.rod_dual_uranium_fuel, 0, 1, 1, 2), - new WeightedRandomChestContent(ModItems.rod_quad_uranium_fuel, 0, 1, 1, 2), + new WeightedRandomChestContent(ModItems.nugget_uranium_fuel, 0, 1, 1, 2), + new WeightedRandomChestContent(ModItems.billet_uranium_fuel, 0, 1, 1, 2), + new WeightedRandomChestContent(ModItems.ingot_uranium_fuel, 0, 1, 1, 2), new WeightedRandomChestContent(ModItems.ammo_nuke_safe, 0, 1, 2, 1), new WeightedRandomChestContent(ModItems.gun_fatman, 0, 1, 1, 1), new WeightedRandomChestContent(ModItems.bottle_nuka, 0, 1, 3, 6), diff --git a/src/main/java/com/hbm/packet/AuxButtonPacket.java b/src/main/java/com/hbm/packet/AuxButtonPacket.java index 6d4605267..865f59afc 100644 --- a/src/main/java/com/hbm/packet/AuxButtonPacket.java +++ b/src/main/java/com/hbm/packet/AuxButtonPacket.java @@ -86,23 +86,6 @@ public class AuxButtonPacket implements IMessage { if(m.id == 0) reactor.retracting = m.value == 1; - - if(m.id == 1) { - FluidType type = FluidType.STEAM; - int fill = reactor.tanks[2].getFill(); - - switch(m.value) { - case 0: type = FluidType.HOTSTEAM; fill = (int)Math.floor(fill / 10D); break; - case 1: type = FluidType.SUPERHOTSTEAM; fill = (int)Math.floor(fill / 10D); break; - case 2: type = FluidType.STEAM; fill = (int)Math.floor(fill * 100); break; - } - - if(fill > reactor.tanks[2].getMaxFill()) - fill = reactor.tanks[2].getMaxFill(); - - reactor.tanks[2].setTankType(type); - reactor.tanks[2].setFill(fill); - } } if (te instanceof TileEntityRadioRec) { @@ -123,7 +106,7 @@ public class AuxButtonPacket implements IMessage { field.isOn = !field.isOn; } - if (te instanceof TileEntityReactorControl) { + /*if (te instanceof TileEntityReactorControl) { TileEntityReactorControl control = (TileEntityReactorControl)te; if(m.id == 1) @@ -181,7 +164,7 @@ public class AuxButtonPacket implements IMessage { } } } - } + }*/ if (te instanceof TileEntityMachineReactorLarge) { TileEntityMachineReactorLarge reactor = (TileEntityMachineReactorLarge)te; diff --git a/src/main/java/com/hbm/packet/AuxGaugePacket.java b/src/main/java/com/hbm/packet/AuxGaugePacket.java index 78f2a3a88..c8c2bfb79 100644 --- a/src/main/java/com/hbm/packet/AuxGaugePacket.java +++ b/src/main/java/com/hbm/packet/AuxGaugePacket.java @@ -135,18 +135,6 @@ public class AuxGaugePacket implements IMessage { selenium.powerCap = m.value; } - if (te instanceof TileEntityMachineReactorSmall) { - TileEntityMachineReactorSmall reactor = (TileEntityMachineReactorSmall)te; - - if(m.id == 0) - reactor.rods = m.value; - if(m.id == 1) - reactor.retracting = m.value == 1; - if(m.id == 2) - reactor.coreHeat = m.value; - if(m.id == 3) - reactor.hullHeat = m.value; - } if (te instanceof TileEntityBomber) { TileEntityBomber bomber = (TileEntityBomber)te; diff --git a/src/main/java/com/hbm/render/tileentity/RenderSmallReactor.java b/src/main/java/com/hbm/render/tileentity/RenderSmallReactor.java index e2deecf55..55e9e6709 100644 --- a/src/main/java/com/hbm/render/tileentity/RenderSmallReactor.java +++ b/src/main/java/com/hbm/render/tileentity/RenderSmallReactor.java @@ -25,14 +25,14 @@ public class RenderSmallReactor extends TileEntitySpecialRenderer { ResourceManager.reactor_small_base.renderAll(); GL11.glPushMatrix(); - GL11.glTranslated(0.0D, reactor.rods / 100D, 0.0D); + GL11.glTranslated(0.0D, (double) reactor.rods / reactor.rodsMax, 0.0D); bindTexture(ResourceManager.reactor_small_rods_tex); ResourceManager.reactor_small_rods.renderAll(); GL11.glPopMatrix(); - if(reactor.coreHeat > 0 && reactor.isSubmerged()) { + if(reactor.hasHeat() && reactor.isSubmerged()) { GL11.glDisable(GL11.GL_TEXTURE_2D); GL11.glEnable(GL11.GL_BLEND); diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineGenerator.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineGenerator.java index c33aa1271..95ed346d1 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineGenerator.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineGenerator.java @@ -230,7 +230,7 @@ public class TileEntityMachineGenerator extends TileEntity implements ISidedInve i == 6 || i == 7 || i == 8) - if(itemStack.getItem() == ModItems.rod_uranium_fuel_depleted || + /*if(itemStack.getItem() == ModItems.rod_uranium_fuel_depleted || itemStack.getItem() == ModItems.rod_dual_uranium_fuel_depleted || itemStack.getItem() == ModItems.rod_quad_uranium_fuel_depleted || itemStack.getItem() == ModItems.rod_plutonium_fuel_depleted || @@ -241,7 +241,7 @@ public class TileEntityMachineGenerator extends TileEntity implements ISidedInve itemStack.getItem() == ModItems.rod_quad_mox_fuel_depleted || itemStack.getItem() == ModItems.rod_schrabidium_fuel_depleted || itemStack.getItem() == ModItems.rod_dual_schrabidium_fuel_depleted || - itemStack.getItem() == ModItems.rod_quad_schrabidium_fuel_depleted) + itemStack.getItem() == ModItems.rod_quad_schrabidium_fuel_depleted)*/ return true; if(i == 9 || i == 10) if(itemStack.getItem() == Items.bucket || itemStack.getItem() == ModItems.rod_empty || itemStack.getItem() == ModItems.rod_dual_empty || itemStack.getItem() == ModItems.rod_quad_empty) @@ -283,7 +283,7 @@ public class TileEntityMachineGenerator extends TileEntity implements ISidedInve //Batteries power = Library.chargeItemsFromTE(slots, 11, power, powerMax); - for(int i = 0; i < 9; i++) + /*for(int i = 0; i < 9; i++) { if(slots[i] != null && slots[i].getItem() == ModItems.rod_uranium_fuel) { @@ -429,7 +429,7 @@ public class TileEntityMachineGenerator extends TileEntity implements ISidedInve this.slots[i] = new ItemStack(ModItems.rod_quad_schrabidium_fuel_depleted); } } - } + }*/ if(this.power > powerMax) { diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineReactorLarge.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineReactorLarge.java index 63fb2cb94..5dac387fd 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineReactorLarge.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineReactorLarge.java @@ -573,30 +573,30 @@ public class TileEntityMachineReactorLarge extends TileEntity IInventory chest = (IInventory)te; - Item waste = ModItems.waste_uranium_hot; + Item waste = ModItems.waste_uranium; switch(type) { case PLUTONIUM: - waste = ModItems.waste_plutonium_hot; + waste = ModItems.waste_plutonium; break; case MOX: - waste = ModItems.waste_mox_hot; + waste = ModItems.waste_mox; break; case SCHRABIDIUM: - waste = ModItems.waste_schrabidium_hot; + waste = ModItems.waste_schrabidium; break; case THORIUM: - waste = ModItems.waste_thorium_hot; + waste = ModItems.waste_thorium; break; default: - waste = ModItems.waste_uranium_hot; + waste = ModItems.waste_uranium; break; } for(int i = 0; i < chest.getSizeInventory(); i++) { - if(chest.isItemValidForSlot(i, new ItemStack(waste)) && chest.getStackInSlot(i) != null && chest.getStackInSlot(i).getItem() == waste && chest.getStackInSlot(i).stackSize < chest.getStackInSlot(i).getMaxStackSize()) { - chest.setInventorySlotContents(i, new ItemStack(waste, chest.getStackInSlot(i).stackSize + 1)); + if(chest.isItemValidForSlot(i, new ItemStack(waste, 1, 1)) && chest.getStackInSlot(i) != null && chest.getStackInSlot(i).getItem() == waste && chest.getStackInSlot(i).stackSize < chest.getStackInSlot(i).getMaxStackSize()) { + chest.setInventorySlotContents(i, new ItemStack(waste, chest.getStackInSlot(i).stackSize + 1, 1)); this.waste -= wSize; return; } @@ -604,8 +604,8 @@ public class TileEntityMachineReactorLarge extends TileEntity for(int i = 0; i < chest.getSizeInventory(); i++) { - if(chest.isItemValidForSlot(i, new ItemStack(waste)) && chest.getStackInSlot(i) == null) { - chest.setInventorySlotContents(i, new ItemStack(waste)); + if(chest.isItemValidForSlot(i, new ItemStack(waste, 1, 1)) && chest.getStackInSlot(i) == null) { + chest.setInventorySlotContents(i, new ItemStack(waste, 1, 1)); this.waste -= wSize; return; } @@ -923,48 +923,18 @@ public class TileEntityMachineReactorLarge extends TileEntity TileEntityMachineReactorLarge.registerFuelEntry(1, ReactorFuelType.URANIUM, ModItems.nugget_uranium_fuel); TileEntityMachineReactorLarge.registerFuelEntry(9, ReactorFuelType.URANIUM, ModItems.ingot_uranium_fuel); - TileEntityMachineReactorLarge.registerFuelEntry(6, ReactorFuelType.URANIUM, ModItems.rod_uranium_fuel); - TileEntityMachineReactorLarge.registerFuelEntry(12, ReactorFuelType.URANIUM, ModItems.rod_dual_uranium_fuel); - TileEntityMachineReactorLarge.registerFuelEntry(24, ReactorFuelType.URANIUM, ModItems.rod_quad_uranium_fuel); - TileEntityMachineReactorLarge.registerWasteEntry(6, ReactorFuelType.URANIUM, ModItems.rod_empty, ModItems.rod_uranium_fuel_depleted); - TileEntityMachineReactorLarge.registerWasteEntry(12, ReactorFuelType.URANIUM, ModItems.rod_dual_empty, ModItems.rod_dual_uranium_fuel_depleted); - TileEntityMachineReactorLarge.registerWasteEntry(24, ReactorFuelType.URANIUM, ModItems.rod_quad_empty, ModItems.rod_quad_uranium_fuel_depleted); TileEntityMachineReactorLarge.registerFuelEntry(1, ReactorFuelType.PLUTONIUM, ModItems.nugget_plutonium_fuel); TileEntityMachineReactorLarge.registerFuelEntry(9, ReactorFuelType.PLUTONIUM, ModItems.ingot_plutonium_fuel); - TileEntityMachineReactorLarge.registerFuelEntry(6, ReactorFuelType.PLUTONIUM, ModItems.rod_plutonium_fuel); - TileEntityMachineReactorLarge.registerFuelEntry(12, ReactorFuelType.PLUTONIUM, ModItems.rod_dual_plutonium_fuel); - TileEntityMachineReactorLarge.registerFuelEntry(24, ReactorFuelType.PLUTONIUM, ModItems.rod_quad_plutonium_fuel); - TileEntityMachineReactorLarge.registerWasteEntry(6, ReactorFuelType.PLUTONIUM, ModItems.rod_empty, ModItems.rod_plutonium_fuel_depleted); - TileEntityMachineReactorLarge.registerWasteEntry(12, ReactorFuelType.PLUTONIUM, ModItems.rod_dual_empty, ModItems.rod_dual_plutonium_fuel_depleted); - TileEntityMachineReactorLarge.registerWasteEntry(24, ReactorFuelType.PLUTONIUM, ModItems.rod_quad_empty, ModItems.rod_quad_plutonium_fuel_depleted); - + TileEntityMachineReactorLarge.registerFuelEntry(1, ReactorFuelType.MOX, ModItems.nugget_mox_fuel); TileEntityMachineReactorLarge.registerFuelEntry(9, ReactorFuelType.MOX, ModItems.ingot_mox_fuel); - TileEntityMachineReactorLarge.registerFuelEntry(6, ReactorFuelType.MOX, ModItems.rod_mox_fuel); - TileEntityMachineReactorLarge.registerFuelEntry(12, ReactorFuelType.MOX, ModItems.rod_dual_mox_fuel); - TileEntityMachineReactorLarge.registerFuelEntry(24, ReactorFuelType.MOX, ModItems.rod_quad_mox_fuel); - TileEntityMachineReactorLarge.registerWasteEntry(6, ReactorFuelType.MOX, ModItems.rod_empty, ModItems.rod_mox_fuel_depleted); - TileEntityMachineReactorLarge.registerWasteEntry(12, ReactorFuelType.MOX, ModItems.rod_dual_empty, ModItems.rod_dual_mox_fuel_depleted); - TileEntityMachineReactorLarge.registerWasteEntry(24, ReactorFuelType.MOX, ModItems.rod_quad_empty, ModItems.rod_quad_mox_fuel_depleted); TileEntityMachineReactorLarge.registerFuelEntry(10, ReactorFuelType.SCHRABIDIUM, ModItems.nugget_schrabidium_fuel); TileEntityMachineReactorLarge.registerFuelEntry(90, ReactorFuelType.SCHRABIDIUM, ModItems.ingot_schrabidium_fuel); - TileEntityMachineReactorLarge.registerFuelEntry(60, ReactorFuelType.SCHRABIDIUM, ModItems.rod_schrabidium_fuel); - TileEntityMachineReactorLarge.registerFuelEntry(120, ReactorFuelType.SCHRABIDIUM, ModItems.rod_dual_schrabidium_fuel); - TileEntityMachineReactorLarge.registerFuelEntry(240, ReactorFuelType.SCHRABIDIUM, ModItems.rod_quad_schrabidium_fuel); - TileEntityMachineReactorLarge.registerWasteEntry(60, ReactorFuelType.SCHRABIDIUM, ModItems.rod_empty, ModItems.rod_schrabidium_fuel_depleted); - TileEntityMachineReactorLarge.registerWasteEntry(120, ReactorFuelType.SCHRABIDIUM, ModItems.rod_dual_empty, ModItems.rod_dual_schrabidium_fuel_depleted); - TileEntityMachineReactorLarge.registerWasteEntry(240, ReactorFuelType.SCHRABIDIUM, ModItems.rod_quad_empty, ModItems.rod_quad_schrabidium_fuel_depleted); TileEntityMachineReactorLarge.registerFuelEntry(1, ReactorFuelType.THORIUM, ModItems.nugget_thorium_fuel); TileEntityMachineReactorLarge.registerFuelEntry(9, ReactorFuelType.THORIUM, ModItems.ingot_thorium_fuel); - TileEntityMachineReactorLarge.registerFuelEntry(6, ReactorFuelType.THORIUM, ModItems.rod_thorium_fuel); - TileEntityMachineReactorLarge.registerFuelEntry(12, ReactorFuelType.THORIUM, ModItems.rod_dual_thorium_fuel); - TileEntityMachineReactorLarge.registerFuelEntry(24, ReactorFuelType.THORIUM, ModItems.rod_quad_thorium_fuel); - TileEntityMachineReactorLarge.registerWasteEntry(6, ReactorFuelType.THORIUM, ModItems.rod_empty, ModItems.rod_thorium_fuel_depleted); - TileEntityMachineReactorLarge.registerWasteEntry(12, ReactorFuelType.THORIUM, ModItems.rod_dual_empty, ModItems.rod_dual_thorium_fuel_depleted); - TileEntityMachineReactorLarge.registerWasteEntry(24, ReactorFuelType.THORIUM, ModItems.rod_quad_empty, ModItems.rod_quad_thorium_fuel_depleted); } public static void registerFuelEntry(int nuggets, ReactorFuelType type, Item fuel) { diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineReactorSmall.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineReactorSmall.java index 3504a92a5..d6d816b1b 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineReactorSmall.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineReactorSmall.java @@ -1,23 +1,22 @@ package com.hbm.tileentity.machine; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; import com.hbm.blocks.ModBlocks; import com.hbm.blocks.machine.MachineReactor; +import com.hbm.blocks.machine.MachineReactorSmall; import com.hbm.config.MobConfig; import com.hbm.explosion.ExplosionNukeGeneric; -import com.hbm.handler.FluidTypeHandler.FluidType; import com.hbm.handler.radiation.ChunkRadiationManager; -import com.hbm.interfaces.IFluidAcceptor; -import com.hbm.interfaces.IFluidContainer; -import com.hbm.interfaces.IFluidSource; import com.hbm.inventory.FluidTank; +import com.hbm.inventory.RecipesCommon.ComparableStack; import com.hbm.items.ModItems; -import com.hbm.items.machine.ItemFuelRod; +import com.hbm.items.machine.ItemPlateFuel; import com.hbm.lib.Library; -import com.hbm.packet.AuxGaugePacket; import com.hbm.packet.PacketDispatcher; +import com.hbm.tileentity.TileEntityMachineBase; import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint; import cpw.mods.fml.relauncher.Side; @@ -34,239 +33,237 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; +import net.minecraftforge.common.util.ForgeDirection; -public class TileEntityMachineReactorSmall extends TileEntity implements ISidedInventory, IFluidContainer, IFluidAcceptor, IFluidSource { +//TODO: Fix all unneeded methods; fix reactor control; Add seven digit displays for total flux + heat; revamp gui; revamp breeder to rely on reactor and use total flux calcs; +public class TileEntityMachineReactorSmall extends TileEntityMachineBase implements ISidedInventory { - private ItemStack slots[]; - - public int hullHeat; - public final int maxHullHeat = 100000; - public int coreHeat; - public final int maxCoreHeat = 50000; + public int heat; + public final int maxHeat = 50000; public int rods; - public final int rodsMax = 100; + public static final int rodsMax = 50; public boolean retracting = true; - public int age = 0; - public List list = new ArrayList(); - public FluidTank[] tanks; + public int[] slotFlux = new int[12]; + int totalFlux = 0; private static final int[] slots_top = new int[] { 0 }; private static final int[] slots_bottom = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15 }; private static final int[] slots_side = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14 }; - private String customName; - public TileEntityMachineReactorSmall() { - slots = new ItemStack[16]; - tanks = new FluidTank[3]; - tanks[0] = new FluidTank(FluidType.WATER, 32000, 0); - tanks[1] = new FluidTank(FluidType.COOLANT, 16000, 1); - tanks[2] = new FluidTank(FluidType.STEAM, 8000, 2); + super(12); } - - @Override - public int getSizeInventory() { - return slots.length; + + private static final HashMap fuelMap = new HashMap(); + static { + fuelMap.put(new ComparableStack(ModItems.plate_fuel_u233), new ItemStack(ModItems.waste_plate_u233, 1, 1)); + fuelMap.put(new ComparableStack(ModItems.plate_fuel_u235), new ItemStack(ModItems.waste_plate_u235, 1, 1)); + fuelMap.put(new ComparableStack(ModItems.plate_fuel_mox), new ItemStack(ModItems.waste_plate_mox, 1, 1)); + fuelMap.put(new ComparableStack(ModItems.plate_fuel_pu239), new ItemStack(ModItems.waste_plate_pu239, 1, 1)); + fuelMap.put(new ComparableStack(ModItems.plate_fuel_sa326), new ItemStack(ModItems.waste_plate_sa326, 1, 1)); } - - @Override - public ItemStack getStackInSlot(int i) { - return slots[i]; - } - - @Override - public ItemStack getStackInSlotOnClosing(int i) { - if(slots[i] != null) { - ItemStack itemStack = slots[i]; - slots[i] = null; - return itemStack; - } else { - return null; - } - } - - @Override - public void setInventorySlotContents(int i, ItemStack itemStack) { - slots[i] = itemStack; - if(itemStack != null && itemStack.stackSize > getInventoryStackLimit()) { - itemStack.stackSize = getInventoryStackLimit(); - } - } - - @Override - public String getInventoryName() { - return this.hasCustomInventoryName() ? this.customName : "container.reactorSmall"; - } - - @Override - public boolean hasCustomInventoryName() { - return this.customName != null && this.customName.length() > 0; - } - - public void setCustomName(String name) { - this.customName = name; - } - - @Override - public int getInventoryStackLimit() { - return 64; - } - - @Override - public boolean isUseableByPlayer(EntityPlayer player) { - if(worldObj.getTileEntity(xCoord, yCoord, zCoord) != this) { - return false; - } else { - return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <= 64; - } - } - - // You scrubs aren't needed for anything (right now) - @Override - public void openInventory() { - } - - @Override - public void closeInventory() { + + public String getName() { + return "container.reactorSmall"; } @Override public boolean isItemValidForSlot(int i, ItemStack itemStack) { - if(i == 0 || i == 1 || i == 2 || i == 3 || i == 4 || i == 5 || i == 6 || i == 7 || i == 8 || i == 9 || i == 10 || i == 11) - if(itemStack.getItem().getClass() == ItemFuelRod.class) - return true; - if(i == 12) - if(itemStack.getItem() == ModItems.rod_water || itemStack.getItem() == ModItems.rod_dual_water || itemStack.getItem() == ModItems.rod_quad_water || itemStack.getItem() == Items.water_bucket) - return true; - if(i == 14) - if(itemStack.getItem() == ModItems.rod_coolant || itemStack.getItem() == ModItems.rod_dual_coolant || itemStack.getItem() == ModItems.rod_quad_coolant) + if(i < 12 && i <= 0) + if(itemStack.getItem().getClass() == ItemPlateFuel.class) return true; return false; } - @Override - public ItemStack decrStackSize(int i, int j) { - if(slots[i] != null) { - if(slots[i].stackSize <= j) { - ItemStack itemStack = slots[i]; - slots[i] = null; - return itemStack; - } - ItemStack itemStack1 = slots[i].splitStack(j); - if(slots[i].stackSize == 0) { - slots[i] = null; - } - - return itemStack1; - } else { - return null; - } - } - @Override public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); - NBTTagList list = nbt.getTagList("items", 10); - - coreHeat = nbt.getInteger("heat"); - hullHeat = nbt.getInteger("hullHeat"); + heat = nbt.getInteger("heat"); rods = nbt.getInteger("rods"); retracting = nbt.getBoolean("ret"); - slots = new ItemStack[getSizeInventory()]; - tanks[0].readFromNBT(nbt, "water"); - tanks[1].readFromNBT(nbt, "coolant"); - tanks[2].readFromNBT(nbt, "steam"); - - for(int i = 0; i < list.tagCount(); i++) { - NBTTagCompound nbt1 = list.getCompoundTagAt(i); - byte b0 = nbt1.getByte("slot"); - if(b0 >= 0 && b0 < slots.length) { - slots[b0] = ItemStack.loadItemStackFromNBT(nbt1); - } - } } @Override public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); - nbt.setInteger("heat", coreHeat); - nbt.setInteger("hullHeat", hullHeat); + nbt.setInteger("heat", heat); nbt.setInteger("rods", rods); nbt.setBoolean("ret", retracting); - NBTTagList list = new NBTTagList(); - tanks[0].writeToNBT(nbt, "water"); - tanks[1].writeToNBT(nbt, "coolant"); - tanks[2].writeToNBT(nbt, "steam"); - - for(int i = 0; i < slots.length; i++) { - if(slots[i] != null) { - NBTTagCompound nbt1 = new NBTTagCompound(); - nbt1.setByte("slot", (byte) i); - slots[i].writeToNBT(nbt1); - list.appendTag(nbt1); - } - } - nbt.setTag("items", list); } @Override - public int[] getAccessibleSlotsFromSide(int p_94128_1_) { - return p_94128_1_ == 0 ? slots_bottom : (p_94128_1_ == 1 ? slots_top : slots_side); + public int[] getAccessibleSlotsFromSide(int side) { + return side == 0 ? slots_bottom : (side == 1 ? slots_top : slots_side); } @Override - public boolean canInsertItem(int i, ItemStack itemStack, int j) { - return this.isItemValidForSlot(i, itemStack); - } - - @Override - public boolean canExtractItem(int i, ItemStack itemStack, int j) { - if(i == 0 || i == 1 || i == 2 || i == 3 || i == 4 || i == 5 || i == 6 || i == 7 || i == 8 || i == 9 || i == 10 || i == 11) - if(itemStack.getItem() == ModItems.rod_uranium_fuel_depleted || - itemStack.getItem() == ModItems.rod_dual_uranium_fuel_depleted || - itemStack.getItem() == ModItems.rod_quad_uranium_fuel_depleted || - itemStack.getItem() == ModItems.rod_thorium_fuel_depleted || - itemStack.getItem() == ModItems.rod_dual_thorium_fuel_depleted || - itemStack.getItem() == ModItems.rod_quad_thorium_fuel_depleted || - itemStack.getItem() == ModItems.rod_plutonium_fuel_depleted || - itemStack.getItem() == ModItems.rod_dual_plutonium_fuel_depleted || - itemStack.getItem() == ModItems.rod_quad_plutonium_fuel_depleted || - itemStack.getItem() == ModItems.rod_mox_fuel_depleted || - itemStack.getItem() == ModItems.rod_dual_mox_fuel_depleted || - itemStack.getItem() == ModItems.rod_quad_mox_fuel_depleted || - itemStack.getItem() == ModItems.rod_schrabidium_fuel_depleted || - itemStack.getItem() == ModItems.rod_dual_schrabidium_fuel_depleted || - itemStack.getItem() == ModItems.rod_quad_schrabidium_fuel_depleted) + public boolean canExtractItem(int i, ItemStack stack, int j) { + if(i < 12 && i >= 0) + if(fuelMap.containsValue(stack)) return true; - if(i == 13 || i == 15) - if(itemStack.getItem() == Items.bucket || itemStack.getItem() == ModItems.rod_empty || itemStack.getItem() == ModItems.rod_dual_empty || itemStack.getItem() == ModItems.rod_quad_empty || itemStack.getItem() == ModItems.fluid_tank_empty || itemStack.getItem() == ModItems.fluid_barrel_empty) - return true; - + return false; } - public int getCoreHeatScaled(int i) { - return (coreHeat * i) / maxCoreHeat; + public int getHeatScaled(int i) { + return (heat * i) / maxHeat; + } + + public boolean hasHeat() { + return heat > 0; + } + + @Override + public void updateEntity() { + + if(!worldObj.isRemote) { + + if(retracting && rods > 0) { + + if(rods == rodsMax) + this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.reactorStart", 1.0F, 0.75F); + + rods --; + if(rods == 0) + this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.reactorStop", 1.0F, 1.0F); + } + if(!retracting && rods < rodsMax) { + + if(rods == 0) + this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.reactorStart", 1.0F, 0.75F); + + rods ++; + + if(rods == rodsMax) + this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.reactorStop", 1.0F, 1.0F); + } + + if(rods > rodsMax) + rods = rodsMax; + if(rods < 0) + rods = 0; + + if(rods > 0) + reaction(); + for(byte i = 0; i < slotFlux.length; i++) { + totalFlux += slotFlux[i]; + } + + getInteractions(); + + if(this.heat > 0) { + byte water = getWater(); + + if(water > 0) { + this.heat -= (this.heat * (float) 0.07 * water / 12); + } else if(water == 0) { + this.heat -= 1; + } + + if(this.heat < 0) + this.heat = 0; + } + + if(this.heat > maxHeat) { + this.explode(); + } + + if(rods > 0 && heat > 0 && !(blocksRad(xCoord + 1, yCoord + 1, zCoord) && blocksRad(xCoord - 1, yCoord + 1, zCoord) && blocksRad(xCoord, yCoord + 1, zCoord + 1) && blocksRad(xCoord, yCoord + 1, zCoord - 1))) { + float rad = (float) heat / (float) maxHeat * 50F; + ChunkRadiationManager.proxy.incrementRad(worldObj, xCoord, yCoord, zCoord, rad); + } + + NBTTagCompound data = new NBTTagCompound(); + data.setInteger("heat", heat); + data.setInteger("rods", rods); + data.setBoolean("ret", retracting); + data.setIntArray("slotFlux", slotFlux); + this.networkPack(data, 150); + } + } + + public void networkUnpack(NBTTagCompound data) { + this.heat = data.getInteger("heat"); + this.rods = data.getInteger("rods"); + this.retracting = data.getBoolean("ret"); + this.slotFlux = data.getIntArray("slotFlux"); + } + + private byte getWater() { + byte water = 0; + + for(byte d = 0; d < 6; d++) { + ForgeDirection dir = ForgeDirection.getOrientation(d); + if(d < 2) { + if(worldObj.getBlock(xCoord, yCoord + 1 + dir.offsetY * 2, zCoord).getMaterial() == Material.water) + water++; + } else { + for(byte i = 0; i < 3; i++) { + if(worldObj.getBlock(xCoord + dir.offsetX, yCoord + i, zCoord + dir.offsetZ).getMaterial() == Material.water) + water++; + } + } + } + + return water; + } + + public boolean isSubmerged() { + + return worldObj.getBlock(xCoord + 1, yCoord + 1, zCoord).getMaterial() == Material.water || + worldObj.getBlock(xCoord, yCoord + 1, zCoord + 1).getMaterial() == Material.water || + worldObj.getBlock(xCoord - 1, yCoord + 1, zCoord).getMaterial() == Material.water || + worldObj.getBlock(xCoord, yCoord + 1, zCoord - 1).getMaterial() == Material.water; + } + + private void getInteractions() { + getInteractionForBlock(xCoord + 1, yCoord + 1, zCoord); + getInteractionForBlock(xCoord - 1, yCoord + 1, zCoord); + getInteractionForBlock(xCoord, yCoord + 1, zCoord + 1); + getInteractionForBlock(xCoord, yCoord + 1, zCoord - 1); } - public int getHullHeatScaled(int i) { - return (hullHeat * i) / maxHullHeat; + private void getInteractionForBlock(int x, int y, int z) { + + Block b = worldObj.getBlock(x, y, z); + TileEntity te = worldObj.getTileEntity(x, y, z); + + if(b == ModBlocks.machine_reactor) { + + int[] pos = ((MachineReactor) ModBlocks.machine_reactor).findCore(worldObj, x, y, z); + + if(pos != null) { + + TileEntity tile = worldObj.getTileEntity(pos[0], pos[1], pos[2]); + + if(tile instanceof TileEntityMachineReactor) { + + TileEntityMachineReactor reactor = (TileEntityMachineReactor) tile; + + if(reactor.charge <= 1 && this.heat > 0) { + reactor.charge = 1; + reactor.heat = (int) Math.floor(heat * 4 / maxHeat) + 1; + } + } + } + } } - public int getSteamScaled(int i) { - return (tanks[2].getFill() * i) / tanks[2].getMaxFill(); - } + private boolean blocksRad(int x, int y, int z) { - public boolean hasCoreHeat() { - return coreHeat > 0; - } + Block b = worldObj.getBlock(x, y, z); - public boolean hasHullHeat() { - return hullHeat > 0; - } + if(b == ModBlocks.block_lead || b == ModBlocks.block_desh || b == ModBlocks.machine_reactor_small || b == ModBlocks.machine_reactor) + return true; - private int[] getNeighbouringSlots(int id) { + if(b.getExplosionResistance(null) >= 100) + return true; + + return false; + } + + private int[] getNeighboringSlots(int id) { switch(id) { case 0: @@ -297,401 +294,34 @@ public class TileEntityMachineReactorSmall extends TileEntity implements ISidedI return null; } - - public int getFuelPercent() { - - if(getRodCount() == 0) - return 0; - - int rodMax = 0; - int rod = 0; - - for(int i = 0; i < 12; i++) { - - if(slots[i] != null && slots[i].getItem().getClass() == ItemFuelRod.class) { - rodMax += ((ItemFuelRod) slots[i].getItem()).lifeTime; - rod += ((ItemFuelRod) slots[i].getItem()).lifeTime - ItemFuelRod.getLifeTime(slots[i]); - } - } - - if(rodMax == 0) - return 0; - - return rod * 100 / rodMax; - } - - @Override - public void updateEntity() { - - if(!worldObj.isRemote) { - - age++; - if(age >= 20) { - age = 0; - } - - if(age == 9 || age == 19) - fillFluidInit(tanks[2].getTankType()); - - tanks[0].loadTank(12, 13, slots); - tanks[1].loadTank(14, 15, slots); - - if(retracting && rods > 0) { - - if(rods == rodsMax) - this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.reactorStart", 1.0F, 0.75F); - - rods--; - - if(rods == 0) - this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.reactorStop", 1.0F, 1.0F); - } - if(!retracting && rods < rodsMax) { - - if(rods == 0) - this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.reactorStart", 1.0F, 0.75F); - - rods++; - - if(rods == rodsMax) - this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.reactorStop", 1.0F, 1.0F); - } - - if(rods >= rodsMax) + + private void reaction() { + for(byte i = 0; i < 12; i++) { + if(slots[i] == null) + continue; + + if(slots[i].getItem() instanceof ItemPlateFuel) { + ItemPlateFuel rod = (ItemPlateFuel) slots[i].getItem(); - for(int i = 0; i < 12; i++) { - - if(slots[i] != null) { - if(slots[i].getItem().getClass() == ItemFuelRod.class) - decay(i); - else if(slots[i].getItem() == ModItems.meteorite_sword_bred) - slots[i] = new ItemStack(ModItems.meteorite_sword_irradiated); - } + int outFlux = rod.react(worldObj, slots[i], slotFlux[i] + 10); + rod.setLifeTime(slots[i], rod.getLifeTime(slots[i]) + outFlux); + this.heat += outFlux * 2; + slotFlux[i] = 0; + + int[] neighborSlots = getNeighboringSlots(i); + + if(ItemPlateFuel.getLifeTime(slots[i]) > rod.lifeTime) { + slots[i] = fuelMap.get(new ComparableStack(slots[i])).copy(); } - - coreHeatMod = 1.0; - hullHeatMod = 1.0; - conversionMod = 1.0; - decayMod = 1.0; - - getInteractions(); - - if(this.coreHeat > 0 && this.tanks[1].getFill() > 0 && this.hullHeat < this.maxHullHeat) { - this.hullHeat += this.coreHeat * 0.175 * hullHeatMod; - this.coreHeat -= this.coreHeat * 0.1; - - this.tanks[1].setFill(this.tanks[1].getFill() - 10); - - if(this.tanks[1].getFill() < 0) - this.tanks[1].setFill(0); - } - - if(this.hullHeat > maxHullHeat) { - this.hullHeat = maxHullHeat; - } - - if(this.hullHeat > 0 && this.tanks[0].getFill() > 0) { - generateSteam(); - this.hullHeat -= this.hullHeat * 0.085; - } - - if(this.coreHeat > maxCoreHeat) { - this.explode(); - } - - if(rods > 0 && coreHeat > 0 && !(blocksRad(xCoord + 1, yCoord + 1, zCoord) && blocksRad(xCoord - 1, yCoord + 1, zCoord) && blocksRad(xCoord, yCoord + 1, zCoord + 1) && blocksRad(xCoord, yCoord + 1, zCoord - 1))) { - - /* - * List list = (List) - * worldObj.getEntitiesWithinAABBExcludingEntity(null, - * AxisAlignedBB.getBoundingBox(xCoord + 0.5 - 5, yCoord + 1.5 - - * 5, zCoord + 0.5 - 5, xCoord + 0.5 + 5, yCoord + 1.5 + 5, - * zCoord + 0.5 + 5)); - * - * for (Entity e : list) { if (e instanceof EntityLivingBase) - * Library.applyRadiation((EntityLivingBase)e, 80, 24, 60, 19); - * } - */ - - float rad = (float) coreHeat / (float) maxCoreHeat * 50F; - ChunkRadiationManager.proxy.incrementRad(worldObj, xCoord, yCoord, zCoord, rad); - } - - for(int i = 0; i < 3; i++) - tanks[i].updateTank(xCoord, yCoord, zCoord, worldObj.provider.dimensionId); - - PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, rods, 0), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 150)); - PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, retracting ? 1 : 0, 1), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50)); - PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, coreHeat, 2), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50)); - PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, hullHeat, 3), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50)); - } - } - - @SuppressWarnings("incomplete-switch") - private void generateSteam() { - - // function of SHS produced per tick - // maxes out at heat% * tank capacity / 20 - double steam = (((double) hullHeat / (double) maxHullHeat) * ((double) tanks[2].getMaxFill() / 50D)) * conversionMod; - - double water = steam; - - switch(tanks[2].getTankType()) { - case STEAM: - water /= 100D; - break; - case HOTSTEAM: - water /= 10; - break; - case SUPERHOTSTEAM: - break; - } - - tanks[0].setFill(tanks[0].getFill() - (int) Math.ceil(water)); - tanks[2].setFill(tanks[2].getFill() + (int) Math.floor(steam)); - - if(tanks[0].getFill() < 0) - tanks[0].setFill(0); - - if(tanks[2].getFill() > tanks[2].getMaxFill()) - tanks[2].setFill(tanks[2].getMaxFill()); - - } - - private void getInteractions() { - - getInteractionForBlock(xCoord + 1, yCoord + 1, zCoord); - getInteractionForBlock(xCoord - 1, yCoord + 1, zCoord); - getInteractionForBlock(xCoord, yCoord + 1, zCoord + 1); - getInteractionForBlock(xCoord, yCoord + 1, zCoord - 1); - - TileEntity te1 = worldObj.getTileEntity(xCoord + 2, yCoord, zCoord); - TileEntity te2 = worldObj.getTileEntity(xCoord - 2, yCoord, zCoord); - TileEntity te3 = worldObj.getTileEntity(xCoord, yCoord, zCoord + 2); - TileEntity te4 = worldObj.getTileEntity(xCoord, yCoord, zCoord - 2); - - boolean b1 = blocksRad(xCoord + 1, yCoord + 1, zCoord); - boolean b2 = blocksRad(xCoord - 1, yCoord + 1, zCoord); - boolean b3 = blocksRad(xCoord, yCoord + 1, zCoord + 1); - boolean b4 = blocksRad(xCoord, yCoord + 1, zCoord - 1); - - TileEntityMachineReactorSmall[] reactors = new TileEntityMachineReactorSmall[4]; - - reactors[0] = ((te1 instanceof TileEntityMachineReactorSmall && !b1) ? (TileEntityMachineReactorSmall) te1 : null); - reactors[1] = ((te2 instanceof TileEntityMachineReactorSmall && !b2) ? (TileEntityMachineReactorSmall) te2 : null); - reactors[2] = ((te3 instanceof TileEntityMachineReactorSmall && !b3) ? (TileEntityMachineReactorSmall) te3 : null); - reactors[3] = ((te4 instanceof TileEntityMachineReactorSmall && !b4) ? (TileEntityMachineReactorSmall) te4 : null); - - for(int i = 0; i < 4; i++) { - - if(reactors[i] != null && reactors[i].rods >= rodsMax && reactors[i].getRodCount() > 0) { - decayMod += reactors[i].getRodCount() / 2D; - } - } - } - - private double decayMod = 1.0D; - private double coreHeatMod = 1.0D; - private double hullHeatMod = 1.0D; - private double conversionMod = 1.0D; - - private void getInteractionForBlock(int x, int y, int z) { - - Block b = worldObj.getBlock(x, y, z); - TileEntity te = worldObj.getTileEntity(x, y, z); - - if(b == Blocks.lava || b == Blocks.flowing_lava) { - hullHeatMod *= 3; - conversionMod *= 0.5; - - } else if(b == Blocks.redstone_block) { - conversionMod *= 1.15; - - } else if(b == ModBlocks.block_lead) { - decayMod += 1; - - } else if(b == Blocks.water || b == Blocks.flowing_water) { - tanks[0].setFill(tanks[0].getFill() + 25); - - if(tanks[0].getFill() > tanks[0].getMaxFill()) - tanks[0].setFill(tanks[0].getMaxFill()); - - } else if(b == ModBlocks.block_niter || b == ModBlocks.block_niter_reinforced) { - if(tanks[0].getFill() >= 50 && tanks[1].getFill() + 5 <= tanks[1].getMaxFill()) { - tanks[0].setFill(tanks[0].getFill() - 50); - tanks[1].setFill(tanks[1].getFill() + 5); - } - - } else if(b == ModBlocks.machine_reactor) { - - int[] pos = ((MachineReactor) ModBlocks.machine_reactor).findCore(worldObj, x, y, z); - - if(pos != null) { - - TileEntity tile = worldObj.getTileEntity(pos[0], pos[1], pos[2]); - - if(tile instanceof TileEntityMachineReactor) { - - TileEntityMachineReactor reactor = (TileEntityMachineReactor) tile; - - if(reactor.charge <= 1 && this.hullHeat > 0) { - reactor.charge = 1; - reactor.heat = (int) Math.floor(hullHeat * 4 / maxHullHeat) + 1; - } + + for(byte j = 0; j < neighborSlots.length; j++) { + slotFlux[neighborSlots[j]] += outFlux * (rods / rodsMax); } + continue; } - - } else if(te instanceof TileEntityNukeFurnace) { - TileEntityNukeFurnace reactor = (TileEntityNukeFurnace) te; - if(reactor.dualPower < 1 && this.coreHeat > 0) - reactor.dualPower = 1; - - } else if(b == ModBlocks.block_uranium) { - coreHeatMod *= 1.05; - - } else if(b == Blocks.coal_block) { - hullHeatMod *= 1.1; - - } else if(b == ModBlocks.block_beryllium) { - hullHeatMod *= 0.95; - conversionMod *= 1.05; - - } else if(b == ModBlocks.block_schrabidium) { - decayMod += 1; - conversionMod *= 1.25; - hullHeatMod *= 1.1; - - } else if(b == ModBlocks.block_waste) { - decayMod += 3; - - } - } - - private boolean blocksRad(int x, int y, int z) { - - Block b = worldObj.getBlock(x, y, z); - - if(b == ModBlocks.block_lead || b == ModBlocks.block_desh || b == ModBlocks.brick_concrete) - return true; - - if(b.getExplosionResistance(null) >= 100) - return true; - - return false; - } - - public int getRodCount() { - - int count = 0; - - for(int i = 0; i < 12; i++) { - - if(slots[i] != null && slots[i].getItem().getClass() == ItemFuelRod.class) - count++; - } - - return count; - } - - private boolean hasFuelRod(int id) { - if(id > 11) - return false; - - if(slots[id] != null) - return slots[id].getItem().getClass() == ItemFuelRod.class; - - return false; - } - - private int getNeightbourCount(int id) { - - int[] neighbours = this.getNeighbouringSlots(id); - - if(neighbours == null) - return 0; - - int count = 0; - - for(int i = 0; i < neighbours.length; i++) - if(hasFuelRod(neighbours[i])) - count++; - - return count; - - } - - // itemstack in slots[id] has to contain ItemFuelRod item - private void decay(int id) { - if(id > 11) - return; - - int decay = getNeightbourCount(id) + 1; - - decay *= decayMod; - - for(int i = 0; i < decay; i++) { - ItemFuelRod rod = ((ItemFuelRod) slots[id].getItem()); - this.coreHeat += rod.heat * coreHeatMod; - ItemFuelRod.setLifeTime(slots[id], ItemFuelRod.getLifeTime(slots[id]) + 1); - - if(ItemFuelRod.getLifeTime(slots[id]) > ((ItemFuelRod) slots[id].getItem()).lifeTime) { - onRunOut(id); - return; - } - } - } - - // itemstack in slots[id] has to contain ItemFuelRod item - private void onRunOut(int id) { - - // System.out.println("aaa"); - - Item item = slots[id].getItem(); - - if(item == ModItems.rod_uranium_fuel) { - slots[id] = new ItemStack(ModItems.rod_uranium_fuel_depleted); - - } else if(item == ModItems.rod_thorium_fuel) { - slots[id] = new ItemStack(ModItems.rod_thorium_fuel_depleted); - - } else if(item == ModItems.rod_plutonium_fuel) { - slots[id] = new ItemStack(ModItems.rod_plutonium_fuel_depleted); - - } else if(item == ModItems.rod_mox_fuel) { - slots[id] = new ItemStack(ModItems.rod_mox_fuel_depleted); - - } else if(item == ModItems.rod_schrabidium_fuel) { - slots[id] = new ItemStack(ModItems.rod_schrabidium_fuel_depleted); - - } else if(item == ModItems.rod_dual_uranium_fuel) { - slots[id] = new ItemStack(ModItems.rod_dual_uranium_fuel_depleted); - - } else if(item == ModItems.rod_dual_thorium_fuel) { - slots[id] = new ItemStack(ModItems.rod_dual_thorium_fuel_depleted); - - } else if(item == ModItems.rod_dual_plutonium_fuel) { - slots[id] = new ItemStack(ModItems.rod_dual_plutonium_fuel_depleted); - - } else if(item == ModItems.rod_dual_mox_fuel) { - slots[id] = new ItemStack(ModItems.rod_dual_mox_fuel_depleted); - - } else if(item == ModItems.rod_dual_schrabidium_fuel) { - slots[id] = new ItemStack(ModItems.rod_dual_schrabidium_fuel_depleted); - - } else if(item == ModItems.rod_quad_uranium_fuel) { - slots[id] = new ItemStack(ModItems.rod_quad_uranium_fuel_depleted); - - } else if(item == ModItems.rod_quad_thorium_fuel) { - slots[id] = new ItemStack(ModItems.rod_quad_thorium_fuel_depleted); - - } else if(item == ModItems.rod_quad_plutonium_fuel) { - slots[id] = new ItemStack(ModItems.rod_quad_plutonium_fuel_depleted); - - } else if(item == ModItems.rod_quad_mox_fuel) { - slots[id] = new ItemStack(ModItems.rod_quad_mox_fuel_depleted); - - } else if(item == ModItems.rod_quad_schrabidium_fuel) { - slots[id] = new ItemStack(ModItems.rod_quad_schrabidium_fuel_depleted); + + if(slots[i].getItem() == ModItems.meteorite_sword_bred) + slots[i] = new ItemStack(ModItems.meteorite_sword_irradiated); } } @@ -700,13 +330,28 @@ public class TileEntityMachineReactorSmall extends TileEntity implements ISidedI for(int i = 0; i < slots.length; i++) { this.slots[i] = null; } - + worldObj.setBlockToAir(this.xCoord, this.yCoord, this.zCoord); + + for(byte d = 0; d < 6; d++) { + ForgeDirection dir = ForgeDirection.getOrientation(d); + if(d < 2) { + if(worldObj.getBlock(xCoord, yCoord + 1 + dir.offsetY * 2, zCoord).getMaterial() == Material.water) + worldObj.setBlockToAir(xCoord, yCoord + 1 + dir.offsetY * 2, zCoord); + } else { + for(byte i = 0; i < 3; i++) { + if(worldObj.getBlock(xCoord + dir.offsetX, yCoord + i, zCoord + dir.offsetZ).getMaterial() == Material.water) + worldObj.setBlockToAir(xCoord + dir.offsetX, yCoord + i, zCoord + dir.offsetZ); + } + } + } + worldObj.createExplosion(null, this.xCoord, this.yCoord, this.zCoord, 18.0F, true); - ExplosionNukeGeneric.waste(worldObj, this.xCoord, this.yCoord, this.zCoord, 35); - worldObj.setBlock(this.xCoord, this.yCoord, this.zCoord, ModBlocks.toxic_block); + worldObj.setBlock(this.xCoord, this.yCoord, this.zCoord, ModBlocks.deco_steel); + worldObj.setBlock(this.xCoord, this.yCoord + 1, this.zCoord, ModBlocks.corium_block); + worldObj.setBlock(this.xCoord, this.yCoord + 2, this.zCoord, ModBlocks.deco_steel); - ChunkRadiationManager.proxy.incrementRad(worldObj, xCoord, yCoord, zCoord, 1000); + ChunkRadiationManager.proxy.incrementRad(worldObj, xCoord, yCoord, zCoord, 50); if(MobConfig.enableElementals) { List players = worldObj.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5).expand(100, 100, 100)); @@ -717,96 +362,6 @@ public class TileEntityMachineReactorSmall extends TileEntity implements ISidedI } } - @Override - public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) { - Library.transmitFluid(x, y, z, newTact, this, worldObj, type); - } - - @Override - public void fillFluidInit(FluidType type) { - fillFluid(this.xCoord - 1, this.yCoord, this.zCoord, getTact(), type); - fillFluid(this.xCoord + 1, this.yCoord, this.zCoord, getTact(), type); - fillFluid(this.xCoord, this.yCoord, this.zCoord - 1, getTact(), type); - fillFluid(this.xCoord, this.yCoord, this.zCoord + 1, getTact(), type); - - fillFluid(this.xCoord - 1, this.yCoord + 2, this.zCoord, getTact(), type); - fillFluid(this.xCoord + 1, this.yCoord + 2, this.zCoord, getTact(), type); - fillFluid(this.xCoord, this.yCoord + 2, this.zCoord - 1, getTact(), type); - fillFluid(this.xCoord, this.yCoord + 2, this.zCoord + 1, getTact(), type); - } - - @Override - public boolean getTact() { - if(age >= 0 && age < 10) { - return true; - } - - return false; - } - - @Override - public int getMaxFluidFill(FluidType type) { - if(type.name().equals(tanks[0].getTankType().name())) - return tanks[0].getMaxFill(); - else if(type.name().equals(tanks[1].getTankType().name())) - return tanks[1].getMaxFill(); - else - return 0; - } - - @Override - public void setFluidFill(int i, FluidType type) { - if(type.name().equals(tanks[0].getTankType().name())) - tanks[0].setFill(i); - else if(type.name().equals(tanks[1].getTankType().name())) - tanks[1].setFill(i); - else if(type.name().equals(tanks[2].getTankType().name())) - tanks[2].setFill(i); - } - - @Override - public int getFluidFill(FluidType type) { - if(type.name().equals(tanks[0].getTankType().name())) - return tanks[0].getFill(); - else if(type.name().equals(tanks[1].getTankType().name())) - return tanks[1].getFill(); - else if(type.name().equals(tanks[2].getTankType().name())) - return tanks[2].getFill(); - else - return 0; - } - - @Override - public void setFillstate(int fill, int index) { - if(index < 3 && tanks[index] != null) - tanks[index].setFill(fill); - } - - @Override - public void setType(FluidType type, int index) { - if(index < 3 && tanks[index] != null) - tanks[index].setTankType(type); - } - - @Override - public List getTanks() { - List list = new ArrayList(); - list.add(tanks[0]); - list.add(tanks[1]); - list.add(tanks[2]); - - return list; - } - - @Override - public List getFluidList(FluidType type) { - return list; - } - - @Override - public void clearFluidList(FluidType type) { - list.clear(); - } @Override public AxisAlignedBB getRenderBoundingBox() { @@ -818,12 +373,4 @@ public class TileEntityMachineReactorSmall extends TileEntity implements ISidedI public double getMaxRenderDistanceSquared() { return 65536.0D; } - - public boolean isSubmerged() { - - return worldObj.getBlock(xCoord + 1, yCoord + 1, zCoord).getMaterial() == Material.water || - worldObj.getBlock(xCoord, yCoord + 1, zCoord + 1).getMaterial() == Material.water || - worldObj.getBlock(xCoord - 1, yCoord + 1, zCoord).getMaterial() == Material.water || - worldObj.getBlock(xCoord, yCoord + 1, zCoord - 1).getMaterial() == Material.water; - } } \ No newline at end of file diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityReactorControl.java b/src/main/java/com/hbm/tileentity/machine/TileEntityReactorControl.java index 8afad0e50..1dd00a2f6 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityReactorControl.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityReactorControl.java @@ -206,7 +206,7 @@ public class TileEntityReactorControl extends TileEntity implements ISidedInvent @Override public void updateEntity() { - if(!worldObj.isRemote) + /*if(!worldObj.isRemote) { if(slots[0] != null && slots[0].getItem() == ModItems.reactor_sensor && slots[0].stackTagCompound != null) @@ -352,6 +352,6 @@ public class TileEntityReactorControl extends TileEntity implements ISidedInvent } PacketDispatcher.wrapper.sendToAllAround(new TEControlPacket(xCoord, yCoord, zCoord, hullHeat, coreHeat, fuel, water, cool, steam, maxWater, maxCool, maxSteam, compression, rods, maxRods, isOn, auto, isLinked), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 30)); - } + }*/ } } diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityWasteDrum.java b/src/main/java/com/hbm/tileentity/machine/TileEntityWasteDrum.java index 2d014eab1..bf0b1a538 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityWasteDrum.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityWasteDrum.java @@ -26,14 +26,20 @@ public class TileEntityWasteDrum extends TileEntity implements ISidedInventory { private static final HashMap wasteMap = new HashMap(); static { - wasteMap.put(new ComparableStack(ModItems.waste_natural_uranium_hot), new ItemStack(ModItems.waste_natural_uranium)); - wasteMap.put(new ComparableStack(ModItems.waste_uranium_hot), new ItemStack(ModItems.waste_uranium)); - wasteMap.put(new ComparableStack(ModItems.waste_thorium_hot), new ItemStack(ModItems.waste_thorium)); - wasteMap.put(new ComparableStack(ModItems.waste_mox_hot), new ItemStack(ModItems.waste_mox)); - wasteMap.put(new ComparableStack(ModItems.waste_plutonium_hot), new ItemStack(ModItems.waste_plutonium)); - wasteMap.put(new ComparableStack(ModItems.waste_u233_hot), new ItemStack(ModItems.waste_u233)); - wasteMap.put(new ComparableStack(ModItems.waste_u235_hot), new ItemStack(ModItems.waste_u235)); - wasteMap.put(new ComparableStack(ModItems.waste_schrabidium_hot), new ItemStack(ModItems.waste_schrabidium)); + wasteMap.put(new ComparableStack(new ItemStack(ModItems.waste_natural_uranium, 1, 1)), new ItemStack(ModItems.waste_natural_uranium)); + wasteMap.put(new ComparableStack(new ItemStack(ModItems.waste_uranium, 1, 1)), new ItemStack(ModItems.waste_uranium)); + wasteMap.put(new ComparableStack(new ItemStack(ModItems.waste_thorium, 1, 1)), new ItemStack(ModItems.waste_thorium)); + wasteMap.put(new ComparableStack(new ItemStack(ModItems.waste_mox, 1, 1)), new ItemStack(ModItems.waste_mox)); + wasteMap.put(new ComparableStack(new ItemStack(ModItems.waste_plutonium, 1, 1)), new ItemStack(ModItems.waste_plutonium)); + wasteMap.put(new ComparableStack(new ItemStack(ModItems.waste_u233, 1, 1)), new ItemStack(ModItems.waste_u233)); + wasteMap.put(new ComparableStack(new ItemStack(ModItems.waste_u235, 1, 1)), new ItemStack(ModItems.waste_u235)); + wasteMap.put(new ComparableStack(new ItemStack(ModItems.waste_schrabidium, 1, 1)), new ItemStack(ModItems.waste_schrabidium)); + + wasteMap.put(new ComparableStack(new ItemStack(ModItems.waste_plate_u233, 1, 1)), new ItemStack(ModItems.waste_plate_u233)); + wasteMap.put(new ComparableStack(new ItemStack(ModItems.waste_plate_u235, 1, 1)), new ItemStack(ModItems.waste_plate_u235)); + wasteMap.put(new ComparableStack(new ItemStack(ModItems.waste_plate_mox, 1, 1)), new ItemStack(ModItems.waste_plate_mox)); + wasteMap.put(new ComparableStack(new ItemStack(ModItems.waste_plate_pu239, 1, 1)), new ItemStack(ModItems.waste_plate_pu239)); + wasteMap.put(new ComparableStack(new ItemStack(ModItems.waste_plate_sa326, 1, 1)), new ItemStack(ModItems.waste_plate_sa326)); } public TileEntityWasteDrum() { diff --git a/src/main/resources/assets/hbm/lang/de_DE.lang b/src/main/resources/assets/hbm/lang/de_DE.lang index 75a25f27f..feee31739 100644 --- a/src/main/resources/assets/hbm/lang/de_DE.lang +++ b/src/main/resources/assets/hbm/lang/de_DE.lang @@ -2657,21 +2657,13 @@ item.warhead_thermo_endo.name=Endothermischer Sprengkopf item.warhead_thermo_exo.name=Exothermischer Sprengkopf item.warhead_volcano.name=Tektonischer Sprengkopf item.waste_mox.name=Erschöpfter MOX-Kernbrennstoff -item.waste_mox_hot.name=Erschöpfter MOX-Kernbrennstoff (Heiß) item.waste_natural_uranium.name=Erschöpfter Natururankernbrennstoff -item.waste_natural_uranium_hot.name=Erschöpfter Natururankernbrennstoff (Heiß) item.waste_plutonium.name=Erschöpfter Plutoniumkernbrennstoff -item.waste_plutonium_hot.name=Erschöpfter Plutoniumkernbrennstoff (Heiß) item.waste_schrabidium.name=Erschöpfter Schrabidiumkernbrennstoff -item.waste_schrabidium_hot.name=Erschöpfter Schrabidiumkernbrennstoff (Heiß) item.waste_thorium.name=Erschöpfter Thoriumkernbrennstoff -item.waste_thorium_hot.name=Erschöpfter Thoriumkernbrennstoff (Heiß) item.waste_u235.name=Erschöpfter Uran-235-Kernbrennstoff -item.waste_u235_hot.name=Erschöpfter Uran-235-Kernbrennstoff (Heiß) item.waste_u233.name=Erschöpfter Uran-233-Kernbrennstoff -item.waste_u233_hot.name=Erschöpfter Uran-233-Kernbrennstoff (Heiß) item.waste_uranium.name=Erschöpfter Urankernbrennstoff -item.waste_uranium_hot.name=Erschöpfter Urankernbrennstoff (Heiß) item.watch.name=Zerbrochene Taschenuhr item.weapon_bat.name=Richards Standard item.weapon_bat_nail.name=Das Klischee diff --git a/src/main/resources/assets/hbm/lang/en_NT.lang b/src/main/resources/assets/hbm/lang/en_NT.lang index ff192cc4c..1667e5909 100644 --- a/src/main/resources/assets/hbm/lang/en_NT.lang +++ b/src/main/resources/assets/hbm/lang/en_NT.lang @@ -1142,11 +1142,6 @@ item.waste_thorium.name=Depleted Thorium Fuel item.waste_plutonium.name=Depleted Plutonium Fuel item.waste_mox.name=Depleted MOX Fuel item.waste_schrabidium.name=Depleted Schrabidium Fuel -item.waste_uranium_hot.name=Depleted Uranium Fuel (Hot) -item.waste_thorium_hot.name=Depleted Thorium Fuel (Hot) -item.waste_plutonium_hot.name=Depleted Plutonium Fuel (Hot) -item.waste_mox_hot.name=Depleted MOX Fuel (Hot) -item.waste_schrabidium_hot.name=Depleted Schrabidium Fuel (Hot) item.scrap.name=Scrap item.ingot_uranium_fuel.name=Ingot of Uranium Fuel diff --git a/src/main/resources/assets/hbm/lang/en_US.lang b/src/main/resources/assets/hbm/lang/en_US.lang index b740ad405..bd75d3feb 100644 --- a/src/main/resources/assets/hbm/lang/en_US.lang +++ b/src/main/resources/assets/hbm/lang/en_US.lang @@ -467,6 +467,7 @@ death.attack.tauBlast=%1$s charged the XVL1456 for too long and was blown into p death.attack.teleporter=%1$s was teleported into nothingness. desc.item.rtgHeat=Power Level: %s +desc.item.wasteCooling=Cool in a Spent Fuel Pool Drum desc.gui.rtgBFurnace.desc=Requires at least 15 heat to process$The more heat on top of that, the faster it runs$Heat going over maximum speed will have no effect$Gold-198 may decay into Mercury desc.gui.rtgBFurnace.heat=§eCurrent heat level: %s desc.gui.rtgBFurnace.pellets=Accepted Pellets: @@ -2184,6 +2185,11 @@ item.plate_dalekanium.name=Angry Metal item.plate_desh.name=Desh Compound Plate item.plate_dineutronium.name=Dineutronium Compound Plate item.plate_euphemium.name=Euphemium Compound Plate +item.plate_fuel_u233.name=HEU-233 Plate Fuel +item.plate_fuel_u235.name=HEU-235 Plate Fuel +item.plate_fuel_mox.name=HEMOX Plate Fuel +item.plate_fuel_pu239.name=HEP-239 Plate Fuel +item.plate_fuel_sa326.name=HES-326 Plate Fuel item.plate_gold.name=Gold Plate item.plate_iron.name=Iron Plate item.plate_kevlar.name=Kevlar-Ceramic Compound @@ -2784,21 +2790,18 @@ item.warhead_thermo_endo.name=Endothermic Warhead item.warhead_thermo_exo.name=Exothermic Warhead item.warhead_volcano.name=Tectonic Warhead item.waste_mox.name=Depleted MOX Fuel -item.waste_mox_hot.name=Depleted MOX Fuel (Hot) item.waste_natural_uranium.name=Depleted Natural Uranium Fuel -item.waste_natural_uranium_hot.name=Depleted Natural Uranium Fuel (Hot) +item.waste_plate_mox.name=Depleted HEMOX Plate Fuel +item.waste_plate_pu239.name=Depleted HEP-239 Plate Fuel +item.waste_plate_sa326.name=Depleted HES-326 Plate Fuel +item.waste_plate_u233.name=Depleted HEU-233 Plate Fuel +item.waste_plate_u235.name=Depleted HEU-235 Plate Fuel item.waste_plutonium.name=Depleted Plutonium Fuel -item.waste_plutonium_hot.name=Depleted Plutonium Fuel (Hot) item.waste_schrabidium.name=Depleted Schrabidium Fuel -item.waste_schrabidium_hot.name=Depleted Schrabidium Fuel (Hot) item.waste_thorium.name=Depleted Thorium Fuel -item.waste_thorium_hot.name=Depleted Thorium Fuel (Hot) item.waste_u235.name=Depleted Uranium-235 Fuel -item.waste_u235_hot.name=Depleted Uranium-235 Fuel (Hot) item.waste_u233.name=Depleted Uranium-233 Fuel -item.waste_u233_hot.name=Depleted Uranium-233 Fuel (Hot) item.waste_uranium.name=Depleted Uranium Fuel -item.waste_uranium_hot.name=Depleted Uranium Fuel (Hot) item.watch.name=Broken Pocket Watch item.weapon_bat.name=Richard's Default item.weapon_bat_nail.name=The Cliché diff --git a/src/main/resources/assets/hbm/textures/items/plate_fuel_mox.png b/src/main/resources/assets/hbm/textures/items/plate_fuel_mox.png new file mode 100644 index 0000000000000000000000000000000000000000..c409d12e4978485d1e226b4049c9ca3fbcdb8ad1 GIT binary patch literal 269 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G}H0G|+7Rb4e>Ym=y?=+22)O-yTSDl?3?( z|AzsFO=on@14TItJR*x382Ao@Fyrz36)8Z$Bu^K|5RKs89!H@A3LMPM4X6Iw$1wTu z+nPRJ@y1PX{vS4hm!}zYVw<@VX1-Kt`Z6t0+3UhQm#gM4b|3heb70QfC_U?j(mSs? zZS6%Blk9B|?%f{nlWFJX(0$T2sn0U^bXG7lK4Xiy8}L;QXd8p4tDnm{r-UW|m{VOo literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..173c5955ebbfc1a2453281ecb0c1f4fc111cb02f GIT binary patch literal 269 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G}H0G|+72}LOBV^tNLsr%`uqo~VA!-(`x21iDhcun z{tp8To6hK*2a0kQctjR6Fz_7)VaDV6D^h@hNuDl_AsWHGy^dlB3|L&;ClvhWzCIyu z*Q)8P|M?y3UYR$XFcD99xoZXEw3%@(0rys2>EP;75B$pei?hH^+8}+`{L_93vftwt zJ`WUBdUjga#bxogzqu*PZ|!f$cosQx+SH#6jc?eZ1BL(m2HM8p>FVdQ&MBb@07Lg+ A5C8xG literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..bf3317f83095ed309c3ebbd54d796cd239baca1c GIT binary patch literal 270 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G}H0G|+7hU{#Hsw##B3z*KIXV|;f=>LC)m>7oseg+_ef#C;_vJ{ZwDhcun z{tp8To6hK*2a0kQctjR6Fz_7)VaDV6D^h@h$(}BbAsWHGy^dlB3|L&;ClvhWzCIyu z*Q)8P|N9;4UYRqb%;Mfqa&iG%L|T=gW98}~Wi5kwE?3Q8s2}*5b70QPI=$WR);_+c z{pC+cOUKVoEP@wT)XwjH6Y^VJ^jp BV)Ot2 literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..92e1988c280a17ff37bff58cef76f79bc3e9ced6 GIT binary patch literal 269 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G}H0G|+7BTGF8cboLQb_+q+5EL^Cud@P8Ii1%vC6niwF(RTAVE z{2vAwHl5Kq4;1Ar@Q5sCVBk9p!i>lBSEK+1lRRA$yM^z5{-i_79~e{)lo-`d}h@ho!Yw5dNC8sD%*2MYiB4YZBH)78&qol`;+0ESy( Ay8r+H literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..798a1a61da2f429fb92b3cc40265b40b96df2bae GIT binary patch literal 269 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G}H0G|+7BTGF8cboLQb_+q+5EL^Cud(C0r;1;c@wtyUz`PY(gx|f=AZUUko_LF z@Ohx1(zDaTE-s6|{mo5Tertb2#Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!T zZb+sACk^)A!V6p!P_Y#|l3hU%=U9q$X>XsE@q>jx+1V{-L?E|p&lH90Nq6Gzdpkr1 zoC#2TjZtjmbQF$Wh1L=gg{1PO34P20<;kv^+=*n*Jqj3I0-Zc}b9_pzgPO^wq>6a6 zN7o!xW?!;#b?cczHn>=H*pCDx8pSwGQ8R>cZ3qg&b(+2%?Lw0zmU>8#L|nn>8bRas z#3p|Oc^kI+TkJ-~+@qtGcNaZscWp}Fr(L8rdhkFZrscgge@+Atx<@C+oAr$P-kB4@ z!CtFZaV9WK}STh zV_=aJavhQ~ZBRykF-R{H2jHBN7e znR@WM@V>JRb8pQ5`0?Gv^+5~W1uo2->$X!QsfF8BSc-{HuxO_B0;QybGEz>uQcVTZ wxA&iWGU<#qv)$9>YyY+W_YuFpj&UNt_yng#+?&3|0z-ho)78&qol`;+0QYW*q5uE@ literal 0 HcmV?d00001 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 bb625ada594626b0b3c6f6bb4944e85d0ccc7952..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 500 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGizW@LZzX3P}QzQTY0f|XOK~y+TwUbXv z0#Ovj&zm>e%&27{A%r1B)>@;Y2y9WyHbJYtSZ(?yZ6qV9or_R61+^&6{69J~?{%{w zu@@pl2QF{k%$?sm_Y8x7)$wLho@^wfzx`FrU&nNqPRgLhu(TLMr%{I-*a$L-i^7xA zuiQA;T9fO^WyBVum=A~WP${F|X~N(dnzdJ)7oNx7(fsvWTngNm%D64uU|{!Png-tL zb-Yw-2n2M$Ya|6A$y6qj#`f+Wa`|hNN+rbOaYSb$!)HIG09+wp7$yX*``Ij3QzNS%G}H0G|+7B~4{*BOMoS*M#)M@VJPQ>QZ@i1q*vi1$9NBlB!G1*MJmPNswRg ze;8ocbVlbqP?WR4BeIx*f$uN~Gak=hkpdKq_jGX#(FpE6Yc14Zz`=6isrb`>;?r1< z9r99ht>EVT6uh5NsW`G>mY%7@-Q3QAo#8VlbEz$#ag_11WJ0~{f#%D#PJT>Pu3xx{ v?X;X8?YZ;&bii|F=dI_Z6ny_53VX)fxPvXW{ztwS&?*K`S3j3^P6NS%G}%0G|+7A!}<<7Z>TMDCLq8g{&;6$&>kwjV1j3f$|gHCBy+K&XOR%;Qvs- z5bR$e1QIOph%9Dc;5!V$jK}j=qyPouJzX3_G=h82dW#)U;9x%RVe`HJM^ulLT@0<% zOKEEQyYfE63_bP-57nd^(vK-RJ-;dHnHAvIxq|hXR6@P3Ligq3Q(^Bvug;oh@O*ii s%DM7&x{FS-E;=cn(ez8)?`<{9 literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..56592c172d8bf7345966339f1662e2be39d1d29e GIT binary patch literal 261 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G}%0G|+7H63L`Gd=$hpW@1b^qiEQNu5d>@{aCyK>1ja<3d1+vn0qb_&*dd z1p8Nj1q(bPiy0XB4uLSEsD@VqP-UE_i(`mJaPL`bu?7PUmIF`4cmD58Wz=2sWGTny z2@3XKr4@{(v#xj<#C+xMG>)m&Q!Q5}6m><)7|dtkXbSR#G_^ pZnvMO)Xw0_Pv#{r<8PeW!)U<7dNKEV^%I~?44$rjF6*2UngA?_REYop literal 0 HcmV?d00001 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 1a9fd4541468f41d1ddfad19153cb0b514c6be03..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 508 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGizW@LZzX3P}QzQTY0g*{WK~y+TwUfJFdkM~y(wr!(W zy2DMO2q8o~)j)HwkQr2q3-d@NZS3#uqKzqxkE9X2xTw-9o5%O99r#kgqFbeuSkL7! zlg)xL1I*wca~hfeWfwIK#$b|V83vGnkGflB&dpq8fXIVz7O}s zi=4DsHUg?mZcr973id0SfWZX>CFxieg7DJ;#~XbQuYN!;U3Z{&h^5IPC1ik&+$wIb yuTZ+W0GB?tPaeLV|B>afUbQhj(DG;cBftk;#*~|?FlAi;0000Px#1ZP1_K>z@;j|==^1poj532;bRa{vGizW@LZzX3P}QzQTY0hvieK~y+Tl~YSg z0#O(}-qCqzNEv4EdW08;1x%c*s42j(^ zJMeLb;XCJ^?{P5|QqGU!-|&g$d`cc?*W@&zfPaobiJ4r=)*-Q)TtfGwjZW(gdO+a( zx*kU$(DpM&m=qxLUU|pf+E~LvEQ+{gpjofM>3qP{7~URhIITQQh%o>B2BVuF?(T4V zQ^8>1z%mUyzr3Q+Xg~`F{j4z*0SJNJOa|Fp9v7Eac(}jE%5oBmi3Ef;gMcd}Ow)v* z@55pd>2#VLGYYj`9@G*jk4ZU-kRF0dCnwQvuSdzA>?9Ncug;cjgE0ncE($&z5=|nk z>txUMv&K*aINcbwEb0Zv=leT?L}WC94mrR~O_YFT=-@PANg|ADrw$+%i9krT4~oE$ zM%V52!8wO+nB>|;h#Ux-j^s0xz?cS2(_m2b>+_Ar;31Kq;0000Px#1ZP1_K>z@;j|==^1poj532;bRa{vGizW@LZzX3P}QzQTY0gp*UK~y+TwNuSb z!ax|D?$Xj03z~Q~rbyI-F%nOjct!(J4`Di3<_J@kSvAV(7;qCyW|Xb|};u0F}<*3vfG%?4Tx7n)#RmHQH3 zy2#l{zP-7D#f22+=Mtz^%J4dE=tA(#sp8^sFi}II{R;#fccl_;i$x6j9t^{P<2ZP! z)}X3t#2Q0#uy0#@Z+8clX`py>4UKTDW>&y@Z8TjM=lAW|4p_jU>pB7+piszTE1LyT z6exs7j7i8X2=ZtNb80Mx!1v+%44qa>+{gow1Y(q+?$$wwf`nyZ$QU^1FijIY2qM-P zl7KHrrkNNOeKg;piQp)u=yZFc4T&xbgf5LR1Cd1_#KIy)AxK&YkxRt+21%el9EjJt zBPY6UfDMOGMO&d*80=3-0+hzYA}|ddOavIF?|B~j115$pO?~>Oe3(gb8ZaE?5Agb2 wL9OzH@O=5uoyz|e$IEekwrPx#1ZP1_K>z@;j|==^1poj532;bRa{vGizW@LZzX3P}QzQTY0g6dPK~y+TwNlGU z!%z@C$xXD0Z*ZZw5g#as_`q$g_yCKFpex-7uKXKa_%Vw3+WXjRskRl|w58Z++9o&G zNeqg)5nSkj;WER_nR6z=zhY-@RP4?Ui!hCa629NCnH&|ms$gWGA6BJ|YPpCe2pnE! zrGBZfF+VA0#>ddz)q&0y6OWlY)T|dIi14}ai2aL)Z!>E6eu4=PSJ&4#KRrdgZo@DV zC={OXkk3QYw6N<75`k|xl}cf0IgO*^6Wre1VsK~>eZ4&pitJb-a6N&9VZb9LYip~R znx2BHs8Ce)!5)D`pwJe-=!Z^{xyvaWyjoSN$qW*K##9tbCEBW>rL7$z|EZZgTpo8ER00000NkvXXu0mjfv=Q6{ From bee5c6d0eac5ae04e4d40ee2c12fe295ad2c02ae Mon Sep 17 00:00:00 2001 From: Vaern Date: Thu, 30 Dec 2021 13:39:27 -0800 Subject: [PATCH 04/17] merge attempt --- .../TileEntityMachineReactorSmall.java | 2 +- .../machine/TileEntityWasteDrum.java | 40 +++++-------------- 2 files changed, 10 insertions(+), 32 deletions(-) diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineReactorSmall.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineReactorSmall.java index d6d816b1b..384304a64 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineReactorSmall.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineReactorSmall.java @@ -36,7 +36,7 @@ import net.minecraft.util.AxisAlignedBB; import net.minecraftforge.common.util.ForgeDirection; //TODO: Fix all unneeded methods; fix reactor control; Add seven digit displays for total flux + heat; revamp gui; revamp breeder to rely on reactor and use total flux calcs; -public class TileEntityMachineReactorSmall extends TileEntityMachineBase implements ISidedInventory { +public class TileEntityMachineReactorSmall extends TileEntityMachineBase { public int heat; public final int maxHeat = 50000; diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityWasteDrum.java b/src/main/java/com/hbm/tileentity/machine/TileEntityWasteDrum.java index bf0b1a538..671a35436 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityWasteDrum.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityWasteDrum.java @@ -1,15 +1,12 @@ package com.hbm.tileentity.machine; -import java.util.HashMap; - import com.hbm.inventory.RecipesCommon.ComparableStack; -import com.hbm.items.ModItems; +import com.hbm.inventory.recipes.FuelPoolRecipes; import com.hbm.items.machine.ItemRBMKRod; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; 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; @@ -24,24 +21,6 @@ public class TileEntityWasteDrum extends TileEntity implements ISidedInventory { private String customName; - private static final HashMap wasteMap = new HashMap(); - static { - wasteMap.put(new ComparableStack(new ItemStack(ModItems.waste_natural_uranium, 1, 1)), new ItemStack(ModItems.waste_natural_uranium)); - wasteMap.put(new ComparableStack(new ItemStack(ModItems.waste_uranium, 1, 1)), new ItemStack(ModItems.waste_uranium)); - wasteMap.put(new ComparableStack(new ItemStack(ModItems.waste_thorium, 1, 1)), new ItemStack(ModItems.waste_thorium)); - wasteMap.put(new ComparableStack(new ItemStack(ModItems.waste_mox, 1, 1)), new ItemStack(ModItems.waste_mox)); - wasteMap.put(new ComparableStack(new ItemStack(ModItems.waste_plutonium, 1, 1)), new ItemStack(ModItems.waste_plutonium)); - wasteMap.put(new ComparableStack(new ItemStack(ModItems.waste_u233, 1, 1)), new ItemStack(ModItems.waste_u233)); - wasteMap.put(new ComparableStack(new ItemStack(ModItems.waste_u235, 1, 1)), new ItemStack(ModItems.waste_u235)); - wasteMap.put(new ComparableStack(new ItemStack(ModItems.waste_schrabidium, 1, 1)), new ItemStack(ModItems.waste_schrabidium)); - - wasteMap.put(new ComparableStack(new ItemStack(ModItems.waste_plate_u233, 1, 1)), new ItemStack(ModItems.waste_plate_u233)); - wasteMap.put(new ComparableStack(new ItemStack(ModItems.waste_plate_u235, 1, 1)), new ItemStack(ModItems.waste_plate_u235)); - wasteMap.put(new ComparableStack(new ItemStack(ModItems.waste_plate_mox, 1, 1)), new ItemStack(ModItems.waste_plate_mox)); - wasteMap.put(new ComparableStack(new ItemStack(ModItems.waste_plate_pu239, 1, 1)), new ItemStack(ModItems.waste_plate_pu239)); - wasteMap.put(new ComparableStack(new ItemStack(ModItems.waste_plate_sa326, 1, 1)), new ItemStack(ModItems.waste_plate_sa326)); - } - public TileEntityWasteDrum() { slots = new ItemStack[12]; } @@ -114,7 +93,7 @@ public class TileEntityWasteDrum extends TileEntity implements ISidedInventory { @Override public boolean isItemValidForSlot(int i, ItemStack itemStack) { - return wasteMap.keySet().contains(new ComparableStack(itemStack)) || itemStack.getItem() instanceof ItemRBMKRod; + return FuelPoolRecipes.recipes.keySet().contains(new ComparableStack(itemStack)) || itemStack.getItem() instanceof ItemRBMKRod; } @Override @@ -177,10 +156,9 @@ public class TileEntityWasteDrum extends TileEntity implements ISidedInventory { } @Override - public int[] getAccessibleSlotsFromSide(int p_94128_1_) - { - return slots_arr; - } + public int[] getAccessibleSlotsFromSide(int p_94128_1_) { + return slots_arr; + } @Override public boolean canInsertItem(int i, ItemStack itemStack, int j) { @@ -192,7 +170,7 @@ public class TileEntityWasteDrum extends TileEntity implements ISidedInventory { if(itemStack.getItem() instanceof ItemRBMKRod) { return ItemRBMKRod.getCoreHeat(itemStack) < 50 && ItemRBMKRod.getHullHeat(itemStack) < 50; } else { - return wasteMap.containsValue(getStackInSlot(i)); + return !FuelPoolRecipes.recipes.containsKey(getStackInSlot(i)); } } @@ -226,8 +204,8 @@ public class TileEntityWasteDrum extends TileEntity implements ISidedInventory { } else if(worldObj.rand.nextInt(r) == 0) { ComparableStack comp = new ComparableStack(getStackInSlot(i)); - if(wasteMap.keySet().contains(comp)) { - slots[i] = wasteMap.get(comp).copy(); + if(FuelPoolRecipes.recipes.containsKey(comp)) { + slots[i] = FuelPoolRecipes.recipes.get(comp).copy(); } } } @@ -235,4 +213,4 @@ public class TileEntityWasteDrum extends TileEntity implements ISidedInventory { } } } -} +} \ No newline at end of file From f4650eeb4567567ebd1d2d02f734cfcd93cdb0a4 Mon Sep 17 00:00:00 2001 From: Vaern Date: Thu, 30 Dec 2021 22:37:30 -0800 Subject: [PATCH 05/17] more small reactor funnies --- .../ContainerMachineReactorSmall.java | 29 +- .../container/ContainerReactorZirnox.java | 14 +- .../inventory/gui/GUIMachineReactorSmall.java | 105 +++-- .../hbm/inventory/gui/GuiInfoContainer.java | 377 +++++++++++++++++- .../inventory/recipes/FuelPoolRecipes.java | 21 +- src/main/java/com/hbm/items/ModItems.java | 2 +- src/main/java/com/hbm/lib/Library.java | 24 ++ .../java/com/hbm/packet/AuxButtonPacket.java | 7 - .../render/tileentity/RenderSmallReactor.java | 12 +- .../TileEntityMachineReactorSmall.java | 154 ++++--- .../hbm/textures/gui/gauges/seven_segment.png | Bin 0 -> 656 bytes .../textures/gui/gui_reactor_experimental.png | Bin 3273 -> 1939 bytes 12 files changed, 612 insertions(+), 133 deletions(-) create mode 100644 src/main/resources/assets/hbm/textures/gui/gauges/seven_segment.png diff --git a/src/main/java/com/hbm/inventory/container/ContainerMachineReactorSmall.java b/src/main/java/com/hbm/inventory/container/ContainerMachineReactorSmall.java index f488949a7..228493ccb 100644 --- a/src/main/java/com/hbm/inventory/container/ContainerMachineReactorSmall.java +++ b/src/main/java/com/hbm/inventory/container/ContainerMachineReactorSmall.java @@ -45,33 +45,28 @@ private TileEntityMachineReactorSmall seleniumEngine; } @Override - public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2) + public ItemStack transferStackInSlot(EntityPlayer player, int index) { ItemStack var3 = null; - Slot var4 = (Slot) this.inventorySlots.get(par2); + Slot slot = (Slot) this.inventorySlots.get(index); - if (var4 != null && var4.getHasStack()) - { - ItemStack var5 = var4.getStack(); - var3 = var5.copy(); + if (slot != null && slot.getHasStack()) { + ItemStack stack = slot.getStack(); + var3 = stack.copy(); - if (par2 <= 12) { - if (!this.mergeItemStack(var5, 13, this.inventorySlots.size(), true)) + if (index <= 12) { + if (!this.mergeItemStack(stack, 13, this.inventorySlots.size(), true)) { return null; } } else { - if (!this.mergeItemStack(var5, 0, 13, true)) + if (!this.mergeItemStack(stack, 0, 13, true)) return null; } - - if (var5.stackSize == 0) - { - var4.putStack((ItemStack) null); - } - else - { - var4.onSlotChanged(); + if (stack.stackSize == 0) { + slot.putStack((ItemStack) null); + } else { + slot.onSlotChanged(); } } diff --git a/src/main/java/com/hbm/inventory/container/ContainerReactorZirnox.java b/src/main/java/com/hbm/inventory/container/ContainerReactorZirnox.java index 73b2dba28..3790369af 100644 --- a/src/main/java/com/hbm/inventory/container/ContainerReactorZirnox.java +++ b/src/main/java/com/hbm/inventory/container/ContainerReactorZirnox.java @@ -89,23 +89,15 @@ public class ContainerReactorZirnox extends Container { if(!this.mergeItemStack(stack, 25, 26, true)) return null; - } else { - - if(stack.getItem() instanceof ItemZirnoxRod) { - - if(!this.mergeItemStack(stack, 0, 24, true)) - return null; - } - } + } else if(!this.mergeItemStack(stack, 0, 24, true)) + return null; } - - if (stack.stackSize == 0) { + if (stack.stackSize == 0) { slot.putStack((ItemStack) null); } else { slot.onSlotChanged(); } } - return var3; } diff --git a/src/main/java/com/hbm/inventory/gui/GUIMachineReactorSmall.java b/src/main/java/com/hbm/inventory/gui/GUIMachineReactorSmall.java index 936a33c11..d2c42aad9 100644 --- a/src/main/java/com/hbm/inventory/gui/GUIMachineReactorSmall.java +++ b/src/main/java/com/hbm/inventory/gui/GUIMachineReactorSmall.java @@ -1,37 +1,63 @@ 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.ContainerMachineReactorSmall; 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.TileEntityMachineReactorSmall; 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 GUIMachineReactorSmall extends GuiInfoContainer { private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_reactor_experimental.png"); private TileEntityMachineReactorSmall reactor; + private final NumberDisplay[] displays = new NumberDisplay[2]; + + private GuiTextField field; - public GUIMachineReactorSmall(InventoryPlayer invPlayer, TileEntityMachineReactorSmall tedf) { - super(new ContainerMachineReactorSmall(invPlayer, tedf)); - reactor = tedf; - + public GUIMachineReactorSmall(InventoryPlayer invPlayer, TileEntityMachineReactorSmall te) { + super(new ContainerMachineReactorSmall(invPlayer, te)); + reactor = te; this.xSize = 176; this.ySize = 222; + displays[0] = new NumberDisplay(12, 19).setDigitLength(4); + displays[1] = new NumberDisplay(12, 55).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 + 11, guiTop + 86, 35, 9); + this.field.setTextColor(0x00ff00); + this.field.setDisabledTextColour(0x008000); + this.field.setEnableBackgroundDrawing(false); + this.field.setMaxStringLength(3); } @Override public void drawScreen(int mouseX, int mouseY, float f) { super.drawScreen(mouseX, mouseY, f); - this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 80, guiTop + 120, 88, 4, new String[] { "Core Temperature:", " " + Math.round((reactor.heat) * 0.00002 * 480 + 20) + "°C" }); + this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 80, guiTop + 120, 88, 4, new String[] { "Core Temperature:", " " + Math.round((reactor.heat) * 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", @@ -50,27 +76,42 @@ public class GUIMachineReactorSmall extends GuiInfoContainer { "using the button next to the", "fluid gauges." }; this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36 + 16, 16, 16, guiLeft - 8, guiTop + 36 + 16, text1); - - String[] text5 = new String[] { reactor.retracting ? "Raise control rods" : "Lower control rods"}; - this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 52, guiTop + 53, 18, 18, mouseX, mouseY, text5); } @Override protected void drawGuiContainerForegroundLayer(int i, int j) { String name = this.reactor.hasCustomInventoryName() ? this.reactor.getInventoryName() : I18n.format(this.reactor.getInventoryName()); + final String[] labels = { "Flux", "Heat", "Control Rods" }; - this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752); + this.fontRendererObj.drawString(name, 124 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752); this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752); + this.fontRendererObj.drawString(labels[0], 11, 9, 15066597); + this.fontRendererObj.drawString(labels[1], 11, 45, 15066597); + this.fontRendererObj.drawString(labels[2], 9, 74, 4210752); } - 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) { + protected void mouseClicked(int mouseX, int mouseY, int i) { + super.mouseClicked(mouseX, mouseY, i); + this.field.mouseClicked(mouseX, mouseY, i); + + if(guiLeft + 51 <= mouseX && guiLeft + 51 + 12 > mouseX && guiTop + 84 < mouseY && guiTop + 84 + 12 >= mouseY) { + + double level; - mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F)); - PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(reactor.xCoord, reactor.yCoord, reactor.zCoord, reactor.retracting ? 0 : 1, 0)); - } + 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); + + 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 @@ -80,7 +121,7 @@ public class GUIMachineReactorSmall extends GuiInfoContainer { drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); - if(reactor.hasHeat()) { + if(reactor.heat > 0) { int i = reactor.getHeatScaled(88); i = (int) Math.min(i, 160); @@ -88,22 +129,38 @@ public class GUIMachineReactorSmall extends GuiInfoContainer { drawTexturedModalRect(guiLeft + 80, guiTop + 120, 0, 230, i, 4); } - if(!reactor.retracting) - drawTexturedModalRect(guiLeft + 52, guiTop + 53, 212, 0, 18, 18); - - if(reactor.rods >= reactor.rodsMax) { + if(reactor.level >= 100) { 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(reactor.rods > 0) { + } else if(reactor.level > 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); - } + } + + for(byte i = 0; i < 2; i++) + displays[i].drawNumber(reactor.getDisplayData()[i]); this.drawInfoPanel(guiLeft - 16, guiTop + 36, 16, 16, 2); this.drawInfoPanel(guiLeft - 16, guiTop + 36 + 16, 16, 16, 3); + + this.field.drawTextBox(); + } + + @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/GuiInfoContainer.java b/src/main/java/com/hbm/inventory/gui/GuiInfoContainer.java index c408ef126..5c62c97e3 100644 --- a/src/main/java/com/hbm/inventory/gui/GuiInfoContainer.java +++ b/src/main/java/com/hbm/inventory/gui/GuiInfoContainer.java @@ -1,18 +1,34 @@ package com.hbm.inventory.gui; +import java.math.BigDecimal; +import java.math.RoundingMode; import java.util.Arrays; +import javax.annotation.Nonnegative; + +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"); + protected static final ResourceLocation numDisplays = new ResourceLocation(RefStrings.MODID, "textures/gui/gauges/seven_segment.pn"); + /** Default text color **/ + public static final int color0 = 4210752; + /** Green computer color **/ + public static final int color1 = 0x00ff00; + public static final char slimCursor = '\u2502'; + public static final char blockCursor = '\u2588'; + public static final ResourceLocation keyboard = new ResourceLocation(RefStrings.MODID, "misc.keyPress"); public GuiInfoContainer(Container p_i1072_1_) { super(p_i1072_1_); @@ -81,5 +97,364 @@ 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 X coordinate of the reference **/ + private int referenceX = 10; + /** The Y coordinate of the reference **/ + private int referenceY = 18; + /** 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 Color to use, invalid enums will default to yellow + */ + public NumberDisplay(int x, int y, EnumChatFormatting c) + { + this(x, y); + setupColor(c); + } + /** + * 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; + } + public void setupColor(EnumChatFormatting c) + { + byte row = 4, column = 3; + switch (c) + { + case OBFUSCATED: + case RESET: + case STRIKETHROUGH: + case UNDERLINE: + break; + default: + column = (byte) (c.ordinal() % 4); + row = (byte) Math.floorDiv(c.ordinal(), 4); + break; + } +// System.out.println(column); +// System.out.println(row); + referenceY = 6 * row; + referenceX = 5 * column; + } + /** + * 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() + { +// System.out.println(referenceX); +// System.out.println(referenceY); + mc.getTextureManager().bindTexture(numDisplays); + 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) + { +// System.out.println(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, referenceX + 1, referenceY, 4, 1); + //System.out.println(referenceX + 1 + ", " + referenceY + ", " + pos); + } + + private void drawPeriod() + { + renderSegment(guiLeft + displayX + dispOffset + padding - (int) Math.ceil(padding / 2) + 5, guiTop + displayY + 12, referenceX + 1, referenceY, 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, referenceX, referenceY + 1, 1, 5); + } + /** + * drawTexturedModalRect() for cool kids + * @param renX X coordinate to render the part + * @param renY Y coordinate to render the part + * @param refX X coordinate of the reference + * @param refY Y coordinate of the reference + * @param width Relevant for horizontals + * @param height Relevant for verticals + */ + private void renderSegment(int renX, int renY, int refX, int refY, int width, int height) + { + final Tessellator tess = Tessellator.instance; + final float z = GuiInfoContainer.this.zLevel; + tess.startDrawingQuads(); + tess.addVertexWithUV(renX, renY + height, z, refX, (refY + height)); + tess.addVertexWithUV(renX + width, renY + height, z, (refX + width), (refY + height)); + tess.addVertexWithUV(renX + width, renY + 0, z, (refX + width), refY); + tess.addVertexWithUV(renX, renY, z, refX, refY); + tess.draw(); + } + + 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/FuelPoolRecipes.java b/src/main/java/com/hbm/inventory/recipes/FuelPoolRecipes.java index c8b96be7e..10aa0e13d 100644 --- a/src/main/java/com/hbm/inventory/recipes/FuelPoolRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/FuelPoolRecipes.java @@ -12,13 +12,18 @@ 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)); } } diff --git a/src/main/java/com/hbm/items/ModItems.java b/src/main/java/com/hbm/items/ModItems.java index 39e076147..9855ed480 100644 --- a/src/main/java/com/hbm/items/ModItems.java +++ b/src/main/java/com/hbm/items/ModItems.java @@ -3590,7 +3590,7 @@ public class ModItems { plate_fuel_u235 = new ItemPlateFuel(1100000).setFunction(FunctionEnum.SQUARE_ROOT, 40).setUnlocalizedName("plate_fuel_u235").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":plate_fuel_u235"); plate_fuel_mox = new ItemPlateFuel(1400000).setFunction(FunctionEnum.LOGARITHM, 50).setUnlocalizedName("plate_fuel_mox").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":plate_fuel_mox"); plate_fuel_pu239 = new ItemPlateFuel(1000000).setFunction(FunctionEnum.NEGATIVE_QUADRATIC, 25).setUnlocalizedName("plate_fuel_pu239").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":plate_fuel_pu239"); - plate_fuel_sa326 = new ItemPlateFuel(1000000).setFunction(FunctionEnum.LINEAR, 40).setUnlocalizedName("plate_fuel_sa326").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":plate_fuel_sa326"); + plate_fuel_sa326 = new ItemPlateFuel(1000000).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"); diff --git a/src/main/java/com/hbm/lib/Library.java b/src/main/java/com/hbm/lib/Library.java index db0f3e45b..e33e847fc 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; @@ -82,6 +86,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(); diff --git a/src/main/java/com/hbm/packet/AuxButtonPacket.java b/src/main/java/com/hbm/packet/AuxButtonPacket.java index 865f59afc..138fe1bca 100644 --- a/src/main/java/com/hbm/packet/AuxButtonPacket.java +++ b/src/main/java/com/hbm/packet/AuxButtonPacket.java @@ -81,13 +81,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 (te instanceof TileEntityRadioRec) { TileEntityRadioRec radio = (TileEntityRadioRec)te; diff --git a/src/main/java/com/hbm/render/tileentity/RenderSmallReactor.java b/src/main/java/com/hbm/render/tileentity/RenderSmallReactor.java index 55e9e6709..def7347f2 100644 --- a/src/main/java/com/hbm/render/tileentity/RenderSmallReactor.java +++ b/src/main/java/com/hbm/render/tileentity/RenderSmallReactor.java @@ -1,5 +1,7 @@ package com.hbm.render.tileentity; +import java.util.Random; + import org.lwjgl.opengl.GL11; import com.hbm.main.ResourceManager; @@ -23,16 +25,18 @@ public class RenderSmallReactor extends TileEntitySpecialRenderer { 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, (double) reactor.rods / reactor.rodsMax, 0.0D); + GL11.glTranslated(0.0D, level, 0.0D); bindTexture(ResourceManager.reactor_small_rods_tex); ResourceManager.reactor_small_rods.renderAll(); GL11.glPopMatrix(); - if(reactor.hasHeat() && 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.02F) + 0.125F * (reactor.totalFlux / 1000F)); double top = 1.375; double bottom = 1.375; diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineReactorSmall.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineReactorSmall.java index 384304a64..5057def76 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineReactorSmall.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineReactorSmall.java @@ -10,6 +10,7 @@ import com.hbm.blocks.machine.MachineReactorSmall; 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; @@ -17,6 +18,7 @@ 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; @@ -33,22 +35,24 @@ 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 all unneeded methods; fix reactor control; Add seven digit displays for total flux + heat; revamp gui; revamp breeder to rely on reactor and use total flux calcs; -public class TileEntityMachineReactorSmall extends TileEntityMachineBase { - +//TODO: fix reactor control; revamp gui; revamp breeder to rely on reactor and use total flux calcs; +public class TileEntityMachineReactorSmall 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 final int maxHeat = 50000; - public int rods; - public static final int rodsMax = 50; - public boolean retracting = true; public int[] slotFlux = new int[12]; - int totalFlux = 0; - - private static final int[] slots_top = new int[] { 0 }; - private static final int[] slots_bottom = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15 }; - private static final int[] slots_side = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14 }; + 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 TileEntityMachineReactorSmall() { super(12); @@ -79,21 +83,21 @@ public class TileEntityMachineReactorSmall extends TileEntityMachineBase { public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); heat = nbt.getInteger("heat"); - rods = nbt.getInteger("rods"); - retracting = nbt.getBoolean("ret"); + level = nbt.getDouble("level"); + targetLevel = nbt.getDouble("targetLevel"); } @Override public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); nbt.setInteger("heat", heat); - nbt.setInteger("rods", rods); - nbt.setBoolean("ret", retracting); + nbt.setDouble("level", level); + nbt.setDouble("targetLevel", targetLevel); } @Override public int[] getAccessibleSlotsFromSide(int side) { - return side == 0 ? slots_bottom : (side == 1 ? slots_top : slots_side); + return slot_io; } @Override @@ -110,45 +114,17 @@ public class TileEntityMachineReactorSmall extends TileEntityMachineBase { return (heat * i) / maxHeat; } - public boolean hasHeat() { - return heat > 0; - } - @Override public void updateEntity() { + + rodControl(); if(!worldObj.isRemote) { + totalFlux = 0; - if(retracting && rods > 0) { - - if(rods == rodsMax) - this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.reactorStart", 1.0F, 0.75F); - - rods --; - if(rods == 0) - this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.reactorStop", 1.0F, 1.0F); - } - if(!retracting && rods < rodsMax) { - - if(rods == 0) - this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.reactorStart", 1.0F, 0.75F); - - rods ++; - - if(rods == rodsMax) - this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.reactorStop", 1.0F, 1.0F); - } - - if(rods > rodsMax) - rods = rodsMax; - if(rods < 0) - rods = 0; - - if(rods > 0) + if(level > 0) { reaction(); - for(byte i = 0; i < slotFlux.length; i++) { - totalFlux += slotFlux[i]; - } + } getInteractions(); @@ -169,25 +145,28 @@ public class TileEntityMachineReactorSmall extends TileEntityMachineBase { this.explode(); } - if(rods > 0 && heat > 0 && !(blocksRad(xCoord + 1, yCoord + 1, zCoord) && blocksRad(xCoord - 1, yCoord + 1, zCoord) && blocksRad(xCoord, yCoord + 1, zCoord + 1) && blocksRad(xCoord, yCoord + 1, zCoord - 1))) { + //change to 3D rad like demon-core + 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.setInteger("rods", rods); - data.setBoolean("ret", retracting); + 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.rods = data.getInteger("rods"); - this.retracting = data.getBoolean("ret"); + this.level = data.getDouble("level"); + this.targetLevel = data.getDouble("targetLevel"); this.slotFlux = data.getIntArray("slotFlux"); + this.totalFlux = data.getInteger("totalFlux"); } private byte getWater() { @@ -241,7 +220,7 @@ public class TileEntityMachineReactorSmall extends TileEntityMachineBase { TileEntityMachineReactor reactor = (TileEntityMachineReactor) tile; - if(reactor.charge <= 1 && this.heat > 0) { + if(reactor.charge <= 1 && this.totalFlux > 0) { reactor.charge = 1; reactor.heat = (int) Math.floor(heat * 4 / maxHeat) + 1; } @@ -297,16 +276,18 @@ public class TileEntityMachineReactorSmall extends TileEntityMachineBase { private void reaction() { for(byte i = 0; i < 12; i++) { - if(slots[i] == null) + 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] + 10); - rod.setLifeTime(slots[i], rod.getLifeTime(slots[i]) + outFlux); + int outFlux = rod.react(worldObj, slots[i], slotFlux[i] + 1); this.heat += outFlux * 2; slotFlux[i] = 0; + totalFlux += outFlux; int[] neighborSlots = getNeighboringSlots(i); @@ -315,13 +296,15 @@ public class TileEntityMachineReactorSmall extends TileEntityMachineBase { } for(byte j = 0; j < neighborSlots.length; j++) { - slotFlux[neighborSlots[j]] += outFlux * (rods / rodsMax); + 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; } } @@ -361,7 +344,58 @@ public class TileEntityMachineReactorSmall extends TileEntityMachineBase { } } } - + + //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.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.reactorStop", 1.0F, 1.0F); + + 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() { diff --git a/src/main/resources/assets/hbm/textures/gui/gauges/seven_segment.png b/src/main/resources/assets/hbm/textures/gui/gauges/seven_segment.png new file mode 100644 index 0000000000000000000000000000000000000000..a43f80efbd16d47afa55d3e22bc06ea355f9c5da GIT binary patch literal 656 zcmV;B0&o3^P)EX>4Tx04R}tkv&MmKpe$iQ>CI62P=w-WT;LSL`5963Pq?8YK2xEOfLNpnlvOS zE{=k0!NHHks)LKOt`4q(Aou~|=H{g6A|?K>DYS_3;J6>}?mh0_0Yas~G^=F{&~)2O z#G+yd?N7-GfbO!op@@~ zHaPDShge=#iO-2gO}ZfQBi9v|-#F)LEbz>bnM}+Phls^o6Dv*3@}@>SNgP%+o$`g0 z%PQwB&RU_w>i6U?3}*D@C9cyPL<|d9gai=^O4vXFHX^j@q*zGMe$>O?U-L`kQpmLd zMvi$Dp+TxQQ60hc>K-;*Jma!vBn6tY?1{fxdT4RqfE?W=BY^?jT^07>d9eghmF z0wX!fUh{Z&TXS#!o~ifu1BAqKt~o-9I{*Lx24YJ`L;(K)RRI5VQhy}?000SaNLh0L z01FcU01FcV0GgZ_00007bV*G`2jvSD7bz_Dz3|Wg004|hL_t(I%k9d$C$13)P| z+C$nyDg_n7WvBwBPN%|u5bFv1BT$wlQPxWk<-KzZ=NNE|0hq=<`0@M0L9To62Ty=y zFo~oLh6$F#)Sz60vIgaP%J-BbVmoekGeVY;A?vXj+Iz>?%5-KLdeT$Ar7VMCH)Swv qQnJ5HP!6L(S%b2Vt?Vh^82kdLH&~m2r_mw+0000Y9Hp!e6hl>~<6|Q09pW!w*#Ng|BJ5! zN&plOC=O68pcp`EKv94q0jU5f0c`-J0JI*E9MC#IQb20}1p$%(@&_aaBm%Sw&`Lln z00{y40P+Up35XBqeLzbAxdGw<;sW{`pv8ck0XYG31hfDU2ar7=7NGfnYyr&$WDST8 zhz7_K5ET%Glm)|8>1xsir>gt7Oo4=Za?gKSAeW1YwQbK2E>&hRR=HRpI+D?$#kKvUY)+VrBpPh&O?zO6s{ zo?f`3nmrKG^HIRj>wY0DH=HY#ZHV2ok~8P#cGk$*#d%9m+OdO7V)Tx_x!L++NI@~3 zNt6YM1B19MFM6tnM`fpRvsV8&d!eO-v5(AL8&)Z zAKA6lFkk(AHQ%w{X(<;i&#J>OSHxQ>6NS25=s-z<#0av%`YcG7cD;&BP~!O{tQ>H;$Q1-{hc7V-3PZCy7bRJJ>NJi%Gh=`G0#6y>#zsN!QXyD4dr_zHhlwGL+}zke%h6XTV)Yr`JsP=fn! zFBa959^^`BOIq)0vP&yAe{Xb3+FIk`i@#~>B?cY+FqQ}#YY^}Z_QZvztmjq>bHj-x zJ^7rR4a8d0mR~Ys?1^yQN8`H+D7K+~SYP*kN=-!;rKS|e)uA?ckQ;tGny5DF?|5v+ zha_5^2bRu1eYfV3<5Al($S>B}+=#Gqp*lQ!rNLBet0K;ei<>Z?usvhpx294GwI|DA z@0&ByRI0+rpktmY`64N)zpnx+j!7BGk?3?TS*W2VQ=pworagZLJDKG?eNs97V1diE z$Q{|VCG!M5-dd`sI$V;Jf2>v!&6lgs-K?-MSFe%fY%wHy$8cS}!`;h6 z9FMt#V}5i>>QY6k>b_=;Jx|mu2}; zFbv)|0J)#^n(8qtx=5SIgM}(N`1IWNgH@?gXMOOqeX_Ci{M?PL6&6;VA%YS&{ebNS zV!~UAl`ph+1rmy<<89n-$$#H3c6ZCO zB>%---bG#03wmFz)^Xk`ha-+n_AD2R*|hTBlP9K!Uy;poy+`FtRXwIa8XOMuen!PL~|fH5Pv91>wOo3 z!XwNRU>+5~)e}rIZ?>&wR$_bW9MAh9{jKp!uJuqUtLPa0Q9J|o=R6XGv`Os+kA^Q= zDg23l+9q$a{P4gz@}c~C9dTe!qrI8Rto=@C27_h0je8?}ts49CldUvi!+|>Ap7|<} zsAR2eO_2;Ut6BSfBWFQqg2LhRt~G>kCL~24gWJtM)RMt~enWzlJA@bO2#5Nos##{{ zD@?z(_#d2Hbg6$+wEI5%8b*F3?onQgX*|zX!|^UPUKf2NRL) zIBt;I(?wq`Wf7hmc|+MRMzu}J4<24$dwdy6eRQkmd~els+Vtcy!M2~8jK6#x(V#)Q zMmzu2*fQAo+l}eB^ZvRr?d907!|#5eHyOwKUyLq`ntJv8(O`8{bH?<~cUEf#uk1yp ztJ&Js8B;GGw{+=S(*E9Nikn9=dqR^z=T30| literal 3273 zcmbVPc{E$=7C*+|5kpJc7#l7{6;-N+h+cXrO3l=Cs}*XVf)dj9wuzxsX=%mK)tYLa zVk%N&c?ea+JOxF9m}f7&cdfp@``%mkt@r)2zq7xy_HTcC|MounM4H_Ag^L5i0RRA( zzMhUL05H(E3;-J|UD)~MxX=Z&|5bf+Hu?%_`M^ZGKqMVO%5Wl-3c(?4V*X=4wp0HE?c)fOmEoJrqHAsj=c@! zY-&%T;Paq>p(;jTuQ70pH1l3c)y&sJhY>DcT`23=9kV4f`+V^I- zknYIEsi%t(6D^rn*=w04tREt85=73!FhXDylE`@E~G2YgjD6Rt28hDDyG zo3;W7v82`UV~IilXsKc>Mn?v{2uVXwsJZxxYy)~YCl(G50&U^}f#}CrYzLDhImDrW z+BQ?tn_}+aZu~O;PN2WPI23A}4tpUQ+mIA@IMZ*WS-)~hvf7nVwsNd!_OjN*=*T$?`z< zEjwZ3RZ4f9Ok;OLL&JohK@CP02yh_L5M@J)j&0So)8L2j`sZ$xe4Nnhn6{Ztl92}@ zp@UsaV;?h-^0f-Jcz~CK_Reo<+~05&@Aeym(@>7Emotqh${qq=d=H}V+PtPS&^~@4 z;BZ#8;K-{SWRnkJ+?e8U3iOG_;__D{1dS#AR7ru={$Ioa~+waum-@ZMtq^|vO2rpnT+*JN+i!6G|$GX<_ z1eMYrY=41mw_ZNF&+Lq`WC_#0g~7}%BWio<%i6lJDhX}`cO%s_o7)VZSED6pA;Oqw z#MrA898l|uBiq!QAr7%qKIbq@p#t$eU(!b1s&TQ&>c4xqjfnotE=DPCn(`56_Zay# zTJ64-dU&E|zsK;SORY};-Be@>grGuXQpg_Q$%xIL`Z=lX*wt#Pd~|7$epgY^!Ql%y z&2u3JVb?TFQ?i$IwFik1t>&;f)Ctc zdCu_{)+bCtR!G2+aw`h^uD!3PCMD|N?Y?&ag>+wII&XS^2qn# z`Do}WfrQNM!$eY_ub_$_i$k?}n4zUtG8G|D$x;(x34)U!7u+bc?F4-a?GhV#b+t!N zXk@t%^7NWz0q$+4<`ie+>}=+zF~yiD4h+y9YqPnTH4P|amp}-MoDTly-DJRMqo+Rs zW(c1`X7t=?W1zhxv|p(*R~0BdV+`PSA1r6E0_U!A0VXjJdif{=aK(E7`t}!k_2e)B zQ8$@@lW)Jj0O!IN;C>D@v0S+aXzeZ64)2Hi`=0d+ci2%AwCY}P4(-7?3;^SHc3+0) zle{N7x5NyJ+<{(j z8uE!&ZJm8x>lX_+WimGGbaU{<_@<9e^XX9rq0fHN<;viXG=BIB-xsAk{OIIkcBdIb z+_V0h3C=-gzCg0`LBfMlyb^!*2@mz!UXeRr1GzF>V;s%Ja~ii%Hn_Bo;ER#Mq#|3$ z#AgxmO$#R1_lxP5gut^t3Rum-xsOJn&oZ}Hn6M5k8$4$kJy z8rEkz7|^tNKL9ju7P79+O<%1K+s6;U=p1?B??I1BUju}&yW1_WUhFxGgH?jMOz0R7 zJ!R*6L=wM6EI&vY07jM^xd6hzzbE7`GIstlL$d9etRmS?(pG4%Na8G3kB9jI)+1b} zESKMYZoN8Q6=i>>^>Trma!)Le7s&YE}f zp#uv1Ah>cSAH3HZb`WwCq(Xnxyd{Oc`1r#I#fDr}yubbBttu)_fvOF;2XOt7y@)HZ z=LP;Y?CchLN%jSRzaqG@rmSKsJPL(MNd-AVFQysB7#8)4B%AMX5Y{!sQ~S(?+~v3_ zJ>{vE`Mo0VayBg|T|tFP4wva*S8h2nNKEu5S&{#~M97-9?!uP|Qngu~b>U{I6=kX6 z?c1nVa^6m_JN72Sl~3o7H(n2=xWyq`msu|bwk~hHig5e(6>;JTE$n)fLg!L0Gmk@k zc3{tkbY=cF7rby!Imj(o6v(h%I13-A*4^zMrWaODp(z*op=b|xKHD9Jks}zs0@QW0 z4r7(DF7YGSh>i>_HZd==A&-whj&L?Ug{wYVEuUo5k*HN-{19KT2#wkW!(q#^9K%F2?#Fj}8+P#-)KHowjSu~;Y|KvNK3OOqC}rjrv#x9>rGhIVzA`Lr*x z1NIiXNT+cyXTZb&yVJ->K&3rzj+aoMUp9lcw-N?`Cn;~yChZf|xspHAG>Hks5Tb@! z46_MS8PMe{kYUqm$;>x&R61rZBp61ME(45i)0K7%=lO3i)rZSLp+_`Y_Xz8y$NUfc zwrXFq+9AW^Yjxm!aK~aOPe$@0{{y^dQbZU|joC>6uurOm@;HfGGGD~7Xag;J^!6k{ zZ&QB^5+*Us^!CLFoD`>bt9W|X`qT0GZR8|45?u%tozXIiB))s@7maH<$GV-=PQElgc z(B0jwqeCCTOv%fquj%Hq=?E>&6hlq?zg6^qaQZJ0za6(m!JA89;MYxmNLfZ@4F3bH zGfK#k`5yRN7ysYF^JgS$Uaaaso3_876*HqpGo8dg#>FohozGz?BseW$#q#9Jx9!r5 z3C;`r^ZyUWpZq(VHUH_YqGJF0+9aoDZJ|R@E?m*#l`>t From e0fb379b530897570af47d6fc87b61494197885b Mon Sep 17 00:00:00 2001 From: Vaern Date: Fri, 31 Dec 2021 23:20:59 -0800 Subject: [PATCH 06/17] breeding reactor funnies --- src/main/java/com/hbm/blocks/ModBlocks.java | 31 +- .../com/hbm/blocks/generic/BlockCrate.java | 2 +- ...actor.java => MachineReactorBreeding.java} | 127 +-- ...ReactorSmall.java => ReactorResearch.java} | 14 +- .../java/com/hbm/entity/mob/EntityFBI.java | 2 - src/main/java/com/hbm/handler/GUIHandler.java | 24 +- ...Handler.java => BreederRecipeHandler.java} | 260 +++--- .../ContainerMachineReactorBreeding.java | 69 ++ .../inventory/container/ContainerReactor.java | 73 -- ...all.java => ContainerReactorResearch.java} | 36 +- ...or.java => GUIMachineReactorBreeding.java} | 143 ++-- ...ctorSmall.java => GUIReactorResearch.java} | 103 +-- .../hbm/inventory/gui/GuiInfoContainer.java | 7 - .../inventory/recipes/AssemblerRecipes.java | 37 +- .../hbm/inventory/recipes/BreederRecipes.java | 206 ++--- .../inventory/recipes/anvil/AnvilRecipes.java | 5 +- src/main/java/com/hbm/items/ModItems.java | 25 +- .../hbm/items/machine/ItemReactorSensor.java | 3 +- .../com/hbm/items/special/ItemStarterKit.java | 10 +- src/main/java/com/hbm/lib/Library.java | 6 - src/main/java/com/hbm/main/ClientProxy.java | 4 +- .../java/com/hbm/main/CraftingManager.java | 2 +- src/main/java/com/hbm/main/MainRegistry.java | 3 +- .../com/hbm/main/ModEventHandlerClient.java | 7 +- src/main/java/com/hbm/main/NEIConfig.java | 6 +- .../java/com/hbm/packet/AuxButtonPacket.java | 2 +- .../java/com/hbm/packet/AuxGaugePacket.java | 2 +- .../hbm/render/item/ItemRenderLibrary.java | 6 +- .../hbm/render/tileentity/RenderBreeder.java | 6 +- .../render/tileentity/RenderSmallReactor.java | 6 +- .../java/com/hbm/tileentity/TileMappings.java | 4 +- .../tileentity/machine/TileEntityITER.java | 2 +- .../machine/TileEntityMachineReactor.java | 270 ------ .../TileEntityMachineReactorBreeding.java | 204 +++++ .../machine/TileEntityNukeFurnace.java | 84 +- ...ll.java => TileEntityReactorResearch.java} | 796 +++++++++--------- src/main/resources/assets/hbm/lang/en_US.lang | 13 +- .../textures/gui/gui_reactor_experimental.png | Bin 1939 -> 1970 bytes .../textures/gui/processing/gui_breeder.png | Bin 1900 -> 1211 bytes .../gui/reactors/gui_research_reactor.png | Bin 0 -> 3659 bytes .../assets/hbm/textures/items/crt_display.png | Bin 0 -> 298 bytes 41 files changed, 1216 insertions(+), 1384 deletions(-) rename src/main/java/com/hbm/blocks/machine/{MachineReactor.java => MachineReactorBreeding.java} (71%) rename src/main/java/com/hbm/blocks/machine/{MachineReactorSmall.java => ReactorResearch.java} (86%) rename src/main/java/com/hbm/handler/nei/{ReactorRecipeHandler.java => BreederRecipeHandler.java} (61%) create mode 100644 src/main/java/com/hbm/inventory/container/ContainerMachineReactorBreeding.java delete mode 100644 src/main/java/com/hbm/inventory/container/ContainerReactor.java rename src/main/java/com/hbm/inventory/container/{ContainerMachineReactorSmall.java => ContainerReactorResearch.java} (56%) rename src/main/java/com/hbm/inventory/gui/{GUIMachineReactor.java => GUIMachineReactorBreeding.java} (58%) rename src/main/java/com/hbm/inventory/gui/{GUIMachineReactorSmall.java => GUIReactorResearch.java} (53%) delete mode 100644 src/main/java/com/hbm/tileentity/machine/TileEntityMachineReactor.java create mode 100644 src/main/java/com/hbm/tileentity/machine/TileEntityMachineReactorBreeding.java rename src/main/java/com/hbm/tileentity/machine/{TileEntityMachineReactorSmall.java => TileEntityReactorResearch.java} (86%) create mode 100644 src/main/resources/assets/hbm/textures/gui/reactors/gui_research_reactor.png create mode 100644 src/main/resources/assets/hbm/textures/items/crt_display.png diff --git a/src/main/java/com/hbm/blocks/ModBlocks.java b/src/main/java/com/hbm/blocks/ModBlocks.java index 1d120b646..83f48fe4a 100644 --- a/src/main/java/com/hbm/blocks/ModBlocks.java +++ b/src/main/java/com/hbm/blocks/ModBlocks.java @@ -614,9 +614,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; @@ -973,9 +972,9 @@ 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_zirnox; + public static Block reactor_research; + public static final int guiID_reactor_research = 65; + public static Block machine_zirnox; public static final int guiID_reactor_zirnox = 124; public static Block zirnox_destroyed; @@ -1182,8 +1181,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; @@ -1710,8 +1707,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_breeding").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); @@ -2041,8 +2037,8 @@ 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_zirnox = new ReactorZirnox(Material.iron).setBlockName("machine_zirnox").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel"); + reactor_research = new ReactorResearch(Material.iron).setBlockName("reactor_research").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_reactor_small"); + machine_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); @@ -2184,8 +2180,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"); @@ -2795,8 +2789,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()); @@ -2807,8 +2800,8 @@ 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_zirnox, reactor_zirnox.getUnlocalizedName()); + GameRegistry.registerBlock(reactor_research, reactor_research.getUnlocalizedName()); + GameRegistry.registerBlock(machine_zirnox, machine_zirnox.getUnlocalizedName()); GameRegistry.registerBlock(zirnox_destroyed, zirnox_destroyed.getUnlocalizedName()); GameRegistry.registerBlock(machine_industrial_generator, machine_industrial_generator.getUnlocalizedName()); GameRegistry.registerBlock(machine_radgen, machine_radgen.getUnlocalizedName()); @@ -3147,8 +3140,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/MachineReactorSmall.java b/src/main/java/com/hbm/blocks/machine/ReactorResearch.java similarity index 86% rename from src/main/java/com/hbm/blocks/machine/MachineReactorSmall.java rename to src/main/java/com/hbm/blocks/machine/ReactorResearch.java index ea2f2859f..067e4e21c 100644 --- a/src/main/java/com/hbm/blocks/machine/MachineReactorSmall.java +++ b/src/main/java/com/hbm/blocks/machine/ReactorResearch.java @@ -10,7 +10,7 @@ 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.TileEntityMachineReactorSmall; +import com.hbm.tileentity.machine.TileEntityReactorResearch; import cpw.mods.fml.common.network.internal.FMLNetworkHandler; import cpw.mods.fml.relauncher.Side; @@ -29,9 +29,9 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; -public class MachineReactorSmall extends BlockDummyable implements IMultiblock { +public class ReactorResearch extends BlockDummyable implements IMultiblock { - public MachineReactorSmall(Material mat) { + public ReactorResearch(Material mat) { super(mat); } @@ -39,7 +39,7 @@ public class MachineReactorSmall extends BlockDummyable implements IMultiblock { public TileEntity createNewTileEntity(World world, int meta) { if(meta >= 12) - return new TileEntityMachineReactorSmall(); + return new TileEntityReactorResearch(); if(meta >= 6) return new TileEntityProxyCombo(false, true, true); @@ -58,7 +58,7 @@ public class MachineReactorSmall extends BlockDummyable implements IMultiblock { if(pos == null) return false; - FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_reactor_small, world, pos[0], pos[1], pos[2]); + FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_reactor_research, world, pos[0], pos[1], pos[2]); return true; } else { return false; @@ -100,8 +100,4 @@ public class MachineReactorSmall extends BlockDummyable implements IMultiblock { public int getOffset() { return 0; } - - protected void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) { - super.fillSpace(world, x, y, z, dir, o); - } } diff --git a/src/main/java/com/hbm/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/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/inventory/container/ContainerMachineReactorBreeding.java b/src/main/java/com/hbm/inventory/container/ContainerMachineReactorBreeding.java new file mode 100644 index 000000000..7ee94bdfd --- /dev/null +++ b/src/main/java/com/hbm/inventory/container/ContainerMachineReactorBreeding.java @@ -0,0 +1,69 @@ +package com.hbm.inventory.container; + +import com.hbm.inventory.SlotMachineOutput; +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 (!this.mergeItemStack(stack, 1, 2, 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/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/ContainerMachineReactorSmall.java b/src/main/java/com/hbm/inventory/container/ContainerReactorResearch.java similarity index 56% rename from src/main/java/com/hbm/inventory/container/ContainerMachineReactorSmall.java rename to src/main/java/com/hbm/inventory/container/ContainerReactorResearch.java index 228493ccb..b68cb561a 100644 --- a/src/main/java/com/hbm/inventory/container/ContainerMachineReactorSmall.java +++ b/src/main/java/com/hbm/inventory/container/ContainerReactorResearch.java @@ -1,34 +1,34 @@ package com.hbm.inventory.container; import com.hbm.inventory.SlotMachineOutput; -import com.hbm.tileentity.machine.TileEntityMachineReactorSmall; +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 ContainerMachineReactorSmall extends Container { +public class ContainerReactorResearch extends Container { -private TileEntityMachineReactorSmall seleniumEngine; +private TileEntityReactorResearch reactor; - public ContainerMachineReactorSmall(InventoryPlayer invPlayer, TileEntityMachineReactorSmall tedf) { + public ContainerReactorResearch(InventoryPlayer invPlayer, TileEntityReactorResearch tedf) { - seleniumEngine = tedf; + reactor = 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)); + 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, 112, 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, 112, 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++) { @@ -75,6 +75,6 @@ private TileEntityMachineReactorSmall seleniumEngine; @Override public boolean canInteractWith(EntityPlayer player) { - return seleniumEngine.isUseableByPlayer(player); + return reactor.isUseableByPlayer(player); } } 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/GUIReactorResearch.java similarity index 53% rename from src/main/java/com/hbm/inventory/gui/GUIMachineReactorSmall.java rename to src/main/java/com/hbm/inventory/gui/GUIReactorResearch.java index d2c42aad9..9949cdebf 100644 --- a/src/main/java/com/hbm/inventory/gui/GUIMachineReactorSmall.java +++ b/src/main/java/com/hbm/inventory/gui/GUIReactorResearch.java @@ -5,11 +5,11 @@ import org.lwjgl.input.Keyboard; import org.lwjgl.opengl.GL11; import com.hbm.inventory.FluidTank; -import com.hbm.inventory.container.ContainerMachineReactorSmall; +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.TileEntityMachineReactorSmall; +import com.hbm.tileentity.machine.TileEntityReactorResearch; import net.minecraft.client.Minecraft; import net.minecraft.client.audio.PositionedSoundRecord; import net.minecraft.client.gui.GuiTextField; @@ -20,21 +20,23 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.MathHelper; import net.minecraft.util.ResourceLocation; -public class GUIMachineReactorSmall extends GuiInfoContainer { +public class GUIReactorResearch extends GuiInfoContainer { - private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_reactor_experimental.png"); - private TileEntityMachineReactorSmall reactor; - private final NumberDisplay[] displays = new NumberDisplay[2]; + 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 GUIMachineReactorSmall(InventoryPlayer invPlayer, TileEntityMachineReactorSmall te) { - super(new ContainerMachineReactorSmall(invPlayer, te)); + public GUIReactorResearch(InventoryPlayer invPlayer, TileEntityReactorResearch te) { + super(new ContainerReactorResearch(invPlayer, te)); reactor = te; this.xSize = 176; this.ySize = 222; - displays[0] = new NumberDisplay(12, 19).setDigitLength(4); - displays[1] = new NumberDisplay(12, 55).setDigitLength(3); + displays[0] = new NumberDisplay(14, 25).setDigitLength(4); + displays[1] = new NumberDisplay(12, 63).setDigitLength(3); + displays[2] = new NumberDisplay(5, 101).setDigitLength(3); } @Override @@ -46,9 +48,7 @@ public class GUIMachineReactorSmall extends GuiInfoContainer { Keyboard.enableRepeatEvents(true); - this.field = new GuiTextField(this.fontRendererObj, guiLeft + 11, guiTop + 86, 35, 9); - this.field.setTextColor(0x00ff00); - this.field.setDisabledTextColour(0x008000); + this.field = new GuiTextField(this.fontRendererObj, guiLeft + 8, guiTop + 99, 33, 16); this.field.setEnableBackgroundDrawing(false); this.field.setMaxStringLength(3); } @@ -56,45 +56,33 @@ public class GUIMachineReactorSmall extends GuiInfoContainer { @Override public void drawScreen(int mouseX, int mouseY, float f) { super.drawScreen(mouseX, mouseY, f); - - this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 80, guiTop + 120, 88, 4, new String[] { "Core Temperature:", " " + Math.round((reactor.heat) * 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); + + 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 Rods" }; + final String[] labels = { "Flux", "Heat", "Control" }; - this.fontRendererObj.drawString(name, 124 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752); + 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], 11, 9, 15066597); - this.fontRendererObj.drawString(labels[1], 11, 45, 15066597); - this.fontRendererObj.drawString(labels[2], 9, 74, 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 + 51 <= mouseX && guiLeft + 51 + 12 > mouseX && guiTop + 84 < mouseY && guiTop + 84 + 12 >= mouseY) { + if(guiLeft + 44 <= mouseX && guiLeft + 44 + 11 > mouseX && guiTop + 97 < mouseY && guiTop + 97 + 20 >= mouseY) { double level; @@ -108,6 +96,7 @@ public class GUIMachineReactorSmall extends GuiInfoContainer { 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)); @@ -121,33 +110,31 @@ public class GUIMachineReactorSmall extends GuiInfoContainer { drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); - if(reactor.heat > 0) { - int i = reactor.getHeatScaled(88); - - i = (int) Math.min(i, 160); - - drawTexturedModalRect(guiLeft + 80, guiTop + 120, 0, 230, i, 4); + 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); } - if(reactor.level >= 100) { - 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(reactor.level > 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); - + 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]); - this.drawInfoPanel(guiLeft - 16, guiTop + 36, 16, 16, 2); - this.drawInfoPanel(guiLeft - 16, guiTop + 36 + 16, 16, 16, 3); + 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); - this.field.drawTextBox(); } @Override diff --git a/src/main/java/com/hbm/inventory/gui/GuiInfoContainer.java b/src/main/java/com/hbm/inventory/gui/GuiInfoContainer.java index 5c62c97e3..9cb2b6be9 100644 --- a/src/main/java/com/hbm/inventory/gui/GuiInfoContainer.java +++ b/src/main/java/com/hbm/inventory/gui/GuiInfoContainer.java @@ -22,13 +22,6 @@ public abstract class GuiInfoContainer extends GuiContainer { static final ResourceLocation guiUtil = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_utility.png"); protected static final ResourceLocation numDisplays = new ResourceLocation(RefStrings.MODID, "textures/gui/gauges/seven_segment.pn"); - /** Default text color **/ - public static final int color0 = 4210752; - /** Green computer color **/ - public static final int color1 = 0x00ff00; - public static final char slimCursor = '\u2502'; - public static final char blockCursor = '\u2588'; - public static final ResourceLocation keyboard = new ResourceLocation(RefStrings.MODID, "misc.keyPress"); public GuiInfoContainer(Container p_i1072_1_) { super(p_i1072_1_); diff --git a/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java b/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java index cf7c07330..0c2345823 100644 --- a/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java @@ -190,7 +190,7 @@ 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); @@ -209,6 +209,7 @@ 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); @@ -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); @@ -515,7 +516,7 @@ public class AssemblerRecipes { new ComparableStack(ModItems.circuit_gold, 3), }, 600); - makeRecipe(new ComparableStack(ModBlocks.reactor_zirnox, 1), new AStack[] { + makeRecipe(new ComparableStack(ModBlocks.machine_zirnox, 1), new AStack[] { new ComparableStack(ModItems.hull_big_steel, 3), new ComparableStack(ModItems.hull_small_steel, 6), new ComparableStack(ModBlocks.steel_scaffold, 4), @@ -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..01056cfa9 100644 --- a/src/main/java/com/hbm/inventory/recipes/BreederRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/BreederRecipes.java @@ -18,120 +18,64 @@ 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)); + recipes.put(new ComparableStack(ModItems.rod_lithium), new BreederRecipe(ModItems.rod_tritium, 100)); + recipes.put(new ComparableStack(ModItems.rod_dual_lithium), new BreederRecipe(ModItems.rod_dual_tritium, 200)); + recipes.put(new ComparableStack(ModItems.rod_quad_lithium), new BreederRecipe(ModItems.rod_quad_tritium, 400)); + recipes.put(new ComparableStack(ModItems.rod_uranium), new BreederRecipe(ModItems.rod_plutonium, 1000)); + recipes.put(new ComparableStack(ModItems.rod_dual_uranium), new BreederRecipe(ModItems.rod_dual_plutonium, 2000)); + recipes.put(new ComparableStack(ModItems.rod_quad_uranium), new BreederRecipe(ModItems.rod_quad_plutonium, 4000)); + recipes.put(new ComparableStack(ModItems.rod_plutonium), new BreederRecipe(ModItems.rod_waste, 500)); + recipes.put(new ComparableStack(ModItems.rod_dual_plutonium), new BreederRecipe(ModItems.rod_dual_waste, 1000)); + recipes.put(new ComparableStack(ModItems.rod_quad_plutonium), new BreederRecipe(ModItems.rod_quad_waste, 2000)); //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)); + recipes.put(new ComparableStack(ModItems.rod_th232), new BreederRecipe(ModItems.rod_u233, 1000)); + recipes.put(new ComparableStack(ModItems.rod_dual_th232), new BreederRecipe(ModItems.rod_dual_u233, 2000)); + recipes.put(new ComparableStack(ModItems.rod_quad_th232), new BreederRecipe(ModItems.rod_quad_u233, 4000)); + recipes.put(new ComparableStack(ModItems.rod_u233), new BreederRecipe(ModItems.rod_u235, 1000)); + recipes.put(new ComparableStack(ModItems.rod_dual_u233), new BreederRecipe(ModItems.rod_dual_u235, 2000)); + recipes.put(new ComparableStack(ModItems.rod_quad_u233), new BreederRecipe(ModItems.rod_quad_u235, 4000)); + recipes.put(new ComparableStack(ModItems.rod_u235), new BreederRecipe(ModItems.rod_neptunium, 500)); + recipes.put(new ComparableStack(ModItems.rod_dual_u235), new BreederRecipe(ModItems.rod_dual_neptunium, 1000)); + recipes.put(new ComparableStack(ModItems.rod_quad_u235), new BreederRecipe(ModItems.rod_quad_neptunium, 2000)); + recipes.put(new ComparableStack(ModItems.rod_u238), new BreederRecipe(ModItems.rod_pu239, 1000)); + recipes.put(new ComparableStack(ModItems.rod_dual_u238), new BreederRecipe(ModItems.rod_dual_pu239, 2000)); + recipes.put(new ComparableStack(ModItems.rod_quad_u238), new BreederRecipe(ModItems.rod_quad_pu239, 4000)); + recipes.put(new ComparableStack(ModItems.rod_neptunium), new BreederRecipe(ModItems.rod_pu238, 250)); + recipes.put(new ComparableStack(ModItems.rod_dual_neptunium), new BreederRecipe(ModItems.rod_dual_pu238, 500)); + recipes.put(new ComparableStack(ModItems.rod_quad_neptunium), new BreederRecipe(ModItems.rod_quad_pu238, 1000)); + recipes.put(new ComparableStack(ModItems.rod_pu238), new BreederRecipe(ModItems.rod_pu239, 1000)); + recipes.put(new ComparableStack(ModItems.rod_dual_pu238), new BreederRecipe(ModItems.rod_dual_pu239, 2000)); + recipes.put(new ComparableStack(ModItems.rod_quad_pu238), new BreederRecipe(ModItems.rod_quad_pu239, 4000)); + recipes.put(new ComparableStack(ModItems.rod_pu239), new BreederRecipe(ModItems.rod_pu240, 500)); + recipes.put(new ComparableStack(ModItems.rod_dual_pu239), new BreederRecipe(ModItems.rod_dual_pu240, 1000)); + recipes.put(new ComparableStack(ModItems.rod_quad_pu239), new BreederRecipe(ModItems.rod_quad_pu240, 2000)); + recipes.put(new ComparableStack(ModItems.rod_pu240), new BreederRecipe(ModItems.rod_waste, 500)); + recipes.put(new ComparableStack(ModItems.rod_dual_pu240), new BreederRecipe(ModItems.rod_dual_waste, 1000)); + recipes.put(new ComparableStack(ModItems.rod_quad_pu240), new BreederRecipe(ModItems.rod_quad_waste, 2000)); //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)); + recipes.put(new ComparableStack(ModItems.rod_schrabidium), new BreederRecipe(ModItems.rod_solinium, 2000)); + recipes.put(new ComparableStack(ModItems.rod_dual_schrabidium), new BreederRecipe(ModItems.rod_dual_solinium, 4000)); + recipes.put(new ComparableStack(ModItems.rod_quad_schrabidium), new BreederRecipe(ModItems.rod_quad_solinium, 8000)); + recipes.put(new ComparableStack(ModItems.rod_quad_solinium), new BreederRecipe(ModItems.rod_quad_euphemium, 2000)); + recipes.put(new ComparableStack(ModItems.rod_balefire), new BreederRecipe(ModItems.rod_balefire_blazing, 2000)); + recipes.put(new ComparableStack(ModItems.rod_dual_balefire), new BreederRecipe(ModItems.rod_dual_balefire_blazing, 4000)); + recipes.put(new ComparableStack(ModItems.rod_quad_balefire), new BreederRecipe(ModItems.rod_quad_balefire_blazing, 8000)); //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)); + recipes.put(new ComparableStack(Blocks.stone), new BreederRecipe(new ItemStack(ModBlocks.sellafield_0), 250)); + recipes.put(new ComparableStack(ModBlocks.sellafield_0), new BreederRecipe(new ItemStack(ModBlocks.sellafield_1), 250)); + recipes.put(new ComparableStack(ModBlocks.sellafield_1), new BreederRecipe(new ItemStack(ModBlocks.sellafield_2), 500)); + recipes.put(new ComparableStack(ModBlocks.sellafield_2), new BreederRecipe(new ItemStack(ModBlocks.sellafield_3), 500)); + recipes.put(new ComparableStack(ModBlocks.sellafield_3), new BreederRecipe(new ItemStack(ModBlocks.sellafield_4), 1000)); + recipes.put(new ComparableStack(ModBlocks.sellafield_4), new BreederRecipe(new ItemStack(ModBlocks.sellafield_core), 1000)); - recipes.put(new ComparableStack(ModItems.meteorite_sword_etched), new BreederRecipe(new ItemStack(ModItems.meteorite_sword_bred), 4)); - } - - 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}); + recipes.put(new ComparableStack(ModItems.meteorite_sword_etched), new BreederRecipe(new ItemStack(ModItems.meteorite_sword_bred), 1000)); } public static HashMap getAllRecipes() { @@ -145,20 +89,6 @@ 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) @@ -168,51 +98,19 @@ public class BreederRecipes { 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/anvil/AnvilRecipes.java b/src/main/java/com/hbm/inventory/recipes/anvil/AnvilRecipes.java index 874a50d76..67856d445 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( @@ -586,7 +587,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 9855ed480..38d8c974c 100644 --- a/src/main/java/com/hbm/items/ModItems.java +++ b/src/main/java/com/hbm/items/ModItems.java @@ -510,6 +510,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; @@ -862,9 +863,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; @@ -3050,6 +3051,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"); @@ -3314,10 +3316,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"); @@ -3410,6 +3411,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"); @@ -3586,11 +3588,11 @@ public class ModItems { pile_rod_source = new ItemPileRod().setUnlocalizedName("pile_rod_source").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pile_rod_source"); pile_rod_boron = new ItemPileRod().setUnlocalizedName("pile_rod_boron").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pile_rod_boron"); - plate_fuel_u233 = new ItemPlateFuel(1100000).setFunction(FunctionEnum.SQUARE_ROOT, 50).setUnlocalizedName("plate_fuel_u233").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":plate_fuel_u233"); - plate_fuel_u235 = new ItemPlateFuel(1100000).setFunction(FunctionEnum.SQUARE_ROOT, 40).setUnlocalizedName("plate_fuel_u235").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":plate_fuel_u235"); - plate_fuel_mox = new ItemPlateFuel(1400000).setFunction(FunctionEnum.LOGARITHM, 50).setUnlocalizedName("plate_fuel_mox").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":plate_fuel_mox"); - plate_fuel_pu239 = new ItemPlateFuel(1000000).setFunction(FunctionEnum.NEGATIVE_QUADRATIC, 25).setUnlocalizedName("plate_fuel_pu239").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":plate_fuel_pu239"); - plate_fuel_sa326 = new ItemPlateFuel(1000000).setFunction(FunctionEnum.LINEAR, 60).setUnlocalizedName("plate_fuel_sa326").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":plate_fuel_sa326"); + 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_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"); @@ -6105,6 +6107,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()); @@ -7490,11 +7493,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()); @@ -7537,6 +7539,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/ItemReactorSensor.java b/src/main/java/com/hbm/items/machine/ItemReactorSensor.java index ebc05a372..3bc543c5f 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(); diff --git a/src/main/java/com/hbm/items/special/ItemStarterKit.java b/src/main/java/com/hbm/items/special/ItemStarterKit.java index 004c1e178..57fcc2351 100644 --- a/src/main/java/com/hbm/items/special/ItemStarterKit.java +++ b/src/main/java/com/hbm/items/special/ItemStarterKit.java @@ -107,11 +107,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 +182,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 +256,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)); diff --git a/src/main/java/com/hbm/lib/Library.java b/src/main/java/com/hbm/lib/Library.java index e33e847fc..297badfe5 100644 --- a/src/main/java/com/hbm/lib/Library.java +++ b/src/main/java/com/hbm/lib/Library.java @@ -175,7 +175,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) { @@ -541,11 +540,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 e7ab91d8b..c533c6c6d 100644 --- a/src/main/java/com/hbm/main/ClientProxy.java +++ b/src/main/java/com/hbm/main/ClientProxy.java @@ -191,7 +191,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()); @@ -203,7 +203,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..bddd3c66e 100644 --- a/src/main/java/com/hbm/main/CraftingManager.java +++ b/src/main/java/com/hbm/main/CraftingManager.java @@ -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..8aabea2f9 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,12 +563,10 @@ 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))); } 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 138fe1bca..7ec3761c0 100644 --- a/src/main/java/com/hbm/packet/AuxButtonPacket.java +++ b/src/main/java/com/hbm/packet/AuxButtonPacket.java @@ -15,7 +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.TileEntityReactorResearch; import com.hbm.tileentity.machine.TileEntityRadioRec; import com.hbm.tileentity.machine.TileEntityReactorControl; import com.hbm.tileentity.machine.TileEntityReactorZirnox; diff --git a/src/main/java/com/hbm/packet/AuxGaugePacket.java b/src/main/java/com/hbm/packet/AuxGaugePacket.java index c8c2bfb79..b4210fe13 100644 --- a/src/main/java/com/hbm/packet/AuxGaugePacket.java +++ b/src/main/java/com/hbm/packet/AuxGaugePacket.java @@ -23,7 +23,7 @@ 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.TileEntityReactorResearch; import com.hbm.tileentity.machine.TileEntityMachineSeleniumEngine; import com.hbm.tileentity.machine.TileEntityRadioRec; diff --git a/src/main/java/com/hbm/render/item/ItemRenderLibrary.java b/src/main/java/com/hbm/render/item/ItemRenderLibrary.java index a8d512e0d..a0bf246a5 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); @@ -1160,7 +1160,7 @@ public class ItemRenderLibrary { } }); - renderers.put(Item.getItemFromBlock(ModBlocks.reactor_zirnox), new ItemRenderBase( ) { + renderers.put(Item.getItemFromBlock(ModBlocks.machine_zirnox), new ItemRenderBase( ) { public void renderInventory() { GL11.glTranslated(0, -2, 0); GL11.glScaled(2.8, 2.8, 2.8); 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 def7347f2..9728ae856 100644 --- a/src/main/java/com/hbm/render/tileentity/RenderSmallReactor.java +++ b/src/main/java/com/hbm/render/tileentity/RenderSmallReactor.java @@ -5,7 +5,7 @@ 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; @@ -21,7 +21,7 @@ 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(); @@ -49,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.025F + (float) (Math.random() * 0.02F) + 0.125F * (reactor.totalFlux / 1000F)); + 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/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/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..bd98b28b0 --- /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.005F * (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/TileEntityNukeFurnace.java b/src/main/java/com/hbm/tileentity/machine/TileEntityNukeFurnace.java index 18ac09520..b5d4641fe 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityNukeFurnace.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityNukeFurnace.java @@ -1,6 +1,9 @@ package com.hbm.tileentity.machine; +import java.util.HashMap; + import com.hbm.blocks.machine.MachineNukeFurnace; +import com.hbm.inventory.RecipesCommon.ComparableStack; import com.hbm.inventory.recipes.BreederRecipes; import com.hbm.items.ModItems; import com.hbm.items.special.ItemCustomLore; @@ -111,7 +114,7 @@ public class TileEntityNukeFurnace extends TileEntity implements ISidedInventory return 0; } else { - int[] power = BreederRecipes.getFuelValue(stack); + int[] power = getFuelValue(stack); if(power == null) return 0; @@ -346,5 +349,82 @@ 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() { + 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}); + } + + /** + * 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 = fuels.get(sta); + + return ret; + } } diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineReactorSmall.java b/src/main/java/com/hbm/tileentity/machine/TileEntityReactorResearch.java similarity index 86% rename from src/main/java/com/hbm/tileentity/machine/TileEntityMachineReactorSmall.java rename to src/main/java/com/hbm/tileentity/machine/TileEntityReactorResearch.java index 5057def76..c227a12c3 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineReactorSmall.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityReactorResearch.java @@ -1,410 +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.MachineReactor; -import com.hbm.blocks.machine.MachineReactorSmall; -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; revamp gui; revamp breeder to rely on reactor and use total flux calcs; -public class TileEntityMachineReactorSmall 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 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 TileEntityMachineReactorSmall() { - 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)); - } - - public String getName() { - return "container.reactorSmall"; - } - - @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"); - level = nbt.getDouble("level"); - targetLevel = nbt.getDouble("targetLevel"); - } - - @Override - public void writeToNBT(NBTTagCompound nbt) { - super.writeToNBT(nbt); - nbt.setInteger("heat", heat); - 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; - - } - - public int getHeatScaled(int i) { - return (heat * i) / maxHeat; - } - - @Override - public void updateEntity() { - - rodControl(); - - if(!worldObj.isRemote) { - totalFlux = 0; - - if(level > 0) { - reaction(); - } - - getInteractions(); - - if(this.heat > 0) { - byte water = getWater(); - - if(water > 0) { - this.heat -= (this.heat * (float) 0.07 * water / 12); - } else if(water == 0) { - this.heat -= 1; - } - - if(this.heat < 0) - this.heat = 0; - } - - if(this.heat > maxHeat) { - this.explode(); - } - - //change to 3D rad like demon-core - 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.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.level = data.getDouble("level"); - this.targetLevel = data.getDouble("targetLevel"); - this.slotFlux = data.getIntArray("slotFlux"); - this.totalFlux = data.getInteger("totalFlux"); - } - - private byte getWater() { - byte water = 0; - - for(byte d = 0; d < 6; d++) { - ForgeDirection dir = ForgeDirection.getOrientation(d); - if(d < 2) { - if(worldObj.getBlock(xCoord, yCoord + 1 + dir.offsetY * 2, zCoord).getMaterial() == Material.water) - water++; - } else { - for(byte i = 0; i < 3; i++) { - if(worldObj.getBlock(xCoord + dir.offsetX, yCoord + i, zCoord + dir.offsetZ).getMaterial() == Material.water) - water++; - } - } - } - - return water; - } - - public boolean isSubmerged() { - - return worldObj.getBlock(xCoord + 1, yCoord + 1, zCoord).getMaterial() == Material.water || - worldObj.getBlock(xCoord, yCoord + 1, zCoord + 1).getMaterial() == Material.water || - worldObj.getBlock(xCoord - 1, yCoord + 1, zCoord).getMaterial() == Material.water || - worldObj.getBlock(xCoord, yCoord + 1, zCoord - 1).getMaterial() == Material.water; - } - - private void getInteractions() { - getInteractionForBlock(xCoord + 1, yCoord + 1, zCoord); - getInteractionForBlock(xCoord - 1, yCoord + 1, zCoord); - getInteractionForBlock(xCoord, yCoord + 1, zCoord + 1); - getInteractionForBlock(xCoord, yCoord + 1, zCoord - 1); - } - - private void getInteractionForBlock(int x, int y, int z) { - - Block b = worldObj.getBlock(x, y, z); - TileEntity te = worldObj.getTileEntity(x, y, z); - - if(b == ModBlocks.machine_reactor) { - - int[] pos = ((MachineReactor) ModBlocks.machine_reactor).findCore(worldObj, x, y, z); - - if(pos != null) { - - TileEntity tile = worldObj.getTileEntity(pos[0], pos[1], pos[2]); - - if(tile instanceof TileEntityMachineReactor) { - - TileEntityMachineReactor reactor = (TileEntityMachineReactor) tile; - - if(reactor.charge <= 1 && this.totalFlux > 0) { - reactor.charge = 1; - reactor.heat = (int) Math.floor(heat * 4 / maxHeat) + 1; - } - } - } - } - } - - 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.machine_reactor_small || b == ModBlocks.machine_reactor) - 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] + 1); - 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.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.reactorStop", 1.0F, 1.0F); - - 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; - } +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 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)); + } + + 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"); + level = nbt.getDouble("level"); + targetLevel = nbt.getDouble("targetLevel"); + } + + @Override + public void writeToNBT(NBTTagCompound nbt) { + super.writeToNBT(nbt); + nbt.setInteger("heat", heat); + 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(); + } + + //getInteractions(); + + if(this.heat > 0) { + byte water = getWater(); + + if(water > 0) { + this.heat -= (this.heat * (float) 0.07 * water / 12); + } else if(water == 0) { + this.heat -= 1; + } + + if(this.heat < 0) + this.heat = 0; + } + + if(this.heat > maxHeat) { + this.explode(); + } + + //change to 3D rad like demon-core + 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.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.level = data.getDouble("level"); + this.targetLevel = data.getDouble("targetLevel"); + this.slotFlux = data.getIntArray("slotFlux"); + this.totalFlux = data.getInteger("totalFlux"); + } + + private byte getWater() { + byte water = 0; + + for(byte d = 0; d < 6; d++) { + ForgeDirection dir = ForgeDirection.getOrientation(d); + if(d < 2) { + if(worldObj.getBlock(xCoord, yCoord + 1 + dir.offsetY * 2, zCoord).getMaterial() == Material.water) + water++; + } else { + for(byte i = 0; i < 3; i++) { + if(worldObj.getBlock(xCoord + dir.offsetX, yCoord + i, zCoord + dir.offsetZ).getMaterial() == Material.water) + water++; + } + } + } + + return water; + } + + public boolean isSubmerged() { + + return worldObj.getBlock(xCoord + 1, yCoord + 1, zCoord).getMaterial() == Material.water || + worldObj.getBlock(xCoord, yCoord + 1, zCoord + 1).getMaterial() == Material.water || + worldObj.getBlock(xCoord - 1, yCoord + 1, zCoord).getMaterial() == Material.water || + worldObj.getBlock(xCoord, yCoord + 1, zCoord - 1).getMaterial() == Material.water; + } + + /*private void getInteractions() { + getInteractionForBlock(xCoord + 1, yCoord + 1, zCoord); + getInteractionForBlock(xCoord - 1, yCoord + 1, zCoord); + getInteractionForBlock(xCoord, yCoord + 1, zCoord + 1); + getInteractionForBlock(xCoord, yCoord + 1, zCoord - 1); + } + + 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] + 1); + 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")); + + if(targetLevel != level) + this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.reactorStop", 1.0F, 1.0F); + } + + 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/resources/assets/hbm/lang/en_US.lang b/src/main/resources/assets/hbm/lang/en_US.lang index bd75d3feb..a8ff71e01 100644 --- a/src/main/resources/assets/hbm/lang/en_US.lang +++ b/src/main/resources/assets/hbm/lang/en_US.lang @@ -383,10 +383,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 @@ -1273,6 +1273,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 @@ -3328,9 +3329,7 @@ tile.machine_puf6_tank.name=Plutonium Hexafluoride Tank 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_reactor_breeding.name=Breeding Reactor tile.machine_refinery.name=Oil Refinery tile.machine_reix_mainframe.name=Rei-X Mainframe (WIP) tile.machine_rtg_blue.name=Convection Generator @@ -3367,7 +3366,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 @@ -3512,6 +3510,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.reactor_research.name=Research Reactor +tile.reactor_zirnox.name=ZIRNOX Nuclear Reactor tile.red_barrel.name=Explosive Barrel tile.red_cable.name=Red Copper Cable tile.red_connector.name=Electricity Connector @@ -3634,7 +3634,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_experimental.png b/src/main/resources/assets/hbm/textures/gui/gui_reactor_experimental.png index fc5596518c69077585a014d46e1fb39c4130a4c2..11633097098eccf67198109f45b873f08b2e3ee4 100644 GIT binary patch delta 1601 zcmb7EdpMM76#u@D(KH6hwLwksVIX#~g@>cIC<+Dg7@wcgot1X- z{)M?RlU`-l$ynQor$!}ArH8~)&6FySB1_k+hfu|Koi{vWr^#6SD|~ygcZT!2cYTs7 zkTw#_<;t^gqC+l8fQb$W-@q_JeJ_?q?ZSaviJrpe)IhB~V6KwvEaE__Y;J}tO6#{ zWWF{FGaJBiQZ3R1!XF=R_ENAgNTgrY8e?-pE+~9Ke=g-nU88#rM0?D_*TftL6EnrZce%SfhPl z#HcDfPC1?6BN?x~XEu7&bi7e;5Un|)zS6opfSyMC_bA;tSNz%9(iwV`TZv>fa%4MP z7`=^kT9ifoBVnc-aG#t1se~K|T05h74Oi#EZz&LSm-&&TXkpLmB*>CLStN8570LsY zCkQT5tOE^@U70U~R0UDqNx?7FuT%k)o1uw%n=}D}B!+QGUKTm_m8W}RSg~N?08AWw zAcu&rg(ixYQ|0m#bqA9Y3{hmZF|m<-4Y#uasWwCT2OTKv&q-UxRQxc}w_=mkY_ObS zhhk-W4cqyV^1YnU=|l0I?2rONYZ2sA=Iw#Zufb*lV>yt$#22K%g2b3m0pv5P8VU0R z`F8+aA=NVE$EI7EcWrW9NGHgvc;mL1gkiBqC|1hHXqjAP^rXA0ohAv(h_fK2utRhW z2^N8%h#zPv37rvC$(9{#>#ISEO-mokgd>*Fo1cpiA!`ZuJAASu_4WlVJd7>ez4|8( zBj^FfJ*qkA09;x);qtJlNSjfkWrJ1ICeh&8CG>AP04E@)@)-$3%BMmVzoJm&?615i z8;bB^VCSVR!VGqkRm!If1M6+n1l^N%CNQdrKxpOf8k0On>Qv-iFic2H&~f}1lpn21Rrq8ZkRxi-Ud zbdc8mnq`{Fn1- zsmEq6=m0Z%64HYa-Nakb-r@|qaI3tIkq;XxpY}&8SmEn^CL~IGZ(;N!-EXbfwSz3KD!c;g48}w-)gs|`iI-YIoaI2sl>is9BeyD;wyd^YNA&6Qkh&C@s zS=!P6KXJ?Ig}4Vq1b;~*YWCq4C%xBaGk3-#VR4fVabwHY$XO*dOTtvTRn*fOI#4rY z0s2>;gWzsoaTFzHyfsom-?QQU+Qc(6kNU6=f7PBg^K4%4OI0!oUZ>0q%#B38VK+t2 zXMbFRV;9E8+c?`zqgQ!L>W=GCEANM@C%gERw=aLs*7s_PUR#+L7@hsdeQ_V=H1ik6 zo6~lf#eUbaIBz1zzFwR})0IVt?ixT)ofEKkII!?bFv3{qo${D}Y53^Tb<9MR?d`L; S<(ZX$U>&q}u)1SGj{h4`EWl0x delta 1570 zcmY*Z4K$N`9Dd)mm)Ue#wzU&(s~wuk%}VTcJ2jJ`w%Z(JO|qm?sj27_?^`V&p%nTU zwW(7mWr=WE<0_?mbvr`3Hc{N-lCPTB?mN!u)_Z>EJ?B0D=l{IV@A*H!f1yR1h4K^# zR|CLL)!-9JZYTgieco%_{0?vK&mtUq=|YOLE#W%^mKQRAnNcHlqIRtkn^P}VRT>Pl z`JVdd>U%Nio<~DAYQ7eoTPSC(C?L1{G;jAf_t@Qsv=L?p+9Er3B*BhSZVAc2d-xJQN+(_G2LK!2Gy$7C0%)9dwB zf8<~6j*pMu(RAXCpC6`3S8(>=PQ@(o&}t`}wz-S#4a?#Rp|ZR%GvRKQED@+RgnJ_0 zhM7?7+|ElzlcKi)sVPx79t%b|&*LfPaZ5eg7Oa5Bm(03ZR|4siY2 zRZ2)r^Nnw?4L5t>9G*aYOG57XZVfI-vgbNsnk14)D0;W@$WI$CI9A?VXi-hZD}W3@ z*PZ-9y#EZ7V>guw}s*OK?AcYu06pzP*FeLS+=MS7AatMP_P)W&CO2UR zmStbU0v~8#tJ<;}+>0!1%guIw^%V3PvFYj+>e`0o+yqZ{QdPGoEJWIbi4KBRtg#cz zAcFAuSAG=-%CEcU-zhWfa{N4OtIR%S&&4@ZzLdmg=WThen;X7U$#jFhRJ9-)8+VYz z2760f843z=zannP%sMduacEAaCTu{~!TPNqr6Cj~K(@W_U@FGa*BxwaI)PE<#bK1$ z5G3}U33)Ao>VlC1oxGm81=4b1854|gy8cr6&gPtD4v?HFoB1TrijJK`W?{{=&a>77*0O*d#L@xHL6m>|}QW$I%*DInH-nUySMf*Q~EzYqA zR^F(p!NO#%Y4D8L1LhDK0)?hS0ib7!R~Gb|;o0zR24F1`04~jS?!c-@9!>5&c%0uG zlbpD*GS9@U!N)agk-XjVJ~FUe2;Tg!n?>3YKmFyl<2q&=F@hHSK6?S}^>R*o zGO!GL6f>^vYcu-hbe$+Zqt^X<7J*ki>>&M_&qZ{vQh;v1Wq}~8rb`Ge#Ym-|Y>z^^ zBE*Xw_1eYUzK2T3lAF|n;cMnME>CZqoYOM8T1K6h3!G&Y7+yTWeZr;2uFuy;q!1Z2 z3L31bT;0PZ>`O`A(H;Bn*8CjVhf$lY(!l#UGWo(_T zR=F7iLqb%Z=vaJbN@WKf!7vcx92f@%fW!kt6gQo%sg=-{LYv#}2KlqTQoAA`pPyIT z^NKS?_9G4@L2Deo&n$s2RAQV4{<4hNYr5^^Ep%6MkqkL`q?}^ZGF{&kO_7i+_u4-R zSSJQA9omUwm7FYeYn~+nxFUXKRYefNC~LaDo#iwM&NZ#;ww)4TO?{5ETW0`uDi>@P ztnp}5>@sr%0y1UD?4o|rv^L`#m>e_tpHILpZQB&=cpQ2JqL;;M%oqp9SlT9W###zO zTMwBZZVbj=Dsgj8zcS{H1l2&0f=9u#FE1t`OE)sK@xwiEMMUS@$LlUGF+{$5)_l9= z?qu}j_!3um@0$wU$2)-~62rlshQG_zn)1(2Ccj$zyfS*E_fyw`^>V$guWh(z$>xdC zp?8{s&8pbR_w}nKnuo^>`s#Rib?n5*Kk7!gI{Mct{SFIM+6Rolp76u(fo+8X;8|!k nkY39H8EL1!2h2$%Fiso5%x0ngm~8V~0DZhYeqVE!BR=sTV~L|k 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 c8823be16e8b43710cfacb95f0dfd30b1d1f8606..38ea99596b7b10cac268ca7244e0341573306574 100644 GIT binary patch literal 1211 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K58911MRQ8&P5D>38$lZxy-8q?;Kn_c~qpu?a z!^VE@KZ&eBzE*%wh%1mjcI=pefq|r>ILCj6h=_>)|Nl#viid`VF8yEc;NW0xZrPN2EBbiztfyLkhwbZSug%_GD7|}HbA7$h?SCJ+ zonQ8zezv4B;d1W1+lrD2ti^HvzvZ;gSWw{V;QhM3{-#d(0Z)FJeR~`ku0DVMIQj5q z%aQ|)Zv(Ys#2q#=im`0CntA#1y3dANof#N&O6xA>fBwhMFQQ!PaPMpGy+02*Ww?L% z%wJ=-aTT9LRD-|Qa@h|vc{cnyvg=&Kmfz0oXZjj0^LemE)Go4Q%=~qH&$6$4PkP^P z&S$Q8yvY)%OONrepn(iit>R`Q#@)eb@0l-Eede5y{G|6Z-;%HIBWjak(;fDItO>Fz zXL}R&$8Lc=O9hiUQ(1PM{DfKmKRA3`!hGr1_1|_1^Zy+_euH6Qo%oBBx9!y%7`9d2 z`ZDkEbbFNtUyXjYezy>}evt9__#uDJ1K*jRr+uu|D?M=WUwYdme@=-K{Xidv&w6gf zvIq8bC$isQENhTG@S;DFeZy7m8;mjEB!K(`c7yjxK$!!fjQ{&?e(u%3bD6Qnys+$v zF|Q@1lujq1CuSU zTQ!`1w#EmjBW|bU1w|JUBQk-b|KhK)+@Uw2d@f>bdUx+^4?Jk zjtBQ%yBz(!8>0J1rg6|m_FJ{0U{8Qt28_RjK!1b$2;>F4&&yj0bY(8k>qo>s1Ufrx zKl#|qnU(Qw+s5bxKYnd)_+pgNmUu~Zr9n!xMgvbb(}@j(kYW+PQ2L+IuVduqW4Fm#Brhiuz&_E##u7%x{> z#M#xk2s!DzY-z0`&Mm2gD?$|F*xi;b(YiHrGp?DtnVXxr?;p?i^SsRG^L?Jr%=10N z@O0H#NmvO0&~bO8`2c{>Km@>OYtsI>E8&`iig$AN!)PK2a{vYaZR}3_%#Zv1)Kf7# zzxPA*kaOERr}R5EXUWc#BcnP>t3kS>}f;TZ6D z;uRPN?!nWhj$KCAR@6s6&ts$0&eI-WH)(i2A1grPjIce5noG(Nan7xr0y}S%wR423 zEz;Wj=F@4XyDcNJM@YLJ=2}8<1-^XO{0{ZEF5ct(yh~j#X@-l_YhAqiC4BxRUemL! zy0*4t?Gza167UA@$dFI0sXE&U8RYiBJ+WbGgAs)&Ew=IU?EE`X{FvwO)6)X%@n>Ii zFH^)pvghfyjRY6A-3;HU5AuY?i8E3&{NS_)HOM1WRx}nnUrEh;Vu8H!;pd)IJzZx@bx zuC+B0bTVz8Oke@)tEnA3jFaD1!0fbx%0X7v8#%pMk`7k}yC#+B$J&+ha%-xXv!Kw= z(iFc)iJ6gAxGW6U<7IBdS!-&G1xK77UAn-zgV5zc~`6H}o}5k#jyn(c=EbC7NoF5EnSFEJ)_89vN!MrBt4<7HjSLM9J)zFGwQ!nSW|WqpjEC@q7r0MI z7hrR3)YLU%llxszcJ6wRVN1-aOwtYsk_={9hHmdRUi2u}8X6EMuIe41 z3m!@hkw`#hV=%z(f)$D-!MfF-e_H+6R=Wd)cotuT0JQU{Y@mXN*%F3zEc&u;FUf%` z@8R|J^(o{t2B)fXLE(eiy1G5(HqmMi3xrXeE&n8dsyj#@1Gi7(m9D>OMOJU~v~Spx z@8ulMR$~zNx#l(~?c7{Qd z_ijjWNWYFrU|uVc1kd8!u6A#Sx_;s%%v=`+*>`wAWj|se7QvFHB})(GA#$y5dx}vGKsRxy3PdwAy^H?zO1Wa1b4BrW4Fm<~*$qM_%<26Omiuc;O7R zX7c%4kn3R@5w4wRS+1wG9WXa`uL&6#kpA33vig$nflKU5Lhs?8x?R6UCo?xstuD;W zhw_B}OrfJ2>thx+kM#804yLWj(1oOdGlA@V?7OEh`A{}%G6EbP z?Fn1E5fIudS}lHE1J>w+>|6jfqkxGiFtS2`Gg#o}0USe-f8FYtXma$F-oDG)0G5)* z(tkSnKFK#mMrKet|R$`}d;nQ@vLY=h-*lE3vqi zGQsdFfH$T60K;}i6(kq|NorN|g6+eETtkF28}G{_q6ibsl&Whi5b7}ZmW44I4; zjU}{5G76!^ZfuQZ<~N@6KIeU&_mB6yzx$l)+}Gz^_jTRh&-Z-p&-Z($+Syuc5|$MP z0Bo|dJZujDj5mb=L4MxNBa9NTfx_)A%)tFF`JX(13^cVd1)w@ZWbG6m4-1{ObPWeU zta)R=PWPq?@lG1DI&A6~eRArvN!rJ63Jju`T2HFAx>Hp?#Ozly++SzCOI_-Y5gA&N z+%wSr{JORJ%V<-xwj5PC@^(j*rIRZPe>esAtE_hX><`GYa_8|}Wd)i1mAmv;-E)Q2 zN+xwm-1R1}cPgt1`}0PMi!+o=mS*NWkZFBm9i%|r&jSN#byRA0cVtvlS>>@}wRv}U zcli;qncEKDwdJfC&YI>*%L6ghv5A?4D<^5uSsX17OGa4RHvXqX#j*z{pWd(Jdha;KwExfT%C8Jb-~FX6MhCI!rG zp0igOUaIrmyJAH|MA~{7U0t?@1_%AAS@Hy!D0EB&r^yZs z<-9((9g~>eQA~i*UWCAovg)L%S&&cUc3W1Ob0j~pgii<5g8mjyfZO8+Li8GvbS7|# z1X%4QDTq1H+k3+BYEzGBXmknRP>Su#gslmopQM@@KNmXiq+6lI2UD@>bnfchU@c%t zfZ@q06H~@1>}u4?#|K^{tFoE$oq%(G+;L&J+V`!6^L-Q$^MEIrjxF!Vn3A2Cn9vQn zeNHtnp=#}{3b;|ma_)%~w45K5td{_tcI-3bcT@rOITkXCn%*(*8@aOZbKfeEb>hS= zPu~t-RKT8(_BwL<)`O{_e)Z^wd>TloFUPc?y; z9viL<6salWfWCt)=q@tGW971Qb8~+@yCe|IhZ||%EeNfT{|;bpMB~8+WYt=C~Mj($S2N5pnP*v!g{P%+lkj0Qc!{O7)jdk-u?S({zT%Q^;#3( zfg(fY+0}YWJvyaCh6KiFT3oh>blEX1ce_SBogDC*>7a^yO)v>dpV4f!0QF9H*1rA_ zP`|!iOu=N^=#rb0L!aUxDwD`55AUul=L+pY;`Yp(Ntm~{4)>Om`+nkGLx_!k+>b2; zC0J&L82tho+3#coj#?CYj_SFSI*^VHtd0pvN?6@i2d1J~iSc7Zv!hvKYhWFQBvjs8 z;FYHrTA77l$`8l|o`{VxZIPrh#9;ifn^N!)HGmrO**b7ti>@p{p^?qSPCKleH|mt6 zrl15fKVjH9f$Q4>v#~sU?J1Ny8jV`M}N-e+%YUW<~sQ zn7;jD_)zW0PLe2Bn+%1Ahm(;P5Ati76bEbe)QJVhdAP}rn5qT>dE;39Z63a9EVy@2 zkVZkb3U_)7P*%MChhCViL^|^jNE#7^s?TTvnbtBF=?&~4100SIds`JD(BOtLc%|An zueORg2rrR=l{hb9ns*E)GcLeKweCnd#Ob`MWW9$ALQ>83lEwmPqrDpMcB7AAHkDgi zxb+v*QIC>te_H~r&$1!NCnnG$y)*HdDh_zS)9{hsr#=gNxVTtWU?U?V-!%-o@*E+x z+tdsoaUkt#ywF2ucIDv}A)mE=@zzt7>f-RXa6%gIJ#T~rcbWrmMFK!RNWcpU?0n@3 zQEAg~o$DFy(##j0&{;tqhNC4LJbQBnLT-+?nqiQ*{m5o_vHE>%dVO>&?V}-^h5ydh-J4gz$9pD!wgoo?7d3xHkfBovS5|r4dm{YYC ze4;Ll3O#<^ZL(JXz;7(RSKvT>w^zMPJc})D#a?MFzV7Z5e=2UMEDTs4$^97iN!2~( zkhV(hDv6$u=v7VH!~GH^n19J#etqb${mar3_3VmsANv%4$u6owRcpFa@0XS$b@vL? zRTD#0$rDmcgjd-Nf@04O{Z5k_$cd1^Z8d};`aXYF==qdBbz!#?3{9n6vEITOOyvH$ z>vvM@xA3!}g|4Z2BvLjTQ*Au!bO0O;ByXsh;(xTV_)I}*X5i4wV11r^PsKva*&5^7 zs2R2(Y`y z%DC|QaijLCE5)Cs$ZA`idGu=57oD!cPO=|1I+EHBLzi#vXKDIT{2yhoR}TJq9{`e~ zBb*Y>8GOh(|D;b5jxKbA=|ltz0Fx2z-j*d47~YS-@%QEz7azmQ$-$eIU?n6y@ah_v zJp_I@@sw!_a#X-V`!ub9X3Lx$(oo(|Lacu=BA?mcZyi{93BlLu?5I((v>IL9eoO=n z+`x$a!j6*3o^ne%B-x;!`KY!wM>4JegYTSzWnQwl0Bd1&U6Z}Zy@-bZuRf3_yO@nz z>mNSMJep1>lOsYrdV72QzJ_O_01O32e7xY3P8^M_go`ql65t0W7e-CdZXo?FTt?au z25S-gGfOD1udV*Je}28kKL~hpxUAOC@M0`5XAviS;(j0mEu27k6f&$W6#Zn4OX_-5 zQC<^#M@6K8#~%f%uyCkRXpuLkj3Y7;l@uULl;$OScC+{8Ll@gnUi3Nn2SZ-OnB5_) zn>CFV;nnZ)Xbf!p?kxFMQVk!v3@%>UI#ga~k|$ZUmY9Ke3Y)dgDw;IhXJAnF;lqdW zT^LM7@lxOw=8G{mmkqr)DT|7Ph|gohVQEiz7HE?Hv(D5vu z^Sou@!Oj?^Cfepkf8jY>Kx}=n~>}v7tz8AfyYbCk)A7bzAsY_`eRGd*L_=Cox z(%L&PPNY3EoNOQG==qoo%@ojYIusx`*J_`{V$09qdj-w!HMW( zNd8UaPo@l&7q0dUSxX^$-}}-)l3|DbqW{2}!EOHt(Yjp@Y=5({(1K;Ly!JDCxt}oS z^7in*nV-3YB3RjueU}&%6V*Ls!|*QX{>t(lSTH!knFh)znOwTbmkjvLnue@(_a0aC zzCbRGEvCeG->0srsi^Bj+;1+HXIsl^Y_=N5x;uF>U+hh!3qk?1$xx&thqKu9VoG?o z-$`so0@lt$tmp8U68{Xj$oNdhVAwt?p6t)kY&gH~VtXhGzV$derR?oBQu}YDgV>Iv zKzS&&-DFo67Hqrhn~;EI-wTaYf<%AKWf&+)k5k0aSFtbwP44V|gg0Ra;7AKVGXxW3 zB!otW*|AfqbU?+e6o5*ClG{x@J_%=ururwIa(GJwm;Jo1XiRq-Qr2E%J1Ym^@%W#U z`U`gK^fvy}PL7;Yns+2w{x()hxr6!rP5170&j3DadJgmF&2Sq!bk62;hqPhslu-J5 zI_B*Tgk+6FVTI{*RUd{gq44Ko~^rn7u!3s zZ*0-e!s#0WH=M%{orl@9$_4UT-u77Ghl&QS$Cm1Mfak-Tfn6E^k}3fFX$tWF6&8-b zXwh@q*~XC$2BBa4jK%IT(&s?GgCW||K^Kiw`6B6S9P&uf9C`X!5NMTtlT-+knX8bQ zAZ9PVffK~z|6LaU;_dW71pYh6zpdtn9|Y!nk-Suv_P&S) zQ$&8CbC}m8{QErf7JaV7?+pnzJe$rJkgpyu6)!mu_q{VOFYleJcOPZ#lwZ`)E;9U( l#h3u^5AOeY{c-sg7ZII*W^Hdxp~uEvt0T6D@0)pF{6AJQP4WN$ literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..24511643b39e2350bb227ee3a5305b39e3821560 GIT binary patch literal 298 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G}x0G|+73kwSgQ}IKG4oNzSuU)%#=FFLmjg4+@Zen6$F3wI44i2+s&8i2Q zr=fA_(xv|u)tTXd~lwe7aU+{l4z@WNzW)e`6v%n*=n1O-sFbFdq&tH)O6ioJX zaSYK2&OLKetU-Z;B_KxNq}c!e*~|x%OJ|AC)aLp-nN#3df_u+|OEc7-@FeP3rnqdG z%gTD(p08zT$B8aS)k%8mWwi2_*q&Z W^Lm)NnqLB1$KdJe=d#Wzp$PyL!)zJ= literal 0 HcmV?d00001 From a06fff46ba7983179626124b3e5df215a6df305c Mon Sep 17 00:00:00 2001 From: Vaern Date: Sat, 1 Jan 2022 10:36:15 -0800 Subject: [PATCH 07/17] seven segment displays work! --- .../hbm/inventory/gui/GUIReactorResearch.java | 6 +- .../hbm/inventory/gui/GuiInfoContainer.java | 125 ++++++++++++------ .../hbm/textures/gui/gauges/seven_segment.png | Bin 656 -> 0 bytes 3 files changed, 87 insertions(+), 44 deletions(-) delete mode 100644 src/main/resources/assets/hbm/textures/gui/gauges/seven_segment.png diff --git a/src/main/java/com/hbm/inventory/gui/GUIReactorResearch.java b/src/main/java/com/hbm/inventory/gui/GUIReactorResearch.java index 9949cdebf..72fac911b 100644 --- a/src/main/java/com/hbm/inventory/gui/GUIReactorResearch.java +++ b/src/main/java/com/hbm/inventory/gui/GUIReactorResearch.java @@ -34,9 +34,9 @@ public class GUIReactorResearch extends GuiInfoContainer { reactor = te; this.xSize = 176; this.ySize = 222; - displays[0] = new NumberDisplay(14, 25).setDigitLength(4); - displays[1] = new NumberDisplay(12, 63).setDigitLength(3); - displays[2] = new NumberDisplay(5, 101).setDigitLength(3); + 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 diff --git a/src/main/java/com/hbm/inventory/gui/GuiInfoContainer.java b/src/main/java/com/hbm/inventory/gui/GuiInfoContainer.java index 9cb2b6be9..73a28534d 100644 --- a/src/main/java/com/hbm/inventory/gui/GuiInfoContainer.java +++ b/src/main/java/com/hbm/inventory/gui/GuiInfoContainer.java @@ -1,11 +1,14 @@ 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; @@ -21,7 +24,6 @@ import net.minecraft.util.ResourceLocation; public abstract class GuiInfoContainer extends GuiContainer { static final ResourceLocation guiUtil = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_utility.png"); - protected static final ResourceLocation numDisplays = new ResourceLocation(RefStrings.MODID, "textures/gui/gauges/seven_segment.pn"); public GuiInfoContainer(Container p_i1072_1_) { super(p_i1072_1_); @@ -103,10 +105,8 @@ public abstract class GuiInfoContainer extends GuiContainer { private int displayX; /** The display's Y coordinate **/ private int displayY; - /** The X coordinate of the reference **/ - private int referenceX = 10; - /** The Y coordinate of the reference **/ - private int referenceY = 18; + /** The display's color, in hexadecimal **/ + private int color; /** The amount of padding between digits, default 3 **/ @Nonnegative private byte padding = 3; @@ -134,12 +134,23 @@ public abstract class GuiInfoContainer extends GuiContainer { * Construct a new number display * @param dX X coordinate of the display * @param dY Y coordinate of the display - * @param c Color to use, invalid enums will default to yellow + * @param c Enum Color to use, invalid enums will default to yellow */ public NumberDisplay(int x, int y, EnumChatFormatting c) { this(x, y); - setupColor(c); + 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 @@ -150,26 +161,62 @@ public abstract class GuiInfoContainer extends GuiContainer { { displayX = x; displayY = y; + setColor(0xFFFF55); } - public void setupColor(EnumChatFormatting c) + /** + * Returns a hexadecimal from EnumChatFormatting + * @param c Color to use + * @return + */ + private int enumToColor(EnumChatFormatting c) { - byte row = 4, column = 3; - switch (c) - { - case OBFUSCATED: - case RESET: - case STRIKETHROUGH: - case UNDERLINE: - break; - default: - column = (byte) (c.ordinal() % 4); - row = (byte) Math.floorDiv(c.ordinal(), 4); - break; - } -// System.out.println(column); -// System.out.println(row); - referenceY = 6 * row; - referenceX = 5 * column; + 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 @@ -194,10 +241,6 @@ public abstract class GuiInfoContainer extends GuiContainer { /** Draw the previously provided number **/ public void drawNumber() { -// System.out.println(referenceX); -// System.out.println(referenceY); - mc.getTextureManager().bindTexture(numDisplays); - if (isFloat) formatForFloat(); drawNumber(toDisp); @@ -221,7 +264,6 @@ public abstract class GuiInfoContainer extends GuiContainer { /** Draw a single character (requires dispOffset to be set) **/ public void drawChar(char num) { -// System.out.println(num); switch (num) { case '1': @@ -313,40 +355,41 @@ public abstract class GuiInfoContainer extends GuiContainer { private void drawHorizontal(int pos) { byte offset = (byte) (pos * 6); - renderSegment(guiLeft + displayX + dispOffset + 1, guiTop + displayY + offset, referenceX + 1, referenceY, 4, 1); - //System.out.println(referenceX + 1 + ", " + referenceY + ", " + pos); + 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, referenceX + 1, referenceY, 1, 1); + 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, referenceX, referenceY + 1, 1, 5); + 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 refX X coordinate of the reference - * @param refY Y coordinate of the reference * @param width Relevant for horizontals * @param height Relevant for verticals */ - private void renderSegment(int renX, int renY, int refX, int refY, int width, int height) + 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.addVertexWithUV(renX, renY + height, z, refX, (refY + height)); - tess.addVertexWithUV(renX + width, renY + height, z, (refX + width), (refY + height)); - tess.addVertexWithUV(renX + width, renY + 0, z, (refX + width), refY); - tess.addVertexWithUV(renX, renY, z, refX, refY); + 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) diff --git a/src/main/resources/assets/hbm/textures/gui/gauges/seven_segment.png b/src/main/resources/assets/hbm/textures/gui/gauges/seven_segment.png deleted file mode 100644 index a43f80efbd16d47afa55d3e22bc06ea355f9c5da..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 656 zcmV;B0&o3^P)EX>4Tx04R}tkv&MmKpe$iQ>CI62P=w-WT;LSL`5963Pq?8YK2xEOfLNpnlvOS zE{=k0!NHHks)LKOt`4q(Aou~|=H{g6A|?K>DYS_3;J6>}?mh0_0Yas~G^=F{&~)2O z#G+yd?N7-GfbO!op@@~ zHaPDShge=#iO-2gO}ZfQBi9v|-#F)LEbz>bnM}+Phls^o6Dv*3@}@>SNgP%+o$`g0 z%PQwB&RU_w>i6U?3}*D@C9cyPL<|d9gai=^O4vXFHX^j@q*zGMe$>O?U-L`kQpmLd zMvi$Dp+TxQQ60hc>K-;*Jma!vBn6tY?1{fxdT4RqfE?W=BY^?jT^07>d9eghmF z0wX!fUh{Z&TXS#!o~ifu1BAqKt~o-9I{*Lx24YJ`L;(K)RRI5VQhy}?000SaNLh0L z01FcU01FcV0GgZ_00007bV*G`2jvSD7bz_Dz3|Wg004|hL_t(I%k9d$C$13)P| z+C$nyDg_n7WvBwBPN%|u5bFv1BT$wlQPxWk<-KzZ=NNE|0hq=<`0@M0L9To62Ty=y zFo~oLh6$F#)Sz60vIgaP%J-BbVmoekGeVY;A?vXj+Iz>?%5-KLdeT$Ar7VMCH)Swv qQnJ5HP!6L(S%b2Vt?Vh^82kdLH&~m2r_mw+0000 Date: Sat, 1 Jan 2022 14:15:42 -0800 Subject: [PATCH 08/17] stuff --- .../java/com/hbm/hazard/HazardRegistry.java | 2 + .../ContainerMachineReactorBreeding.java | 2 +- .../container/ContainerReactorResearch.java | 4 +- .../hbm/inventory/gui/GUIReactorResearch.java | 3 ++ .../inventory/recipes/CentrifugeRecipes.java | 38 +++++++++++++++++- .../inventory/recipes/FuelPoolRecipes.java | 1 + .../inventory/recipes/anvil/AnvilRecipes.java | 1 + src/main/java/com/hbm/items/ModItems.java | 6 +++ .../com/hbm/items/machine/ItemPlateFuel.java | 18 ++++++--- .../TileEntityMachineReactorBreeding.java | 2 +- .../machine/TileEntityReactorResearch.java | 3 +- src/main/resources/assets/hbm/lang/en_US.lang | 6 ++- .../gui/reactors/gui_research_reactor.png | Bin 3659 -> 3739 bytes .../hbm/textures/items/plate_fuel_ra226be.png | Bin 0 -> 278 bytes .../textures/items/waste_plate_ra226be.png | Bin 0 -> 602 bytes 15 files changed, 72 insertions(+), 14 deletions(-) create mode 100644 src/main/resources/assets/hbm/textures/items/plate_fuel_ra226be.png create mode 100644 src/main/resources/assets/hbm/textures/items/waste_plate_ra226be.png diff --git a/src/main/java/com/hbm/hazard/HazardRegistry.java b/src/main/java/com/hbm/hazard/HazardRegistry.java index e834e124b..af19f345c 100644 --- a/src/main/java/com/hbm/hazard/HazardRegistry.java +++ b/src/main/java/com/hbm/hazard/HazardRegistry.java @@ -226,12 +226,14 @@ public class HazardRegistry { 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, rabe * ingot * 100); registerOtherWaste(waste_plate_u233, u233 * ingot * 100); registerOtherWaste(waste_plate_u235, u235 * ingot * 100); registerOtherWaste(waste_plate_mox, mox * ingot * 100); registerOtherWaste(waste_plate_pu239, pu239 * ingot * 100); registerOtherWaste(waste_plate_sa326, sa326 * ingot * 100); + registerOtherWaste(waste_plate_ra226be, rabe * ingot * 100); HazardSystem.register(debris_graphite, new HazardData().addEntry(RADIATION, 70F).addEntry(HOT, 5F)); HazardSystem.register(debris_metal, makeData(RADIATION, 5F)); diff --git a/src/main/java/com/hbm/inventory/container/ContainerMachineReactorBreeding.java b/src/main/java/com/hbm/inventory/container/ContainerMachineReactorBreeding.java index 7ee94bdfd..301b93487 100644 --- a/src/main/java/com/hbm/inventory/container/ContainerMachineReactorBreeding.java +++ b/src/main/java/com/hbm/inventory/container/ContainerMachineReactorBreeding.java @@ -47,7 +47,7 @@ public class ContainerMachineReactorBreeding extends Container { return null; } - } else if (!this.mergeItemStack(stack, 1, 2, false)) { + } else if (!this.mergeItemStack(stack, 0, 1, false)) { return null; } diff --git a/src/main/java/com/hbm/inventory/container/ContainerReactorResearch.java b/src/main/java/com/hbm/inventory/container/ContainerReactorResearch.java index b68cb561a..730a983b4 100644 --- a/src/main/java/com/hbm/inventory/container/ContainerReactorResearch.java +++ b/src/main/java/com/hbm/inventory/container/ContainerReactorResearch.java @@ -20,12 +20,12 @@ private TileEntityReactorResearch reactor; 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, 112, 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, 112, 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)); diff --git a/src/main/java/com/hbm/inventory/gui/GUIReactorResearch.java b/src/main/java/com/hbm/inventory/gui/GUIReactorResearch.java index 72fac911b..4df76b5e6 100644 --- a/src/main/java/com/hbm/inventory/gui/GUIReactorResearch.java +++ b/src/main/java/com/hbm/inventory/gui/GUIReactorResearch.java @@ -114,6 +114,9 @@ public class GUIReactorResearch extends GuiInfoContainer { 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) { diff --git a/src/main/java/com/hbm/inventory/recipes/CentrifugeRecipes.java b/src/main/java/com/hbm/inventory/recipes/CentrifugeRecipes.java index 520f7dd49..ce212cd0d 100644 --- a/src/main/java/com/hbm/inventory/recipes/CentrifugeRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/CentrifugeRecipes.java @@ -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.nugget_technetium, 1), //strontium-90 here + 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), + new ItemStack(ModItems.nugget_technetium, 1), + new ItemStack(ModItems.powder_cs137_tiny, 2), + new ItemStack(ModItems.nuclear_waste_tiny, 2) }); + + 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.nugget_technetium, 1), //strontium-90 here + 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 10aa0e13d..ef3d35914 100644 --- a/src/main/java/com/hbm/inventory/recipes/FuelPoolRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/FuelPoolRecipes.java @@ -25,5 +25,6 @@ public class FuelPoolRecipes { 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/anvil/AnvilRecipes.java b/src/main/java/com/hbm/inventory/recipes/anvil/AnvilRecipes.java index 67856d445..36afb42cc 100644 --- a/src/main/java/com/hbm/inventory/recipes/anvil/AnvilRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/anvil/AnvilRecipes.java @@ -259,6 +259,7 @@ public class AnvilRecipes { 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() { diff --git a/src/main/java/com/hbm/items/ModItems.java b/src/main/java/com/hbm/items/ModItems.java index 38d8c974c..d928c0ecf 100644 --- a/src/main/java/com/hbm/items/ModItems.java +++ b/src/main/java/com/hbm/items/ModItems.java @@ -1057,6 +1057,7 @@ public class ModItems { 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; @@ -1068,6 +1069,7 @@ public class ModItems { 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; @@ -3565,6 +3567,7 @@ public class ModItems { 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"); rod_water = new ItemCustomLore().setUnlocalizedName("rod_water").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_water"); @@ -3592,6 +3595,7 @@ public class ModItems { 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"); @@ -6673,6 +6677,7 @@ public class ModItems { 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 @@ -6686,6 +6691,7 @@ public class ModItems { 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 diff --git a/src/main/java/com/hbm/items/machine/ItemPlateFuel.java b/src/main/java/com/hbm/items/machine/ItemPlateFuel.java index 65d70519e..c9b873db0 100644 --- a/src/main/java/com/hbm/items/machine/ItemPlateFuel.java +++ b/src/main/java/com/hbm/items/machine/ItemPlateFuel.java @@ -41,29 +41,35 @@ public class ItemPlateFuel extends ItemFuelRod { LOGARITHM(), SQUARE_ROOT(), NEGATIVE_QUADRATIC(), - LINEAR(); + LINEAR(), + PASSIVE(); private FunctionEnum() { } } public String getFunctionDesc() { switch(this.function) { - case LOGARITHM: return "log10(x + 1) * 0.5 * " + reactivity; - case SQUARE_ROOT: return "sqrt(x) * " + reactivity + " / 10"; - case NEGATIVE_QUADRATIC: return "[x - (x² / 10000)] / 100 * " + reactivity; - case LINEAR: return "x / 100 * " + reactivity; + 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) { - setLifeTime(stack, getLifeTime(stack) + 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/tileentity/machine/TileEntityMachineReactorBreeding.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineReactorBreeding.java index bd98b28b0..613acc242 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineReactorBreeding.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineReactorBreeding.java @@ -40,7 +40,7 @@ public class TileEntityMachineReactorBreeding extends TileEntityMachineBase { if(canProcess()) { - progress += 0.005F * (this.flux / BreederRecipes.getOutput(slots[0]).flux); + progress += 0.0025F * (this.flux / BreederRecipes.getOutput(slots[0]).flux); if(this.progress >= 1.0F) { this.progress = 0F; diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityReactorResearch.java b/src/main/java/com/hbm/tileentity/machine/TileEntityReactorResearch.java index c227a12c3..9c8df327c 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityReactorResearch.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityReactorResearch.java @@ -65,6 +65,7 @@ public class TileEntityReactorResearch extends TileEntityMachineBase implements 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() { @@ -260,7 +261,7 @@ public class TileEntityReactorResearch extends TileEntityMachineBase implements if(slots[i].getItem() instanceof ItemPlateFuel) { ItemPlateFuel rod = (ItemPlateFuel) slots[i].getItem(); - int outFlux = rod.react(worldObj, slots[i], slotFlux[i] + 1); + int outFlux = rod.react(worldObj, slots[i], slotFlux[i]); this.heat += outFlux * 2; slotFlux[i] = 0; totalFlux += outFlux; diff --git a/src/main/resources/assets/hbm/lang/en_US.lang b/src/main/resources/assets/hbm/lang/en_US.lang index a8ff71e01..320f68387 100644 --- a/src/main/resources/assets/hbm/lang/en_US.lang +++ b/src/main/resources/assets/hbm/lang/en_US.lang @@ -2186,11 +2186,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_u233.name=HEU-233 Plate Fuel -item.plate_fuel_u235.name=HEU-235 Plate Fuel item.plate_fuel_mox.name=HEMOX Plate Fuel item.plate_fuel_pu239.name=HEP-239 Plate Fuel +item.plate_fuel_ra226be.name=Ra-226Be 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 @@ -2794,6 +2795,7 @@ item.waste_mox.name=Depleted MOX Fuel item.waste_natural_uranium.name=Depleted Natural Uranium Fuel 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 Ra-226Be 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 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 index 28a2a9127176ef8ffbddf6dd8a20616107e98c53..5046aa3af523a82abbeab4a7cd50d63be6c0f999 100644 GIT binary patch literal 3739 zcmb7H2UL^UwmwN92?z$IPH5IaR5T1AO-KL%rA0vnK?E-X0uIPfl@^9ND&oZgC=isA zAV`ts&=SiKX`u&^DiKJCfRs=IBsb3Wu6x&gcfI@Gzt&m*+2^dY_da`ndw>7`+i5#X zNpZ9|06_B8$rJVfK!j5WK*EKui@%V)zDYs$mZqSTuEZ7!BHkvpCID2VZri*pDwM^p zpS%zRz;?>F0nrn6*e9G|PMt708-8ha#3)&Xrc7IyzLc&G0~J!({HQC(1v|E;y18|~ z-*HuN3Y;C6$yG{;fu;pTHg;{}h_RjK4uE08&cxN%2-W;1xpeLU-&~_*Xpmk2iQNPP`u-*U!4&I^r!o3_+wU0m$(0J*XgShy@mT@ zeQCP)WqtjVM#CI^2FVt=si!_Ol`i{$DU<6w+bk${6L@j!#{|1IJOl-W zeHnna!WbzgFWnwplKkCHdFErfEOn1VD$E;ZnV`K@3y0L!)WF3=M&QLX@A_Nk28#OC z@=5wCHsWw<%YC)p7M&^b0kE>N(lfb-w`u^9VxIqaOl$fG4BSdc9C0ywMuHvOdMU|q*j5fbz z87yx$M8uy*^_(W!E`tg6dKAu3M*}T?y1OX$7QE->>#Dqv#KRgKEk*yuJNop`aqFM# zsA4`^L3YH#^Q!M0Wxxzy_2Jgm*27!P@Uwlht#y|aIg;m``@D~3TtJ$&g{7t*5uN+; zCBH00NkzrWx;L-Ny};&Q=-3%m7H- z0SK2xfV+YtB&R4u*41ZlEEWa=1;(MsS8*=OYb6o!k1`{39y>>UZ7;z?E;0u=85u2VcQO+S z{Z>4HEn3j=D^WCTzl$g)!GwzZzSVXXuy&riz%~_ZrH5f{(nH+q<0490w8*F#UnSsQ zPCt6HQ{GQmmnHA)eenC4qCoJyn}ZOeWfI1 zv38yD`vR#GBnNVy=hV5(*chAjC4pqpIbh>D2BCU1dKqLabSdPsp#XF?Ae=$sxL z8nV7kq2DX;jPi=jjKpaBi^3%iiGvV9YAc`5w=(yD9h?dEbS+EaCLYw7(Nb*x9QSmx zo@SX24GRtJah(48731<)KEeDM-G{ob6nd3lTRF*-)X=_>Sj|IvfQ2<9LS8dvA6o5X zd!ZWD##kYZm@|xgmx9aghGodZA&|F7K*b2VMb-pMn^bFmcMo2jb`=tya-i)4i%YH_UN(7qHnfT@<0KmoS^G z{L06}s;bTiA{b}H&I+^X5bWz@=JJ=QtD9S_Drs(;akRR9_1)-oH30`}zdVYoDRr%X zq`}w*@mdt)IIE&#VtnV{M>6}zcV2@sW+azDiIQB8B4irTv#`GeTzM zn~#j7<}u2dF!ILKDrMnG$E{(`&tOB!!ydLd74f{T zwIofR-8ql>k0XLFqmBKCNOqnv=8lI%v>$ia7*9U#OKQeuotphnGtCd!k7)OEEWHxL zeRdxCCkIS9siFntzVjC)$Jd7mIc^_IdixDet&Tm+(ZqbH6qfTgA!SyFm7~i#b-XB5 z7igK(_c6-xIJ`I-Tf4U1Jxz=QhZi?wKPbCjN;$-f0P(mh+WdvSCfN^BPYl;71sw(x zF&pw4sPIGAr8&3dk9yti@K=-*P4ds4eg1_pRM`9+HNDB)1M1i^P)7F}O_#TQRk7jf zh55-b;sHB^^RorK*=%->fWa8!9b2`25^@Xu`{)xBW*9Oy@#>s_t4&^T3@n_LPzzv2UJ;oGt!D1ie}HO z;R;hEJ=b&XqK&C1hwmP*6G7UH@cB)bkg>>MaU7FYawXl7U157%9pa63R0ExXqp8i&j|5LoiyqvpP32OaES|5EhjNV+ExqYNHVHeTa~;rfM#Hxv%!w1O@~S3-2)%1nRpHIm4XSa0YeZ9hZ`Mf%Q05TIc3FXZ%J zMY$~0_@}o??4=K`u9WEPS&{N=%oL1;pN!w->SK!ZYEY+zzNu375}Cn!0v3#AItJRq z9q!J?`xq_*-dhDB0sdDT|G^>AX_&i3E~Z9W&d;zN(M4<(GpXx|m->h5c4Qy%?^kVt zWGoaaeY+kB;!GHe$g{%+nPHj`WPr}sa=&~_^F9HJ@d!V~i z{;98WqE3+fHXHlms9RGz{f`n1yepfs#1MW|5AMPItj*V3G`ybO2z9VzB7}d0|Ieq< b=>;EU8WE;C?{8i4?d&OYyA!3R?!W#GXO^l9 literal 3659 zcmb7Hc{G%5|G#Fji%~+>kq|NorN|g6+eETtkF28}G{_q6ibsl&Whi5b7}ZmW44I4; zjU}{5G76!^ZfuQZ<~N@6KIeU&_mB6yzx$l)+}Gz^_jTRh&-Z-p&-Z($+Syuc5|$MP z0Bo|dJZujDj5mb=L4MxNBa9NTfx_)A%)tFF`JX(13^cVd1)w@ZWbG6m4-1{ObPWeU zta)R=PWPq?@lG1DI&A6~eRArvN!rJ63Jju`T2HFAx>Hp?#Ozly++SzCOI_-Y5gA&N z+%wSr{JORJ%V<-xwj5PC@^(j*rIRZPe>esAtE_hX><`GYa_8|}Wd)i1mAmv;-E)Q2 zN+xwm-1R1}cPgt1`}0PMi!+o=mS*NWkZFBm9i%|r&jSN#byRA0cVtvlS>>@}wRv}U zcli;qncEKDwdJfC&YI>*%L6ghv5A?4D<^5uSsX17OGa4RHvXqX#j*z{pWd(Jdha;KwExfT%C8Jb-~FX6MhCI!rG zp0igOUaIrmyJAH|MA~{7U0t?@1_%AAS@Hy!D0EB&r^yZs z<-9((9g~>eQA~i*UWCAovg)L%S&&cUc3W1Ob0j~pgii<5g8mjyfZO8+Li8GvbS7|# z1X%4QDTq1H+k3+BYEzGBXmknRP>Su#gslmopQM@@KNmXiq+6lI2UD@>bnfchU@c%t zfZ@q06H~@1>}u4?#|K^{tFoE$oq%(G+;L&J+V`!6^L-Q$^MEIrjxF!Vn3A2Cn9vQn zeNHtnp=#}{3b;|ma_)%~w45K5td{_tcI-3bcT@rOITkXCn%*(*8@aOZbKfeEb>hS= zPu~t-RKT8(_BwL<)`O{_e)Z^wd>TloFUPc?y; z9viL<6salWfWCt)=q@tGW971Qb8~+@yCe|IhZ||%EeNfT{|;bpMB~8+WYt=C~Mj($S2N5pnP*v!g{P%+lkj0Qc!{O7)jdk-u?S({zT%Q^;#3( zfg(fY+0}YWJvyaCh6KiFT3oh>blEX1ce_SBogDC*>7a^yO)v>dpV4f!0QF9H*1rA_ zP`|!iOu=N^=#rb0L!aUxDwD`55AUul=L+pY;`Yp(Ntm~{4)>Om`+nkGLx_!k+>b2; zC0J&L82tho+3#coj#?CYj_SFSI*^VHtd0pvN?6@i2d1J~iSc7Zv!hvKYhWFQBvjs8 z;FYHrTA77l$`8l|o`{VxZIPrh#9;ifn^N!)HGmrO**b7ti>@p{p^?qSPCKleH|mt6 zrl15fKVjH9f$Q4>v#~sU?J1Ny8jV`M}N-e+%YUW<~sQ zn7;jD_)zW0PLe2Bn+%1Ahm(;P5Ati76bEbe)QJVhdAP}rn5qT>dE;39Z63a9EVy@2 zkVZkb3U_)7P*%MChhCViL^|^jNE#7^s?TTvnbtBF=?&~4100SIds`JD(BOtLc%|An zueORg2rrR=l{hb9ns*E)GcLeKweCnd#Ob`MWW9$ALQ>83lEwmPqrDpMcB7AAHkDgi zxb+v*QIC>te_H~r&$1!NCnnG$y)*HdDh_zS)9{hsr#=gNxVTtWU?U?V-!%-o@*E+x z+tdsoaUkt#ywF2ucIDv}A)mE=@zzt7>f-RXa6%gIJ#T~rcbWrmMFK!RNWcpU?0n@3 zQEAg~o$DFy(##j0&{;tqhNC4LJbQBnLT-+?nqiQ*{m5o_vHE>%dVO>&?V}-^h5ydh-J4gz$9pD!wgoo?7d3xHkfBovS5|r4dm{YYC ze4;Ll3O#<^ZL(JXz;7(RSKvT>w^zMPJc})D#a?MFzV7Z5e=2UMEDTs4$^97iN!2~( zkhV(hDv6$u=v7VH!~GH^n19J#etqb${mar3_3VmsANv%4$u6owRcpFa@0XS$b@vL? zRTD#0$rDmcgjd-Nf@04O{Z5k_$cd1^Z8d};`aXYF==qdBbz!#?3{9n6vEITOOyvH$ z>vvM@xA3!}g|4Z2BvLjTQ*Au!bO0O;ByXsh;(xTV_)I}*X5i4wV11r^PsKva*&5^7 zs2R2(Y`y z%DC|QaijLCE5)Cs$ZA`idGu=57oD!cPO=|1I+EHBLzi#vXKDIT{2yhoR}TJq9{`e~ zBb*Y>8GOh(|D;b5jxKbA=|ltz0Fx2z-j*d47~YS-@%QEz7azmQ$-$eIU?n6y@ah_v zJp_I@@sw!_a#X-V`!ub9X3Lx$(oo(|Lacu=BA?mcZyi{93BlLu?5I((v>IL9eoO=n z+`x$a!j6*3o^ne%B-x;!`KY!wM>4JegYTSzWnQwl0Bd1&U6Z}Zy@-bZuRf3_yO@nz z>mNSMJep1>lOsYrdV72QzJ_O_01O32e7xY3P8^M_go`ql65t0W7e-CdZXo?FTt?au z25S-gGfOD1udV*Je}28kKL~hpxUAOC@M0`5XAviS;(j0mEu27k6f&$W6#Zn4OX_-5 zQC<^#M@6K8#~%f%uyCkRXpuLkj3Y7;l@uULl;$OScC+{8Ll@gnUi3Nn2SZ-OnB5_) zn>CFV;nnZ)Xbf!p?kxFMQVk!v3@%>UI#ga~k|$ZUmY9Ke3Y)dgDw;IhXJAnF;lqdW zT^LM7@lxOw=8G{mmkqr)DT|7Ph|gohVQEiz7HE?Hv(D5vu z^Sou@!Oj?^Cfepkf8jY>Kx}=n~>}v7tz8AfyYbCk)A7bzAsY_`eRGd*L_=Cox z(%L&PPNY3EoNOQG==qoo%@ojYIusx`*J_`{V$09qdj-w!HMW( zNd8UaPo@l&7q0dUSxX^$-}}-)l3|DbqW{2}!EOHt(Yjp@Y=5({(1K;Ly!JDCxt}oS z^7in*nV-3YB3RjueU}&%6V*Ls!|*QX{>t(lSTH!knFh)znOwTbmkjvLnue@(_a0aC zzCbRGEvCeG->0srsi^Bj+;1+HXIsl^Y_=N5x;uF>U+hh!3qk?1$xx&thqKu9VoG?o z-$`so0@lt$tmp8U68{Xj$oNdhVAwt?p6t)kY&gH~VtXhGzV$derR?oBQu}YDgV>Iv zKzS&&-DFo67Hqrhn~;EI-wTaYf<%AKWf&+)k5k0aSFtbwP44V|gg0Ra;7AKVGXxW3 zB!otW*|AfqbU?+e6o5*ClG{x@J_%=ururwIa(GJwm;Jo1XiRq-Qr2E%J1Ym^@%W#U z`U`gK^fvy}PL7;Yns+2w{x()hxr6!rP5170&j3DadJgmF&2Sq!bk62;hqPhslu-J5 zI_B*Tgk+6FVTI{*RUd{gq44Ko~^rn7u!3s zZ*0-e!s#0WH=M%{orl@9$_4UT-u77Ghl&QS$Cm1Mfak-Tfn6E^k}3fFX$tWF6&8-b zXwh@q*~XC$2BBa4jK%IT(&s?GgCW||K^Kiw`6B6S9P&uf9C`X!5NMTtlT-+knX8bQ zAZ9PVffK~z|6LaU;_dW71pYh6zpdtn9|Y!nk-Suv_P&S) zQ$&8CbC}m8{QErf7JaV7?+pnzJe$rJkgpyu6)!mu_q{VOFYleJcOPZ#lwZ`)E;9U( l#h3u^5AOeY{c-sg7ZII*W^Hdxp~uEvt0T6D@0)pF{6AJQP4WN$ 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 0000000000000000000000000000000000000000..1b4d8b7afc1764c27f68663293a748a0d0f8799f GIT binary patch literal 278 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G}T0G|-ovYLXF+_)*z`ICK8w&D+*Kes;H`uc?1(XLLPK5yN8n8;5}u zcS(?6@P9a9@bYK;1Qg~h@Q5sCVBk9h!i=ICUJXFObWaz@5RKr{Gl6^u6gZdz1X3>l zmaoV){2gIrH^q)=oBdbrZ)Sggb~yk2b)rL2$ROP(fY~USo8foFj5S3K{5&(0!?;$d zZqj?syMJ}bq+;2vD!ykqvvnsvPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi!TaYk zj4k)e?VPi-*LSBe7#rSn({ppq`|>`Y_xpX%d-%VZo4GCKW|E>k?2FQV_K=#sDaIpV z20U)Q?ta5GEtXbRd)D_2NT-q_8Vcc5nm7~%hvq^zo8$`xYNaBJ%WpegPr&T_9T6QH zLzS|j8>pI!+cO};KsR)%m17Qn=XtjD%67W~((`x4(&)Nu%l zVyTRxc{r5SJbkjLINI)CIXuo#AOKDkkI#?OEqB)3G!+$J;4H2|Kcm45Ox=i6s#a~! z4zT4&l=HzLm2w5QEL${8*@nO}b$o+f@_&xd8*uSbgb%q5TW-;*AQ4aS>)?Qq;UR=+ z(3E1We1uUcQY{zlW@E7!>mS$I{IbRJ^A~pec7R^j$*yII%aDnQD>!87MpGb!pjec$ zWpaJ;8mrm&{Mi55ky~_L9z9+VUU}4_p>uU|3XkSwdv^!bp%9V>o7>#t``%uc+@fpn z@WDNK>jc5k5$d&L61S3abA!*@JAB&6@%qhL*ZLMc6D=~CS^N5)8$KhydxiZ%iItb{ o`mQ~dh0J}CN>88qFZ?5L0xey?S|637OaK4?07*qoM6N<$f{K Date: Sun, 2 Jan 2022 09:42:10 -0800 Subject: [PATCH 09/17] aaaaa --- .../java/com/hbm/crafting/MineralRecipes.java | 12 +- .../java/com/hbm/crafting/RodRecipes.java | 69 ++++++++- .../com/hbm/crafting/SmeltingRecipes.java | 1 + .../java/com/hbm/hazard/HazardRegistry.java | 2 + .../com/hbm/inventory/OreDictManager.java | 4 +- .../hbm/inventory/recipes/BreederRecipes.java | 70 +++------ .../inventory/recipes/CentrifugeRecipes.java | 12 +- .../hbm/inventory/recipes/SILEXRecipes.java | 135 ++++++++++-------- src/main/java/com/hbm/items/ModItems.java | 47 +++++- .../hbm/items/machine/ItemBreedingRod.java | 31 ++++ src/main/resources/assets/hbm/lang/en_US.lang | 59 +++++++- .../hbm/textures/items/billet_cobalt.png | Bin 0 -> 253 bytes .../assets/hbm/textures/items/billet_sr90.png | Bin 0 -> 1808 bytes .../assets/hbm/textures/items/dust_tiny.png | Bin 0 -> 318 bytes .../assets/hbm/textures/items/ingot_sr90.png | Bin 0 -> 1810 bytes .../assets/hbm/textures/items/nugget_sr90.png | Bin 0 -> 1829 bytes .../assets/hbm/textures/items/powder_sr90.png | Bin 0 -> 1942 bytes .../hbm/textures/items/powder_sr90_tiny.png | Bin 0 -> 1607 bytes .../assets/hbm/textures/items/rod.co.png | Bin 0 -> 237 bytes .../assets/hbm/textures/items/rod.co60.png | Bin 0 -> 250 bytes .../items/{rod_lead.png => rod.lead.png} | Bin .../{rod_lithium.png => rod.lithium.png} | Bin .../{rod_neptunium.png => rod.np237.png} | Bin .../items/{rod_pu238.png => rod.pu238.png} | Bin .../items/{rod_pu239.png => rod.pu239.png} | Bin .../assets/hbm/textures/items/rod.rgp.png | Bin 0 -> 250 bytes .../items/{rod_th232.png => rod.th232.png} | Bin .../{rod_thorium_fuel.png => rod.thf.png} | Bin .../{rod_tritium.png => rod.tritium.png} | Bin .../items/{rod_u235.png => rod.u235.png} | Bin .../items/{rod_u238.png => rod.u238.png} | Bin .../{rod_uranium.png => rod.uranium.png} | Bin .../items/{rod_waste.png => rod.waste.png} | Bin .../assets/hbm/textures/items/rod_dual.co.png | Bin 0 -> 263 bytes .../hbm/textures/items/rod_dual.co60.png | Bin 0 -> 272 bytes .../{rod_dual_lead.png => rod_dual.lead.png} | Bin ..._dual_lithium.png => rod_dual.lithium.png} | Bin ..._dual_neptunium.png => rod_dual.np237.png} | Bin ...{rod_dual_pu238.png => rod_dual.pu238.png} | Bin ...{rod_dual_pu239.png => rod_dual.pu239.png} | Bin .../hbm/textures/items/rod_dual.rgp.png | Bin 0 -> 272 bytes ...{rod_dual_th232.png => rod_dual.th232.png} | Bin ...dual_thorium_fuel.png => rod_dual.thf.png} | Bin ..._dual_tritium.png => rod_dual.tritium.png} | Bin .../{rod_dual_u235.png => rod_dual.u235.png} | Bin .../{rod_dual_u238.png => rod_dual.u238.png} | Bin ..._dual_uranium.png => rod_dual.uranium.png} | Bin ...{rod_dual_waste.png => rod_dual.waste.png} | Bin .../assets/hbm/textures/items/rod_quad.co.png | Bin 0 -> 284 bytes .../hbm/textures/items/rod_quad.co60.png | Bin 0 -> 297 bytes .../{rod_quad_lead.png => rod_quad.lead.png} | Bin ..._quad_lithium.png => rod_quad.lithium.png} | Bin ..._quad_neptunium.png => rod_quad.np237.png} | Bin ...{rod_quad_pu238.png => rod_quad.pu238.png} | Bin ...{rod_quad_pu239.png => rod_quad.pu239.png} | Bin .../hbm/textures/items/rod_quad.rgp.png | Bin 0 -> 297 bytes ...{rod_quad_th232.png => rod_quad.th232.png} | Bin ...quad_thorium_fuel.png => rod_quad.thf.png} | Bin ..._quad_tritium.png => rod_quad.tritium.png} | Bin .../{rod_quad_u235.png => rod_quad.u235.png} | Bin .../{rod_quad_u238.png => rod_quad.u238.png} | Bin ..._quad_uranium.png => rod_quad.uranium.png} | Bin ...{rod_quad_waste.png => rod_quad.waste.png} | Bin .../textures/items/rod_waste_overlay_heat.png | Bin 353 -> 0 bytes 64 files changed, 309 insertions(+), 133 deletions(-) create mode 100644 src/main/java/com/hbm/items/machine/ItemBreedingRod.java create mode 100644 src/main/resources/assets/hbm/textures/items/billet_cobalt.png create mode 100644 src/main/resources/assets/hbm/textures/items/billet_sr90.png create mode 100644 src/main/resources/assets/hbm/textures/items/dust_tiny.png create mode 100644 src/main/resources/assets/hbm/textures/items/ingot_sr90.png create mode 100644 src/main/resources/assets/hbm/textures/items/nugget_sr90.png create mode 100644 src/main/resources/assets/hbm/textures/items/powder_sr90.png create mode 100644 src/main/resources/assets/hbm/textures/items/powder_sr90_tiny.png create mode 100644 src/main/resources/assets/hbm/textures/items/rod.co.png create mode 100644 src/main/resources/assets/hbm/textures/items/rod.co60.png rename src/main/resources/assets/hbm/textures/items/{rod_lead.png => rod.lead.png} (100%) rename src/main/resources/assets/hbm/textures/items/{rod_lithium.png => rod.lithium.png} (100%) rename src/main/resources/assets/hbm/textures/items/{rod_neptunium.png => rod.np237.png} (100%) rename src/main/resources/assets/hbm/textures/items/{rod_pu238.png => rod.pu238.png} (100%) rename src/main/resources/assets/hbm/textures/items/{rod_pu239.png => rod.pu239.png} (100%) create mode 100644 src/main/resources/assets/hbm/textures/items/rod.rgp.png rename src/main/resources/assets/hbm/textures/items/{rod_th232.png => rod.th232.png} (100%) rename src/main/resources/assets/hbm/textures/items/{rod_thorium_fuel.png => rod.thf.png} (100%) rename src/main/resources/assets/hbm/textures/items/{rod_tritium.png => rod.tritium.png} (100%) rename src/main/resources/assets/hbm/textures/items/{rod_u235.png => rod.u235.png} (100%) rename src/main/resources/assets/hbm/textures/items/{rod_u238.png => rod.u238.png} (100%) rename src/main/resources/assets/hbm/textures/items/{rod_uranium.png => rod.uranium.png} (100%) rename src/main/resources/assets/hbm/textures/items/{rod_waste.png => rod.waste.png} (100%) create mode 100644 src/main/resources/assets/hbm/textures/items/rod_dual.co.png create mode 100644 src/main/resources/assets/hbm/textures/items/rod_dual.co60.png rename src/main/resources/assets/hbm/textures/items/{rod_dual_lead.png => rod_dual.lead.png} (100%) rename src/main/resources/assets/hbm/textures/items/{rod_dual_lithium.png => rod_dual.lithium.png} (100%) rename src/main/resources/assets/hbm/textures/items/{rod_dual_neptunium.png => rod_dual.np237.png} (100%) rename src/main/resources/assets/hbm/textures/items/{rod_dual_pu238.png => rod_dual.pu238.png} (100%) rename src/main/resources/assets/hbm/textures/items/{rod_dual_pu239.png => rod_dual.pu239.png} (100%) create mode 100644 src/main/resources/assets/hbm/textures/items/rod_dual.rgp.png rename src/main/resources/assets/hbm/textures/items/{rod_dual_th232.png => rod_dual.th232.png} (100%) rename src/main/resources/assets/hbm/textures/items/{rod_dual_thorium_fuel.png => rod_dual.thf.png} (100%) rename src/main/resources/assets/hbm/textures/items/{rod_dual_tritium.png => rod_dual.tritium.png} (100%) rename src/main/resources/assets/hbm/textures/items/{rod_dual_u235.png => rod_dual.u235.png} (100%) rename src/main/resources/assets/hbm/textures/items/{rod_dual_u238.png => rod_dual.u238.png} (100%) rename src/main/resources/assets/hbm/textures/items/{rod_dual_uranium.png => rod_dual.uranium.png} (100%) rename src/main/resources/assets/hbm/textures/items/{rod_dual_waste.png => rod_dual.waste.png} (100%) create mode 100644 src/main/resources/assets/hbm/textures/items/rod_quad.co.png create mode 100644 src/main/resources/assets/hbm/textures/items/rod_quad.co60.png rename src/main/resources/assets/hbm/textures/items/{rod_quad_lead.png => rod_quad.lead.png} (100%) rename src/main/resources/assets/hbm/textures/items/{rod_quad_lithium.png => rod_quad.lithium.png} (100%) rename src/main/resources/assets/hbm/textures/items/{rod_quad_neptunium.png => rod_quad.np237.png} (100%) rename src/main/resources/assets/hbm/textures/items/{rod_quad_pu238.png => rod_quad.pu238.png} (100%) rename src/main/resources/assets/hbm/textures/items/{rod_quad_pu239.png => rod_quad.pu239.png} (100%) create mode 100644 src/main/resources/assets/hbm/textures/items/rod_quad.rgp.png rename src/main/resources/assets/hbm/textures/items/{rod_quad_th232.png => rod_quad.th232.png} (100%) rename src/main/resources/assets/hbm/textures/items/{rod_quad_thorium_fuel.png => rod_quad.thf.png} (100%) rename src/main/resources/assets/hbm/textures/items/{rod_quad_tritium.png => rod_quad.tritium.png} (100%) rename src/main/resources/assets/hbm/textures/items/{rod_quad_u235.png => rod_quad.u235.png} (100%) rename src/main/resources/assets/hbm/textures/items/{rod_quad_u238.png => rod_quad.u238.png} (100%) rename src/main/resources/assets/hbm/textures/items/{rod_quad_uranium.png => rod_quad.uranium.png} (100%) rename src/main/resources/assets/hbm/textures/items/{rod_quad_waste.png => rod_quad.waste.png} (100%) delete mode 100644 src/main/resources/assets/hbm/textures/items/rod_waste_overlay_heat.png diff --git a/src/main/java/com/hbm/crafting/MineralRecipes.java b/src/main/java/com/hbm/crafting/MineralRecipes.java index d9931f20c..b58cf4fb6 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,9 @@ 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.fragment_cobalt, CO.nugget()); + 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 +190,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" })); diff --git a/src/main/java/com/hbm/crafting/RodRecipes.java b/src/main/java/com/hbm/crafting/RodRecipes.java index bd521348c..b65920aa0 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; @@ -109,7 +110,37 @@ public class RodRecipes { 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 @@ -204,6 +235,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() }); 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/hazard/HazardRegistry.java b/src/main/java/com/hbm/hazard/HazardRegistry.java index af19f345c..7e56c45d7 100644 --- a/src/main/java/com/hbm/hazard/HazardRegistry.java +++ b/src/main/java/com/hbm/hazard/HazardRegistry.java @@ -57,6 +57,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; @@ -292,6 +293,7 @@ public class HazardRegistry { 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_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)); diff --git a/src/main/java/com/hbm/inventory/OreDictManager.java b/src/main/java/com/hbm/inventory/OreDictManager.java index 45970845f..5a1b2bac8 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) .billet(billet_cobalt) .ingot(ingot_cobalt) .dustSmall(powder_cobalt_tiny) .dust(powder_cobalt) .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/recipes/BreederRecipes.java b/src/main/java/com/hbm/inventory/recipes/BreederRecipes.java index 01056cfa9..ddd05da74 100644 --- a/src/main/java/com/hbm/inventory/recipes/BreederRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/BreederRecipes.java @@ -9,6 +9,8 @@ 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; @@ -20,64 +22,26 @@ public class BreederRecipes { private static HashMap recipes = new HashMap(); public static void registerRecipes() { - - //lithium and impure rods - recipes.put(new ComparableStack(ModItems.rod_lithium), new BreederRecipe(ModItems.rod_tritium, 100)); - recipes.put(new ComparableStack(ModItems.rod_dual_lithium), new BreederRecipe(ModItems.rod_dual_tritium, 200)); - recipes.put(new ComparableStack(ModItems.rod_quad_lithium), new BreederRecipe(ModItems.rod_quad_tritium, 400)); - recipes.put(new ComparableStack(ModItems.rod_uranium), new BreederRecipe(ModItems.rod_plutonium, 1000)); - recipes.put(new ComparableStack(ModItems.rod_dual_uranium), new BreederRecipe(ModItems.rod_dual_plutonium, 2000)); - recipes.put(new ComparableStack(ModItems.rod_quad_uranium), new BreederRecipe(ModItems.rod_quad_plutonium, 4000)); - recipes.put(new ComparableStack(ModItems.rod_plutonium), new BreederRecipe(ModItems.rod_waste, 500)); - recipes.put(new ComparableStack(ModItems.rod_dual_plutonium), new BreederRecipe(ModItems.rod_dual_waste, 1000)); - recipes.put(new ComparableStack(ModItems.rod_quad_plutonium), new BreederRecipe(ModItems.rod_quad_waste, 2000)); - //isotopes - recipes.put(new ComparableStack(ModItems.rod_th232), new BreederRecipe(ModItems.rod_u233, 1000)); - recipes.put(new ComparableStack(ModItems.rod_dual_th232), new BreederRecipe(ModItems.rod_dual_u233, 2000)); - recipes.put(new ComparableStack(ModItems.rod_quad_th232), new BreederRecipe(ModItems.rod_quad_u233, 4000)); - recipes.put(new ComparableStack(ModItems.rod_u233), new BreederRecipe(ModItems.rod_u235, 1000)); - recipes.put(new ComparableStack(ModItems.rod_dual_u233), new BreederRecipe(ModItems.rod_dual_u235, 2000)); - recipes.put(new ComparableStack(ModItems.rod_quad_u233), new BreederRecipe(ModItems.rod_quad_u235, 4000)); - recipes.put(new ComparableStack(ModItems.rod_u235), new BreederRecipe(ModItems.rod_neptunium, 500)); - recipes.put(new ComparableStack(ModItems.rod_dual_u235), new BreederRecipe(ModItems.rod_dual_neptunium, 1000)); - recipes.put(new ComparableStack(ModItems.rod_quad_u235), new BreederRecipe(ModItems.rod_quad_neptunium, 2000)); - recipes.put(new ComparableStack(ModItems.rod_u238), new BreederRecipe(ModItems.rod_pu239, 1000)); - recipes.put(new ComparableStack(ModItems.rod_dual_u238), new BreederRecipe(ModItems.rod_dual_pu239, 2000)); - recipes.put(new ComparableStack(ModItems.rod_quad_u238), new BreederRecipe(ModItems.rod_quad_pu239, 4000)); - recipes.put(new ComparableStack(ModItems.rod_neptunium), new BreederRecipe(ModItems.rod_pu238, 250)); - recipes.put(new ComparableStack(ModItems.rod_dual_neptunium), new BreederRecipe(ModItems.rod_dual_pu238, 500)); - recipes.put(new ComparableStack(ModItems.rod_quad_neptunium), new BreederRecipe(ModItems.rod_quad_pu238, 1000)); - recipes.put(new ComparableStack(ModItems.rod_pu238), new BreederRecipe(ModItems.rod_pu239, 1000)); - recipes.put(new ComparableStack(ModItems.rod_dual_pu238), new BreederRecipe(ModItems.rod_dual_pu239, 2000)); - recipes.put(new ComparableStack(ModItems.rod_quad_pu238), new BreederRecipe(ModItems.rod_quad_pu239, 4000)); - recipes.put(new ComparableStack(ModItems.rod_pu239), new BreederRecipe(ModItems.rod_pu240, 500)); - recipes.put(new ComparableStack(ModItems.rod_dual_pu239), new BreederRecipe(ModItems.rod_dual_pu240, 1000)); - recipes.put(new ComparableStack(ModItems.rod_quad_pu239), new BreederRecipe(ModItems.rod_quad_pu240, 2000)); - recipes.put(new ComparableStack(ModItems.rod_pu240), new BreederRecipe(ModItems.rod_waste, 500)); - recipes.put(new ComparableStack(ModItems.rod_dual_pu240), new BreederRecipe(ModItems.rod_dual_waste, 1000)); - recipes.put(new ComparableStack(ModItems.rod_quad_pu240), new BreederRecipe(ModItems.rod_quad_waste, 2000)); - - //advanced - recipes.put(new ComparableStack(ModItems.rod_schrabidium), new BreederRecipe(ModItems.rod_solinium, 2000)); - recipes.put(new ComparableStack(ModItems.rod_dual_schrabidium), new BreederRecipe(ModItems.rod_dual_solinium, 4000)); - recipes.put(new ComparableStack(ModItems.rod_quad_schrabidium), new BreederRecipe(ModItems.rod_quad_solinium, 8000)); - recipes.put(new ComparableStack(ModItems.rod_quad_solinium), new BreederRecipe(ModItems.rod_quad_euphemium, 2000)); - recipes.put(new ComparableStack(ModItems.rod_balefire), new BreederRecipe(ModItems.rod_balefire_blazing, 2000)); - recipes.put(new ComparableStack(ModItems.rod_dual_balefire), new BreederRecipe(ModItems.rod_dual_balefire_blazing, 4000)); - recipes.put(new ComparableStack(ModItems.rod_quad_balefire), new BreederRecipe(ModItems.rod_quad_balefire_blazing, 8000)); - - //rocks - recipes.put(new ComparableStack(Blocks.stone), new BreederRecipe(new ItemStack(ModBlocks.sellafield_0), 250)); - recipes.put(new ComparableStack(ModBlocks.sellafield_0), new BreederRecipe(new ItemStack(ModBlocks.sellafield_1), 250)); - recipes.put(new ComparableStack(ModBlocks.sellafield_1), new BreederRecipe(new ItemStack(ModBlocks.sellafield_2), 500)); - recipes.put(new ComparableStack(ModBlocks.sellafield_2), new BreederRecipe(new ItemStack(ModBlocks.sellafield_3), 500)); - recipes.put(new ComparableStack(ModBlocks.sellafield_3), new BreederRecipe(new ItemStack(ModBlocks.sellafield_4), 1000)); - recipes.put(new ComparableStack(ModBlocks.sellafield_4), new BreederRecipe(new ItemStack(ModBlocks.sellafield_core), 1000)); + 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), 1000)); } + 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() { HashMap map = new HashMap(); diff --git a/src/main/java/com/hbm/inventory/recipes/CentrifugeRecipes.java b/src/main/java/com/hbm/inventory/recipes/CentrifugeRecipes.java index ce212cd0d..050c8f58f 100644 --- a/src/main/java/com/hbm/inventory/recipes/CentrifugeRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/CentrifugeRecipes.java @@ -72,16 +72,16 @@ public class CentrifugeRecipes { new ItemStack(ModItems.nuclear_waste_tiny, 2) }); recipes.put(new ComparableStack(ModItems.waste_plate_mox), new ItemStack[] { - new ItemStack(ModItems.nugget_technetium, 1), //strontium-90 here + 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), + new ItemStack(ModItems.nugget_pu240, 2), new ItemStack(ModItems.nugget_technetium, 1), - new ItemStack(ModItems.powder_cs137_tiny, 2), - new ItemStack(ModItems.nuclear_waste_tiny, 2) }); + 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), @@ -91,14 +91,14 @@ public class CentrifugeRecipes { 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.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.nugget_technetium, 1), //strontium-90 here + new ItemStack(ModItems.powder_sr90_tiny, 1), new ItemStack(ModItems.nuclear_waste_tiny, 6) }); recipes.put(new ComparableStack(ModItems.waste_plate_u235), new ItemStack[] { diff --git a/src/main/java/com/hbm/inventory/recipes/SILEXRecipes.java b/src/main/java/com/hbm/inventory/recipes/SILEXRecipes.java index f79bf9d70..5c6ffefb6 100644 --- a/src/main/java/com/hbm/inventory/recipes/SILEXRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/SILEXRecipes.java @@ -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/items/ModItems.java b/src/main/java/com/hbm/items/ModItems.java index d928c0ecf..42d58720d 100644 --- a/src/main/java/com/hbm/items/ModItems.java +++ b/src/main/java/com/hbm/items/ModItems.java @@ -82,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; @@ -185,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; @@ -233,6 +236,7 @@ public class ModItems { public static Item nugget_polonium; public static Item nugget_technetium; 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; @@ -355,6 +359,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; @@ -377,6 +383,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; @@ -952,8 +959,14 @@ 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; + public static Item rod_dual_empty; + public static Item rod_dual; + public static Item rod_quad_empty; + public static Item rod_quad; + public static Item rod_uranium; public static Item rod_th232; public static Item rod_u233; @@ -978,7 +991,6 @@ public class ModItems { public static Item rod_balefire; public static Item rod_balefire_blazing; - public static Item rod_dual_empty; public static Item rod_dual_uranium; public static Item rod_dual_th232; public static Item rod_dual_u233; @@ -996,7 +1008,6 @@ public class ModItems { public static Item rod_dual_balefire; public static Item rod_dual_balefire_blazing; - public static Item rod_quad_empty; public static Item rod_quad_uranium; public static Item rod_quad_th232; public static Item rod_quad_u233; @@ -2559,6 +2570,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"); @@ -2652,7 +2664,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"); @@ -2762,6 +2776,7 @@ public class ModItems { 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_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"); @@ -2829,6 +2844,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"); @@ -2850,6 +2867,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"); @@ -3470,8 +3488,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 = (ItemEnumMulti) new ItemBreedingRod().setUnlocalizedName("rod").setMaxStackSize(1).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 = (ItemEnumMulti) new ItemBreedingRod().setUnlocalizedName("rod_dual").setMaxStackSize(1).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 = (ItemEnumMulti) new ItemBreedingRod().setUnlocalizedName("rod_quad").setMaxStackSize(1).setContainerItem(ModItems.rod_quad_empty).setCreativeTab(MainRegistry.controlTab); + 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"); @@ -3496,7 +3520,6 @@ public class ModItems { 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_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"); @@ -3514,7 +3537,6 @@ public class ModItems { 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_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"); @@ -5591,6 +5613,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()); @@ -5682,7 +5705,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()); @@ -5736,6 +5761,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()); @@ -5818,6 +5845,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 @@ -5896,6 +5924,7 @@ public class ModItems { GameRegistry.registerItem(nugget_neptunium, nugget_neptunium.getUnlocalizedName()); GameRegistry.registerItem(nugget_polonium, nugget_polonium.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()); @@ -6540,11 +6569,15 @@ 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_quad, rod_quad.getUnlocalizedName()); + //Fuel Rods 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()); 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..669f60693 --- /dev/null +++ b/src/main/java/com/hbm/items/machine/ItemBreedingRod.java @@ -0,0 +1,31 @@ +package com.hbm.items.machine; + +import com.hbm.items.ItemEnumMulti; + +public class ItemBreedingRod extends ItemEnumMulti { + + public ItemBreedingRod() { + super(BreedingRodType.class, true, true); + } + + //TODO: Remove old rods + public static 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/resources/assets/hbm/lang/en_US.lang b/src/main/resources/assets/hbm/lang/en_US.lang index 320f68387..b2354bacb 100644 --- a/src/main/resources/assets/hbm/lang/en_US.lang +++ b/src/main/resources/assets/hbm/lang/en_US.lang @@ -922,6 +922,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 @@ -1329,6 +1330,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) @@ -1707,6 +1709,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 @@ -2060,6 +2063,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 @@ -2154,7 +2158,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 @@ -2283,6 +2287,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 @@ -2404,6 +2410,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 @@ -2412,7 +2466,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 @@ -2441,7 +2494,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 @@ -2459,7 +2511,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 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 0000000000000000000000000000000000000000..5f2e78e5b2bdc6c2a9ed67682bf83aa71d55cee7 GIT binary patch literal 253 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G}%0G|+73&*(3is=pg>n1HcaOmQ@fcQF7(~#(_PN4k9#`XF@inAohFZe$c zFa-No2!R9(JR*x382Ao@Fyrz36)8Z$Fi#i95RKs8(}7$E3^ zaB^>EX>4U6ba`-PAZ2)IW&i+q+U-_bvg;-g{AU$e0yDgZzZD{A{$56AaPo7w4U{o%iiQ@5aTijs}Ly zpf>9)nBH@`X3@Hw$L5b?F4mp#-o$-P(Uy{*wD>%pksX4E8` z_Auy}LAjZ)d6a<5!49)T6wyf+NM3c(8KqDphALf=rAmo9wOJP`fM~gKK+Rkr)bNQ3 z9JxRxf<`FRIY6;$1Y#9#${4u$z(O-`ocRg~GFL)ZCIlO@zb)#k#-9|`!7eBwEeBV? z#baIr#!znD(F=l5-*j`6;Js|}>(l%hQ`Mr|pjj}$r1J`q9X;ljnK~QvbEwx6A{FWu z02Cp&0~j(;KzlNdJn6t3h`^&jpakS>EN3V{&T$1uw#Il?frUqIyc1~lWyhX}8+#Lk zaK@VeZLp>wmbDJ^Cs@H8O3pazobxU?Q7*dVjkn%;?}HzkTnZ-G;DQe!NQfbc5i3r- z1QCgnB1eNg&_y3Zlo(@5tP&C>#7gL&;K`g#w%KK$LzWzKDwsaS7FT=;MM^BGay1p( zMD;aPsj;R;s$r*Swz=k8XwqU!9doUlZoBKghb}$#bf~te`c!_P8f~iaRBH4KhidSu z5cUu>wi7orgJNt6iie@V*ujQoTF6=+$_>qQWGo8D0O^J{s?tyl652-WIvv_Ql>3%$ z%E`BM<4?+|A>Hp#PC>e7-Cn3x$9Jww#nvhuoN9yBhxR5(v83@)OMkciKhVDwsHLW+ z*;#6N+siGhJ6qm|R6o!CoVs-{YM2(M9EU%SSGMjJK2w{e-L$Y9r}-*QAa+{0KAh@k z{ZyNj*V`pw3FkT=aO`pu1de{yZ07EwD!Wxey|tB6cZ-&- z6%Gql)A*!SUVw4jJxQ4I6|Oo^9?-gpPXpj-xhzt6O`=?iJ(Hxqvv<_BLNm^$vio|V z<KX?$-8M6+q?pUEh@n@6 zY4#(Egv=~sR+7^29bfkd@ck~%v;6D+9DQoRVn9G7o?(V*6R#5|Hf@9RK5>MVWtI4x zc+8{=5os_B$37drCxPx4$N3lmLc2h-?l|Aaj?+8=g3rK}-u7=afay=t>uoJ|1Pp8g7uRh~ z*#j|5JVq{b5J@}BvpGt?COWY( z#&fbY7>0qq?>7V|c0#2T%X09HryAR~YaP-|N~!hsdgAfS6cJbhH*G=tBLmFyjMh`& yq>W?=O;f!0PW85tQsEA<$u}r}@)vSf_!KWM(^@4>IE(WD00001poj5 literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..8a866399ebea2709be26091a5ec0641fe7d65ecb GIT binary patch literal 1810 zcmV+t2krQYP) zaB^>EX>4U6ba`-PAZ2)IW&i+q+U-|ccI+q&{AU%j1SAlMD1_?dydh*LqYP%4U#%rh>?|oSlCzN%S zHceYv&c?I3R``f0RlzLB+#J;Nt~&xZE^--t!kwMRJVKwHcVwn2EF=iX&GOCw+Uo$_ z1o@E6ee_T1F8G|6-rdDAtQbLfIzaL~_%p;;j@^lfZwI;@rXGXbd)40CzPjuKA{tgk zS#v~Z8tHXI$lZJ`pha8)InI{Q)Mi^id9}rEXoV6nSm}m5Rm#+<&Aw0pM9+;QdgcP6 zhE84N#KjGs{AkoUg1zb#WEF14IjH%>Lep=W{t78PSHe^#7#mc-Z06nIcbe(Fj1ZC4 zGgiRGBXa>`FgNa)1wyDV-ed;&Xp4S(l|M*TFeo$3iUnr7?It#%OK!Qzv%@?=zi%Nj zu`UA$5qt~4kOKoYkP`}IBXcA|92Ep*ARl{U0|O+&6(HF=7uZBr9=`ETq&b&`0}nN7 z6NnHOTm(1RUm(kSLHxF2F$uFdDZ?c3g5zT1anE9TUwpJolmZXU@$B?0$smmi{YruROo%-yx!Onzhd$wH}Uq z^7THCa3o$Z)o&!YdF9#8_2Zj(_0I0;+&WI;LzlNHZ6!Ms-B!=d=8i>O%1smZg1`{# z5k=nfNH*2`&0Ki*wUy$(sz}|JS!#J}!T0+3LifvB#X(5oG#yJ)zYjz@<7AE{s7%BW z2lR@u|7c^-|T3j3j z*Mfr|i&X~~XI&j!1wrrw#Ldk~(M3x9Us7lhCCFw^@<*ZFn|$6Wo8+3l9Yhw__~LWuXhoi<$dnY(WhoD2KYqcS!S3O;tk^I&5FT! zpE$@0vPyhTJZ{nji66PHxctUB@36o#gJvo@PaGr`^KGoOF)NrFag;c$YC7c$X_r;b zTb#90l{N3lUl_>hE6ZG`IgB_Ku>=Vs6jV_}2^BgpF2XskIMF-^x7!WBNz~#v20002ZNklyJP}qf}=oyQ5+0({L0qpy|Z-(f0J4vwL*S^YK82& zR?KNTkz_IGeqJtHs;ZiZSF1JVd}Fgup*cxjE2Qs_SZk9|S(b#2#?3);0IfAm(?lg9 zq_xI5_fpTp;$4!0qJmJ8f&jetPl0oeq9_2c*3QD-dxqisxZ4X^ejCRiz(bOPCVL<} z$GGoWj4^Ma=pqToLcutup=iQae3Qu+GQR741pz~H34);oy8r+H07*qoM6N<$g85Td AW&i*H literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..5b3567ea898b38838262ab445ca842faba5743e2 GIT binary patch literal 1829 zcmV+=2io|FP) zaB^>EX>4U6ba`-PAZ2)IW&i+q+U-|KlH@iFyz>=)0s(LVpTjl6Kk)ONT%@k5p7GR7 z&%qIPu_Zzv1*S5=rA`0q&td++kFBb4K59rISo~aai8Bnf`@cWM!t}&=Q`;DF!))VN8d;-cGnPId?knr>NlRJS@-$qCpAE6fBbv+#y zlye2L@dVrN;@LbpTm(zaV<2JfLSollcORJ-Nyf$dj(%1WY!Nl6ti*!^ggkxTO`v@w z=!xXZGOz64)(iQZk6&K642L5a-)tcNZSohz4+G1Mh@TqG!Ig6Mh5qMMxl!2VZae)HlJvV@4Clc61R-R+yok*)Mdk#F^ zSeqb(mmm?^U`|0S=REQ!Iz?;UdKqUqXpRODee{eX6Uzh8nBZRCD7d z4a-CeEjDeb9aTS-pHPjCYP^)1{o<_} zye7sg1kL5dPtBkhJA&eIDlk{DshL%Bj;C@{Gn*Kb!ZSensf}qg6@!GX6Z=88b|1>U zrJM2kmTvqb<;;}scPM8d-Dlmtp<0{!TwRLoSvWbhg4u`muGz5WxvAx^*8d0k?*wXX z)?Bd5=9MQreq$aU55JwGM{Y*p?XEV&<=_<9pi%Ii|WW1 zq=FQvvhx8e`IOi^;rjwC^MvmKUXVp77_9YHF>Dn>XC519;~1&tnUE7U=)TmqzgU}B z2VrAaV?oN2THk2Yg2E%do|MAYId`4OS(0M(RmWfC$^1~)58iNES`6W&+jVCrc02&E zm^o9mDf>MKplf+M#haX&jh$9Tq)#1cJwULR58J;V$nIRKZW!lk+J3HIq08Kk;p+al z9^7acL*zUs9aZ%0Kwqr?jfh^6ymovO+1C*boSpDLy!ji3FX<(QFnu`y00D$)LqkwW zLqi~Na&Km7Y-Iodc$|HaJxIeq7>3`bN=2#;c97zbp*mR*mEx#XC_;r$E41oha_Jv5 zF(fH2j)H5!!JoydgNw7S4z7YA_ygkR=A`H%C4QF_TEuwAaS!i(@5|kHfY7Ki&FUHl zG~G5csic_8uZW>nglYC8iiFH8V^)&V@Eu?G2=M(b&a?dM{v3U3!D2u_B%Wc0X%nv# zCpK+^^FDEem1ULqoOsNn3lcwaUGeyhbIE0aXGY9yW{x;QES5T0>0nkiHR37an5yZN zFXTK{Id5^+sx{WSCx2nMpf4|Roz^f?SimAAh)_^N1y$IH)2@?ZAw%a$AAi*KOXO0> zRRJT%JT{;~cKzUg@VmEGadN^-3MYZ?7svS+0YbY#v+g+G$BxrH0fNuKmEQJmG=S+( z((7$4b_5J;0~gnAP1yr3cYvWMLpEhs3epmaMd1C6z9|n3-U7X=Uf){hIDG)J)T{Ij zaBv8WmMDA8=iNP>efzhj)xRH;SaP&;qa#89000JJOGiWibO37rJ?Z32;bR za{vGi!T z4d!!$4!5I$PR1L|!g_|yG}tqE14CIR@dlF#1`B3lwk8c`9U2+VUcfSt5mxMB1_QC+ z(=_$_SJ$s@5gv<#mlqhs5^n|tNK@GDiCZOiU=8}a`PRSVS{L)N4l`6D+-M8dTB@qT zImcu&CeJQ6>f}M1{@;fX0QfMbo4{_56vaEvIlT9*R$HcDrSzVH_x@UaF`MyoIP?<; zAyC(K`y8bO!wj_sU6v&yWA1VgKtUVa5CeAkX;=CoYeqS^LBpx{X1% TO+D)500000NkvXXu0mjfD2!M} literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..08efa4eb2937c8f29daa5fb351e65d3cd86b798e GIT binary patch literal 1942 zcmV;H2Wj|;P) zaB^>EX>4U6ba`-PAZ2)IW&i+q+U-|clEfwq{O1%o0+M(hhi6r8kmIK@_%Y+zncZZo z@{?h0u#BaqTf$z|{`#}4Kk#F6S{dtui_U5MOf-=b20_nX+|H!Uc3u~HA3WIAaf4wJ z^fE7fTJsa^_IzNELHW_H!n(s@IodrhhcY5F2K5ROcAj=J%Ta7|;9~GssF`P9*2E3U zIvi=goXux(t*!>+!BVvdB+N}n^mYz&j*NpOp^rGT7|bK|NsN#}C*l?o5c06RgFt;H z=z-*Yq@LM7Mo;8(T6THj(k+fKczJ{DYw|aWFM;Ji#7{TkB=TW7>*&3P-rHPVG7gNo zl~G#l?2KnHF@tj19&>0OhsD@$EusaTbb;hm7oE`xMPjJZ6&b3Os8ieeLIn^FH}>e6 z3xpcBAf6)^89JHKsI!N9RRVM?+!Qo3!Uq=G;>Imrp@7JhFqH|;hSXm+_3q|Rn(Dm_ zib#ipE8yahqJS}!8)wXdAk>#`b|ZLiOMZRHAEYW2v>VL<3rsps7unL8Te9gam}k+? z5+dd6asY}D+X4&;6hHxqrBOx9o(Mb!2$X<))JBE^WGz>KWP{RRq&qyeT#2 z`9n2WmG`>~8rz8-nn5u(1jYSO013@QGabkn9?A{PbYv8TWq`Cp8&zp21_@0gww(^` zPUXI(o3i0sy74FF)R68slv9xIuGUhtUO|e;pgHtW2KFmoR6b`L%`nUc6j{Yl0 z(l~F!T$1?HTFtapD_=TOzkz0R^oT-QPTN(~REi~oKRvdUZD?}{J%==&Os%83PjBj1 z-~f&K2&eeEMtB#Gfpv|gHJ%UVQp^|t(fI5e#-H~c3*3ess#Rc_aqyaNCCoUQ;wMa% zr<0o;pkCHJTFl3v6FJzAoPf~Ms75g1V-w>wWGFVGbW?tc?L4Ai1{0Y*` zHL1aC>-j`^P+WG33r$RTYgs*e^g$DOs1l!2B%ljT9%3>-;>B`dy?*qEG zy?R@+S8`tRc%o7RmZ$rwpHO~us{Z*qEX>4Tx0C=2zkv&MmKpe$iQ^gM|3U(;s5U@H~5G~@URVYG*P%E_RU~=gfG-*g$ zTpR`0f`cE6RRx`&UicM+cDeeTcEr)Dh%_(bAaW|$S?4dUs| ziotoGILHdJN_D&>%a0@IUz7t(BXabdv%xp!3DHKSqJBU7%63?eAmTZkz!AXW&Y2`O9@+=9BbV zOA8+X{oBCBbxTwBfXf{q^km4U>_~o^LM{iqpV2pEfWcd!cg^jsxsTHaAVpmzZh(VB zU@TAB>mKj!Ztv~iGtK^f0KjZ=#xfu^bpQYW24YJ`L;(K){{a7>y{D4^000SaNLh0L z01mC!9w9}QSx}^q#H>Su*%MqrWhYybtx~mj&~Um=MY zg~506@%Rpt<807*qoM6N<$f>$1p(EtDd literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..5ce5ed4c99e764561555614d4d9ee5130530cadd GIT binary patch literal 1607 zcmV-N2Dtf&P) zaB^>EX>4U6ba`-PAZ2)IW&i+q+U-_tlH?`~{m&_K1SBC4$H9D5p(02Wg--r7R7kgzFG+E3sdR!rg%mp3u=apAYKCF5__^b0|clQ9p zBxvP)Ol8k6u&rZyi9-$uFQQZ?4 zlzoRA*4fNw_hd+5sVM>pa~Bf7YC93gyh+Nmui7w=B%vQ9J2YO>b_PP8UhgK*KN9pr z^3`+i*}r@5$mg={@{Y^6IYQ^t0n&GNxx?^dV7U?T^FZyFtB)j)(QJ%>&li?5Kp`RWgpN|_k!4@ZF-6&lo6Td4wK;LZsxbA?dT zW|BB_m8nyhg$5_d(!`);n5u;ed``@6wciW{R&ipbl| z6>#y)YrvSw%^I^H2#u|qE`qPJ<@XQygH(lrx@b1MVDZQ4;!t|aEm=AX<|*293z180 zI{-z9tpGy;1$-n?isTb>A_9*FfeMhb1U{eusd58I4kD3VVr&`2#+pQHE-Oc#W}HnB zLM38985AlID+ERUq+rOQqM|`nqb4<{Sxb}{qQ)3goQGUVl0woHQ%aU{Dkc_8Em|_O zY$bCRoPnBSPT6wKrLZdqRN$*%eu3rSLymCh5s!4(k&jZ5J~dRWv8HM@*V4F2!!glf zOU+ttrIYJ8DSGJIV^7_B?qwj?hKw+D#F2)LJj$)wR`o-9K{eW{@ltBeOSfvUx|A*# zG>;RVnn5uR1jW--013@gGj9|EPvxd&J~K9jGC=Co#xZL1B$$OPM_YyZLj0=!lJnh!`WVLOKi6d*4Dis@{^X0`%_lA2Y5fg5S#ms4e{BII}`F@ z(syRjiD-m+uI@36_R+x*+2h$p75izg_NAlu$i4~5{{+#0Mzw*Dp6vbv?3>kK=vVin z0004nX+uL$Nkc;*aB^>EX>4Tx0C=2zkv&MmKpe$iQ$;BiQ9Fn_WT;LSL`B3&t5Adr zp;l;o12rOimEM7-bHv;>vMmOE;VB@ zz$X&VGQ+fqH;AV;ZG-bZafsz*mH3=^)T9d%KXP61_>FVUWr1gg%w%GoI7BSwnpkOK zmNzxxN#d}o>69;|JXSexan_1uR=+2IVKAewEOVXa5Mo%w5+sOFP(}eo*oe@olVTx3 z`_UHu0oN~)OCeVQj2sInL4)l2!T;cQw^nvy+)D~Zf%X^2`4|Q|c7a;OalVfor*;DP zpMfjA;V)Hz=}*!t4J~{GbZ-L}*9}eC11@)f{wG5=Wmodk6tY?1{fxdT4fNdtfik24YJ`L;z#}TL3Mv z$M@C%000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2jvP96)_0tmPtPV0056kL_t(I z%k7e}5yK!1MIT%SU;?+AA|tqEF-CBwmI-|Bya8<{U;|RPNY1vnOML0_O3;5uI^fT5 zk%1-y?d$M5r?$?iEAdu%ni8rCz&PHqB;E>(2r)(gYOSW^v;$S8l(Gp$2qBoG-u4IO zfg>-6mvUaVyB)5##Dn+*2heyGyNEXV)=002ovPDHLk FV1jl`@%sP( literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..f3fdd2f2aaf4b330be92c5ca43606b2fe621b800 GIT binary patch literal 237 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G}H0G|+77Z(>(Q`6|^=$R{yw@%qy*|B`m!UMTAv(w9_0+kdyJIw)7TqQw% z!T(`^Vbd9%^FUF~0*}aI1_r*vAk26?e?NS%G}T0G|+77Z(>(Q`6|^=$R{yw@%qy*|B`m!UMTAv(w9_{s*dIU^pbkHw8#> zmjw9*|AzwxFMq~QKw-`TkH}&M2EM}}%y>M1MG8>R+tbA{L?gJg-;wWt0tbuZQLg{> z1%_q9celkfa9VQ;t#&b76UM@_U|YJ=YPSW_t~WmJ`oSRHXcn>RzhL?NiDxHPzj!x8 fK{TD^z5AU|Ee?(KzNz{^V;MYM{an^LB{Ts55_D65 literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..41fde248dd08dc1c6f30f8e1187ac9fa1ed4045b GIT binary patch literal 250 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G}T0G|+77Z(>(Q`6|^=vj*wq~>J@MMqRL*17n4Svol|sQm}3+I|0}43Oe3 z3Gxg64+jih{*0f1!kh&jk;M!Qe1}1p@p%4<6riBDr;B5VMsR7rBi{i94i?9wT>t9} z49kS?Zi{K)wB{6A?P9nljD=;vwsfb}ZVRMcZ+zVKgF(E}EMnDv!SeYN&rYm<@ot8K eXgbS#_dB6l92)C=Q}uzyGI+ZBxvXNS%G}H0G|+77Z(>(Q`6|^=$R{yw@%qy*|B`m!UMTAv(w9_0+kdyJIw)7TqQw% z!T(`^Vbd9%^FUF~0*}aI1_r*vAk26?e?mfC2~0%~f0f{XZNV zVWP6OQ(2Pls@U{}6Mh@@yLMiy>`+|8n>_E%BRPgSns&xhv_!Roo*3YvQPkp~$#rRQ$b$Z#m=Vm~A7(8A5T-G@yGywppNS%G}T0G|+77Z(>(Q`6|^=$R{yw@%qy*|B`m!UMTAv(w9_{s*dIU^pbkHw8#> zmjw9*|AzwxFMq~QKw-`TkH}&M2EM}}%y>M1MG8NS%G}T0G|+77Z(>(Q`6|^=vj*wq~>J@MMqRL*17n4Svol|sQm}3+I|0}43Oe3 z3Gxg64+jih{*0f1!kh&jk;M!Qe1}1p@p%4<6rf@d6|7^7eU~{%sGjtwm6`LI)vTONQe)$NS%G}@0G|+7DJdxl2?-Y$7gJMHSy|cW=;)a%j<-(PT-mXF(!v9|HM7&prUKQL zo_b^tq8z*OYzUGR<6c%NS%G}50G|+7DJdxl2?-Y$7gJMHSy|cW=;)a%j<-(PT-mXF(!v9|HM7&prv3*i zW?)eE&N>F9_)3EOg8w4}2G;|3P5@;%3p^r=feH?TFyrz36)8Z$JWm(L5RKr{en+9h z3Ovl6Qy#QD`d`2Okk_)g=e}%eKe{RK^qFmq{J}~2><*U~$=fDO%aHxsa?iD!`?_b* z#fkT2=NbI(4oteEB%nV_wQO#R?$dG?^LHoa2pe9rKQe2ENS%G}50G|+7DJdxl2?-Y$7gJMHSy|cW=;&FC7o_H82SrCzG}gKJdRaO-FsS_p zDvxUF^#f9TB|(0{|B(TM>w!BbfHIr~9+AaB1&2YH@p%4<6rf<9r;B5VMsR7rqtIam z9_G#|4_Y4muit*iYuVg$UpBQL-4uBG%(h1U;G}$Zhs%rPZ4;(t$o_4)=i1GE-LvT8 z#QU=I4E}cqCf!jI(4VDRHaA80X}OE}yAyMS4X@cBnKi?4>GnmfS(8?;DcAV4a{f=Y Ywq~}I|6k;N2inZw>FVdQ&MBb@0O^WvuK)l5 literal 0 HcmV?d00001 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_waste_overlay_heat.png b/src/main/resources/assets/hbm/textures/items/rod_waste_overlay_heat.png deleted file mode 100644 index e45f44f0cad7d2839e3a8344041891e838808316..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 353 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1quc!Ec@}jv*HQTZ2#Y9x~wB8r*2Hfhk?>K}STh zV_=aJavhQ~ZBRykF-R{H2jHBN7e znR@WM@V>JRb8pQ5`0?Gv^+5~W1uo2->$X!QsfF8BSc-{HuxO_B0;QybGEz>uQcVTZ wxA&iWGU<#qv)$9>YyY+W_YuFpj&UNt_yng#+?&3|0z-ho)78&qol`;+0QYW*q5uE@ From 58502b4b23b54ff5e6a2e0d9bba7e5a407511f64 Mon Sep 17 00:00:00 2001 From: Vaern Date: Sun, 2 Jan 2022 21:17:43 -0800 Subject: [PATCH 10/17] ah --- .../blocks/machine/MachineReactorControl.java | 2 +- .../java/com/hbm/crafting/MineralRecipes.java | 5 +- .../java/com/hbm/crafting/RodRecipes.java | 99 +----- .../java/com/hbm/creativetabs/ControlTab.java | 4 +- .../java/com/hbm/hazard/HazardRegistry.java | 47 ++- .../hbm/inventory/FluidContainerRegistry.java | 11 - .../com/hbm/inventory/OreDictManager.java | 2 +- .../container/ContainerReactorControl.java | 16 +- .../hbm/inventory/gui/GUIReactorControl.java | 309 ++++++------------ .../hbm/inventory/gui/GUIReactorResearch.java | 2 + .../inventory/recipes/AssemblerRecipes.java | 2 +- .../hbm/inventory/recipes/BreederRecipes.java | 4 +- .../hbm/inventory/recipes/SILEXRecipes.java | 10 +- src/main/java/com/hbm/items/ModItems.java | 262 +-------------- .../hbm/items/machine/ItemBreedingRod.java | 3 +- .../hbm/items/machine/ItemReactorSensor.java | 30 -- .../com/hbm/items/special/ItemCustomLore.java | 26 +- .../com/hbm/items/special/ItemStarterKit.java | 14 +- .../java/com/hbm/lib/HbmChestContents.java | 31 +- .../com/hbm/main/ModEventHandlerClient.java | 6 +- .../java/com/hbm/packet/AuxButtonPacket.java | 60 ---- .../java/com/hbm/packet/PacketDispatcher.java | 2 - .../java/com/hbm/packet/TEControlPacket.java | 138 -------- .../bomb/TileEntityNukePrototype.java | 21 +- .../machine/TileEntityMachineDeuterium.java | 27 +- .../machine/TileEntityMachineGenerator.java | 4 +- .../machine/TileEntityNukeFurnace.java | 91 ++---- .../machine/TileEntityReactorControl.java | 295 ++++++++++------- .../machine/TileEntityReactorResearch.java | 17 +- src/main/resources/assets/hbm/lang/en_US.lang | 2 + .../hbm/textures/gui/gui_reactor_control.png | Bin 3553 -> 1818 bytes .../hbm/textures/items/nugget_cobalt.png | Bin 0 -> 231 bytes 32 files changed, 417 insertions(+), 1125 deletions(-) delete mode 100644 src/main/java/com/hbm/packet/TEControlPacket.java create mode 100644 src/main/resources/assets/hbm/textures/items/nugget_cobalt.png 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/crafting/MineralRecipes.java b/src/main/java/com/hbm/crafting/MineralRecipes.java index b58cf4fb6..a92ce03e5 100644 --- a/src/main/java/com/hbm/crafting/MineralRecipes.java +++ b/src/main/java/com/hbm/crafting/MineralRecipes.java @@ -82,7 +82,8 @@ 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.fragment_cobalt, CO.nugget()); + 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"); @@ -373,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 b65920aa0..b664ed0c9 100644 --- a/src/main/java/com/hbm/crafting/RodRecipes.java +++ b/src/main/java/com/hbm/crafting/RodRecipes.java @@ -18,89 +18,20 @@ 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); - 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); - 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); - 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, 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 }); @@ -179,15 +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 }); } //Fill rods with one billet. For fuels only, therefore no unloading or ore dict @@ -279,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/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/hazard/HazardRegistry.java b/src/main/java/com/hbm/hazard/HazardRegistry.java index 7e56c45d7..058ea8fd7 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; @@ -211,7 +212,7 @@ public class HazardRegistry { HazardSystem.register(rod_zirnox_u233_fuel_depleted, makeData(RADIATION, u233 * rod_dual * 100)); HazardSystem.register(rod_zirnox_u235_fuel_depleted, makeData(RADIATION, u235 * rod_dual * 100)); HazardSystem.register(rod_zirnox_les_fuel_depleted, new HazardData().addEntry(RADIATION, saf * rod_dual * 100).addEntry(BLINDING, 5F)); - HazardSystem.register(rod_zirnox_tritium, makeData(RADIATION, 0.01F * rod_dual)); + HazardSystem.register(rod_zirnox_tritium, makeData(RADIATION, 0.001F * rod_dual)); registerOtherWaste(waste_natural_uranium, u * billet * 100); registerOtherWaste(waste_uranium, uf * billet * 100); @@ -298,21 +299,17 @@ public class HazardRegistry { 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); @@ -362,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) { @@ -395,6 +380,12 @@ public class HazardRegistry { 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(); 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 5a1b2bac8..3e75722ed 100644 --- a/src/main/java/com/hbm/inventory/OreDictManager.java +++ b/src/main/java/com/hbm/inventory/OreDictManager.java @@ -268,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) .billet(billet_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); 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/gui/GUIReactorControl.java b/src/main/java/com/hbm/inventory/gui/GUIReactorControl.java index 63cdc00aa..158104899 100644 --- a/src/main/java/com/hbm/inventory/gui/GUIReactorControl.java +++ b/src/main/java/com/hbm/inventory/gui/GUIReactorControl.java @@ -1,18 +1,25 @@ package com.hbm.inventory.gui; +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,79 +27,104 @@ 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)); + this.fields[3].setText(String.valueOf((int)control.heatLower)); + } + + @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; + + 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; + } 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 @@ -102,7 +134,7 @@ public class GUIReactorControl extends GuiInfoContainer { 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 +143,26 @@ 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); - } + for(int i = 0; i < 4; i++) + this.fields[i].drawTextBox(); - 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); - } - - 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); - } - - 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(byte i = 0; i < 3; i++) + displays[i].drawNumber(control.getDisplayData()[i]); } - 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 index 4df76b5e6..bb5ca372a 100644 --- a/src/main/java/com/hbm/inventory/gui/GUIReactorResearch.java +++ b/src/main/java/com/hbm/inventory/gui/GUIReactorResearch.java @@ -51,6 +51,8 @@ public class GUIReactorResearch extends GuiInfoContainer { 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 diff --git a/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java b/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java index 0c2345823..e8e4e74b9 100644 --- a/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java @@ -213,7 +213,7 @@ public class AssemblerRecipes { 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); diff --git a/src/main/java/com/hbm/inventory/recipes/BreederRecipes.java b/src/main/java/com/hbm/inventory/recipes/BreederRecipes.java index ddd05da74..2d4af394f 100644 --- a/src/main/java/com/hbm/inventory/recipes/BreederRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/BreederRecipes.java @@ -11,7 +11,6 @@ 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; import net.minecraft.item.ItemStack; @@ -36,6 +35,7 @@ public class BreederRecipes { recipes.put(new ComparableStack(ModItems.meteorite_sword_etched), new BreederRecipe(new ItemStack(ModItems.meteorite_sword_bred), 1000)); } + /** 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)); @@ -58,7 +58,7 @@ public class BreederRecipes { if(stack == null) return null; - ComparableStack sta = new ComparableStack(stack); + ComparableStack sta = new ComparableStack(stack).makeSingular(); return BreederRecipes.recipes.get(sta); } diff --git a/src/main/java/com/hbm/inventory/recipes/SILEXRecipes.java b/src/main/java/com/hbm/inventory/recipes/SILEXRecipes.java index 5c6ffefb6..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)) diff --git a/src/main/java/com/hbm/items/ModItems.java b/src/main/java/com/hbm/items/ModItems.java index 42d58720d..a40681446 100644 --- a/src/main/java/com/hbm/items/ModItems.java +++ b/src/main/java/com/hbm/items/ModItems.java @@ -235,6 +235,7 @@ 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; @@ -967,72 +968,6 @@ public class ModItems { public static Item rod_quad_empty; public static Item rod_quad; - 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_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_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_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_zirnox_empty; public static Item rod_zirnox_natural_uranium_fuel; public static Item rod_zirnox_uranium_fuel; @@ -1163,9 +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_waste; - public static Item rod_dual_waste; - public static Item rod_quad_waste; public static Item debris_graphite; public static Item debris_metal; @@ -1188,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; @@ -1947,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; @@ -2775,6 +2699,7 @@ 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"); @@ -3490,69 +3415,11 @@ public class ModItems { 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 = (ItemEnumMulti) new ItemBreedingRod().setUnlocalizedName("rod").setMaxStackSize(1).setContainerItem(ModItems.rod_empty).setCreativeTab(MainRegistry.controlTab); + 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 = (ItemEnumMulti) new ItemBreedingRod().setUnlocalizedName("rod_dual").setMaxStackSize(1).setContainerItem(ModItems.rod_dual_empty).setCreativeTab(MainRegistry.controlTab); + 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 = (ItemEnumMulti) new ItemBreedingRod().setUnlocalizedName("rod_quad").setMaxStackSize(1).setContainerItem(ModItems.rod_quad_empty).setCreativeTab(MainRegistry.controlTab); - - 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_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_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_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"); @@ -3592,22 +3459,6 @@ public class ModItems { 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"); - 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"); - 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"); @@ -3878,10 +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_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"); @@ -4696,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"); @@ -5923,6 +5770,7 @@ 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()); @@ -6577,102 +6425,6 @@ public class ModItems { GameRegistry.registerItem(rod_quad_empty, rod_quad_empty.getUnlocalizedName()); GameRegistry.registerItem(rod_quad, rod_quad.getUnlocalizedName()); - //Fuel Rods - 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_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_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()); - //ZIRNOX parts GameRegistry.registerItem(rod_zirnox_empty, rod_zirnox_empty.getUnlocalizedName()); GameRegistry.registerItem(rod_zirnox_natural_uranium_fuel, rod_zirnox_natural_uranium_fuel.getUnlocalizedName()); diff --git a/src/main/java/com/hbm/items/machine/ItemBreedingRod.java b/src/main/java/com/hbm/items/machine/ItemBreedingRod.java index 669f60693..76efdb7e6 100644 --- a/src/main/java/com/hbm/items/machine/ItemBreedingRod.java +++ b/src/main/java/com/hbm/items/machine/ItemBreedingRod.java @@ -8,8 +8,7 @@ public class ItemBreedingRod extends ItemEnumMulti { super(BreedingRodType.class, true, true); } - //TODO: Remove old rods - public static enum BreedingRodType { + public enum BreedingRodType { LITHIUM, TRITIUM, CO, diff --git a/src/main/java/com/hbm/items/machine/ItemReactorSensor.java b/src/main/java/com/hbm/items/machine/ItemReactorSensor.java index 3bc543c5f..833ee42a9 100644 --- a/src/main/java/com/hbm/items/machine/ItemReactorSensor.java +++ b/src/main/java/com/hbm/items/machine/ItemReactorSensor.java @@ -34,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/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 57fcc2351..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; @@ -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 2fbfa68ba..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,18 +130,18 @@ 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, 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_th232, 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), @@ -167,7 +168,7 @@ 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.nugget_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), diff --git a/src/main/java/com/hbm/main/ModEventHandlerClient.java b/src/main/java/com/hbm/main/ModEventHandlerClient.java index 8aabea2f9..53bd115d8 100644 --- a/src/main/java/com/hbm/main/ModEventHandlerClient.java +++ b/src/main/java/com/hbm/main/ModEventHandlerClient.java @@ -564,10 +564,10 @@ public class ModEventHandlerClient { } /// NUCLEAR FURNACE FUELS /// - int[] breeder = TileEntityNukeFurnace.getFuelValue(stack); + int breeder = TileEntityNukeFurnace.getFuelValue(stack); - if(breeder != null) { - 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/packet/AuxButtonPacket.java b/src/main/java/com/hbm/packet/AuxButtonPacket.java index 7ec3761c0..9eb382009 100644 --- a/src/main/java/com/hbm/packet/AuxButtonPacket.java +++ b/src/main/java/com/hbm/packet/AuxButtonPacket.java @@ -99,66 +99,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; 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/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/TileEntityMachineDeuterium.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineDeuterium.java index 814b0fff8..9930767dd 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineDeuterium.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineDeuterium.java @@ -6,6 +6,7 @@ import com.hbm.lib.Library; import net.minecraft.entity.player.EntityPlayer; 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; @@ -103,7 +104,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 +284,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 95ed346d1..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) diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityNukeFurnace.java b/src/main/java/com/hbm/tileentity/machine/TileEntityNukeFurnace.java index b5d4641fe..e35b80f98 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityNukeFurnace.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityNukeFurnace.java @@ -5,7 +5,9 @@ import java.util.HashMap; import com.hbm.blocks.machine.MachineNukeFurnace; import com.hbm.inventory.RecipesCommon.ComparableStack; import com.hbm.inventory.recipes.BreederRecipes; +import com.hbm.inventory.recipes.BreederRecipes.BreederRecipe; 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; @@ -22,7 +24,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}; @@ -114,12 +116,9 @@ public class TileEntityNukeFurnace extends TileEntity implements ISidedInventory return 0; } else { - int[] power = getFuelValue(stack); + int power = getFuelValue(stack); - if(power == null) - return 0; - - return power[0] * power[1] * 5; + return power; } } @@ -350,7 +349,7 @@ public class TileEntityNukeFurnace extends TileEntity implements ISidedInventory } } - private static HashMap fuels = new HashMap(); + private static HashMap fuels = new HashMap(); //for the int array: [0] => level (1-4) [1] => amount of operations /* @@ -359,57 +358,22 @@ public class TileEntityNukeFurnace extends TileEntity implements ISidedInventory * Who even uses this furnace? Nobody, but it's better then removing it without prior approval */ 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}); + 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); } /** @@ -417,14 +381,15 @@ public class TileEntityNukeFurnace extends TileEntity implements ISidedInventory * @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) { + public static int getFuelValue(ItemStack stack) { if(stack == null) - return null; + return 0; - ComparableStack sta = new ComparableStack(stack); - int[] ret = fuels.get(sta); + ComparableStack sta = new ComparableStack(stack).makeSingular(); + if(fuels.get(sta) != null) + return fuels.get(sta); - return ret; + 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 1dd00a2f6..6ac1f8d42 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,27 +86,153 @@ public class TileEntityReactorControl extends TileEntity implements ISidedInvent nbt.setTag("items", list); } + public TileEntityReactorResearch reactor; + + public boolean isLinked; + public int heat; + + public double levelLower; + public double levelUpper; + public double heatLower; + public double heatUpper; + public RodFunction function = RodFunction.LINEAR; + + //TODO: Remove all large reactor functionality for this @Override - public int[] getAccessibleSlotsFromSide(int p_94128_1_) - { - return p_94128_1_ == 0 ? slots_bottom : (p_94128_1_ == 1 ? slots_top : slots_side); - } + public void updateEntity() { + + if(!worldObj.isRemote) { + + isLinked = establishLink(); + + if(isLinked) { + this.heat = reactor.heat; + + double fauxLevel = 0; - @Override - public boolean canInsertItem(int i, ItemStack itemStack, int j) { - return false; + 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 { + + switch(this.function) { + case LINEAR: + fauxLevel = (this.heat - this.heatLower) * ((this.levelUpper - this.levelLower) / (this.heatUpper - this.heatLower)) + this.levelLower; + break; + case QUAD: + fauxLevel = Math.pow((this.heat - this.heatLower) / (this.heatUpper - this.heatLower), 2) * (this.levelUpper - this.levelLower) + this.levelLower; + break; + case LOG: + fauxLevel = Math.pow((this.heat - this.heatUpper) / (this.heatLower - this.heatUpper), 2) * (this.levelLower - this.levelUpper) + this.levelUpper; + break; + default: + break; + } + } + + double level = MathHelper.clamp_double((fauxLevel * 0.01D), 0D, 1D); + + 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.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"); + 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) { - @Override - public boolean canExtractItem(int i, ItemStack itemStack, int j) { + TileEntity tile = worldObj.getTileEntity(pos[0], pos[1], pos[2]); + + if(tile instanceof TileEntityReactorResearch) { + reactor = (TileEntityReactorResearch) tile; + + return true; + } + } + } + } + return false; } - public int linkX; - public int linkY; - public int linkZ; + public int[] getDisplayData() { + if(reactor != null) { + int[] data = new int[3]; + data[0] = (int) reactor.level * 100; + data[1] = reactor.totalFlux; + data[2] = (int) Math.round((this.heat) * 0.00002 * 980 + 20); + return data; + } else { + return new int[] { 0, 0, 0 }; + } + } - public int hullHeat; + @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 + } + + /*public int hullHeat; public int coreHeat; public int fuel; public int water; @@ -199,14 +246,14 @@ public class TileEntityReactorControl extends TileEntity implements ISidedInvent public int maxRods; public boolean isOn; public boolean auto; - public boolean isLinked; + public boolean isLinkd; public boolean redstoned; - private int lastRods = 100; + private int lastRods = 100;*/ - @Override + /*@Override public void updateEntity() { - /*if(!worldObj.isRemote) + if(!worldObj.isRemote) { if(slots[0] != null && slots[0].getItem() == ModItems.reactor_sensor && slots[0].stackTagCompound != null) @@ -352,6 +399,6 @@ public class TileEntityReactorControl extends TileEntity implements ISidedInvent } PacketDispatcher.wrapper.sendToAllAround(new TEControlPacket(xCoord, yCoord, zCoord, hullHeat, coreHeat, fuel, water, cool, steam, maxWater, maxCool, maxSteam, compression, rods, maxRods, isOn, auto, isLinked), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 30)); - }*/ - } + } + }*/ } diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityReactorResearch.java b/src/main/java/com/hbm/tileentity/machine/TileEntityReactorResearch.java index 9c8df327c..324fc2005 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityReactorResearch.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityReactorResearch.java @@ -48,6 +48,7 @@ public class TileEntityReactorResearch extends TileEntityMachineBase implements public double targetLevel; public int heat; + public byte water; public final int maxHeat = 50000; public int[] slotFlux = new int[12]; public int totalFlux = 0; @@ -84,6 +85,7 @@ public class TileEntityReactorResearch extends TileEntityMachineBase implements public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); heat = nbt.getInteger("heat"); + water = nbt.getByte("water"); level = nbt.getDouble("level"); targetLevel = nbt.getDouble("targetLevel"); } @@ -92,6 +94,7 @@ public class TileEntityReactorResearch extends TileEntityMachineBase implements public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); nbt.setInteger("heat", heat); + nbt.setByte("water", water); nbt.setDouble("level", level); nbt.setDouble("targetLevel", targetLevel); } @@ -122,11 +125,9 @@ public class TileEntityReactorResearch extends TileEntityMachineBase implements if(level > 0) { reaction(); } - - //getInteractions(); - + if(this.heat > 0) { - byte water = getWater(); + water = getWater(); if(water > 0) { this.heat -= (this.heat * (float) 0.07 * water / 12); @@ -142,7 +143,6 @@ public class TileEntityReactorResearch extends TileEntityMachineBase implements this.explode(); } - //change to 3D rad like demon-core 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); @@ -150,6 +150,7 @@ public class TileEntityReactorResearch extends TileEntityMachineBase implements NBTTagCompound data = new NBTTagCompound(); data.setInteger("heat", heat); + data.setByte("water", water); data.setDouble("level", level); data.setDouble("targetLevel", targetLevel); data.setIntArray("slotFlux", slotFlux); @@ -160,13 +161,14 @@ public class TileEntityReactorResearch extends TileEntityMachineBase implements 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"); } - private byte getWater() { + public byte getWater() { byte water = 0; for(byte d = 0; d < 6; d++) { @@ -332,9 +334,6 @@ public class TileEntityReactorResearch extends TileEntityMachineBase implements public void receiveControl(NBTTagCompound data) { if(data.hasKey("level")) { this.setTarget(data.getDouble("level")); - - if(targetLevel != level) - this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.reactorStop", 1.0F, 1.0F); } this.markDirty(); diff --git a/src/main/resources/assets/hbm/lang/en_US.lang b/src/main/resources/assets/hbm/lang/en_US.lang index 4618cf716..f102ddce5 100644 --- a/src/main/resources/assets/hbm/lang/en_US.lang +++ b/src/main/resources/assets/hbm/lang/en_US.lang @@ -908,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 @@ -2045,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 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 0d5e3040d4df4a6d8361d443ee1e447b58a17b13..131ae6fdb03b5246e706b1f7df9347c8bc831ff4 100644 GIT binary patch literal 1818 zcmd5+Sx}Q#6uy5#LI{acObKy8z$v8GP>97)1hNp3Xb1s<1Og#IFi;p076A>&FNjiL z#DWSUh|+K} zkA;G*MEpuT0D#Ez=LQ1+At3~CXv8Hoi$zN)J$NezXogllLV%fq9l!>lwajuM27};w zAz!ow@g|c=uh)l$hPt}CvREvUNJODf5)u*|92{^aAQp?gy}cO>MoCGDMx(KHCz~GS zQP^a@2{4(=ypKRmP7a&R&MPFAFog-5)%`Xl9G~>lT%VsR4P?kT3SX%214(7 zI`ux{Hf010LJ+F|eSycN8qtWA2g>DtA+L=WiKsmo~}c0%s~MIA(9K_obJITj-Xhzrf{OfA zT+I3#Y$n_%Pp+#$6${31Dd1OJ>8);KZK#eMm6I?4h>2Yq_3aZVKdYw=Dxrr@X7sv^ z2^kiokqeBnW_)jc$!tFrW!yE^F=v_f^11R$*sqes#$_t)!rvb4YEX4$r5;7~UA|+X zQts<^%hp>@X8S@m)2LA~38(s?P9KGe4Sas)>QCLf-_a+55Hzayn4Ph3RO#aJ`Pm?Um@>+KZEnn0;qA8G8Dxdd6_3WnQXtI|*k- zU_N_x;mJ!(m+2}m7i$qUyE|&mhzf2o-y=M}>=h((ikp{{T$j`F;zH^-)+#i|fAcnn z;<8w*YY zR!;+J+uPei=ADZ-+g}8c&D@>Jg7YNDPbE>(y?$=2a$tBI>%9{@td5S=>=$Drqh9pG z%3rwSYqD#p}k#OipNgGh^9HK~e7YUWwu;G@%Wah1)ug zd!AFUiheeSu2^wKg785Dzfiz6^QyIl;__a}2~-Q18R ztmAPdBnIlwt04N^Sn;qI9;wPHjo0yBuFaj*edQg}2N-AjS^QWV+T8aPJr9S;yA>_H2iGeA(v}5L0U{G3q7LNcGi?_S|PBa9ZA| zPm1}9J=jT4^Q!1V*>-%#+Wlt7g$TCES#1dZoxzUi3(MtMgYYrrMN`hi2f6lGUUzhV zFuR?3U;s{?HCv^KL?dbMm5fAK`FbBj0HY zOCH$aw@AQ^#>{9Z>AL(rdAS*PQ|KJ!g|n~SOqo?O&w++^oZuTzi7VHWseX*xjqVqCPWv!~PDvtqxKLtwFu1gw(QL0%AB2E@$J0}wYv&p&h-p)lQ z8Ja6Jz`UgKsE#21rP-xZHd?@bE#=o2NLLpIpETW++rYWxKz;WbZeVag3S{`Ixb(_G z+e&1_8`E`~7c32WWA+n*A))(mjBMijid3cfwF*&%1kleq#?gD45ByyOqgnGa`~Nu+-uI&i1g9k=0l|fSQ6ZLO2EL zUyb_OQayhAFk6?oFa3vommVlFhC8xNM+)r9318HZNpPbLo+Yxx*q5D7MIW68 o+zuhAkD!7e+W#nBAF0cnU+cM2j0&hBl9B%%@U{rJ8jdXgPmkR0*8l(j literal 3553 zcmcInXIN9&y52!x5P{G^2!WyZVxdGz#2`|nD}q#|2uMd_LTJt?0Tm{MUV|_)bODL< zA{`OLNa!#Uibz!;lu%AQGoG2}-gBOF|J?Ow?QgIBzTf-o?_2NMJJ!O?keyYC6#xKs zqbmq2007Z1K>!OgeR2r;&4WHM2J0Kyu+RsF#SKe;F3kvW(dK^E>Xi8%$cRYmmzh!6 z^CZTf^iAZ{3O-q&S(s5}mzMIdR{F|#lORqh##_cGluN8x9YunwT-vUl)alSVuXX3t z`G=gM=ud4>9$ADh*qHU9(5--HuvDmmFSwx^O*`j*)I7GgNsDk9@(x|lFsB|xY%Vm7 zjll;@nLa%di>RurOW$qQ(beVW!f8z3ztnvGph8=~_l=7xCl^jOZm#R8aM1;pb_*hr zh(I*n-P!p1(@Kkcdo~3*|EtMJQ^(#0?U)ULATPXmPLkV8@MC%4B7d2S4&VTT1u6_J zB~z6hxw&vtQ;vIw8zYb1c(qLWRoSv>f*dj22Dn$NP~8YIWc*_xh29N|Th+ zY=<&SZ$f-s-mJAOI#=jaZ_(y=a%yeOETspmKw^7C z27|h^m08pQG-rofGEN+2Moe`wsro#EsmAL$rCeiF{xB>Cl(Inx5V%rJ%?EW1b*vByuj9#&o3u?d+U@@+F_jjshZ(wFC51X zhn0Lw0KOy%JtmyNU6$&;$ivJwZ0NGwGZ%QfA{fqb+?mVt#W@$x&~QS z4CiPmz0kdmj^&~70_n3kW?B8z^>TLuN=ju-O)||IxlmWTzB;?qE>_N1g{00-PuFd~ z*{AszXDg2y3q%Q%-EkDYK~xuQaNK`-8`BF@lHK&!!O32ujP~Xd&2Yqy!IC3i*}?$O z3!WLLX~d5KtE6GF{W$Jy9Y!jc&wzWNraXL0Cc2@>0@Q=I@H&~^(TL2rqTz3BB?;=6 z@XGQ1tZ9{4icQvKdVz239|~0!#6G#~d5TJ%n|_=5&@dbyHz1#I6sliW-@AZzTmlhh zf&_rGd5Q5G6g<8YhC+i(di~iF*^tQj&kG)&GX$^R;gk-A_m95Z&l>d$PWQ>y4tz{3 zWN~hKqq}A0n9;&JD)ggBGTUwb->yLqQ^$Y7F)n24`ZsF7i7V!AAA!3Kjl>DDG1L2+ zKS4n1m$03+|Ew^VNe67l3$fhl5SCb9G5{MmRSel;-W&Nz{t~U zeRJMN)AQnc28d>Lbdkzh-*EOC)#~b7DxfWLcw0l+>F&y>mJjhL^HvP6PW>>dVC!Ci z(x%4V%8%}9cxS}ire!bO`R2N{oouply@%oG$bMG+2CE@z}4{@!jd{~n;hKWqe}U?sh^#Mn_+XUHWI7= ztjx!7lIV5R4hMuTfdF0#FX4eIoBOUeHQPO!_zbX7O*d_vq(S|B51gWO^8lNze9;zi z2oKs<6O(NhC8Wj-$X=%7@&O=DjoG4YC2Yybzy37bi#Lijjp;YhYG9jAvV~tB$@J5& zU`K}1Z*tuRqHgg5a5YwdAb1<#``J~tJv;k(CMb!R$nZO5KC3}_8-v-d@5lMpNsSd#E~+=YyDzLaQkt%62G95Ld4Rk-1OdX0 z{M!J&w;*V+HTC1W!@7uSfz~0G@YiC5AC>BiFk6<(tnf@Ulih38Bn8`A1=aeJdrSnA zKjnH~1!?N&B%cz<5XMi=%;=@|n~g(fvR*(S@-c|?#bzXmeB5g{qB|Lu~HNofWFO$QddMc{?6v7RbZD#PZ zd1Ib%7o`%5g+L(K{^@qvSnEG)zyw%4Vfd?#mH^Nx`?nJPxty}^1$TB{UZpIEb_@x} z+yZ6;52D>cXFYjEURm4OTYH|~3T{0G|a%fC*8TSrFFJTaPg3O`i*uow^T z@VW${#ltZ=wR)3WSk1D8c9H1M?ey{r{@(S4Msc%c zN`N6@U-fT|{2lPUNB>K@KS&6=MMy@5aqI<#y>_|3G^W5;1mxUR4+W>+nRqywgxa&YC?f}Y2l1T3>>X{8Z6Pd-on~t0+SdClT zjNHt%_DMgadA;7W?*3Y^il42c;)sJPGx8fVA2;TFah_N_zsx8>ED5*QDYo%@??kft z@r0+io*<`;5=Wmaze}<@TF4Ob;OSWVc7u;y%23xzG};2V?)F7`TGNDaM8Y3pJv8@~ zulw9nif?~TW=l6M9h!V6--7XTmGmpO&~o{p(0GNeDiWk(VtH(^M6ud=XZZ3=q=}Vw z`=>h*=Q1ngere=<0|IO7)Z8`V4jZ*YinG`$>gNQ^0i2N?u@|V{;B#n_!tTBPo&O- zWTLSQ@1k_<%%*p-xuGA-tqi%a6y7CJ?YOV9!v3pR!H2zQj!5#{D+ii&Nkv4>Rtd^4 zJA?x&V?50`nRyK9RYaYTBZl`w^JRG?u5XLf>>>l3x^6tspo{A_m9Lf&6YgD}bKQ~c z`#PKtM_K?v+@h|V9BlQsI#$FjsF3MvNvv8hVHU;n>$%i=RjE%rwhZc$x_y}^&v46W z*LddKoG3iuo*wv>*qy^{3R_e`qpRy@-e1+)F`;rfbog@xbOydvFR1Cx z>blT~Z}Byd6ge~`5AJH+21Nw0z7sbv|DnHQ@GSB7TM1;Dn!;GMXdFfBAP+d#W2!!K zj{$XSbcECGsZts#-l(#lDtXmT+Ngd_&r4*4YPWc_NEYZ~z__pxE_&!IUIjz>mSzoK|Dr<(6pN{fbn_@-`gNu|(nZMj{3R+5iU`Z`hL zNS1=MxdbNonNNpCI88xKO%5HxjK3XkA&?|}&~K-a#TPTxSXgBFpBx|Rl<$`gJzbA5 z0|R9S;J>WvCXJ$UJQ*U4Ub}Er0|NS%G}%0G|+7Q_~O&$GC?6b%!p#o3!viX2tY?_`2w@P8;^ z2==cK0tps)L>4nJ@ErzW#^d=bQhI zZjSYTnmIO!bj+GAG9!D5$^n~Od@bL0PGi5Q_rjv_bNq%+JWm*|wzAuY?DM`4G>gI0 L)z4*}Q$iB}Xzfl; literal 0 HcmV?d00001 From 5829d5e4cff9db944f25b21dfd62d10edac0121a Mon Sep 17 00:00:00 2001 From: Vaern Date: Mon, 3 Jan 2022 19:37:14 -0800 Subject: [PATCH 11/17] aa --- .../hbm/inventory/gui/GUIReactorControl.java | 46 +++- .../machine/TileEntityReactorControl.java | 230 +++--------------- 2 files changed, 76 insertions(+), 200 deletions(-) diff --git a/src/main/java/com/hbm/inventory/gui/GUIReactorControl.java b/src/main/java/com/hbm/inventory/gui/GUIReactorControl.java index 158104899..fb2687b68 100644 --- a/src/main/java/com/hbm/inventory/gui/GUIReactorControl.java +++ b/src/main/java/com/hbm/inventory/gui/GUIReactorControl.java @@ -1,5 +1,10 @@ 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; @@ -69,8 +74,8 @@ public class GUIReactorControl extends GuiInfoContainer { 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)); - this.fields[3].setText(String.valueOf((int)control.heatLower)); + this.fields[2].setText(String.valueOf((int)control.heatUpper / 50)); + this.fields[3].setText(String.valueOf((int)control.heatLower / 50)); } @@ -98,11 +103,12 @@ public class GUIReactorControl extends GuiInfoContainer { 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; + vals[k] = j * mod; } else { fields[k].setText("0"); } @@ -128,13 +134,11 @@ public class GUIReactorControl extends GuiInfoContainer { } @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); - - } @Override @@ -143,11 +147,37 @@ public class GUIReactorControl extends GuiInfoContainer { Minecraft.getMinecraft().getTextureManager().bindTexture(texture); drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); - for(int i = 0; i < 4; i++) - this.fields[i].drawTextBox(); + GL11.glPopMatrix(); + Tessellator tess = Tessellator.instance; + GL11.glDisable(GL11.GL_TEXTURE_2D); + GL11.glLineWidth(3F); + tess.startDrawing(3); + tess.setColorOpaque_I(0x08FF00); + + double render[] = new double[39]; + + for(int i = 0; i < render.length; i++) { + render[i] = control.getTargetLevel(control.function, 0 + i * 50000 / 28); + } + + for(int i = 0; i < render.length; i++) { + tess.addVertex(guiLeft + 128 + i, guiTop + 39 + render[i], this.zLevel); + } + + //fuck i will figure this out later + /*for(int i = 0; i < render.length; i++) { + tess.addVertex(guiLeft + 128 + i, guiTop + 39 + control.getGraphPoint(control.function, 0 + i * 50, 28), this.zLevel); + }*/ + + tess.draw(); + GL11.glEnable(GL11.GL_TEXTURE_2D); + GL11.glPushMatrix(); for(byte i = 0; i < 3; i++) displays[i].drawNumber(control.getDisplayData()[i]); + + for(int i = 0; i < 4; i++) + this.fields[i].drawTextBox(); } @Override diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityReactorControl.java b/src/main/java/com/hbm/tileentity/machine/TileEntityReactorControl.java index 6ac1f8d42..5a6567002 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityReactorControl.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityReactorControl.java @@ -89,6 +89,9 @@ public class TileEntityReactorControl extends TileEntityMachineBase implements I public TileEntityReactorResearch reactor; public boolean isLinked; + + public int flux; + public double level; public int heat; public double levelLower; @@ -106,7 +109,6 @@ public class TileEntityReactorControl extends TileEntityMachineBase implements I isLinked = establishLink(); if(isLinked) { - this.heat = reactor.heat; double fauxLevel = 0; @@ -120,32 +122,22 @@ public class TileEntityReactorControl extends TileEntityMachineBase implements I fauxLevel = this.levelUpper; } else { - - switch(this.function) { - case LINEAR: - fauxLevel = (this.heat - this.heatLower) * ((this.levelUpper - this.levelLower) / (this.heatUpper - this.heatLower)) + this.levelLower; - break; - case QUAD: - fauxLevel = Math.pow((this.heat - this.heatLower) / (this.heatUpper - this.heatLower), 2) * (this.levelUpper - this.levelLower) + this.levelLower; - break; - case LOG: - fauxLevel = Math.pow((this.heat - this.heatUpper) / (this.heatLower - this.heatUpper), 2) * (this.levelLower - this.levelUpper) + this.levelUpper; - break; - default: - break; - } + fauxLevel = getTargetLevel(this.function, this.heat); } double level = MathHelper.clamp_double((fauxLevel * 0.01D), 0D, 1D); - NBTTagCompound control = new NBTTagCompound(); - control.setDouble("level", level); - - PacketDispatcher.wrapper.sendToServer(new NBTControlPacket(control, reactor.xCoord, reactor.yCoord, reactor.zCoord)); + 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); @@ -158,6 +150,8 @@ public class TileEntityReactorControl extends TileEntityMachineBase implements I 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"); @@ -185,6 +179,10 @@ public class TileEntityReactorControl extends TileEntityMachineBase implements I if(tile instanceof TileEntityReactorResearch) { reactor = (TileEntityReactorResearch) tile; + this.flux = reactor.totalFlux; + this.level = reactor.level; + this.heat = reactor.heat; + return true; } } @@ -194,11 +192,29 @@ public class TileEntityReactorControl extends TileEntityMachineBase implements I 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(reactor != null) { + if(this.isLinked) { int[] data = new int[3]; - data[0] = (int) reactor.level * 100; - data[1] = reactor.totalFlux; + data[0] = (int) (this.level * 100); + data[1] = this.flux; data[2] = (int) Math.round((this.heat) * 0.00002 * 980 + 20); return data; } else { @@ -231,174 +247,4 @@ public class TileEntityReactorControl extends TileEntityMachineBase implements I QUAD, LOG } - - /*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 isLinkd; - public boolean redstoned; - private int lastRods = 100;*/ - - /*@Override - public void updateEntity() { - - 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)); - } - }*/ } From 66ed3ce3711b49af92257981622c13564fbd4892 Mon Sep 17 00:00:00 2001 From: Vaern Date: Tue, 4 Jan 2022 17:33:13 -0800 Subject: [PATCH 12/17] seems to be done --- .../java/com/hbm/hazard/HazardRegistry.java | 4 ++-- .../hbm/inventory/gui/GUIReactorControl.java | 15 ++------------- src/main/java/com/hbm/main/CraftingManager.java | 2 +- .../machine/TileEntityReactorControl.java | 1 - .../hbm/textures/items/plate_fuel_mox.png | Bin 269 -> 273 bytes .../hbm/textures/items/plate_fuel_pu239.png | Bin 269 -> 273 bytes .../hbm/textures/items/plate_fuel_ra226be.png | Bin 278 -> 280 bytes .../hbm/textures/items/plate_fuel_sa326.png | Bin 270 -> 273 bytes .../hbm/textures/items/plate_fuel_u233.png | Bin 269 -> 281 bytes .../hbm/textures/items/plate_fuel_u235.png | Bin 269 -> 273 bytes .../hbm/textures/items/rod_zirnox_les_fuel.png | Bin 482 -> 482 bytes .../hbm/textures/items/rod_zirnox_mox_fuel.png | Bin 490 -> 492 bytes .../items/rod_zirnox_plutonium_fuel.png | Bin 481 -> 482 bytes .../textures/items/rod_zirnox_thorium_fuel.png | Bin 487 -> 489 bytes .../hbm/textures/items/rod_zirnox_u233_fuel.png | Bin 493 -> 488 bytes .../hbm/textures/items/rod_zirnox_u235_fuel.png | Bin 494 -> 487 bytes .../textures/items/rod_zirnox_uranium_fuel.png | Bin 491 -> 492 bytes 17 files changed, 5 insertions(+), 17 deletions(-) diff --git a/src/main/java/com/hbm/hazard/HazardRegistry.java b/src/main/java/com/hbm/hazard/HazardRegistry.java index 058ea8fd7..7d3d4b836 100644 --- a/src/main/java/com/hbm/hazard/HazardRegistry.java +++ b/src/main/java/com/hbm/hazard/HazardRegistry.java @@ -228,14 +228,14 @@ public class HazardRegistry { 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, rabe * 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, rabe * ingot * 100); + registerOtherWaste(waste_plate_ra226be, po210 * billet * 3); HazardSystem.register(debris_graphite, new HazardData().addEntry(RADIATION, 70F).addEntry(HOT, 5F)); HazardSystem.register(debris_metal, makeData(RADIATION, 5F)); diff --git a/src/main/java/com/hbm/inventory/gui/GUIReactorControl.java b/src/main/java/com/hbm/inventory/gui/GUIReactorControl.java index fb2687b68..d4b58cc43 100644 --- a/src/main/java/com/hbm/inventory/gui/GUIReactorControl.java +++ b/src/main/java/com/hbm/inventory/gui/GUIReactorControl.java @@ -154,21 +154,10 @@ public class GUIReactorControl extends GuiInfoContainer { tess.startDrawing(3); tess.setColorOpaque_I(0x08FF00); - double render[] = new double[39]; - - for(int i = 0; i < render.length; i++) { - render[i] = control.getTargetLevel(control.function, 0 + i * 50000 / 28); + 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); } - for(int i = 0; i < render.length; i++) { - tess.addVertex(guiLeft + 128 + i, guiTop + 39 + render[i], this.zLevel); - } - - //fuck i will figure this out later - /*for(int i = 0; i < render.length; i++) { - tess.addVertex(guiLeft + 128 + i, guiTop + 39 + control.getGraphPoint(control.function, 0 + i * 50, 28), this.zLevel); - }*/ - tess.draw(); GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glPushMatrix(); diff --git a/src/main/java/com/hbm/main/CraftingManager.java b/src/main/java/com/hbm/main/CraftingManager.java index bddd3c66e..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() }); diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityReactorControl.java b/src/main/java/com/hbm/tileentity/machine/TileEntityReactorControl.java index 5a6567002..543152963 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityReactorControl.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityReactorControl.java @@ -100,7 +100,6 @@ public class TileEntityReactorControl extends TileEntityMachineBase implements I public double heatUpper; public RodFunction function = RodFunction.LINEAR; - //TODO: Remove all large reactor functionality for this @Override public void updateEntity() { 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 index c409d12e4978485d1e226b4049c9ca3fbcdb8ad1..2c31daf212ce86e3a8894538d2b1472a1faf2cfb 100644 GIT binary patch delta 182 zcmV;n07?Ii0+9lcMk2BR|0OLZGdna|Vq1xkig|&0sj;dcC?QBtNdN!z@AoU z)W#y?x4~+kxaO-7DlIv0f29f*hBM0HI&`yfUcs k{YRtD9{@D|1*^;(eyawOPjc#h0000907*qoM6N<$fwk!T@* z!vFvd!vV){sAK>D0Afi*K~yMHjf_DOz#s?%gMiBaKU@M#4?Q*GsO&}&pZo?8>B|5t zU4sf>ndu;c^p;U0O3z7!1-*zob6gJJAifE>j^zS6(M3jJ;A-VQ27G6vsJzu gJZ0u-yoq=Kf#wEW-B9%&00000NkvWtM6N<$g6|_mu>b%7 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 index 173c5955ebbfc1a2453281ecb0c1f4fc111cb02f..aa95f50f5c85d281d291145709d677a5d16ab0e3 100644 GIT binary patch delta 182 zcmV;n07?Ii0+9lcMk4z>%)!QLvk!T@* z!Tz@AoU z)W#y?x4~+kxaO-7DlIv0f29f*hBM0HI&`yfUcs k{YRtD9{@D|1*^;(eyawOPjc#h0000907*qoM6N<$g8Gd|eEkL_tjd00000vb8JHk!T@* z!vFvd!vV){sAK>D0Afi*K~yMHjg3JTz%T?vN04y;3)hftx~i82{|`Za>NkMMG#6m$ zx~Kt`nO;Ot-m27y3XCUF^$q$7a6TI_XS$!uPGBAPUZLkv5hCWx6GTL#_Wf;Sr`o@O gXy#d&mX-Mcf$RobQ4{?800000NkvWtM6N<$f|2e>g8%>k 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 index 1b4d8b7afc1764c27f68663293a748a0d0f8799f..3c8678bc2d695878f736d0f12fc69b0d646f25c1 100644 GIT binary patch delta 188 zcmV;t07L(l0+<4jMkQN+0Cs$EWNluQmyV~ap_!kPv$n0{=G};nf{&Gn0001_Am`4J zYa)Na000ib0l1NC?EnA(X-PyuR47wj&RG(KKnMfSZklD}{s)!>oGRtV%8Q^YKeKYJ z7Xt9yn-M^fqeHzS$5aoA?<1RfQA1_Kmfo)g$AlEfsS;T|j1Vnq@e|yTD}pD{^XN8^ qv+u8L68rfNQ1=fMP5#47<_)Eb2Ml6(5(*3e00000+s@hMv+My3R`~w0001^AK1f@Ya)Nb000ic0Tn1pfB*mhXGugsR47w* z%ux=&AP56c5M5h#?X%XG~B7GGhw>`&gK) za)1vEnPXN8swJ{6=MBHBbdqx&wIof=32QBp<_&l)d#)AAwv&71^r*cb#xn-~J`M}? Q000UA07*qoM6N<$f{27YVgLXD 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 index bf3317f83095ed309c3ebbd54d796cd239baca1c..6285b4b9fd7bea396594bc0d1784ec642e4082fa 100644 GIT binary patch delta 181 zcmV;m080Ok0+9lcMWMXd!>X z000ic0Tn1pfB*mhW=TXrR47wjj!P1NFbG5WSMGmd37|8Y=_W5pTgsm(i9WE*x3qv+ z#_xpHR0egQ)!i0#U(HMAKm{fTF^kjtDZpQc*aPi8At#CTis%V)Tq**De&zGZpw9On jjXHloAs+vNRpt$MUGXMVoTwDN;j{yJw0002^3?mwmXd!>Y z000id0mpBsWB>pFV@X6oR47x8jX@T`Fa$(LkZ}JC*N|?ys+R@-k3fFvHvnXs3$S#_ zpaxiGdJ#c+t5PE>FrGx!H|Qt8`E0

3%M|?yckAEA;$Sgoyd_1QF4weV>i&RQnec g!pyTWEi3Z@fc^$q4m_QA00000Nks-uM6N<$f_f24X#fBK 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 index 92e1988c280a17ff37bff58cef76f79bc3e9ced6..f799744fd2816e961c7efcb54d54b210a794a115 100644 GIT binary patch delta 224 zcmeBWn#nZ5v0gF2C&cyt4Tk>=3`UlE4(>MTdCAk}PHO9I+O~I-u8C%7OdtaTgG|5H zH6X=Z666>B9}XD2{24z1g*gj6B8wRq_zrOQp~YS&R8cE*%EP16M|bDLNE zQhXBIu%9otc*|>x`3rQXSNAF$4@y(`V*EZ_D%9@3M#xX*hFkj+L<*T7$FXObPJf*N Pw3fls)z4*}Q$iB}anMpkR`xi(`mJaBr`p*Z~6;7xxJT|GBSE$lJAQI_rOa$GTVM4JS;*6JG9G z!8mPZoJ+vHRaZK=dej5I^8Vs1u#+}O-!=cVUxMs+gSdsy0|k|yofdX+S^Vv9Zp!jo j`x`QzMb4Zy^(RB)8@A{`;Xl8D)-iax`njxgN@xNAzCut+ 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 index 798a1a61da2f429fb92b3cc40265b40b96df2bae..77bd866596a70de3a5274a7a0dbddb5ec73d8291 100644 GIT binary patch delta 182 zcmV;n07?Ii0+9lcMk4z@AoU z)W#y?x4~+kxaO-7DlIv0f29f*hBM0HI&`yfUcs k{YRtD9{@D|1*^;(eyawOPjc#h0000907*qoM6N<$f+ze*SpWb4 delta 178 zcmV;j08Rgq0*wNYMj|pfED0Afi*K~yMHjg3JTz%T?vN04y;3)hftx~i82{|`Za>NkMMG#6m$ zx~Kt`nO;Ot-m27y3XCUF^$q$7a6TI_XS$!uPGBAPUZLkv5hCWx6GTL#_Wf;Sr`o@O gXy#d&mX-Mcf$RobQ4{?800000NkvWtM6N<$f*Kx62LJ#7 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 bf06918cd396c1a44453141cab467285b1460c20..0aca52a3dcafce55231b5fb72d529cf602bb8af7 100644 GIT binary patch delta 419 zcmV;U0bKs#1L6aaNq@os01mVkDXhb#cFc zFBgjls`Unp+!H|EYF%Y5DA1Lmt)*S0`JT-njs+~2QSv2A#z7+0iTpsy2tK|(DYtDC zJg;o(zSGbK7ZPYl+Kua$=8Rb|d>>LC1PkzeF7ks!)(-N-aRjw$jkIlB`&&pO#QY3k zQ-H;ucYM0D1%HkHq1n70xvon(n9e8)5jrGtY;}Ow7>0s0{|P8gr~K_-Gr%DtrK3Zz zEJkzK+kz$x`FSFVD3VYvJM|>ZVBoI$(Kt@&#W3Xh8qvXI61-B9V`mGdxr#Ug#!PBK zlRmWAR6@6Vqh_|+-}ilJw;#9uTX3K!Erh(TR6KS6o*c42snW*+0Kap|nof@592o!r N002ovPDHLkV1kJb!9M^1 delta 419 zcmV;U0bKs#1L6aaNq@rt01m?e$8V@)0004ZNkl1ZN*{{Eq~DgJEUDkqigB=A=H~K znA%5xdZ%+ubZ;)=9#%?1Bu{r_xPQYZxIXwPzgfyVtzMR^& zO}e*Ok`yAaNPpQtDFZxX5D3!wr$=(J;Lkhl0GEiU9PEQ(FxtbvuMhLtDdjSds1}M`_3n4FRHAmgwQ5^K=b#iV2;0w-mpI)tNi{bzP N002ovPDHLkV1jPvyXF7@ 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 730470c7a3133c29383d9783698f6edda463f49c..3f7883f935896218a892df4158dbb55b9ea6761e 100644 GIT binary patch delta 416 zcmV;R0bl;=1MCBkR)2v>L_t(IPnD6eQo=wGhWC;{fH01R8A}^|1D-=m3JczWf(B=7 zEG@LLprWFo)Yl26g$x;FV!|cla%Pttgal;#W|G~#yWRVDkHH^ICNC0gr_*CnlDmbm zO)CB0VYhpiZlN8Go+RfyjWlpw7Y2j3(q&jg%Y3+%!0g8CDPwRPhvG^_2itCHs_#5hAfJqw zW^K)w0jppIArB!4LhwAE6bFfH6%55`U_PIN?+3KDTypncGr%Dtmel~mU^Iu5EhwUh z-=MV`7R7Naq1minQ&4~kVC8)EYPIHQngl=aDMkg0MKGnHz|j`;Y-BhC#&l{yp)RB^ zTPrafKBP0-)b~6O`u*2~XG;pyq=k^}R?AM`-%jN(Y#CZC0q_g0shwyf{q!^d0000< KMNUMnLSTaDVZZYL delta 414 zcmV;P0b%~^1L^~iR)2pz{JGD*uG8}I}{O7lqT3Aj_Wf?%1`>kCt3HSyYqLSP2d+yCXWhjr_&=!8Mgo- zo7Nu(j7Im0bFK?5@O>W!gXe=<9AafY;0^gL)OkAnhz*y7D_ufY707`3XLL68{D-c{j6bT3d zo|Z8!9e_yF1nP}C&>GbYoa0uIa&-pq-GI%Eot*x;LSE4A-hEI?jURjl#!4C6#@RzD z1AN9fmN1{sA%6@blUpvif0PC&BEoeW;5fwS@b6cMV}6C!ZMY^*5(Uj>_0j};Faur* zC_FFvOJQ8C);!Bn5Jn+}hQVSHO--)#3nK$844pc4>Bs{hUVxPeRbs7FswztArg4n#8n^jqsrX6B-PykL z|IQ5lU^IG?Xj`oglakyGjIC4Y{|ejPYqf=TFnExha}^mdoqtZD*L$g5hDD6rr$n7R z96rkBG6mB+hmX%6K)=(uDN9hGDnm;vswgsL(*zox3OT%qTZ1>UP2ghQ5__*QBWnzQV4>8eA~7Tw@^fg#VNox z0h4|I_+)Pj8h?GD-M;^JU6=eQipUC)IOJ5=sQ{lbNd)=LW|QoE&cFUO0~{iP3M`A! z91gaiNfLgER=+};O7J}Af`STE04o=(J5J-xFt&10!E6@4=V6JxEtuxoMp3Mao793v zUr1lRR-@m)Q!`uF55o|;-RGTWYYOzFg^;&F;H&rdl^p!p87;O{Vp+lDF(Jq;VJuJmvA}3_E21cp2Q`?_=P(#N?th%cB3j`C-k@$7kMBer zr=UBh@b>-%==XY;bqNwYuT>M9n9XL8WgOP)wAiUrDyS02(SZ;tOs7+dO;ZQgb#&Et zmBs?L-C8kbQ13_>#^C!AZ&KP=0LiixJkKNFG>!dQ;Cyuqut~sV*F8M?vjuga+r9a; zZJYcc2*`4tSbyYf(Wn5QF-bW2?RJ~&av6Q>H3J+Xf(i_S(H#E$3P}>3qgAhvrUD$t zI-_6G5Vg{-al>h($ M07*qoM6N<$f=#E$mH+?% 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 4b53780e9e9c74862b5e70fb3c210c0f9d116ba2..94ebe02196bfaa6ea36625ed3394dce3a7dcec5f 100644 GIT binary patch delta 413 zcmV;O0b>5=1L*^hR)2m;L_t(IPnD4|PQx%1hJPn%6VVE_X%}X=0q20R14Hl7p-Yii z7#UzeYNt+JI>IerKw?9{5u#EBf|JHEwriK9X{q?6#Qtr+=l?wu{K0g3&E?qX^a$r_ zx`L2psQTaGclT6m$#Fcs~qDWUx{i z*Yy^JI9dTw6eA32w%$m|%E3BWrY-ZTaNz7NArE8UO(4ZVyREbg_Wk|F))EZnK(~AG z;kquonya*gv46zY(*heE$Y)FvhReFi_ zMx%4lvt|A;4AJl3Y&=_XU^>khKW?>r@&3NBKl9aM2^Qc7+d`H6vvrru00000NkvXX Hu0mjf0RH@RWgkL~`M2CPUSRpbP+wu9hz1WtWI6y`^dFQ-4H@jyu{DRr+TF|rG?K2@% zn1iuZ=~jWs#e48FrWMH^llxwgA)OEDov&odSPUY>8gbc)Jnc+BRjb$Fdm=F znXU9a&%jU2gURGk;N0o-m=F}EFt$zA#4F&hbkMG3G`bhFnFFrt!hc|Jlh2kYL5;o=sfU^* zJ03rX^*Vy{i#E7H1u*XQu1ZBxf$Z&BoKFYhn8RihB|CX?6(pg&adjX>1k<-Ett%BB zY`d;2-&r&`6HL}ZO;WxrtGZ;&0LO8_`|@D1ScC7cc(IX4T0xOGj-b_QLF1?)D=_w3 z$in&Z1mGtDlYedd@VMMU26dp@z5B2%i(<5Za2}cz6ez6#pD_$M#X%6zJfE-L|J4I* zB2uf>z%Ur~VXp;67_Qn$NJNo;YpsSx{sz-8Gdk9Nx;FZS{TMhkpO5^z2Rrs?(f{>mp{;mhW%N^1V~q+yUSl@eQQM T7`vJW00000NkvXXu0mjf$Xm%d delta 430 zcmV;f0a5iMC#EF)7KN!&n;nV}fq?Mg~EUJk($~974N&zkl`?lW3U_SV2|k^=@St zayUAv!G~V}^jod-WeExRURw;z!+m!ljs?tSJo~cDT)`q?7;H(&Vem4bd!e9% zXA9~;0EdX!whe~CXb%70LKFqH z%q2LNP%4>c*>wqxvR*QYM_vGFG|l3Zrb${Of(kru@=TW%NCA6D{|RLgT~95}fH9p~ zP+(DYa$9ILt{CS69D4?}(_`4(-G)x*F)gw(2TGu%qbF697D6^E6(`xhlgRfD>Ejvz YUyfX(7WJbY9RL6T07*qoM6N<$f_;I$A^-pY 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 34ae576325a09377f2b243e7b99d956a52f5d082..c12b4a7d538ce82d9356565cf04b72a858413546 100644 GIT binary patch delta 424 zcmV;Z0ayO+1Lp&fNq@os01m`wxx31oqqM&g?g{ z41Qrge-OC#dIKf|$vuoEsq`;D?Z3(Z#ir9c5d?uesKIi%gn!ZKsdO0@(Nax`DtR`$ z7u#(F7nfc5^lN~6Fu2ZJkf19~Sc>ymD64^T_62}pAIvr@8w4?*$?-sIf zzBvQ=K7T$v+(L>v(C^>ATb4x{TR=DuO%eqv9pE#DAt&woKCP=&@b<46;1H2U zqXCA&XbzPvR0YE@=%$j0A_2{&d6jN+kOM4|Eo7SYXH66Ij0ie#-SrD?3LI=f*OL`z zz?e=gDAa}YOJgM_ld+sxQs47D7!DsR&z2mhNpmi4+97RQzP~N)yXO=v0q_k-7Mu*m Sn5N(W0000AN2>HB%Y!1xFt#f}i0L7~cK`-E&fdYF zC8!I{=JlIpS%2hX35XDpNzNLX3UG{3B*^!DpX_K9yl&M4Y$9UYHW&t@KKy$MQ4~~D zm*8ANp1MCBkR)2v>L_t(IPnD6oQo=wKhR^0c1A`c9D|`dT$Iz0(f_I>x!5JG% z3vDc@sAwqlb+pC8#DJOL=CWD$ELqG&Wc+55{m)*`{^u-#KUgg8IgW$Dh;T0D4nnp^ z<^KtORxia8j^%*-P>@WI?WhA>-Ajm{;seexEXS?0l+t2z@58Zc?RhK0000< KMNUMnLSTa1-@_sR delta 415 zcmV;Q0bu^@1M35jR)2s=L_t(IPnD9rPQx$|$ItneT9uN{Oyvy_kHOl3q3_V4OOaR@ z8DL@P)Tv8HcpX^FKtfug6eqD`d~O^yZTR|0mhVpI^Z(8!@B@p*oxpuC7!e_qSwYD5 z=(h!Cvl~Gvm5By~VF;7S!$B?oF0>k=fGZ|ojy zB6tg+C^+OfD Date: Wed, 5 Jan 2022 16:21:15 -0800 Subject: [PATCH 13/17] ugh only doing this to appease bob, but what can you do --- src/main/java/com/hbm/blocks/ModBlocks.java | 8 ++-- .../container/ContainerReactorZirnox.java | 37 +++++++++++-------- .../inventory/recipes/AssemblerRecipes.java | 2 +- .../hbm/render/item/ItemRenderLibrary.java | 2 +- src/main/resources/assets/hbm/lang/en_US.lang | 4 +- 5 files changed, 29 insertions(+), 24 deletions(-) diff --git a/src/main/java/com/hbm/blocks/ModBlocks.java b/src/main/java/com/hbm/blocks/ModBlocks.java index 2cccf2ab0..4cb34a1d7 100644 --- a/src/main/java/com/hbm/blocks/ModBlocks.java +++ b/src/main/java/com/hbm/blocks/ModBlocks.java @@ -976,7 +976,7 @@ public class ModBlocks { public static Block reactor_research; public static final int guiID_reactor_research = 65; - public static Block machine_zirnox; + public static Block reactor_zirnox; public static final int guiID_reactor_zirnox = 124; public static Block zirnox_destroyed; @@ -1709,7 +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_breeding = new MachineReactorBreeding(Material.iron).setBlockName("machine_reactor_breeding").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_reactor"); + 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); @@ -2040,7 +2040,7 @@ public class ModBlocks { 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"); reactor_research = new ReactorResearch(Material.iron).setBlockName("reactor_research").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_reactor_small"); - machine_zirnox = new ReactorZirnox(Material.iron).setBlockName("machine_zirnox").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel"); + reactor_zirnox = new ReactorZirnox(Material.iron).setBlockName("machine_reactor_small").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); @@ -2803,7 +2803,7 @@ public class ModBlocks { GameRegistry.registerBlock(machine_generator, machine_generator.getUnlocalizedName()); GameRegistry.registerBlock(machine_controller, machine_controller.getUnlocalizedName()); GameRegistry.registerBlock(reactor_research, reactor_research.getUnlocalizedName()); - GameRegistry.registerBlock(machine_zirnox, machine_zirnox.getUnlocalizedName()); + GameRegistry.registerBlock(reactor_zirnox, reactor_zirnox.getUnlocalizedName()); GameRegistry.registerBlock(zirnox_destroyed, zirnox_destroyed.getUnlocalizedName()); GameRegistry.registerBlock(machine_industrial_generator, machine_industrial_generator.getUnlocalizedName()); GameRegistry.registerBlock(machine_radgen, machine_radgen.getUnlocalizedName()); diff --git a/src/main/java/com/hbm/inventory/container/ContainerReactorZirnox.java b/src/main/java/com/hbm/inventory/container/ContainerReactorZirnox.java index 3790369af..0acad28ca 100644 --- a/src/main/java/com/hbm/inventory/container/ContainerReactorZirnox.java +++ b/src/main/java/com/hbm/inventory/container/ContainerReactorZirnox.java @@ -19,7 +19,7 @@ public class ContainerReactorZirnox extends Container { public ContainerReactorZirnox(InventoryPlayer invPlayer, TileEntityReactorZirnox te) { zirnox = te; - //Rods + // Rods this.addSlotToContainer(new Slot(te, 0, 26, 16)); this.addSlotToContainer(new Slot(te, 1, 62, 16)); this.addSlotToContainer(new Slot(te, 2, 98, 16)); @@ -45,38 +45,35 @@ public class ContainerReactorZirnox extends Container { this.addSlotToContainer(new Slot(te, 22, 62, 124)); this.addSlotToContainer(new Slot(te, 23, 98, 124)); - //Fluid IO + // Fluid IO this.addSlotToContainer(new Slot(te, 24, 143, 124)); this.addSlotToContainer(new SlotMachineOutput(te, 26, 143, 142)); this.addSlotToContainer(new Slot(te, 25, 179, 124)); this.addSlotToContainer(new SlotMachineOutput(te, 27, 179, 142)); - 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 + 90)); } } - for(int i = 0; i < 9; i++) - { + for(int i = 0; i < 9; i++) { this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 232)); } } @Override - public ItemStack transferStackInSlot(EntityPlayer player, int index) { + public ItemStack transferStackInSlot(EntityPlayer player, int index) { ItemStack var3 = null; Slot slot = (Slot) this.inventorySlots.get(index); - if (slot != null && slot.getHasStack()) { + if(slot != null && slot.getHasStack()) { ItemStack stack = slot.getStack(); var3 = stack.copy(); - if (index <= 27) { - if (!this.mergeItemStack(stack, 28, this.inventorySlots.size(), true)) { + if(index <= 27) { + if(!this.mergeItemStack(stack, 28, this.inventorySlots.size(), true)) { return null; } } else { @@ -89,17 +86,25 @@ public class ContainerReactorZirnox extends Container { if(!this.mergeItemStack(stack, 25, 26, true)) return null; - } else if(!this.mergeItemStack(stack, 0, 24, true)) - return null; + } else { + + if(stack.getItem() instanceof ItemZirnoxRod) { + + if(!this.mergeItemStack(stack, 0, 24, true)) + return null; + } + } } - if (stack.stackSize == 0) { + + if(stack.stackSize == 0) { slot.putStack((ItemStack) null); } else { slot.onSlotChanged(); } } + return var3; - } + } @Override public boolean canInteractWith(EntityPlayer player) { diff --git a/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java b/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java index e8e4e74b9..bccb60632 100644 --- a/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java @@ -516,7 +516,7 @@ public class AssemblerRecipes { new ComparableStack(ModItems.circuit_gold, 3), }, 600); - makeRecipe(new ComparableStack(ModBlocks.machine_zirnox, 1), new AStack[] { + makeRecipe(new ComparableStack(ModBlocks.reactor_zirnox, 1), new AStack[] { new ComparableStack(ModItems.hull_big_steel, 3), new ComparableStack(ModItems.hull_small_steel, 6), new ComparableStack(ModBlocks.steel_scaffold, 4), diff --git a/src/main/java/com/hbm/render/item/ItemRenderLibrary.java b/src/main/java/com/hbm/render/item/ItemRenderLibrary.java index a0bf246a5..cd6c28b54 100644 --- a/src/main/java/com/hbm/render/item/ItemRenderLibrary.java +++ b/src/main/java/com/hbm/render/item/ItemRenderLibrary.java @@ -1160,7 +1160,7 @@ public class ItemRenderLibrary { } }); - renderers.put(Item.getItemFromBlock(ModBlocks.machine_zirnox), new ItemRenderBase( ) { + renderers.put(Item.getItemFromBlock(ModBlocks.reactor_zirnox), new ItemRenderBase( ) { public void renderInventory() { GL11.glTranslated(0, -2, 0); GL11.glScaled(2.8, 2.8, 2.8); diff --git a/src/main/resources/assets/hbm/lang/en_US.lang b/src/main/resources/assets/hbm/lang/en_US.lang index f102ddce5..a6e8dfa3f 100644 --- a/src/main/resources/assets/hbm/lang/en_US.lang +++ b/src/main/resources/assets/hbm/lang/en_US.lang @@ -3391,7 +3391,7 @@ tile.machine_puf6_tank.name=Plutonium Hexafluoride Tank tile.machine_pumpjack.name=Pumpjack tile.machine_radar.name=Radar tile.machine_radgen.name=Radiation-Powered Engine -tile.machine_reactor_breeding.name=Breeding Reactor +tile.machine_reactor.name=Breeding Reactor tile.machine_refinery.name=Oil Refinery tile.machine_reix_mainframe.name=Rei-X Mainframe (WIP) tile.machine_rtg_blue.name=Convection Generator @@ -3572,7 +3572,7 @@ 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.reactor_research.name=Research Reactor +tile.machine_reactor_small.name=Research Reactor tile.reactor_zirnox.name=ZIRNOX Nuclear Reactor tile.red_barrel.name=Explosive Barrel tile.red_cable.name=Red Copper Cable From ba91aef9b48fb42be78c212dbe6d5d3925e4c102 Mon Sep 17 00:00:00 2001 From: Vaern <90118520+Vaern@users.noreply.github.com> Date: Wed, 5 Jan 2022 16:23:45 -0800 Subject: [PATCH 14/17] Update WeaponRecipes.java --- src/main/java/com/hbm/crafting/WeaponRecipes.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/hbm/crafting/WeaponRecipes.java b/src/main/java/com/hbm/crafting/WeaponRecipes.java index a2f006241..6b010d03a 100644 --- a/src/main/java/com/hbm/crafting/WeaponRecipes.java +++ b/src/main/java/com/hbm/crafting/WeaponRecipes.java @@ -100,9 +100,9 @@ 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.waste_natural_uranium }); - CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_xvl1456_ammo, 32), new Object[] { " S ", "SRS", " S ", 'S', STEEL.plate(), 'R', ModItems.waste_uranium }); - CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_xvl1456_ammo, 16), new Object[] { " S ", " R ", " S ", 'S', STEEL.plate(), 'R', ModItems.waste_plate_u235 }); + CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_xvl1456_ammo, 16), new Object[] { " 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() }); From 292d167d619fadce7401dc4ca421177df3dec4ee Mon Sep 17 00:00:00 2001 From: Vaern Date: Wed, 5 Jan 2022 16:25:00 -0800 Subject: [PATCH 15/17] i am clowning --- src/main/java/com/hbm/blocks/ModBlocks.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/hbm/blocks/ModBlocks.java b/src/main/java/com/hbm/blocks/ModBlocks.java index 0446d1139..d3265d3eb 100644 --- a/src/main/java/com/hbm/blocks/ModBlocks.java +++ b/src/main/java/com/hbm/blocks/ModBlocks.java @@ -2039,8 +2039,8 @@ 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"); - reactor_research = new ReactorResearch(Material.iron).setBlockName("reactor_research").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_reactor_small"); - reactor_zirnox = new ReactorZirnox(Material.iron).setBlockName("machine_reactor_small").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel"); + 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); From e1b9c6f6f565bb57a516369c89722129029e1fc0 Mon Sep 17 00:00:00 2001 From: Vaern Date: Wed, 5 Jan 2022 18:29:32 -0800 Subject: [PATCH 16/17] bit of fixes --- .../java/com/hbm/hazard/HazardRegistry.java | 2 +- .../ContainerMachineReactorBreeding.java | 4 ++- .../container/ContainerReactorResearch.java | 13 ++++++---- .../container/ContainerReactorZirnox.java | 2 ++ .../hbm/inventory/gui/GUIReactorZirnox.java | 21 ++++++++++------ .../java/com/hbm/packet/AuxButtonPacket.java | 19 -------------- .../java/com/hbm/packet/AuxGaugePacket.java | 1 - .../machine/TileEntityMachineDeuterium.java | 1 - .../machine/TileEntityNukeFurnace.java | 2 -- .../machine/TileEntityReactorZirnox.java | 25 ++++++++++++++++++- src/main/resources/assets/hbm/lang/en_US.lang | 6 ++--- 11 files changed, 55 insertions(+), 41 deletions(-) diff --git a/src/main/java/com/hbm/hazard/HazardRegistry.java b/src/main/java/com/hbm/hazard/HazardRegistry.java index 7d3d4b836..49e7ba714 100644 --- a/src/main/java/com/hbm/hazard/HazardRegistry.java +++ b/src/main/java/com/hbm/hazard/HazardRegistry.java @@ -235,7 +235,7 @@ public class HazardRegistry { 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 * billet * 3); + 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)); diff --git a/src/main/java/com/hbm/inventory/container/ContainerMachineReactorBreeding.java b/src/main/java/com/hbm/inventory/container/ContainerMachineReactorBreeding.java index 301b93487..52649c3bc 100644 --- a/src/main/java/com/hbm/inventory/container/ContainerMachineReactorBreeding.java +++ b/src/main/java/com/hbm/inventory/container/ContainerMachineReactorBreeding.java @@ -1,6 +1,7 @@ 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; @@ -47,7 +48,8 @@ public class ContainerMachineReactorBreeding extends Container { return null; } - } else if (!this.mergeItemStack(stack, 0, 1, false)) { + } else if(stack.getItem() instanceof ItemBreedingRod) + if (!this.mergeItemStack(stack, 0, 1, false)) { return null; } diff --git a/src/main/java/com/hbm/inventory/container/ContainerReactorResearch.java b/src/main/java/com/hbm/inventory/container/ContainerReactorResearch.java index 730a983b4..5bea2c066 100644 --- a/src/main/java/com/hbm/inventory/container/ContainerReactorResearch.java +++ b/src/main/java/com/hbm/inventory/container/ContainerReactorResearch.java @@ -1,6 +1,7 @@ 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; @@ -45,8 +46,7 @@ private TileEntityReactorResearch reactor; } @Override - public ItemStack transferStackInSlot(EntityPlayer player, int index) - { + public ItemStack transferStackInSlot(EntityPlayer player, int index) { ItemStack var3 = null; Slot slot = (Slot) this.inventorySlots.get(index); @@ -55,13 +55,16 @@ private TileEntityReactorResearch reactor; var3 = stack.copy(); if (index <= 12) { - if (!this.mergeItemStack(stack, 13, this.inventorySlots.size(), true)) - { + if (!this.mergeItemStack(stack, 13, this.inventorySlots.size(), true)){ return null; } } else { - if (!this.mergeItemStack(stack, 0, 13, true)) + 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); 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/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/packet/AuxButtonPacket.java b/src/main/java/com/hbm/packet/AuxButtonPacket.java index 9eb382009..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.TileEntityReactorResearch; import com.hbm.tileentity.machine.TileEntityRadioRec; -import com.hbm.tileentity.machine.TileEntityReactorControl; import com.hbm.tileentity.machine.TileEntityReactorZirnox; import com.hbm.tileentity.machine.TileEntitySoyuzLauncher; @@ -201,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 b4210fe13..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.TileEntityReactorResearch; import com.hbm.tileentity.machine.TileEntityMachineSeleniumEngine; import com.hbm.tileentity.machine.TileEntityRadioRec; diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineDeuterium.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineDeuterium.java index 9930767dd..b6f70a09f 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineDeuterium.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineDeuterium.java @@ -6,7 +6,6 @@ import com.hbm.lib.Library; import net.minecraft.entity.player.EntityPlayer; 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; diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityNukeFurnace.java b/src/main/java/com/hbm/tileentity/machine/TileEntityNukeFurnace.java index e35b80f98..1c6344060 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityNukeFurnace.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityNukeFurnace.java @@ -4,8 +4,6 @@ import java.util.HashMap; import com.hbm.blocks.machine.MachineNukeFurnace; import com.hbm.inventory.RecipesCommon.ComparableStack; -import com.hbm.inventory.recipes.BreederRecipes; -import com.hbm.inventory.recipes.BreederRecipes.BreederRecipe; import com.hbm.items.ModItems; import com.hbm.items.machine.ItemBreedingRod.*; import com.hbm.items.special.ItemCustomLore; diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityReactorZirnox.java b/src/main/java/com/hbm/tileentity/machine/TileEntityReactorZirnox.java index f56f8e63c..fb874f99a 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; @@ -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/resources/assets/hbm/lang/en_US.lang b/src/main/resources/assets/hbm/lang/en_US.lang index a6e8dfa3f..7f5ca8412 100644 --- a/src/main/resources/assets/hbm/lang/en_US.lang +++ b/src/main/resources/assets/hbm/lang/en_US.lang @@ -2201,7 +2201,7 @@ 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=Ra-226Be 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 @@ -2855,7 +2855,7 @@ item.waste_mox.name=Depleted MOX Fuel item.waste_natural_uranium.name=Depleted Natural Uranium Fuel 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 Ra-226Be 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 @@ -3573,7 +3573,7 @@ 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.reactor_zirnox.name=ZIRNOX Nuclear 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 From 5937794bafcd5fc2ea2c22a50da1f0ed41717b60 Mon Sep 17 00:00:00 2001 From: Vaern Date: Thu, 6 Jan 2022 15:58:42 -0800 Subject: [PATCH 17/17] trolling --- .../com/hbm/tileentity/machine/TileEntityReactorZirnox.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityReactorZirnox.java b/src/main/java/com/hbm/tileentity/machine/TileEntityReactorZirnox.java index fb874f99a..493b4c0d8 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityReactorZirnox.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityReactorZirnox.java @@ -206,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 {