Use storage upgrader on upgrade. Closes #2993

This commit is contained in:
drcrazy 2022-07-24 11:30:14 +03:00
parent 735da1338e
commit 4461b5d782

View file

@ -3,6 +3,7 @@ package techreborn.items;
import net.minecraft.block.BlockState;
import net.minecraft.block.entity.BlockEntity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemUsageContext;
import net.minecraft.nbt.NbtCompound;
import net.minecraft.util.ActionResult;
@ -66,6 +67,9 @@ public class UpgraderItem extends Item {
((MachineBaseBlockEntity) newBlockEntity).syncWithAll();
}
ItemStack stack = context.getStack();
stack.decrement(1);
return ActionResult.SUCCESS;
}
}