aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server')
-rw-r--r--patches/server/0033-Entity-Origin-API.patch6
-rw-r--r--patches/server/0064-Complete-resource-pack-API.patch6
-rw-r--r--patches/server/0078-Entity-AddTo-RemoveFrom-World-Events.patch6
-rw-r--r--patches/server/0094-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch4
-rw-r--r--patches/server/0190-Block-Enderpearl-Travel-Exploit.patch4
-rw-r--r--patches/server/0214-InventoryCloseEvent-Reason-API.patch4
-rw-r--r--patches/server/0361-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch8
-rw-r--r--patches/server/0692-Fix-merchant-inventory-not-closing-on-entity-removal.patch4
-rw-r--r--patches/server/0801-Don-t-tick-markers.patch4
-rw-r--r--patches/server/0851-Remove-unnecessary-onTrackingStart-during-navigation.patch6
-rw-r--r--patches/server/0876-check-global-player-list-where-appropriate.patch4
-rw-r--r--patches/server/1052-Fix-decorated-pots-crashing-the-server.patch57
12 files changed, 28 insertions, 85 deletions
diff --git a/patches/server/0033-Entity-Origin-API.patch b/patches/server/0033-Entity-Origin-API.patch
index bb4294c590..ab8af63f25 100644
--- a/patches/server/0033-Entity-Origin-API.patch
+++ b/patches/server/0033-Entity-Origin-API.patch
@@ -5,12 +5,12 @@ Subject: [PATCH] Entity Origin API
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 51f0705499003ea71274e1d5c8a77306fa868485..0c8042a515daeeb95b14147214e0a3151ef6f5a1 100644
+index 9969b66e39fb6ce8a9ba24ccbd7ef5d3e363197f..363f94a2fb54b7a55f392cc65a6e4d68f313fb07 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -2390,6 +2390,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
-
+@@ -2389,6 +2389,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
entity.updateDynamicGameEventListener(DynamicGameEventListener::add);
+ entity.inWorld = true; // CraftBukkit - Mark entity as in world
entity.valid = true; // CraftBukkit
+ // Paper start - Set origin location when the entity is being added to the world
+ if (entity.getOriginVector() == null) {
diff --git a/patches/server/0064-Complete-resource-pack-API.patch b/patches/server/0064-Complete-resource-pack-API.patch
index 6188ec173d..952619d2c9 100644
--- a/patches/server/0064-Complete-resource-pack-API.patch
+++ b/patches/server/0064-Complete-resource-pack-API.patch
@@ -5,18 +5,18 @@ Subject: [PATCH] Complete resource pack API
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
-index 0a6feccc657e62d7bad5e1461d5538a4c3a16b76..53833e155cf0d2328f2c2b36702970925045be3d 100644
+index 56f6f65ceb1271e9273b1ee6658773eb3445beed..a26db4bd859ef52dadf03f1b62155bcc54b7a740 100644
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
@@ -156,7 +156,11 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
ServerCommonPacketListenerImpl.LOGGER.info("Disconnecting {} due to resource pack {} rejection", this.playerProfile().getName(), packet.id());
this.disconnect(Component.translatable("multiplayer.requiredTexturePrompt.disconnect"));
}
-- this.cserver.getPluginManager().callEvent(new PlayerResourcePackStatusEvent(this.getCraftPlayer(), PlayerResourcePackStatusEvent.Status.values()[packet.action().ordinal()])); // CraftBukkit
+- this.cserver.getPluginManager().callEvent(new PlayerResourcePackStatusEvent(this.getCraftPlayer(), packet.id(), PlayerResourcePackStatusEvent.Status.values()[packet.action().ordinal()])); // CraftBukkit
+ // Paper start
+ PlayerResourcePackStatusEvent.Status packStatus = PlayerResourcePackStatusEvent.Status.values()[packet.action().ordinal()];
+ player.getBukkitEntity().setResourcePackStatus(packStatus);
-+ this.cserver.getPluginManager().callEvent(new PlayerResourcePackStatusEvent(this.getCraftPlayer(), packStatus)); // CraftBukkit
++ this.cserver.getPluginManager().callEvent(new PlayerResourcePackStatusEvent(this.getCraftPlayer(), packet.id(), packStatus)); // CraftBukkit
+ // Paper end
}
diff --git a/patches/server/0078-Entity-AddTo-RemoveFrom-World-Events.patch b/patches/server/0078-Entity-AddTo-RemoveFrom-World-Events.patch
index 234431c160..93df9d4794 100644
--- a/patches/server/0078-Entity-AddTo-RemoveFrom-World-Events.patch
+++ b/patches/server/0078-Entity-AddTo-RemoveFrom-World-Events.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Entity AddTo/RemoveFrom World Events
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 0718f8745fed4cd0cbb29372159ff39bdce7d0fd..3d826b82034dc12daa521414142dfe3cdd41365b 100644
+index f9e9348a897d8f8bd5eb5bd951c6e2416e73562d..16abfc81d054cdc983500d3e498533ea8e8cc0be 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -2402,6 +2402,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -2401,6 +2401,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
entity.setOrigin(entity.getOriginVector().toLocation(getWorld()));
}
// Paper end
@@ -16,7 +16,7 @@ index 0718f8745fed4cd0cbb29372159ff39bdce7d0fd..3d826b82034dc12daa521414142dfe3c
}
public void onTrackingEnd(Entity entity) {
-@@ -2477,6 +2478,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -2476,6 +2477,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
}
}
// CraftBukkit end
diff --git a/patches/server/0094-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch b/patches/server/0094-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch
index d840c2f3f0..9dfde61df8 100644
--- a/patches/server/0094-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch
+++ b/patches/server/0094-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch
@@ -13,10 +13,10 @@ custom renderers are in use, defaulting to the much simpler Vanilla system.
Additionally, numerous issues to player position tracking on maps has been fixed.
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index af16cabd57a5fb28c2e70856730dd0df6c8abf9c..98ea55455d365b8d25ecb998daacbcbb1b45e5a7 100644
+index 6baf4caafbb4f7a09fe3a806bbff17c9f6105fbd..97554ab72743cf2b8e87c7f3c35579f669c2308a 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -2423,6 +2423,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -2422,6 +2422,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
{
if ( iter.next().player == entity )
{
diff --git a/patches/server/0190-Block-Enderpearl-Travel-Exploit.patch b/patches/server/0190-Block-Enderpearl-Travel-Exploit.patch
index 0bd2ae8081..e3e488693e 100644
--- a/patches/server/0190-Block-Enderpearl-Travel-Exploit.patch
+++ b/patches/server/0190-Block-Enderpearl-Travel-Exploit.patch
@@ -16,10 +16,10 @@ public net.minecraft.world.entity.projectile.Projectile cachedOwner
public net.minecraft.world.entity.projectile.Projectile ownerUUID
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 5f6bd432566c4e437d7580e465b52b49bdfc057d..6c03c96adfa68b1817423d012affa5b3952ade04 100644
+index 97554ab72743cf2b8e87c7f3c35579f669c2308a..6d75010bf837a791f5fe04aacb973246410bbd66 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -2356,6 +2356,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -2354,6 +2354,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
public void onTickingEnd(Entity entity) {
ServerLevel.this.entityTickList.remove(entity);
diff --git a/patches/server/0214-InventoryCloseEvent-Reason-API.patch b/patches/server/0214-InventoryCloseEvent-Reason-API.patch
index 00f268157c..00812c2ab7 100644
--- a/patches/server/0214-InventoryCloseEvent-Reason-API.patch
+++ b/patches/server/0214-InventoryCloseEvent-Reason-API.patch
@@ -7,7 +7,7 @@ Allows you to determine why an inventory was closed, enabling plugin developers
to "confirm" things based on if it was player triggered close or not.
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index e024c296f471737764af260ca4cd7e9005e044ac..ac43aba1ae9420a2a02fd3d3e3d4426c04e76139 100644
+index 0705a1bb63f056a228308d348bc5db87b0bee5a1..cc499b31cf186412e575373a5fb7cad54946b0a7 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1470,7 +1470,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -19,7 +19,7 @@ index e024c296f471737764af260ca4cd7e9005e044ac..ac43aba1ae9420a2a02fd3d3e3d4426c
}
}
}
-@@ -2446,7 +2446,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -2445,7 +2445,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
// Spigot Start
if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder && (!(entity instanceof ServerPlayer) || entity.getRemovalReason() != Entity.RemovalReason.KILLED)) { // SPIGOT-6876: closeInventory clears death message
for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((org.bukkit.inventory.InventoryHolder) entity.getBukkitEntity()).getInventory().getViewers())) {
diff --git a/patches/server/0361-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch b/patches/server/0361-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch
index ce4fff308a..88a6fb43d4 100644
--- a/patches/server/0361-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch
+++ b/patches/server/0361-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch
@@ -25,10 +25,10 @@ index bd15131b7506e965bcf64be20330731256a1e1f0..0e3c89b9d75160d0e8947d042a1568da
EntityType<?> entitytypes = entity.getType();
int i = entitytypes.clientTrackingRange() * 16;
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index cfb28fbb860ac3d09589776d1b722cbb72d12de8..3ba431c4841a03018660f5137894b10298b417b9 100644
+index 321f90a0ad7cdd3b0e8b136682947a467f2388b9..86015c6b289ce6fb6b9d1b0ca3f637e53192eea3 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -2502,7 +2502,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -2500,7 +2500,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
public void onTrackingStart(Entity entity) {
org.spigotmc.AsyncCatcher.catchOp("entity register"); // Spigot
@@ -37,9 +37,9 @@ index cfb28fbb860ac3d09589776d1b722cbb72d12de8..3ba431c4841a03018660f5137894b102
if (entity instanceof ServerPlayer) {
ServerPlayer entityplayer = (ServerPlayer) entity;
-@@ -2536,6 +2536,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
-
+@@ -2535,6 +2535,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
entity.updateDynamicGameEventListener(DynamicGameEventListener::add);
+ entity.inWorld = true; // CraftBukkit - Mark entity as in world
entity.valid = true; // CraftBukkit
+ ServerLevel.this.getChunkSource().addEntity(entity);
// Paper start - Set origin location when the entity is being added to the world
diff --git a/patches/server/0692-Fix-merchant-inventory-not-closing-on-entity-removal.patch b/patches/server/0692-Fix-merchant-inventory-not-closing-on-entity-removal.patch
index 15317ec1f0..11b3f65cb3 100644
--- a/patches/server/0692-Fix-merchant-inventory-not-closing-on-entity-removal.patch
+++ b/patches/server/0692-Fix-merchant-inventory-not-closing-on-entity-removal.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Fix merchant inventory not closing on entity removal
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 5ff0275067f11bcd723cf8884788f76e966832e4..cfc53b3c270e02131ef1b3daf3476e3cce21e6e1 100644
+index a3ef919ff07655e835a1b423b3d4f71939a47db8..fa4a6f519a4611fe896210a97aeb334e1fae039d 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -2683,6 +2683,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -2682,6 +2682,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
// Spigot end
// Spigot Start
if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder && (!(entity instanceof ServerPlayer) || entity.getRemovalReason() != Entity.RemovalReason.KILLED)) { // SPIGOT-6876: closeInventory clears death message
diff --git a/patches/server/0801-Don-t-tick-markers.patch b/patches/server/0801-Don-t-tick-markers.patch
index fa67dd14e5..18a68e85c9 100644
--- a/patches/server/0801-Don-t-tick-markers.patch
+++ b/patches/server/0801-Don-t-tick-markers.patch
@@ -23,10 +23,10 @@ index ff99336e0b8131ae161cfa5c4fc83c6905e3dbc8..5f43aedc6596e2b1ac7af97115157147
}
});
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index cfc53b3c270e02131ef1b3daf3476e3cce21e6e1..3ac7c157cddfaa9262e727705eb88b55a637f618 100644
+index fa4a6f519a4611fe896210a97aeb334e1fae039d..91fdab7fc3afacfa58e91d5714f6bf7c3359278a 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -2593,6 +2593,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -2591,6 +2591,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
}
public void onTickingStart(Entity entity) {
diff --git a/patches/server/0851-Remove-unnecessary-onTrackingStart-during-navigation.patch b/patches/server/0851-Remove-unnecessary-onTrackingStart-during-navigation.patch
index 3e82380c51..b86bc6ba91 100644
--- a/patches/server/0851-Remove-unnecessary-onTrackingStart-during-navigation.patch
+++ b/patches/server/0851-Remove-unnecessary-onTrackingStart-during-navigation.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Remove unnecessary onTrackingStart during navigation warning
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 222e85b22c5d1f5a135e7620df0786c709dff2e4..9ea6786730d6a8e9fddd49a0b28eeefd2d5a8ef4 100644
+index ac9f42e8d88ca8cdb2882bd8d7676a793024599c..ab8c8643c48f6ac49f4b73eed6462cd62482b269 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -2629,7 +2629,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -2627,7 +2627,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
if (entity instanceof Mob) {
Mob entityinsentient = (Mob) entity;
@@ -17,7 +17,7 @@ index 222e85b22c5d1f5a135e7620df0786c709dff2e4..9ea6786730d6a8e9fddd49a0b28eeefd
String s = "onTrackingStart called during navigation iteration";
Util.logAndPauseIfInIde("onTrackingStart called during navigation iteration", new IllegalStateException("onTrackingStart called during navigation iteration"));
-@@ -2714,7 +2714,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -2713,7 +2713,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
if (entity instanceof Mob) {
Mob entityinsentient = (Mob) entity;
diff --git a/patches/server/0876-check-global-player-list-where-appropriate.patch b/patches/server/0876-check-global-player-list-where-appropriate.patch
index 7d89111c22..d8d6a85a6f 100644
--- a/patches/server/0876-check-global-player-list-where-appropriate.patch
+++ b/patches/server/0876-check-global-player-list-where-appropriate.patch
@@ -7,10 +7,10 @@ Makes certain entities check all players when searching for a player
instead of just checking players in their world.
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 9ea6786730d6a8e9fddd49a0b28eeefd2d5a8ef4..ded19a243173c9d5c3d56d61a719ce169eeb0dfa 100644
+index ab8c8643c48f6ac49f4b73eed6462cd62482b269..b3ffc58db60cbe0591086c3768ae6009ca7017c7 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -2751,4 +2751,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -2750,4 +2750,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
entity.updateDynamicGameEventListener(DynamicGameEventListener::move);
}
}
diff --git a/patches/server/1052-Fix-decorated-pots-crashing-the-server.patch b/patches/server/1052-Fix-decorated-pots-crashing-the-server.patch
deleted file mode 100644
index 80533b74b2..0000000000
--- a/patches/server/1052-Fix-decorated-pots-crashing-the-server.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Nassim Jahnke <[email protected]>
-Date: Wed, 6 Dec 2023 22:00:10 +0100
-Subject: [PATCH] Fix decorated pots crashing the server
-
-
-diff --git a/src/main/java/net/minecraft/world/level/block/entity/DecoratedPotBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/DecoratedPotBlockEntity.java
-index a65cc426193df558569bec4373a9bd940cbc9b04..15da1af40759e3669d087d7380a0b85ac20bdf9d 100644
---- a/src/main/java/net/minecraft/world/level/block/entity/DecoratedPotBlockEntity.java
-+++ b/src/main/java/net/minecraft/world/level/block/entity/DecoratedPotBlockEntity.java
-@@ -33,6 +33,46 @@ public class DecoratedPotBlockEntity extends BlockEntity implements Randomizable
- @Nullable
- protected ResourceLocation lootTable;
- protected long lootTableSeed;
-+ // Paper start - fix cb dumb
-+ public java.util.List<org.bukkit.entity.HumanEntity> transaction = new java.util.ArrayList<>();
-+ private int maxStack = MAX_STACK;
-+
-+ @Override
-+ public int getMaxStackSize() {
-+ return this.maxStack;
-+ }
-+
-+ @Override
-+ public java.util.List<ItemStack> getContents() {
-+ return java.util.Arrays.asList(this.item);
-+ }
-+
-+ @Override
-+ public void onOpen(org.bukkit.craftbukkit.entity.CraftHumanEntity who) {
-+ this.transaction.add(who);
-+ }
-+
-+ @Override
-+ public void onClose(org.bukkit.craftbukkit.entity.CraftHumanEntity who) {
-+ this.transaction.remove(who);
-+ }
-+
-+ @Override
-+ public java.util.List<org.bukkit.entity.HumanEntity> getViewers() {
-+ return this.transaction;
-+ }
-+
-+ @Override
-+ public void setMaxStackSize(int size) {
-+ this.maxStack = size;
-+ }
-+
-+ @Override
-+ public org.bukkit.Location getLocation() {
-+ if (this.level == null) return null;
-+ return new org.bukkit.Location(this.level.getWorld(), this.worldPosition.getX(), this.worldPosition.getY(), this.worldPosition.getZ());
-+ }
-+ // Paper end - fix cb dumb
-
- public DecoratedPotBlockEntity(BlockPos pos, BlockState state) {
- super(BlockEntityType.DECORATED_POT, pos, state);