Safety guards for blockstates, remove all useless casts

This commit is contained in:
Vincent Lee committed 2016-01-07 19:55:54 -06:00
1 parent e58eb1b345
commit 20b5743221
45 files changed
+93 -67

No files matched your search

@@ -70,7 +70,7 @@ public class BlockModFlower extends BlockFlower implements ILexiconable, IPickup
@Override
public int getMetaFromState(IBlockState state) {
return ((EnumDyeColor) state.getValue(BotaniaStateProps.COLOR)).getMetadata();
return state.getValue(BotaniaStateProps.COLOR).getMetadata();
}
@Override
@@ -146,7 +146,7 @@ public class BlockModFlower extends BlockFlower implements ILexiconable, IPickup
@Override
public void grow(World world, Random rand, BlockPos pos, IBlockState state) {
placeDoubleFlower(world, pos, ((EnumDyeColor) state.getValue(BotaniaStateProps.COLOR)), 1 | 2);
placeDoubleFlower(world, pos, state.getValue(BotaniaStateProps.COLOR), 1 | 2);
}
public static void placeDoubleFlower(World world, BlockPos pos, EnumDyeColor color, int flags) {