use of mchorse.blockbuster.client.render.tileentity.TileEntityModelItemStackRenderer in project blockbuster by mchorse.
the class ClientProxy method preLoad.
/**
* Register mod items, blocks, tile entites and entities, load item,
* block models and register entity renderer.
*/
@Override
public void preLoad(FMLPreInitializationEvent event) {
super.preLoad(event);
/* Items */
this.registerItemModel(Blockbuster.playbackItem, Blockbuster.path("playback"));
this.registerItemModel(Blockbuster.registerItem, Blockbuster.path("register"));
this.registerItemModel(Blockbuster.actorConfigItem, Blockbuster.path("actor_config"));
this.registerItemModel(Blockbuster.gunItem, Blockbuster.path("gun"));
/* Blocks */
this.registerItemModel(Blockbuster.directorBlock, Blockbuster.path("director"));
final ModelResourceLocation modelStatic = new ModelResourceLocation(Blockbuster.path("model_static"), "inventory");
final ModelResourceLocation model = new ModelResourceLocation(Blockbuster.path("model"), "inventory");
/* Register model block's configurable render disable */
Item item = Item.getItemFromBlock(Blockbuster.modelBlock);
ModelBakery.registerItemVariants(item, model, modelStatic);
ModelLoader.setCustomMeshDefinition(item, (stack) -> Blockbuster.modelBlockDisableItemRendering.get() ? modelStatic : model);
Blockbuster.modelBlockItem.setTileEntityItemStackRenderer(new TileEntityModelItemStackRenderer());
Blockbuster.gunItem.setTileEntityItemStackRenderer(new TileEntityGunItemStackRenderer());
/* Entities */
this.registerEntityRender(EntityActor.class, new RenderActor.FactoryActor());
this.registerEntityRender(EntityGunProjectile.class, new RenderGunProjectile.FactoryGunProjectile());
/* Tile entity */
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityModel.class, modelRenderer = new TileEntityModelRenderer());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityDirector.class, new TileEntityDirectorRenderer());
this.injectResourcePack(CommonProxy.configFile.getAbsolutePath());
/* Structure morph */
StructureMorph.STRUCTURES = new HashMap<String, StructureRenderer>();
audio = new AudioLibrary(new File(CommonProxy.configFile, "audio"));
skinsFolder = new File(configFile, "skins");
skinsFolder.mkdirs();
}
Aggregations