Supplementaries

Supplementaries

82M Downloads

[๐Ÿž]: Cages overwrite hand item when used via Hex Casting

vgskye opened this issue ยท 0 comments

commented

Before Continuing:

  • Check you are using the latest version of the mods and its dependencies
  • Always include a latest.log if you are crashing
  • Remove mod that enhances Minecraft: Optifine, Sodium, others. The issue persists.
  • If you are unsure which mod is the culprit.
    Disable all of your mods and enable them 1-2 mods each time to isolate the culprit
  • Confirm that there is no existing issue with a similar description submitted in the list of issues.

Version

1.20.1-FORGE

Supplementaries Version

1.20-2.8.17

Moonlight Lib Version

1.20-2.12.17

Issue Detail

(Originally reported as FallingColors/HexMod#750)
Hex Casting's Place Block spell allows users to place a block without having said block in a hand slot. If a Cage is "placed" in this way, said cage will overwrite the item used by the player to cast the spell.
This is due to the fact that

ItemStack returnItem = new ItemStack(this);
if (stack.hasCustomHoverName()) returnItem.setHoverName(stack.getHoverName());
Utils.swapItemNBT(player, context.getHand(), stack, returnItem);
overwrites the current hand's ItemStack.
More details are at the linked issue.