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/forge/ForgeWorldInfoProvider.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'spark-forge/src/main/java') 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 cache = entityManager.sectionStorage; List 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 cache = entityManager.sectionStorage; List list = getChunksFromCache(cache); - data.put(level.dimensionTypeId().location().getPath(), list); + data.put(level.dimension().location().getPath(), list); return data; } -- cgit