Fix bug when dropping items from an open inventory

This commit is contained in:
AJ Ferguson 2020-07-03 12:18:35 -08:00
parent 0daa4451ec
commit ab71bf0727

View file

@ -120,9 +120,9 @@ public class InventoryActionDataTranslator {
session.sendDownstreamPacket(dropPacket);
}
}
ItemStack item = session.getInventory().getItem(javaSlot);
ItemStack item = inventory.getItem(javaSlot);
if (item != null) {
session.getInventory().setItem(javaSlot, new ItemStack(item.getId(), item.getAmount() - dropAmount, item.getNbt()));
inventory.setItem(javaSlot, new ItemStack(item.getId(), item.getAmount() - dropAmount, item.getNbt()));
}
return;
} else { //clicking outside of inventory