aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/EntitySelector.java.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/EntitySelector.java.patch')
-rw-r--r--patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/EntitySelector.java.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/EntitySelector.java.patch b/patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/EntitySelector.java.patch
new file mode 100644
index 0000000000..e03a629440
--- /dev/null
+++ b/patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/EntitySelector.java.patch
@@ -0,0 +1,48 @@
+--- a/net/minecraft/world/entity/EntitySelector.java
++++ b/net/minecraft/world/entity/EntitySelector.java
+@@ -27,27 +40,24 @@
+ }
+
+ public static Predicate<Entity> pushableBy(Entity entity) {
+- Team team = entity.getTeam();
+- Team.CollisionRule collisionRule = team == null ? Team.CollisionRule.ALWAYS : team.getCollisionRule();
+- return (Predicate<Entity>)(collisionRule == Team.CollisionRule.NEVER
+- ? Predicates.alwaysFalse()
+- : NO_SPECTATORS.and(
+- pushedEntity -> {
+- if (!pushedEntity.isPushable()) {
+- return false;
+- } else if (!entity.level().isClientSide || pushedEntity instanceof Player && ((Player)pushedEntity).isLocalPlayer()) {
+- Team team1 = pushedEntity.getTeam();
+- Team.CollisionRule collisionRule1 = team1 == null ? Team.CollisionRule.ALWAYS : team1.getCollisionRule();
+- if (collisionRule1 == Team.CollisionRule.NEVER) {
+- return false;
+- } else {
+- boolean flag = team != null && team.isAlliedTo(team1);
+- return (collisionRule != Team.CollisionRule.PUSH_OWN_TEAM && collisionRule1 != Team.CollisionRule.PUSH_OWN_TEAM || !flag)
+- && (collisionRule != Team.CollisionRule.PUSH_OTHER_TEAMS && collisionRule1 != Team.CollisionRule.PUSH_OTHER_TEAMS || flag);
+- }
+- } else {
+- return false;
+- }
++ PlayerTeam scoreboardteam = entity.getTeam();
++ Team.CollisionRule scoreboardteambase_enumteampush = scoreboardteam == null ? Team.CollisionRule.ALWAYS : scoreboardteam.getCollisionRule();
++
++ 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())) {
++ return false;
++ } else {
++ PlayerTeam scoreboardteam1 = entity1.getTeam();
++ Team.CollisionRule scoreboardteambase_enumteampush1 = scoreboardteam1 == null ? Team.CollisionRule.ALWAYS : scoreboardteam1.getCollisionRule();
++
++ if (scoreboardteambase_enumteampush1 == Team.CollisionRule.NEVER) {
++ return false;
++ } else {
++ boolean flag = scoreboardteam != null && scoreboardteam.isAlliedTo(scoreboardteam1);
++
++ return (scoreboardteambase_enumteampush == Team.CollisionRule.PUSH_OWN_TEAM || scoreboardteambase_enumteampush1 == Team.CollisionRule.PUSH_OWN_TEAM) && flag ? false : scoreboardteambase_enumteampush != Team.CollisionRule.PUSH_OTHER_TEAMS && scoreboardteambase_enumteampush1 != Team.CollisionRule.PUSH_OTHER_TEAMS || flag;
+ }
+ ));
+ }