Move non-fluff blocks to new registreation system (yay no more registering in ctors)

This commit is contained in:
Vincent Lee committed 2017-06-24 23:47:59 -05:00
1 parent a6b37966a1
commit 901f70da88
35 files changed
+432 -437

No files matched your search

@@ -37,8 +37,6 @@ public abstract class BlockMod extends Block implements IModelRegister {
setUnlocalizedName(name);
setDefaultState(pickDefaultState()); // This MUST happen before registering the block
setRegistryName(new ResourceLocation(LibMisc.MOD_ID, name));
GameRegistry.register(this);
registerItemForm();
if(registerInCreative())
setCreativeTab(BotaniaCreativeTab.INSTANCE);
}
@@ -47,10 +45,6 @@ public abstract class BlockMod extends Block implements IModelRegister {
return blockState.getBaseState();
}
public void registerItemForm() {
GameRegistry.register(this instanceof IElvenItem ? new ItemBlockElven(this) : new ItemBlockMod(this), getRegistryName());
}
protected boolean registerInCreative() {
return true;
}