mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-02 11:22:01 +01:00
#1496: Use correct Fluid class on Tags type check
By: DerFrZocker <derrieple@gmail.com>
This commit is contained in:
parent
91ffa532ba
commit
54caf1484d
@ -2488,7 +2488,7 @@ public final class CraftServer implements Server {
|
||||
return itemTags.getTags().map(pair -> (org.bukkit.Tag<T>) new CraftItemTag(itemTags, pair.key())).collect(ImmutableList.toImmutableList());
|
||||
}
|
||||
case org.bukkit.Tag.REGISTRY_FLUIDS -> {
|
||||
Preconditions.checkArgument(clazz == org.bukkit.Material.class, "Fluid namespace (%s) must have fluid type", clazz.getName());
|
||||
Preconditions.checkArgument(clazz == org.bukkit.Fluid.class, "Fluid namespace (%s) must have fluid type", clazz.getName());
|
||||
IRegistry<FluidType> fluidTags = BuiltInRegistries.FLUID;
|
||||
return fluidTags.getTags().map(pair -> (org.bukkit.Tag<T>) new CraftFluidTag(fluidTags, pair.key())).collect(ImmutableList.toImmutableList());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user