diff --git a/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpColorize.kt b/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpColorize.kt index 5fd87e45..f2bb25d4 100644 --- a/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpColorize.kt +++ b/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpColorize.kt @@ -33,11 +33,11 @@ object OpColorize : SpellOperator { private object Spell : RenderedSpell { override fun cast(ctx: CastingContext) { - val (handStack) = ctx.getHeldItemToOperateOn { FrozenColorizer.isColorizer(it) } + val (handStack) = ctx.getHeldItemToOperateOn { FrozenColorizer.isColorizer(it) }.copy() if (FrozenColorizer.isColorizer(handStack)) { if (ctx.withdrawItem(handStack.item, 1, true)) { HexPlayerDataHelper.setColorizer(ctx.caster, - FrozenColorizer(handStack.copy(), ctx.caster.uuid) + FrozenColorizer(handStack, ctx.caster.uuid) ) } } diff --git a/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpPlaceBlock.kt b/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpPlaceBlock.kt index 80271d58..e788ccc2 100644 --- a/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpPlaceBlock.kt +++ b/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpPlaceBlock.kt @@ -43,7 +43,7 @@ object OpPlaceBlock : SpellOperator { if (bstate.isAir || bstate.material.isReplaceable) { val placeeSlot = ctx.getOperativeSlot { it.item is BlockItem } if (placeeSlot != null) { - val placeeStack = ctx.caster.inventory.getItem(placeeSlot) + val placeeStack = ctx.caster.inventory.getItem(placeeSlot).copy() val placee = placeeStack.item as BlockItem if (ctx.withdrawItem(placee, 1, false)) { // https://github.com/VazkiiMods/Psi/blob/master/src/main/java/vazkii/psi/common/spell/trick/block/PieceTrickPlaceBlock.java#L143