Jump to content

Recommended Posts

Posted

Hello. I've fixed problems with my entities being jumping, but now i have antoher problem. Whenever i try to move the wagon, it runs some distance and then teleports to the place i've spawned it at. Any help?

 

Deleted from considerations of secrecy.

 

If i helped you, don't forget pressing "Thank You" button. Thanks for your time.

Posted

Hello. I've fixed problems with my entities being jumping, but now i have antoher problem. Whenever i try to move the wagon, it runs some distance and then teleports to the place i've spawned it at. Any help?

 

It teleports back to where it started because you only moved it client side.  When it later got a position packet from the server, it moved to those coordinates.

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
It teleports back to where it started because you only moved it client side.  When it later got a position packet from the server, it moved to those coordinates.

I bet no, because on flat grass it runs well. However on my rails (0.375 m high) and on half-blocks everything is not so good...

If i helped you, don't forget pressing "Thank You" button. Thanks for your time.

Posted

So, anyone?

---

This is just weird. If i put the loco on rails, it twithes, if i put it on the ground, it runs well. But if i put it on the ground and then it runs on the rails it also runs well o_O

If i helped you, don't forget pressing "Thank You" button. Thanks for your time.

Posted

When you update the entity's position client-side for rendering, do you do any rounding?

I've said, this is not the problem of server-client, because it lags only on certain blocks like mine rails and half-slabs...

---

Also, i've fixed my rails block collision, but this gave no effect on the locomotive... It still runs good on earth and bad on rails -.-

---

Here's the video showing the bug. And i repeat once again, this is problem of collision thing, not server-client system...

http://www.youtube.com/watch?v=p0mmf_x78l4

If i helped you, don't forget pressing "Thank You" button. Thanks for your time.

Posted

I understand you think so, but anything the client see's is purely what the server tells it to see. If it's twitching, it could be that your rendering code told it to twitch, which I seriously doubt since I think you know what you're doing in that regard, or because it's on the rails, the server is sending asynchronous update packets with partially invalid position coordinates.

 

The fact that it does this on HalfSlabs as well makes it seem like there is a rounding issue in where it's trying to set it's position- the entity wants to be lower, the server pushes it up, and it twitches. That's just my theory, anyway.

Have a modding question? PM me and hopefully I'll be able to help. Good at 2d Pixel Art? We need your help!  http://www.minecraftforum.net/topic/1806355-looking-for-2d-pixel-artist/

Posted

So, where do you think the error is? It uses standard pushOutOfBLocks() and i think it's somewhere there... And i can't even imagine why it rides rails well if strted on ground -.-

If i helped you, don't forget pressing "Thank You" button. Thanks for your time.

Posted

To be frank I just don't really know- it's only a suspicion. You should add in a lot of debug statements to make sure that every variable is what you think it is- and if it's not, that might be your issue. Try setting motionY to 0, just as a debug. See what happens, I guess? Sorry I'm not much help atm.

Have a modding question? PM me and hopefully I'll be able to help. Good at 2d Pixel Art? We need your help!  http://www.minecraftforum.net/topic/1806355-looking-for-2d-pixel-artist/

Posted

This saved my mental health.

if(underBlockId < 1 && underBlockId != RoW.rails.blockID && underBlockId != RoW.railGag.blockID){
   addVelocity(0, -0.04, 0);
}
if(underBlockId == RoW.rails.blockID || underBlockId == RoW.railGag.blockID){
   setPosition(posX, MathHelper.floor_double(posY) + 0.38, posZ); // 0.38 = my rail block height (0.375) + little spare space.
}

If i helped you, don't forget pressing "Thank You" button. Thanks for your time.

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.