diff --git a/src/java/mmm/utils/I_UColoredBlock.java b/src/java/mmm/utils/I_UColoredBlock.java new file mode 100644 index 0000000..75c7e7f --- /dev/null +++ b/src/java/mmm/utils/I_UColoredBlock.java @@ -0,0 +1,7 @@ +package mmm.utils; + + +public interface I_UColoredBlock +{ + // EMPTY +} diff --git a/src/java/mmm/utils/URegistry.java b/src/java/mmm/utils/URegistry.java index a031646..61b47f1 100644 --- a/src/java/mmm/utils/URegistry.java +++ b/src/java/mmm/utils/URegistry.java @@ -12,6 +12,7 @@ import net.minecraft.block.Block; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemCloth; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.model.ModelLoader; @@ -117,8 +118,14 @@ public class URegistry public static void addBlock( final Block block , final boolean registerItemModel ) { - URegistry.addBlock( block , new ItemBlock( block ).setRegistryName( block.getRegistryName( ) ) , - registerItemModel ); + Item item; + if ( block instanceof I_UColoredBlock ) { + item = new ItemCloth( block ); + } else { + item = new ItemBlock( block ); + } + item.setRegistryName( block.getRegistryName( ) ); + URegistry.addBlock( block , item , registerItemModel ); }