2022-03-01 23:40:34 +01:00
|
|
|
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
|
2022-03-11 15:24:45 +01:00
|
|
|
index 89cb1ec575c0f58e9934d98b056621348dbbe27a..cdd474e9b0363641839a66d3e61fec46c735879a 100644
|
2022-03-01 23:40:34 +01:00
|
|
|
--- 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
|
2022-06-08 15:12:28 +02:00
|
|
|
index 8d0de7b529a9dc946b6b56e83238dcacb4496906..377b018aa60b5efdae0e55960670748d6ec68191 100644
|
2022-03-01 23:40:34 +01:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
2022-03-03 19:21:48 +01:00
|
|
|
@@ -201,7 +201,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
2022-03-01 23:40:34 +01:00
|
|
|
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);
|
|
|
|
}
|
|
|
|
|