Skip to content

Commit

Permalink
fix: handle case where both items lack slots
Browse files Browse the repository at this point in the history
  • Loading branch information
Iamnotagenius committed Sep 30, 2024
1 parent 72b7eae commit 890c96b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ yarn_mappings=1.20.1+build.10
loader_version=0.16.5

# Mod Properties
mod_version = 1.6.3-1.20
mod_version = 1.6.4-1.20
maven_group = net.backupcup
archives_base_name = mcde

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,7 @@ public AnvilScreenHandlerMixin(ScreenHandlerType<?> type, int syncId, PlayerInve
output.setStack(0, ItemStack.EMPTY);
return;
}
if (slotsOptional1.isPresent() ^ slotsOptional2.isPresent()) {
EnchantmentSlots.fromItemStack(result).ifPresent(slots -> {
slots.updateItemStack(result);
});
if (slotsOptional1.isEmpty() || slotsOptional2.isEmpty()) {
return;
}
var slots1 = slotsOptional1.get();
Expand Down

0 comments on commit 890c96b

Please sign in to comment.