mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-22 02:25:28 +01:00
Fix enable-player-collisions playing sounds when set to false (#11390)
This commit is contained in:
parent
951e7ddc44
commit
13a23951d7
@ -99,3 +99,16 @@ index 8a91a44e46a2d49e2f4b9e9970c2b77f2e87767e..98862db2334508ee1a783aeabfb14675
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
|
diff --git a/src/main/java/net/minecraft/world/entity/EntitySelector.java b/src/main/java/net/minecraft/world/entity/EntitySelector.java
|
||||||
|
index 3207166061bf9c4d7bf3f38e5a9f7aff23ccd5c1..f7014bf5faae03a04c31cbdaeb27188c47156c2d 100644
|
||||||
|
--- a/src/main/java/net/minecraft/world/entity/EntitySelector.java
|
||||||
|
+++ b/src/main/java/net/minecraft/world/entity/EntitySelector.java
|
||||||
|
@@ -51,7 +51,7 @@ public final class EntitySelector {
|
||||||
|
return (Predicate) (scoreboardteambase_enumteampush == Team.CollisionRule.NEVER ? Predicates.alwaysFalse() : EntitySelector.NO_SPECTATORS.and((entity1) -> {
|
||||||
|
if (!entity1.canCollideWithBukkit(entity) || !entity.canCollideWithBukkit(entity1)) { // CraftBukkit - collidable API
|
||||||
|
return false;
|
||||||
|
- } else if (entity.level().isClientSide && (!(entity1 instanceof Player) || !((Player) entity1).isLocalPlayer())) {
|
||||||
|
+ } else if (entity1 instanceof Player && entity instanceof Player && !io.papermc.paper.configuration.GlobalConfiguration.get().collisions.enablePlayerCollisions) { // Paper - Configurable player collision
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
PlayerTeam scoreboardteam1 = entity1.getTeam();
|
||||||
|
@ -22,7 +22,7 @@ index 6ab665efcac4c2543bab9d95472026e0ec8580c5..dae7643897b47dba304cbea56112445d
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/EntitySelector.java b/src/main/java/net/minecraft/world/entity/EntitySelector.java
|
diff --git a/src/main/java/net/minecraft/world/entity/EntitySelector.java b/src/main/java/net/minecraft/world/entity/EntitySelector.java
|
||||||
index ee4495b67c46cf1282cdd6ad15b224b0b7b10bfb..e382a29b441b656f35bc24cb90f95cb4def433d2 100644
|
index eb425fac573881f3aad09ae75a32184fb0e325a6..302decdccd37c5579473c8fc33adda3956be7603 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/EntitySelector.java
|
--- a/src/main/java/net/minecraft/world/entity/EntitySelector.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/EntitySelector.java
|
+++ b/src/main/java/net/minecraft/world/entity/EntitySelector.java
|
||||||
@@ -46,11 +46,16 @@ public final class EntitySelector {
|
@@ -46,11 +46,16 @@ public final class EntitySelector {
|
||||||
@ -41,7 +41,7 @@ index ee4495b67c46cf1282cdd6ad15b224b0b7b10bfb..e382a29b441b656f35bc24cb90f95cb4
|
|||||||
- if (!entity1.canCollideWithBukkit(entity) || !entity.canCollideWithBukkit(entity1)) { // CraftBukkit - collidable API
|
- if (!entity1.canCollideWithBukkit(entity) || !entity.canCollideWithBukkit(entity1)) { // CraftBukkit - collidable API
|
||||||
+ if (!entity1.isCollidable(ignoreClimbing) || !entity1.canCollideWithBukkit(entity) || !entity.canCollideWithBukkit(entity1)) { // CraftBukkit - collidable API // Paper - Climbing should not bypass cramming gamerule
|
+ if (!entity1.isCollidable(ignoreClimbing) || !entity1.canCollideWithBukkit(entity) || !entity.canCollideWithBukkit(entity1)) { // CraftBukkit - collidable API // Paper - Climbing should not bypass cramming gamerule
|
||||||
return false;
|
return false;
|
||||||
} else if (entity.level().isClientSide && (!(entity1 instanceof Player) || !((Player) entity1).isLocalPlayer())) {
|
} else if (entity1 instanceof Player && entity instanceof Player && !io.papermc.paper.configuration.GlobalConfiguration.get().collisions.enablePlayerCollisions) { // Paper - Configurable player collision
|
||||||
return false;
|
return false;
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
index c9ef71184cdf73ca275331a5b99902426c5df436..40b86b9b25135e55cc01e502dbc8cc22344efa5d 100644
|
index c9ef71184cdf73ca275331a5b99902426c5df436..40b86b9b25135e55cc01e502dbc8cc22344efa5d 100644
|
||||||
|
Loading…
Reference in New Issue
Block a user