Posted September 4, 20187 yr Yea, thats again me with rendering So, what i'm trying to do. TESR: Spoiler package com.ancient.thaumicgadgets.objects.machines.stab_2; import com.ancient.thaumicgadgets.util.IFunctionLibrary; import com.ancient.thaumicgadgets.util.Reference; import net.minecraft.block.state.IBlockState; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.BlockRendererDispatcher; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.block.model.IBakedModel; import net.minecraft.client.renderer.block.model.ModelManager; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.util.ResourceLocation; public class RenderStab2 extends TileEntitySpecialRenderer<TileEntityStab2> { private float timer = 0f; private int runesCount = 0; private float distance = 0.9f; private static final ResourceLocation[] textureLoc = {new ResourceLocation(Reference.MOD_ID, "textures/models/runes/1.png"), new ResourceLocation(Reference.MOD_ID, "textures/models/runes/2.png"), new ResourceLocation(Reference.MOD_ID, "textures/models/runes/3.png"), new ResourceLocation(Reference.MOD_ID, "textures/models/runes/4.png"), new ResourceLocation(Reference.MOD_ID, "textures/models/runes/5.png"), new ResourceLocation(Reference.MOD_ID, "textures/models/runes/6.png")}; private static final ResourceLocation modelLoc = new ResourceLocation(Reference.MOD_ID, "textures/models/runes/rune"); private static IBakedModel model; @Override public void render(TileEntityStab2 te, double x, double y, double z, float partialTicks, int destroyStage, float alpha) { super.render(te, x, y, z, partialTicks, destroyStage, alpha); Minecraft mc = Minecraft.getMinecraft(); BlockRendererDispatcher brd = mc.getBlockRendererDispatcher(); ModelManager mm = brd.getBlockModelShapes().getModelManager(); model = mm.getModel(new ModelResourceLocation(Reference.MOD_ID, "textures/models/runes/rune")); IBlockState state = te.getWorld().getBlockState(te.getPos()); this.timer = te.timer *0.05f; this.runesCount = te.runesCount; for (int q = 0; q < this.runesCount; q++) { GlStateManager.pushMatrix(); { GlStateManager.translate(x + 0.5d, y + 0.9d, z + 0.5d); GlStateManager.translate(distance * Math.cos(te.runeAngles.get(q) + timer), y + 0.9d, distance * Math.sin(te.runeAngles.get(q) + timer)); GlStateManager.scale(1f, 1f, 1f); this.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE); brd.getBlockModelRenderer().renderModelBrightness(model, state, 1.0f, true); } GlStateManager.popMatrix(); } } } And register model baking in client proxy, at init: ModelBakery.registerItemVariants(ModItems.TG, new ResourceLocation(Reference.MOD_ID, "textures/models/runes/rune")); But minecraft can't find this model. It's return missing block model. Why? What i'm doing wrong? Edited September 4, 20187 yr by Darth
September 4, 20187 yr Can you explain in more detail what you are trying to do? are you trying to render a model (with a TESR) without having that model attached to a block or item? About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
September 5, 20187 yr Author 23 hours ago, Cadiboo said: are you trying to render a model (with a TESR) without having that model attached to a block or item? Yea, so did u have any idea why it's doesn't work?
September 6, 20187 yr 11 hours ago, Darth said: Yea, so did u have any idea why it's doesn't work? On 9/4/2018 at 5:50 PM, Darth said: minecraft can't find this model. It's return missing block model. Why? What i'm doing wrong? Post your logs, the error should be in them. Also where are you baking the model, why is your IBaked model static and I’m pretty sure that block render dispatcher isn’t the renderer you want. I have the feeling that this could be done with a custom baked model rather than a TESR, can you please post what you are trying to do. The final aim, not what your code is trying to do. to quote diesieben7 “Do not describe how you want to code things. Describe what you want to achieve, gameplay-wise. Described from an end-user perspective.” Edited September 6, 20187 yr by Cadiboo About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.