Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.14.3] Need help with 3D Model


Recommended Posts

Hey Guys,

i've created a 3d for my custom helmet which looks like this:


I've created a java model with cubik and added it into my mod but ingame the helmet looks like this (texture is not applied to the model):




Can someone help? 

Link to comment
Share on other sites

Can you post your log?

And what happens if you're using a way simpler model like just a cube?

Also, how did you implement the wearing?

Maybe the problem is in your solution?

Or your hat model json isn't that much compatible(like json says +5 to the left and the javacode understands +5 to the left etc.) with the (armor (BipedModel?) ) modeling functions.

Edited by Okmeis
Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • You have to keep track that you are currently calling back into render and then have your event handler bail out early. Otherwise your event handler will fire on your render call, too and result in an infinite recursion. You can just use a private static boolean for this that you reset in a try-finally block. Note also that you should definitely not be creating new entity instances every time you render, this happens once every frame for every entity.
    • Hello, I am trying to replace every rendered mob's model (not the mob itself) with the model of a custom entity, under certain conditions. This is how it would work: @SubscribeEvent public static void replaceMobModel(RenderLivingEvent.Pre<LivingEntity, EntityModel<LivingEntity>> event) { if (condition A is reached) { // replace every rendered mob's model with the model of a custom entity } else { // every rendered mob's model reverts back to normal (e.g. villagers start looking like villagers again) } } I was looking at this forum (https://forums.minecraftforge.net/topic/75986-114-how-to-change-rendered-entity/) and found out that I need to use EntityRenderManager::renderEntity. But since that is from a previous version, I assume it would be EntityRenderDispatcher::render. Here's what I tried to do so far: @SubscribeEvent public static void replaceMobModel(RenderLivingEvent.Pre<LivingEntity, EntityModel<LivingEntity>> event) { LocalPlayer localPlayer = Minecraft.getInstance().player; if (localPlayer != null && event.getEntity() instanceof Mob mob) { // I'll set up the conditions later once I get this working event.setCanceled(true); CustomEntity customEntity = ModEntities.CUSTOM_ENTITY.get().create(localPlayer.clientLevel); if (customEntity != null) { customEntity.setXRot(mob.getXRot()); customEntity.setYRot(mob.getYRot()); Minecraft.getInstance().getEntityRenderDispatcher().render( customEntity, mob.getX(), mob.getY(), mob.getZ(), mob.getViewYRot(event.getPartialTick()), event.getPartialTick(), event.getPoseStack(), event.getMultiBufferSource(), event.getPackedLight() ); } } } This results in a stack overflow (EntityRenderDispatcher::render seems to cause RenderLivingEvent to fire, causing an infinite recursion). Is this even the right thing to do? Or do I have to go to my CustomEntity renderer class and override render()? If that's the case, I don't know what I should put in that method.
    • Above is the output I got when I tried to run run.bat
    • C:\Users\user\Desktop\ModdedPlay>REM Forge requires a configured set of both JVM and program arguments. C:\Users\user\Desktop\ModdedPlay>REM Add custom JVM arguments to the user_jvm_args.txt C:\Users\user\Desktop\ModdedPlay>REM Add custom program arguments {such as nogui} to this file in the next line before the  or C:\Users\user\Desktop\ModdedPlay>REM  pass them to this script directly C:\Users\user\Desktop\ModdedPlay>java @user_jvm_args.txt @libraries/net/minecraftforge/forge/1.18.2-40.1.21/win_args.txt Error: Could not find or load main class @user_jvm_args.txt C:\Users\user\Desktop\ModdedPlay>pause Press any key to continue . . .  
  • Topics

  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.