aboutsummaryrefslogtreecommitdiff
path: root/spark-forge/src
diff options
context:
space:
mode:
authorLuck <git@lucko.me>2022-06-29 22:36:27 +0100
committerLuck <git@lucko.me>2022-06-29 22:36:27 +0100
commitf2c2a75bfa73080c9837471c92f96f57c9620c45 (patch)
tree0f4383eb629d206ede6d7c79fe226b12cc001a27 /spark-forge/src
parente5fc5ab0ac0016b8f4018f7f88d4603098d022c6 (diff)
downloadspark-f2c2a75bfa73080c9837471c92f96f57c9620c45.tar.gz
spark-f2c2a75bfa73080c9837471c92f96f57c9620c45.tar.bz2
spark-f2c2a75bfa73080c9837471c92f96f57c9620c45.zip
Fix entity stats on Fabric/Forge
Diffstat (limited to 'spark-forge/src')
-rw-r--r--spark-forge/src/main/java/me/lucko/spark/forge/ForgeWorldInfoProvider.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/spark-forge/src/main/java/me/lucko/spark/forge/ForgeWorldInfoProvider.java b/spark-forge/src/main/java/me/lucko/spark/forge/ForgeWorldInfoProvider.java
index b17dab5..1d65d6a 100644
--- a/spark-forge/src/main/java/me/lucko/spark/forge/ForgeWorldInfoProvider.java
+++ b/spark-forge/src/main/java/me/lucko/spark/forge/ForgeWorldInfoProvider.java
@@ -38,7 +38,6 @@ import net.minecraft.world.level.entity.EntitySection;
import net.minecraft.world.level.entity.EntitySectionStorage;
import net.minecraft.world.level.entity.PersistentEntitySectionManager;
import net.minecraft.world.level.entity.TransientEntitySectionManager;
-import net.minecraft.world.level.storage.ServerLevelData;
import java.util.ArrayList;
import java.util.HashMap;
@@ -77,7 +76,7 @@ public abstract class ForgeWorldInfoProvider implements WorldInfoProvider {
EntitySectionStorage<Entity> cache = entityManager.sectionStorage;
List<ForgeChunkInfo> list = getChunksFromCache(cache);
- data.put(((ServerLevelData) level.getLevelData()).getLevelName(), list);
+ data.put(level.dimension().location().getPath(), list);
}
return data;
@@ -104,7 +103,7 @@ public abstract class ForgeWorldInfoProvider implements WorldInfoProvider {
EntitySectionStorage<Entity> cache = entityManager.sectionStorage;
List<ForgeChunkInfo> list = getChunksFromCache(cache);
- data.put(level.dimensionTypeId().location().getPath(), list);
+ data.put(level.dimension().location().getPath(), list);
return data;
}