Eliminate the IRegisterCallback shim

This commit is contained in:
Vincent Lee committed 2016-08-28 10:33:29 -05:00
1 parent e5ec84e040
commit f6a68a0d83
66 files changed
+328 -194

No files matched your search

@@ -53,7 +53,7 @@ import javax.annotation.Nonnull;
import java.util.List;
import java.util.Random;
public class BlockModFlower extends BlockFlower implements ILexiconable, IPickupAchievement, IGrowable, IRegisterCallback, IModelRegister {
public class BlockModFlower extends BlockFlower implements ILexiconable, IPickupAchievement, IGrowable, IModelRegister {
private static final AxisAlignedBB AABB = new AxisAlignedBB(0.3, 0, 0.3, 0.8, 1, 0.8);
@@ -63,13 +63,14 @@ public class BlockModFlower extends BlockFlower implements ILexiconable, IPickup
protected BlockModFlower(String name) {
setUnlocalizedName(name);
ModBlocks.ALL_BLOCKS.add(this);
setDefaultState(blockState.getBaseState().withProperty(BotaniaStateProps.COLOR, EnumDyeColor.WHITE).withProperty(type, EnumFlowerType.POPPY));
setRegistryName(new ResourceLocation(LibMisc.MOD_ID, name));
GameRegistry.register(this);
registerItemForm();
setHardness(0F);
setSoundType(SoundType.PLANT);
setTickRandomly(false);
setCreativeTab(registerInCreative() ? BotaniaCreativeTab.INSTANCE : null);
setDefaultState(blockState.getBaseState().withProperty(BotaniaStateProps.COLOR, EnumDyeColor.WHITE).withProperty(type, EnumFlowerType.POPPY));
}
public void registerItemForm() {
@@ -173,12 +174,6 @@ public class BlockModFlower extends BlockFlower implements ILexiconable, IPickup
world.setBlockState(pos.up(), flower.getDefaultState().withProperty(color.getMetadata() >= 8 ? BotaniaStateProps.DOUBLEFLOWER_VARIANT_2 : BotaniaStateProps.DOUBLEFLOWER_VARIANT_1, color).withProperty(BlockDoublePlant.HALF, BlockDoublePlant.EnumBlockHalf.UPPER), flags);
}
@Override
public void register() {
GameRegistry.register(this);
registerItemForm();
}
@SideOnly(Side.CLIENT)
@Override
public void registerModels() {