Skip to content

Commit 757b8d5

Browse files
committed
apply minecraft server file patches
1 parent e6561c9 commit 757b8d5

File tree

251 files changed

+1060
-2988
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

251 files changed

+1060
-2988
lines changed

purpur-server/minecraft-patches/unapplied-sources/io/papermc/paper/entity/activation/ActivationRange.java.patch renamed to purpur-server/minecraft-patches/sources/io/papermc/paper/entity/activation/ActivationRange.java.patch

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
1-
From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001
2-
From: File <[email protected]>
3-
Date: Sun, 20 Apr 1997 05:37:42 -0800
4-
Subject: [PATCH] purpur File Patches
5-
6-
7-
diff --git a/io/papermc/paper/entity/activation/ActivationRange.java b/io/papermc/paper/entity/activation/ActivationRange.java
8-
index ae2bb9a73106febfe5f0d090abd4252bbb5fd27e..ca21597263cb430e2a5ae07e8cecfb0d53a270d2 100644
91
--- a/io/papermc/paper/entity/activation/ActivationRange.java
102
+++ b/io/papermc/paper/entity/activation/ActivationRange.java
11-
@@ -147,6 +147,8 @@ public final class ActivationRange {
3+
@@ -147,6 +_,8 @@
124
continue;
135
}
146

@@ -17,7 +9,7 @@ index ae2bb9a73106febfe5f0d090abd4252bbb5fd27e..ca21597263cb430e2a5ae07e8cecfb0d
179
final int worldHeight = world.getHeight();
1810
ActivationRange.maxBB = player.getBoundingBox().inflate(maxRange, worldHeight, maxRange);
1911
ActivationType.MISC.boundingBox = player.getBoundingBox().inflate(miscActivationRange, worldHeight, miscActivationRange);
20-
@@ -288,6 +290,7 @@ public final class ActivationRange {
12+
@@ -288,6 +_,7 @@
2113
* @return
2214
*/
2315
public static boolean checkIfActive(final Entity entity) {

purpur-server/minecraft-patches/unapplied-sources/net/minecraft/CrashReport.java.patch renamed to purpur-server/minecraft-patches/sources/net/minecraft/CrashReport.java.patch

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,23 @@
1-
From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001
2-
From: File <[email protected]>
3-
Date: Sun, 20 Apr 1997 05:37:42 -0800
4-
Subject: [PATCH] purpur File Patches
5-
6-
7-
diff --git a/net/minecraft/CrashReport.java b/net/minecraft/CrashReport.java
8-
index 3e0e88afcf010d9a3d46e48bca5cbdf98fe97544..394443d00e661715439be1e56dddc129947699a4 100644
91
--- a/net/minecraft/CrashReport.java
102
+++ b/net/minecraft/CrashReport.java
11-
@@ -30,6 +30,7 @@ public class CrashReport {
3+
@@ -30,6 +_,7 @@
124
private boolean trackingStackTrace = true;
135
private StackTraceElement[] uncategorizedStackTrace = new StackTraceElement[0];
146
private final SystemReport systemReport = new SystemReport();
157
+ private List<String> extraInfo = List.of("", "DO NOT REPORT THIS TO PAPER! REPORT TO PURPUR INSTEAD!", ""); // Purpur - Rebrand
168

179
public CrashReport(String title, Throwable exception) {
1810
io.papermc.paper.util.StacktraceDeobfuscator.INSTANCE.deobfuscateThrowable(exception); // Paper
19-
@@ -130,7 +131,7 @@ public class CrashReport {
11+
@@ -130,7 +_,7 @@
2012
}
2113

2214
public String getFriendlyReport(ReportType type) {
2315
- return this.getFriendlyReport(type, List.of());
2416
+ return this.getFriendlyReport(type, extraInfo); // Purpur - Rebrand
2517
}
2618

27-
@Nullable
28-
@@ -161,7 +162,7 @@ public class CrashReport {
19+
public @Nullable Path getSaveFile() {
20+
@@ -160,7 +_,7 @@
2921
}
3022

3123
public boolean saveToFile(Path path, ReportType type) {

purpur-server/minecraft-patches/unapplied-sources/net/minecraft/commands/CommandSourceStack.java.patch renamed to purpur-server/minecraft-patches/sources/net/minecraft/commands/CommandSourceStack.java.patch

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
1-
From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001
2-
From: File <[email protected]>
3-
Date: Sun, 20 Apr 1997 05:37:42 -0800
4-
Subject: [PATCH] purpur File Patches
5-
6-
7-
diff --git a/net/minecraft/commands/CommandSourceStack.java b/net/minecraft/commands/CommandSourceStack.java
8-
index be42e2bd05a7468911698e53a33d87abf4a1080b..d3d967cd922a6e5129546cad9d8fa5565960f6a5 100644
91
--- a/net/minecraft/commands/CommandSourceStack.java
102
+++ b/net/minecraft/commands/CommandSourceStack.java
11-
@@ -447,6 +447,19 @@ public class CommandSourceStack implements ExecutionCommandSource<CommandSourceS
3+
@@ -430,6 +_,19 @@
124
}
135
// CraftBukkit end
146

@@ -28,10 +20,11 @@ index be42e2bd05a7468911698e53a33d87abf4a1080b..d3d967cd922a6e5129546cad9d8fa556
2820
public Vec3 getPosition() {
2921
return this.worldPosition;
3022
}
31-
@@ -532,6 +545,30 @@ public class CommandSourceStack implements ExecutionCommandSource<CommandSourceS
23+
@@ -512,6 +_,30 @@
24+
}
3225
}
3326
}
34-
27+
+
3528
+ // Purpur start - Purpur config files
3629
+ public void sendSuccess(@Nullable String message) {
3730
+ sendSuccess(message, false);
@@ -55,7 +48,6 @@ index be42e2bd05a7468911698e53a33d87abf4a1080b..d3d967cd922a6e5129546cad9d8fa556
5548
+ sendSuccess(() -> io.papermc.paper.adventure.PaperAdventure.asVanilla(message), broadcastToOps);
5649
+ }
5750
+ // Purpur end - Purpur config files
58-
+
51+
5952
public void sendSuccess(Supplier<Component> messageSupplier, boolean allowLogging) {
6053
boolean flag = this.source.acceptsSuccess() && !this.silent;
61-
boolean flag1 = allowLogging && this.source.shouldInformAdmins() && !this.silent;

purpur-server/minecraft-patches/unapplied-sources/net/minecraft/commands/Commands.java.patch renamed to purpur-server/minecraft-patches/sources/net/minecraft/commands/Commands.java.patch

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
1-
From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001
2-
From: File <[email protected]>
3-
Date: Sun, 20 Apr 1997 05:37:42 -0800
4-
Subject: [PATCH] purpur File Patches
5-
6-
7-
diff --git a/net/minecraft/commands/Commands.java b/net/minecraft/commands/Commands.java
8-
index 83f05b042630891d43cfb567e98666831df80f6e..9aa09e11032f539952edeeed119f7705c330db0a 100644
91
--- a/net/minecraft/commands/Commands.java
102
+++ b/net/minecraft/commands/Commands.java
11-
@@ -255,11 +255,11 @@ public class Commands {
3+
@@ -265,11 +_,11 @@
124
JfrCommand.register(this.dispatcher);
135
}
146

@@ -22,7 +14,7 @@ index 83f05b042630891d43cfb567e98666831df80f6e..9aa09e11032f539952edeeed119f7705
2214
RaidCommand.register(this.dispatcher, context);
2315
DebugPathCommand.register(this.dispatcher);
2416
DebugMobSpawningCommand.register(this.dispatcher);
25-
@@ -287,6 +287,14 @@ public class Commands {
17+
@@ -297,6 +_,14 @@
2618
StopCommand.register(this.dispatcher);
2719
TransferCommand.register(this.dispatcher);
2820
WhitelistCommand.register(this.dispatcher);
@@ -37,15 +29,15 @@ index 83f05b042630891d43cfb567e98666831df80f6e..9aa09e11032f539952edeeed119f7705
3729
}
3830

3931
if (selection.includeIntegrated) {
40-
@@ -511,6 +519,7 @@ public class Commands {
32+
@@ -522,6 +_,7 @@
4133
private void runSync(ServerPlayer player, java.util.Collection<String> bukkit, RootCommandNode<CommandSourceStack> rootCommandNode) {
4234
// Paper end - Perf: Async command map building
4335
new com.destroystokyo.paper.event.brigadier.AsyncPlayerSendCommandsEvent<CommandSourceStack>(player.getBukkitEntity(), (RootCommandNode) rootCommandNode, true).callEvent(); // Paper - Brigadier API
4436
+ if (org.bukkit.event.player.PlayerCommandSendEvent.getHandlerList().getRegisteredListeners().length > 0) { // Purpur - Skip events if there's no listeners
4537
org.bukkit.event.player.PlayerCommandSendEvent event = new org.bukkit.event.player.PlayerCommandSendEvent(player.getBukkitEntity(), new java.util.LinkedHashSet<>(bukkit));
4638
event.getPlayer().getServer().getPluginManager().callEvent(event);
4739

48-
@@ -521,6 +530,8 @@ public class Commands {
40+
@@ -532,6 +_,8 @@
4941
}
5042
}
5143
// CraftBukkit end

purpur-server/minecraft-patches/unapplied-sources/net/minecraft/commands/arguments/selector/EntitySelector.java.patch renamed to purpur-server/minecraft-patches/sources/net/minecraft/commands/arguments/selector/EntitySelector.java.patch

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
1-
From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001
2-
From: File <[email protected]>
3-
Date: Sun, 20 Apr 1997 05:37:42 -0800
4-
Subject: [PATCH] purpur File Patches
5-
6-
7-
diff --git a/net/minecraft/commands/arguments/selector/EntitySelector.java b/net/minecraft/commands/arguments/selector/EntitySelector.java
8-
index d438e31a082b675d7eb0eead7067a0b92363a9f9..a65ca0b1a44f8c993fad7f230a9c0b11a474e358 100644
91
--- a/net/minecraft/commands/arguments/selector/EntitySelector.java
102
+++ b/net/minecraft/commands/arguments/selector/EntitySelector.java
11-
@@ -193,26 +193,27 @@ public class EntitySelector {
3+
@@ -190,26 +_,27 @@
124
this.checkPermissions(source);
135
if (this.playerName != null) {
146
ServerPlayer playerByName = source.getServer().getPlayerList().getPlayerByName(this.playerName);
@@ -40,7 +32,7 @@ index d438e31a082b675d7eb0eead7067a0b92363a9f9..a65ca0b1a44f8c993fad7f230a9c0b11
4032
players.add(serverPlayer1);
4133
if (players.size() >= resultLimit) {
4234
return players;
43-
@@ -271,4 +272,10 @@ public class EntitySelector {
35+
@@ -267,4 +_,10 @@
4436
public static Component joinNames(List<? extends Entity> names) {
4537
return ComponentUtils.formatList(names, Entity::getDisplayName);
4638
}

purpur-server/minecraft-patches/unapplied-sources/net/minecraft/core/BlockPos.java.patch renamed to purpur-server/minecraft-patches/sources/net/minecraft/core/BlockPos.java.patch

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
1-
From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001
2-
From: File <[email protected]>
3-
Date: Sun, 20 Apr 1997 05:37:42 -0800
4-
Subject: [PATCH] purpur File Patches
5-
6-
7-
diff --git a/net/minecraft/core/BlockPos.java b/net/minecraft/core/BlockPos.java
8-
index 5083959b61ec88868c0ede65a46087608e22983a..0ae78eecdb6556ff85018d49af4c183da5276c2d 100644
91
--- a/net/minecraft/core/BlockPos.java
102
+++ b/net/minecraft/core/BlockPos.java
11-
@@ -64,6 +64,12 @@ public class BlockPos extends Vec3i {
3+
@@ -61,6 +_,12 @@
124
public static final int MAX_HORIZONTAL_COORDINATE = 33554431;
135
// Paper end - Optimize Bit Operations by inlining
146

purpur-server/minecraft-patches/unapplied-sources/net/minecraft/core/dispenser/DispenseItemBehavior.java.patch renamed to purpur-server/minecraft-patches/sources/net/minecraft/core/dispenser/DispenseItemBehavior.java.patch

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
1-
From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001
2-
From: File <[email protected]>
3-
Date: Sun, 20 Apr 1997 05:37:42 -0800
4-
Subject: [PATCH] purpur File Patches
5-
6-
7-
diff --git a/net/minecraft/core/dispenser/DispenseItemBehavior.java b/net/minecraft/core/dispenser/DispenseItemBehavior.java
8-
index ef72c5d1b6196582cadb87944f3416881f56c8df..5d0eb3893a0cca99ef53c2095b7b36a145dc15be 100644
91
--- a/net/minecraft/core/dispenser/DispenseItemBehavior.java
102
+++ b/net/minecraft/core/dispenser/DispenseItemBehavior.java
11-
@@ -746,5 +746,22 @@ public interface DispenseItemBehavior {
3+
@@ -750,5 +_,22 @@
124
DispenserBlock.registerBehavior(Items.TNT_MINECART, new MinecartDispenseItemBehavior(EntityType.TNT_MINECART));
135
DispenserBlock.registerBehavior(Items.HOPPER_MINECART, new MinecartDispenseItemBehavior(EntityType.HOPPER_MINECART));
146
DispenserBlock.registerBehavior(Items.COMMAND_BLOCK_MINECART, new MinecartDispenseItemBehavior(EntityType.COMMAND_BLOCK_MINECART));

purpur-server/minecraft-patches/unapplied-sources/net/minecraft/core/dispenser/EquipmentDispenseItemBehavior.java.patch renamed to purpur-server/minecraft-patches/sources/net/minecraft/core/dispenser/EquipmentDispenseItemBehavior.java.patch

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
1-
From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001
2-
From: File <[email protected]>
3-
Date: Sun, 20 Apr 1997 05:37:42 -0800
4-
Subject: [PATCH] purpur File Patches
5-
6-
7-
diff --git a/net/minecraft/core/dispenser/EquipmentDispenseItemBehavior.java b/net/minecraft/core/dispenser/EquipmentDispenseItemBehavior.java
8-
index e2d169b45f1dba6559ca337b07a110f79d3db504..727d04a442053f6d0c4df3e744554e2866fa38cd 100644
91
--- a/net/minecraft/core/dispenser/EquipmentDispenseItemBehavior.java
102
+++ b/net/minecraft/core/dispenser/EquipmentDispenseItemBehavior.java
11-
@@ -32,7 +32,7 @@ public class EquipmentDispenseItemBehavior extends DefaultDispenseItemBehavior {
3+
@@ -32,7 +_,7 @@
124
return false;
135
} else {
146
LivingEntity livingEntity = entitiesOfClass.getFirst();
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--- a/net/minecraft/gametest/framework/GameTestHelper.java
2+
+++ b/net/minecraft/gametest/framework/GameTestHelper.java
3+
@@ -322,6 +_,8 @@
4+
return gameType;
5+
}
6+
7+
+ public void setAfk(final boolean afk) {} // Purpur - AFK API
8+
+
9+
@Override
10+
public boolean isClientAuthoritative() {
11+
return false;

purpur-server/minecraft-patches/unapplied-sources/net/minecraft/gametest/framework/TestCommand.java.patch renamed to purpur-server/minecraft-patches/sources/net/minecraft/gametest/framework/TestCommand.java.patch

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
1-
From 73b67b6fc4ab1a46cb7c1113a4648915bf072f56 Mon Sep 17 00:00:00 2001
2-
From: File <[email protected]>
3-
Date: Sun, 20 Apr 1997 05:37:42 -0800
4-
Subject: [PATCH] purpur File Patches
5-
6-
7-
diff --git a/net/minecraft/gametest/framework/TestCommand.java b/net/minecraft/gametest/framework/TestCommand.java
8-
index f2c97bb3c849dce59964d51633c47a982d1aa164..32338e6b2e5066b22111fab618a7205139a66536 100644
91
--- a/net/minecraft/gametest/framework/TestCommand.java
102
+++ b/net/minecraft/gametest/framework/TestCommand.java
11-
@@ -443,7 +443,7 @@ public class TestCommand {
3+
@@ -443,7 +_,7 @@
124
)
135
)
146
);

0 commit comments

Comments
 (0)