Jump to content

[solved] Custom cart - rendering direction


mnn

Recommended Posts

Hello,

 

I managed to copy and modify original cart to use my renderer. But I'm stuck on minecraft bug (it's not too much visible in-game because original carts are pretty symmetric) - the cart renderer does not "remember" (or use) a direction it's moving, so all south-north rails render cart's direction one way and a second way east-west rails - it renders always one rotation (for 2 moving directions). So when running in a circle, half of the time the cart is actually going backwards...

 

Not sure, if it's understandable so I'm adding a video:

 

Rendering (and a lot of minecart) code uses de-obfuscated but not "translated" names, I'm really lost here... Any ideas?

 

(code is here, but as I wrote I didn't changed it much)

 

EDIT:

solution: http://www.minecraftforge.net/forum/index.php/topic,5763.msg31451.html#msg31451

mnn.getNativeLang() != English

If I helped you please click on the "thank you" button.

Link to comment
Share on other sites

I wrote a pm to Vswe (creator of steve carts). Some time passed but unfortunately he hasn't responded :(. As you wrote I should try asking also CovertJaguar, maybe I'll have better luck with him.

mnn.getNativeLang() != English

If I helped you please click on the "thank you" button.

Link to comment
Share on other sites

CovertJaguar answered my question :). Here's his solution (I hope he doesn't mind):

Compare render yaw to server yaw and do a 180 if the difference is too large.

To prevent random switching on load, you must also write the isInReverse var to NBT.

It works like a charm (if you want to see actual code, it's available here)

mnn.getNativeLang() != English

If I helped you please click on the "thank you" button.

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.

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



×
×
  • Create New...

Important Information

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