-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
feature(#13558): add copper golem state api #13561
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: main
Are you sure you want to change the base?
feature(#13558): add copper golem state api #13561
Conversation
paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftCopperGolem.java
Outdated
Show resolved
Hide resolved
6a066d1 to
8575594
Compare
paper-generator/src/main/java/io/papermc/generator/utils/SimpleEnumBridgeGenerator.java
Outdated
Show resolved
Hide resolved
8575594 to
b3fd552
Compare
...r-server/patches/sources/net/minecraft/world/entity/animal/golem/CopperGolemState.java.patch
Outdated
Show resolved
Hide resolved
| @Override | ||
| protected EnumValue.Builder rewriteEnumValue(net.minecraft.world.entity.animal.golem.CopperGolemState state) { | ||
| final String name = Formatting.formatKeyAsField(state.getSerializedName()); | ||
| return EnumValue.builder(name).argument(quoted(state.getSerializedName())); | ||
| } | ||
| }) |
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.
Is this part supposed to be exposed or is it only used for the conversion? can just do a.valueOf(b.name()) once it's generated. The javadocs of getId is at least a bit weird.
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.
Just for conversion. Referenced other enums that have an identifier on both sides.
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.
I personally prefer this. It allows to do legacy support easily.
ebdda1c to
695a7c2
Compare
695a7c2 to
aba54bc
Compare
Addresses #13558