Tetra

Tetra

12M Downloads

Trying to tetrize a tool with duplicate enchants will crash the game

Alexandqr opened this issue ยท 1 comments

commented

Observed behaviour

This bug will (almost) never happen in vanilla, however if you try to tetrize a tool that has 2 same enchants, the game will crash.

Expected behaviour

The easiest way to fix the crash would just be to ignore one of the duplicates, which is the case for any enchantments that tetra doesn't recognize as fit for the tool/weapon that were pre-applied before being put in the table.

Steps to reproduce

  1. Open a world
  2. Give yourself an item that has 2 of the same enchant (like Sharp 3 + Sharp 2). You can do this by typing: /give @p wooden_sword{Enchantments:[{id:sharpness,lvl:3},{id:sharpness,lvl:2}]} 1
  3. Try to put it in a tetra table
  4. Watch your minecraft perish as you receive error code: java.lang.IllegalStateException: Duplicate key net.minecraft.world.item.enchantment.DamageEnchantment@4f56bec2 (attempted merging values 3 and 2)

Crashlog

No response

Tetra version

4.9.3

mutil/mGui version

4.5.0

Forge version

1.18.2 - 40.1.51

Other mods

No response

commented

I'm not getting a crash with this, it just doesn't apply the enchantments. I need a crashlog to be able to figure out where it's crashing!