use of net.minecraftforge.common.property.IExtendedBlockState in project BetterWithAddons by DaedalusGame.
the class BlockRopeSideways method getExtendedState.
@Override
public IBlockState getExtendedState(IBlockState state, IBlockAccess world, BlockPos pos) {
TileEntity te = world instanceof ChunkCache ? ((ChunkCache) world).getTileEntity(pos, Chunk.EnumCreateEntityType.CHECK) : world.getTileEntity(pos);
ItemStack planks = ItemStack.EMPTY;
if (te instanceof TileEntityRopeSideways) {
TileEntityRopeSideways tile = (TileEntityRopeSideways) te;
planks = tile.getPlanks();
}
return ((IExtendedBlockState) state).withProperty(HELD_PLANKS, planks);
}
Aggregations