Search in sources :

Example 1 with ModelResourceLocation

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

the class ItemFluidCore 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/fluid_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 2 with ModelResourceLocation

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

the class ItemMultiTool method registerModel.

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

Example 3 with ModelResourceLocation

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

the class RenderMultiToolAssist method renderRemovePreview.

private static void renderRemovePreview(RenderWorldLastEvent event, BlockRayTraceResult result) {
    IBakedModel bakeModel = Minecraft.getInstance().getModelManager().getModel(new ModelResourceLocation(MODID + ":remove_preview", ""));
    BlockPos toRenderAt = result.getBlockPos();
    renderBlockModel(event, toRenderAt, bakeModel, Blocks.COBBLESTONE.defaultBlockState());
}
Also used : BlockPos(net.minecraft.util.math.BlockPos) IBakedModel(net.minecraft.client.renderer.model.IBakedModel) ModelResourceLocation(net.minecraft.client.renderer.model.ModelResourceLocation)

Example 4 with ModelResourceLocation

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

the class BlockInfiniteWaterSource method registerModel.

@OnlyIn(Dist.CLIENT)
@Override
public void registerModel() {
    ModelResourceLocation location = new ModelResourceLocation(new ResourceLocation(MODID, "infinite_water_source"), null);
    // ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(this), 0, location);
    ImageUtil.registerDynamicTexture(new ResourceLocation(MODID, "textures/block/infinite_water_source.png"), OverloadedConfig.INSTANCE.textureResolutions.blockResolution);
}
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 5 with ModelResourceLocation

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

the class ItemEnergyCore method registerModel.

@Override
@OnlyIn(Dist.CLIENT)
public void registerModel() {
    ModelResourceLocation location = new ModelResourceLocation(getRegistryName(), null);
    // ModelLoader.setCustomModelResourceLocation(this, 0, location);
    ImageUtil.registerDynamicTexture(new ResourceLocation(MODID, "textures/item/energy_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)

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