Jump to content

[1.7.10] [SOLVED] Directional Models


Whyneb360

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

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