mirror of
https://github.com/PaperMC/Paper.git
synced 2024-08-26 14:43:14 +02:00
With the new chunk system it doesn't hurt too much to (temporarily) remove this until implemented in a safer manner
33 lines
1.8 KiB
Diff
33 lines
1.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
|
Date: Tue, 1 Mar 2022 12:45:50 -0800
|
|
Subject: [PATCH] Fix Fluid tags isTagged method
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/tag/CraftFluidTag.java b/src/main/java/org/bukkit/craftbukkit/tag/CraftFluidTag.java
|
|
index 89cb1ec575c0f58e9934d98b056621348dbbe27a..cdd474e9b0363641839a66d3e61fec46c735879a 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/tag/CraftFluidTag.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/tag/CraftFluidTag.java
|
|
@@ -16,7 +16,7 @@ public class CraftFluidTag extends CraftTag<net.minecraft.world.level.material.F
|
|
|
|
@Override
|
|
public boolean isTagged(Fluid fluid) {
|
|
- return CraftMagicNumbers.getFluid(fluid).is(tag);
|
|
+ return registry.getHolderOrThrow(net.minecraft.resources.ResourceKey.create(net.minecraft.core.Registry.FLUID_REGISTRY, org.bukkit.craftbukkit.util.CraftNamespacedKey.toMinecraft(fluid.getKey()))).is(tag); // Paper
|
|
}
|
|
|
|
@Override
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
|
index ba9ce30003eb787fe974ae53f375ae9c0591d619..45e13c9dc4a65207728cdb401511b187597fe199 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
|
@@ -205,7 +205,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
|
return CraftMagicNumbers.MATERIAL_BLOCK.get(material);
|
|
}
|
|
|
|
- public static net.minecraft.world.level.material.Fluid getFluid(Fluid fluid) {
|
|
+ public static net.minecraft.world.level.material.Fluid getFluid(Material fluid) { // Paper - wrong type
|
|
return CraftMagicNumbers.MATERIAL_FLUID.get(fluid);
|
|
}
|
|
|