Skip to content

Commit

Permalink
Add limits offsets to the GUI and Placeholder
Browse files Browse the repository at this point in the history
Offsets were not added to the GUI and Placeholder value. Part of #159
  • Loading branch information
BONNe committed Mar 27, 2022
1 parent b459f8b commit 5fd461d
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,12 @@ public Map<Material, Integer> getMaterialLimits(World w, String id) {
}
// Island
if (islandCountMap.containsKey(id)) {
result.putAll(islandCountMap.get(id).getBlockLimits());
IslandBlockCount islandBlockCount = islandCountMap.get(id);
result.putAll(islandBlockCount.getBlockLimits());

// Add offsets to the every limit.
islandBlockCount.getBlockLimitsOffset().forEach((material, offset) ->
result.put(material, result.getOrDefault(material, 0) + offset));
}
return result;
}
Expand Down

0 comments on commit 5fd461d

Please sign in to comment.