mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-20 12:19:46 +00:00
Move non-fluff blocks to new registreation system (yay no more registering in ctors)
This commit is contained in:
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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user