Skip to content

Commit

Permalink
AutoMendMixin - Fixed ignore offhand setting only working in some sce…
Browse files Browse the repository at this point in the history
…narios
  • Loading branch information
0xTas committed Dec 29, 2024
1 parent ce61207 commit cecff6c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/dev/stardust/mixin/meteor/AutoMendMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ private void hijackOnTick(CallbackInfo ci) {
replaceElytra();
}

if (mendElytrasOnly != null && mendElytrasOnly.get()) {
if ((ignoreOffhand != null && ignoreOffhand.get())) {
ci.cancel();
} else if (mendElytrasOnly != null && mendElytrasOnly.get()) {
ci.cancel();
if ((ignoreOffhand != null && ignoreOffhand.get())) return;

ItemStack offhand = mc.player.getOffHandStack();
if (offhand.isEmpty() || !Utils.hasEnchantment(offhand, Enchantments.MENDING) || offhand.getDamage() == 0) {
int slot = getElytraSlot();
Expand Down

0 comments on commit cecff6c

Please sign in to comment.