I'm not really understanding why in the class "BlockFurnace", in the method "public static void setState(boolean active, World worldIn, BlockPos pos)"
the method "worldIn.setBlockState(...)" is called twice.
if (active)
{
worldIn.setBlockState(pos, Blocks.LIT_FURNACE.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3);
worldIn.setBlockState(pos, Blocks.LIT_FURNACE.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3);
}
Whole method:
public static void setState(boolean active, World worldIn, BlockPos pos)
{
IBlockState iblockstate = worldIn.getBlockState(pos);
TileEntity tileentity = worldIn.getTileEntity(pos);
keepInventory = true;
if (active)
{
worldIn.setBlockState(pos, Blocks.LIT_FURNACE.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3);
worldIn.setBlockState(pos, Blocks.LIT_FURNACE.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3);
}
else
{
worldIn.setBlockState(pos, Blocks.FURNACE.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3);
worldIn.setBlockState(pos, Blocks.FURNACE.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3);
}
keepInventory = false;
if (tileentity != null)
{
tileentity.validate();
worldIn.setTileEntity(pos, tileentity);
}
}
Any help / information is appreciated.