More more work

This commit is contained in:
Nassim Jahnke 2024-12-03 19:21:12 +01:00
parent ab9a3db5ba
commit c60e47fa58
No known key found for this signature in database
GPG key ID: EF6771C01F6EF02F
199 changed files with 315 additions and 335 deletions

View file

@ -14,20 +14,18 @@ To be converted into a Paper-API event at some point in the future?
public net.minecraft.world.entity.player.Player removeEntitiesOnShoulder()V
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 8a8f073a29daf7cb36e5fd0e4d4e5932636bb04f..c459d32e85aaea647e3dc5239e1c4e106a69ad46 100644
index 8a8f073a29daf7cb36e5fd0e4d4e5932636bb04f..cb49090cacca331a0f3eb419de86f4562621bcae 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2342,6 +2342,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2342,6 +2342,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
switch (packet.getAction()) {
case PRESS_SHIFT_KEY:
this.player.setShiftKeyDown(true);
+
+ // Paper start - Add option to make parrots stay
+ if (this.player.level().paperConfig().entities.behavior.parrotsAreUnaffectedByPlayerMovement) {
+ this.player.removeEntitiesOnShoulder();
+ }
+ // Paper end - Add option to make parrots stay
+
break;
case RELEASE_SHIFT_KEY:
this.player.setShiftKeyDown(false);

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerJumpEvent
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index c459d32e85aaea647e3dc5239e1c4e106a69ad46..85b81b06e834e1575588a2a7e840a8bcc65c3306 100644
index cb49090cacca331a0f3eb419de86f4562621bcae..8beb2773ba6ca8c37f1d7c63c98cfcb26d0d3b3f 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1270,7 +1270,34 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

View file

@ -16,7 +16,7 @@ Also adds isCommand and getLocation to the sync TabCompleteEvent
Co-authored-by: Aikar <aikar@aikar.co>
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 85b81b06e834e1575588a2a7e840a8bcc65c3306..f2b6162562a2f35c8f610c9386172984ae30bf17 100644
index 8beb2773ba6ca8c37f1d7c63c98cfcb26d0d3b3f..cbdf69371a65339294b3ffd3514bb0bf8c03ff36 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -720,21 +720,58 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

View file

@ -10,7 +10,7 @@ Adds an option to control the force mode of the particle.
This adds a new Builder API which is much friendlier to use.
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 9cb02b168384f597fce1251696e77a1e74f0d774..e80dc81423538e7e8a5510e5d82e97ab2097c225 100644
index 9cb02b168384f597fce1251696e77a1e74f0d774..95c3b8524faac2218a4966965d4a8e322c0bdcd7 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1542,12 +1542,17 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@ -20,7 +20,7 @@ index 9cb02b168384f597fce1251696e77a1e74f0d774..e80dc81423538e7e8a5510e5d82e97ab
+ // Paper start - Particle API
+ return this.sendParticlesSource(this.players, sender, t0, flag, flag1, d0, d1, d2, i, d3, d4, d5, d6);
+ }
+ public <T extends ParticleOptions> int sendParticlesSource(List<ServerPlayer> receivers, ServerPlayer sender, T t0, boolean flag, boolean flag1, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6) {
+ public <T extends ParticleOptions> int sendParticlesSource(List<ServerPlayer> receivers, @Nullable ServerPlayer sender, T t0, boolean flag, boolean flag1, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6) {
+ // Paper end - Particle API
// CraftBukkit end
ClientboundLevelParticlesPacket packetplayoutworldparticles = new ClientboundLevelParticlesPacket(t0, flag, flag1, d0, d1, d2, (float) d3, (float) d4, (float) d5, (float) d6, i);

View file

@ -9,7 +9,7 @@ Co-authored-by: Esoteric Enderman <90862990+EsotericEnderman@users.noreply.githu
Co-authored-by: Bjarne Koll <git@lynxplay.dev>
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index e80dc81423538e7e8a5510e5d82e97ab2097c225..74f7467caf7d86011f0b8aea7a8c1f5c644f690a 100644
index 95c3b8524faac2218a4966965d4a8e322c0bdcd7..1c15dc6143ce00aa4a8cdc6468d9fba0e398ec43 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1425,6 +1425,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe

View file

@ -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 74f7467caf7d86011f0b8aea7a8c1f5c644f690a..99db41834d7e8fb8fbbe83bd70a4b8d7c016c3e2 100644
index 1c15dc6143ce00aa4a8cdc6468d9fba0e398ec43..2ed077ba041f9d1a629320cd41b87ba19f3803d0 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1210,7 +1210,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@ -75,10 +75,10 @@ index 1ebd8d20e510b7af2cdf461fff9eb949a0017ae6..0a5aeb9b50dfec3b791040348f6a9e92
this.doCloseContainer();
}
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index f2b6162562a2f35c8f610c9386172984ae30bf17..b4edc64f3eacdbfb6187106989d190303b0541ac 100644
index cbdf69371a65339294b3ffd3514bb0bf8c03ff36..405dec328cf591f533600ed9e2aa7360a4a8e96d 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2714,10 +2714,15 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2712,10 +2712,15 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@Override
public void handleContainerClose(ServerboundContainerClosePacket packet) {

View file

@ -22,7 +22,7 @@ to take the burden of this into their own hand without having to rely on
plugins doing unsafe things.
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index b4edc64f3eacdbfb6187106989d190303b0541ac..0e1abdd619f26dbc334061f5f13ba126ee3006b5 100644
index 405dec328cf591f533600ed9e2aa7360a4a8e96d..5f3d7ea96d690b68897d9092c624c77e49822af4 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -276,6 +276,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 99db41834d7e8fb8fbbe83bd70a4b8d7c016c3e2..967357ec91036a03407eb7e410f717112fe96b16 100644
index 2ed077ba041f9d1a629320cd41b87ba19f3803d0..52e2137f759e52d210abda7b47c1fd4b5f831d1f 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1172,6 +1172,12 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe

View file

@ -6,7 +6,7 @@ Subject: [PATCH] Add option to prevent players from moving into unloaded
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 0e1abdd619f26dbc334061f5f13ba126ee3006b5..8aacca1e3b310125a618de02b9277aedc949268f 100644
index 5f3d7ea96d690b68897d9092c624c77e49822af4..a87ea0f22b44c2fb67fd51bc8c9b0067aacac7de 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -500,9 +500,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Reset players airTicks on respawn
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 419476f7ee7c55552655ef0098da0ddbc2434361..90587b5acee5c2d854604b53ef83c5f7d8c87a08 100644
index e73377782c388c9f750f0548f3c427bc52246fbc..d54213bab1099bb96c8175f0c03a1b034cc41ce2 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -3052,6 +3052,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
@@ -3032,6 +3032,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
this.setHealth(this.getMaxHealth());
this.stopUsingItem(); // CraftBukkit - SPIGOT-6682: Clear active item on reset

View file

@ -38,7 +38,7 @@ index 0000000000000000000000000000000000000000..b60f59cf5cc8eb84a6055b7861857dec
+ }
+}
diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java
index 8cac2075077b1d9c2b01e09c99780ff9e204abb2..dbf79a018260a006bf5d16608b35bcbea9adb963 100644
index 3d5bca1b637234df48ca3228c7ffbce21116a0c7..e78f40f7f10a2ed0675b3cb9a2c5730dbc0141db 100644
--- a/src/main/java/net/minecraft/Util.java
+++ b/src/main/java/net/minecraft/Util.java
@@ -92,7 +92,7 @@ public class Util {
@ -50,41 +50,29 @@ index 8cac2075077b1d9c2b01e09c99780ff9e204abb2..dbf79a018260a006bf5d16608b35bcbe
private static final TracingExecutor IO_POOL = makeIoExecutor("IO-Worker-", false);
private static final TracingExecutor DOWNLOAD_POOL = makeIoExecutor("Download-", true);
// Paper start - don't submit BLOCKING PROFILE LOOKUPS to the world gen thread
@@ -163,15 +163,28 @@ public class Util {
@@ -163,15 +163,16 @@ public class Util {
return FILENAME_DATE_TIME_FORMATTER.format(ZonedDateTime.now());
}
- private static TracingExecutor makeExecutor(String name) {
- int i = Mth.clamp(Runtime.getRuntime().availableProcessors() - 1, 1, getMaxThreads());
+ private static TracingExecutor makeExecutor(String s, final int priorityModifier) { // Paper - Perf: add priority
+ private static TracingExecutor makeExecutor(String name, final int priorityModifier) { // Paper - Perf: add priority
int i = maxAllowedExecutorThreads();
- ExecutorService executorService;
+ // Paper start - Perf: use simpler thread pool that allows 1 thread and reduce worldgen thread worker count for low core count CPUs
+ int cpus = Runtime.getRuntime().availableProcessors() / 2;
+ int i;
+ if (cpus <= 4) {
+ i = cpus <= 2 ? 1 : 2;
+ } else if (cpus <= 8) {
+ // [5, 8]
+ i = Math.max(3, cpus - 2);
+ } else {
+ i = cpus * 2 / 3;
+ }
+ i = Math.min(8, i);
+ i = Integer.getInteger("Paper.WorkerThreadCount", i);
+
ExecutorService executorService;
+ final ExecutorService executorService;
if (i <= 0) {
executorService = MoreExecutors.newDirectExecutorService();
} else {
- AtomicInteger atomicInteger = new AtomicInteger(1);
- executorService = new ForkJoinPool(i, pool -> {
- final String string2 = "Worker-" + name + "-" + atomicInteger.getAndIncrement();
+ executorService = Executors.newFixedThreadPool(i, target -> new io.papermc.paper.util.ServerWorkerThread(target, s, priorityModifier));
+ executorService = Executors.newFixedThreadPool(i, target -> new io.papermc.paper.util.ServerWorkerThread(target, name, priorityModifier));
+ }
+ /* final String string2 = "Worker-" + name + "-" + atomicInteger.getAndIncrement();
ForkJoinWorkerThread forkJoinWorkerThread = new ForkJoinWorkerThread(pool) {
@Override
protected void onStart() {
@@ -193,7 +206,7 @@ public class Util {
@@ -193,13 +194,26 @@ public class Util {
forkJoinWorkerThread.setName(string2);
return forkJoinWorkerThread;
}, Util::onThreadException, true);
@ -93,8 +81,28 @@ index 8cac2075077b1d9c2b01e09c99780ff9e204abb2..dbf79a018260a006bf5d16608b35bcbe
return new TracingExecutor(executorService);
}
public static int maxAllowedExecutorThreads() {
- return Mth.clamp(Runtime.getRuntime().availableProcessors() - 1, 1, getMaxThreads());
+ // Paper start - Perf: use simpler thread pool that allows 1 thread and reduce worldgen thread worker count for low core count CPUs
+ final int cpus = Runtime.getRuntime().availableProcessors() / 2;
+ int maxExecutorThreads;
+ if (cpus <= 4) {
+ maxExecutorThreads = cpus <= 2 ? 1 : 2;
+ } else if (cpus <= 8) {
+ // [5, 8]
+ maxExecutorThreads = Math.max(3, cpus - 2);
+ } else {
+ maxExecutorThreads = cpus * 2 / 3;
+ }
+ maxExecutorThreads = Math.min(8, maxExecutorThreads);
+ return Integer.getInteger("Paper.WorkerThreadCount", maxExecutorThreads);
+ // Paper end - Perf: use simpler thread pool that allows 1 thread and reduce worldgen thread worker count for low core count CPUs
}
private static int getMaxThreads() {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index af20a16e18673a629fc3033d8e7e07eba855b1c7..2a4f8075867a302afd98bdf9ac8b11622c29082d 100644
index 65dee566937104e301b917d037f2db456751801c..848f0faa50a5c4d6fbfe5fe1e168d1946fd9c28c 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -332,6 +332,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa

View file

@ -8,7 +8,7 @@ the updates per world, so that we can re-use the same packet
object for every player unless they have per-player time enabled.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 2a4f8075867a302afd98bdf9ac8b11622c29082d..9a9291282f7ec99be9badf8b32fab5f0ea0f1037 100644
index 848f0faa50a5c4d6fbfe5fe1e168d1946fd9c28c..698536a52e9e61d20556b4bc58de256e89726180 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1603,10 +1603,22 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa

View file

@ -6,7 +6,7 @@ Subject: [PATCH] Fix SpongeAbsortEvent handling
Only process drops when the block is actually going to be removed
diff --git a/src/main/java/net/minecraft/world/level/block/SpongeBlock.java b/src/main/java/net/minecraft/world/level/block/SpongeBlock.java
index 569bdef574680319b4fd6569ef05b2b3c04c739d..59cf905b1b5686f6f4f2bad94730ffa69d3a2834 100644
index 0f4d244948b81a2298927f0f1635b03ef0977c09..e9a77c1ae09af42d2d444ad6b5f6c8ac395044e1 100644
--- a/src/main/java/net/minecraft/world/level/block/SpongeBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/SpongeBlock.java
@@ -137,7 +137,11 @@ public class SpongeBlock extends Block {

View file

@ -59,10 +59,10 @@ index 4c8189a2a7edea824545a24dccb376b8eceac001..4623c8acd125dff4919c4e2045b84831
this.level.destroyBlockProgress(this.player.getId(), pos, -1);
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index f57c133de5e974d2c86145f697d3636347a29d65..c3e281754a1cd9d5ce5f4aab36822f9f5d34be39 100644
index a87ea0f22b44c2fb67fd51bc8c9b0067aacac7de..1be04d0c910ebd58f2eededcdf81c94279d521c7 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1606,6 +1606,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1668,6 +1668,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
case START_DESTROY_BLOCK:
case ABORT_DESTROY_BLOCK:
case STOP_DESTROY_BLOCK:

View file

@ -20,10 +20,10 @@ this is going to be the best soultion all around.
Improvements/suggestions welcome!
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 90587b5acee5c2d854604b53ef83c5f7d8c87a08..a2342c9cfa8db2c012a77cc95378e3adb2a98287 100644
index d54213bab1099bb96c8175f0c03a1b034cc41ce2..2db5ef211ac36d5aa7f337dd4a5c2600796d8b66 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -2826,9 +2826,15 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
@@ -2806,9 +2806,15 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
@Override
public void stopRiding() {
@ -41,10 +41,10 @@ index 90587b5acee5c2d854604b53ef83c5f7d8c87a08..a2342c9cfa8db2c012a77cc95378e3ad
Iterator iterator = entityliving.getActiveEffects().iterator();
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index e67d8da5be50e07cb0473b7bfe6d381da044155a..a430a3e2c3b4ae53cad1fbaf4dd71b9e2f24ccf7 100644
index 87ab16a82b4ba58fd469eb845d79e9ad98cf45bc..3cc210dc92f74c37f4de6eaf31ff3ec7aa11248a 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2822,17 +2822,28 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -2852,17 +2852,28 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
public void removeVehicle() {
@ -75,7 +75,7 @@ index e67d8da5be50e07cb0473b7bfe6d381da044155a..a430a3e2c3b4ae53cad1fbaf4dd71b9e
}
protected void addPassenger(Entity passenger) {
@@ -2857,7 +2868,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -2887,7 +2898,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
}
@ -87,7 +87,7 @@ index e67d8da5be50e07cb0473b7bfe6d381da044155a..a430a3e2c3b4ae53cad1fbaf4dd71b9e
if (entity.getVehicle() == this) {
throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)");
} else {
@@ -2867,7 +2881,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -2897,7 +2911,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
if (this.getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) {
VehicleExitEvent event = new VehicleExitEvent(
(Vehicle) this.getBukkitEntity(),
@ -96,7 +96,7 @@ index e67d8da5be50e07cb0473b7bfe6d381da044155a..a430a3e2c3b4ae53cad1fbaf4dd71b9e
);
// Suppress during worldgen
if (this.valid) {
@@ -2880,7 +2894,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -2910,7 +2924,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
}
@ -106,10 +106,10 @@ index e67d8da5be50e07cb0473b7bfe6d381da044155a..a430a3e2c3b4ae53cad1fbaf4dd71b9e
if (this.valid) {
Bukkit.getPluginManager().callEvent(event);
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 7ba5e60eae4fc230c86956ed8ee895c9e1585d42..901336aac08f4c49328316aeccb7c48a591ed6b0 100644
index df7dce2bff49023d22622c90795428222dc489ce..782c187d2b4f706463a1e643f1976512104797a6 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3757,9 +3757,15 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3768,9 +3768,15 @@ public abstract class LivingEntity extends Entity implements Attackable {
@Override
public void stopRiding() {
@ -127,7 +127,7 @@ index 7ba5e60eae4fc230c86956ed8ee895c9e1585d42..901336aac08f4c49328316aeccb7c48a
this.dismountVehicle(entity);
}
diff --git a/src/main/java/net/minecraft/world/entity/monster/Shulker.java b/src/main/java/net/minecraft/world/entity/monster/Shulker.java
index 04e973430bf5706d5264423c24d73b903bc3f0aa..dc1870baf172982ebb34eccd4ee79497f48f8050 100644
index b2149a977f30524bd526eafa248b2ca369ae4648..74fa6d2b569b42ac2dbb7efb10df658b9ffeecc4 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Shulker.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Shulker.java
@@ -289,7 +289,13 @@ public class Shulker extends AbstractGolem implements VariantHolder<Optional<Dye
@ -146,10 +146,10 @@ index 04e973430bf5706d5264423c24d73b903bc3f0aa..dc1870baf172982ebb34eccd4ee79497
this.clientOldAttachPosition = this.blockPosition();
}
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
index 7eb4563299e7c54ec4df53c966f6d1a86fb2ec4e..4d8929a1f5390af10fbde1dcc13c0136b0a3a745 100644
index 833e2b338671b81401409fc390ab1515f3520442..858f123934021b7a3911d3d5cfcb8352293a8302 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -1131,7 +1131,13 @@ public abstract class Player extends LivingEntity {
@@ -1134,7 +1134,13 @@ public abstract class Player extends LivingEntity {
@Override
public void removeVehicle() {

View file

@ -6,10 +6,10 @@ Subject: [PATCH] Book size limits
Puts some limits on the size of books.
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index c3e281754a1cd9d5ce5f4aab36822f9f5d34be39..542899c382309986f3aaa16bf534b677aaac82f5 100644
index 1be04d0c910ebd58f2eededcdf81c94279d521c7..ca0aa2acbc1316201d7a9c69e4aad8ffe4d61d83 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1056,6 +1056,44 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1117,6 +1117,44 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@Override
public void handleEditBook(ServerboundEditBookPacket packet) {

View file

@ -38,7 +38,7 @@ public net.minecraft.server.network.ServerLoginPacketListenerImpl$State
public net.minecraft.server.network.ServerLoginPacketListenerImpl state
diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java
index c45b8b2c89ffec7bd6a6875963c61f11185d3ee1..38947f40864f3661df2eb4baa0aef5740b82f9d9 100644
index ca2125fe63d5c2bc5af0ecec177bb457c54b111a..e9429b3b1db612aa552237fe5d0c37727501ff8d 100644
--- a/src/main/java/net/minecraft/network/Connection.java
+++ b/src/main/java/net/minecraft/network/Connection.java
@@ -692,6 +692,26 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {

View file

@ -16,10 +16,10 @@ intent to remove) and replace it with two new methods, clearly named and
documented as to their purpose.
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index a2342c9cfa8db2c012a77cc95378e3adb2a98287..9d6910c6a685d1c8f6804cfe086c958a0fcb0526 100644
index 2db5ef211ac36d5aa7f337dd4a5c2600796d8b66..ae922d01caae4b2ed42641ae5039abe33603fa29 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -296,6 +296,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
@@ -294,6 +294,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
private int containerCounter;
public boolean wonGame;
private int containerUpdateDelay; // Paper - Configurable container update tick rate
@ -106,7 +106,7 @@ index f6b2ca92fd3510a76cbf56d0ea55aa6caaf12ba1..e0d342a0ddd140b342f7af138c71596c
public Location getLastDeathLocation() {
if (this.getData().contains("LastDeathLocation", 10)) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 054892e472636d1a5c7f06c46ee28ebe4736f24d..5cdd18e071f069adc8137561c164bd533dea7c7c 100644
index 63cc339b42c47879401628c8d0e0f62bd7dd76b4..d5f89783d12c61967637ed1e87037710df563308 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -215,6 +215,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Workaround for vehicle tracking issue on disconnect
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 9d6910c6a685d1c8f6804cfe086c958a0fcb0526..3fbdc6394c1f431d1bf8ee13513a69b96f69bdd9 100644
index ae922d01caae4b2ed42641ae5039abe33603fa29..71352f1b86c594ea2edf5d1735410054d909291a 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -2078,6 +2078,13 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
@@ -2061,6 +2061,13 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
public void disconnect() {
this.disconnected = true;
this.ejectPassengers();

View file

@ -8,7 +8,7 @@ We just add a check to ensure that the CraftPlayer's handle
is a ServerPlayer
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 5cdd18e071f069adc8137561c164bd533dea7c7c..7c7f66ea38babab7b04e76d14e19cc0dac9c4b54 100644
index d5f89783d12c61967637ed1e87037710df563308..e548834f2bd6e1e0a510a14040cc6aca63e2e6f5 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -229,8 +229,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

View file

@ -11,10 +11,10 @@ floating in the air.
This can replace many uses of BlockPhysicsEvent
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 924b496aaaa19c7ef69498730725ae9287e46e28..0f4b9b5d3e34b5e08f9ca2f78c5e8bcec9f5a85e 100644
index 09bcffea6b9510a108c5e7d2a32d2930c6abe6b3..7d1d009def581b83794425892f454b4d2a76c634 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -24,6 +24,7 @@ import net.minecraft.core.registries.Registries;
@@ -25,6 +25,7 @@ import net.minecraft.core.registries.Registries;
import net.minecraft.network.protocol.Packet;
import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation;
@ -22,7 +22,7 @@ index 924b496aaaa19c7ef69498730725ae9287e46e28..0f4b9b5d3e34b5e08f9ca2f78c5e8bce
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.level.FullChunkStatus;
import net.minecraft.server.level.ServerLevel;
@@ -574,9 +575,26 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -575,9 +576,26 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
return false;
} else {
FluidState fluid = this.getFluidState(pos);

View file

@ -83,7 +83,7 @@ index 2008fd542eaf1c2fac776ae1751c227a3b6dde4b..6212d94503023f7bb5ca21785cbb69ba
}
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 9a9291282f7ec99be9badf8b32fab5f0ea0f1037..feb45369b41b597fd603c12f3da23759923b6a6d 100644
index 698536a52e9e61d20556b4bc58de256e89726180..d69af4ad646134fa79dea8a845f2311a9a0cb086 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -944,6 +944,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa

View file

@ -119,10 +119,10 @@ index 6212d94503023f7bb5ca21785cbb69babe4421c3..642d5c6849debc5a266605b0df30d552
if (commandnode2.canUse(source)) {
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 542899c382309986f3aaa16bf534b677aaac82f5..b234957d0563f1ccf533f927e60d8b6b77c33a25 100644
index ca0aa2acbc1316201d7a9c69e4aad8ffe4d61d83..c32dd209e751f8c0e8e73c91a9d4b2c21c59b883 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -780,19 +780,34 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -778,19 +778,34 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
builder.suggest(completion.suggestion(), PaperAdventure.asVanilla(completion.tooltip()));
}
}

View file

@ -22,10 +22,10 @@ it only impacts data sent from the client.
Set -DPaper.maxSignLength=XX to change limit or -1 to disable
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index b234957d0563f1ccf533f927e60d8b6b77c33a25..8a58c1bdda065edd7b8560cd43e805de3fe0b178 100644
index c32dd209e751f8c0e8e73c91a9d4b2c21c59b883..969fee86d2422cbadfbce18d8bbaf72ff30b5c3d 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -308,6 +308,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -310,6 +310,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
private final MessageSignatureCache messageSignatureCache = MessageSignatureCache.createDefault();
private final FutureChain chatMessageChain;
private boolean waitingForSwitchToConfig;
@ -33,7 +33,7 @@ index b234957d0563f1ccf533f927e60d8b6b77c33a25..8a58c1bdda065edd7b8560cd43e805de
public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player, CommonListenerCookie clientData) {
super(server, connection, clientData, player); // CraftBukkit
@@ -3201,7 +3202,19 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -3260,7 +3261,19 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@Override
public void handleSignUpdate(ServerboundSignUpdatePacket packet) {

View file

@ -26,10 +26,10 @@ index f55832ce841621daab4d3a910650ab6562cefcda..f635da34335cd2901adf975fcd74c5c6
});
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 01c4f405692116813bbd3d851738f52a50b548a2..ddff9f9f5322f62286f32161888e1b6a160fddfd 100644
index 52e2137f759e52d210abda7b47c1fd4b5f831d1f..209257ed04623ea41b7aba40b0b03a88a7f4eb21 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1177,6 +1177,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -1178,6 +1178,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
return true;
}
// Paper end - extra debug info
@ -38,10 +38,10 @@ index 01c4f405692116813bbd3d851738f52a50b548a2..ddff9f9f5322f62286f32161888e1b6a
// WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getKey(entity.getType())); // CraftBukkit
return false;
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 3fbdc6394c1f431d1bf8ee13513a69b96f69bdd9..33677b85b2727134dfe98c31e7395caf615b1c08 100644
index 71352f1b86c594ea2edf5d1735410054d909291a..49d4feda5b352bd135aadf3c4677d236134861b0 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -716,7 +716,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
@@ -714,7 +714,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
ServerLevel worldserver = (ServerLevel) world;
CompoundTag nbttagcompound = ((CompoundTag) nbt.get()).getCompound("RootVehicle");
Entity entity = EntityType.loadEntityRecursive(nbttagcompound.getCompound("Entity"), worldserver, EntitySpawnReason.LOAD, (entity1) -> {
@ -67,7 +67,7 @@ index 97b48186a48ca037645d4a5ae84e3a95fd413a33..a04cfa09d9f8594a7ad3120855efe164
String s1 = connection.getLoggableAddress(this.server.logIPs());
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index a430a3e2c3b4ae53cad1fbaf4dd71b9e2f24ccf7..49310b11116259193a93aca37da9c6a6949eb948 100644
index 3cc210dc92f74c37f4de6eaf31ff3ec7aa11248a..e932bd4c922d7015bba0ef06e349d74f5c1a209c 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -256,6 +256,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@ -78,7 +78,7 @@ index a430a3e2c3b4ae53cad1fbaf4dd71b9e2f24ccf7..49310b11116259193a93aca37da9c6a6
private CraftEntity bukkitEntity;
@@ -2391,6 +2392,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -2414,6 +2415,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
nbttagcompound.put("Paper.Origin", this.newDoubleList(origin.getX(), origin.getY(), origin.getZ()));
}
@ -88,7 +88,7 @@ index a430a3e2c3b4ae53cad1fbaf4dd71b9e2f24ccf7..49310b11116259193a93aca37da9c6a6
// Save entity's from mob spawner status
if (spawnedViaMobSpawner) {
nbttagcompound.putBoolean("Paper.FromMobSpawner", true);
@@ -2538,6 +2542,26 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -2563,6 +2567,26 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
spawnedViaMobSpawner = nbt.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status
@ -116,7 +116,7 @@ index a430a3e2c3b4ae53cad1fbaf4dd71b9e2f24ccf7..49310b11116259193a93aca37da9c6a6
} catch (Throwable throwable) {
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
index 8f4ec4f0ea7ff2f9a952120785aea65f6559f897..989b766bc166141a391e0a7c1a5eb815e20acfac 100644
index 768edafa018961ce38306f87e5cfe6aa99537305..d62c17c01f39d41d7cd422d37326a66791804090 100644
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
@@ -433,7 +433,7 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
@ -173,7 +173,7 @@ index 2eecdcbea3d51b1fb6e0c3db0667464a699ca0df..c68ddccd5fbe27f6a62cedbdc2337f1b
this.discard(EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause
}
diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
index 6c7f644738548da30908a08dcfde8142b597c0b7..80637835a35dbfd7c7458b246ddee9d836e5101a 100644
index 23b7894761ef8871a7771e228b39ff01702afbcd..ae18b23e07b1aa7505b54f0512b1612e5f3da6db 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
@@ -214,7 +214,12 @@ public abstract class Projectile extends Entity implements TraceableEntity {
@ -247,20 +247,20 @@ index fc26713a869d0c1fad1634ef4a6c6282fef5aa31..4f8224841865f956aaa969ab7f543c80
}
}
diff --git a/src/main/java/net/minecraft/world/level/block/entity/SculkShriekerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SculkShriekerBlockEntity.java
index dc6b18527222d23e9719e2210b684a1aa797c70d..ea53c25c350c0cf8e0360ea409cd1f69a62054a8 100644
index 32f0493bac35e8c931ba2950f604a1f2cdd883c6..4bc3eded897b067e00c8e310c1be603aa7097ac4 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/SculkShriekerBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/SculkShriekerBlockEntity.java
@@ -189,7 +189,7 @@ public class SculkShriekerBlockEntity extends BlockEntity implements GameEventLi
@@ -190,7 +190,7 @@ public class SculkShriekerBlockEntity extends BlockEntity implements GameEventLi
private boolean trySummonWarden(ServerLevel world) {
return this.warningLevel >= 4
- && SpawnUtil.trySpawnMob(EntityType.WARDEN, EntitySpawnReason.TRIGGERED, world, this.getBlockPos(), 20, 5, 6, SpawnUtil.Strategy.ON_TOP_OF_COLLIDER)
+ && SpawnUtil.trySpawnMob(EntityType.WARDEN, EntitySpawnReason.TRIGGERED, world, this.getBlockPos(), 20, 5, 6, SpawnUtil.Strategy.ON_TOP_OF_COLLIDER, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL, null) // Paper - Entity#getEntitySpawnReason
&& SpawnUtil.trySpawnMob(
- EntityType.WARDEN, EntitySpawnReason.TRIGGERED, world, this.getBlockPos(), 20, 5, 6, SpawnUtil.Strategy.ON_TOP_OF_COLLIDER, false
+ EntityType.WARDEN, EntitySpawnReason.TRIGGERED, world, this.getBlockPos(), 20, 5, 6, SpawnUtil.Strategy.ON_TOP_OF_COLLIDER, false, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL, null // Paper - Entity#getEntitySpawnReason
)
.isPresent();
}
diff --git a/src/main/java/net/minecraft/world/level/block/entity/trialspawner/TrialSpawner.java b/src/main/java/net/minecraft/world/level/block/entity/trialspawner/TrialSpawner.java
index f0163b7fa8b27823db9df5b8d2b6adcb63023164..de9d00ec932c8d07b28dd68ac9b8e6d5b94f7a8d 100644
index 150a525772dd87f0aca39ad74f0bcefa0693d7d8..476caf7fb4f0124daa35822f2161e11620f18621 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/trialspawner/TrialSpawner.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/trialspawner/TrialSpawner.java
@@ -231,6 +231,7 @@ public final class TrialSpawner {

View file

@ -6,7 +6,7 @@ Subject: [PATCH] Server Tick Events
Fires event at start and end of a server tick
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index feb45369b41b597fd603c12f3da23759923b6a6d..2690048e2ac612f0d1261bcdecf5f745ebbddec2 100644
index d69af4ad646134fa79dea8a845f2311a9a0cb086..a7eeb4f3098a4bea05592890b5fecbfbac3090e4 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1481,6 +1481,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa

View file

@ -11,10 +11,10 @@ Example Usage: https://gist.github.com/aikar/5bb202de6057a051a950ce1f29feb0b4
public net.minecraft.world.entity.player.Inventory compartments
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 33677b85b2727134dfe98c31e7395caf615b1c08..2e81c8dc6bad9e4e2f2847bf841d3fee8cbfbeed 100644
index 49d4feda5b352bd135aadf3c4677d236134861b0..7ef374236e6a08d74fe2d71280e23dac73fb5c54 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1157,6 +1157,46 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
@@ -1154,6 +1154,46 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
});
}
@ -61,7 +61,7 @@ index 33677b85b2727134dfe98c31e7395caf615b1c08..2e81c8dc6bad9e4e2f2847bf841d3fee
@Override
public void die(DamageSource damageSource) {
// this.gameEvent(GameEvent.ENTITY_DIE); // Paper - move below event cancellation check
@@ -1241,7 +1281,12 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
@@ -1238,7 +1278,12 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
this.dropExperience(this.serverLevel(), damageSource.getEntity());
// we clean the player's inventory after the EntityDeathEvent is called so plugins can get the exact state of the inventory.
if (!event.getKeepInventory()) {

View file

@ -10,10 +10,10 @@ Optimize to check if the captured list even has values in it, and also to
just do a get call since the value can never be null.
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 0f4b9b5d3e34b5e08f9ca2f78c5e8bcec9f5a85e..1e22ee380237a33c506316e3cfe3f6efb7f9ae4a 100644
index 7d1d009def581b83794425892f454b4d2a76c634..36d183d6b52185405f3dbf67d09bc21631e86870 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -865,9 +865,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -866,9 +866,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@Nullable
public BlockEntity getBlockEntity(BlockPos blockposition, boolean validate) {

View file

@ -25,7 +25,7 @@ P3) Solutions for 1) and especially 2) might not be future-proof, while this
server-internal fix makes this change future-proof.
diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
index 80637835a35dbfd7c7458b246ddee9d836e5101a..0e4ba92d97998937ccb83ebd60aaad3fb68f7546 100644
index ae18b23e07b1aa7505b54f0512b1612e5f3da6db..5cff58ab33657e7fb2642928e42b728e7b0b4689 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
@@ -192,8 +192,11 @@ public abstract class Projectile extends Entity implements TraceableEntity {

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Prevent consuming the wrong itemstack
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 901336aac08f4c49328316aeccb7c48a591ed6b0..caf74116e44a9e3269cec9b65708e604403ffc77 100644
index 782c187d2b4f706463a1e643f1976512104797a6..4e6bd9f2e8a1a3b3db8e7fff88eefe88a0f2be65 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3994,9 +3994,14 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -4001,9 +4001,14 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
public void startUsingItem(InteractionHand hand) {
@ -24,7 +24,7 @@ index 901336aac08f4c49328316aeccb7c48a591ed6b0..caf74116e44a9e3269cec9b65708e604
this.useItem = itemstack;
this.useItemRemaining = itemstack.getUseDuration(this);
if (!this.level().isClientSide) {
@@ -4067,6 +4072,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -4074,6 +4079,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.releaseUsingItem();
} else {
if (!this.useItem.isEmpty() && this.isUsingItem()) {
@ -32,7 +32,7 @@ index 901336aac08f4c49328316aeccb7c48a591ed6b0..caf74116e44a9e3269cec9b65708e604
// CraftBukkit start - fire PlayerItemConsumeEvent
ItemStack itemstack;
PlayerItemConsumeEvent event = null; // Paper
@@ -4104,8 +4110,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -4111,8 +4117,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
this.stopUsingItem();

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Dont send unnecessary sign update
diff --git a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
index 469d0046ba98289e98aa0f3f66e3ed27026a98a2..3339130f3a02e6e395bcd8e3047b35f6f4eca9a9 100644
index 0e80e4f01e0175a9a2e90dc950ba0580af6b1520..9861388bdca8d32b7e9a49a251088c98283d8234 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
@@ -185,6 +185,7 @@ public class SignBlockEntity extends BlockEntity {

View file

@ -33,7 +33,7 @@ But for those who are ok with leaving this inconsistent behavior, you may use WA
It is recommended you regenerate the entities, as these were legit entities, and deserve your love.
diff --git a/src/main/java/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java b/src/main/java/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java
index 412caefe776df6c8e931f6a1a48ea2525ec6610e..aff4c3d63a97d5bbde004a616f7e14fca59b5ab9 100644
index 459a20453d3b447cae20fbe6426dfdc62a34949a..3d8a35d8cf29447ee7ac750dbc6ffcdb0f89b81b 100644
--- a/src/main/java/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java
+++ b/src/main/java/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java
@@ -178,10 +178,51 @@ public class ChunkStatusTasks {

View file

@ -5,10 +5,10 @@ Subject: [PATCH] PlayerDeathEvent#shouldDropExperience
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 2e81c8dc6bad9e4e2f2847bf841d3fee8cbfbeed..00d55b6c5879b706d84ed6b913431e728730da81 100644
index 7ef374236e6a08d74fe2d71280e23dac73fb5c54..a624cab05e9a4308a7f887f9edcf0ec1555f94a8 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1278,7 +1278,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
@@ -1275,7 +1275,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
this.tellNeutralMobsThatIDied();
}
// SPIGOT-5478 must be called manually now

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Prevent bees loading chunks checking hive position
diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java
index b1a72ed404f4bc31f32dd771dd320b7c783c9651..310a2aa23365f9a8a8b7b6fa2323aed792f95adb 100644
index dc5b2797871b40946eb2fbc57c381aceaf2891ad..3f028876ea1959cecce716a568ba839b4953cc1b 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Bee.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java
@@ -514,7 +514,12 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
@@ -518,7 +518,12 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
@Nullable
BeehiveBlockEntity getBeehiveBlockEntity() {

View file

@ -6,10 +6,10 @@ Subject: [PATCH] Optimise EntityGetter#getPlayerByUUID
Use the PlayerList map instead of iterating over all players
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index ddff9f9f5322f62286f32161888e1b6a160fddfd..32117fe89ca946658a7d292b4a470736a09bfa62 100644
index 209257ed04623ea41b7aba40b0b03a88a7f4eb21..6430e759c3d89033418f79c7f7aacb8ca5a5135b 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -336,6 +336,15 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -337,6 +337,15 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
}
// Paper end

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Optimize call to getFluid for explosions
diff --git a/src/main/java/net/minecraft/world/level/ServerExplosion.java b/src/main/java/net/minecraft/world/level/ServerExplosion.java
index d1878f597c3d8119e9b248f4fe8af435ce8c9710..d3d74a7f306d88b0d5cd83893b3ee5e750fd4caf 100644
index 4c03ec11fb2c36291b8b6cb73a7c63eabb9dcd4f..290fd9d57c5de2c92afe23babfcdc3d110a35b9e 100644
--- a/src/main/java/net/minecraft/world/level/ServerExplosion.java
+++ b/src/main/java/net/minecraft/world/level/ServerExplosion.java
@@ -150,7 +150,7 @@ public class ServerExplosion implements Explosion {

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Bees get gravity in void. Fixes MC-167279
diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java
index 310a2aa23365f9a8a8b7b6fa2323aed792f95adb..adff3bec90786b87323653cf4f94a38c7b9ef7ff 100644
index 3f028876ea1959cecce716a568ba839b4953cc1b..a48a29b5b1963db679b053f3530f64d2b9560290 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Bee.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java
@@ -150,7 +150,22 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
@@ -154,7 +154,22 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
public Bee(EntityType<? extends Bee> type, Level world) {
super(type, world);
this.remainingCooldownBeforeLocatingNewFlower = Mth.nextInt(this.random, 20, 60);

View file

@ -314,10 +314,10 @@ index 2bd7f0554bdf668930c990156f65e97e4b64d8bc..6a2af3cd3aebe525a5ff41a801929547
ChunkAccess ichunkaccess1 = (ChunkAccess) chunkresult.orElse(null); // CraftBukkit - decompile error
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 32117fe89ca946658a7d292b4a470736a09bfa62..af3adf1bf771c2327b2972a4f9db9df4c4775f1a 100644
index 6430e759c3d89033418f79c7f7aacb8ca5a5135b..578d284a3e39368c5285eafe84056b081a240e3d 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -415,6 +415,13 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -416,6 +416,13 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
this.getCraftServer().addWorld(this.getWorld()); // CraftBukkit
}

View file

@ -6,7 +6,7 @@ Subject: [PATCH] Improve java version check
Co-Authored-By: MiniDigger <admin@benndorf.dev>
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 2a95a42ade0e82a509f08e2bec7f0c64f55b185c..6eb053f88860ce8693a7baa35eddc9e3fccaced3 100644
index bb3203dc75df1e480b221fb2de44909759bbf07f..d84afe883d5af0800b5c85649a691bc811c2e357 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -203,11 +203,20 @@ public class Main {

View file

@ -7,10 +7,10 @@ Subject: [PATCH] Entity Jump API
public net.minecraft.world.entity.LivingEntity jumping
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index caf74116e44a9e3269cec9b65708e604403ffc77..559c949f5ddf086877a798a7e8eb492c329b62c8 100644
index 4e6bd9f2e8a1a3b3db8e7fff88eefe88a0f2be65..043d4e85b7021c7bec724c3aef76d1278a7d34d5 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3538,8 +3538,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3549,8 +3549,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
} else if (this.isInLava() && (!this.onGround() || d3 > d4)) {
this.jumpInLiquid(FluidTags.LAVA);
} else if ((this.onGround() || flag && d3 <= d4) && this.noJumpDelay == 0) {
@ -36,10 +36,10 @@ index 0b0887b7d2c69138617bee6ec3145f0a83b8734d..705c26ceff9371b09311bd7fa796c0ef
}
diff --git a/src/main/java/net/minecraft/world/entity/monster/Ravager.java b/src/main/java/net/minecraft/world/entity/monster/Ravager.java
index 32973d9c7bf4c4105d7bd82d3723e0b70cd79644..c661ae4e5c07494c7de852cc8d01f0f9839c1590 100644
index 6c909ea334310f1f9b2d9a2e2cc2f23f2badba37..772476d44ee72aed1ba35d10fe51f0ffda34d3f8 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Ravager.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Ravager.java
@@ -174,7 +174,9 @@ public class Ravager extends Raider {
@@ -171,7 +171,9 @@ public class Ravager extends Raider {
}
if (!flag && this.onGround()) {
@ -50,7 +50,7 @@ index 32973d9c7bf4c4105d7bd82d3723e0b70cd79644..c661ae4e5c07494c7de852cc8d01f0f9
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index c4c83b4e17aac23794fdb51acfba4e7ef8451e2c..81034513faa3bd4f306430bc48532ba671a7b94b 100644
index db21f7eeeca48f1df95b37ffa7e9bf7f71f37d5d..c763d3524794a2505a6296917d34b6f7e737402d 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -993,4 +993,20 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Add option to nerf pigmen from nether portals
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 49310b11116259193a93aca37da9c6a6949eb948..8cea6fccdea8965e372983ab3cf8ba61911e439f 100644
index e932bd4c922d7015bba0ef06e349d74f5c1a209c..a330a603349f7f9d694cef66f67ba465e3110a1c 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -407,6 +407,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@ -16,7 +16,7 @@ index 49310b11116259193a93aca37da9c6a6949eb948..8cea6fccdea8965e372983ab3cf8ba61
public boolean spawnedViaMobSpawner; // Paper - Yes this name is similar to above, upstream took the better one
// Paper start - Entity origin API
@javax.annotation.Nullable
@@ -2399,6 +2400,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -2422,6 +2423,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
if (spawnedViaMobSpawner) {
nbttagcompound.putBoolean("Paper.FromMobSpawner", true);
}
@ -26,7 +26,7 @@ index 49310b11116259193a93aca37da9c6a6949eb948..8cea6fccdea8965e372983ab3cf8ba61
// Paper end
return nbttagcompound;
} catch (Throwable throwable) {
@@ -2542,6 +2546,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -2567,6 +2571,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
spawnedViaMobSpawner = nbt.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status
@ -35,7 +35,7 @@ index 49310b11116259193a93aca37da9c6a6949eb948..8cea6fccdea8965e372983ab3cf8ba61
String spawnReasonName = nbt.getString("Paper.SpawnReason");
try {
diff --git a/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java b/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java
index 5d4c0d7fec42bf843b11875f7a09bcb9279b3b54..dea13596eb8a3b7bc69c19545b2227b4c45ed241 100644
index a8cb0d5019d06de64b2cc30e6830bbd6ad43a155..e404722c119631e31c0519111ccd5f1682c2638d 100644
--- a/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java
@@ -89,6 +89,10 @@ public class NetherPortalBlock extends Block implements Portal {

View file

@ -8,10 +8,10 @@ faster on its own, however removing the try catch makes it
easier to inline due to code size
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
index a1b6c13d496519ef6ce240036cec6642626903b9..d4bd4cbc5c4773659662a6d7a09b21a99463c1fb 100644
index 31696856600db18d1dc401b7fa72a7c9ff219304..b6fb9014d0e4de35b0f5a7e9e99f9db7ec89edcd 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -293,18 +293,20 @@ public class LevelChunk extends ChunkAccess {
@@ -298,18 +298,20 @@ public class LevelChunk extends ChunkAccess {
}
public FluidState getFluidState(int x, int y, int z) {
@ -38,7 +38,7 @@ index a1b6c13d496519ef6ce240036cec6642626903b9..d4bd4cbc5c4773659662a6d7a09b21a9
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.forThrowable(throwable, "Getting fluid state");
CrashReportCategory crashreportsystemdetails = crashreport.addCategory("Block being got");
@@ -314,6 +316,7 @@ public class LevelChunk extends ChunkAccess {
@@ -319,6 +321,7 @@ public class LevelChunk extends ChunkAccess {
});
throw new ReportedException(crashreport);
}

View file

@ -125,7 +125,7 @@ index 72f2e81b9905a0d57ed8e2a88578f62d5235c456..7b58b2d6297800c2dcdbf7539e5ab8e7
public static void registerCommands(final MinecraftServer server) {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 2690048e2ac612f0d1261bcdecf5f745ebbddec2..7a4ab569090c758f6d707173aa68dd4de87f3654 100644
index a7eeb4f3098a4bea05592890b5fecbfbac3090e4..e1a15f3721e3c661be0185d65073a39f293f0589 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -263,6 +263,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa

View file

@ -6,7 +6,7 @@ Subject: [PATCH] Add Raw Byte ItemStack Serialization
Serializes using NBT which is safer for server data migrations than bukkits format.
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index 61efb305e25b23fe6309276e15efdb41a46c7738..b50d1ddfd23bf1af16d86e5edcb72196b4674868 100644
index e27f10d0d5720c144729ce83e27aa1c70170ebe2..1e41803952f2410c8f1e213d8be8d141773853d3 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -480,6 +480,53 @@ public final class CraftMagicNumbers implements UnsafeValues {

View file

@ -10,10 +10,10 @@ When not per player it will use the Vanilla mechanic of one delay per
world and the world age for the start day.
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 00d55b6c5879b706d84ed6b913431e728730da81..a4c6f458703cdd794d2825e81ce00e5af63d21bd 100644
index a624cab05e9a4308a7f887f9edcf0ec1555f94a8..df409f2dc2c49282f128a9fdd9c248a2f6d9a7c9 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -297,6 +297,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
@@ -295,6 +295,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
public boolean wonGame;
private int containerUpdateDelay; // Paper - Configurable container update tick rate
public long loginTime; // Paper - Replace OfflinePlayer#getLastPlayed

View file

@ -25,10 +25,10 @@ index 9baec6e78bdebd9b38b3f12e4fba99f9ad039c1e..914e9e0af7533cbf487ea0413da447d5
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 af3adf1bf771c2327b2972a4f9db9df4c4775f1a..161b556e5c5f3719b5623e71876a2250abc7f391 100644
index 578d284a3e39368c5285eafe84056b081a240e3d..eb65b1768c46f3cc3f490b06c2215044aebab178 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2207,7 +2207,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -2213,7 +2213,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
public void onTrackingStart(Entity entity) {
org.spigotmc.AsyncCatcher.catchOp("entity register"); // Spigot
@ -37,7 +37,7 @@ index af3adf1bf771c2327b2972a4f9db9df4c4775f1a..161b556e5c5f3719b5623e71876a2250
if (entity instanceof ServerPlayer entityplayer) {
ServerLevel.this.players.add(entityplayer);
ServerLevel.this.updateSleepingPlayerList();
@@ -2237,6 +2237,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -2243,6 +2243,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
entity.updateDynamicGameEventListener(DynamicGameEventListener::add);
entity.inWorld = true; // CraftBukkit - Mark entity as in world
entity.valid = true; // CraftBukkit

View file

@ -7,10 +7,10 @@ Causes sync chunk loads and who knows what all else.
This is safe because Spectators are skipped in unloaded chunks too in vanilla.
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index a4c6f458703cdd794d2825e81ce00e5af63d21bd..9f3a7ba170b729fad228e212436f15bb8169f906 100644
index df409f2dc2c49282f128a9fdd9c248a2f6d9a7c9..957266d14ce2b9b99f7c97289458fc837e4d665a 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -993,7 +993,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
@@ -990,7 +990,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
public void doTick() {
try {

View file

@ -7,10 +7,10 @@ This fixes a lot of game state issues where packets were delayed for processing
due to 1.15's new queue but processed while dead.
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
index 4d8929a1f5390af10fbde1dcc13c0136b0a3a745..917ac21794f1aabc6e95ab2fff2ea7547b9778a8 100644
index 858f123934021b7a3911d3d5cfcb8352293a8302..c23b8f00d7ce3a46f9d104ffae5e4c6124a111ce 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -1143,7 +1143,7 @@ public abstract class Player extends LivingEntity {
@@ -1146,7 +1146,7 @@ public abstract class Player extends LivingEntity {
@Override
protected boolean isImmobile() {

View file

@ -13,10 +13,10 @@ By skipping this, we avoid potential for a large spike on server start.
public net.minecraft.server.level.ServerPlayer fudgeSpawnLocation(Lnet/minecraft/server/level/ServerLevel;)V
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 9f3a7ba170b729fad228e212436f15bb8169f906..5437ccea0205c23435de3584b26ee5a48afc5d1b 100644
index 957266d14ce2b9b99f7c97289458fc837e4d665a..21f7b26bbf2b3e231032b7a09fa6e82f8244f495 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -419,7 +419,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
@@ -417,7 +417,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
this.server = server;
this.stats = server.getPlayerList().getPlayerStats(this);
this.advancements = server.getPlayerList().getPlayerAdvancements(this);
@ -25,7 +25,7 @@ index 9f3a7ba170b729fad228e212436f15bb8169f906..5437ccea0205c23435de3584b26ee5a4
this.updateOptions(clientOptions);
this.object = null;
@@ -856,7 +856,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
@@ -854,7 +854,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
position = Vec3.atCenterOf(world.getSharedSpawnPos());
}
this.setLevel(world);

View file

@ -5,19 +5,19 @@ Subject: [PATCH] Prevent opening inventories when frozen
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 5437ccea0205c23435de3584b26ee5a48afc5d1b..0c68c0a9ec9b353b353eff0c36af2993df5f59b3 100644
index 21f7b26bbf2b3e231032b7a09fa6e82f8244f495..ba6dbbd56f5b0c2eb5566172e64fbf258f146ef0 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -938,7 +938,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
containerUpdateDelay = this.level().paperConfig().tickRates.containerUpdate;
@@ -935,7 +935,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
this.containerUpdateDelay = this.level().paperConfig().tickRates.containerUpdate;
}
// Paper end - Configurable container update tick rate
- if (!this.level().isClientSide && !this.containerMenu.stillValid(this)) {
+ if (!this.level().isClientSide && this.containerMenu != this.inventoryMenu && (this.isImmobile() || !this.containerMenu.stillValid(this))) { // Paper - Prevent opening inventories when frozen
- if (!this.containerMenu.stillValid(this)) {
+ if (this.containerMenu != this.inventoryMenu && (this.isImmobile() || !this.containerMenu.stillValid(this))) { // Paper - Prevent opening inventories when frozen
this.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.CANT_USE); // Paper - Inventory close reason
this.containerMenu = this.inventoryMenu;
}
@@ -1903,7 +1903,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
@@ -1886,7 +1886,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
} else {
// CraftBukkit start
this.containerMenu = container;

View file

@ -12,10 +12,10 @@ The entity's current team collision rule causes them to NEVER collide.
Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 559c949f5ddf086877a798a7e8eb492c329b62c8..428881b560f30cd7804dfc660a62f0ec94bd7f4c 100644
index 043d4e85b7021c7bec724c3aef76d1278a7d34d5..77c924d5eecd8ee7fae0c6b49d46a6c91abc969a 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3682,10 +3682,24 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3693,10 +3693,24 @@ public abstract class LivingEntity extends Entity implements Attackable {
if (!(world instanceof ServerLevel worldserver)) {
this.level().getEntities(EntityTypeTest.forClass(net.minecraft.world.entity.player.Player.class), this.getBoundingBox(), EntitySelector.pushableBy(this)).forEach(this::doPush);
} else {

View file

@ -88,10 +88,10 @@ index 0000000000000000000000000000000000000000..b6f4400df3d8ec7e06a996de54f8cabb
+ }
+}
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 0c68c0a9ec9b353b353eff0c36af2993df5f59b3..eebf44c7124c4f48b6d48562a00633b1e8ff9b00 100644
index ba6dbbd56f5b0c2eb5566172e64fbf258f146ef0..d00d43697d7fc5b7fa162fd4e773f21fb5594087 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -420,7 +420,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
@@ -418,7 +418,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
this.stats = server.getPlayerList().getPlayerStats(this);
this.advancements = server.getPlayerList().getPlayerAdvancements(this);
// this.moveTo(this.adjustSpawnLocation(world, world.getSharedSpawnPos()).getBottomCenter(), 0.0F, 0.0F); // Paper - Don't move existing players to world spawn
@ -100,7 +100,7 @@ index 0c68c0a9ec9b353b353eff0c36af2993df5f59b3..eebf44c7124c4f48b6d48562a00633b1
this.object = null;
// CraftBukkit start
@@ -2405,6 +2405,19 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
@@ -2385,6 +2385,19 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
}
public void updateOptions(ClientInformation clientOptions) {
@ -120,7 +120,7 @@ index 0c68c0a9ec9b353b353eff0c36af2993df5f59b3..eebf44c7124c4f48b6d48562a00633b1
// CraftBukkit start
if (this.getMainArm() != clientOptions.mainHand()) {
PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(this.getBukkitEntity(), this.getMainArm() == HumanoidArm.LEFT ? MainHand.LEFT : MainHand.RIGHT);
@@ -2415,6 +2428,11 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
@@ -2395,6 +2408,11 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
this.server.server.getPluginManager().callEvent(event);
}
// CraftBukkit end
@ -133,7 +133,7 @@ index 0c68c0a9ec9b353b353eff0c36af2993df5f59b3..eebf44c7124c4f48b6d48562a00633b1
this.adventure$locale = java.util.Objects.requireNonNullElse(net.kyori.adventure.translation.Translator.parseLocale(this.language), java.util.Locale.US); // Paper
this.requestedViewDistance = clientOptions.viewDistance();
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 7c7f66ea38babab7b04e76d14e19cc0dac9c4b54..574bcdd1d10c0341afc324822d9cd28af3fc2fdd 100644
index e548834f2bd6e1e0a510a14040cc6aca63e2e6f5..589c78cf8acc8868be686123ac893421b4848239 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -658,6 +658,30 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

View file

@ -7,7 +7,7 @@ Subject: [PATCH] Don't crash if player is attempted to be removed from
I suspect it deals with teleporting as it uses players current x/y/z
diff --git a/src/main/java/net/minecraft/server/level/DistanceManager.java b/src/main/java/net/minecraft/server/level/DistanceManager.java
index 6c2339d6a93172e25040c4868a3a47473a1f5336..f7c2c03749d6be25bf33afd61e1da120770b3432 100644
index e7bca3db8c7d29fe984decddda83569ef921cc31..c24644d5a77d87ae6c139f9598feafea308f2158 100644
--- a/src/main/java/net/minecraft/server/level/DistanceManager.java
+++ b/src/main/java/net/minecraft/server/level/DistanceManager.java
@@ -281,8 +281,8 @@ public abstract class DistanceManager {

View file

@ -43,10 +43,10 @@ index 914e9e0af7533cbf487ea0413da447d5eb8d527b..69f54e812794b23e5f54606da86f7116
EntityType<?> entitytypes = entity.getType();
int i = entitytypes.clientTrackingRange() * 16;
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index eebf44c7124c4f48b6d48562a00633b1e8ff9b00..8c80a852ed00c2bf79bb68da9d535af425893deb 100644
index d00d43697d7fc5b7fa162fd4e773f21fb5594087..07b1bc1a06ac1fec83ba76a73b3cc1bd8f560208 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -317,6 +317,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
@@ -315,6 +315,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
public double maxHealthCache;
public boolean joining = true;
public boolean sentListPacket = false;

View file

@ -84,10 +84,10 @@ index ac5725230b04bc1a333863e251fe86580f909ea9..54de4e701adea123c0fdfb5787e95169
}
// Paper end - Entity#getEntitySpawnReason
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 8cea6fccdea8965e372983ab3cf8ba61911e439f..dce9bdf371ebbfd4407ac7ca940df29777384232 100644
index a330a603349f7f9d694cef66f67ba465e3110a1c..e5c280df931fc712e41f4decfeb2871b870d2e4a 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2503,27 +2503,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -2528,27 +2528,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
// CraftBukkit end

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerAttackEntityCooldownResetEvent
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 428881b560f30cd7804dfc660a62f0ec94bd7f4c..06cac1b4c9e97cade7dd6e7971ca06e934b495ac 100644
index 77c924d5eecd8ee7fae0c6b49d46a6c91abc969a..52a1581a301a3aa481b4fe4afc978b0e426e814b 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -2353,7 +2353,17 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -2364,7 +2364,17 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
if (damagesource.getEntity() instanceof net.minecraft.world.entity.player.Player) {

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Don't fire BlockFade on worldgen threads
diff --git a/src/main/java/net/minecraft/world/level/block/FireBlock.java b/src/main/java/net/minecraft/world/level/block/FireBlock.java
index f44457c0d75efe323cc8242ef5173a3d5067fad0..065d6164b5c9d65d20e7790c607d77e9ad70dfef 100644
index 422e5750669457bea6e4b8de799d289e8e315a09..bd7835a8b470662b32cc28a4d8f777d4bb8dc60c 100644
--- a/src/main/java/net/minecraft/world/level/block/FireBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/FireBlock.java
@@ -108,6 +108,7 @@ public class FireBlock extends BaseFireBlock {

View file

@ -17,7 +17,7 @@ index 3a4c1d4afddd7d8d1f43554a7a08855686cadf56..b8d57e25851dd7da905100dfd4022e4b
private EntitySelector() {}
// Paper start - Affects Spawning API
diff --git a/src/main/java/net/minecraft/world/entity/monster/Phantom.java b/src/main/java/net/minecraft/world/entity/monster/Phantom.java
index 748f07c7036fe5955d76e28c4e7d23f8c0235d5f..d0820b3a561db7e1e5667594b2b6ea13214dfa58 100644
index 93013ca49e56f3ac47d67d0c48d87d53fca32a4f..1171a4e45bed0455b29b2cf012fbc2883b16d061 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Phantom.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Phantom.java
@@ -550,6 +550,7 @@ public class Phantom extends FlyingMob implements Enemy {

View file

@ -16,10 +16,10 @@ So even if something NEW comes up, it would be impossible to drop the
same item twice because the source was destroyed.
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index dce9bdf371ebbfd4407ac7ca940df29777384232..5ed8a86b6525992a3e8ffa63feef82e29180f0e9 100644
index e5c280df931fc712e41f4decfeb2871b870d2e4a..15d084e983e8cdfd00dda7fcc2d3c6fac9317cf2 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2631,11 +2631,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -2656,11 +2656,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
} else {
// CraftBukkit start - Capture drops for death event
if (this instanceof net.minecraft.world.entity.LivingEntity && !((net.minecraft.world.entity.LivingEntity) this).forceDrops) {
@ -34,7 +34,7 @@ index dce9bdf371ebbfd4407ac7ca940df29777384232..5ed8a86b6525992a3e8ffa63feef82e2
entityitem.setDefaultPickUpDelay();
// CraftBukkit start
@@ -3463,6 +3464,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -3493,6 +3494,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
public Entity teleport(TeleportTransition teleportTarget) {
Level world = this.level();
@ -47,7 +47,7 @@ index dce9bdf371ebbfd4407ac7ca940df29777384232..5ed8a86b6525992a3e8ffa63feef82e2
if (world instanceof ServerLevel worldserver) {
if (!this.isRemoved()) {
// CraftBukkit start
@@ -3551,6 +3558,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -3581,6 +3588,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
gameprofilerfiller.pop();
return null;
} else {
@ -59,7 +59,7 @@ index dce9bdf371ebbfd4407ac7ca940df29777384232..5ed8a86b6525992a3e8ffa63feef82e2
entity.restoreFrom(this);
this.removeAfterChangingDimensions();
// CraftBukkit start - Forward the CraftEntity to the new entity
@@ -3663,6 +3675,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -3693,6 +3705,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
public boolean canTeleport(Level from, Level to) {
@ -68,23 +68,23 @@ index dce9bdf371ebbfd4407ac7ca940df29777384232..5ed8a86b6525992a3e8ffa63feef82e2
Iterator iterator = this.getPassengers().iterator();
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 06cac1b4c9e97cade7dd6e7971ca06e934b495ac..911dcfb9b34d94e38db71c17022b8a8c1e707eb7 100644
index 52a1581a301a3aa481b4fe4afc978b0e426e814b..9a4bcbfde22ea3c7761099152db8f793c01aedb5 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -1765,9 +1765,9 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -1776,9 +1776,9 @@ public abstract class LivingEntity extends Entity implements Attackable {
// Paper start
org.bukkit.event.entity.EntityDeathEvent deathEvent = this.dropAllDeathLoot(worldserver, damageSource);
if (deathEvent == null || !deathEvent.isCancelled()) {
- if (this.deathScore >= 0 && entityliving != null) {
- entityliving.awardKillScore(this, this.deathScore, damageSource);
- if (entityliving != null) {
- entityliving.awardKillScore(this, damageSource);
- }
+ // if (this.deathScore >= 0 && entityliving != null) { // Paper - Fix item duplication and teleport issues; moved to be run earlier in #dropAllDeathLoot before destroying the drop items in CraftEventFactory#callEntityDeathEvent
+ // entityliving.awardKillScore(this, this.deathScore, damageSource);
+ //if (entityliving != null) { // Paper - Fix item duplication and teleport issues; moved to be run earlier in #dropAllDeathLoot before destroying the drop items in CraftEventFactory#callEntityDeathEvent
+ // entityliving.awardKillScore(this, damageSource);
+ //}
// Paper start - clear equipment if event is not cancelled
if (this instanceof Mob) {
for (EquipmentSlot slot : this.clearedEquipmentSlots) {
@@ -1861,8 +1861,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -1872,8 +1872,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.dropCustomDeathLoot(world, damageSource, flag);
this.clearEquipmentSlots = prev; // Paper
}

View file

@ -17,7 +17,7 @@ keeping long lived large direct buffers in cache.
Set system properly at server startup if not set already to help protect from this.
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 6eb053f88860ce8693a7baa35eddc9e3fccaced3..29838b7c28409776e124641878def8d6d87630f5 100644
index d84afe883d5af0800b5c85649a691bc811c2e357..dd2e1ff287ccb86b7ba714604672d2f3d7ef8c61 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -27,6 +27,7 @@ public class Main {

View file

@ -49,7 +49,7 @@ index 642d5c6849debc5a266605b0df30d55222339438..b34abf66c7dc756e88e08637af976f77
StackTraceElement[] astacktraceelement = exception.getStackTrace();
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 7a4ab569090c758f6d707173aa68dd4de87f3654..c84a5bdbea0497231c78c9a0230cdf70e30a2ff3 100644
index e1a15f3721e3c661be0185d65073a39f293f0589..8e205796d0c9abbf01bf6ec191e2dfc7b972a0dd 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -929,6 +929,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Prevent teleporting dead entities
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 59c12f6d5d96835b4b37ed5a761f25f8f147c54a..6c9f7a4d3c7551157d22f17e8a66ada2c50c0550 100644
index 969fee86d2422cbadfbce18d8bbaf72ff30b5c3d..d754eda8e8111886e610bc68e8980b54b43eadb1 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1571,6 +1571,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1625,6 +1625,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
}
public void internalTeleport(PositionMoveRotation positionmoverotation, Set<Relative> set) {

Some files were not shown because too many files have changed in this diff Show more