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
|
|
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
|
|
--- a/src/main/java/net/minecraft/world/entity/monster/Skeleton.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/entity/monster/Skeleton.java
|
|
|
|
@@ -0,0 +0,0 @@ public class Skeleton extends AbstractSkeleton {
|
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
|
+ 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 - track result of 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
|
|
|
}
|
|
|
|
+ // Paper start - reset conversion time to prevent event spam
|
|
|
|
+ if (stray == null) {
|
|
|
|
+ this.conversionTime = 300;
|
|
|
|
+ }
|
|
|
|
+ // Paper end
|
|
|
|
|
|
|
|
}
|
|
|
|
|
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
|
|
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 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
|
|
|
|
@@ -0,0 +0,0 @@ public class Hoglin extends Animal implements Enemy, HoglinBase {
|
|
|
|
if (zoglin != null) {
|
|
|
|
zoglin.addEffect(new MobEffectInstance(MobEffects.CONFUSION, 200, 0));
|
|
|
|
}
|
|
|
|
+ // Paper start - reset to prevent event spam
|
|
|
|
+ else {
|
|
|
|
+ this.timeInOverworld = 0;
|
|
|
|
+ }
|
|
|
|
+ // Paper end
|
|
|
|
|
|
|
|
}
|
|
|
|
|
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
|
|
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
|
|
--- a/src/main/java/net/minecraft/world/entity/monster/piglin/AbstractPiglin.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/entity/monster/piglin/AbstractPiglin.java
|
|
|
|
@@ -0,0 +0,0 @@ public abstract class AbstractPiglin extends Monster {
|
|
|
|
if (entitypigzombie != null) {
|
|
|
|
entitypigzombie.addEffect(new MobEffectInstance(MobEffects.CONFUSION, 200, 0));
|
|
|
|
}
|
|
|
|
+ // Paper start - reset to prevent event spam
|
|
|
|
+ else {
|
|
|
|
+ this.timeInOverworld = 0;
|
|
|
|
+ }
|
|
|
|
+ // Paper end
|
|
|
|
|
|
|
|
}
|
|
|
|
|