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

xCoord, yCoord and zCoord should be used as parameters inside

world.getBlockMetadata

.

ย 

Are you new to Java as well? If so, I strongly recommend to learn Java outside of MC modding first (there are Java tutorials all over the internet) or you'll have a hard time figuring stuff out.

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

  • Author

Thank you very much, I managed to get to a point where the model is rotating, I just need to tweak a few numbers. There is only one thing I don't know how to fix. How do I rotate the model's hitbox as well?

You can't rotate a hitbox, because it's an AxisAlignedBoundingBox. You can only change the start and end coordinates of that hitbox in your Block class. Fences do this for example, or stairs, or ladders, you can look at those.

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

Couldn't you do something like this:

public AxisAlignedBB rotateBoundingBox(AxisAlignedBB bb, int steps){
ย  ย  	AxisAlignedBB ret = bb.copy();
ย  ย  	for(int i = 0; i < steps; i++){
ย  ย  	ret.minX = bb.maxZ;
ย  ย  	ret.maxX = bb.minX;
ย  ย  	ret.minZ = bb.maxX;
ย  ย  	ret.maxZ = bb.minZ;
ย  ย  	}
ย  ย  	return ret;
}

ย 

Not sure if I got the order of the dimension shifting right, but should be universal.

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.