Small changes (descriptive commit is descriptive)

This commit is contained in:
Raoul Van den Berge
2016-04-02 22:58:15 +02:00
parent b087d86f9a
commit 3007bc1fd2
2 changed files with 15 additions and 13 deletions

View File

@@ -8,6 +8,7 @@ import net.minecraft.block.properties.PropertyDirection;
import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
@@ -126,10 +127,7 @@ public abstract class BlockBase extends Block {
super.breakBlock(world, pos, state);
}
public ItemBlock createItemForBlock() {
ItemBlock itemBlock = new ItemBlock(this);
itemBlock.setRegistryName(getRegistryName());
return itemBlock;
public Item createItemForBlock() {
return new ItemBlock(this).setRegistryName(getRegistryName());
}
}

View File

@@ -80,13 +80,13 @@ public class CommonProxy {
registerBlock(RefinedStorageBlocks.RELAY);
registerBlock(RefinedStorageBlocks.INTERFACE);
GameRegistry.<Item>register(RefinedStorageItems.STORAGE_DISK);
GameRegistry.<Item>register(RefinedStorageItems.WIRELESS_GRID);
GameRegistry.<Item>register(RefinedStorageItems.QUARTZ_ENRICHED_IRON);
GameRegistry.<Item>register(RefinedStorageItems.CORE);
GameRegistry.<Item>register(RefinedStorageItems.SILICON);
GameRegistry.<Item>register(RefinedStorageItems.PROCESSOR);
GameRegistry.<Item>register(RefinedStorageItems.STORAGE_PART);
registerItem(RefinedStorageItems.STORAGE_DISK);
registerItem(RefinedStorageItems.WIRELESS_GRID);
registerItem(RefinedStorageItems.QUARTZ_ENRICHED_IRON);
registerItem(RefinedStorageItems.CORE);
registerItem(RefinedStorageItems.SILICON);
registerItem(RefinedStorageItems.PROCESSOR);
registerItem(RefinedStorageItems.STORAGE_PART);
// Processors
SoldererRegistry.addRecipe(new SoldererRecipePrintedProcessor(ItemProcessor.TYPE_PRINTED_BASIC));
@@ -359,6 +359,10 @@ public class CommonProxy {
private void registerBlock(BlockBase block) {
GameRegistry.<Block>register(block);
GameRegistry.<Item>register(block.createItemForBlock());
GameRegistry.register(block.createItemForBlock());
}
private void registerItem(Item item) {
GameRegistry.register(item);
}
}