diff options
Diffstat (limited to 'patches/server/0271-Add-more-Witch-API.patch')
-rw-r--r-- | patches/server/0271-Add-more-Witch-API.patch | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/patches/server/0271-Add-more-Witch-API.patch b/patches/server/0271-Add-more-Witch-API.patch index 3e1ba61773..4610626cbb 100644 --- a/patches/server/0271-Add-more-Witch-API.patch +++ b/patches/server/0271-Add-more-Witch-API.patch @@ -60,12 +60,12 @@ index df024c3108df807772fc487f5c59004a59938bf2..701f6bf1d558cf0ec4bc1abb9e1f66d9 public SoundEvent getCelebrateSound() { return SoundEvents.WITCH_CELEBRATE; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftWitch.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftWitch.java -index eada1f0ff10d4c00f82a6f4411fe18b7184e9901..9039db1a72009342063d4db08e18e6aee18836e8 100644 +index 5024a102fe71d7013bc809bb4140763bd4c466e7..e25f49700e794a40a8d7931eb535a5303bda031d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftWitch.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftWitch.java -@@ -3,6 +3,13 @@ package org.bukkit.craftbukkit.entity; +@@ -2,6 +2,13 @@ package org.bukkit.craftbukkit.entity; + import org.bukkit.craftbukkit.CraftServer; - import org.bukkit.entity.EntityType; import org.bukkit.entity.Witch; +// Paper start +import com.destroystokyo.paper.entity.CraftRangedEntity; @@ -77,7 +77,7 @@ index eada1f0ff10d4c00f82a6f4411fe18b7184e9901..9039db1a72009342063d4db08e18e6ae public class CraftWitch extends CraftRaider implements Witch, com.destroystokyo.paper.entity.CraftRangedEntity<net.minecraft.world.entity.monster.Witch> { // Paper public CraftWitch(CraftServer server, net.minecraft.world.entity.monster.Witch entity) { -@@ -28,4 +35,23 @@ public class CraftWitch extends CraftRaider implements Witch, com.destroystokyo. +@@ -22,4 +29,23 @@ public class CraftWitch extends CraftRaider implements Witch, com.destroystokyo. public boolean isDrinkingPotion() { return this.getHandle().isDrinkingPotion(); } @@ -96,7 +96,7 @@ index eada1f0ff10d4c00f82a6f4411fe18b7184e9901..9039db1a72009342063d4db08e18e6ae + } + + public void setDrinkingPotion(ItemStack potion) { -+ Preconditions.checkArgument(potion == null || potion.getType().isEmpty() || potion.getType() == Material.POTION, "must be potion, air, or null"); ++ Preconditions.checkArgument(potion == null || potion.getType() == org.bukkit.inventory.ItemType.AIR || potion.getType() == org.bukkit.inventory.ItemType.POTION, "must be potion, air, or null"); + getHandle().setDrinkingPotion(CraftItemStack.asNMSCopy(potion)); + } + // Paper end |