Storage disk -> storage housing + storage part conversion needs shift

This commit is contained in:
Raoul Van den Berge
2016-05-16 21:24:39 +02:00
parent 3e58675d21
commit 1100402d11
2 changed files with 5 additions and 4 deletions

View File

@@ -51,7 +51,7 @@ public class ItemStorageDisk extends ItemBase {
@Override
public ActionResult<ItemStack> onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand) {
if (!world.isRemote && NBTStorage.getStored(stack.getTagCompound()) == 0 && stack.getMetadata() != TYPE_CREATIVE) {
if (!world.isRemote && player.isSneaking() && NBTStorage.getStored(stack.getTagCompound()) == 0 && stack.getMetadata() != TYPE_CREATIVE) {
ItemStack storagePart = new ItemStack(RefinedStorageItems.STORAGE_PART, 1, stack.getMetadata());
if (!player.inventory.addItemStackToInventory(storagePart.copy())) {