mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-25 14:34:36 +00:00
Safety guards for blockstates, remove all useless casts
This commit is contained in:
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) {
|
||||
|
||||
Reference in new issue
Block a user