Search in sources :

Example 1 with TileEntitySurfaceRock

use of gregtech.common.blocks.surfacerock.TileEntitySurfaceRock in project GregTech by GregTechCE.

the class StoneRenderer method getActualModel.

private static CCModel getActualModel(IBlockAccess world, BlockPos pos) {
    TileEntitySurfaceRock tileEntity = BlockSurfaceRockNew.getTileEntity(world, pos);
    if (tileEntity != null) {
        if (tileEntity.cachedModel == null) {
            Random random = new Random(MathHelper.getPositionRandom(pos));
            tileEntity.cachedModel = generateModel(random);
        }
        return (CCModel) tileEntity.cachedModel;
    }
    return placeholderModels[0];
}
Also used : Random(java.util.Random) TileEntitySurfaceRock(gregtech.common.blocks.surfacerock.TileEntitySurfaceRock) CCModel(codechicken.lib.render.CCModel)

Aggregations

CCModel (codechicken.lib.render.CCModel)1 TileEntitySurfaceRock (gregtech.common.blocks.surfacerock.TileEntitySurfaceRock)1 Random (java.util.Random)1