Search in sources :

Example 1 with ModelItemSimple

use of buildcraft.lib.client.model.ModelItemSimple in project BuildCraft by BuildCraft.

the class BCFactoryModels method onModelBake.

@SubscribeEvent
public static void onModelBake(ModelBakeEvent event) {
    event.getModelRegistry().putObject(new ModelResourceLocation("buildcraftfactory:heat_exchange#normal"), new ModelHeatExchange());
    event.getModelRegistry().putObject(new ModelResourceLocation("buildcraftfactory:heat_exchange#inventory"), new ModelItemSimple(Arrays.stream(BCFactoryModels.HEAT_EXCHANGE_STATIC.getCutoutQuads()).map(MutableQuad::multShade).map(MutableQuad::toBakedItem).collect(Collectors.toList()), ModelItemSimple.TRANSFORM_BLOCK, true));
}
Also used : ModelHeatExchange(buildcraft.factory.client.model.ModelHeatExchange) ModelItemSimple(buildcraft.lib.client.model.ModelItemSimple) ModelResourceLocation(net.minecraft.client.renderer.block.model.ModelResourceLocation) MutableQuad(buildcraft.lib.client.model.MutableQuad) SubscribeEvent(net.minecraftforge.fml.common.eventhandler.SubscribeEvent)

Example 2 with ModelItemSimple

use of buildcraft.lib.client.model.ModelItemSimple in project BuildCraft by BuildCraft.

the class BCEnergyModels method onModelBake.

@SubscribeEvent
public static void onModelBake(ModelBakeEvent event) {
    ENGINE_PROGRESS.value = 0.2;
    ENGINE_STAGE.value = EnumPowerStage.BLUE;
    ENGINE_FACING.value = EnumFacing.UP;
    ModelVariableData varData = new ModelVariableData();
    varData.setNodes(ENGINE_STONE.createTickableNodes());
    varData.tick();
    varData.refresh();
    event.getModelRegistry().putObject(new ModelResourceLocation(EnumEngineType.STONE.getItemModelLocation(), "inventory"), new ModelItemSimple(Arrays.stream(ENGINE_STONE.getCutoutQuads()).map(MutableQuad::toBakedItem).collect(Collectors.toList()), ModelItemSimple.TRANSFORM_BLOCK, true));
    varData.setNodes(ENGINE_IRON.createTickableNodes());
    varData.tick();
    varData.refresh();
    event.getModelRegistry().putObject(new ModelResourceLocation(EnumEngineType.IRON.getItemModelLocation(), "inventory"), new ModelItemSimple(Arrays.stream(ENGINE_IRON.getCutoutQuads()).map(MutableQuad::toBakedItem).collect(Collectors.toList()), ModelItemSimple.TRANSFORM_BLOCK, true));
    for (BCFluid fluid : BCEnergyFluids.allFluids) {
        ModelFluid modelFluid = new ModelFluid(fluid);
        event.getModelRegistry().putObject(new ModelResourceLocation("buildcraftenergy:fluid_block_" + fluid.getBlockName()), modelFluid.bake(modelFluid.getDefaultState(), DefaultVertexFormats.ITEM, ModelLoader.defaultTextureGetter()));
    }
}
Also used : ModelVariableData(buildcraft.lib.misc.data.ModelVariableData) BCFluid(buildcraft.lib.fluid.BCFluid) ModelItemSimple(buildcraft.lib.client.model.ModelItemSimple) ModelFluid(net.minecraftforge.client.model.ModelFluid) ModelResourceLocation(net.minecraft.client.renderer.block.model.ModelResourceLocation) SubscribeEvent(net.minecraftforge.fml.common.eventhandler.SubscribeEvent)

Example 3 with ModelItemSimple

use of buildcraft.lib.client.model.ModelItemSimple in project BuildCraft by BuildCraft.

the class BCCoreModels method onModelBake.

@SubscribeEvent
public static void onModelBake(ModelBakeEvent event) {
    ENGINE_PROGRESS.value = 0.2;
    ENGINE_STAGE.value = EnumPowerStage.BLUE;
    ENGINE_FACING.value = EnumFacing.UP;
    ModelVariableData varData = new ModelVariableData();
    varData.setNodes(ENGINE_REDSTONE.createTickableNodes());
    varData.tick();
    varData.refresh();
    event.getModelRegistry().putObject(new ModelResourceLocation(EnumEngineType.WOOD.getItemModelLocation(), "inventory"), new ModelItemSimple(Arrays.stream(ENGINE_REDSTONE.getCutoutQuads()).map(MutableQuad::toBakedItem).collect(Collectors.toList()), ModelItemSimple.TRANSFORM_BLOCK, true));
    ENGINE_STAGE.value = EnumPowerStage.BLACK;
    varData.setNodes(ENGINE_CREATIVE.createTickableNodes());
    varData.tick();
    varData.refresh();
    event.getModelRegistry().putObject(new ModelResourceLocation(EnumEngineType.CREATIVE.getItemModelLocation(), "inventory"), new ModelItemSimple(Arrays.stream(ENGINE_CREATIVE.getCutoutQuads()).map(MutableQuad::toBakedItem).collect(Collectors.toList()), ModelItemSimple.TRANSFORM_BLOCK, true));
}
Also used : ModelVariableData(buildcraft.lib.misc.data.ModelVariableData) ModelItemSimple(buildcraft.lib.client.model.ModelItemSimple) ModelResourceLocation(net.minecraft.client.renderer.block.model.ModelResourceLocation) SubscribeEvent(net.minecraftforge.fml.common.eventhandler.SubscribeEvent)

Aggregations

ModelItemSimple (buildcraft.lib.client.model.ModelItemSimple)3 ModelResourceLocation (net.minecraft.client.renderer.block.model.ModelResourceLocation)3 SubscribeEvent (net.minecraftforge.fml.common.eventhandler.SubscribeEvent)3 ModelVariableData (buildcraft.lib.misc.data.ModelVariableData)2 ModelHeatExchange (buildcraft.factory.client.model.ModelHeatExchange)1 MutableQuad (buildcraft.lib.client.model.MutableQuad)1 BCFluid (buildcraft.lib.fluid.BCFluid)1 ModelFluid (net.minecraftforge.client.model.ModelFluid)1