Fixes #4677: Stackoverflow when crafting with the quartz knife.

This commit is contained in:
Sebastian Hartte
2020-09-02 00:12:20 +02:00
parent 5d33005aaf
commit cf103b06c1
@@ -143,9 +143,10 @@ public class QuartzKnifeContainer extends AEBaseContainer {
private void makePlate() {
if (Platform.isServer()) {
if (!this.takeStack(1).isEmpty()) {
if (!inSlot.getSlot(0).extract(1).isEmpty()) {
final ItemStack item = QuartzKnifeContainer.this.toolInv.getItemStack();
final ItemStack before = item.copy();
// FIXME FABRIC: Quartz Knife currently is not damageable due to recipe remainder concerns
item.damage(1, QuartzKnifeContainer.this.getPlayerInv().player, p -> {
QuartzKnifeContainer.this.getPlayerInv()
.setStack(QuartzKnifeContainer.this.getPlayerInv().selectedSlot, ItemStack.EMPTY);