removed ability to query for entire system_info in one go.

This commit is contained in:
gnembon committed 2022-02-16 00:25:35 +01:00
1 parent bf00051482
commit aaea11d82d
5 files changed
+6 -16

No files matched your search

@@ -27,7 +27,7 @@ public class Monitoring {
{
if (lv.size() == 0)
{
return SystemInfo.getAll((CarpetContext) c);
return SystemInfo.getAll();
}
if (lv.size() == 1) {
String what = lv.get(0).getString();
@@ -45,7 +45,7 @@ public class Monitoring {
NaturalSpawner.SpawnState info = world.getChunkSource().getLastSpawnState();
if (info == null) return Value.NULL;
Object2IntMap<MobCategory> mobcounts = info.getMobCategoryCounts();
int chunks = ((SpawnHelperInnerInterface)info).cmGetChunkCount();
int chunks = info.getSpawnableChunkCount();
if (lv.size() == 0)
{
Map<Value, Value> retDict = new HashMap<>();
@@ -215,9 +215,9 @@ public class SystemInfo {
{
return options.getOrDefault(what, c -> null).apply(cc);
}
public static Value getAll(CarpetContext cc)
public static Value getAll()
{
return MapValue.wrap(options.entrySet().stream().collect(Collectors.toMap(e -> new StringValue(e.getKey()), e -> e.getValue().apply(cc))));
return ListValue.wrap(options.keySet().stream().map(StringValue::of).collect(Collectors.toList()));
}
}