Search in sources :

Example 16 with ModelResourceLocation

use of net.minecraft.client.renderer.model.ModelResourceLocation in project Overloaded by CJ-MC-Mods.

the class ItemLinkingCard method registerModel.

@OnlyIn(Dist.CLIENT)
@Override
public void registerModel() {
    ModelResourceLocation location = new ModelResourceLocation(new ResourceLocation(MODID, "linking_card"), null);
    // ModelLoader.setCustomModelResourceLocation(this, 0, location);
    ImageUtil.registerDynamicTexture(new ResourceLocation(MODID, "textures/item/linking_card.png"), OverloadedConfig.INSTANCE.textureResolutions.itemResolution);
}
Also used : ResourceLocation(net.minecraft.util.ResourceLocation) ModelResourceLocation(net.minecraft.client.renderer.model.ModelResourceLocation) ModelResourceLocation(net.minecraft.client.renderer.model.ModelResourceLocation) OnlyIn(net.minecraftforge.api.distmarker.OnlyIn)

Example 17 with ModelResourceLocation

use of net.minecraft.client.renderer.model.ModelResourceLocation in project Overloaded by CJ-MC-Mods.

the class ItemRayGun method registerModel.

@OnlyIn(Dist.CLIENT)
@Override
public void registerModel() {
    ModelResourceLocation location = new ModelResourceLocation(new ResourceLocation(MODID, "ray_gun"), null);
    // ModelLoader.setCustomModelResourceLocation(this, 0, location);
    ImageUtil.registerDynamicTexture(new ResourceLocation(MODID, "textures/item/ray_gun.png"), OverloadedConfig.INSTANCE.textureResolutions.itemResolution);
}
Also used : ResourceLocation(net.minecraft.util.ResourceLocation) ModelResourceLocation(net.minecraft.client.renderer.model.ModelResourceLocation) ModelResourceLocation(net.minecraft.client.renderer.model.ModelResourceLocation) OnlyIn(net.minecraftforge.api.distmarker.OnlyIn)

Example 18 with ModelResourceLocation

use of net.minecraft.client.renderer.model.ModelResourceLocation in project Overloaded by CJ-MC-Mods.

the class ItemMultiHelmet method registerModel.

@OnlyIn(Dist.CLIENT)
@Override
public void registerModel() {
    ModelResourceLocation location = new ModelResourceLocation(getRegistryName(), null);
    // ModelLoader.setCustomModelResourceLocation(this, 0, location);
    ImageUtil.registerDynamicTexture(new ResourceLocation(MODID, "textures/item/multi_helmet.png"), OverloadedConfig.INSTANCE.textureResolutions.multiArmorResolution);
}
Also used : ResourceLocation(net.minecraft.util.ResourceLocation) ModelResourceLocation(net.minecraft.client.renderer.model.ModelResourceLocation) ModelResourceLocation(net.minecraft.client.renderer.model.ModelResourceLocation) OnlyIn(net.minecraftforge.api.distmarker.OnlyIn)

Example 19 with ModelResourceLocation

use of net.minecraft.client.renderer.model.ModelResourceLocation in project Overloaded by CJ-MC-Mods.

the class ItemItemCore method registerModel.

@OnlyIn(Dist.CLIENT)
@Override
public void registerModel() {
    ModelResourceLocation location = new ModelResourceLocation(getRegistryName(), null);
    // ModelLoader.setCustomModelResourceLocation(this, 0, location);
    ImageUtil.registerDynamicTexture(new ResourceLocation(MODID, "textures/item/item_core.png"), OverloadedConfig.INSTANCE.textureResolutions.itemResolution);
}
Also used : ResourceLocation(net.minecraft.util.ResourceLocation) ModelResourceLocation(net.minecraft.client.renderer.model.ModelResourceLocation) ModelResourceLocation(net.minecraft.client.renderer.model.ModelResourceLocation) OnlyIn(net.minecraftforge.api.distmarker.OnlyIn)

Example 20 with ModelResourceLocation

use of net.minecraft.client.renderer.model.ModelResourceLocation in project NetherEx by LogicTechCorp.

the class MimicModelHandler method onModelBake.

@SubscribeEvent
public static void onModelBake(ModelBakeEvent event) {
    MimicBlock quartzOreBlock = (MimicBlock) NetherExBlocks.QUARTZ_ORE.get();
    if (quartzOreBlock != null) {
        ModelResourceLocation modelLocation = quartzOreBlock.getModelLocation();
        IBakedModel model = event.getModelRegistry().get(modelLocation);
        if (model != null) {
            event.getModelRegistry().put(modelLocation, new MimicBakedModel(model, quartzOreBlock.getMimicType()));
        }
    }
}
Also used : MimicBlock(logictechcorp.libraryex.block.MimicBlock) ModelResourceLocation(net.minecraft.client.renderer.model.ModelResourceLocation) IBakedModel(net.minecraft.client.renderer.model.IBakedModel) MimicBakedModel(logictechcorp.libraryex.client.render.model.MimicBakedModel) SubscribeEvent(net.minecraftforge.eventbus.api.SubscribeEvent)

Aggregations

ModelResourceLocation (net.minecraft.client.renderer.model.ModelResourceLocation)20 OnlyIn (net.minecraftforge.api.distmarker.OnlyIn)17 ResourceLocation (net.minecraft.util.ResourceLocation)15 ResizeableTextureGenerator (com.cjm721.overloaded.client.render.dynamic.general.ResizeableTextureGenerator)3 IBakedModel (net.minecraft.client.renderer.model.IBakedModel)2 MatrixStack (com.mojang.blaze3d.matrix.MatrixStack)1 MimicBlock (logictechcorp.libraryex.block.MimicBlock)1 MimicBakedModel (logictechcorp.libraryex.client.render.model.MimicBakedModel)1 TextureAtlasSprite (net.minecraft.client.renderer.texture.TextureAtlasSprite)1 BlockPos (net.minecraft.util.math.BlockPos)1 Matrix3f (net.minecraft.util.math.vector.Matrix3f)1 Matrix4f (net.minecraft.util.math.vector.Matrix4f)1 SubscribeEvent (net.minecraftforge.eventbus.api.SubscribeEvent)1