diff options
author | Luck <git@lucko.me> | 2022-06-29 22:36:27 +0100 |
---|---|---|
committer | Luck <git@lucko.me> | 2022-06-29 22:36:27 +0100 |
commit | f2c2a75bfa73080c9837471c92f96f57c9620c45 (patch) | |
tree | 0f4383eb629d206ede6d7c79fe226b12cc001a27 /spark-fabric/src/main/java/me/lucko/spark | |
parent | e5fc5ab0ac0016b8f4018f7f88d4603098d022c6 (diff) | |
download | spark-f2c2a75bfa73080c9837471c92f96f57c9620c45.tar.gz spark-f2c2a75bfa73080c9837471c92f96f57c9620c45.tar.bz2 spark-f2c2a75bfa73080c9837471c92f96f57c9620c45.zip |
Fix entity stats on Fabric/Forge
Diffstat (limited to 'spark-fabric/src/main/java/me/lucko/spark')
-rw-r--r-- | spark-fabric/src/main/java/me/lucko/spark/fabric/FabricWorldInfoProvider.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/spark-fabric/src/main/java/me/lucko/spark/fabric/FabricWorldInfoProvider.java b/spark-fabric/src/main/java/me/lucko/spark/fabric/FabricWorldInfoProvider.java index fddcf58..f2f7b96 100644 --- a/spark-fabric/src/main/java/me/lucko/spark/fabric/FabricWorldInfoProvider.java +++ b/spark-fabric/src/main/java/me/lucko/spark/fabric/FabricWorldInfoProvider.java @@ -42,7 +42,6 @@ import net.minecraft.server.world.ServerWorld; import net.minecraft.util.math.ChunkPos; import net.minecraft.world.entity.EntityTrackingSection; import net.minecraft.world.entity.SectionedEntityCache; -import net.minecraft.world.level.ServerWorldProperties; import java.util.ArrayList; import java.util.HashMap; @@ -81,7 +80,7 @@ public abstract class FabricWorldInfoProvider implements WorldInfoProvider { SectionedEntityCache<Entity> cache = ((ServerEntityManagerAccessor) entityManager).getCache(); List<FabricChunkInfo> list = getChunksFromCache(cache); - data.put(((ServerWorldProperties) world.getLevelProperties()).getLevelName(), list); + data.put(world.getRegistryKey().getValue().getPath(), list); } return data; @@ -108,7 +107,7 @@ public abstract class FabricWorldInfoProvider implements WorldInfoProvider { SectionedEntityCache<Entity> cache = ((ClientEntityManagerAccessor) entityManager).getCache(); List<FabricChunkInfo> list = getChunksFromCache(cache); - data.put(world.getDimensionKey().getValue().getPath(), list); + data.put(world.getRegistryKey().getValue().getPath(), list); return data; } |