2021-11-06 01:06:19 +01:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
|
|
|
Date: Sun, 24 Oct 2021 20:29:45 -0700
|
|
|
|
Subject: [PATCH] Fix issues with mob conversion
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/monster/Skeleton.java b/src/main/java/net/minecraft/world/entity/monster/Skeleton.java
|
2024-06-14 02:08:12 +02:00
|
|
|
index 44313973318cc330bb0288ec5b857c61d4c8f9be..cee42ae2b75c29c89e7fc5b1c77d3b45ce40e9ba 100644
|
2021-11-06 01:06:19 +01:00
|
|
|
--- a/src/main/java/net/minecraft/world/entity/monster/Skeleton.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/entity/monster/Skeleton.java
|
2024-06-14 02:08:12 +02:00
|
|
|
@@ -91,10 +91,15 @@ public class Skeleton extends AbstractSkeleton {
|
2021-11-06 01:06:19 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
protected void doFreezeConversion() {
|
|
|
|
- this.convertTo(EntityType.STRAY, true, org.bukkit.event.entity.EntityTransformEvent.TransformReason.FROZEN, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.FROZEN); // CraftBukkit - add spawn and transform reasons
|
2024-01-19 12:30:04 +01:00
|
|
|
+ Stray stray = this.convertTo(EntityType.STRAY, true, org.bukkit.event.entity.EntityTransformEvent.TransformReason.FROZEN, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.FROZEN); // CraftBukkit - add spawn and transform reasons // Paper - Fix issues with mob conversion
|
2023-06-08 04:12:38 +02:00
|
|
|
if (!this.isSilent()) {
|
|
|
|
this.level().levelEvent((Player) null, 1048, this.blockPosition(), 0);
|
2021-11-06 01:06:19 +01:00
|
|
|
}
|
2024-01-19 12:30:04 +01:00
|
|
|
+ // Paper start - Fix issues with mob conversion; reset conversion time to prevent event spam
|
2021-11-06 01:06:19 +01:00
|
|
|
+ if (stray == null) {
|
|
|
|
+ this.conversionTime = 300;
|
|
|
|
+ }
|
2024-01-19 12:30:04 +01:00
|
|
|
+ // Paper end - Fix issues with mob conversion
|
2021-11-06 01:06:19 +01:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2022-12-22 23:39:07 +01:00
|
|
|
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
|
2024-06-14 02:08:12 +02:00
|
|
|
index d35214c485dfc3abdb3f2d6683c9293b3b5f035d..d5e0c493f4c348724958193795ceb987765a465f 100644
|
2022-12-22 23:39:07 +01:00
|
|
|
--- a/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java
|
2024-04-24 17:27:28 +02:00
|
|
|
@@ -258,6 +258,11 @@ public class Hoglin extends Animal implements Enemy, HoglinBase {
|
2022-12-22 23:39:07 +01:00
|
|
|
if (zoglin != null) {
|
|
|
|
zoglin.addEffect(new MobEffectInstance(MobEffects.CONFUSION, 200, 0));
|
|
|
|
}
|
2024-01-19 12:30:04 +01:00
|
|
|
+ // Paper start - Fix issues with mob conversion; reset to prevent event spam
|
2022-12-22 23:39:07 +01:00
|
|
|
+ else {
|
|
|
|
+ this.timeInOverworld = 0;
|
|
|
|
+ }
|
2024-01-19 12:30:04 +01:00
|
|
|
+ // Paper end - Fix issues with mob conversion
|
2022-12-22 23:39:07 +01:00
|
|
|
}
|
|
|
|
|
2024-04-12 21:14:06 +02:00
|
|
|
@Override
|
2021-11-06 01:06:19 +01:00
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/AbstractPiglin.java b/src/main/java/net/minecraft/world/entity/monster/piglin/AbstractPiglin.java
|
2024-04-24 17:27:28 +02:00
|
|
|
index 4e4cfbcaa5c236969da288b9d6f9cd7773bf4687..dedbf88e03d5840fa9f5c5198033379701a9a29e 100644
|
2021-11-06 01:06:19 +01:00
|
|
|
--- a/src/main/java/net/minecraft/world/entity/monster/piglin/AbstractPiglin.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/entity/monster/piglin/AbstractPiglin.java
|
2024-04-24 17:27:28 +02:00
|
|
|
@@ -99,6 +99,11 @@ public abstract class AbstractPiglin extends Monster {
|
2021-11-06 01:06:19 +01:00
|
|
|
if (entitypigzombie != null) {
|
|
|
|
entitypigzombie.addEffect(new MobEffectInstance(MobEffects.CONFUSION, 200, 0));
|
|
|
|
}
|
2024-01-19 12:30:04 +01:00
|
|
|
+ // Paper start - Fix issues with mob conversion; reset to prevent event spam
|
2021-11-06 01:06:19 +01:00
|
|
|
+ else {
|
|
|
|
+ this.timeInOverworld = 0;
|
|
|
|
+ }
|
2024-01-19 12:30:04 +01:00
|
|
|
+ // Paper end - Fix issues with mob conversion
|
2021-11-06 01:06:19 +01:00
|
|
|
|
|
|
|
}
|
|
|
|
|