Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 12:30:06 +01:00
275173e538
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 0c5d8709 SPIGOT-7400: Downgrade maven-resolver due to issues resolving certain depends 255c4fdb SPIGOT-7380: Add PlayerInteractEvent#getClickedPosition and ChiseledBookshelf#getSlot CraftBukkit Changes: b6b514b7e SPIGOT-7400: Downgrade maven-resolver due to issues resolving certain depends fcff84de9 SPIGOT-7399: Revert null check in CraftMetaItem#safelyAdd 44a4b5649 SPIGOT-7380: Add PlayerInteractEvent#getClickedPosition and ChiseledBookshelf#getSlot 676969d01 SPIGOT-7389: Handle setting null items in ChiseledBookshelf Inventory
60 Zeilen
3.0 KiB
Diff
60 Zeilen
3.0 KiB
Diff
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 e88af2dcc0f7fc5190654e2640f67d706e6c8c81..8b818a7cb835512c4bd2ea9641d4bfd904150332 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/monster/Skeleton.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/monster/Skeleton.java
|
|
@@ -90,10 +90,15 @@ 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
|
|
if (!this.isSilent()) {
|
|
this.level().levelEvent((Player) null, 1048, this.blockPosition(), 0);
|
|
}
|
|
+ // Paper start - reset conversion time to prevent event spam
|
|
+ if (stray == null) {
|
|
+ this.conversionTime = 300;
|
|
+ }
|
|
+ // Paper end
|
|
|
|
}
|
|
|
|
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 98c41e87b644f79ebfd45af2e0d7b887a3f5d00b..e8f6c34ea789136d63c0aa88aec90203ef6282b5 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
|
|
@@ -239,6 +239,11 @@ 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
|
|
|
|
}
|
|
|
|
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 e7282012420da3be738ad47c2b15d7455bc2503f..ed7c5c38502781325610e4d97407024e143bb7b0 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
|
|
@@ -113,6 +113,11 @@ 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
|
|
|
|
}
|
|
|