Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issues with non-interacting players #138

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions patches/server/0001-Fix-Decompilation-errors.patch
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
From 97eb4c50bb22267d87f9e136ce1e6e85f1c27032 Mon Sep 17 00:00:00 2001
From e49d3924fb3cdc1fff4749c20ce5ae4b7ba20506 Mon Sep 17 00:00:00 2001
From: cswhite2000 <[email protected]>
Date: Mon, 6 Aug 2018 16:39:57 -0700
Subject: [PATCH] Fix Decompilation errors


diff --git a/src/main/java/net/minecraft/server/IEntitySelector.java b/src/main/java/net/minecraft/server/IEntitySelector.java
index 81c45a95a..c27709e1f 100644
--- a/src/main/java/net/minecraft/server/IEntitySelector.java
+++ b/src/main/java/net/minecraft/server/IEntitySelector.java
@@ -61,8 +61,8 @@ public final class IEntitySelector {
}
}

- public boolean apply(Object object) {
- return this.a((Entity) object);
+ public boolean apply(Entity entity) {
+ return this.a(entity);
}
}
}
diff --git a/src/main/java/net/minecraft/server/PacketPlayInUseEntity.java b/src/main/java/net/minecraft/server/PacketPlayInUseEntity.java
index f55bedaff..a8fc3361a 100644
--- a/src/main/java/net/minecraft/server/PacketPlayInUseEntity.java
Expand Down Expand Up @@ -61,5 +76,5 @@ index 90606f50b..4b8eb3eed 100644
- }
}
--
2.18.0
2.28.0.windows.1

34 changes: 34 additions & 0 deletions patches/server/0223-Fix-issues-with-non-interacting-players.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
From 9d852f70d935108fa73a21a51904fe159ebc1f93 Mon Sep 17 00:00:00 2001
From: Pugzy <[email protected]>
Date: Fri, 29 Sep 2023 17:35:55 +0100
Subject: [PATCH] Fix issues with non-interacting players


diff --git a/src/main/java/net/minecraft/server/IEntitySelector.java b/src/main/java/net/minecraft/server/IEntitySelector.java
index c27709e1f..fb5bb04be 100644
--- a/src/main/java/net/minecraft/server/IEntitySelector.java
+++ b/src/main/java/net/minecraft/server/IEntitySelector.java
@@ -50,7 +50,7 @@ public final class IEntitySelector {
}

public boolean a(Entity entity) {
- if (!entity.isAlive()) {
+ if (!entity.ad()) { // SportPaper - exempt non-interacting players
return false;
} else if (!(entity instanceof EntityLiving)) {
return false;
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 3e5332f9e..394b35b14 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1289,6 +1289,7 @@ public abstract class World implements IBlockAccess {

for (int j2 = 0; j2 < list.size(); ++j2) {
if (entity.passenger != list && entity.vehicle != list) {
+ if (!((Entity) list.get(j2)).ad()) continue; // SportPaper - Fix boat placing collision
AxisAlignedBB axisalignedbb1 = ((Entity) list.get(j2)).S();

if (axisalignedbb1 != null && axisalignedbb1.b(axisalignedbb)) {
--
2.28.0.windows.1

1 change: 1 addition & 0 deletions scripts/importmcdev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ import MerchantRecipeList
import DamageSource
import ServerNBTManager
import IChunkLoader
import IEntitySelector

cd "$basedir/base/Paper/PaperSpigot-Server/"
rm -rf nms-patches applyPatches.sh makePatches.sh >/dev/null 2>&1
Expand Down