From 9a06cbacd62b0dc861a568ddb83f60762253f40d Mon Sep 17 00:00:00 2001 From: UselessBullets <80850784+UselessBullets@users.noreply.github.com> Date: Thu, 12 Oct 2023 01:24:15 -0500 Subject: [PATCH] Update MinecraftServerMixin.java --- .../halplibe/mixin/mixins/registry/MinecraftServerMixin.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/turniplabs/halplibe/mixin/mixins/registry/MinecraftServerMixin.java b/src/main/java/turniplabs/halplibe/mixin/mixins/registry/MinecraftServerMixin.java index 669a766..181899f 100644 --- a/src/main/java/turniplabs/halplibe/mixin/mixins/registry/MinecraftServerMixin.java +++ b/src/main/java/turniplabs/halplibe/mixin/mixins/registry/MinecraftServerMixin.java @@ -1,6 +1,9 @@ package turniplabs.halplibe.mixin.mixins.registry; import net.minecraft.client.Minecraft; +import net.minecraft.core.achievement.stat.StatBase; +import net.minecraft.core.achievement.stat.StatList; +import net.minecraft.core.item.Item; import net.minecraft.server.MinecraftServer; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; @@ -20,6 +23,8 @@ public void postInit(CallbackInfo ci) { m.setAccessible(true); m.invoke(null); m.setAccessible(false); + StatList.craftedItemStats = new StatBase[Item.itemsList.length]; + StatList.pickUpItemStats = new StatBase[Item.itemsList.length]; } catch (Throwable err) { throw new RuntimeException(err); }