Jump to content

[SOLVED] [1.12.2] Player gets stuck in modified collision boxes


Recommended Posts

Posted (edited)

I'm trying to do some fancy stuff to mimic the behavior of the mod Repose, where blocks whose collision box is normally a full cube will act as stairs when you're walking up a slope. This makes it so you don't have to jump so much.

 

My code kinda works, but the player gets stuck inside the block. It's almost like the collision boxes are getting modified only some of the time, then changing back to a full cube and trapping the player. Sometimes I can get out for a second but then I get pulled back into the block. I initially suspected some kind of syncing problem, but it behaves the same when I run it on the server only and when I run it on both sides. It does nothing when run on the client only. Do I need to send some kind of packet to the client? Any idea what's going on?

 

  Reveal hidden contents

 

Edited by Daeruin
Marking solved.
Posted

Can you explain why you think this would help?

 

I was guessing that maybe EntityPlayerSP#pushOutOfBlocks was trying to push the player out of the block, but then the player was falling back in, and was therefore getting stuck. So I tried cancelling PlayerSPPushOutOfBlocksEvent in the same conditions under which I'm modifying the collision boxes. No effect.

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.