FallingColors / HexMod

Minecraft mod about drawing spells
MIT License
120 stars 86 forks source link

Supplementaries cages will overwrite artifacts when used with Place Block #750

Open squimbo opened 1 week ago

squimbo commented 1 week ago

Modloader

Forge

Minecraft version

1.20.1

Hex Casting version

0.11.1-7-pre-668

Modloader version

Forge: 47.1.106

Modpack info

https://cdn.modrinth.com/data/AAfLM2wL/versions/ciAv1CM8/Power%20of%20Creation%201.0.8.mrpack

The latest.log file

No response

Issue description

Releasing a mob from a Supplementaries Cage with the place block spell will overwrite your offhand item.

Steps to reproduce

  1. Create a hex to place a block
  2. Use an artifact to read the spell from your main hand and cast with your offhand
  3. The artifact will be replaced with the now empty cage

https://github.com/user-attachments/assets/d6948960-a008-4f8f-b84e-43f5c2242724

Other information

No response

object-Object commented 1 week ago

Relevant code:

Hex:

https://github.com/FallingColors/HexMod/blob/7da86e16a7afc18b3f7ad2587fcdf52a90583f89/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpPlaceBlock.kt#L79-L83

Supplementaries:

https://github.com/MehVahdJukaar/Supplementaries/blob/cba3bfae89a48afb35617336b173ce2f90ac1c17/common/src/main/java/net/mehvahdjukaar/supplementaries/common/items/AbstractMobContainerItem.java#L242-L244

Moonlight (dependency of Supplementaries):

https://github.com/MehVahdJukaar/Moonlight/blob/1ae0f2616d1e0d3222a13647a868803c1f907cf8/common/src/main/java/net/mehvahdjukaar/moonlight/api/util/Utils.java#L75-L78