diff --git a/src/main/java/mcjty/theoneprobe/config/TopModGuiFactory.java b/src/main/java/mcjty/theoneprobe/config/TopModGuiFactory.java index 5f574647..78add206 100644 --- a/src/main/java/mcjty/theoneprobe/config/TopModGuiFactory.java +++ b/src/main/java/mcjty/theoneprobe/config/TopModGuiFactory.java @@ -7,6 +7,7 @@ import net.minecraftforge.fml.relauncher.SideOnly; import java.util.Set; + @SideOnly(Side.CLIENT) public class TopModGuiFactory implements IModGuiFactory { diff --git a/src/main/java/mcjty/theoneprobe/items/ModItems.java b/src/main/java/mcjty/theoneprobe/items/ModItems.java index 314bce02..493a740a 100644 --- a/src/main/java/mcjty/theoneprobe/items/ModItems.java +++ b/src/main/java/mcjty/theoneprobe/items/ModItems.java @@ -81,17 +81,6 @@ public boolean getHasSubtypes() { return true; } - @Override - @ParametersAreNonnullByDefault - public void getSubItems(CreativeTabs tab, NonNullList subItems) { - if (this.isInCreativeTab(tab)) { - ItemStack stack = new ItemStack(this); - NBTTagCompound tag = new NBTTagCompound(); - tag.setInteger(PROBETAG, 1); - stack.setTagCompound(tag); - subItems.add(stack); - } - } }; item.setUnlocalizedName(TheOneProbe.MODID + "." + name); item.setRegistryName(name); diff --git a/src/main/java/mcjty/theoneprobe/probe/ProbeArmor.java b/src/main/java/mcjty/theoneprobe/probe/ProbeArmor.java index e05f9d9e..3c3f2d35 100644 --- a/src/main/java/mcjty/theoneprobe/probe/ProbeArmor.java +++ b/src/main/java/mcjty/theoneprobe/probe/ProbeArmor.java @@ -1,10 +1,17 @@ package mcjty.theoneprobe.probe; import mcjty.theoneprobe.TheOneProbe; +import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; import net.minecraft.inventory.EntityEquipmentSlot; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.NonNullList; + +import javax.annotation.ParametersAreNonnullByDefault; + +import static mcjty.theoneprobe.items.ModItems.PROBETAG; /** @@ -41,4 +48,16 @@ public String getArmorTexture(ItemStack stack, Entity entity, EntityEquipmentSlo // Call the parent method for layer0 return super.getArmorTexture(stack, entity, slot, type); } + + @Override + @ParametersAreNonnullByDefault + public void getSubItems(CreativeTabs tab, NonNullList subItems) { + if (this.isInCreativeTab(tab)) { + ItemStack stack = new ItemStack(this); + NBTTagCompound tag = new NBTTagCompound(); + tag.setInteger(PROBETAG, 1); + stack.setTagCompound(tag); + subItems.add(stack); + } + } }