diff --git a/gradle.properties b/gradle.properties index bdd9ea91e..b423e0198 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ minecraft_version=1.8 -forge_version=1.8-11.14.3.1450 -mod_version=2.1.8 +forge_version=1.8-11.14.3.1502 +mod_version=2.1.9 chameleon_version=0.1.0 chameleon_max_version=1.0.0 \ No newline at end of file diff --git a/src/com/jaquadro/minecraft/storagedrawers/block/BlockCompDrawers.java b/src/com/jaquadro/minecraft/storagedrawers/block/BlockCompDrawers.java index ac9d173e0..d9b34872d 100644 --- a/src/com/jaquadro/minecraft/storagedrawers/block/BlockCompDrawers.java +++ b/src/com/jaquadro/minecraft/storagedrawers/block/BlockCompDrawers.java @@ -113,24 +113,21 @@ protected BlockState createBlockState () { } @Override - public IBlockState getExtendedState (IBlockState state, IBlockAccess world, BlockPos pos) { - if (state instanceof IExtendedBlockState) { - TileEntityDrawers tile = getTileEntity(world, pos); - if (tile == null) - return state; - - EnumFacing facing = EnumFacing.getFront(tile.getDirection()); - if (facing.getAxis() == EnumFacing.Axis.Y) - facing = EnumFacing.NORTH; - - EnumCompDrawer slots = EnumCompDrawer.OPEN1; - if (tile.isDrawerEnabled(1)) - slots = EnumCompDrawer.OPEN2; - if (tile.isDrawerEnabled(2)) - slots = EnumCompDrawer.OPEN3; - - return ((IExtendedBlockState) state).withProperty(FACING, facing).withProperty(SLOTS, slots); - } - return state; + public IBlockState getActualState (IBlockState state, IBlockAccess world, BlockPos pos) { + TileEntityDrawers tile = getTileEntity(world, pos); + if (tile == null) + return state; + + EnumFacing facing = EnumFacing.getFront(tile.getDirection()); + if (facing.getAxis() == EnumFacing.Axis.Y) + facing = EnumFacing.NORTH; + + EnumCompDrawer slots = EnumCompDrawer.OPEN1; + if (tile.isDrawerEnabled(1)) + slots = EnumCompDrawer.OPEN2; + if (tile.isDrawerEnabled(2)) + slots = EnumCompDrawer.OPEN3; + + return state.withProperty(FACING, facing).withProperty(SLOTS, slots); } } diff --git a/src/com/jaquadro/minecraft/storagedrawers/block/BlockDrawers.java b/src/com/jaquadro/minecraft/storagedrawers/block/BlockDrawers.java index 77b59450d..6d1b3a0ad 100644 --- a/src/com/jaquadro/minecraft/storagedrawers/block/BlockDrawers.java +++ b/src/com/jaquadro/minecraft/storagedrawers/block/BlockDrawers.java @@ -539,25 +539,17 @@ protected BlockState createBlockState () { @Override public IBlockState getActualState (IBlockState state, IBlockAccess worldIn, BlockPos pos) { - return super.getActualState(state, worldIn, pos); - } - - @Override - public IBlockState getExtendedState (IBlockState state, IBlockAccess world, BlockPos pos) { - if (state instanceof IExtendedBlockState) { - TileEntityDrawers tile = getTileEntity(world, pos); - if (tile == null) - return state; + TileEntityDrawers tile = getTileEntity(worldIn, pos); + if (tile == null) + return state; - EnumFacing facing = EnumFacing.getFront(tile.getDirection()); - if (facing.getAxis() == EnumFacing.Axis.Y) - facing = EnumFacing.NORTH; + EnumFacing facing = EnumFacing.getFront(tile.getDirection()); + if (facing.getAxis() == EnumFacing.Axis.Y) + facing = EnumFacing.NORTH; - BlockPlanks.EnumType woodType = translateMaterial(tile.getMaterialOrDefault()); + BlockPlanks.EnumType woodType = translateMaterial(tile.getMaterialOrDefault()); - return ((IExtendedBlockState) state).withProperty(BLOCK, state.getValue(BLOCK)).withProperty(FACING, facing).withProperty(VARIANT, woodType); - } - return state; + return state.withProperty(BLOCK, state.getValue(BLOCK)).withProperty(FACING, facing).withProperty(VARIANT, woodType); } private BlockPlanks.EnumType translateMaterial (String materal) {