Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.15.1] Checking if a bounding box collides with any solid blocks

Recommended Posts

In previous versions of forge, I used this method in World to check if the player was inside any block with a solid collision, such as a block or a fence. It worked pretty well.



In 1.15.1, I'm using this method instead, but it works differently. It returns true even when I'm inside a block with no collision (like a flower), and it returns true even if I'm just standing inside the same block as the fence, rather than inside the fence itself.



I'm wondering if there a method equivalent to world.collidesWithAnyBlock() in the newest build of forge? A way to check if a bounding box is collided with any solid objects?

Edited by tuku747
Link to post
Share on other sites

I would look at the methods in IWorld and IWorld reader that deal with collision shapes. I’m not sure if they’ve been renamed/unmapped in 1.15.1. Here’s some 1.14.4 code that uses them https://github.com/Cadiboo/NoCubes/blob/2cebf4e0e61eac96ab8490d3830f35953a8e9575/src/main/java/io/github/cadiboo/nocubes/client/ClientEventSubscriber.java#L417-L424

  • Like 1

About Me


My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to post
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.

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.

  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.