aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0750-Add-NamespacedKey-biome-methods.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0750-Add-NamespacedKey-biome-methods.patch')
-rw-r--r--patches/server/0750-Add-NamespacedKey-biome-methods.patch16
1 files changed, 9 insertions, 7 deletions
diff --git a/patches/server/0750-Add-NamespacedKey-biome-methods.patch b/patches/server/0750-Add-NamespacedKey-biome-methods.patch
index 4ef9794eac..288183c6da 100644
--- a/patches/server/0750-Add-NamespacedKey-biome-methods.patch
+++ b/patches/server/0750-Add-NamespacedKey-biome-methods.patch
@@ -6,14 +6,14 @@ Subject: [PATCH] Add NamespacedKey biome methods
Co-authored-by: Thonk <[email protected]>
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index a2961166695e5fe4c607c82a490ce67c2e1b5fde..77cc32eb8b3e835af229fcb78229bfc09bd0da70 100644
+index 7d56cfaa460c1052d60344542c8ea60363894b8d..f5e8ff2a98a2357cb766e69bea982b25f2e2911b 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -607,6 +607,19 @@ public final class CraftMagicNumbers implements UnsafeValues {
- Preconditions.checkArgument(material.isBlock(), material + " is not a block");
- return getBlock(material).hasCollision;
+@@ -603,6 +603,21 @@ public final class CraftMagicNumbers implements UnsafeValues {
}
-+
+ // Paper end
+
++ // Paper start - namespaced key biome methods
+ @Override
+ public org.bukkit.NamespacedKey getBiomeKey(org.bukkit.RegionAccessor accessor, int x, int y, int z) {
+ org.bukkit.craftbukkit.CraftRegionAccessor cra = (org.bukkit.craftbukkit.CraftRegionAccessor) accessor;
@@ -26,6 +26,8 @@ index a2961166695e5fe4c607c82a490ce67c2e1b5fde..77cc32eb8b3e835af229fcb78229bfc0
+ net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> biomeBase = cra.getHandle().registryAccess().registryOrThrow(net.minecraft.core.registries.Registries.BIOME).getHolderOrThrow(net.minecraft.resources.ResourceKey.create(net.minecraft.core.registries.Registries.BIOME, org.bukkit.craftbukkit.util.CraftNamespacedKey.toMinecraft(biomeKey)));
+ cra.setBiome(x, y, z, biomeBase);
+ }
- // Paper end
-
++ // Paper end - namespaced key biome methods
++
@Override
+ public String get(Class<?> aClass, String s) {
+ if (aClass == Enchantment.class) {