From f082076960a3ba5b1fb2e912a430e89384dc0b91 Mon Sep 17 00:00:00 2001 From: HbmMods Date: Tue, 7 Jun 2016 18:58:10 +0200 Subject: [PATCH] 1.0.20 I --- com/hbm/blocks/TileEntityCoreAdvanced.java | 7 + com/hbm/blocks/TileEntityCoreTitanium.java | 7 + com/hbm/blocks/TileEntityDiFurnace.java | 13 +- .../blocks/TileEntityMachineCentrifuge.java | 52 ++-- com/hbm/blocks/TileEntityMachineCoal.java | 28 +- .../blocks/TileEntityMachineDeuterium.java | 213 +++++++------- .../TileEntityMachineElectricFurnace.java | 20 +- .../blocks/TileEntityMachineGenerator.java | 59 +++- com/hbm/blocks/TileEntityMachinePuF6Tank.java | 9 +- com/hbm/blocks/TileEntityMachineReactor.java | 14 +- ...eEntityMachineSchrabidiumTransmutator.java | 273 ++++++++++-------- com/hbm/blocks/TileEntityMachineUF6Tank.java | 9 +- com/hbm/blocks/TileEntityNukeFurnace.java | 26 +- com/hbm/explosion/ExplosionNukeAdvanced.java | 6 +- com/hbm/gui/ContainerDiFurnace.java | 9 +- com/hbm/gui/MachineRecipes.java | 9 +- com/hbm/items/ModItems.java | 2 +- com/hbm/main/NEIConfig.java | 28 +- 18 files changed, 514 insertions(+), 270 deletions(-) diff --git a/com/hbm/blocks/TileEntityCoreAdvanced.java b/com/hbm/blocks/TileEntityCoreAdvanced.java index cf6593642..6e2c4e201 100644 --- a/com/hbm/blocks/TileEntityCoreAdvanced.java +++ b/com/hbm/blocks/TileEntityCoreAdvanced.java @@ -17,6 +17,7 @@ public class TileEntityCoreAdvanced extends TileEntity implements ISidedInventor public int progress = 0; public int power = 0; + public int soundCycle = 0; public final static int processTime = 100; public final static int maxPower = ModItems.factory_core_advanced.getMaxDamage(); private ItemStack slots[]; @@ -369,6 +370,12 @@ public class TileEntityCoreAdvanced extends TileEntity implements ISidedInventor { this.progress += 1; this.slots[22].setItemDamage(this.slots[22].getItemDamage() + 1); + if(soundCycle == 0) + this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "minecart.base", 1.0F, 0.75F); + soundCycle++; + + if(soundCycle >= 50) + soundCycle = 0; } else { this.progress = 0; } diff --git a/com/hbm/blocks/TileEntityCoreTitanium.java b/com/hbm/blocks/TileEntityCoreTitanium.java index c391eaa5a..780c83a8a 100644 --- a/com/hbm/blocks/TileEntityCoreTitanium.java +++ b/com/hbm/blocks/TileEntityCoreTitanium.java @@ -18,6 +18,7 @@ public class TileEntityCoreTitanium extends TileEntity implements ISidedInventor public int progress = 0; public int power = 0; + public int soundCycle = 0; public final static int processTime = 200; public final static int maxPower = ModItems.factory_core_titanium.getMaxDamage(); private ItemStack slots[]; @@ -304,6 +305,12 @@ public class TileEntityCoreTitanium extends TileEntity implements ISidedInventor { this.progress += 1; this.slots[22].setItemDamage(this.slots[22].getItemDamage() + 1); + if(soundCycle == 0) + this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "minecart.base", 1.0F, 0.75F); + soundCycle++; + + if(soundCycle >= 50) + soundCycle = 0; } else { this.progress = 0; } diff --git a/com/hbm/blocks/TileEntityDiFurnace.java b/com/hbm/blocks/TileEntityDiFurnace.java index 02ab89e7e..0c81d95ea 100644 --- a/com/hbm/blocks/TileEntityDiFurnace.java +++ b/com/hbm/blocks/TileEntityDiFurnace.java @@ -23,9 +23,9 @@ public class TileEntityDiFurnace extends TileEntity implements ISidedInventory { public static final int processingSpeed = 100; public boolean runsOnRtg = false; - private static final int[] slots_top = new int[] {0, 1}; + private static final int[] slots_top = new int[] {0}; private static final int[] slots_bottom = new int[] {3}; - private static final int[] slots_side = new int[] {2}; + private static final int[] slots_side = new int[] {1}; private String customName; @@ -101,7 +101,12 @@ public class TileEntityDiFurnace extends TileEntity implements ISidedInventory { @Override public boolean isItemValidForSlot(int i, ItemStack itemStack) { - return i == 2 ? false : (i == 1 ? hasItemPower(itemStack) : true); + if(i == 3) + { + return false; + } + + return true; } public boolean hasItemPower(ItemStack itemStack) { @@ -205,7 +210,7 @@ public class TileEntityDiFurnace extends TileEntity implements ISidedInventory { @Override public boolean canExtractItem(int i, ItemStack itemStack, int j) { - return j != 0 || i != 1 || itemStack.getItem() == Items.bucket; + return true; } public int getDiFurnaceProgressScaled(int i) { diff --git a/com/hbm/blocks/TileEntityMachineCentrifuge.java b/com/hbm/blocks/TileEntityMachineCentrifuge.java index a931d1f67..004b88fae 100644 --- a/com/hbm/blocks/TileEntityMachineCentrifuge.java +++ b/com/hbm/blocks/TileEntityMachineCentrifuge.java @@ -20,13 +20,14 @@ public class TileEntityMachineCentrifuge extends TileEntity implements ISidedInv public int dualCookTime; public int dualPower; + public int soundCycle = 0; public static final int maxPower = 100000; public static final int processingSpeed = 500; public boolean runsOnRtg = false; - private static final int[] slots_top = new int[] {0, 1}; - private static final int[] slots_bottom = new int[] {3}; - private static final int[] slots_side = new int[] {2}; + 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[] {1}; private String customName; @@ -102,7 +103,17 @@ public class TileEntityMachineCentrifuge extends TileEntity implements ISidedInv @Override public boolean isItemValidForSlot(int i, ItemStack itemStack) { - return i == 2 ? false : (i == 1 ? hasItemPower(itemStack) : true); + if(i == 2 || i == 3 || i == 4 || i == 5) + { + return false; + } + + if(i == 1 && hasItemPower(itemStack)) + { + return true; + } + + return true; } public boolean hasItemPower(ItemStack itemStack) { @@ -219,6 +230,7 @@ public class TileEntityMachineCentrifuge extends TileEntity implements ISidedInv public boolean canProcess() { + if(slots[0] == null) { return false; @@ -354,19 +366,6 @@ public class TileEntityMachineCentrifuge extends TileEntity implements ISidedInv this.runsOnRtg = true; } - if(hasPower() && canProcess()) - { - dualCookTime++; - - if(this.dualCookTime >= TileEntityMachineCentrifuge.processingSpeed) - { - this.dualCookTime = 0; - this.processItem(); - } - }else{ - dualCookTime = 0; - } - boolean trigger = true; if(hasPower() && canProcess() && this.dualCookTime == 0) @@ -380,6 +379,25 @@ public class TileEntityMachineCentrifuge extends TileEntity implements ISidedInv } } + if(hasPower() && canProcess()) + { + dualCookTime++; + if(soundCycle == 0) + this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "minecart.base", 1.0F, 1.5F); + soundCycle++; + + if(soundCycle >= 25) + soundCycle = 0; + + if(this.dualCookTime >= TileEntityMachineCentrifuge.processingSpeed) + { + this.dualCookTime = 0; + this.processItem(); + } + }else{ + dualCookTime = 0; + } + if(flag1) { this.markDirty(); diff --git a/com/hbm/blocks/TileEntityMachineCoal.java b/com/hbm/blocks/TileEntityMachineCoal.java index 475fe2781..486059214 100644 --- a/com/hbm/blocks/TileEntityMachineCoal.java +++ b/com/hbm/blocks/TileEntityMachineCoal.java @@ -18,6 +18,7 @@ import com.hbm.calc.UnionOfTileEntitiesAndBooleans; import com.hbm.interfaces.IConductor; import com.hbm.interfaces.IConsumer; import com.hbm.interfaces.ISource; +import com.hbm.items.ItemBattery; import com.hbm.items.ModItems; import com.hbm.lib.Library; @@ -34,8 +35,8 @@ public class TileEntityMachineCoal extends TileEntity implements ISidedInventory public List list = new ArrayList(); private static final int[] slots_top = new int[] {1}; - private static final int[] slots_bottom = new int[] {2}; - private static final int[] slots_side = new int[] {0}; + private static final int[] slots_bottom = new int[] {0, 2}; + private static final int[] slots_side = new int[] {0, 2}; private String customName; @@ -110,8 +111,18 @@ public class TileEntityMachineCoal extends TileEntity implements ISidedInventory public void closeInventory() {} @Override - public boolean isItemValidForSlot(int i, ItemStack itemStack) { - return true; + public boolean isItemValidForSlot(int i, ItemStack stack) { + if(i == 0) + if(stack.getItem() == ModItems.rod_water || stack.getItem() == ModItems.rod_dual_water || stack.getItem() == ModItems.rod_quad_water || stack.getItem() == Items.water_bucket) + return true; + if(i == 2) + if(stack.getItem() instanceof ItemBattery) + return true; + if(i == 1) + if(stack.getItem() == Items.coal || stack.getItem() == Item.getItemFromBlock(Blocks.coal_block)) + return true; + + return false; } @Override @@ -189,7 +200,14 @@ public class TileEntityMachineCoal extends TileEntity implements ISidedInventory @Override public boolean canExtractItem(int i, ItemStack itemStack, int j) { - return j != 0 || i != 1 || itemStack.getItem() == Items.bucket; + if(i == 0) + if(itemStack.getItem() == Items.bucket || itemStack.getItem() == ModItems.rod_empty || itemStack.getItem() == ModItems.rod_dual_empty || itemStack.getItem() == ModItems.rod_quad_empty) + return true; + if(i == 2) + if(itemStack.getItemDamage() == 0) + return true; + + return false; } public int getWaterScaled(int i) { diff --git a/com/hbm/blocks/TileEntityMachineDeuterium.java b/com/hbm/blocks/TileEntityMachineDeuterium.java index adb41d664..980037080 100644 --- a/com/hbm/blocks/TileEntityMachineDeuterium.java +++ b/com/hbm/blocks/TileEntityMachineDeuterium.java @@ -2,6 +2,7 @@ package com.hbm.blocks; import com.hbm.interfaces.IConductor; import com.hbm.interfaces.IConsumer; +import com.hbm.items.ItemBattery; import com.hbm.items.ModItems; import net.minecraft.entity.player.EntityPlayer; @@ -25,7 +26,7 @@ public class TileEntityMachineDeuterium extends TileEntity implements ISidedInve public static final int processSpeed = 200; private static final int[] slots_top = new int[] {3}; - private static final int[] slots_bottom = new int[] {4}; + private static final int[] slots_bottom = new int[] {4, 0, 1}; private static final int[] slots_side = new int[] {0, 1, 2}; private String customName; @@ -100,7 +101,27 @@ public class TileEntityMachineDeuterium extends TileEntity implements ISidedInve public void closeInventory() {} @Override - public boolean isItemValidForSlot(int p_94041_1_, ItemStack p_94041_2_) { + public boolean isItemValidForSlot(int i, ItemStack stack) { + switch(i) + { + case 0: + if(stack.getItem() instanceof ItemBattery) + return true; + break; + 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) + return true; + break; + case 2: + if(stack.getItem() == ModItems.sulfur) + return true; + break; + case 3: + if(stack.getItem() == ModItems.cell_empty) + return true; + break; + } + return false; } @@ -183,7 +204,16 @@ public class TileEntityMachineDeuterium extends TileEntity implements ISidedInve @Override public boolean canExtractItem(int i, ItemStack itemStack, int j) { - return j != 0 || i != 1 || itemStack.getItem() == Items.bucket; + if(i == 4) + return true; + if(i == 0 && itemStack.getItem() instanceof ItemBattery) + if(itemStack.getItemDamage() == itemStack.getMaxDamage()) + return true; + if(i == 1) + if(itemStack.getItem() == Items.bucket || itemStack.getItem() == ModItems.rod_empty || itemStack.getItem() == ModItems.rod_dual_empty || itemStack.getItem() == ModItems.rod_quad_empty) + return true; + + return false; } public int getPowerScaled(int i) { @@ -244,105 +274,94 @@ public class TileEntityMachineDeuterium extends TileEntity implements ISidedInve @Override public void updateEntity() { - if(slots[2] != null && slots[2].getItem() == ModItems.sulfur && sulfur + 125 <= maxFill) - { - sulfur += 125; - slots[2].stackSize--; - if(slots[2].stackSize == 0) - { - slots[2] = null; + + if (!worldObj.isRemote) { + if (slots[2] != null && slots[2].getItem() == ModItems.sulfur && sulfur + 125 <= maxFill) { + sulfur += 125; + slots[2].stackSize--; + if (slots[2].stackSize == 0) { + slots[2] = null; + } } - } - if(slots[2] != null && slots[2].getItem() == ModItems.inf_sulfur) - { - sulfur = maxFill; - } - - if(slots[1] != null && slots[1].getItem() == Items.water_bucket && 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[2] != null && slots[2].getItem() == ModItems.inf_sulfur) { + sulfur = maxFill; } - } - - 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() == Items.water_bucket && 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_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_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.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; + } + + if (/* power + 100 <= maxPower && */slots[0] != null && slots[0].getItem() == ModItems.battery_creative) { + power = maxPower; + } + + if (power + 100 <= maxPower && slots[0] != null && slots[0].getItem() == ModItems.battery_generic + && slots[0].getItemDamage() < 50) { + power += 100; + slots[0].setItemDamage(slots[0].getItemDamage() + 1); + } + + if (power + 100 <= maxPower && slots[0] != null && slots[0].getItem() == ModItems.battery_advanced + && slots[0].getItemDamage() < 200) { + power += 100; + slots[0].setItemDamage(slots[0].getItemDamage() + 1); + } + + if (power + 100 <= maxPower && slots[0] != null && slots[0].getItem() == ModItems.battery_schrabidium + && slots[0].getItemDamage() < 1000) { + power += 100; + slots[0].setItemDamage(slots[0].getItemDamage() + 1); + } + + if (power + 100 <= maxPower && slots[0] != null && slots[0].getItem() == ModItems.fusion_core + && slots[0].getItemDamage() < 5000) { + power += 100; + slots[0].setItemDamage(slots[0].getItemDamage() + 1); + } + + if (power + 100 <= maxPower && slots[0] != null && slots[0].getItem() == ModItems.energy_core + && slots[0].getItemDamage() < 5000) { + power += 100; + slots[0].setItemDamage(slots[0].getItemDamage() + 1); + } + + if (canProcess()) { + process(); + } else { + process = 0; } - } - - if(slots[1] != null && slots[1].getItem() == ModItems.inf_water) - { - water = maxFill; - } - - if(/*power + 100 <= maxPower && */slots[0] != null && slots[0].getItem() == ModItems.battery_creative) - { - power = maxPower; - } - - if(power + 100 <= maxPower && slots[0] != null && slots[0].getItem() == ModItems.battery_generic && slots[0].getItemDamage() < 50) - { - power += 100; - slots[0].setItemDamage(slots[0].getItemDamage() + 1); - } - - if(power + 100 <= maxPower && slots[0] != null && slots[0].getItem() == ModItems.battery_advanced && slots[0].getItemDamage() < 200) - { - power += 100; - slots[0].setItemDamage(slots[0].getItemDamage() + 1); - } - - if(power + 100 <= maxPower && slots[0] != null && slots[0].getItem() == ModItems.battery_schrabidium && slots[0].getItemDamage() < 1000) - { - power += 100; - slots[0].setItemDamage(slots[0].getItemDamage() + 1); - } - - if(power + 100 <= maxPower && slots[0] != null && slots[0].getItem() == ModItems.fusion_core && slots[0].getItemDamage() < 5000) - { - power += 100; - slots[0].setItemDamage(slots[0].getItemDamage() + 1); - } - - if(power + 100 <= maxPower && slots[0] != null && slots[0].getItem() == ModItems.energy_core && slots[0].getItemDamage() < 5000) - { - power += 100; - slots[0].setItemDamage(slots[0].getItemDamage() + 1); - } - - if(canProcess()) - { - process(); - } else { - process = 0; } } diff --git a/com/hbm/blocks/TileEntityMachineElectricFurnace.java b/com/hbm/blocks/TileEntityMachineElectricFurnace.java index d92c99b30..868df1b1d 100644 --- a/com/hbm/blocks/TileEntityMachineElectricFurnace.java +++ b/com/hbm/blocks/TileEntityMachineElectricFurnace.java @@ -2,6 +2,7 @@ package com.hbm.blocks; import com.hbm.interfaces.IConductor; import com.hbm.interfaces.IConsumer; +import com.hbm.items.ItemBattery; import com.hbm.items.ModItems; import net.minecraft.entity.player.EntityPlayer; @@ -23,7 +24,7 @@ public class TileEntityMachineElectricFurnace extends TileEntity implements ISid public static final int processingSpeed = 100; private static final int[] slots_top = new int[] {1}; - private static final int[] slots_bottom = new int[] {2}; + private static final int[] slots_bottom = new int[] {2, 0}; private static final int[] slots_side = new int[] {0}; private String customName; @@ -100,7 +101,14 @@ public class TileEntityMachineElectricFurnace extends TileEntity implements ISid @Override public boolean isItemValidForSlot(int i, ItemStack itemStack) { - return true; + if(i == 0) + if(itemStack.getItem() instanceof ItemBattery) + return true; + + if(i == 1) + return true; + + return false; } @Override @@ -178,7 +186,13 @@ public class TileEntityMachineElectricFurnace extends TileEntity implements ISid @Override public boolean canExtractItem(int i, ItemStack itemStack, int j) { - return j != 0 || i != 1 || itemStack.getItem() == Items.bucket; + if(i == 0) + if(itemStack.getItemDamage() == itemStack.getMaxDamage()) + return true; + if(i == 2) + return true; + + return false; } public int getDiFurnaceProgressScaled(int i) { diff --git a/com/hbm/blocks/TileEntityMachineGenerator.java b/com/hbm/blocks/TileEntityMachineGenerator.java index 5e4208ebd..7c93684c6 100644 --- a/com/hbm/blocks/TileEntityMachineGenerator.java +++ b/com/hbm/blocks/TileEntityMachineGenerator.java @@ -9,6 +9,7 @@ import com.hbm.explosion.ExplosionNukeGeneric; import com.hbm.interfaces.IConductor; import com.hbm.interfaces.IConsumer; import com.hbm.interfaces.ISource; +import com.hbm.items.ItemBattery; import com.hbm.items.ItemFuelRod; import com.hbm.items.ModItems; import com.hbm.lib.Library; @@ -39,9 +40,9 @@ public class TileEntityMachineGenerator extends TileEntity implements ISidedInve public int age = 0; public List list = new ArrayList(); - private static final int[] slots_top = new int[] {}; + private static final int[] slots_top = new int[] {0, 1, 2, 3, 4, 5, 6, 7, 8}; private static final int[] slots_bottom = new int[] {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}; - private static final int[] slots_side = new int[] {}; + private static final int[] slots_side = new int[] {9, 10, 11}; private String customName; @@ -117,7 +118,27 @@ public class TileEntityMachineGenerator extends TileEntity implements ISidedInve @Override public boolean isItemValidForSlot(int i, ItemStack itemStack) { - return true; + if(i == 0 || + i == 1 || + i == 2 || + i == 3 || + i == 4 || + i == 5 || + i == 6 || + i == 7 || + i == 8) + 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) + return true; + if(i == 10) + if(itemStack.getItem() == ModItems.rod_coolant || itemStack.getItem() == ModItems.rod_dual_coolant || itemStack.getItem() == ModItems.rod_quad_coolant) + return true; + if(i == 11) + if(itemStack.getItem() instanceof ItemBattery) + return true; + return false; } @Override @@ -199,8 +220,36 @@ public class TileEntityMachineGenerator extends TileEntity implements ISidedInve @Override public boolean canExtractItem(int i, ItemStack itemStack, int j) { - //return j != 0 || i != 1 || itemStack.getItem() == Items.bucket; - return true; + if(i == 0 || + i == 1 || + i == 2 || + i == 3 || + i == 4 || + i == 5 || + i == 6 || + i == 7 || + i == 8) + 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 || + itemStack.getItem() == ModItems.rod_dual_plutonium_fuel_depleted || + itemStack.getItem() == ModItems.rod_quad_plutonium_fuel_depleted || + itemStack.getItem() == ModItems.rod_mox_fuel_depleted || + itemStack.getItem() == ModItems.rod_dual_mox_fuel_depleted || + itemStack.getItem() == ModItems.rod_quad_mox_fuel_depleted || + itemStack.getItem() == ModItems.rod_schrabidium_fuel_depleted || + itemStack.getItem() == ModItems.rod_dual_schrabidium_fuel_depleted || + itemStack.getItem() == ModItems.rod_quad_schrabidium_fuel_depleted) + return true; + if(i == 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) + return true; + if(i == 11) + if(itemStack.getItemDamage() == 0) + return true; + + return false; } public int getWaterScaled(int i) { diff --git a/com/hbm/blocks/TileEntityMachinePuF6Tank.java b/com/hbm/blocks/TileEntityMachinePuF6Tank.java index c561c5381..c73114b4c 100644 --- a/com/hbm/blocks/TileEntityMachinePuF6Tank.java +++ b/com/hbm/blocks/TileEntityMachinePuF6Tank.java @@ -94,7 +94,12 @@ public class TileEntityMachinePuF6Tank extends TileEntity implements ISidedInven public void closeInventory() {} @Override - public boolean isItemValidForSlot(int p_94041_1_, ItemStack p_94041_2_) { + public boolean isItemValidForSlot(int i, ItemStack stack) { + if(i == 0 && stack.getItem() == ModItems.cell_puf6) + return true; + if(i == 2 && stack.getItem() == ModItems.cell_empty) + return true; + return false; } @@ -171,7 +176,7 @@ public class TileEntityMachinePuF6Tank extends TileEntity implements ISidedInven @Override public boolean canExtractItem(int i, ItemStack itemStack, int j) { - return j != 0 || i != 1 || itemStack.getItem() == Items.bucket; + return true; } public int getFillStateScaled(int i) { diff --git a/com/hbm/blocks/TileEntityMachineReactor.java b/com/hbm/blocks/TileEntityMachineReactor.java index d4a920871..48ae1cf30 100644 --- a/com/hbm/blocks/TileEntityMachineReactor.java +++ b/com/hbm/blocks/TileEntityMachineReactor.java @@ -23,7 +23,7 @@ public class TileEntityMachineReactor extends TileEntity implements ISidedInvent public boolean runsOnRtg = false; private static final int[] slots_top = new int[] {1}; - private static final int[] slots_bottom = new int[] {2}; + private static final int[] slots_bottom = new int[] {2, 0}; private static final int[] slots_side = new int[] {0}; private String customName; @@ -217,7 +217,17 @@ public class TileEntityMachineReactor extends TileEntity implements ISidedInvent @Override public boolean canExtractItem(int i, ItemStack itemStack, int j) { - return j != 0 || i != 1 || itemStack.getItem() == Items.bucket; + if(i == 0) + { + if(itemStack.getItem() == ModItems.rod_empty || itemStack.getItem() == ModItems.rod_dual_empty || itemStack.getItem() == ModItems.rod_quad_empty) + { + return true; + } + + return false; + } + + return true; } public int getDiFurnaceProgressScaled(int i) { diff --git a/com/hbm/blocks/TileEntityMachineSchrabidiumTransmutator.java b/com/hbm/blocks/TileEntityMachineSchrabidiumTransmutator.java index 514d9b421..d5c87207b 100644 --- a/com/hbm/blocks/TileEntityMachineSchrabidiumTransmutator.java +++ b/com/hbm/blocks/TileEntityMachineSchrabidiumTransmutator.java @@ -3,10 +3,10 @@ package com.hbm.blocks; import java.util.Random; import com.hbm.interfaces.IConsumer; +import com.hbm.items.ItemBattery; import com.hbm.items.ModItems; 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; @@ -16,19 +16,20 @@ import net.minecraft.tileentity.TileEntity; public class TileEntityMachineSchrabidiumTransmutator extends TileEntity implements ISidedInventory, IConsumer { private ItemStack slots[]; - + public int power = 0; public int process = 0; + public int soundCycle = 0; public static final int maxPower = 500000000; public static final int processSpeed = 60; Random rand = new Random(); - private static final int[] slots_top = new int[] {0}; - private static final int[] slots_bottom = new int[] {1}; - private static final int[] slots_side = new int[] {3}; - + private static final int[] slots_top = new int[] { 0 }; + private static final int[] slots_bottom = new int[] { 1, 2 }; + private static final int[] slots_side = new int[] { 3, 2 }; + private String customName; - + public TileEntityMachineSchrabidiumTransmutator() { slots = new ItemStack[4]; } @@ -45,21 +46,19 @@ public class TileEntityMachineSchrabidiumTransmutator extends TileEntity impleme @Override public ItemStack getStackInSlotOnClosing(int i) { - if(slots[i] != null) - { + if (slots[i] != null) { ItemStack itemStack = slots[i]; slots[i] = null; return itemStack; } else { - return null; + return null; } } @Override public void setInventorySlotContents(int i, ItemStack itemStack) { slots[i] = itemStack; - if(itemStack != null && itemStack.stackSize > getInventoryStackLimit()) - { + if (itemStack != null && itemStack.stackSize > getInventoryStackLimit()) { itemStack.stackSize = getInventoryStackLimit(); } } @@ -73,7 +72,7 @@ public class TileEntityMachineSchrabidiumTransmutator extends TileEntity impleme public boolean hasCustomInventoryName() { return this.customName != null && this.customName.length() > 0; } - + public void setCustomName(String name) { this.customName = name; } @@ -85,91 +84,99 @@ public class TileEntityMachineSchrabidiumTransmutator extends TileEntity impleme @Override public boolean isUseableByPlayer(EntityPlayer player) { - if(worldObj.getTileEntity(xCoord, yCoord, zCoord) != this) - { + if (worldObj.getTileEntity(xCoord, yCoord, zCoord) != this) { return false; - }else{ - return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <=64; + } else { + return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <= 64; } } - - @Override - public void openInventory() {} - @Override - public void closeInventory() {} @Override - public boolean isItemValidForSlot(int p_94041_1_, ItemStack p_94041_2_) { + public void openInventory() { + } + + @Override + public void closeInventory() { + } + + @Override + public boolean isItemValidForSlot(int i, ItemStack stack) { + switch (i) { + case 0: + if (stack.getItem() == ModItems.ingot_uranium) + return true; + break; + case 2: + if (stack.getItem() == ModItems.redcoil_capacitor) + return true; + break; + case 3: + if (stack.getItem() instanceof ItemBattery) + return true; + break; + } return false; } - + @Override public ItemStack decrStackSize(int i, int j) { - if(slots[i] != null) - { - if(slots[i].stackSize <= 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) - { + 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); - + power = nbt.getShort("power") * 50000; process = nbt.getShort("process"); slots = new ItemStack[getSizeInventory()]; - - for(int i = 0; i < list.tagCount(); i++) - { + + for (int i = 0; i < list.tagCount(); i++) { NBTTagCompound nbt1 = list.getCompoundTagAt(i); byte b0 = nbt1.getByte("slot"); - if(b0 >= 0 && b0 < slots.length) - { + if (b0 >= 0 && b0 < slots.length) { slots[b0] = ItemStack.loadItemStackFromNBT(nbt1); } } } - + @Override public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); - nbt.setShort("power", (short) (power/50000)); + nbt.setShort("power", (short) (power / 50000)); nbt.setShort("process", (short) process); NBTTagList list = new NBTTagList(); - - for(int i = 0; i < slots.length; i++) - { - if(slots[i] != null) - { + + for (int i = 0; i < slots.length; i++) { + if (slots[i] != null) { NBTTagCompound nbt1 = new NBTTagCompound(); - nbt1.setByte("slot", (byte)i); + 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 p_94128_1_) { + return p_94128_1_ == 0 ? slots_bottom : (p_94128_1_ == 1 ? slots_top : slots_side); + } @Override public boolean canInsertItem(int i, ItemStack itemStack, int j) { @@ -177,120 +184,144 @@ public class TileEntityMachineSchrabidiumTransmutator extends TileEntity impleme } @Override - public boolean canExtractItem(int i, ItemStack itemStack, int j) { - return j != 0 || i != 1 || itemStack.getItem() == Items.bucket; + public boolean canExtractItem(int i, ItemStack stack, int j) { + if (i == 2 && stack.getItem() != null && stack.getItem() == ModItems.redcoil_capacitor + && stack.getItemDamage() == stack.getMaxDamage()) { + return true; + } + + if (i == 1) { + return true; + } + + if (i == 3 && stack.getItemDamage() == stack.getMaxDamage()) { + return true; + } + + return false; } - + public int getPowerScaled(int i) { - int p = (int)(power / 50000); - int m = (int)(maxPower / 50000); + int p = (int) (power / 50000); + int m = (int) (maxPower / 50000); int r = (p * i) / m; return r; } - + public int getProgressScaled(int i) { return (process * i) / processSpeed; } - + public boolean canProcess() { - if(power >= 499000000 && slots[0] != null && slots[0].getItem() == ModItems.ingot_uranium && - slots[2] != null && slots[2].getItem() == ModItems.redcoil_capacitor && - slots[2].getItemDamage() < slots[2].getMaxDamage() && - (slots[1] == null || (slots[1] != null && slots[1].getItem() == ModItems.ingot_schrabidium && slots[1].stackSize < slots[1].getMaxStackSize()))) - { + if (power >= 499000000 && slots[0] != null && slots[0].getItem() == ModItems.ingot_uranium && slots[2] != null + && slots[2].getItem() == ModItems.redcoil_capacitor + && slots[2].getItemDamage() < slots[2].getMaxDamage() + && (slots[1] == null || (slots[1] != null && slots[1].getItem() == ModItems.ingot_schrabidium + && slots[1].stackSize < slots[1].getMaxStackSize()))) { return true; } return false; } - + public boolean isProcessing() { return process > 0; } - + public void process() { process++; - - if(process >= processSpeed) { - + + if (isProcessing()) { + if (soundCycle == 0) + this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "minecart.base", 1.0F, 1.0F); + soundCycle++; + + if (soundCycle >= 38) + soundCycle = 0; + } + + if (process >= processSpeed) { + power = 0; process = 0; - + slots[0].stackSize--; - if(slots[0].stackSize <= 0) - { + if (slots[0].stackSize <= 0) { slots[0] = null; } - - if(slots[1] == null) - { + + if (slots[1] == null) { slots[1] = new ItemStack(ModItems.ingot_schrabidium); } else { slots[1].stackSize++; } - if(slots[2] != null) { + if (slots[2] != null) { slots[2].setItemDamage(slots[2].getItemDamage() + 1); } - - this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "ambient.weather.thunder", 10000.0F, 0.8F + this.rand.nextFloat() * 0.2F); + + this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "ambient.weather.thunder", 10000.0F, + 0.8F + this.rand.nextFloat() * 0.2F); } } - + @Override public void updateEntity() { - - if(slots[3] != null && slots[3].getItem() == ModItems.battery_creative) - { - power = maxPower; - } - - if(power + 100 <= maxPower && slots[3] != null && slots[3].getItem() == ModItems.battery_generic && slots[3].getItemDamage() < 50) - { - power += 100; - slots[3].setItemDamage(slots[3].getItemDamage() + 1); - } - - if(power + 100 <= maxPower && slots[3] != null && slots[3].getItem() == ModItems.battery_advanced && slots[3].getItemDamage() < 200) - { - power += 100; - slots[3].setItemDamage(slots[3].getItemDamage() + 1); - } - - if(power + 100 <= maxPower && slots[3] != null && slots[3].getItem() == ModItems.battery_schrabidium && slots[3].getItemDamage() < 1000) - { - power += 100; - slots[0].setItemDamage(slots[0].getItemDamage() + 1); - } - - if(power + 100 <= maxPower && slots[3] != null && slots[3].getItem() == ModItems.fusion_core && slots[3].getItemDamage() < 5000) - { - power += 100; - slots[3].setItemDamage(slots[3].getItemDamage() + 1); - } - - if(power + 100 <= maxPower && slots[3] != null && slots[3].getItem() == ModItems.energy_core && slots[3].getItemDamage() < 5000) - { - power += 100; - slots[3].setItemDamage(slots[3].getItemDamage() + 1); - } - - if(canProcess()) - { - process(); - } else { - process = 0; + + if (!worldObj.isRemote) { + if (slots[3] != null && slots[3].getItem() == ModItems.battery_creative) { + power = maxPower; + } + + if (power + 100 <= maxPower && slots[3] != null && slots[3].getItem() == ModItems.battery_generic + && slots[3].getItemDamage() < 50) { + power += 100; + slots[3].setItemDamage(slots[3].getItemDamage() + 1); + } + + if (power + 100 <= maxPower && slots[3] != null && slots[3].getItem() == ModItems.battery_advanced + && slots[3].getItemDamage() < 200) { + power += 100; + slots[3].setItemDamage(slots[3].getItemDamage() + 1); + } + + if (power + 100 <= maxPower && slots[3] != null && slots[3].getItem() == ModItems.battery_schrabidium + && slots[3].getItemDamage() < 1000) { + power += 100; + slots[0].setItemDamage(slots[0].getItemDamage() + 1); + } + + if (power + 100 <= maxPower && slots[3] != null && slots[3].getItem() == ModItems.fusion_core + && slots[3].getItemDamage() < 5000) { + power += 100; + slots[3].setItemDamage(slots[3].getItemDamage() + 1); + } + + if (power + 100 <= maxPower && slots[3] != null && slots[3].getItem() == ModItems.energy_core + && slots[3].getItemDamage() < 5000) { + power += 100; + slots[3].setItemDamage(slots[3].getItemDamage() + 1); + } } + + if (canProcess()) { + + //if (!worldObj.isRemote) { + process(); + //} + } else { + process = 0; + } } @Override public void setPower(int i) { power = i; - + } @Override public int getPower() { return power; - + } @Override diff --git a/com/hbm/blocks/TileEntityMachineUF6Tank.java b/com/hbm/blocks/TileEntityMachineUF6Tank.java index f51dd5f24..267747a59 100644 --- a/com/hbm/blocks/TileEntityMachineUF6Tank.java +++ b/com/hbm/blocks/TileEntityMachineUF6Tank.java @@ -94,7 +94,12 @@ public class TileEntityMachineUF6Tank extends TileEntity implements ISidedInvent public void closeInventory() {} @Override - public boolean isItemValidForSlot(int p_94041_1_, ItemStack p_94041_2_) { + public boolean isItemValidForSlot(int i, ItemStack stack) { + if(i == 0 && stack.getItem() == ModItems.cell_uf6) + return true; + if(i == 2 && stack.getItem() == ModItems.cell_empty) + return true; + return false; } @@ -171,7 +176,7 @@ public class TileEntityMachineUF6Tank extends TileEntity implements ISidedInvent @Override public boolean canExtractItem(int i, ItemStack itemStack, int j) { - return j != 0 || i != 1 || itemStack.getItem() == Items.bucket; + return true; } public int getFillStateScaled(int i) { diff --git a/com/hbm/blocks/TileEntityNukeFurnace.java b/com/hbm/blocks/TileEntityNukeFurnace.java index 2f7f23469..cbc71870e 100644 --- a/com/hbm/blocks/TileEntityNukeFurnace.java +++ b/com/hbm/blocks/TileEntityNukeFurnace.java @@ -1,5 +1,7 @@ package com.hbm.blocks; +import com.hbm.items.ItemCustomLore; +import com.hbm.items.ItemFuelRod; import com.hbm.items.ModItems; import net.minecraft.entity.player.EntityPlayer; @@ -21,7 +23,7 @@ public class TileEntityNukeFurnace extends TileEntity implements ISidedInventory public static final int processingSpeed = 30; private static final int[] slots_top = new int[] {1}; - private static final int[] slots_bottom = new int[] {2}; + private static final int[] slots_bottom = new int[] {2, 0}; private static final int[] slots_side = new int[] {0}; private String customName; @@ -208,13 +210,31 @@ public class TileEntityNukeFurnace extends TileEntity implements ISidedInventory @Override public boolean canInsertItem(int i, ItemStack itemStack, int j) { - //return this.isItemValidForSlot(i, itemStack); + if(i == 0) + { + if(itemStack.getItem() instanceof ItemCustomLore) + { + return true; + } + + return false; + } + return true; } @Override public boolean canExtractItem(int i, ItemStack itemStack, int j) { - //return j != 0 || i != 1 || itemStack.getItem() == Items.bucket; + if(i == 0) + { + if(itemStack.getItem() == ModItems.rod_empty || itemStack.getItem() == ModItems.rod_dual_empty || itemStack.getItem() == ModItems.rod_quad_empty) + { + return true; + } + + return false; + } + return true; } diff --git a/com/hbm/explosion/ExplosionNukeAdvanced.java b/com/hbm/explosion/ExplosionNukeAdvanced.java index dedf4ca45..e623c97a8 100644 --- a/com/hbm/explosion/ExplosionNukeAdvanced.java +++ b/com/hbm/explosion/ExplosionNukeAdvanced.java @@ -95,8 +95,10 @@ public class ExplosionNukeAdvanced dist = (int) Math.sqrt(dist); for (int y = dist; y > -dist; y--) { - - ExplosionNukeGeneric.wasteDest(this.worldObj, this.posX + x, this.posY + y, this.posZ + z); + if(radius >= 95) + ExplosionNukeGeneric.wasteDest(this.worldObj, this.posX + x, this.posY + y, this.posZ + z); + else + ExplosionNukeGeneric.wasteDestNoSchrab(this.worldObj, this.posX + x, this.posY + y, this.posZ + z); } } } diff --git a/com/hbm/gui/ContainerDiFurnace.java b/com/hbm/gui/ContainerDiFurnace.java index e95c73589..c8d15d1ea 100644 --- a/com/hbm/gui/ContainerDiFurnace.java +++ b/com/hbm/gui/ContainerDiFurnace.java @@ -8,6 +8,8 @@ import net.minecraft.inventory.Container; import net.minecraft.inventory.ICrafting; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.FurnaceRecipes; +import net.minecraft.tileentity.TileEntityFurnace; public class ContainerDiFurnace extends Container { @@ -50,8 +52,9 @@ public class ContainerDiFurnace extends Container { /**=====We are entering the magic realm of broken shit.=====**/ } + //What is this!? @Override - public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) + public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) { /*ItemStack itemstack = null; Slot slot = (Slot)this.inventorySlots.get(p_82846_2_); @@ -65,7 +68,7 @@ public class ContainerDiFurnace extends Container { { if (!this.mergeItemStack(itemstack1, 3, 39, true)) { - */return null;/* + return null; } slot.onSlotChange(itemstack1, itemstack); @@ -121,6 +124,8 @@ public class ContainerDiFurnace extends Container { } return itemstack;*/ + + return null; } @Override diff --git a/com/hbm/gui/MachineRecipes.java b/com/hbm/gui/MachineRecipes.java index eba90dd5d..77e2c3deb 100644 --- a/com/hbm/gui/MachineRecipes.java +++ b/com/hbm/gui/MachineRecipes.java @@ -391,7 +391,8 @@ public class MachineRecipes { if(MainRegistry.enableDebugMode) { recipes.put(new ItemStack(Item.getItemFromBlock(ModBlocks.test_render)), getCentrifugeOutput(Item.getItemFromBlock(ModBlocks.test_render))); } - recipes.put(new ItemStack(ModItems.rod_quad_euphemium), getCentrifugeOutput(ModItems.rod_quad_euphemium)); + //[REDACTED] + //recipes.put(new ItemStack(ModItems.rod_quad_euphemium), getCentrifugeOutput(ModItems.rod_quad_euphemium)); recipes.put(new ItemStack(ModItems.cell_sas3), getCentrifugeOutput(ModItems.cell_sas3)); recipes.put(new ItemStack(Item.getItemFromBlock(Blocks.stone)), getCentrifugeOutput(Item.getItemFromBlock(Blocks.stone))); recipes.put(new ItemStack(Item.getItemFromBlock(Blocks.cobblestone)), getCentrifugeOutput(Item.getItemFromBlock(Blocks.cobblestone))); @@ -406,7 +407,8 @@ public class MachineRecipes { recipes.put(new ItemStack(ModItems.rod_quad_mox_fuel_depleted), getCentrifugeOutput(ModItems.rod_quad_mox_fuel_depleted)); recipes.put(new ItemStack(ModItems.rod_schrabidium_fuel_depleted), getCentrifugeOutput(ModItems.rod_schrabidium_fuel_depleted)); recipes.put(new ItemStack(ModItems.rod_dual_schrabidium_fuel_depleted), getCentrifugeOutput(ModItems.rod_dual_schrabidium_fuel_depleted)); - recipes.put(new ItemStack(ModItems.rod_quad_schrabidium_fuel_depleted), getCentrifugeOutput(ModItems.rod_quad_schrabidium_fuel_depleted)); + //[REDACTED] + //recipes.put(new ItemStack(ModItems.rod_quad_schrabidium_fuel_depleted), getCentrifugeOutput(ModItems.rod_quad_schrabidium_fuel_depleted)); recipes.put(new ItemStack(Item.getItemFromBlock(Blocks.quartz_block)), getCentrifugeOutput(Item.getItemFromBlock(Blocks.quartz_block))); recipes.put(new ItemStack(Items.quartz), getCentrifugeOutput(Items.quartz)); return recipes; @@ -451,7 +453,8 @@ public class MachineRecipes { recipes.put(new ItemStack(ModItems.rod_neptunium), getReactorOutput(ModItems.rod_neptunium)); recipes.put(new ItemStack(ModItems.rod_dual_neptunium), getReactorOutput(ModItems.rod_dual_neptunium)); recipes.put(new ItemStack(ModItems.rod_quad_neptunium), getReactorOutput(ModItems.rod_quad_neptunium)); - recipes.put(new ItemStack(ModItems.rod_quad_schrabidium), getReactorOutput(ModItems.rod_quad_schrabidium)); + //[REDACTED] + //recipes.put(new ItemStack(ModItems.rod_quad_schrabidium), getReactorOutput(ModItems.rod_quad_schrabidium)); recipes.put(new ItemStack(ModItems.rod_lithium), getReactorOutput(ModItems.rod_lithium)); recipes.put(new ItemStack(ModItems.rod_dual_lithium), getReactorOutput(ModItems.rod_dual_lithium)); recipes.put(new ItemStack(ModItems.rod_quad_lithium), getReactorOutput(ModItems.rod_quad_lithium)); diff --git a/com/hbm/items/ModItems.java b/com/hbm/items/ModItems.java index 9995b187a..e32cd2ea0 100644 --- a/com/hbm/items/ModItems.java +++ b/com/hbm/items/ModItems.java @@ -647,7 +647,7 @@ public class ModItems { circuit_gold = new Item().setUnlocalizedName("circuit_gold").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":circuit_gold"); circuit_schrabidium = new ItemCustomLore().setUnlocalizedName("circuit_schrabidium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":circuit_schrabidium"); - pellet_rtg = new ItemCustomLore().setUnlocalizedName("pellet_rtg").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":pellet_rtg"); + pellet_rtg = new ItemCustomLore().setUnlocalizedName("pellet_rtg").setCreativeTab(MainRegistry.tabParts).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":pellet_rtg"); cell_empty = new ItemCell().setUnlocalizedName("cell_empty").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":cell_empty"); cell_uf6 = new Item().setUnlocalizedName("cell_uf6").setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.cell_empty).setTextureName(RefStrings.MODID + ":cell_uf6"); diff --git a/com/hbm/main/NEIConfig.java b/com/hbm/main/NEIConfig.java index f297b7226..6f11ea600 100644 --- a/com/hbm/main/NEIConfig.java +++ b/com/hbm/main/NEIConfig.java @@ -1,13 +1,17 @@ package com.hbm.main; +import com.hbm.blocks.ModBlocks; import com.hbm.gui.GUITestDiFurnace; import com.hbm.handler.AlloyFurnaceRecipeHandler; import com.hbm.handler.CentrifugeRecipeHandler; import com.hbm.handler.ReactorRecipeHandler; +import com.hbm.items.ModItems; import com.hbm.lib.RefStrings; import codechicken.nei.api.API; import codechicken.nei.api.IConfigureNEI; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; public class NEIConfig implements IConfigureNEI { @@ -19,7 +23,29 @@ public class NEIConfig implements IConfigureNEI { API.registerUsageHandler(new CentrifugeRecipeHandler()); API.registerRecipeHandler(new ReactorRecipeHandler()); API.registerUsageHandler(new ReactorRecipeHandler()); - + + //Some things are even beyond my control...or are they? + API.hideItem(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_coal_on))); + API.hideItem(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_electric_furnace_on))); + API.hideItem(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_difurnace_on))); + API.hideItem(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_nuke_furnace_on))); + API.hideItem(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_rtg_furnace_on))); + API.hideItem(new ItemStack(Item.getItemFromBlock(ModBlocks.reinforced_lamp_on))); + API.hideItem(new ItemStack(Item.getItemFromBlock(ModBlocks.statue_elb))); + API.hideItem(new ItemStack(Item.getItemFromBlock(ModBlocks.statue_elb_g))); + API.hideItem(new ItemStack(Item.getItemFromBlock(ModBlocks.statue_elb_w))); + API.hideItem(new ItemStack(Item.getItemFromBlock(ModBlocks.statue_elb_f))); + API.hideItem(new ItemStack(ModItems.euphemium_helmet)); + API.hideItem(new ItemStack(ModItems.euphemium_plate)); + API.hideItem(new ItemStack(ModItems.euphemium_legs)); + API.hideItem(new ItemStack(ModItems.euphemium_boots)); + API.hideItem(new ItemStack(ModItems.apple_euphemium)); + API.hideItem(new ItemStack(ModItems.ingot_euphemium)); + API.hideItem(new ItemStack(ModItems.nugget_euphemium)); + API.hideItem(new ItemStack(ModItems.euphemium_kit)); + API.hideItem(new ItemStack(ModItems.euphemium_stopper)); + API.hideItem(new ItemStack(ModItems.watch)); + API.hideItem(new ItemStack(ModItems.rod_quad_euphemium)); } @Override