From e0c39a4777b16ff7690b2365b4df47090721ed5f Mon Sep 17 00:00:00 2001 From: modmuss50 Date: Mon, 12 Jun 2017 17:30:21 +0100 Subject: [PATCH] Fix Creative tab issue --- src/main/java/techreborn/items/DynamicCell.java | 3 +++ src/main/java/techreborn/items/ItemDusts.java | 3 +++ src/main/java/techreborn/items/ItemDustsSmall.java | 9 ++++++--- src/main/java/techreborn/items/ItemGems.java | 9 ++++++--- src/main/java/techreborn/items/ItemIngots.java | 3 +++ src/main/java/techreborn/items/ItemNuggets.java | 3 +++ src/main/java/techreborn/items/ItemParts.java | 3 +++ src/main/java/techreborn/items/ItemPlates.java | 9 ++++++--- src/main/java/techreborn/items/ItemUpgrades.java | 3 +++ .../java/techreborn/items/armor/ItemLapotronPack.java | 3 +++ .../java/techreborn/items/armor/ItemLithiumBatpack.java | 3 +++ .../java/techreborn/items/battery/ItemEnergyCrystal.java | 3 +++ .../techreborn/items/battery/ItemLapotronCrystal.java | 3 +++ .../java/techreborn/items/battery/ItemLapotronicOrb.java | 3 +++ .../techreborn/items/battery/ItemLithiumBattery.java | 3 +++ .../java/techreborn/items/battery/ItemReBattery.java | 3 +++ .../techreborn/items/tools/ItemAdvancedChainsaw.java | 3 +++ .../java/techreborn/items/tools/ItemAdvancedDrill.java | 3 +++ .../techreborn/items/tools/ItemAdvancedJackhammer.java | 3 +++ .../java/techreborn/items/tools/ItemCloakingDevice.java | 3 +++ .../java/techreborn/items/tools/ItemDiamondChainsaw.java | 3 +++ .../java/techreborn/items/tools/ItemDiamondDrill.java | 3 +++ .../techreborn/items/tools/ItemDiamondJackhammer.java | 3 +++ .../java/techreborn/items/tools/ItemElectricTreetap.java | 3 +++ src/main/java/techreborn/items/tools/ItemJackhammer.java | 3 +++ src/main/java/techreborn/items/tools/ItemNanosaber.java | 3 +++ src/main/java/techreborn/items/tools/ItemOmniTool.java | 3 +++ src/main/java/techreborn/items/tools/ItemRockCutter.java | 3 +++ .../java/techreborn/items/tools/ItemSteelChainsaw.java | 3 +++ src/main/java/techreborn/items/tools/ItemSteelDrill.java | 3 +++ .../java/techreborn/items/tools/ItemSteelJackhammer.java | 3 +++ 31 files changed, 102 insertions(+), 9 deletions(-) diff --git a/src/main/java/techreborn/items/DynamicCell.java b/src/main/java/techreborn/items/DynamicCell.java index 32371331c..7ea3987c3 100644 --- a/src/main/java/techreborn/items/DynamicCell.java +++ b/src/main/java/techreborn/items/DynamicCell.java @@ -131,6 +131,9 @@ public class DynamicCell extends Item { @Override public void getSubItems(CreativeTabs tab, NonNullList subItems) { + if(!func_194125_a(tab)){ + return; + } subItems.add(getEmptyCell(1)); for (Fluid fluid : FluidRegistry.getRegisteredFluids().values()) { subItems.add(getCellWithFluid(fluid)); diff --git a/src/main/java/techreborn/items/ItemDusts.java b/src/main/java/techreborn/items/ItemDusts.java index cc6419006..0407ba7ff 100644 --- a/src/main/java/techreborn/items/ItemDusts.java +++ b/src/main/java/techreborn/items/ItemDusts.java @@ -91,6 +91,9 @@ public class ItemDusts extends ItemTRNoDestroy { // Adds Dusts SubItems To Creative Tab @Override public void getSubItems(CreativeTabs creativeTabs, NonNullList list) { + if(!func_194125_a(creativeTabs)){ + return; + } for (int meta = 0; meta < types.length; ++meta) { if (!types[meta].equals(ModItems.META_PLACEHOLDER)) { list.add(new ItemStack(this, 1, meta)); diff --git a/src/main/java/techreborn/items/ItemDustsSmall.java b/src/main/java/techreborn/items/ItemDustsSmall.java index a659dca7a..e650130f4 100644 --- a/src/main/java/techreborn/items/ItemDustsSmall.java +++ b/src/main/java/techreborn/items/ItemDustsSmall.java @@ -26,7 +26,6 @@ package techreborn.items; import com.google.common.base.CaseFormat; import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.NonNullList; import techreborn.client.TechRebornCreativeTabMisc; @@ -80,10 +79,14 @@ public class ItemDustsSmall extends ItemTRNoDestroy { } // Adds Dusts SubItems To Creative Tab - public void getSubItems(Item item, CreativeTabs creativeTabs, NonNullList list) { + @Override + public void getSubItems(CreativeTabs creativeTabs, NonNullList list) { + if(!func_194125_a(creativeTabs)){ + return; + } for (int meta = 0; meta < types.length; ++meta) { if (!types[meta].equals(ModItems.META_PLACEHOLDER)) { - list.add(new ItemStack(item, 1, meta)); + list.add(new ItemStack(this, 1, meta)); } } } diff --git a/src/main/java/techreborn/items/ItemGems.java b/src/main/java/techreborn/items/ItemGems.java index 8ee427b11..9c2211787 100644 --- a/src/main/java/techreborn/items/ItemGems.java +++ b/src/main/java/techreborn/items/ItemGems.java @@ -26,7 +26,6 @@ package techreborn.items; import com.google.common.base.CaseFormat; import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.NonNullList; import techreborn.client.TechRebornCreativeTabMisc; @@ -70,9 +69,13 @@ public class ItemGems extends ItemTRNoDestroy { } // Adds Dusts SubItems To Creative Tab - public void getSubItems(Item item, CreativeTabs creativeTabs, NonNullList list) { + @Override + public void getSubItems(CreativeTabs creativeTabs, NonNullList list) { + if(!func_194125_a(creativeTabs)){ + return; + } for (int meta = 0; meta < types.length; ++meta) { - list.add(new ItemStack(item, 1, meta)); + list.add(new ItemStack(this, 1, meta)); } } diff --git a/src/main/java/techreborn/items/ItemIngots.java b/src/main/java/techreborn/items/ItemIngots.java index 317647989..4ed5d9548 100644 --- a/src/main/java/techreborn/items/ItemIngots.java +++ b/src/main/java/techreborn/items/ItemIngots.java @@ -80,6 +80,9 @@ public class ItemIngots extends ItemTRNoDestroy { // Adds Dusts SubItems To Creative Tab @Override public void getSubItems(CreativeTabs creativeTabs, NonNullList list) { + if(!func_194125_a(creativeTabs)){ + return; + } for (int meta = 0; meta < types.length; ++meta) { if (!types[meta].equals(ModItems.META_PLACEHOLDER)) { list.add(new ItemStack(this, 1, meta)); diff --git a/src/main/java/techreborn/items/ItemNuggets.java b/src/main/java/techreborn/items/ItemNuggets.java index efa822094..8661da3f6 100644 --- a/src/main/java/techreborn/items/ItemNuggets.java +++ b/src/main/java/techreborn/items/ItemNuggets.java @@ -74,6 +74,9 @@ public class ItemNuggets extends ItemTRNoDestroy { // Adds Dusts SubItems To Creative Tab @Override public void getSubItems(CreativeTabs creativeTabs, NonNullList list) { + if(!func_194125_a(creativeTabs)){ + return; + } for (int meta = 0; meta < types.length; ++meta) { if (!types[meta].equals(ModItems.META_PLACEHOLDER)) { list.add(new ItemStack(this, 1, meta)); diff --git a/src/main/java/techreborn/items/ItemParts.java b/src/main/java/techreborn/items/ItemParts.java index d6d06b668..78d32e81c 100644 --- a/src/main/java/techreborn/items/ItemParts.java +++ b/src/main/java/techreborn/items/ItemParts.java @@ -96,6 +96,9 @@ public class ItemParts extends ItemTRNoDestroy { // Adds Dusts SubItems To Creative Tab @Override public void getSubItems(final CreativeTabs creativeTabs, final NonNullList list) { + if(!func_194125_a(creativeTabs)){ + return; + } for (int meta = 0; meta < ItemParts.types.length; ++meta) { if (!ItemParts.types[meta].equals(ModItems.META_PLACEHOLDER)) { list.add(new ItemStack(this, 1, meta)); diff --git a/src/main/java/techreborn/items/ItemPlates.java b/src/main/java/techreborn/items/ItemPlates.java index c43f9a067..b1ef36869 100644 --- a/src/main/java/techreborn/items/ItemPlates.java +++ b/src/main/java/techreborn/items/ItemPlates.java @@ -26,7 +26,6 @@ package techreborn.items; import com.google.common.base.CaseFormat; import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.NonNullList; import net.minecraftforge.oredict.OreDictionary; @@ -91,10 +90,14 @@ public class ItemPlates extends ItemTRNoDestroy { } // Adds Dusts SubItems To Creative Tab - public void getSubItems(Item item, CreativeTabs creativeTabs, NonNullList list) { + @Override + public void getSubItems(CreativeTabs creativeTabs, NonNullList list) { + if(!func_194125_a(creativeTabs)){ + return; + } for (int meta = 0; meta < types.length; ++meta) { if (!types[meta].equals(ModItems.META_PLACEHOLDER)) { - list.add(new ItemStack(item, 1, meta)); + list.add(new ItemStack(this, 1, meta)); } } } diff --git a/src/main/java/techreborn/items/ItemUpgrades.java b/src/main/java/techreborn/items/ItemUpgrades.java index 4fce6f4f4..79ce5f32b 100644 --- a/src/main/java/techreborn/items/ItemUpgrades.java +++ b/src/main/java/techreborn/items/ItemUpgrades.java @@ -96,6 +96,9 @@ public class ItemUpgrades extends ItemTRNoDestroy implements IUpgrade { // Adds Dusts SubItems To Creative Tab @Override public void getSubItems(CreativeTabs creativeTabs, NonNullList list) { + if(!func_194125_a(creativeTabs)){ + return; + } for (int meta = 0; meta < types.length; ++meta) { list.add(new ItemStack(this, 1, meta)); } diff --git a/src/main/java/techreborn/items/armor/ItemLapotronPack.java b/src/main/java/techreborn/items/armor/ItemLapotronPack.java index fdd78c8b0..da5c45a92 100644 --- a/src/main/java/techreborn/items/armor/ItemLapotronPack.java +++ b/src/main/java/techreborn/items/armor/ItemLapotronPack.java @@ -89,6 +89,9 @@ public class ItemLapotronPack extends ItemArmor implements IEnergyItemInfo { @SideOnly(Side.CLIENT) public void getSubItems(Item item, CreativeTabs par2CreativeTabs, NonNullList itemList) { + if(!func_194125_a(par2CreativeTabs)){ + return; + } ItemStack uncharged = new ItemStack(ModItems.LAPOTRONIC_ORB_PACK); ItemStack charged = new ItemStack(ModItems.LAPOTRONIC_ORB_PACK); PoweredItem.setEnergy(getMaxPower(charged), charged); diff --git a/src/main/java/techreborn/items/armor/ItemLithiumBatpack.java b/src/main/java/techreborn/items/armor/ItemLithiumBatpack.java index b190cc5c7..3d81aa32b 100644 --- a/src/main/java/techreborn/items/armor/ItemLithiumBatpack.java +++ b/src/main/java/techreborn/items/armor/ItemLithiumBatpack.java @@ -107,6 +107,9 @@ public class ItemLithiumBatpack extends ItemArmor implements IEnergyItemInfo { @Override public void getSubItems( CreativeTabs par2CreativeTabs, NonNullList itemList) { + if(!func_194125_a(par2CreativeTabs)){ + return; + } ItemStack uncharged = new ItemStack(ModItems.LITHIUM_BATTERY_PACK); ItemStack charged = new ItemStack(ModItems.LITHIUM_BATTERY_PACK); PoweredItem.setEnergy(getMaxPower(charged), charged); diff --git a/src/main/java/techreborn/items/battery/ItemEnergyCrystal.java b/src/main/java/techreborn/items/battery/ItemEnergyCrystal.java index a90893a3f..b0e815a68 100644 --- a/src/main/java/techreborn/items/battery/ItemEnergyCrystal.java +++ b/src/main/java/techreborn/items/battery/ItemEnergyCrystal.java @@ -42,6 +42,9 @@ public class ItemEnergyCrystal extends ItemBattery { @SideOnly(Side.CLIENT) @Override public void getSubItems(CreativeTabs par2CreativeTabs, NonNullList itemList) { + if(!func_194125_a(par2CreativeTabs)){ + return; + } ItemStack stack = new ItemStack(ModItems.ENERGY_CRYSTAL); ItemStack uncharged = stack.copy(); ItemStack charged = stack.copy(); diff --git a/src/main/java/techreborn/items/battery/ItemLapotronCrystal.java b/src/main/java/techreborn/items/battery/ItemLapotronCrystal.java index 06ec101c6..9ba7c68f5 100644 --- a/src/main/java/techreborn/items/battery/ItemLapotronCrystal.java +++ b/src/main/java/techreborn/items/battery/ItemLapotronCrystal.java @@ -43,6 +43,9 @@ public class ItemLapotronCrystal extends ItemBattery { @Override public void getSubItems( CreativeTabs par2CreativeTabs, NonNullList itemList) { + if(!func_194125_a(par2CreativeTabs)){ + return; + } ItemStack stack = new ItemStack(ModItems.LAPOTRONIC_CRYSTAL); ItemStack uncharged = stack.copy(); ItemStack charged = stack.copy(); diff --git a/src/main/java/techreborn/items/battery/ItemLapotronicOrb.java b/src/main/java/techreborn/items/battery/ItemLapotronicOrb.java index bc60eb1d7..0f9617ff8 100644 --- a/src/main/java/techreborn/items/battery/ItemLapotronicOrb.java +++ b/src/main/java/techreborn/items/battery/ItemLapotronicOrb.java @@ -44,6 +44,9 @@ public class ItemLapotronicOrb extends ItemBattery { @Override public void getSubItems( CreativeTabs par2CreativeTabs, NonNullList itemList) { + if(!func_194125_a(par2CreativeTabs)){ + return; + } ItemStack stack = new ItemStack(ModItems.LAPOTRONIC_ORB); ItemStack uncharged = stack.copy(); ItemStack charged = stack.copy(); diff --git a/src/main/java/techreborn/items/battery/ItemLithiumBattery.java b/src/main/java/techreborn/items/battery/ItemLithiumBattery.java index 8ade53737..a05f53ed8 100644 --- a/src/main/java/techreborn/items/battery/ItemLithiumBattery.java +++ b/src/main/java/techreborn/items/battery/ItemLithiumBattery.java @@ -43,6 +43,9 @@ public class ItemLithiumBattery extends ItemBattery { @Override public void getSubItems( CreativeTabs par2CreativeTabs, NonNullList itemList) { + if(!func_194125_a(par2CreativeTabs)){ + return; + } ItemStack stack = new ItemStack(ModItems.LITHIUM_BATTERY); ItemStack uncharged = stack.copy(); ItemStack charged = stack.copy(); diff --git a/src/main/java/techreborn/items/battery/ItemReBattery.java b/src/main/java/techreborn/items/battery/ItemReBattery.java index 9b4c8825e..14a18824b 100644 --- a/src/main/java/techreborn/items/battery/ItemReBattery.java +++ b/src/main/java/techreborn/items/battery/ItemReBattery.java @@ -43,6 +43,9 @@ public class ItemReBattery extends ItemBattery { @Override public void getSubItems( CreativeTabs par2CreativeTabs, NonNullList itemList) { + if(!func_194125_a(par2CreativeTabs)){ + return; + } ItemStack stack = new ItemStack(ModItems.RE_BATTERY); ItemStack uncharged = stack.copy(); ItemStack charged = stack.copy(); diff --git a/src/main/java/techreborn/items/tools/ItemAdvancedChainsaw.java b/src/main/java/techreborn/items/tools/ItemAdvancedChainsaw.java index ef81d7148..bbea7c95e 100644 --- a/src/main/java/techreborn/items/tools/ItemAdvancedChainsaw.java +++ b/src/main/java/techreborn/items/tools/ItemAdvancedChainsaw.java @@ -48,6 +48,9 @@ public class ItemAdvancedChainsaw extends ItemChainsaw { @Override public void getSubItems( CreativeTabs par2CreativeTabs, NonNullList itemList) { + if(!func_194125_a(par2CreativeTabs)){ + return; + } ItemStack stack = new ItemStack(ModItems.ADVANCED_CHAINSAW); ItemStack uncharged = stack.copy(); ItemStack charged = stack.copy(); diff --git a/src/main/java/techreborn/items/tools/ItemAdvancedDrill.java b/src/main/java/techreborn/items/tools/ItemAdvancedDrill.java index 2e6a355b1..72c715ad1 100644 --- a/src/main/java/techreborn/items/tools/ItemAdvancedDrill.java +++ b/src/main/java/techreborn/items/tools/ItemAdvancedDrill.java @@ -59,6 +59,9 @@ public class ItemAdvancedDrill extends ItemDrill { @SideOnly(Side.CLIENT) @Override public void getSubItems(CreativeTabs par2CreativeTabs, NonNullList itemList) { + if(!func_194125_a(par2CreativeTabs)){ + return; + } ItemStack stack = new ItemStack(ModItems.ADVANCED_DRILL); ItemStack uncharged = stack.copy(); ItemStack charged = stack.copy(); diff --git a/src/main/java/techreborn/items/tools/ItemAdvancedJackhammer.java b/src/main/java/techreborn/items/tools/ItemAdvancedJackhammer.java index 9a7af5303..f15bbb006 100644 --- a/src/main/java/techreborn/items/tools/ItemAdvancedJackhammer.java +++ b/src/main/java/techreborn/items/tools/ItemAdvancedJackhammer.java @@ -47,6 +47,9 @@ public class ItemAdvancedJackhammer extends ItemJackhammer { @Override public void getSubItems( CreativeTabs par2CreativeTabs, NonNullList itemList) { + if(!func_194125_a(par2CreativeTabs)){ + return; + } ItemStack stack = new ItemStack(ModItems.ADVANCED_JACKHAMMER); ItemStack uncharged = stack.copy(); ItemStack charged = stack.copy(); diff --git a/src/main/java/techreborn/items/tools/ItemCloakingDevice.java b/src/main/java/techreborn/items/tools/ItemCloakingDevice.java index aff0779ee..496c7f53f 100644 --- a/src/main/java/techreborn/items/tools/ItemCloakingDevice.java +++ b/src/main/java/techreborn/items/tools/ItemCloakingDevice.java @@ -106,6 +106,9 @@ public class ItemCloakingDevice extends ItemTRNoDestroy implements IEnergyItemIn @Override public void getSubItems( CreativeTabs par2CreativeTabs, NonNullList itemList) { + if(!func_194125_a(par2CreativeTabs)){ + return; + } ItemStack uncharged = new ItemStack(ModItems.CLOAKING_DEVICE); ItemStack charged = new ItemStack(ModItems.CLOAKING_DEVICE); PoweredItem.setEnergy(getMaxPower(charged), charged); diff --git a/src/main/java/techreborn/items/tools/ItemDiamondChainsaw.java b/src/main/java/techreborn/items/tools/ItemDiamondChainsaw.java index 0f35ae6bc..0b1024111 100644 --- a/src/main/java/techreborn/items/tools/ItemDiamondChainsaw.java +++ b/src/main/java/techreborn/items/tools/ItemDiamondChainsaw.java @@ -48,6 +48,9 @@ public class ItemDiamondChainsaw extends ItemChainsaw { @Override public void getSubItems( CreativeTabs par2CreativeTabs, NonNullList itemList) { + if(!func_194125_a(par2CreativeTabs)){ + return; + } ItemStack stack = new ItemStack(ModItems.DIAMOND_CHAINSAW); ItemStack uncharged = stack.copy(); ItemStack charged = stack.copy(); diff --git a/src/main/java/techreborn/items/tools/ItemDiamondDrill.java b/src/main/java/techreborn/items/tools/ItemDiamondDrill.java index 19a141385..e5bbe4364 100644 --- a/src/main/java/techreborn/items/tools/ItemDiamondDrill.java +++ b/src/main/java/techreborn/items/tools/ItemDiamondDrill.java @@ -48,6 +48,9 @@ public class ItemDiamondDrill extends ItemDrill { @Override public void getSubItems( CreativeTabs par2CreativeTabs, NonNullList itemList) { + if(!func_194125_a(par2CreativeTabs)){ + return; + } ItemStack stack = new ItemStack(ModItems.DIAMOND_DRILL); ItemStack uncharged = stack.copy(); ItemStack charged = stack.copy(); diff --git a/src/main/java/techreborn/items/tools/ItemDiamondJackhammer.java b/src/main/java/techreborn/items/tools/ItemDiamondJackhammer.java index 763fd11ff..d595157cc 100644 --- a/src/main/java/techreborn/items/tools/ItemDiamondJackhammer.java +++ b/src/main/java/techreborn/items/tools/ItemDiamondJackhammer.java @@ -46,6 +46,9 @@ public class ItemDiamondJackhammer extends ItemJackhammer { @SideOnly(Side.CLIENT) @Override public void getSubItems(CreativeTabs par2CreativeTabs, NonNullList itemList) { + if(!func_194125_a(par2CreativeTabs)){ + return; + } ItemStack stack = new ItemStack(ModItems.DIAMOND_JACKHAMMER); ItemStack uncharged = stack.copy(); ItemStack charged = stack.copy(); diff --git a/src/main/java/techreborn/items/tools/ItemElectricTreetap.java b/src/main/java/techreborn/items/tools/ItemElectricTreetap.java index 7c43e7499..d2bb21307 100644 --- a/src/main/java/techreborn/items/tools/ItemElectricTreetap.java +++ b/src/main/java/techreborn/items/tools/ItemElectricTreetap.java @@ -101,6 +101,9 @@ public class ItemElectricTreetap extends ItemTRNoDestroy implements IEnergyItemI @SideOnly(Side.CLIENT) @Override public void getSubItems(CreativeTabs par2CreativeTabs, NonNullList itemList) { + if(!func_194125_a(par2CreativeTabs)){ + return; + } ItemStack uncharged = new ItemStack(ModItems.ELECTRIC_TREE_TAP); ItemStack charged = new ItemStack(ModItems.ELECTRIC_TREE_TAP); PoweredItem.setEnergy(getMaxPower(charged), charged); diff --git a/src/main/java/techreborn/items/tools/ItemJackhammer.java b/src/main/java/techreborn/items/tools/ItemJackhammer.java index 131aa3660..7dc0967ea 100644 --- a/src/main/java/techreborn/items/tools/ItemJackhammer.java +++ b/src/main/java/techreborn/items/tools/ItemJackhammer.java @@ -127,6 +127,9 @@ public class ItemJackhammer extends ItemPickaxe implements IEnergyItemInfo { @SideOnly(Side.CLIENT) @Override public void getSubItems(CreativeTabs par2CreativeTabs, NonNullList itemList) { + if(!func_194125_a(par2CreativeTabs)){ + return; + } ItemStack itemStack = new ItemStack(this, 1); itemList.add(itemStack); diff --git a/src/main/java/techreborn/items/tools/ItemNanosaber.java b/src/main/java/techreborn/items/tools/ItemNanosaber.java index 910418fb3..a090f52a2 100644 --- a/src/main/java/techreborn/items/tools/ItemNanosaber.java +++ b/src/main/java/techreborn/items/tools/ItemNanosaber.java @@ -114,6 +114,9 @@ public class ItemNanosaber extends ItemSword implements IEnergyItemInfo { @Override public void getSubItems( CreativeTabs par2CreativeTabs, NonNullList itemList) { + if(!func_194125_a(par2CreativeTabs)){ + return; + } ItemStack inactiveUncharged = new ItemStack(ModItems.NANOSABER); inactiveUncharged.setTagCompound(new NBTTagCompound()); inactiveUncharged.getTagCompound().setBoolean("isActive", false); diff --git a/src/main/java/techreborn/items/tools/ItemOmniTool.java b/src/main/java/techreborn/items/tools/ItemOmniTool.java index 583d71fdd..e2b3027fb 100644 --- a/src/main/java/techreborn/items/tools/ItemOmniTool.java +++ b/src/main/java/techreborn/items/tools/ItemOmniTool.java @@ -145,6 +145,9 @@ public class ItemOmniTool extends ItemPickaxe implements IEnergyItemInfo { @Override public void getSubItems( CreativeTabs par2CreativeTabs, NonNullList itemList) { + if(!func_194125_a(par2CreativeTabs)){ + return; + } ItemStack uncharged = new ItemStack(ModItems.OMNI_TOOL); ItemStack charged = new ItemStack(ModItems.OMNI_TOOL); PoweredItem.setEnergy(getMaxPower(charged), charged); diff --git a/src/main/java/techreborn/items/tools/ItemRockCutter.java b/src/main/java/techreborn/items/tools/ItemRockCutter.java index 5919c5939..9217929c8 100644 --- a/src/main/java/techreborn/items/tools/ItemRockCutter.java +++ b/src/main/java/techreborn/items/tools/ItemRockCutter.java @@ -142,6 +142,9 @@ public class ItemRockCutter extends ItemPickaxe implements IEnergyItemInfo { @Override public void getSubItems( CreativeTabs par2CreativeTabs, NonNullList itemList) { + if(!func_194125_a(par2CreativeTabs)){ + return; + } ItemStack uncharged = new ItemStack(ModItems.ROCK_CUTTER); ItemStack charged = new ItemStack(ModItems.ROCK_CUTTER); PoweredItem.setEnergy(getMaxPower(charged), charged); diff --git a/src/main/java/techreborn/items/tools/ItemSteelChainsaw.java b/src/main/java/techreborn/items/tools/ItemSteelChainsaw.java index 59da8da3f..bbe273b8e 100644 --- a/src/main/java/techreborn/items/tools/ItemSteelChainsaw.java +++ b/src/main/java/techreborn/items/tools/ItemSteelChainsaw.java @@ -48,6 +48,9 @@ public class ItemSteelChainsaw extends ItemChainsaw { @Override public void getSubItems( CreativeTabs par2CreativeTabs, NonNullList itemList) { + if(!func_194125_a(par2CreativeTabs)){ + return; + } ItemStack stack = new ItemStack(ModItems.STEEL_CHAINSAW); ItemStack uncharged = stack.copy(); ItemStack charged = stack.copy(); diff --git a/src/main/java/techreborn/items/tools/ItemSteelDrill.java b/src/main/java/techreborn/items/tools/ItemSteelDrill.java index 7779f2d72..cdecd1ea2 100644 --- a/src/main/java/techreborn/items/tools/ItemSteelDrill.java +++ b/src/main/java/techreborn/items/tools/ItemSteelDrill.java @@ -48,6 +48,9 @@ public class ItemSteelDrill extends ItemDrill { @Override public void getSubItems( CreativeTabs par2CreativeTabs, NonNullList itemList) { + if(!func_194125_a(par2CreativeTabs)){ + return; + } ItemStack stack = new ItemStack(ModItems.STEEL_DRILL); ItemStack uncharged = stack.copy(); ItemStack charged = stack.copy(); diff --git a/src/main/java/techreborn/items/tools/ItemSteelJackhammer.java b/src/main/java/techreborn/items/tools/ItemSteelJackhammer.java index 923b0aeb0..b4c5570f8 100644 --- a/src/main/java/techreborn/items/tools/ItemSteelJackhammer.java +++ b/src/main/java/techreborn/items/tools/ItemSteelJackhammer.java @@ -47,6 +47,9 @@ public class ItemSteelJackhammer extends ItemJackhammer { @Override public void getSubItems( CreativeTabs par2CreativeTabs, NonNullList itemList) { + if(!func_194125_a(par2CreativeTabs)){ + return; + } ItemStack stack = new ItemStack(ModItems.STEEL_JACKHAMMER); ItemStack uncharged = stack.copy(); ItemStack charged = stack.copy();