Anvil crafting fix

This commit is contained in:
paulevsGitch 2021-07-09 15:50:06 +03:00
parent b5f3a4f511
commit ba7ea67f0c
3 changed files with 3 additions and 5 deletions

View file

@ -8,7 +8,7 @@ yarn_mappings= 6
loader_version= 0.11.6
# Mod Properties
mod_version = 0.10.1-pre
mod_version = 0.10.2-pre
maven_group = ru.betterend
archives_base_name = better-end

View file

@ -87,8 +87,7 @@ public abstract class AnvilMenuMixin extends ItemCombinerMenu implements AnvilSc
world.levelEvent(1030, blockPos, 0);
}
});
//TODO: no more return, does this still work?
//info.setReturnValue(stack);
info.cancel();
}
}

View file

@ -81,8 +81,7 @@ public class AnvilRecipe implements Recipe<Container>, BetterEndRecipe {
if (!player.isCreative()) {
if (!checkHammerDurability(craftingInventory, player)) return ItemStack.EMPTY;
ItemStack hammer = craftingInventory.getItem(1);
hammer.hurtAndBreak(this.damage, player, entity ->
entity.broadcastBreakEvent((InteractionHand) null));
hammer.hurtAndBreak(this.damage, player, entity -> entity.broadcastBreakEvent((InteractionHand) null));
}
return this.assemble(craftingInventory);
}