Jump to content

Recommended Posts

Posted

Hey guys !

 

I recently decided to try do make a 3D armor with a custom rendering.

Here is the tutorial I followed :

http://bit.ly/1M5FpFh

 

And here are my classes:

 

The model:

 

  Reveal hidden contents

 

 

The item:

 

  Reveal hidden contents

 

 

The proxyclient class:

 

  Reveal hidden contents

 

 

 

Note: the armor can only be a helmet.

 

When I wear the armor, the item I'm holding and the armors I'm wearing stop rendering, and this shows up in the console:

 

 

  Reveal hidden contents

 

 

Thank you a lot for your help !

 

 

Posted

The exception was thrown on line 35 of

ItemMaskLoup

, but line 35 of the code you posted couldn't have thrown that exception. Can you upload the latest version of your code and the crash report to Gist and link them here?

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted

Well, I have another issue:

33424620151023150523.png

 

78339420151023150529.png

 

Some texture render at weird places. Here is the new code for the model:

 

  Reveal hidden contents

 

Posted

So, I made a few test, and when you remove this part:

      this.bipedHead.addChild(Shape1);
      this.bipedHead.addChild(LString);
      this.bipedHead.addChild(Right);
      this.bipedHead.addChild(Top);
      this.bipedHead.addChild(Face);
      this.bipedHead.addChild(LEar);
      this.bipedHead.addChild(REar);
      this.bipedHead.addChild(Nez);
      this.bipedHead.addChild(Left);
      this.bipedHead.addChild(RString);

 

The "right" texture stop rendering, the bugged textures only remains.

It looks like this:

72269920151025174301.png

65303020151025174258.png

 

 

 

Posted

That's an issue with your model rotation points and values - if you made your model in Techne, Techne doesn't support child parts, so adding all of the parts as children of the head makes everything out of whack like you are seeing.

 

Easiest solution is to not add them as children, but just render each part separately. If you have somewhat complicated animations, however, you'll want to instead add any parts involved in that animation as children of the appropriate part, and then recalculate the rotations points/values based on the parent part (basically you just subtract the parent values from the child values to get the new child values).

Posted

So the tutorial I followed is not valid anymore ? Damn.

How am I supposed to render each part separately then ? Do I have to create a renderer for each part ?

It's a helmet, so there are no animation (except from the head movements).

 

Posted

You know how in your Model class there are a bunch of ModelBase fields? Each of those is a part of your model. When your model renders, you call part1.render(args), part2.render(args), etc. for every part that is not a child of another part.

 

However, if your helmet has lots of individual parts, even something as simple as head rotation will cause it to become mangled beyond recognition if each part is not the child of a previous part of the helmet. You just need one parent part on the helmet, and every other part will be relative to that piece; when that piece renders, you can set the rotation to the head rotation and the rest of the pieces will follow.

Posted

If/when I do any more animated models, my process is going to be to design it in MCAnimator and Techne.  I'll use Techne's exported code, but use the parent/child relationship from MCAnimator using the rotation values I figured out in there.

(MCAnimator's exported code uses their custom animation system, which I had concurrent modification errors using).

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

So, a friend noticed that the weird part in the inside renders like a regular helmet, and if I replace my textures with some Iron Helmet textures...

86967020151026005813.png

Tadaaa !

 

So, I guess my helmet is rendered once like a regular armour, and once like I want it to be rendered. And I don't think it comes from the rotation points and all that stuff.

There should be a way to tell Minecraft not to render it like a regular helmet ?

 

Posted

Could be your texture is not laid out in the same format as your model expects. Does your helmet use the same model as the vanilla helmet, or is it custom? Because that's pretty weird if it renders the regular helmet texture perfectly fine, but it's a different model.

 

Does your entity renderer extend RenderBiped? And is your mob actually wearing a helmet, as in the helmet inventory slot has a helmet item in it? Because RenderBiped will render any equipped helm automatically, though I don't recall whether how/where it fetches the model. You should take a look at that class and see, if that's the case.

Posted

Here is a default armour texturemap:

613935ironlayer1.png

 

And here is mine:

645085maskwolfarmor.png

 

There are not custom entitys, I used zombies and myself, so yes, it's a ModelBiped.

I made the textures based on the texturemap Techne gave me, and it worked just fine when I loaded them into Techne.

 

Now, the problem is that Minecraft renders the armor with the regular model, and then renders it with my custom model, so two helmet appear on the player/entity's head, the regular one, that looks broken because the textures don't match, and the custom one, that looks just fine.

 

Here is the armor class:

 

  Reveal hidden contents

 

 

Could the problem come from the getArmorModel() methods that would be called twice ?

 

Posted

I solved the problem by changing this:

		super(f,0.0f,64,32);

 

Into this:

		super(f,0.0f,0,0);

 

 

But, when the helmet is weared by a player, it renders very glitchy.It's like two textures rendering on top of each other, but one of these textures is transparent.

And I noticed that if I delete the line with the super, the bug comes back.

Posted

This is an armor, not an entity, so it's 64x32.  I made a few test but the textures are very fine.

Actually, the problem comes from the super, that stills renders even though it should not.

I just need a way to say: <<Nope, I already have my model here, don't render the regular model too>> but I can't find it.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Ignore shrimple, it doesn't work with Oculus. Also, enableShaders was alr true when it said that towards the end of the log. If you could also figure out why my tags are messed up that'd be cool too, but that's a later issue. https://drive.google.com/drive/folders/1ovEKDZECUCl7zZxGfpyQcS4s5PZPQyfa?usp=drive_link
    • accidental duplicate mesage cuz lag
    • https://gnomebot.dev/paste/231527759279685634/1372324909073563730/1372324908629102716 https://gnomebot.dev/paste/231527759279685634/1372320454861262908/1372320454299090996 seems like theres a registry sync error, not sure what that means though, however in an old pack i played on, i actually had a registry sync error happen whenever the world tried too save and it would suddenly stop loading chunks, is there a mod fix for this or some way too bypass registry syncing? is this a server problem? i have no issues with the pack on pc, only on my server.
    • i think the problem is the player animator library but i need it for one of my main mods is there any way i can fix this? The game crashed: rendering overlay Error: java.lang.IllegalArgumentException: Failed to create player model for default heres the crash report: https://pastebin.com/U5Wp8ysb
    • I have been an enthusiastic investor in crypt0currencies for several years, and my digital assets have been integral to my financial strategy. A few months ago, I encountered a distressing predicament when I lost access to my primary cryptocurrency walleet after clicking on an airdrop link that inadvertently connected to my walleet. The dread of potentially losing all my hard-earned funds was overwhelming, leaving me uncertain about where to seek assistance. In my pursuit of solutions, I stumbled upon ChainDigger Retrievers. From our initial consultation to the triumphant recovery of my assets, the team exhibited exceptional expertise. They provided comprehensive explanations of the recovery process, ensuring I was informed at every stage and offering reassurance during this tumultuous time. Their approach was not only meticulous but also compassionate, which significantly alleviated my anxiety. ChainDigger Retrievers unwavering commitment to resolving my issue was evident throughout the process. Leveraging their profound understanding of crypt0currency technology and digital forensics, they initiated an exhaustive investigation to trace the transactions linked to my compromised wallet. Their meticulous analysis and relentless determination were apparent as they left no stone unturned in their quest to recover my funds. After several days of diligent investigation, the team successfully recovered everything I had lost. They uncovered that the link I had clicked contained malware, which scammeers had used to infiltrate my walleet. This revelation was both alarming and enlightening, underscoring the inherent risks associated with crypt0currency transactions when proper precautions are not taken.Thanks to ChainDigger Retrievers, I not only regained everything but also acquired invaluable knowledge about safeguarding my investments. Their expertise and steadfast support transformed a daunting situation into a manageable one, and I am profoundly grateful for their assistance. I can now continue my investment journey with renewed confidence, knowing that I have a trustworthy ally in ChainDigger Retrievers. Their client satisfaction is truly commendable, and I wholeheartedly recommend their services to anyone facing similar challenges in the crypt0currency realm. With their help, I was able to turn a distressing time into a positive outcome, and I will forever be grateful for their support.  
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.