2023-08-12 23:50:21 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Noah van der Aa <ndvdaa@gmail.com>
|
|
|
|
Date: Sat, 12 Aug 2023 15:33:49 +0200
|
|
|
|
Subject: [PATCH] Fix custom statistic criteria creation
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
2024-12-03 20:34:55 +01:00
|
|
|
index 088ff124ca82e69e59e02e6604959e399e4aff03..cd00165ebb193c788e05a6f0b2b649936d56aa9f 100644
|
2023-08-12 23:50:21 +02:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
2024-10-31 23:44:34 +01:00
|
|
|
@@ -608,6 +608,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
|
|
|
public void setBiomeKey(org.bukkit.RegionAccessor accessor, int x, int y, int z, org.bukkit.NamespacedKey biomeKey) {
|
|
|
|
accessor.setBiome(x, y, z, org.bukkit.Registry.BIOME.getOrThrow(biomeKey));
|
2023-08-12 23:50:21 +02:00
|
|
|
}
|
2024-10-27 18:11:15 +01:00
|
|
|
+
|
2023-08-12 23:50:21 +02:00
|
|
|
+ @Override
|
|
|
|
+ public String getStatisticCriteriaKey(org.bukkit.Statistic statistic) {
|
|
|
|
+ if (statistic.getType() != org.bukkit.Statistic.Type.UNTYPED) return "minecraft.custom:minecraft." + statistic.getKey().getKey();
|
|
|
|
+ return org.bukkit.craftbukkit.CraftStatistic.getNMSStatistic(statistic).getName();
|
|
|
|
+ }
|
2024-10-27 18:11:15 +01:00
|
|
|
// Paper end
|
|
|
|
|
|
|
|
/**
|