From 9524c006d744d3f8c0428d4b3016bb489592becd Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Sat, 14 Dec 2024 13:44:30 -0800 Subject: [PATCH] net.minecraft.world.entity.ai.village --- .../entity/ai/village/VillageSiege.java.patch | 16 ++++++++++++++++ .../entity/ai/village/VillageSiege.java.patch | 16 ---------------- 2 files changed, 16 insertions(+), 16 deletions(-) create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/ai/village/VillageSiege.java.patch delete mode 100644 paper-server/patches/unapplied/net/minecraft/world/entity/ai/village/VillageSiege.java.patch diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ai/village/VillageSiege.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/ai/village/VillageSiege.java.patch new file mode 100644 index 0000000000..983754df6f --- /dev/null +++ b/paper-server/patches/sources/net/minecraft/world/entity/ai/village/VillageSiege.java.patch @@ -0,0 +1,16 @@ +--- a/net/minecraft/world/entity/ai/village/VillageSiege.java ++++ b/net/minecraft/world/entity/ai/village/VillageSiege.java +@@ -101,11 +_,12 @@ + zombie.finalizeSpawn(level, level.getCurrentDifficultyAt(zombie.blockPosition()), EntitySpawnReason.EVENT, null); + } catch (Exception var5) { + LOGGER.warn("Failed to create zombie for village siege at {}", vec3, var5); ++ com.destroystokyo.paper.exception.ServerInternalException.reportInternalException(var5); // Paper - ServerExceptionEvent + return; + } + + zombie.moveTo(vec3.x, vec3.y, vec3.z, level.random.nextFloat() * 360.0F, 0.0F); +- level.addFreshEntityWithPassengers(zombie); ++ level.addFreshEntityWithPassengers(zombie, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.VILLAGE_INVASION); // CraftBukkit + } + } + diff --git a/paper-server/patches/unapplied/net/minecraft/world/entity/ai/village/VillageSiege.java.patch b/paper-server/patches/unapplied/net/minecraft/world/entity/ai/village/VillageSiege.java.patch deleted file mode 100644 index 4b4a523928..0000000000 --- a/paper-server/patches/unapplied/net/minecraft/world/entity/ai/village/VillageSiege.java.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- a/net/minecraft/world/entity/ai/village/VillageSiege.java -+++ b/net/minecraft/world/entity/ai/village/VillageSiege.java -@@ -117,11 +117,12 @@ - entityzombie.finalizeSpawn(world, world.getCurrentDifficultyAt(entityzombie.blockPosition()), EntitySpawnReason.EVENT, (SpawnGroupData) null); - } catch (Exception exception) { - VillageSiege.LOGGER.warn("Failed to create zombie for village siege at {}", vec3d, exception); -+ com.destroystokyo.paper.exception.ServerInternalException.reportInternalException(exception); // Paper - ServerExceptionEvent - return; - } - - entityzombie.moveTo(vec3d.x, vec3d.y, vec3d.z, world.random.nextFloat() * 360.0F, 0.0F); -- world.addFreshEntityWithPassengers(entityzombie); -+ world.addFreshEntityWithPassengers(entityzombie, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.VILLAGE_INVASION); // CraftBukkit - } - } -