From f2c2a75bfa73080c9837471c92f96f57c9620c45 Mon Sep 17 00:00:00 2001 From: Luck Date: Wed, 29 Jun 2022 22:36:27 +0100 Subject: Fix entity stats on Fabric/Forge --- .../src/main/java/me/lucko/spark/fabric/FabricWorldInfoProvider.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'spark-fabric/src/main/java/me/lucko/spark/fabric') 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 cache = ((ServerEntityManagerAccessor) entityManager).getCache(); List 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 cache = ((ClientEntityManagerAccessor) entityManager).getCache(); List list = getChunksFromCache(cache); - data.put(world.getDimensionKey().getValue().getPath(), list); + data.put(world.getRegistryKey().getValue().getPath(), list); return data; } -- cgit