Added creative tabs for blocks and items and associated language entries. Added check for iron nugget, to prevent double registry.

This commit is contained in:
Robert Sosnitzka
2016-07-28 14:59:08 +02:00
parent e6f95908d7
commit e15a07bdb8
6 changed files with 48 additions and 3 deletions

View File

@@ -105,6 +105,7 @@ public class Blocks {
Class<?> targetType = field.getType();
try {
Block block = (Block) field.get(targetType); // Gets the field as a BasicBlock which is then casted to an Block
block.setCreativeTab(CreativeTab.tabTaigaBlock);
Utils.registerBlockWithItem(block); // Registers block and its item
if (block instanceof BasicBlock) { // Checks that the block is a BasicBlock
if (((BasicBlock) block).isOreDict()) { // Checks that the block has an oreDict entry