Jump to content

Recommended Posts

Posted

I'd like to make it so the player can move through leaf blocks. Is there any way to modify or remove a vanilla block's collision box? I found a few old comments about people making this happen, but with no description. The one actual example I found used ASM. Not sure how to approach this or if it's even possible without ASM?

Posted

Never heard of that one before. I was looking at a super old list of events that I got somewhere. It's a nice list because it summarizes a lot of information about tons of events on a single page. But it's pretty outdated. Next time I need to remember to check out the REAL list in my IDE.

Posted

Cool. That ended up being pretty easy. The GetCollisionBoxesEvent gives you a list of all the collision boxes involved in the event. I created an iterator to iterate over the list. From each AxisAlignedBB you can get a Vec3d of the center, from that you can get a BlockPos, and from that you can get the block. If it's a leaf block, remove the AxisAlignedBB from the list. I made the mistake of doing a regular for-loop over the list at first and got a concurrent modification exception. That's why I switched to an iterator.

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.