Skip to content

Commit

Permalink
Update LootTable.java
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonUden committed Dec 2, 2023
1 parent 5c3394e commit 90b88e6
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@ public LootTable(String name, String displayName, int minItems, int maxItems) {
this.displayName = displayName;
this.minItems = minItems;
this.maxItems = maxItems;

if (this.minItems < 0) {
this.minItems = 0;
}

if (this.maxItems < 0) {
this.maxItems = 0;
}

if (this.minItems > this.maxItems) {
this.minItems = this.maxItems;
}
}

/**
Expand Down

0 comments on commit 90b88e6

Please sign in to comment.