Small changes (descriptive commit is descriptive)
This commit is contained in:
@@ -8,6 +8,7 @@ import net.minecraft.block.properties.PropertyDirection;
|
|||||||
import net.minecraft.block.state.BlockStateContainer;
|
import net.minecraft.block.state.BlockStateContainer;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemBlock;
|
import net.minecraft.item.ItemBlock;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
@@ -126,10 +127,7 @@ public abstract class BlockBase extends Block {
|
|||||||
super.breakBlock(world, pos, state);
|
super.breakBlock(world, pos, state);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemBlock createItemForBlock() {
|
public Item createItemForBlock() {
|
||||||
ItemBlock itemBlock = new ItemBlock(this);
|
return new ItemBlock(this).setRegistryName(getRegistryName());
|
||||||
itemBlock.setRegistryName(getRegistryName());
|
|
||||||
|
|
||||||
return itemBlock;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,13 +80,13 @@ public class CommonProxy {
|
|||||||
registerBlock(RefinedStorageBlocks.RELAY);
|
registerBlock(RefinedStorageBlocks.RELAY);
|
||||||
registerBlock(RefinedStorageBlocks.INTERFACE);
|
registerBlock(RefinedStorageBlocks.INTERFACE);
|
||||||
|
|
||||||
GameRegistry.<Item>register(RefinedStorageItems.STORAGE_DISK);
|
registerItem(RefinedStorageItems.STORAGE_DISK);
|
||||||
GameRegistry.<Item>register(RefinedStorageItems.WIRELESS_GRID);
|
registerItem(RefinedStorageItems.WIRELESS_GRID);
|
||||||
GameRegistry.<Item>register(RefinedStorageItems.QUARTZ_ENRICHED_IRON);
|
registerItem(RefinedStorageItems.QUARTZ_ENRICHED_IRON);
|
||||||
GameRegistry.<Item>register(RefinedStorageItems.CORE);
|
registerItem(RefinedStorageItems.CORE);
|
||||||
GameRegistry.<Item>register(RefinedStorageItems.SILICON);
|
registerItem(RefinedStorageItems.SILICON);
|
||||||
GameRegistry.<Item>register(RefinedStorageItems.PROCESSOR);
|
registerItem(RefinedStorageItems.PROCESSOR);
|
||||||
GameRegistry.<Item>register(RefinedStorageItems.STORAGE_PART);
|
registerItem(RefinedStorageItems.STORAGE_PART);
|
||||||
|
|
||||||
// Processors
|
// Processors
|
||||||
SoldererRegistry.addRecipe(new SoldererRecipePrintedProcessor(ItemProcessor.TYPE_PRINTED_BASIC));
|
SoldererRegistry.addRecipe(new SoldererRecipePrintedProcessor(ItemProcessor.TYPE_PRINTED_BASIC));
|
||||||
@@ -359,6 +359,10 @@ public class CommonProxy {
|
|||||||
|
|
||||||
private void registerBlock(BlockBase block) {
|
private void registerBlock(BlockBase block) {
|
||||||
GameRegistry.<Block>register(block);
|
GameRegistry.<Block>register(block);
|
||||||
GameRegistry.<Item>register(block.createItemForBlock());
|
GameRegistry.register(block.createItemForBlock());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void registerItem(Item item) {
|
||||||
|
GameRegistry.register(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user