From b341a1b5515cacca919c3422ff87ec4b9f2da0a5 Mon Sep 17 00:00:00 2001 From: Pugzy Date: Fri, 10 Nov 2023 17:37:26 +0000 Subject: [PATCH] Fix issues with non-interacting players --- .../0001-Fix-Decompilation-errors.patch | 19 +++++++++-- ...-issues-with-non-interacting-players.patch | 34 +++++++++++++++++++ scripts/importmcdev.sh | 1 + 3 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 patches/server/0223-Fix-issues-with-non-interacting-players.patch diff --git a/patches/server/0001-Fix-Decompilation-errors.patch b/patches/server/0001-Fix-Decompilation-errors.patch index 6334e55b9..513088df3 100644 --- a/patches/server/0001-Fix-Decompilation-errors.patch +++ b/patches/server/0001-Fix-Decompilation-errors.patch @@ -1,9 +1,24 @@ -From 97eb4c50bb22267d87f9e136ce1e6e85f1c27032 Mon Sep 17 00:00:00 2001 +From e49d3924fb3cdc1fff4749c20ce5ae4b7ba20506 Mon Sep 17 00:00:00 2001 From: cswhite2000 <18whitechristop@gmail.com> 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 @@ -61,5 +76,5 @@ index 90606f50b..4b8eb3eed 100644 - } } -- -2.18.0 +2.28.0.windows.1 diff --git a/patches/server/0223-Fix-issues-with-non-interacting-players.patch b/patches/server/0223-Fix-issues-with-non-interacting-players.patch new file mode 100644 index 000000000..bf4007555 --- /dev/null +++ b/patches/server/0223-Fix-issues-with-non-interacting-players.patch @@ -0,0 +1,34 @@ +From 9d852f70d935108fa73a21a51904fe159ebc1f93 Mon Sep 17 00:00:00 2001 +From: Pugzy +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 + diff --git a/scripts/importmcdev.sh b/scripts/importmcdev.sh index 84721390d..5a58a0760 100755 --- a/scripts/importmcdev.sh +++ b/scripts/importmcdev.sh @@ -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