mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-27 10:59:16 +00:00
Originally vanilla logic is to use stream, and Mojang switched it to Guava's Collections2 since 1.21.4. It is much faster than using stream or manually adding to a new ArrayList. Manually adding to a new ArrayList requires allocating a new object array. However, the Collections2 lazy handles filter condition on iteration, so much better.
24 lines
1.3 KiB
Diff
24 lines
1.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: HaHaWTH <102713261+HaHaWTH@users.noreply.github.com>
|
|
Date: Sun, 7 Jul 2024 01:29:57 +0800
|
|
Subject: [PATCH] Fix MC-200418
|
|
|
|
Related MC issue: https://bugs.mojang.com/browse/MC/issues/MC-200418
|
|
|
|
diff --git a/net/minecraft/world/entity/monster/ZombieVillager.java b/net/minecraft/world/entity/monster/ZombieVillager.java
|
|
index 18966860f550ad1f35ec6a03a0b78af73628b964..22c1545a0329d56e0ec41ae4da1e1922aa1f9737 100644
|
|
--- a/net/minecraft/world/entity/monster/ZombieVillager.java
|
|
+++ b/net/minecraft/world/entity/monster/ZombieVillager.java
|
|
@@ -293,6 +293,11 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder {
|
|
if (!this.isSilent()) {
|
|
level.levelEvent(null, 1027, this.blockPosition(), 0);
|
|
}
|
|
+ // Leaf start - Fix MC-200418
|
|
+ if (mob.isPassenger() && mob.getVehicle() instanceof net.minecraft.world.entity.animal.Chicken && mob.isBaby()) {
|
|
+ mob.removeVehicle();
|
|
+ }
|
|
+ // Leaf end - Fix MC-200418
|
|
// CraftBukkit start
|
|
}, org.bukkit.event.entity.EntityTransformEvent.TransformReason.CURED, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.CURED // CraftBukkit
|
|
);
|