diff --git a/patches/server/0043-Optimize-Minecart-collisions.patch b/patches/server/0043-Optimize-Minecart-collisions.patch index d89644f96..5ee5ce9b6 100644 --- a/patches/server/0043-Optimize-Minecart-collisions.patch +++ b/patches/server/0043-Optimize-Minecart-collisions.patch @@ -8,6 +8,24 @@ Co-authored-by: MrHua269 Skip tick collisions to to prevent lag causing by massive stacked Minecart Useful for anarchy server. +diff --git a/src/main/java/net/minecraft/world/entity/EntitySelector.java b/src/main/java/net/minecraft/world/entity/EntitySelector.java +index f1b9e83206cc67e6ef29ebe088351b0aaa5eb349..e0a51e269aa076def275710174d3654d07e1a7aa 100644 +--- a/src/main/java/net/minecraft/world/entity/EntitySelector.java ++++ b/src/main/java/net/minecraft/world/entity/EntitySelector.java +@@ -63,6 +63,13 @@ public final class EntitySelector { + } + public static Predicate pushable(Entity entity, boolean ignoreClimbing) { + // Paper end - Climbing should not bypass cramming gamerule ++ ++ // Leaf start - Optimize Minecart collisions ++ if (entity instanceof net.minecraft.world.entity.vehicle.AbstractMinecart) { ++ return x -> true; ++ } ++ // Leaf end - Optimize Minecart collisions ++ + PlayerTeam scoreboardteam = entity.getTeam(); + Team.CollisionRule scoreboardteambase_enumteampush = scoreboardteam == null ? Team.CollisionRule.ALWAYS : scoreboardteam.getCollisionRule(); + diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java index e7a1ce585c9e552e6f9ce9acd26fdfe5c43e0b5d..f9ae853fa762f103cfc6d7ad6f975ce099e348a3 100644 --- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java