diff options
Diffstat (limited to 'patches/server/0587-Missing-Entity-API.patch')
-rw-r--r-- | patches/server/0587-Missing-Entity-API.patch | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/patches/server/0587-Missing-Entity-API.patch b/patches/server/0587-Missing-Entity-API.patch index 520f0899c0..1d25ac6396 100644 --- a/patches/server/0587-Missing-Entity-API.patch +++ b/patches/server/0587-Missing-Entity-API.patch @@ -848,54 +848,6 @@ index fc83dde12957e575a4f1d4bee73c320bab95606f..ae430c36ed433e337dd92f197f1717fb + } + // Paper end } -diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java -index cc69f471c623c65251ccf7015499d8dbdb70ffad..a41a85ad89a177759c97d661a89b8b5dc419db1b 100644 ---- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java -+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java -@@ -89,6 +89,43 @@ public class CraftMushroomCow extends CraftCow implements MushroomCow { - this.getHandle().setVariant(net.minecraft.world.entity.animal.MushroomCow.MushroomType.values()[variant.ordinal()]); - } - -+ // Paper start -+ @Override -+ public java.util.List<io.papermc.paper.potion.SuspiciousEffectEntry> getStewEffects() { -+ if (this.getHandle().stewEffects == null) { -+ return java.util.List.of(); -+ } -+ -+ java.util.List<io.papermc.paper.potion.SuspiciousEffectEntry> nmsPairs = new java.util.ArrayList<>(this.getHandle().stewEffects.size()); -+ for (final net.minecraft.world.level.block.SuspiciousEffectHolder.EffectEntry effect : this.getHandle().stewEffects) { -+ nmsPairs.add(io.papermc.paper.potion.SuspiciousEffectEntry.create( -+ org.bukkit.craftbukkit.potion.CraftPotionEffectType.minecraftToBukkit(effect.effect()), -+ effect.duration() -+ )); -+ } -+ -+ return java.util.Collections.unmodifiableList(nmsPairs); -+ } -+ -+ @Override -+ public void setStewEffects(final java.util.List<io.papermc.paper.potion.SuspiciousEffectEntry> effects) { -+ if (effects.isEmpty()) { -+ this.getHandle().stewEffects = null; -+ return; -+ } -+ -+ java.util.List<net.minecraft.world.level.block.SuspiciousEffectHolder.EffectEntry> nmsPairs = new java.util.ArrayList<>(effects.size()); -+ for (final io.papermc.paper.potion.SuspiciousEffectEntry effect : effects) { -+ nmsPairs.add(new net.minecraft.world.level.block.SuspiciousEffectHolder.EffectEntry( -+ org.bukkit.craftbukkit.potion.CraftPotionEffectType.bukkitToMinecraft(effect.effect()), -+ effect.duration() -+ )); -+ } -+ -+ this.getHandle().stewEffects = nmsPairs; -+ } -+ // Paper end -+ - @Override - public String toString() { - return "CraftMushroomCow"; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPanda.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPanda.java index 5467e4a74b70ff57b49d9e6bc686c493178f8511..01d104d91de9e1319d27e39d3f474318c7809486 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPanda.java |