Skip to content

Commit 2428d83

Browse files
committed
fix #750
1 parent d0ac296 commit 2428d83

File tree

1 file changed

+4
-3
lines changed
  • Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells

1 file changed

+4
-3
lines changed

Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpPlaceBlock.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ object OpPlaceBlock : SpellAction {
2929
get() = 1
3030

3131
override fun execute(
32-
args: List<Iota>,
33-
env: CastingEnvironment
32+
args: List<Iota>,
33+
env: CastingEnvironment
3434
): SpellAction.Result {
3535
val pos = args.getBlockPos(0, argc)
3636
env.assertPosInRangeForEditing(pos)
@@ -76,7 +76,8 @@ object OpPlaceBlock : SpellAction {
7676
// we temporarily give the player the stack, place it using mc code, then give them the old stack back.
7777
spoofedStack.count = 1
7878

79-
val itemUseCtx = UseOnContext(env.world, caster as? ServerPlayer, env.castingHand, spoofedStack, blockHit)
79+
val itemUseCtx =
80+
UseOnContext(env.world, caster as? ServerPlayer, env.otherHand, spoofedStack, blockHit)
8081
val placeContext = BlockPlaceContext(itemUseCtx)
8182
if (bstate.canBeReplaced(placeContext)) {
8283
if (env.withdrawItem({ it == placeeStack }, 1, false)) {

0 commit comments

Comments
 (0)