(boolean active, World worldIn, BlockPos pos)
| 137 | } |
| 138 | |
| 139 | public static void setState(boolean active, World worldIn, BlockPos pos) |
| 140 | { |
| 141 | IBlockState iblockstate = worldIn.getBlockState(pos); |
| 142 | TileEntity tileentity = worldIn.getTileEntity(pos); |
| 143 | keepInventory = true; |
| 144 | |
| 145 | if (active) |
| 146 | { |
| 147 | worldIn.setBlockState(pos, Blocks.lit_furnace.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3); |
| 148 | worldIn.setBlockState(pos, Blocks.lit_furnace.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3); |
| 149 | } |
| 150 | else |
| 151 | { |
| 152 | worldIn.setBlockState(pos, Blocks.furnace.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3); |
| 153 | worldIn.setBlockState(pos, Blocks.furnace.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3); |
| 154 | } |
| 155 | |
| 156 | keepInventory = false; |
| 157 | |
| 158 | if (tileentity != null) |
| 159 | { |
| 160 | tileentity.validate(); |
| 161 | worldIn.setTileEntity(pos, tileentity); |
| 162 | } |
| 163 | } |
| 164 | |
| 165 | /** |
| 166 | * Returns a new instance of a block's tile entity class. Called on placing the block. |
no test coverage detected