Skip to content

Commit

Permalink
fix: crash when trying to automatically insert items into belt (#55)
Browse files Browse the repository at this point in the history
closes #55
  • Loading branch information
Jamalam360 committed Aug 5, 2024
1 parent 40f918a commit 1e9a3ab
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
- (fix) duplication when player dies (#53).
- (internal) use datagen
- (fix) crash when trying to automatically insert items into belt (#55)
Original file line number Diff line number Diff line change
Expand Up @@ -232,10 +232,12 @@ public abstract class InventoryMixin {
}
}
}

inv.setItem(beltSlot, stack.copyAndClear());
stateManager.setInventory(this.player, inv);
cir.setReturnValue(true);

if (beltSlot != -1) {
inv.setItem(beltSlot, stack.copyAndClear());
stateManager.setInventory(this.player, inv);
cir.setReturnValue(true);
}
}
}
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false
org.gradle.parallel=true

version=2.4.2+1.21
version=2.4.3+1.21
minecraft_version=1.21
branch=main
group=io.github.jamalam360
Expand Down

0 comments on commit 1e9a3ab

Please sign in to comment.