From ce632479bc53e16fcfcb780e509f4ac463c76bc8 Mon Sep 17 00:00:00 2001 From: Muramasa Date: Thu, 13 Oct 2016 18:52:21 +0100 Subject: [PATCH] Hide some unused blocks in NEI --- .../common/blocks/GT_Block_Casings_Abstract.java | 3 ++- .../java/gregtech/common/blocks/GT_Block_Reinforced.java | 9 ++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings_Abstract.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings_Abstract.java index 6f9c7cf4..8b03a10b 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings_Abstract.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings_Abstract.java @@ -115,7 +115,8 @@ public abstract class GT_Block_Casings_Abstract @SideOnly(Side.CLIENT) public void getSubBlocks(Item aItem, CreativeTabs par2CreativeTabs, List aList) { for (int i = 0; i < 16; i++) { - aList.add(new ItemStack(aItem, 1, i)); + ItemStack aStack = new ItemStack(aItem, 1, i); + if (!aStack.getDisplayName().contains(".name")) aList.add(aStack); } } } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java b/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java index 99c16b1d..55850535 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java @@ -13,8 +13,9 @@ import gregtech.api.objects.MaterialStack; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; +import ic2.core.block.EntityIC2Explosive; +import ic2.core.block.EntityItnt; import net.minecraft.block.Block; -import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; @@ -30,9 +31,6 @@ import net.minecraft.util.StatCollector; import net.minecraft.world.Explosion; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import ic2.core.IC2; -import ic2.core.block.EntityIC2Explosive; -import ic2.core.block.EntityItnt; import java.util.List; import java.util.Random; @@ -278,7 +276,8 @@ public class GT_Block_Reinforced extends GT_Generic_Block { @SideOnly(Side.CLIENT) public void getSubBlocks(Item aItem, CreativeTabs par2CreativeTabs, List aList) { for (int i = 0; i < 16; i++) { - aList.add(new ItemStack(aItem, 1, i)); + ItemStack aStack = new ItemStack(aItem, 1, i); + if (!aStack.getDisplayName().contains(".name")) aList.add(aStack); } } }