3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-15 02:50:09 +01:00

More patchidy patched patch patches

Dieser Commit ist enthalten in:
Nassim Jahnke 2022-12-07 22:57:15 +01:00
Ursprung f207880ec8
Commit f8430d1de7
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B
55 geänderte Dateien mit 176 neuen und 233 gelöschten Zeilen

Datei anzeigen

@ -27,7 +27,7 @@ index bb5c4ecd43aa344dfe9cca8ab7c2ebf9760e94cf..203786383387765d1f5a2d2ccce79d79
playerName = gameProfile.getName(); playerName = gameProfile.getName();
uniqueId = gameProfile.getId(); uniqueId = gameProfile.getId();
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index fb1e740b2a44c5f4b2d638303fc4f30b6aac08a2..b4a511c8c701949c614a7fd5a7b3e51d278dc27a 100644 index fb1e740b2a44c5f4b2d638303fc4f30b6aac08a2..5a43e1bd537ac4431b3a7f508ec0b3ca48c8150f 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -81,6 +81,7 @@ import net.minecraft.world.entity.ai.attributes.Attributes; @@ -81,6 +81,7 @@ import net.minecraft.world.entity.ai.attributes.Attributes;
@ -132,7 +132,7 @@ index fb1e740b2a44c5f4b2d638303fc4f30b6aac08a2..b4a511c8c701949c614a7fd5a7b3e51d
+ +
+ //Respawn the player then update their position and selected slot + //Respawn the player then update their position and selected slot
+ ServerLevel worldserver = handle.getLevel(); + ServerLevel worldserver = handle.getLevel();
+ connection.send(new net.minecraft.network.protocol.game.ClientboundRespawnPacket(worldserver.dimensionTypeId(), worldserver.dimension(), BiomeManager.obfuscateSeed(worldserver.getSeed()), handle.gameMode.getGameModeForPlayer(), handle.gameMode.getPreviousGameModeForPlayer(), worldserver.isDebug(), worldserver.isFlat(), (byte) 1, this.getHandle().getLastDeathLocation())); + connection.send(new net.minecraft.network.protocol.game.ClientboundRespawnPacket(worldserver.dimensionTypeId(), worldserver.dimension(), BiomeManager.obfuscateSeed(worldserver.getSeed()), handle.gameMode.getGameModeForPlayer(), handle.gameMode.getPreviousGameModeForPlayer(), worldserver.isDebug(), worldserver.isFlat(), net.minecraft.network.protocol.game.ClientboundRespawnPacket.KEEP_ALL_DATA, this.getHandle().getLastDeathLocation()));
+ handle.onUpdateAbilities(); + handle.onUpdateAbilities();
+ connection.internalTeleport(loc.getX(), loc.getY(), loc.getZ(), loc.getYaw(), loc.getPitch(), java.util.Collections.emptySet(), false); + connection.internalTeleport(loc.getX(), loc.getY(), loc.getZ(), loc.getYaw(), loc.getPitch(), java.util.Collections.emptySet(), false);
+ net.minecraft.server.MinecraftServer.getServer().getPlayerList().sendAllPlayerInfo(handle); + net.minecraft.server.MinecraftServer.getServer().getPlayerList().sendAllPlayerInfo(handle);

Datei anzeigen

@ -18,10 +18,10 @@ index d2fed123ed56eaf550ac2c7a3fcc1678a127bba3..77443525e68fab0211ff48af12020ff0
} }
} }
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 045f1b81e568d9adca8e5f9374b5a3ce1267d118..ff7298b9ecd11349dfe57aec4ed0ed0b458faa23 100644 index 88c1393d4a68c938e65852b9aaa74a7de0043f0d..1602af65ac25e9029d6628ba20aa42a069cee23a 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2716,8 +2716,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -2681,8 +2681,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
// Refresh the current entity metadata // Refresh the current entity metadata
entity.getEntityData().refresh(player); entity.getEntityData().refresh(player);
// SPIGOT-7136 - Allays // SPIGOT-7136 - Allays

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Prevent tile entity copies loading chunks
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index b51e0dfad64cf9844bd511689786a456f7c8e48e..93603aabe8b96c8d85a355dcf8c2d5ca45036f89 100644 index 472f7c246542c08840ea7f18711c13d875e35608..40794142f7882b6f95e00ffe286b590a4f0bf62d 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -3319,7 +3319,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -3284,7 +3284,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
BlockPos blockposition = BlockEntity.getPosFromTag(nbttagcompound); BlockPos blockposition = BlockEntity.getPosFromTag(nbttagcompound);
if (this.player.level.isLoaded(blockposition)) { if (this.player.level.isLoaded(blockposition)) {

Datei anzeigen

@ -18,10 +18,10 @@ index 5b46cabf4f2e2a1f7feaad378dd98d64aeef8671..51b3db0b6c2cede95b584268e035c0fb
if (dedicatedserverproperties.enableQuery) { if (dedicatedserverproperties.enableQuery) {
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 93603aabe8b96c8d85a355dcf8c2d5ca45036f89..b5a8bea33fbaf0cf793808a1bba364a2d87431be 100644 index 40794142f7882b6f95e00ffe286b590a4f0bf62d..9133213a8a786f2293bc1a09a44be46b1a8bc011 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2910,7 +2910,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -2875,7 +2875,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
this.player = this.server.getPlayerList().respawn(this.player, false); this.player = this.server.getPlayerList().respawn(this.player, false);
if (this.server.isHardcore()) { if (this.server.isHardcore()) {
this.player.setGameMode(GameType.SPECTATOR, org.bukkit.event.player.PlayerGameModeChangeEvent.Cause.HARDCORE_DEATH, null); // Paper this.player.setGameMode(GameType.SPECTATOR, org.bukkit.event.player.PlayerGameModeChangeEvent.Cause.HARDCORE_DEATH, null); // Paper

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerStopUsingItemEvent
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 655253c267925a704e55abe23f1142c15ecb8d2e..5463b2fd9fdb8c979baa49479e3dbd7eb2d6dda7 100644 index 2ee07665521804157e4c0a3f6f09455b14b2867f..efe719de95fb38b6770b9ce9c93590d7c1522ea3 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3949,6 +3949,7 @@ public abstract class LivingEntity extends Entity { @@ -3974,6 +3974,7 @@ public abstract class LivingEntity extends Entity {
public void releaseUsingItem() { public void releaseUsingItem() {
if (!this.useItem.isEmpty()) { if (!this.useItem.isEmpty()) {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] FallingBlock auto expire setting
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
index da00fab453f3fb580acc9de65a0853656f9b6fc4..b2d1a17867cdbaad0c6e5c2376c716f9461af124 100644 index 23bd2a9af71b63bf463c7091ac261b033e9ce9af..72f1866226269396ba0f0c1be269e237925d9322 100644
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java --- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
@@ -61,6 +61,7 @@ public class FallingBlockEntity extends Entity { @@ -63,6 +63,7 @@ public class FallingBlockEntity extends Entity {
@Nullable @Nullable
public CompoundTag blockData; public CompoundTag blockData;
protected static final EntityDataAccessor<BlockPos> DATA_START_POS = SynchedEntityData.defineId(FallingBlockEntity.class, EntityDataSerializers.BLOCK_POS); protected static final EntityDataAccessor<BlockPos> DATA_START_POS = SynchedEntityData.defineId(FallingBlockEntity.class, EntityDataSerializers.BLOCK_POS);
@ -16,7 +16,7 @@ index da00fab453f3fb580acc9de65a0853656f9b6fc4..b2d1a17867cdbaad0c6e5c2376c716f9
public FallingBlockEntity(EntityType<? extends FallingBlockEntity> type, Level world) { public FallingBlockEntity(EntityType<? extends FallingBlockEntity> type, Level world) {
super(type, world); super(type, world);
@@ -175,7 +176,7 @@ public class FallingBlockEntity extends Entity { @@ -177,7 +178,7 @@ public class FallingBlockEntity extends Entity {
} }
if (!this.onGround && !flag1) { if (!this.onGround && !flag1) {
@ -25,7 +25,7 @@ index da00fab453f3fb580acc9de65a0853656f9b6fc4..b2d1a17867cdbaad0c6e5c2376c716f9
if (this.dropItem && this.level.getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) { if (this.dropItem && this.level.getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) {
this.spawnAtLocation((ItemLike) block); this.spawnAtLocation((ItemLike) block);
} }
@@ -321,6 +322,7 @@ public class FallingBlockEntity extends Entity { @@ -323,6 +324,7 @@ public class FallingBlockEntity extends Entity {
if (this.blockData != null) { if (this.blockData != null) {
nbt.put("TileEntityData", this.blockData); nbt.put("TileEntityData", this.blockData);
} }
@ -33,7 +33,7 @@ index da00fab453f3fb580acc9de65a0853656f9b6fc4..b2d1a17867cdbaad0c6e5c2376c716f9
} }
@@ -367,6 +369,10 @@ public class FallingBlockEntity extends Entity { @@ -369,6 +371,10 @@ public class FallingBlockEntity extends Entity {
int srcZ = nbt.getInt("SourceLoc_z"); int srcZ = nbt.getInt("SourceLoc_z");
this.setOrigin(new org.bukkit.Location(level.getWorld(), srcX, srcY, srcZ)); this.setOrigin(new org.bukkit.Location(level.getWorld(), srcX, srcY, srcZ));
} }

Datei anzeigen

@ -22,10 +22,10 @@ index 68f99e93ed3e843b4001a7a27620f88a48b85e67..0dc96c39151ec4dbeec3947cb17606f5
} }
}); });
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index ffe42e757d11978d861a70b69f9050014f7f8ea8..979f6e925c2b0300ebddefc98a15b170a455d952 100644 index 2b823f40c9435cfac6590487426e1ec1c051ecec..22f738ed5e93e868caba0af7077c3623c2013a43 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2519,6 +2519,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -2500,6 +2500,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
} }
public void onTickingStart(Entity entity) { public void onTickingStart(Entity entity) {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Do not accept invalid client settings
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 7ef7a9203f6376cd13e6a9803dd01522d217f700..7a46f1148216102dc02b9a3e74b9113cb285a89d 100644 index 9133213a8a786f2293bc1a09a44be46b1a8bc011..1e4899e9f99c57a62330c82545157f38f9c3d26a 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -3591,6 +3591,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -3463,6 +3463,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@Override @Override
public void handleClientInformation(ServerboundClientInformationPacket packet) { public void handleClientInformation(ServerboundClientInformationPacket packet) {
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());

Datei anzeigen

@ -5,17 +5,17 @@ Subject: [PATCH] Add support for Proxy Protocol
diff --git a/build.gradle.kts b/build.gradle.kts diff --git a/build.gradle.kts b/build.gradle.kts
index ea1faaf4820059b4a67dbd229a90bc6b78b861bc..b0e4f11e8af4b909a56bb5576d05ef0537fb25f7 100644 index f9839f17bcda4619c257162e9bf14d5e00053c80..d5d49bb2b47c889e12d17dc87b8c439a60b3fe67 100644
--- a/build.gradle.kts --- a/build.gradle.kts
+++ b/build.gradle.kts +++ b/build.gradle.kts
@@ -20,6 +20,7 @@ dependencies { @@ -20,6 +20,7 @@ dependencies {
*/ */
implementation("org.apache.logging.log4j:log4j-core:2.17.1") // Paper - implementation implementation("org.apache.logging.log4j:log4j-core:2.14.1") // Paper - implementation
annotationProcessor("org.apache.logging.log4j:log4j-core:2.17.1") // Paper - Needed to generate meta for our Log4j plugins annotationProcessor("org.apache.logging.log4j:log4j-core:2.14.1") // Paper - Needed to generate meta for our Log4j plugins
+ implementation("io.netty:netty-codec-haproxy:4.1.77.Final") + implementation("io.netty:netty-codec-haproxy:4.1.77.Final") // Paper - Add support for proxy protocol
// Paper end // Paper end
implementation("org.apache.logging.log4j:log4j-iostreams:2.17.1") // Paper implementation("org.apache.logging.log4j:log4j-iostreams:2.19.0") // Paper - remove exclusion
implementation("org.apache.logging.log4j:log4j-slf4j18-impl:2.17.1") // Paper implementation("org.ow2.asm:asm:9.3")
diff --git a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java diff --git a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
index cfdbcd024de6ad0f9d4e83b2f912b36ef3299458..abcc3266d18f34d160eac87fdea153dce24c60b8 100644 index cfdbcd024de6ad0f9d4e83b2f912b36ef3299458..abcc3266d18f34d160eac87fdea153dce24c60b8 100644
--- a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java --- a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Sanitize Sent BlockEntity NBT
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundBlockEntityDataPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundBlockEntityDataPacket.java diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundBlockEntityDataPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundBlockEntityDataPacket.java
index 12d7cb0eb485987d245454fa2d9fef67ea7e9c76..b1e326cf4f7fe447f81b588dcb0eda9a435e59a8 100644 index d79284a790569141c2ac8178d6ecc20b17cdd0d3..3944852921335c78a04a9dc301882ab5b152b1ed 100644
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundBlockEntityDataPacket.java --- a/src/main/java/net/minecraft/network/protocol/game/ClientboundBlockEntityDataPacket.java
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundBlockEntityDataPacket.java +++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundBlockEntityDataPacket.java
@@ -17,7 +17,7 @@ public class ClientboundBlockEntityDataPacket implements Packet<ClientGamePacket @@ -17,7 +17,7 @@ public class ClientboundBlockEntityDataPacket implements Packet<ClientGamePacket
@ -18,7 +18,7 @@ index 12d7cb0eb485987d245454fa2d9fef67ea7e9c76..b1e326cf4f7fe447f81b588dcb0eda9a
public static ClientboundBlockEntityDataPacket create(BlockEntity blockEntity) { public static ClientboundBlockEntityDataPacket create(BlockEntity blockEntity) {
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java
index 2b35059cfe7a27238e0a74df058733897a26ac1c..76b6437a1d807c7e1b673f8feeed1f171ee9a803 100644 index 40a42a632540d497c1393b112731c41c6e448228..f3fa2678796c33f3a408a02a1995ad117eac9169 100644
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java --- a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java +++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java
@@ -183,6 +183,7 @@ public class ClientboundLevelChunkPacketData { @@ -183,6 +183,7 @@ public class ClientboundLevelChunkPacketData {
@ -30,7 +30,7 @@ index 2b35059cfe7a27238e0a74df058733897a26ac1c..76b6437a1d807c7e1b673f8feeed1f17
} }
} }
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
index d62181bd8bccfcfdd7da8f635bdf7ebc36294705..b96d57b0bcf21508f8e03e96b7553eb486fdf212 100644 index 4e2cd5435cc2c87bc604e7eba4f587c0b029e571..58986bc0677c5ea1ad54d7d6d4efa5c2ea233aea 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java --- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
@@ -256,4 +256,12 @@ public abstract class BlockEntity { @@ -256,4 +256,12 @@ public abstract class BlockEntity {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Prevent entity loading causing async lookups
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index d81ee5367205ba96eb23f885ec648a27f2cf62f8..7bb45ae3ed51975972e013aaf66acc352277c375 100644 index 8770c02b6ba1d1dcb7b5fa3ac7f006a7097234f5..0bc808ac268dce5a170e7e55666885b8c2c09164 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -788,6 +788,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -788,6 +788,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {

Datei anzeigen

@ -7,10 +7,10 @@ There are no plans to support creating worlds while worlds are
being ticked themselvess. being ticked themselvess.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 300f6af9e01ce966ca03110c444139f1ae7e691c..5113e04bae5b1a1944b3e80889d9985937de936f 100644 index cbdf2753fca41663185cbfc3b375516b40d238c1..7275c708a6a2ad138ded2eb6b3c4a57a9406883a 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -297,6 +297,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -308,6 +308,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public volatile Thread shutdownThread; // Paper public volatile Thread shutdownThread; // Paper
public volatile boolean abnormalExit = false; // Paper public volatile boolean abnormalExit = false; // Paper
@ -45,10 +45,10 @@ index 300f6af9e01ce966ca03110c444139f1ae7e691c..5113e04bae5b1a1944b3e80889d99859
this.profiler.popPush("connection"); this.profiler.popPush("connection");
MinecraftTimings.connectionTimer.startTiming(); // Spigot MinecraftTimings.connectionTimer.startTiming(); // Spigot
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 0f3156c2dd1884bc5952708636ec559307bb61ba..36239f5c3074a2043442bd0d76a7d6ab68c67020 100644 index 85413bb569a3b60cb06fa80fabfaa279529c0071..c94bb0fc7e96cb0e20e1527813b9f57394f69504 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -855,6 +855,11 @@ public final class CraftServer implements Server { @@ -868,6 +868,11 @@ public final class CraftServer implements Server {
return new ArrayList<World>(this.worlds.values()); return new ArrayList<World>(this.worlds.values());
} }
@ -60,7 +60,7 @@ index 0f3156c2dd1884bc5952708636ec559307bb61ba..36239f5c3074a2043442bd0d76a7d6ab
public DedicatedPlayerList getHandle() { public DedicatedPlayerList getHandle() {
return this.playerList; return this.playerList;
} }
@@ -1139,6 +1144,7 @@ public final class CraftServer implements Server { @@ -1152,6 +1157,7 @@ public final class CraftServer implements Server {
@Override @Override
public World createWorld(WorldCreator creator) { public World createWorld(WorldCreator creator) {
Preconditions.checkState(this.console.getAllLevels().iterator().hasNext(), "Cannot create additional worlds on STARTUP"); Preconditions.checkState(this.console.getAllLevels().iterator().hasNext(), "Cannot create additional worlds on STARTUP");
@ -68,7 +68,7 @@ index 0f3156c2dd1884bc5952708636ec559307bb61ba..36239f5c3074a2043442bd0d76a7d6ab
Validate.notNull(creator, "Creator may not be null"); Validate.notNull(creator, "Creator may not be null");
String name = creator.name(); String name = creator.name();
@@ -1263,6 +1269,7 @@ public final class CraftServer implements Server { @@ -1287,6 +1293,7 @@ public final class CraftServer implements Server {
@Override @Override
public boolean unloadWorld(World world, boolean save) { public boolean unloadWorld(World world, boolean save) {

Datei anzeigen

@ -2008,10 +2008,10 @@ index 0000000000000000000000000000000000000000..33cd90c30c22200a4e1ae64f40a0bf78
+ } + }
+} +}
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 979f6e925c2b0300ebddefc98a15b170a455d952..ba52939ac3a6a467c76632874dfb32def0012f86 100644 index 22f738ed5e93e868caba0af7077c3623c2013a43..557a5aa50d9d23f9c8bda3d39865a96bd6b395ee 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -219,6 +219,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -222,6 +222,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
public final UUID uuid; public final UUID uuid;
public boolean hasPhysicsEvent = true; // Paper public boolean hasPhysicsEvent = true; // Paper
public boolean hasEntityMoveEvent = false; // Paper public boolean hasEntityMoveEvent = false; // Paper
@ -2019,8 +2019,8 @@ index 979f6e925c2b0300ebddefc98a15b170a455d952..ba52939ac3a6a467c76632874dfb32de
public static Throwable getAddToWorldStackTrace(Entity entity) { public static Throwable getAddToWorldStackTrace(Entity entity) {
final Throwable thr = new Throwable(entity + " Added to world at " + new java.util.Date()); final Throwable thr = new Throwable(entity + " Added to world at " + new java.util.Date());
io.papermc.paper.util.StacktraceDeobfuscator.INSTANCE.deobfuscateThrowable(thr); io.papermc.paper.util.StacktraceDeobfuscator.INSTANCE.deobfuscateThrowable(thr);
@@ -2508,6 +2509,13 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -2489,6 +2490,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
// Paper end - rewrite chunk system return this.server.getWorldData().enabledFeatures();
} }
+ // Paper start - optimize redstone (Alternate Current) + // Paper start - optimize redstone (Alternate Current)
@ -2034,10 +2034,10 @@ index 979f6e925c2b0300ebddefc98a15b170a455d952..ba52939ac3a6a467c76632874dfb32de
EntityCallbacks() {} EntityCallbacks() {}
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 09c2d318330e03d0230a82b30985bba3a4231615..cd6edd02da99ef0e53d5cf451e037a591b4f585a 100644 index 363d908ef7707311210fa662f706c59a8a5e7f76..502d7c7322e1b48ae59c8e0fd271a6bf2dcd2ec8 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -1452,4 +1452,15 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -1520,4 +1520,15 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
return ret; return ret;
} }
// Paper end // Paper end
@ -2054,10 +2054,10 @@ index 09c2d318330e03d0230a82b30985bba3a4231615..cd6edd02da99ef0e53d5cf451e037a59
+ // Paper end + // Paper end
} }
diff --git a/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java b/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java b/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java
index 3cba4921daad4b346a3f964f0fa48e1bb4d634a3..2bc21e3373f6fc6fbbaa7202ba82e7da86045b6a 100644 index 004894157f732046e89f124872da86c79af1676f..5ea09cc455bd86beb450f0e0275d7c6c8da98084 100644
--- a/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java --- a/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java +++ b/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java
@@ -253,7 +253,7 @@ public class RedStoneWireBlock extends Block { @@ -252,7 +252,7 @@ public class RedStoneWireBlock extends Block {
return floor.isFaceSturdy(world, pos, Direction.UP) || floor.is(Blocks.HOPPER); return floor.isFaceSturdy(world, pos, Direction.UP) || floor.is(Blocks.HOPPER);
} }
@ -2066,7 +2066,7 @@ index 3cba4921daad4b346a3f964f0fa48e1bb4d634a3..2bc21e3373f6fc6fbbaa7202ba82e7da
// The bulk of the new functionality is found in RedstoneWireTurbo.java // The bulk of the new functionality is found in RedstoneWireTurbo.java
com.destroystokyo.paper.util.RedstoneWireTurbo turbo = new com.destroystokyo.paper.util.RedstoneWireTurbo(this); com.destroystokyo.paper.util.RedstoneWireTurbo turbo = new com.destroystokyo.paper.util.RedstoneWireTurbo(this);
@@ -455,7 +455,13 @@ public class RedStoneWireBlock extends Block { @@ -454,7 +454,13 @@ public class RedStoneWireBlock extends Block {
@Override @Override
public void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify) { public void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify) {
if (!oldState.is(state.getBlock()) && !world.isClientSide) { if (!oldState.is(state.getBlock()) && !world.isClientSide) {
@ -2081,7 +2081,7 @@ index 3cba4921daad4b346a3f964f0fa48e1bb4d634a3..2bc21e3373f6fc6fbbaa7202ba82e7da
Iterator iterator = Direction.Plane.VERTICAL.iterator(); Iterator iterator = Direction.Plane.VERTICAL.iterator();
while (iterator.hasNext()) { while (iterator.hasNext()) {
@@ -482,7 +488,13 @@ public class RedStoneWireBlock extends Block { @@ -481,7 +487,13 @@ public class RedStoneWireBlock extends Block {
world.updateNeighborsAt(pos.relative(enumdirection), this); world.updateNeighborsAt(pos.relative(enumdirection), this);
} }
@ -2096,7 +2096,7 @@ index 3cba4921daad4b346a3f964f0fa48e1bb4d634a3..2bc21e3373f6fc6fbbaa7202ba82e7da
this.updateNeighborsOfNeighboringWires(world, pos); this.updateNeighborsOfNeighboringWires(world, pos);
} }
} }
@@ -516,8 +528,14 @@ public class RedStoneWireBlock extends Block { @@ -515,8 +527,14 @@ public class RedStoneWireBlock extends Block {
@Override @Override
public void neighborChanged(BlockState state, Level world, BlockPos pos, Block sourceBlock, BlockPos sourcePos, boolean notify) { public void neighborChanged(BlockState state, Level world, BlockPos pos, Block sourceBlock, BlockPos sourcePos, boolean notify) {
if (!world.isClientSide) { if (!world.isClientSide) {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add missing spawn eggs
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
index 8e5bc2bf5fed1f70a9fdcdeb4b23468aa0c7fb8e..760628349ca1ba49d660485b01492cdec7411d72 100644 index 4214420d6670b394758f14dbf6de628420c56e3b..3901777934c6f3404e980602aa07c6f5df3a8a1b 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
@@ -196,6 +196,12 @@ public final class CraftItemFactory implements ItemFactory { @@ -198,6 +198,12 @@ public final class CraftItemFactory implements ItemFactory {
case ZOMBIE_SPAWN_EGG: case ZOMBIE_SPAWN_EGG:
case ZOMBIE_VILLAGER_SPAWN_EGG: case ZOMBIE_VILLAGER_SPAWN_EGG:
case ZOMBIFIED_PIGLIN_SPAWN_EGG: case ZOMBIFIED_PIGLIN_SPAWN_EGG:
@ -22,10 +22,10 @@ index 8e5bc2bf5fed1f70a9fdcdeb4b23468aa0c7fb8e..760628349ca1ba49d660485b01492cde
case ARMOR_STAND: case ARMOR_STAND:
return meta instanceof CraftMetaArmorStand ? meta : new CraftMetaArmorStand(meta); return meta instanceof CraftMetaArmorStand ? meta : new CraftMetaArmorStand(meta);
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index bfb1ad0b6e20e10fee53f94a3e6c4f8aad7aae7d..03b4f18000d455e48044eb7a15cd667acef5f14d 100644 index 2d0e828687e9f4e860348eb10b1a40e12a654f2a..613c11c3bfd773fff7684b017959efd0a13b49ec 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -428,6 +428,12 @@ public final class CraftItemStack extends ItemStack { @@ -430,6 +430,12 @@ public final class CraftItemStack extends ItemStack {
case ZOMBIE_SPAWN_EGG: case ZOMBIE_SPAWN_EGG:
case ZOMBIE_VILLAGER_SPAWN_EGG: case ZOMBIE_VILLAGER_SPAWN_EGG:
case ZOMBIFIED_PIGLIN_SPAWN_EGG: case ZOMBIFIED_PIGLIN_SPAWN_EGG:

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add WardenAngerChangeEvent
diff --git a/src/main/java/net/minecraft/world/entity/monster/warden/AngerManagement.java b/src/main/java/net/minecraft/world/entity/monster/warden/AngerManagement.java diff --git a/src/main/java/net/minecraft/world/entity/monster/warden/AngerManagement.java b/src/main/java/net/minecraft/world/entity/monster/warden/AngerManagement.java
index e9b4f29e1844f7c44e341f9b1c07c676469ca3b6..d76800a79faef26aab0cf99b28dfa4621877ecc7 100644 index 02abc5f387d781094bd2f39233444add3a470be1..ece82743df21f0b776382821ad75dee96d0a0748 100644
--- a/src/main/java/net/minecraft/world/entity/monster/warden/AngerManagement.java --- a/src/main/java/net/minecraft/world/entity/monster/warden/AngerManagement.java
+++ b/src/main/java/net/minecraft/world/entity/monster/warden/AngerManagement.java +++ b/src/main/java/net/minecraft/world/entity/monster/warden/AngerManagement.java
@@ -145,7 +145,7 @@ public class AngerManagement { @@ -146,7 +146,7 @@ public class AngerManagement {
public int increaseAnger(Entity entity, int amount) { public int increaseAnger(Entity entity, int amount) {
boolean bl = !this.angerBySuspect.containsKey(entity); boolean bl = !this.angerBySuspect.containsKey(entity);
int i = this.angerBySuspect.computeInt(entity, (suspect, anger) -> { int i = this.angerBySuspect.computeInt(entity, (suspect, anger) -> {
@ -18,7 +18,7 @@ index e9b4f29e1844f7c44e341f9b1c07c676469ca3b6..d76800a79faef26aab0cf99b28dfa462
if (bl) { if (bl) {
int j = this.angerByUuid.removeInt(entity.getUUID()); int j = this.angerByUuid.removeInt(entity.getUUID());
diff --git a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java diff --git a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
index 42ee13841319ef92bacfeffb2f8881e42b801695..27bd70dc30c8472e5a80f3273f9233a0392f831d 100644 index 9fb1bfc394362108aa5ae0d7ec9feeda7753abfb..1ae7408048f951cb94d7cfbea60efc5567b1af84 100644
--- a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java --- a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
+++ b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java +++ b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
@@ -495,6 +495,15 @@ public class Warden extends Monster implements VibrationListener.VibrationListen @@ -495,6 +495,15 @@ public class Warden extends Monster implements VibrationListener.VibrationListen

Datei anzeigen

@ -11,10 +11,10 @@ distance trigger. This adds a config option to ignore that
and use the exact dimension key of the worlds involved. and use the exact dimension key of the worlds involved.
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 58d17cc0c5ba5093fe306c8a1514c27f355f49ae..20f29f0570ceb077dbd92f19b27f36f2fdc925ed 100644 index 2741a218ce45377479ad47ec0141fa70e2b0acca..ebefc46c41529659a0f1ce17191b852aabc1668a 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1238,6 +1238,12 @@ public class ServerPlayer extends Player { @@ -1260,6 +1260,12 @@ public class ServerPlayer extends Player {
// CraftBukkit start // CraftBukkit start
ResourceKey<Level> maindimensionkey = CraftDimensionUtil.getMainDimensionKey(origin); ResourceKey<Level> maindimensionkey = CraftDimensionUtil.getMainDimensionKey(origin);
ResourceKey<Level> maindimensionkey1 = CraftDimensionUtil.getMainDimensionKey(this.level); ResourceKey<Level> maindimensionkey1 = CraftDimensionUtil.getMainDimensionKey(this.level);

Datei anzeigen

@ -43,10 +43,10 @@ index 8e6a71c1e8b53faa70b893c76f5bd25f96a5e142..19abf7b6000a875be8c7141cfba81b27
+ // Paper end + // Paper end
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java diff --git a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
index fbd82b6be6604bf854e01ed5718e4e072f42b265..cd0dc080fbd8c5b1509d67e2b60264393b2b7dbb 100644 index 57acc7195f83b23c9b84ec4b94e0d7ab22851604..b303eb2989be28dadf183d12a4bd706e43d1fa98 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java --- a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java +++ b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
@@ -269,5 +269,17 @@ public class DummyGeneratorAccess implements WorldGenLevel { @@ -274,5 +274,17 @@ public class DummyGeneratorAccess implements WorldGenLevel {
@Override @Override
public <T> void getEntitiesByClass(Class<? extends T> clazz, Entity except, AABB box, List<? super T> into, Predicate<? super T> predicate) {} public <T> void getEntitiesByClass(Class<? extends T> clazz, Entity except, AABB box, List<? super T> into, Predicate<? super T> predicate) {}

Datei anzeigen

@ -20,10 +20,10 @@ index 7c7e5f3c0f9cd1f16192a8fc8163da9b2d9519d5..888936385196a178ab8b730fd5e4fff4
Date date = new Date(); Date date = new Date();
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 36239f5c3074a2043442bd0d76a7d6ab68c67020..410f4f539aaca338b09e503a6828fb1954936556 100644 index c94bb0fc7e96cb0e20e1527813b9f57394f69504..f5836a017d793214b41c02b344463e6a171b230c 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1763,7 +1763,7 @@ public final class CraftServer implements Server { @@ -1787,7 +1787,7 @@ public final class CraftServer implements Server {
// Paper end // Paper end
Set<CommandSender> recipients = new HashSet<>(); Set<CommandSender> recipients = new HashSet<>();
for (Permissible permissible : this.getPluginManager().getPermissionSubscriptions(permission)) { for (Permissible permissible : this.getPluginManager().getPermissionSubscriptions(permission)) {

Datei anzeigen

@ -7,10 +7,10 @@ The previous solution caused a bunch of bandaid fixes inorder to resolve edge ca
Just simply prevent them from being added to the world instead. Just simply prevent them from being added to the world instead.
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index ba52939ac3a6a467c76632874dfb32def0012f86..2b4565dfaff3ee4ea3a49d3195b1336eac5b5b68 100644 index 557a5aa50d9d23f9c8bda3d39865a96bd6b395ee..89e27bf61e1fc24d162dab3c33f942036b1f647e 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1467,6 +1467,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -1507,6 +1507,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
// WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getKey(entity.getType())); // CraftBukkit // WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getKey(entity.getType())); // CraftBukkit
return false; return false;
} else { } else {
@ -19,10 +19,10 @@ index ba52939ac3a6a467c76632874dfb32def0012f86..2b4565dfaff3ee4ea3a49d3195b1336e
if (captureDrops != null && entity instanceof net.minecraft.world.entity.item.ItemEntity) { if (captureDrops != null && entity instanceof net.minecraft.world.entity.item.ItemEntity) {
captureDrops.add((net.minecraft.world.entity.item.ItemEntity) entity); captureDrops.add((net.minecraft.world.entity.item.ItemEntity) entity);
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
index 30c417c3169c1df43662fd77ac6816db64a42802..4c78c04ed031ec2e04642ebe5d79527e848d95f6 100644 index 1f965e4428d627eaab69ace45486f1d14d2bb504..62f2a070e4c80846a9d696445212c65289037928 100644
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java --- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
@@ -507,7 +507,7 @@ public class ItemEntity extends Entity { @@ -505,7 +505,7 @@ public class ItemEntity extends Entity {
} }
public void setItem(ItemStack stack) { public void setItem(ItemStack stack) {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Don't print component in resource pack rejection message
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 7a46f1148216102dc02b9a3e74b9113cb285a89d..2ac47839f238b547baa78fc9a2a5944e2ad17eea 100644 index 1e4899e9f99c57a62330c82545157f38f9c3d26a..c6db193e5603b047f07fc7edd64890e2a9a29355 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2049,7 +2049,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -2045,7 +2045,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
public void handleResourcePackResponse(ServerboundResourcePackPacket packet) { public void handleResourcePackResponse(ServerboundResourcePackPacket packet) {
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
if (packet.getAction() == ServerboundResourcePackPacket.Action.DECLINED && this.server.isResourcePackRequired()) { if (packet.getAction() == ServerboundResourcePackPacket.Action.DECLINED && this.server.isResourcePackRequired()) {

Datei anzeigen

@ -15,15 +15,15 @@ to account for the case where the chunk is _not_ currently loaded
and then later loaded. and then later loaded.
diff --git a/src/main/java/net/minecraft/world/level/gameevent/DynamicGameEventListener.java b/src/main/java/net/minecraft/world/level/gameevent/DynamicGameEventListener.java diff --git a/src/main/java/net/minecraft/world/level/gameevent/DynamicGameEventListener.java b/src/main/java/net/minecraft/world/level/gameevent/DynamicGameEventListener.java
index 39f79c6d95e0f14d55783375df9ecf053e8d19de..610bfcceec51fcd1d82040f0dbfc03be20b8dce7 100644 index 1977fde5e9b18406389dfb7374ecf4784f362233..7ee6e2dfb3441c992f4206f5bb8389733cea9dfc 100644
--- a/src/main/java/net/minecraft/world/level/gameevent/DynamicGameEventListener.java --- a/src/main/java/net/minecraft/world/level/gameevent/DynamicGameEventListener.java
+++ b/src/main/java/net/minecraft/world/level/gameevent/DynamicGameEventListener.java +++ b/src/main/java/net/minecraft/world/level/gameevent/DynamicGameEventListener.java
@@ -66,7 +66,7 @@ public class DynamicGameEventListener<T extends GameEventListener> { @@ -66,7 +66,7 @@ public class DynamicGameEventListener<T extends GameEventListener> {
private static void ifChunkExists(LevelReader world, @Nullable SectionPos sectionPos, Consumer<GameEventDispatcher> dispatcherConsumer) { private static void ifChunkExists(LevelReader world, @Nullable SectionPos sectionPos, Consumer<GameEventListenerRegistry> dispatcherConsumer) {
if (sectionPos != null) { if (sectionPos != null) {
- ChunkAccess chunkAccess = world.getChunk(sectionPos.x(), sectionPos.z(), ChunkStatus.FULL, false); - ChunkAccess chunkAccess = world.getChunk(sectionPos.x(), sectionPos.z(), ChunkStatus.FULL, false);
+ ChunkAccess chunkAccess = world.getChunkIfLoadedImmediately(sectionPos.getX(), sectionPos.getZ()); // Paper - can cause sync loads while completing a chunk, resulting in deadlock + ChunkAccess chunkAccess = world.getChunkIfLoadedImmediately(sectionPos.getX(), sectionPos.getZ()); // Paper - can cause sync loads while completing a chunk, resulting in deadlock
if (chunkAccess != null) { if (chunkAccess != null) {
dispatcherConsumer.accept(chunkAccess.getEventDispatcher(sectionPos.y())); dispatcherConsumer.accept(chunkAccess.getListenerRegistry(sectionPos.y()));
} }

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add various missing EntityDropItemEvent calls
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 7bb45ae3ed51975972e013aaf66acc352277c375..5a540e0ba51a0edb1f6310f93f6f3c84b5963d0e 100644 index 0bc808ac268dce5a170e7e55666885b8c2c09164..b2a0423b92f1a74a6c07433519fdbd5fdfa56976 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2520,6 +2520,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -2535,6 +2535,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
stack.setCount(0); // Paper - destroy this item - if this ever leaks due to game bugs, ensure it doesn't dupe stack.setCount(0); // Paper - destroy this item - if this ever leaks due to game bugs, ensure it doesn't dupe
entityitem.setDefaultPickUpDelay(); entityitem.setDefaultPickUpDelay();
@ -37,10 +37,10 @@ index 7c53dddb598de85abf1eb8b8ee183a6e8e6f9c74..3f100d847fbce6db5b625e99c4f36945
} }
} }
diff --git a/src/main/java/net/minecraft/world/entity/animal/Fox.java b/src/main/java/net/minecraft/world/entity/animal/Fox.java diff --git a/src/main/java/net/minecraft/world/entity/animal/Fox.java b/src/main/java/net/minecraft/world/entity/animal/Fox.java
index 8f294f10aca2df007830b12da0506f7614206a89..6a66b5d1a3d8615dcc15057f03476e9ccbf4b4f2 100644 index f4cfefd72704b3423392ffeb57e78c5d6410ff6f..e4edeeb04fd7183514e53e20dcef8aca56f02f7d 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Fox.java --- a/src/main/java/net/minecraft/world/entity/animal/Fox.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java +++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java
@@ -497,14 +497,14 @@ public class Fox extends Animal { @@ -502,14 +502,14 @@ public class Fox extends Animal implements VariantHolder<Fox.Type> {
entityitem.setPickUpDelay(40); entityitem.setPickUpDelay(40);
entityitem.setThrower(this.getUUID()); entityitem.setThrower(this.getUUID());
this.playSound(SoundEvents.FOX_SPIT, 1.0F, 1.0F); this.playSound(SoundEvents.FOX_SPIT, 1.0F, 1.0F);
@ -58,10 +58,10 @@ index 8f294f10aca2df007830b12da0506f7614206a89..6a66b5d1a3d8615dcc15057f03476e9c
@Override @Override
diff --git a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java diff --git a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
index 4d6c3cb8eb2da05b7f0c8fba92e371cd440605b0..c17d9a7cb69d3b6ea6e17b689921fa239db3552b 100644 index d562ad27bf690927e6a84e416ab74a460950f249..0b0377fa1483e4fcb31456af6c7e1749bd8af484 100644
--- a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java --- a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
+++ b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java +++ b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
@@ -329,8 +329,7 @@ public class Goat extends Animal { @@ -354,8 +354,7 @@ public class Goat extends Animal {
double d2 = (double) Mth.randomBetween(this.random, -0.2F, 0.2F); double d2 = (double) Mth.randomBetween(this.random, -0.2F, 0.2F);
ItemEntity entityitem = new ItemEntity(this.level, vec3d.x(), vec3d.y(), vec3d.z(), itemstack, d0, d1, d2); ItemEntity entityitem = new ItemEntity(this.level, vec3d.x(), vec3d.y(), vec3d.z(), itemstack, d0, d1, d2);

Datei anzeigen

@ -6,24 +6,15 @@ Subject: [PATCH] Add some minimal debug information to chat packet errors
TODO: potentially add some kick leeway TODO: potentially add some kick leeway
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 2ac47839f238b547baa78fc9a2a5944e2ad17eea..0205fc3969c5faf92b43c2cbf274c8e0bd8bf752 100644 index c6db193e5603b047f07fc7edd64890e2a9a29355..b537b49afba734ba498f5cf584c0924d3c10514d 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2298,7 +2298,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -2295,7 +2295,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
private boolean tryHandleChat(String message, Instant timestamp, LastSeenMessages.Update acknowledgment) { private Optional<LastSeenMessages> tryHandleChat(String message, Instant timestamp, LastSeenMessages.Update acknowledgment) {
if (!this.updateChatOrder(timestamp)) { if (!this.updateChatOrder(timestamp)) {
- ServerGamePacketListenerImpl.LOGGER.warn("{} sent out-of-order chat: '{}'", this.player.getName().getString(), message); - ServerGamePacketListenerImpl.LOGGER.warn("{} sent out-of-order chat: '{}'", this.player.getName().getString(), message);
+ ServerGamePacketListenerImpl.LOGGER.warn("{} sent out-of-order chat: '{}': {} > {}", this.player.getName().getString(), message, this.lastChatTimeStamp.get().getEpochSecond(), timestamp.getEpochSecond()); // Paper + ServerGamePacketListenerImpl.LOGGER.warn("{} sent out-of-order chat: '{}': {} > {}", this.player.getName().getString(), message, this.lastChatTimeStamp.get().getEpochSecond(), timestamp.getEpochSecond()); // Paper
this.server.scheduleOnMain(() -> { // Paper - push to main this.server.scheduleOnMain(() -> { // Paper - push to main
this.disconnect(Component.translatable("multiplayer.disconnect.out_of_order_chat"), org.bukkit.event.player.PlayerKickEvent.Cause.OUT_OF_ORDER_CHAT); // Paper - kick event cause this.disconnect(Component.translatable("multiplayer.disconnect.out_of_order_chat"), org.bukkit.event.player.PlayerKickEvent.Cause.OUT_OF_ORDER_CHAT); // Paper - kick event ca
}); // Paper - push to main }); // Paper - push to main
@@ -2569,7 +2569,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
if (message.hasExpiredServer(Instant.now())) {
- ServerGamePacketListenerImpl.LOGGER.warn("{} sent expired chat: '{}'. Is the client/server system time unsynchronized?", this.player.getName().getString(), message.signedContent().plain());
+ ServerGamePacketListenerImpl.LOGGER.warn("{} sent expired chat: '{}'. Is the client/server system time unsynchronized? c: {} s: {}", this.player.getName().getString(), message.signedContent().plain(), message.timeStamp().getEpochSecond(), Instant.now().getEpochSecond()); // Paper
}
return true;

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Fix Bee flower NPE
diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java 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 f2243f65cdf0e4b327e8597dfefe5b2de8912cef..87f8d46cb2032474008811ca11dc7ff1f7859f7e 100644 index 5cb23a6b85bccb6e873be24a5be39224870dac3c..a3aeab5fa137f80a229db2edba07d9900f7becfe 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Bee.java --- a/src/main/java/net/minecraft/world/entity/animal/Bee.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java +++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java
@@ -802,7 +802,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { @@ -805,7 +805,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
++this.pollinatingTicks; ++this.pollinatingTicks;
if (this.pollinatingTicks > 600) { if (this.pollinatingTicks > 600) {
Bee.this.savedFlowerPos = null; Bee.this.savedFlowerPos = null;

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Fix Spigot Config not using commands.spam-exclusions
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 0205fc3969c5faf92b43c2cbf274c8e0bd8bf752..0227a7df2b3a30d1c0d95acdd1b0a43f9170d19b 100644 index b537b49afba734ba498f5cf584c0924d3c10514d..ecba65304d97647ab0ec0bfca2fc80b8399e6581 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2589,7 +2589,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -2540,7 +2540,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
} }
// Spigot end // Spigot end
// this.chatSpamTickCount += 20; // this.chatSpamTickCount += 20;

Datei anzeigen

@ -7,10 +7,10 @@ Subject: [PATCH] More Teleport API
public net.minecraft.server.network.ServerGamePacketListenerImpl internalTeleport(DDDFFLjava/util/Set;Z)V public net.minecraft.server.network.ServerGamePacketListenerImpl internalTeleport(DDDFFLjava/util/Set;Z)V
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 0227a7df2b3a30d1c0d95acdd1b0a43f9170d19b..a42e2cb31d636637db9f4e7edbe06acdf47d34d2 100644 index ecba65304d97647ab0ec0bfca2fc80b8399e6581..cb59fee583519fd650e42ffefa660d72e604bb53 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1729,11 +1729,17 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -1722,11 +1722,17 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
return false; // CraftBukkit - Return event status return false; // CraftBukkit - Return event status
} }
@ -31,10 +31,10 @@ index 0227a7df2b3a30d1c0d95acdd1b0a43f9170d19b..a42e2cb31d636637db9f4e7edbe06acd
d0 = to.getX(); d0 = to.getX();
d1 = to.getY(); d1 = to.getY();
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index ea9622e80c8799b33e0edfc2a4a94ba35d1a3b12..e6780f645f456b0def13aef17ddfb231dc94cde7 100644 index 32b9816283c8c1de929d5664733553277cf6bf3c..32c724060a532e551f0ab4e7277831bb6bf61de3 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -548,15 +548,33 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @@ -550,15 +550,33 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@Override @Override
public boolean teleport(Location location, TeleportCause cause) { public boolean teleport(Location location, TeleportCause cause) {
@ -71,10 +71,10 @@ index ea9622e80c8799b33e0edfc2a4a94ba35d1a3b12..e6780f645f456b0def13aef17ddfb231
// Let the server handle cross world teleports // Let the server handle cross world teleports
if (location.getWorld() != null && !location.getWorld().equals(this.getWorld())) { if (location.getWorld() != null && !location.getWorld().equals(this.getWorld())) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index e88fc016d8f928e378747ce26b808192f22597a7..f6d728be8deb18d4e81c064e60eb6b35bf9831ff 100644 index 71b899ba2a2495dcc40f292b46a0b4b545d376ee..fc77e4bed1257cd7f3617552d591a2736168d47c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1182,13 +1182,92 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1184,13 +1184,92 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override @Override
public void setRotation(float yaw, float pitch) { public void setRotation(float yaw, float pitch) {
@ -168,7 +168,7 @@ index e88fc016d8f928e378747ce26b808192f22597a7..f6d728be8deb18d4e81c064e60eb6b35
location.checkFinite(); location.checkFinite();
ServerPlayer entity = this.getHandle(); ServerPlayer entity = this.getHandle();
@@ -1201,7 +1280,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1203,7 +1282,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return false; return false;
} }
@ -177,7 +177,7 @@ index e88fc016d8f928e378747ce26b808192f22597a7..f6d728be8deb18d4e81c064e60eb6b35
return false; return false;
} }
@@ -1219,7 +1298,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1221,7 +1300,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
} }
// If this player is riding another entity, we must dismount before teleporting. // If this player is riding another entity, we must dismount before teleporting.
@ -186,7 +186,7 @@ index e88fc016d8f928e378747ce26b808192f22597a7..f6d728be8deb18d4e81c064e60eb6b35
// SPIGOT-5509: Wakeup, similar to riding // SPIGOT-5509: Wakeup, similar to riding
if (this.isSleeping()) { if (this.isSleeping()) {
@@ -1241,7 +1320,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1243,7 +1322,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Check if the fromWorld and toWorld are the same. // Check if the fromWorld and toWorld are the same.
if (fromWorld == toWorld) { if (fromWorld == toWorld) {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add EntityPortalReadyEvent
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 5a540e0ba51a0edb1f6310f93f6f3c84b5963d0e..f2908cf61ff28bef44fcf46b15cf585e942fd7ce 100644 index b2a0423b92f1a74a6c07433519fdbd5fdfa56976..23a2551fa27a0882f939268ab1595c20b81194e7 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2867,6 +2867,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -2886,6 +2886,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
if (true && !this.isPassenger() && this.portalTime++ >= i) { // CraftBukkit if (true && !this.isPassenger() && this.portalTime++ >= i) { // CraftBukkit
this.level.getProfiler().push("portal"); this.level.getProfiler().push("portal");
this.portalTime = i; this.portalTime = i;
@ -22,7 +22,7 @@ index 5a540e0ba51a0edb1f6310f93f6f3c84b5963d0e..f2908cf61ff28bef44fcf46b15cf585e
this.setPortalCooldown(); this.setPortalCooldown();
// CraftBukkit start // CraftBukkit start
if (this instanceof ServerPlayer) { if (this instanceof ServerPlayer) {
@@ -2874,6 +2881,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -2893,6 +2900,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
} else { } else {
this.changeDimension(worldserver1); this.changeDimension(worldserver1);
} }

Datei anzeigen

@ -9,10 +9,10 @@ should be supported. Some entities (for whatever
reason) use the level's random in some places. reason) use the level's random in some places.
diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java 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 87f8d46cb2032474008811ca11dc7ff1f7859f7e..2e05c953182c27e3571b2c33eceeb379e60b54be 100644 index a3aeab5fa137f80a229db2edba07d9900f7becfe..337a88a7cd6445004d005ef8d56af1b1cdf800d9 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Bee.java --- a/src/main/java/net/minecraft/world/entity/animal/Bee.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java +++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java
@@ -1028,7 +1028,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { @@ -1031,7 +1031,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
BeeGoToHiveGoal() { BeeGoToHiveGoal() {
super(); super();
@ -21,7 +21,7 @@ index 87f8d46cb2032474008811ca11dc7ff1f7859f7e..2e05c953182c27e3571b2c33eceeb379
this.blacklistedTargets = Lists.newArrayList(); this.blacklistedTargets = Lists.newArrayList();
this.setFlags(EnumSet.of(Goal.Flag.MOVE)); this.setFlags(EnumSet.of(Goal.Flag.MOVE));
} }
@@ -1145,7 +1145,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { @@ -1148,7 +1148,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
BeeGoToKnownFlowerGoal() { BeeGoToKnownFlowerGoal() {
super(); super();
@ -31,10 +31,10 @@ index 87f8d46cb2032474008811ca11dc7ff1f7859f7e..2e05c953182c27e3571b2c33eceeb379
} }
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
index 4c78c04ed031ec2e04642ebe5d79527e848d95f6..fcc5444a1268931a0fd2df1e6bbbc17cfd5a61e0 100644 index 62f2a070e4c80846a9d696445212c65289037928..d9da6728d60e97eb9032b0a5aa71757d11f36e22 100644
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java --- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
@@ -64,7 +64,12 @@ public class ItemEntity extends Entity { @@ -62,7 +62,12 @@ public class ItemEntity extends Entity {
} }
public ItemEntity(Level world, double x, double y, double z, ItemStack stack) { public ItemEntity(Level world, double x, double y, double z, ItemStack stack) {
@ -49,10 +49,10 @@ index 4c78c04ed031ec2e04642ebe5d79527e848d95f6..fcc5444a1268931a0fd2df1e6bbbc17c
public ItemEntity(Level world, double x, double y, double z, ItemStack stack, double velocityX, double velocityY, double velocityZ) { public ItemEntity(Level world, double x, double y, double z, ItemStack stack, double velocityX, double velocityY, double velocityZ) {
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
index 65f0aa076dbfc4cd72d14ec485d1edf5533d825e..438de71a17d7bfaed8fbb1b4f7aa7f53538603a2 100644 index 4b81d62d3250b99cbcb4eb2468ef81c149bf177e..bedee2c93bd0aff148f93dcf111e0fc3d9bce4a0 100644
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java --- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java +++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
@@ -35,7 +35,7 @@ public class PrimedTnt extends Entity { @@ -32,7 +32,7 @@ public class PrimedTnt extends Entity {
public PrimedTnt(Level world, double x, double y, double z, @Nullable LivingEntity igniter) { public PrimedTnt(Level world, double x, double y, double z, @Nullable LivingEntity igniter) {
this(EntityType.TNT, world); this(EntityType.TNT, world);
this.setPos(x, y, z); this.setPos(x, y, z);

Datei anzeigen

@ -7,7 +7,7 @@ Minecraft's prediction system does not handle block entities, so if we are manua
block breaking we need to set it after the prediction is finished. This fixes block entities not showing when cancelling the BlockBreakEvent. block breaking we need to set it after the prediction is finished. This fixes block entities not showing when cancelling the BlockBreakEvent.
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
index 9378e83a67a70dbb1fb4f05b33f1e553d008e62b..5a60f5dc202c44b06ca34e9a19d45cb715f74fd3 100644 index 796d17f51496974cfdfed2593753b8c09b5c81c1..13031576c20bda3bb12c926f6cd938fa5fb105f2 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
@@ -62,6 +62,8 @@ public class ServerPlayerGameMode { @@ -62,6 +62,8 @@ public class ServerPlayerGameMode {
@ -57,10 +57,10 @@ index 9378e83a67a70dbb1fb4f05b33f1e553d008e62b..5a60f5dc202c44b06ca34e9a19d45cb7
} }
} }
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index a42e2cb31d636637db9f4e7edbe06acdf47d34d2..f082e121331be8aee523751a2d3f3393e3b0d02c 100644 index cb59fee583519fd650e42ffefa660d72e604bb53..1af9cbfd657e3d998b871e1ada77a804462bc3ad 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1874,8 +1874,28 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -1867,8 +1867,28 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
return; return;
} }
// Paper end - Don't allow digging in unloaded chunks // Paper end - Don't allow digging in unloaded chunks

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Warn on plugins accessing faraway chunks
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index cd6edd02da99ef0e53d5cf451e037a591b4f585a..596fb8ee21ba8450db13a11890d241ef3974d81d 100644 index 502d7c7322e1b48ae59c8e0fd271a6bf2dcd2ec8..628922887e49df43f7e92b8f6cfeb3dd5d00e5d7 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -417,7 +417,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -416,7 +416,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
} }
private static boolean isInWorldBoundsHorizontal(BlockPos pos) { private static boolean isInWorldBoundsHorizontal(BlockPos pos) {
@ -18,10 +18,10 @@ index cd6edd02da99ef0e53d5cf451e037a591b4f585a..596fb8ee21ba8450db13a11890d241ef
private static boolean isOutsideSpawnableHeight(int y) { private static boolean isOutsideSpawnableHeight(int y) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 5fcea8546b574a6fc91502c0674ab8f9389c7cf3..55d83a9a691d11c9408d2c3260c3e77dfb51b97e 100644 index 2976b3469a7870611862c28ef555be974309ee34..f10b941012a59c056c120c8ee112ee4b9ed0e9b8 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -313,9 +313,24 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -312,9 +312,24 @@ public class CraftWorld extends CraftRegionAccessor implements World {
public boolean setSpawnLocation(int x, int y, int z) { public boolean setSpawnLocation(int x, int y, int z) {
return this.setSpawnLocation(x, y, z, 0.0F); return this.setSpawnLocation(x, y, z, 0.0F);
} }
@ -46,7 +46,7 @@ index 5fcea8546b574a6fc91502c0674ab8f9389c7cf3..55d83a9a691d11c9408d2c3260c3e77d
// Paper start - add ticket to hold chunk for a little while longer if plugin accesses it // Paper start - add ticket to hold chunk for a little while longer if plugin accesses it
net.minecraft.world.level.chunk.LevelChunk chunk = world.getChunkSource().getChunkAtIfLoadedImmediately(x, z); net.minecraft.world.level.chunk.LevelChunk chunk = world.getChunkSource().getChunkAtIfLoadedImmediately(x, z);
if (chunk == null) { if (chunk == null) {
@@ -420,6 +435,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -419,6 +434,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override @Override
public boolean regenerateChunk(int x, int z) { public boolean regenerateChunk(int x, int z) {
org.spigotmc.AsyncCatcher.catchOp("chunk regenerate"); // Spigot org.spigotmc.AsyncCatcher.catchOp("chunk regenerate"); // Spigot
@ -54,7 +54,7 @@ index 5fcea8546b574a6fc91502c0674ab8f9389c7cf3..55d83a9a691d11c9408d2c3260c3e77d
// Paper start - implement regenerateChunk method // Paper start - implement regenerateChunk method
final ServerLevel serverLevel = this.world; final ServerLevel serverLevel = this.world;
final net.minecraft.server.level.ServerChunkCache serverChunkCache = serverLevel.getChunkSource(); final net.minecraft.server.level.ServerChunkCache serverChunkCache = serverLevel.getChunkSource();
@@ -516,6 +532,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -515,6 +531,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override @Override
public boolean loadChunk(int x, int z, boolean generate) { public boolean loadChunk(int x, int z, boolean generate) {
org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot
@ -62,7 +62,7 @@ index 5fcea8546b574a6fc91502c0674ab8f9389c7cf3..55d83a9a691d11c9408d2c3260c3e77d
// Paper start - Optimize this method // Paper start - Optimize this method
ChunkPos chunkPos = new ChunkPos(x, z); ChunkPos chunkPos = new ChunkPos(x, z);
ChunkAccess immediate = world.getChunkSource().getChunkAtIfLoadedImmediately(x, z); // Paper ChunkAccess immediate = world.getChunkSource().getChunkAtIfLoadedImmediately(x, z); // Paper
@@ -580,6 +597,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -579,6 +596,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override @Override
public boolean addPluginChunkTicket(int x, int z, Plugin plugin) { public boolean addPluginChunkTicket(int x, int z, Plugin plugin) {
@ -70,7 +70,7 @@ index 5fcea8546b574a6fc91502c0674ab8f9389c7cf3..55d83a9a691d11c9408d2c3260c3e77d
Preconditions.checkArgument(plugin != null, "null plugin"); Preconditions.checkArgument(plugin != null, "null plugin");
Preconditions.checkArgument(plugin.isEnabled(), "plugin is not enabled"); Preconditions.checkArgument(plugin.isEnabled(), "plugin is not enabled");
@@ -648,6 +666,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -647,6 +665,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override @Override
public void setChunkForceLoaded(int x, int z, boolean forced) { public void setChunkForceLoaded(int x, int z, boolean forced) {
@ -78,7 +78,7 @@ index 5fcea8546b574a6fc91502c0674ab8f9389c7cf3..55d83a9a691d11c9408d2c3260c3e77d
this.getHandle().setChunkForced(x, z, forced); this.getHandle().setChunkForced(x, z, forced);
} }
@@ -959,6 +978,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -958,6 +977,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override @Override
public int getHighestBlockYAt(int x, int z, org.bukkit.HeightMap heightMap) { public int getHighestBlockYAt(int x, int z, org.bukkit.HeightMap heightMap) {
@ -86,7 +86,7 @@ index 5fcea8546b574a6fc91502c0674ab8f9389c7cf3..55d83a9a691d11c9408d2c3260c3e77d
// Transient load for this tick // Transient load for this tick
return this.world.getChunk(x >> 4, z >> 4).getHeight(CraftHeightMap.toNMS(heightMap), x, z); return this.world.getChunk(x >> 4, z >> 4).getHeight(CraftHeightMap.toNMS(heightMap), x, z);
} }
@@ -2315,6 +2335,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -2314,6 +2334,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
// Spigot end // Spigot end
// Paper start // Paper start
public java.util.concurrent.CompletableFuture<Chunk> getChunkAtAsync(int x, int z, boolean gen, boolean urgent) { public java.util.concurrent.CompletableFuture<Chunk> getChunkAtAsync(int x, int z, boolean gen, boolean urgent) {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Custom Chat Completion Suggestions API
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index f6d728be8deb18d4e81c064e60eb6b35bf9831ff..af439ea7800a8d4d606ac6cbfb6a621c5175d3de 100644 index fc77e4bed1257cd7f3617552d591a2736168d47c..d87324ccf3490fff0981336ef7d22071cd573b51 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -663,6 +663,22 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -665,6 +665,22 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.getHandle().getServer().getPlayerList().sendPlayerPermissionLevel(this.getHandle(), level, false); this.getHandle().getServer().getPlayerList().sendPlayerPermissionLevel(this.getHandle(), level, false);
} }

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add missing BlockFadeEvents
diff --git a/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java b/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java b/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java
index e1d8ababdb992821cc0ac383c13f1f4d10b09107..d6232d6f14a195a0e3f8489f148eb8b44d0355c6 100644 index b63835fe3eda974746163e7a9e26080da7538c4d..2974f64d5a931a08e450aacbfd1281c4d3f15303 100644
--- a/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java --- a/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java +++ b/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java
@@ -84,6 +84,11 @@ public class FrogspawnBlock extends Block { @@ -84,6 +84,11 @@ public class FrogspawnBlock extends Block {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Collision API
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
index d5cc47eb1fd1ea9a0638827483b03165f6a7e10c..afa802987f96e7d0c5f28d26b759e36edf34b8f4 100644 index 3209d13a12a033e157621920a0cefdad5727463f..c6f896c230f343af2d825f0dff458a0e4578dbe8 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java --- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
@@ -967,5 +967,12 @@ public abstract class CraftRegionAccessor implements RegionAccessor { @@ -973,5 +973,12 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
return this.getHandle().clip(new net.minecraft.world.level.ClipContext(vec3d, vec3d1, net.minecraft.world.level.ClipContext.Block.COLLIDER, net.minecraft.world.level.ClipContext.Fluid.NONE, null)).getType() == net.minecraft.world.phys.HitResult.Type.MISS; return this.getHandle().clip(new net.minecraft.world.level.ClipContext(vec3d, vec3d1, net.minecraft.world.level.ClipContext.Block.COLLIDER, net.minecraft.world.level.ClipContext.Fluid.NONE, null)).getType() == net.minecraft.world.phys.HitResult.Type.MISS;
} }
@ -22,10 +22,10 @@ index d5cc47eb1fd1ea9a0638827483b03165f6a7e10c..afa802987f96e7d0c5f28d26b759e36e
// Paper end // Paper end
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index e6780f645f456b0def13aef17ddfb231dc94cde7..01132b10799034232e7e5cbb460d848601e04012 100644 index 32c724060a532e551f0ab4e7277831bb6bf61de3..6cd6cb256bde958416a0e4b13fc1d3df74f230fd 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -1375,4 +1375,19 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @@ -1377,4 +1377,19 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
return getHandle().isInPowderSnow || getHandle().wasInPowderSnow; // depending on the location in the entity "tick" either could be needed. return getHandle().isInPowderSnow || getHandle().wasInPowderSnow; // depending on the location in the entity "tick" either could be needed.
} }
// Paper end // Paper end

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Fix suggest command message for brigadier syntax exceptions
This is a bug accidentally introduced in upstream CB This is a bug accidentally introduced in upstream CB
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
index 67ab16743b36dbf8b4336e33988d8e78433f566d..7c96f7fc5997761426a0c62cad0cab5cc668f282 100644 index 6a82d83bca27b3b023d9d6771d194b4db9c97dc2..330f6c79417378da855326b4da665f9d240e748d 100644
--- a/src/main/java/net/minecraft/commands/Commands.java --- a/src/main/java/net/minecraft/commands/Commands.java
+++ b/src/main/java/net/minecraft/commands/Commands.java +++ b/src/main/java/net/minecraft/commands/Commands.java
@@ -314,7 +314,7 @@ public class Commands { @@ -322,7 +322,7 @@ public class Commands {
if (commandsyntaxexception.getInput() != null && commandsyntaxexception.getCursor() >= 0) { if (commandsyntaxexception.getInput() != null && commandsyntaxexception.getCursor() >= 0) {
int j = Math.min(commandsyntaxexception.getInput().length(), commandsyntaxexception.getCursor()); int j = Math.min(commandsyntaxexception.getInput().length(), commandsyntaxexception.getCursor());
MutableComponent ichatmutablecomponent = Component.empty().withStyle(ChatFormatting.GRAY).withStyle((chatmodifier) -> { MutableComponent ichatmutablecomponent = Component.empty().withStyle(ChatFormatting.GRAY).withStyle((chatmodifier) -> {

Datei anzeigen

@ -0,0 +1,19 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Nassim Jahnke <nassim@njahnke.dev>
Date: Fri, 10 Jun 2022 16:02:35 +0200
Subject: [PATCH] Remove invalid signature login stacktrace
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 1af9cbfd657e3d998b871e1ada77a804462bc3ad..d3d881a9eedd81b0d6814b49e81fe5cc28aa2c9f 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -3593,7 +3593,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
this.resetPlayerChatState(remotechatsession_a.validate(this.player.getGameProfile(), signaturevalidator, Duration.ZERO));
} catch (ProfilePublicKey.ValidationException profilepublickey_b) {
- ServerGamePacketListenerImpl.LOGGER.error("Failed to validate profile key: {}", profilepublickey_b.getMessage());
+ //ServerGamePacketListenerImpl.LOGGER.error("Failed to validate profile key: {}", profilepublickey_b.getMessage()); // Paper - unnecessary log
this.disconnect(profilepublickey_b.getComponent());
}

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add async catcher to PlayerConnection internalTeleport
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index ca7afdbfa936801e53e8bb0d154538bc0f042ad3..fddd60ab705f548e54fc741ad9c5b13fde8c852d 100644 index d3d881a9eedd81b0d6814b49e81fe5cc28aa2c9f..317a53cbaea38e1191f455b3d2c9c7971f505e9e 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1757,6 +1757,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -1750,6 +1750,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
} }
public void internalTeleport(double d0, double d1, double d2, float f, float f1, Set<ClientboundPlayerPositionPacket.RelativeArgument> set, boolean flag) { public void internalTeleport(double d0, double d1, double d2, float f, float f1, Set<ClientboundPlayerPositionPacket.RelativeArgument> set, boolean flag) {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Block Ticking API
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
index bfe9dc935c87e01fb435d8b46ce413b84ca74856..0d47460494135d4ec4c95260de033e054c2f0404 100644 index 47ee348a7042a8e0705bc7d2c4077c0f270a8239..2b78bdd5773872405690084fea5a92bc40894fe9 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
@@ -736,5 +736,21 @@ public class CraftBlock implements Block { @@ -738,5 +738,21 @@ public class CraftBlock implements Block {
public boolean isValidTool(ItemStack itemStack) { public boolean isValidTool(ItemStack itemStack) {
return getDrops(itemStack).size() != 0; return getDrops(itemStack).size() != 0;
} }
@ -31,10 +31,10 @@ index bfe9dc935c87e01fb435d8b46ce413b84ca74856..0d47460494135d4ec4c95260de033e05
// Paper end // Paper end
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
index aae7f7ab4931db8f955c3055157fe01f99931ec7..e4c15fcbd21f70836c26133ef10f3d0da9b6c238 100644 index 14fd37f4bdb9b0b7f28abfccffe682f6fdc6339e..5f0acece20208047e9d17b6e72d77a5f80cb125f 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
@@ -614,4 +614,10 @@ public class CraftBlockData implements BlockData { @@ -617,4 +617,10 @@ public class CraftBlockData implements BlockData {
return this.state.isFaceSturdy(EmptyBlockGetter.INSTANCE, BlockPos.ZERO, CraftBlock.blockFaceToNotch(face), CraftBlockSupport.toNMS(support)); return this.state.isFaceSturdy(EmptyBlockGetter.INSTANCE, BlockPos.ZERO, CraftBlock.blockFaceToNotch(face), CraftBlockSupport.toNMS(support));
} }

Datei anzeigen

@ -94,20 +94,20 @@ index 0000000000000000000000000000000000000000..5de2dabbc076a9482b1d6c299f1cff74
+ } + }
+} +}
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
index df1a1681cdd5f055ff4394aa6990b252a3e25ea8..4be871c79cebfa62b6d2a22674ad2cde8bc9799c 100644 index d2cba3fb9eb0d344b71c79387d1d160596b1dc62..9c6473beae78cd6e173e28335e6b06f878b162a9 100644
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
@@ -66,6 +66,7 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se @@ -61,6 +61,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
@Nullable @Nullable
private ProfilePublicKey.Data profilePublicKeyData; private ServerPlayer delayedAcceptPlayer;
public boolean iKnowThisMayNotBeTheBestIdeaButPleaseDisableUsernameValidation = false; // Paper - username validation overriding public boolean iKnowThisMayNotBeTheBestIdeaButPleaseDisableUsernameValidation = false; // Paper - username validation overriding
+ private int velocityLoginMessageId = -1; // Paper - Velocity support + private int velocityLoginMessageId = -1; // Paper - Velocity support
public ServerLoginPacketListenerImpl(MinecraftServer server, Connection connection) { public ServerLoginPacketListenerImpl(MinecraftServer server, Connection connection) {
this.state = ServerLoginPacketListenerImpl.State.HELLO; this.state = ServerLoginPacketListenerImpl.State.HELLO;
@@ -289,6 +290,16 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se @@ -256,6 +257,16 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
this.state = ServerLoginPacketListenerImpl.State.KEY; this.state = ServerLoginPacketListenerImpl.State.KEY;
this.connection.send(new ClientboundHelloPacket("", this.server.getKeyPair().getPublic().getEncoded(), this.nonce)); this.connection.send(new ClientboundHelloPacket("", this.server.getKeyPair().getPublic().getEncoded(), this.challenge));
} else { } else {
+ // Paper start - Velocity support + // Paper start - Velocity support
+ if (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.velocity.enabled) { + if (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.velocity.enabled) {
@ -122,7 +122,7 @@ index df1a1681cdd5f055ff4394aa6990b252a3e25ea8..4be871c79cebfa62b6d2a22674ad2cde
// Spigot start // Spigot start
// Paper start - Cache authenticator threads // Paper start - Cache authenticator threads
authenticatorPool.execute(new Runnable() { authenticatorPool.execute(new Runnable() {
@@ -402,6 +413,12 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se @@ -363,6 +374,12 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
public class LoginHandler { public class LoginHandler {
public void fireEvents() throws Exception { public void fireEvents() throws Exception {
@ -135,7 +135,7 @@ index df1a1681cdd5f055ff4394aa6990b252a3e25ea8..4be871c79cebfa62b6d2a22674ad2cde
String playerName = ServerLoginPacketListenerImpl.this.gameProfile.getName(); String playerName = ServerLoginPacketListenerImpl.this.gameProfile.getName();
java.net.InetAddress address = ((java.net.InetSocketAddress) ServerLoginPacketListenerImpl.this.connection.getRemoteAddress()).getAddress(); java.net.InetAddress address = ((java.net.InetSocketAddress) ServerLoginPacketListenerImpl.this.connection.getRemoteAddress()).getAddress();
java.net.InetAddress rawAddress = ((java.net.InetSocketAddress) connection.getRawAddress()).getAddress(); // Paper java.net.InetAddress rawAddress = ((java.net.InetSocketAddress) connection.getRawAddress()).getAddress(); // Paper
@@ -450,6 +467,60 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se @@ -411,6 +428,60 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
// Spigot end // Spigot end
public void handleCustomQueryPacket(ServerboundCustomQueryPacket packet) { public void handleCustomQueryPacket(ServerboundCustomQueryPacket packet) {
@ -197,10 +197,10 @@ index df1a1681cdd5f055ff4394aa6990b252a3e25ea8..4be871c79cebfa62b6d2a22674ad2cde
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 410f4f539aaca338b09e503a6828fb1954936556..07eac5439164a7345476c55277538a152359630a 100644 index f5836a017d793214b41c02b344463e6a171b230c..16abfbf72b6033c190e1523ba6be8cfc467f7855 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -784,7 +784,7 @@ public final class CraftServer implements Server { @@ -797,7 +797,7 @@ public final class CraftServer implements Server {
@Override @Override
public long getConnectionThrottle() { public long getConnectionThrottle() {
// Spigot Start - Automatically set connection throttle for bungee configurations // Spigot Start - Automatically set connection throttle for bungee configurations

Datei anzeigen

@ -5,15 +5,15 @@ Subject: [PATCH] Use thread safe random in ServerLoginPacketListenerImpl
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
index 4be871c79cebfa62b6d2a22674ad2cde8bc9799c..fbd9807e3a9ad555999fa99e06211ecaf455a091 100644 index 9c6473beae78cd6e173e28335e6b06f878b162a9..1de5252f038cfb26646df4f8b8acf2b0ddf21c57 100644
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
@@ -52,7 +52,7 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se @@ -49,7 +49,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
private static final AtomicInteger UNIQUE_THREAD_ID = new AtomicInteger(0); private static final AtomicInteger UNIQUE_THREAD_ID = new AtomicInteger(0);
static final Logger LOGGER = LogUtils.getLogger(); static final Logger LOGGER = LogUtils.getLogger();
private static final int MAX_TICKS_BEFORE_LOGIN = 600; private static final int MAX_TICKS_BEFORE_LOGIN = 600;
- private static final RandomSource RANDOM = RandomSource.create(); - private static final RandomSource RANDOM = RandomSource.create();
+ private static final RandomSource RANDOM = new org.bukkit.craftbukkit.util.RandomSourceWrapper(new java.util.Random()); // Paper - This is called across threads, make safe + private static final RandomSource RANDOM = new org.bukkit.craftbukkit.util.RandomSourceWrapper(new java.util.Random()); // Paper - This is called across threads, make safe
private final byte[] nonce; private final byte[] challenge;
final MinecraftServer server; final MinecraftServer server;
public final Connection connection; public final Connection connection;

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Add NamespacedKey biome methods
Co-authored-by: Thonk <30448663+ExcessiveAmountsOfZombies@users.noreply.github.com> Co-authored-by: Thonk <30448663+ExcessiveAmountsOfZombies@users.noreply.github.com>
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index f833213ce3aceffa7771e55659987e126e28cf50..103ab25119bfcdd21eac7e1deeac025108e3c138 100644 index 7afa387ab07da199ba719fa08a1faba66c3025fa..ee25a6f714d58f3a6b9f7d9d28880c4e63bc6a44 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -609,6 +609,19 @@ public final class CraftMagicNumbers implements UnsafeValues { @@ -607,6 +607,19 @@ public final class CraftMagicNumbers implements UnsafeValues {
Preconditions.checkArgument(material.isBlock(), material + " is not a block"); Preconditions.checkArgument(material.isBlock(), material + " is not a block");
return getBlock(material).hasCollision; return getBlock(material).hasCollision;
} }

Datei anzeigen

@ -37,10 +37,10 @@ index 0000000000000000000000000000000000000000..c1d3bac79bb8b4796c013ff4472f75dc
+ } + }
+} +}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 5113e04bae5b1a1944b3e80889d9985937de936f..6dc6c3bccb4ba34268a87b0754c87eb1e0df4135 100644 index 7275c708a6a2ad138ded2eb6b3c4a57a9406883a..f6d52a1a6305d04fe650a0747b6e972921955a38 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -997,6 +997,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -998,6 +998,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
net.minecrell.terminalconsole.TerminalConsoleAppender.close(); // Paper - Use TerminalConsoleAppender net.minecrell.terminalconsole.TerminalConsoleAppender.close(); // Paper - Use TerminalConsoleAppender
} catch (Exception e) { } catch (Exception e) {
} }
@ -49,7 +49,7 @@ index 5113e04bae5b1a1944b3e80889d9985937de936f..6dc6c3bccb4ba34268a87b0754c87eb1
// Paper end // Paper end
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 0aef4fc4a89e627bc80504d7402f1ca2cdc95a74..f30621be24c6c3a4f173436fce1ad1c13507c84f 100644 index 6a9485f1c3743562700779930282285c6ad1067a..e072a5475a64d110f25ebcc871aa7703c2fc1e70 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java --- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -20,6 +20,12 @@ public class Main { @@ -20,6 +20,12 @@ public class Main {

Datei anzeigen

@ -16,10 +16,10 @@ Co-authored-by: =?UTF-8?q?Dani=C3=ABl=20Goossens?= <daniel@goossens.ch>
Co-authored-by: Nassim Jahnke <nassim@njahnke.dev> Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 882820653800e0fe9e16441cb4edcd119aa2c44d..55d8ced734a408c990c6c4fbc81707bcb1f27daa 100644 index fb47e820beb5b8224a44d41a7b83e10e6eb783c1..01420d687b0ffac4dd1f784c95525f811069b4d1 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java --- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -1328,6 +1328,46 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -1365,6 +1365,46 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
} }
@ -66,7 +66,7 @@ index 882820653800e0fe9e16441cb4edcd119aa2c44d..55d8ced734a408c990c6c4fbc81707bc
// Paper start - Anti-Xray - Bypass // Paper start - Anti-Xray - Bypass
private void playerLoadedChunk(ServerPlayer player, MutableObject<java.util.Map<Object, ClientboundLevelChunkWithLightPacket>> cachedDataPackets, LevelChunk chunk) { private void playerLoadedChunk(ServerPlayer player, MutableObject<java.util.Map<Object, ClientboundLevelChunkWithLightPacket>> cachedDataPackets, LevelChunk chunk) {
if (cachedDataPackets.getValue() == null) { if (cachedDataPackets.getValue() == null) {
@@ -1336,6 +1376,45 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -1373,6 +1413,45 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
Boolean shouldModify = chunk.getLevel().chunkPacketBlockController.shouldModify(player, chunk); Boolean shouldModify = chunk.getLevel().chunkPacketBlockController.shouldModify(player, chunk);
player.trackChunk(chunk.getPos(), (Packet) cachedDataPackets.getValue().computeIfAbsent(shouldModify, (s) -> { player.trackChunk(chunk.getPos(), (Packet) cachedDataPackets.getValue().computeIfAbsent(shouldModify, (s) -> {

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Stop large look changes from crashing the server
Co-authored-by: Jaren Knodel <Jaren@Knodel.com> Co-authored-by: Jaren Knodel <Jaren@Knodel.com>
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 5463b2fd9fdb8c979baa49479e3dbd7eb2d6dda7..763b065adee8fad24c6cc6898338ab57c6380baa 100644 index efe719de95fb38b6770b9ce9c93590d7c1522ea3..6d682a78c6fe4cbf44cd20449cfe89d530e1d28c 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3011,37 +3011,15 @@ public abstract class LivingEntity extends Entity { @@ -3028,37 +3028,15 @@ public abstract class LivingEntity extends Entity {
this.level.getProfiler().pop(); this.level.getProfiler().pop();
this.level.getProfiler().push("rangeChecks"); this.level.getProfiler().push("rangeChecks");
@ -54,10 +54,10 @@ index 5463b2fd9fdb8c979baa49479e3dbd7eb2d6dda7..763b065adee8fad24c6cc6898338ab57
this.level.getProfiler().pop(); this.level.getProfiler().pop();
this.animStep += f2; this.animStep += f2;
diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java 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 68f3131eb5d3c725279796effff083345edbaec9..713c11d6547cb02ac4b6a02aec07a8ba68019f3f 100644 index 3eb33d83b9cfa6ac87876a6343c88ac992b60374..66476b33cede1e44db5ec166a0cea81f82ffe47a 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java --- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java +++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
@@ -245,13 +245,7 @@ public abstract class Projectile extends Entity { @@ -246,13 +246,7 @@ public abstract class Projectile extends Entity {
} }
protected static float lerpRotation(float prevRot, float newRot) { protected static float lerpRotation(float prevRot, float newRot) {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add custom destroyerIdentity to sendBlockDamage
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index af439ea7800a8d4d606ac6cbfb6a621c5175d3de..e5248ea5abfe693f62175d69288f5b686f3ebebe 100644 index d87324ccf3490fff0981336ef7d22071cd573b51..a511e41a1bba469a3d21f758f6e363bd95ecc49c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1012,13 +1012,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1014,13 +1014,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override @Override
public void sendBlockDamage(Location loc, float progress) { public void sendBlockDamage(Location loc, float progress) {

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Fix: EndDragonFight killed statuses should be false for newly
diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
index f8d846345c1cc3c78f9ac14635b26f2affc77190..c36a543f091447ad50beb71741de3301e4fb81e3 100644 index 230de1c71b0a6d6370df2fedb337cf0e332a7596..8cf4ae35eb66e69de32295d707db6845b4b02962 100644
--- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java --- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
+++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java +++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
@@ -112,9 +112,11 @@ public class EndDragonFight { @@ -113,9 +113,11 @@ public class EndDragonFight {
if (nbt.contains("ExitPortalLocation", 10)) { if (nbt.contains("ExitPortalLocation", 10)) {
this.portalLocation = NbtUtils.readBlockPos(nbt.getCompound("ExitPortalLocation")); this.portalLocation = NbtUtils.readBlockPos(nbt.getCompound("ExitPortalLocation"));
} }

Datei anzeigen

@ -1,48 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Nassim Jahnke <nassim@njahnke.dev>
Date: Tue, 2 Aug 2022 19:16:23 +0200
Subject: [PATCH] Fix command preprocess cancelling and command changing
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index f082e121331be8aee523751a2d3f3393e3b0d02c..ca7afdbfa936801e53e8bb0d154538bc0f042ad3 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2259,13 +2259,24 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
PlayerCommandPreprocessEvent event = new PlayerCommandPreprocessEvent(this.getCraftPlayer(), command, new LazyPlayerSet(this.server));
this.cserver.getPluginManager().callEvent(event);
- if (event.isCancelled()) {
- return;
- }
command = event.getMessage().substring(1);
- ParseResults<CommandSourceStack> parseresults = this.parseCommand(command);
- Map<String, PlayerChatMessage> map = (packet.command().equals(command)) ? this.collectSignedArguments(packet, PreviewableCommand.of(parseresults)) : Collections.emptyMap();
+ // Paper start - send message headers for cancelled or changed commands
+ ParseResults<CommandSourceStack> parseresults = this.parseCommand(packet.command());
+ Map<String, PlayerChatMessage> map = this.collectSignedArguments(packet, PreviewableCommand.of(parseresults));
+ if (event.isCancelled() || !packet.command().equals(command)) {
+ for (final PlayerChatMessage message : map.values()) {
+ player.server.getPlayerList().broadcastMessageHeader(message, Set.of());
+ }
+ if (event.isCancelled()) {
+ return;
+ }
+
+ // Remove signatures if the command was changed and use the changed command source stack
+ map.clear();
+ parseresults = this.parseCommand(command);
+ }
+ // Paper end
// CraftBukkit end
Iterator iterator = map.values().iterator();
@@ -2569,6 +2580,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
});
} else if (this.player.getChatVisibility() == ChatVisiblity.SYSTEM) { // Re-add "Command Only" flag check
+ this.server.getPlayerList().broadcastMessageHeader(message, Set.of()); // Paper
this.send(new ClientboundSystemChatPacket(Component.translatable("chat.cannotSend").withStyle(ChatFormatting.RED), false));
} else {
this.chat(s, message, true);

Datei anzeigen

@ -1,19 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Nassim Jahnke <nassim@njahnke.dev>
Date: Fri, 10 Jun 2022 16:02:35 +0200
Subject: [PATCH] Remove invalid signature login stacktrace
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
index 96e33103773ae2b8807a6c0a6daac95c35c18bda..df1a1681cdd5f055ff4394aa6990b252a3e25ea8 100644
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
@@ -166,7 +166,7 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se
profilepublickey = ServerLoginPacketListenerImpl.validatePublicKey(this.profilePublicKeyData, this.gameProfile.getId(), signaturevalidator, this.server.enforceSecureProfile());
} catch (ProfilePublicKey.ValidationException profilepublickey_b) {
- ServerLoginPacketListenerImpl.LOGGER.error("Failed to validate profile key: {}", profilepublickey_b.getMessage());
+ // ServerLoginPacketListenerImpl.LOGGER.error("Failed to validate profile key: {}", profilepublickey_b.getMessage()); // Paper - unnecessary log
if (!this.connection.isMemoryConnection()) {
this.disconnect(profilepublickey_b.getComponent());
return;