inventory_mock tests #17
@@ -54,21 +54,4 @@ public class Inventory {
|
||||
}
|
||||
return currentWeight;
|
||||
}
|
||||
|
||||
private int calculateStackWeight(ItemStack stack) {
|
||||
return stack.getItem().getWeight() * stack.getQuantity();
|
||||
}
|
||||
|
||||
public boolean containsItem(Item item) {
|
||||
for (ItemStack stack : items) {
|
||||
if (stack.item().equals(item)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public int getMaxWeight() {
|
||||
return maxWeight;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user