PolyMc icon indicating copy to clipboard operation
PolyMc copied to clipboard

Custom enchantment position in Lore

Open skerit opened this issue 2 years ago • 1 comments

A player on my server reported this issue:

image

The "Owned by" is regular itemstack lore, the Beheading is the custom enchantment.

I've noticed this in the code: https://github.com/TheEpicBlock/PolyMc/blob/a9346854f46184481fa9626ceab7382eb030c25c/src/main/java/io/github/theepicblock/polymc/impl/poly/item/Enchantment2LoreTransformer.java#L32C41-L32C41

The atBeginning argument is only set to true when the item containing the enchantment is a custom item. But why is that? Shouldn't it always be true?

After setting it to true, the issue was fixed.

skerit avatar Jul 08 '23 12:07 skerit

I'm guessing there was probably some reason for that, might have something to do with attributes?

TheEpicBlock avatar Jul 08 '23 12:07 TheEpicBlock

As of the port to 1.20.5 (b0a34b111a7affb5bbe658b913a7dd11d48f796a), the tooltip fixing code has been overhauled. The hacky atBeginning stuff has been removed, and it now takes all the properties into account at once to ensure proper ordering. This should be fixed

TheEpicBlock avatar Mar 08 '24 16:03 TheEpicBlock