Skip to content

Commit

Permalink
fixed chest pickup bug; non-empty chests can no longer be picked up
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisj42 committed May 30, 2019
1 parent 6c948ee commit 4ff14b7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/minicraft/entity/furniture/Chest.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ public boolean use(Player player) {
return true;
}

@Override
public void take(Player player) {
if(inventory.invSize() == 0)
super.take(player);
}

@Override
protected String getUpdateString() {
String updates = super.getUpdateString()+";";
Expand Down

0 comments on commit 4ff14b7

Please sign in to comment.