Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

I was wondering how I could check for a radius around the player, so that I can sort any living entities into a list? The concept is I want any living entities that come in a specific radius of the player to be set on fire.

Get the player's bounding box, make it bigger (grow, expand), and there are a couple methods in World called getEntitiesWithinAABB or something similar where returns a collection of entities that meets the conditions.

If you want it to be more accurate (bounding box is a cube), you can also check the distance between two entities by Vector3d#distanceTo.

  • Author

Hmm, I'm guessing getEntitiesWithinAABB doesn't exist in the 1.16 version because I can't seem to find the method?

  • Author

Ok, so I did find this method called getNearbyEntities and started playing around with it, but I'm having trouble figuring out what to put in the place of some of these parameters

getNearbyEntities(Class<? extends T> p_217374_1_, EntityPredicate p_217374_2_, LivingEntity p_217374_3_, AxisAlignedBB p_217374_4_)

I had already gotten that AxisAlignedBB is just the bounding box aka the radius to check and I just assume EntityPredicate could just be the default, but the other two I'm unsure about if anyone could explain?

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.