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 am trying to make a very long but thin entity. If I use the standard axis aligned bounding boxes, the box is very inaccurate if the entity rotates. I saw that minecraft uses multiple entities for the ender dragon. Is there another way to fix my problem because I would need a lot of sub entities and the box would probably still be inaccurate. Can I sub class AxisAlignedBB somehow without creating compatibility issues?

No, the bounding box is always a square base and doesn't rotate. This is because it greatly simplifies pathfinding and collision checking and so is important for performance reasons. 

 

So for any unusually shaped bounding box you'll need to create some additional invisible "hitbox entities". You don't need to break your actual entity into different parts, you just need to place the invisible entities in the right places (that will still take some math to get right since you'll probably want to consider rotation). If the hitbox entity gets hit then you notify the parent entity and perform the intended action.

 

Definitely a pain,  but also definitely possible to achieve with a bit of thought.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

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.