mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-19 19:25:48 +00:00
Merge pull request #3973 from iTwins/fix/generate_geo_resources
fix generating geo resources every scan (fixes #3974)
This commit is contained in:
commit
37681caf6b
@ -237,7 +237,7 @@ public class ResourceManager {
|
||||
for (int i = page * 28; i < resources.size() && i < (page + 1) * 28; i++) {
|
||||
GEOResource resource = resources.get(i);
|
||||
OptionalInt optional = getSupplies(resource, block.getWorld(), x, z);
|
||||
int supplies = optional.orElse(generate(resource, block.getWorld(), x, block.getY(), z));
|
||||
int supplies = optional.orElseGet(() -> generate(resource, block.getWorld(), x, block.getY(), z));
|
||||
String suffix = Slimefun.getLocalization().getResourceString(p, ChatUtils.checkPlurality("tooltips.unit", supplies));
|
||||
|
||||
ItemStack item = new CustomItemStack(resource.getItem(), "&f" + resource.getName(p), "&8\u21E8 &e" + supplies + ' ' + suffix);
|
||||
|
Loading…
Reference in New Issue
Block a user