-
-
Notifications
You must be signed in to change notification settings - Fork 390
Improve itemframes #7749
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev/feature
Are you sure you want to change the base?
Improve itemframes #7749
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do we think about making an expression to grab the rotation of an itemframe?
Also, not sure if possible, but combined with that expression, make a test structure within EffSecSpawn.sk
spawning item frames with a rotation and ensuring the rotation is correct.
if (!(entityData instanceof ItemFrameData)) | ||
return false; | ||
ItemFrameData itemFrameData = (ItemFrameData) entityData; | ||
if (type != null) | ||
return itemFrameData.type != null && type.equals(itemFrameData.type) && rotation == itemFrameData.rotation; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (!(entityData instanceof ItemFrameData)) | |
return false; | |
ItemFrameData itemFrameData = (ItemFrameData) entityData; | |
if (type != null) | |
return itemFrameData.type != null && type.equals(itemFrameData.type) && rotation == itemFrameData.rotation; | |
if (!(entityData instanceof ItemFrameData other)) | |
return false; | |
if (type != null) | |
return other.type != null && type.equals(other.type) && rotation == other.rotation; |
String string; | ||
if (itemFrames != null) { | ||
string = "rotate " + itemFrames.toString(event, debug) + " " + rotations.toString(event, debug); | ||
} else { | ||
string = "rotate " + rotations.toString(event, debug) + (counter ? " counter " : "") + " clockwise"; | ||
} | ||
return string + " " + amount + " time" + (amount <= 1 ? "" : "s"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SSB?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
T-te-test!
I'm concerned that this rotate effect will add a lot of ambiguity to the existing rotate effect for displays, vectors, and quaternions. I'd like to see the two integrated if possible. I'm also concerned about adding the Rotation class, as I think it will cause confusion with the existing ExprAngle expression. Can we not treat item frames as any other rotatable object and just snap their alignment to 45 degree angles if the rotation would result in something like 60 degrees? |
Co-authored-by: SirSmurfy2 <82696841+Absolutionism@users.noreply.github.com>
Description
Improves Item Frames as Snow always wanted.
Sets the entity data pattern to
for more proper support of ItemFrames while also registering ItemFrames as a classinfo for dedicated syntaxes.
Adds org.bukkit.Rotation and a utility effect for easily rotating an expression that returns a rotation and/or itemframes and rotation's self.
Examples:
Target Minecraft Versions: any
Requirements: none
Related Issues: #414 (non-closing) and #2874