Search in sources :

Example 1 with ModelPanelLightBase

use of micdoodle8.mods.galacticraft.core.client.model.block.ModelPanelLightBase in project Galacticraft by micdoodle8.

the class ClientProxyCore method onModelBakeEvent.

@SubscribeEvent
@SideOnly(Side.CLIENT)
public void onModelBakeEvent(ModelBakeEvent event) {
    replaceModelDefault(event, "rocket_workbench", "block/workbench.obj", ImmutableList.of("Cube"), ItemModelWorkbench.class, TRSRTransformation.identity(), "inventory", "normal");
    replaceModelDefault(event, "rocket_t1", "rocket_t1.obj", ImmutableList.of("Rocket"), ItemModelRocket.class, TRSRTransformation.identity());
    for (int i = 0; i < 4; ++i) {
        ImmutableList<String> objects = ImmutableList.of("MainBody", "RadarDish_Dish", "Wheel_Back_Left", "Wheel_Back_Right", "Wheel_Front_Left", "Wheel_Front_Right");
        switch(i) {
            case 0:
                break;
            case 1:
                objects = ImmutableList.of("MainBody", "RadarDish_Dish", "Wheel_Back_Left", "Wheel_Back_Right", "Wheel_Front_Left", "Wheel_Front_Right", "CargoLeft");
                break;
            case 2:
                objects = ImmutableList.of("MainBody", "RadarDish_Dish", "Wheel_Back_Left", "Wheel_Back_Right", "Wheel_Front_Left", "Wheel_Front_Right", "CargoLeft", "CargoMid");
                break;
            case 3:
                objects = ImmutableList.of("MainBody", "RadarDish_Dish", "Wheel_Back_Left", "Wheel_Back_Right", "Wheel_Front_Left", "Wheel_Front_Right", "CargoLeft", "CargoMid", "CargoRight");
                break;
        }
        replaceModelDefault(event, "buggy" + (i > 0 ? "_" + i : ""), "buggy_inv.obj", objects, ItemModelBuggy.class, TRSRTransformation.identity());
    }
    replaceModelDefault(event, "flag", "flag.obj", ImmutableList.of("Flag", "Pole"), ItemModelFlag.class, TRSRTransformation.identity());
    ModelResourceLocation blockLoc = new ModelResourceLocation(Constants.ASSET_PREFIX + ":panel_lighting", "normal");
    ModelResourceLocation defaultLoc;
    if (GalacticraftCore.isPlanetsLoaded) {
        defaultLoc = new ModelResourceLocation(GalacticraftPlanets.ASSET_PREFIX + ":asteroids_block", "basictypeasteroids=asteroid_deco");
    } else {
        defaultLoc = new ModelResourceLocation(Constants.ASSET_PREFIX + ":basic_block_core", "basictype=deco_block_1");
    }
    event.modelRegistry.putObject(blockLoc, new ModelPanelLightBase(defaultLoc));
// 
// for (PartialCanister container : ClientProxyCore.canisters)
// {
// for (int i = 0; i < container.getTextureCount(); ++i)
// {
// ModelResourceLocation modelResourceLocation = new ModelResourceLocation(container.getModID() + ":" + container.getBaseName() + "_" + i, "inventory");
// IBakedModel object = event.modelRegistry.getObject(modelResourceLocation);
// ItemLiquidCanisterModel modelFinal = new ItemLiquidCanisterModel(object);
// event.modelRegistry.putObject(modelResourceLocation, modelFinal);
// }
// }
}
Also used : ModelResourceLocation(net.minecraft.client.resources.model.ModelResourceLocation) ModelPanelLightBase(micdoodle8.mods.galacticraft.core.client.model.block.ModelPanelLightBase) SubscribeEvent(net.minecraftforge.fml.common.eventhandler.SubscribeEvent) SideOnly(net.minecraftforge.fml.relauncher.SideOnly)

Aggregations

ModelPanelLightBase (micdoodle8.mods.galacticraft.core.client.model.block.ModelPanelLightBase)1 ModelResourceLocation (net.minecraft.client.resources.model.ModelResourceLocation)1 SubscribeEvent (net.minecraftforge.fml.common.eventhandler.SubscribeEvent)1 SideOnly (net.minecraftforge.fml.relauncher.SideOnly)1