GeyserMC / Geyser

A bridge/proxy allowing you to connect to Minecraft: Java Edition servers with Minecraft: Bedrock Edition.
https://geysermc.org
MIT License
4.72k stars 678 forks source link

Sweeping Edge Book doesn't work in the anvil. #3661

Closed Tyviebrock closed 1 year ago

Tyviebrock commented 1 year ago

Describe the bug

Sweeping edge enchanted books don't work in the second slot of an anvil.

To Reproduce

1.) Get sweeping edge from trading or enchanting a book 2.) Attempt to enchanted your sword with the enchanted book in an anvil

Expected behaviour

It'll enchant your sword with no issues.

Screenshots / Videos

No response

Server Version and Plugins

Paper version git-Paper-477 (MC: 1.19.4) (Implementing API version 1.19.4-R0.1-SNAPSHOT) (Git: 5c78e77)

Geyser Dump

No response

Geyser Version

2.1.0-SNAPSHOT (git-master-0f99abc)

Minecraft: Bedrock Edition Device/Version

1.19.73 Nintendo Switch

Additional Context

Additionally if you combine sweeping edge with a different enchantment, it needs to be in the first slot.

However if try to combine this combined book with a sword it'll either remove the sweeping edge or just not work if you already have the secondary enchant.

MrBsng commented 1 year ago

I have a workaround papermc plugin here just for this, use the latest release https://github.com/TBYT/BedrockParity/releases Also this issue should stay open as this is not in Geyser yet.

onebeastchris commented 1 year ago

Unfortunately, due to certain bedrock limitations, it won't be easily possible to 'enable' this behavior in Geyser. Your best bet is probably using a workaround plugin, TBYT's one for example, or try adding the book together with other enchantments.

Bedrock, for some reason, doesn't allow custom enchantments in enchantment tables or anvils - therefore, full 1:1 java enchanting isn't really possible. Same reason as for why infinity+mending bows can't be made on bedrock even if the server allows it via a plugin - the client partly controls the anvil, it's not fully server side.

onebeastchris commented 1 year ago

However, there shouldn't be a case where sweeping edge gets removed outright (unless you e.g. put the book on a pair of boots or similar) - does the enchantment appear when relogging/closing and reopening your inventory?

Tyviebrock commented 1 year ago

However, there shouldn't be a case where sweeping edge gets removed outright (unless you e.g. put the book on a pair of boots or similar) - does the enchantment appear when relogging/closing and reopening your inventory?

So after putting the sword in the anvil with the sweeping edge enchant, sweeping edge wasn't being displayed in the hover over tooltip on the resulting part. But after combining it the name was displaying. (I didn't do this part until now).

onebeastchris commented 1 year ago

Okay, that's the behavior that is expected. The only reason Sweeping edge shows up at all is because it's shown in the item lore - when combining it, the preview doesn't show sweeping edge, as the preview apparently doesn't have it yet. But it should - as it did here - show up "again" when combined :)

So yay, that works ~ The only real way we could try and fix this is if Bedrock were to add the enchantment, or if Bedrock would allow anvil behavior modifications

Tyviebrock commented 1 year ago

I did also notice that enchanted books with just sweeping edge lose their yellow name.

onebeastchris commented 1 year ago

https://github.com/GeyserMC/Geyser/issues/2972 closing this in favor of the other post - this boils down to Bedrock having no support for custom enchantments, and us being unable to modify anvil behavior which is controlled client-side. Thanks anyway for reporting!