Search in sources :

Example 6 with BlockBase

use of forestry.core.blocks.BlockBase in project ForestryMC by ForestryMC.

the class TileBase method shouldRefresh.

@Override
public boolean shouldRefresh(World world, BlockPos pos, IBlockState oldState, IBlockState newState) {
    Block oldBlock = oldState.getBlock();
    Block newBlock = newState.getBlock();
    return oldBlock != newBlock || !(oldBlock instanceof BlockBase) || !(newBlock instanceof BlockBase);
}
Also used : BlockBase(forestry.core.blocks.BlockBase) Block(net.minecraft.block.Block)

Aggregations

BlockBase (forestry.core.blocks.BlockBase)6 IBlockState (net.minecraft.block.state.IBlockState)5 EnumFacing (net.minecraft.util.EnumFacing)5 World (net.minecraft.world.World)5 IRenderableTile (forestry.core.tiles.IRenderableTile)1 Block (net.minecraft.block.Block)1