Use storage upgrader on upgrade. Closes #2993
This commit is contained in:
parent
735da1338e
commit
4461b5d782
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue