Move block registration out of constructors

This commit is contained in:
Vincent Lee committed 2016-07-29 18:04:17 -05:00
1 parent 32a505a575
commit d622f0cd58
17 files changed
+127 -96

No files matched your search

@@ -32,10 +32,11 @@ import vazkii.botania.common.lib.LibMisc;
import javax.annotation.Nonnull;
import java.util.Random;
public class BlockSolidVines extends BlockVine implements ILexiconable {
public class BlockSolidVines extends BlockVine implements ILexiconable, IRegisterCallback {
public BlockSolidVines() {
GameRegistry.register(this, new ResourceLocation(LibMisc.MOD_ID, LibBlockNames.SOLID_VINE));
ModBlocks.ALL_BLOCKS.add(this);
setRegistryName(new ResourceLocation(LibMisc.MOD_ID, LibBlockNames.SOLID_VINE));
setUnlocalizedName(LibBlockNames.SOLID_VINE);
setHardness(0.5F);
setSoundType(SoundType.PLANT);
@@ -66,4 +67,8 @@ public class BlockSolidVines extends BlockVine implements ILexiconable {
return LexiconData.vineBall;
}
@Override
public void register() {
GameRegistry.register(this);
}
}