23 lines
1.3 KiB
Diff
23 lines
1.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: etil2jz <81570777+etil2jz@users.noreply.github.com>
|
|
Date: Sat, 19 Mar 2022 16:27:30 +0100
|
|
Subject: [PATCH] PaperPR Add more collision code skipping logic
|
|
|
|
Taken from https://github.com/PaperMC/Paper/pull/7581
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
index d6f7fd9dc4804e7565c89a9cbb0948f256559f03..24484d985929c7860aa08dbfca6df113086d2ed0 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
@@ -3470,6 +3470,10 @@ public abstract class LivingEntity extends Entity {
|
|
|
|
protected void pushEntities() {
|
|
// Paper start - don't run getEntities if we're not going to use its result
|
|
+ if (!isCollidable(level.paperConfig().collisions.fixClimbingBypassingCrammingRule)) return;
|
|
+ net.minecraft.world.scores.Team team = getTeam();
|
|
+ if (team != null && team.getCollisionRule() == net.minecraft.world.scores.Team.CollisionRule.NEVER) return;
|
|
+
|
|
int i = this.level.getGameRules().getInt(GameRules.RULE_MAX_ENTITY_CRAMMING);
|
|
if (i <= 0 && level.paperConfig().collisions.maxEntityCollisions <= 0) {
|
|
return;
|