aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0583-Fix-issues-with-mob-conversion.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0583-Fix-issues-with-mob-conversion.patch')
-rw-r--r--patches/server/0583-Fix-issues-with-mob-conversion.patch12
1 files changed, 6 insertions, 6 deletions
diff --git a/patches/server/0583-Fix-issues-with-mob-conversion.patch b/patches/server/0583-Fix-issues-with-mob-conversion.patch
index 281a6e42c5..c286b73b30 100644
--- a/patches/server/0583-Fix-issues-with-mob-conversion.patch
+++ b/patches/server/0583-Fix-issues-with-mob-conversion.patch
@@ -31,17 +31,17 @@ index 6f6454bcec7e0d1cefbf818fc2fc6eb90adeec83..3972e2ed0554e2550519e994888e068d
@Override
diff --git a/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java b/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java
-index d51acb788803048c0eacd762a2fd311115ac0970..6ea90e54759dbeab025e0a1896ee834ea9986427 100644
+index 34fff71edbdcefe87985f31cbf1ef282435ace06..92270912ef26924f611a1df7cb3d5b485b0a262d 100644
--- a/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java
+++ b/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java
-@@ -260,9 +260,15 @@ public class Hoglin extends Animal implements Enemy, HoglinBase {
+@@ -241,9 +241,15 @@ public class Hoglin extends Animal implements Enemy, HoglinBase {
}
private void finishConversion() {
-- this.convertTo(
-+ net.minecraft.world.entity.Entity converted = this.convertTo( // Paper - Fix issues with mob conversion; reset to prevent event spam
- EntityType.ZOGLIN, ConversionParams.single(this, true, false), zoglin -> zoglin.addEffect(new MobEffectInstance(MobEffects.CONFUSION, 200, 0))
- );
+- this.convertTo(EntityType.ZOGLIN, ConversionParams.single(this, true, false), (entityzoglin) -> {
++ net.minecraft.world.entity.Entity converted = this.convertTo(EntityType.ZOGLIN, ConversionParams.single(this, true, false), (entityzoglin) -> {
+ entityzoglin.addEffect(new MobEffectInstance(MobEffects.CONFUSION, 200, 0));
+ }, org.bukkit.event.entity.EntityTransformEvent.TransformReason.PIGLIN_ZOMBIFIED, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.PIGLIN_ZOMBIFIED); // CraftBukkit - add spawn and transform reasons
+
+ // Paper start - Fix issues with mob conversion; reset to prevent event spam
+ if (converted == null) {