3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 04:20:04 +01:00
Dieser Commit ist enthalten in:
Nassim Jahnke 2022-07-27 21:49:24 +02:00
Ursprung afb9e818fc
Commit 08828fde02
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B
281 geänderte Dateien mit 457 neuen und 472 gelöschten Zeilen

Datei anzeigen

@ -18,7 +18,7 @@ For consistency, the old API methods now forward to use the
ItemMeta API equivalents, and should deprecate the old API's.
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
index 7f778e037c1821cc45236bf2a95c28243d0ec126..758f0a620551838e32d5c68f7ee755f7ea374a46 100644
index e937186aaf819a77c80beeb9e08413a1f781c13a..0e19f49ca2496b1c42d27289bcea15d26993ca85 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -151,6 +151,23 @@ public final class ItemStack {

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Add World Util Methods
Methods that can be used for other patches to help improve logic.
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 28d6b8c5bebbbfb15ea76dea9e79e6b95978f15f..e4cf3d46de32ce5982da9c8cce2f1c6f74eddaa7 100644
index 5d693946111a73e25fcbff2475a2f47a44066fbf..8f1c2d8e6cd0500f7e51d134cb5ea549752a1184 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -215,7 +215,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -216,7 +216,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
public final LevelStorageSource.LevelStorageAccess convertable;
public final UUID uuid;

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Custom replacement for eaten items
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 30198bf3d05da6e05cca08a8e5f39edc964cb356..55c18329f20e3f95f51119fbde1a6f3863129a8d 100644
index 3023e714961d1b565d9e8659e07ccc4dab729f2f..1dcf41a4105c05c3182afa8585dee20723d2c136 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3586,9 +3586,10 @@ public abstract class LivingEntity extends Entity {
@@ -3589,9 +3589,10 @@ public abstract class LivingEntity extends Entity {
this.triggerItemUseEffects(this.useItem, 16);
// CraftBukkit start - fire PlayerItemConsumeEvent
ItemStack itemstack;
@ -20,7 +20,7 @@ index 30198bf3d05da6e05cca08a8e5f39edc964cb356..55c18329f20e3f95f51119fbde1a6f38
level.getCraftServer().getPluginManager().callEvent(event);
if (event.isCancelled()) {
@@ -3602,6 +3603,13 @@ public abstract class LivingEntity extends Entity {
@@ -3605,6 +3606,13 @@ public abstract class LivingEntity extends Entity {
} else {
itemstack = this.useItem.finishUsingItem(this.level, this);
}
@ -34,7 +34,7 @@ index 30198bf3d05da6e05cca08a8e5f39edc964cb356..55c18329f20e3f95f51119fbde1a6f38
// CraftBukkit end
if (itemstack != this.useItem) {
@@ -3609,6 +3617,11 @@ public abstract class LivingEntity extends Entity {
@@ -3612,6 +3620,11 @@ public abstract class LivingEntity extends Entity {
}
this.stopUsingItem();

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] handle NaN health/absorb values and repair bad data
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 55c18329f20e3f95f51119fbde1a6f3863129a8d..315ad337bddf3c6c95e829d3598d7d4ed87231b8 100644
index 1dcf41a4105c05c3182afa8585dee20723d2c136..54e7fa7a483e15c440f562559601292c2a064208 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -784,7 +784,13 @@ public abstract class LivingEntity extends Entity {
@ -34,7 +34,7 @@ index 55c18329f20e3f95f51119fbde1a6f3863129a8d..315ad337bddf3c6c95e829d3598d7d4e
// CraftBukkit start - Handle scaled health
if (this instanceof ServerPlayer) {
org.bukkit.craftbukkit.entity.CraftPlayer player = ((ServerPlayer) this).getBukkitEntity();
@@ -3419,7 +3429,7 @@ public abstract class LivingEntity extends Entity {
@@ -3422,7 +3432,7 @@ public abstract class LivingEntity extends Entity {
}
public void setAbsorptionAmount(float amount) {
@ -44,7 +44,7 @@ index 55c18329f20e3f95f51119fbde1a6f3863129a8d..315ad337bddf3c6c95e829d3598d7d4e
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 8ad19c44e4cfa39f81f8fc5e6a13e2649b6b0a3c..c8d63359c77ce11711df3ebed295fdd989d601a5 100644
index 946f68af7d9b7f812675eeda02cc6ac37d839917..16103cea67ec657edfd57b2a1d582794efeac4b6 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1920,6 +1920,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Use a Shared Random for Entities
Reduces memory usage and provides ensures more randomness, Especially since a lot of garbage entity objects get created.
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 380b7a31bae4d63248f8473dcbb602f4abbd4dd8..4e5dbb2414c76181053db13b13082154366f581a 100644
index 0f50355ea57101e71df6990c1e19c7b927f5c306..829dc369891c0d120da6ed00ab981c6fd204596d 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -159,6 +159,79 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Configurable spawn chances for skeleton horses
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index e4cf3d46de32ce5982da9c8cce2f1c6f74eddaa7..27186bffd00b9a7b23b6abc053362f3f70a9d481 100644
index 8f1c2d8e6cd0500f7e51d134cb5ea549752a1184..22e0612183be9e419d52ac2274dc728900433249 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -586,7 +586,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -587,7 +587,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
blockposition = this.findLightningTargetAround(this.getBlockRandomPos(j, 0, k, 15));
if (this.isRainingAt(blockposition)) {
DifficultyInstance difficultydamagescaler = this.getCurrentDifficultyAt(blockposition);

Datei anzeigen

@ -42,7 +42,7 @@ index e89410b00c8f9ef94cd2baf621802fa847bd6456..d3277e8aa7244ab490a6b354d863d4a9
public static boolean isInSpawnableBounds(BlockPos pos) {
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java b/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java
index 91d2939bde77c52c25d2633dacc461d7284ef2d3..0d815a39d50bb8c06f81e3386764db6a00d84985 100644
index fabc7df600c89b01d97a76eb0b1206a32407b906..6cec5cda20531aadf8e2148908a70f8b573d7d82 100644
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java
@@ -119,6 +119,7 @@ public abstract class ChunkAccess implements BlockGetter, BiomeManager.NoiseBiom
@ -71,7 +71,7 @@ index 80e383e9a2d12f9f1b0b0d9ae71a0add9b51c9d4..a9c65c8d36e5c7080133706df1363b3c
public BlockState getBlockState(BlockPos pos) {
return Blocks.VOID_AIR.defaultBlockState();
diff --git a/src/main/java/net/minecraft/world/level/chunk/ImposterProtoChunk.java b/src/main/java/net/minecraft/world/level/chunk/ImposterProtoChunk.java
index 475663848a612f356a8e01330b03efb33e98fcec..ca46ed27fdc1eef979829d19b9e90db6d5c59e09 100644
index 3dff0f7c3ccd04a67b2153e402d801de2341e520..7b320357973202423c29743d922b72dc4ec11efe 100644
--- a/src/main/java/net/minecraft/world/level/chunk/ImposterProtoChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/ImposterProtoChunk.java
@@ -47,6 +47,12 @@ public class ImposterProtoChunk extends ProtoChunk {
@ -138,7 +138,7 @@ index dddae1e226d8f58cdcfc597e25d4228cd3245cb4..ae37e97e52557b48f129cc02eeea3953
private short tickingFluidCount;
public final PalettedContainer<BlockState> states;
diff --git a/src/main/java/net/minecraft/world/level/chunk/ProtoChunk.java b/src/main/java/net/minecraft/world/level/chunk/ProtoChunk.java
index 3b11824a1b85da437eec108f631eacfb5192459e..5ce6a2b83546f4dbc3183a386f51b4bacc173744 100644
index 603111a52346f678aba0fd66b010d8f3026fce40..9014331e4ceac9f77a911aead87bf452d29e3fb4 100644
--- a/src/main/java/net/minecraft/world/level/chunk/ProtoChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/ProtoChunk.java
@@ -88,14 +88,18 @@ public class ProtoChunk extends ChunkAccess {

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Only process BlockPhysicsEvent if a plugin has a listener
Saves on some object allocation and processing when no plugin listens to this
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index cc6699b9806bfaeca7d6e3564974bdbd532e06bc..170e3d9257f98af7ba1a95d0bf084b11258ea02b 100644
index 40ea9d30c5d9a0936ba495adea4d96775bce2e06..00424041950529973eaf33f4d312dbd1038ae675 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1356,6 +1356,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@ -18,10 +18,10 @@ index cc6699b9806bfaeca7d6e3564974bdbd532e06bc..170e3d9257f98af7ba1a95d0bf084b11
this.profiler.push(() -> {
return worldserver + " " + worldserver.dimension().location();
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 27186bffd00b9a7b23b6abc053362f3f70a9d481..dc4788765bbbe15c477c2e975129d63923d3f31f 100644
index 22e0612183be9e419d52ac2274dc728900433249..bd60bb4a1fa7f3c38c651f72bc58dffcd5736b43 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -214,6 +214,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -215,6 +215,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
// CraftBukkit start
public final LevelStorageSource.LevelStorageAccess convertable;
public final UUID uuid;

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Entity AddTo/RemoveFrom World Events
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index dc4788765bbbe15c477c2e975129d63923d3f31f..68a6f4e63bcaff52d69c3532ffa3da15e883a6e4 100644
index bd60bb4a1fa7f3c38c651f72bc58dffcd5736b43..c94fc95adfce7ec4ab3d881f1667f2f54ae38393 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2118,6 +2118,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -2119,6 +2119,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
entity.setOrigin(entity.getOriginVector().toLocation(getWorld()));
}
// Paper end
@ -16,7 +16,7 @@ index dc4788765bbbe15c477c2e975129d63923d3f31f..68a6f4e63bcaff52d69c3532ffa3da15
}
public void onTrackingEnd(Entity entity) {
@@ -2193,6 +2194,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -2194,6 +2195,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
}
}
// CraftBukkit end

Datei anzeigen

@ -20,10 +20,10 @@ index 8834ed411a7db86b4d2b88183a1315317107d719..c45b5ab6776f3ac79f856c3a6467c510
static final ServerboundInteractPacket.Action ATTACK_ACTION = new ServerboundInteractPacket.Action() {
@Override
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 2266ddf2ed66dfc9f82facddcbe6fcc89e1c0267..a33a142ba55be937fb19f70239f8327f8b7f236e 100644
index 02b5b4c3ae00354d105c5f7f47d01317f1097922..6d09bd67753a16effb80224bb4c970f7bf3aeb9a 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2411,8 +2411,37 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
@@ -2614,8 +2614,37 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
});
}
}

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Fix Cancelling BlockPlaceEvent triggering physics
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 68a6f4e63bcaff52d69c3532ffa3da15e883a6e4..106bdc4ca666fc4db03a2ec4885add5a4d1bb059 100644
index c94fc95adfce7ec4ab3d881f1667f2f54ae38393..14e618db89745942893f82d57f5383fcca6c41e9 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1364,6 +1364,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -1365,6 +1365,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@Override
public void updateNeighborsAt(BlockPos pos, Block sourceBlock) {

Datei anzeigen

@ -18,10 +18,10 @@ index 1294b38262505b0d54089e428df9b363219de1f0..ee37ec0de1ca969144824427ae42b0c8
buf.writeComponent(this.playerPrefix);
buf.writeComponent(this.playerSuffix);
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 170e3d9257f98af7ba1a95d0bf084b11258ea02b..2b9199df0b969cce0de3a0dd47da7edccabb97f7 100644
index 00424041950529973eaf33f4d312dbd1038ae675..0dffb6e8d6f4edfb4dfaa6b24e81d72356446ebc 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -578,6 +578,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -580,6 +580,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.server.getPluginManager().callEvent(new org.bukkit.event.world.WorldLoadEvent(worldserver.getWorld()));
}
@ -43,10 +43,10 @@ index 170e3d9257f98af7ba1a95d0bf084b11258ea02b..2b9199df0b969cce0de3a0dd47da7edc
this.server.getPluginManager().callEvent(new ServerLoadEvent(ServerLoadEvent.LoadType.STARTUP));
this.connection.acceptConnections();
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 16e1d0b62e01551a54d60c81ca12708f51aceef9..3fe3d417b6c1ff49a412c308bfe6a43182d0986e 100644
index 28c136fe37afeda1b43523a17a46a115f1dbf3f3..029e537c129dd19039ac30065f3319558d30ba64 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -98,6 +98,7 @@ import net.minecraft.world.level.storage.PlayerDataStorage;
@@ -94,6 +94,7 @@ import net.minecraft.world.level.storage.PlayerDataStorage;
import net.minecraft.world.phys.Vec3;
import net.minecraft.world.scores.Objective;
import net.minecraft.world.scores.PlayerTeam;
@ -54,7 +54,7 @@ index 16e1d0b62e01551a54d60c81ca12708f51aceef9..3fe3d417b6c1ff49a412c308bfe6a431
import net.minecraft.world.scores.Team;
import org.slf4j.Logger;
@@ -154,6 +155,7 @@ public abstract class PlayerList {
@@ -155,6 +156,7 @@ public abstract class PlayerList {
// CraftBukkit start
private CraftServer cserver;
private final Map<String,ServerPlayer> playersByName = new java.util.HashMap<>();
@ -62,7 +62,7 @@ index 16e1d0b62e01551a54d60c81ca12708f51aceef9..3fe3d417b6c1ff49a412c308bfe6a431
public PlayerList(MinecraftServer server, RegistryAccess.Frozen registryManager, PlayerDataStorage saveHandler, int maxPlayers) {
this.cserver = server.server = new CraftServer((DedicatedServer) server, this);
@@ -389,6 +391,13 @@ public abstract class PlayerList {
@@ -393,6 +395,13 @@ public abstract class PlayerList {
player.initInventoryMenu();
// CraftBukkit - Moved from above, added world
@ -76,7 +76,7 @@ index 16e1d0b62e01551a54d60c81ca12708f51aceef9..3fe3d417b6c1ff49a412c308bfe6a431
PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", player.getName().getString(), s1, player.getId(), worldserver1.serverLevelData.getLevelName(), player.getX(), player.getY(), player.getZ());
}
@@ -508,6 +517,16 @@ public abstract class PlayerList {
@@ -512,6 +521,16 @@ public abstract class PlayerList {
entityplayer.doTick(); // SPIGOT-924
// CraftBukkit end
@ -93,7 +93,7 @@ index 16e1d0b62e01551a54d60c81ca12708f51aceef9..3fe3d417b6c1ff49a412c308bfe6a431
this.save(entityplayer);
if (entityplayer.isPassenger()) {
Entity entity = entityplayer.getRootVehicle();
@@ -1136,6 +1155,13 @@ public abstract class PlayerList {
@@ -1140,6 +1159,13 @@ public abstract class PlayerList {
}
// CraftBukkit end

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Configurable RCON IP address
For servers with multiple IP's, ability to bind to a specific interface.
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
index cfff4a6711b2acd4b40ec80544c169a46ded3f79..cc92e2c5e6b62c6a67d0a6534b078e3a6029daf5 100644
index efa2dd7947f68aaec479d835f2b1e60d16254ae1..1e01277448a3cf2b2045b54b182166a66c822e20 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
@@ -100,6 +100,8 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] EntityRegainHealthEvent isFastRegen API
Don't even get me started
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 315ad337bddf3c6c95e829d3598d7d4ed87231b8..292f5dddd644880fc759fa8634d633ad40f3bf4f 100644
index 54e7fa7a483e15c440f562559601292c2a064208..d33495915e63e4cae16b3c1ed536bae916a944d9 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -1250,10 +1250,16 @@ public abstract class LivingEntity extends Entity {

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] remove null possibility for getServer singleton
to stop IDE complaining about potential NPE
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 2b9199df0b969cce0de3a0dd47da7edccabb97f7..b40c2ccdc87208b5fc1962ad06ce961e51186f3e 100644
index 0dffb6e8d6f4edfb4dfaa6b24e81d72356446ebc..b3834c86eb79400c8cef60daa03c90a66b03b688 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -179,6 +179,7 @@ import co.aikar.timings.MinecraftTimings; // Paper
@@ -181,6 +181,7 @@ import co.aikar.timings.MinecraftTimings; // Paper
public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTask> implements CommandSource, AutoCloseable {
@ -17,7 +17,7 @@ index 2b9199df0b969cce0de3a0dd47da7edccabb97f7..b40c2ccdc87208b5fc1962ad06ce961e
public static final Logger LOGGER = LogUtils.getLogger();
public static final String VANILLA_BRAND = "vanilla";
private static final float AVERAGE_TICK_TIME_SMOOTHING = 0.8F;
@@ -305,6 +306,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -307,6 +308,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public MinecraftServer(OptionSet options, DataPackConfig datapackconfiguration, DynamicOps<Tag> registryreadops, Thread thread, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PackRepository resourcepackrepository, WorldStem worldstem, Proxy proxy, DataFixer datafixer, Services services, ChunkProgressListenerFactory worldloadlistenerfactory) {
super("Server");

Datei anzeigen

@ -13,10 +13,10 @@ custom renderers are in use, defaulting to the much simpler Vanilla system.
Additionally, numerous issues to player position tracking on maps has been fixed.
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 106bdc4ca666fc4db03a2ec4885add5a4d1bb059..ddd956828996c9d7a86aa89a01cc5a2ee4606c30 100644
index 14e618db89745942893f82d57f5383fcca6c41e9..652c909eaa9e76c29427b7220adf9fe4947c2e84 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2139,6 +2139,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -2140,6 +2140,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
{
if ( iter.next().player == entity )
{
@ -25,10 +25,10 @@ index 106bdc4ca666fc4db03a2ec4885add5a4d1bb059..ddd956828996c9d7a86aa89a01cc5a2e
}
}
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
index 24456bbf2cd9f1878cf545e8d164ff524c321a4c..fdda98cb38ec96d0189931c41257cc01966373d5 100644
index 08b0b7b9146f58c4eb263d5ce1fee1b08d43fafe..1e3ac1d2cb5adf4c0fa3b703f2ecdc32cd8ce240 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -762,6 +762,14 @@ public abstract class Player extends LivingEntity {
@@ -763,6 +763,14 @@ public abstract class Player extends LivingEntity {
return null;
}
// CraftBukkit end

Datei anzeigen

@ -485,7 +485,7 @@ index 0000000000000000000000000000000000000000..3377b86c337d0234bbb9b0349e4034a7
+ }
+}
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 4e5dbb2414c76181053db13b13082154366f581a..a96d50b68d6ce6fe9b36de5af132b2fa6d08961c 100644
index 829dc369891c0d120da6ed00ab981c6fd204596d..0fe534337ea72b338583039644f1f2b5be76d385 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -232,6 +232,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Async GameProfileCache saving
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index b40c2ccdc87208b5fc1962ad06ce961e51186f3e..c7b740087003113a00c5eccc9b0405b62b9da2b7 100644
index b3834c86eb79400c8cef60daa03c90a66b03b688..f3f528cc7f07da69c45e4290de098c0443c7a952 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -943,7 +943,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -945,7 +945,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
} catch (java.lang.InterruptedException ignored) {} // Paper
if (org.spigotmc.SpigotConfig.saveUserCacheOnStopOnly) {
MinecraftServer.LOGGER.info("Saving usercache.json");
@ -18,7 +18,7 @@ index b40c2ccdc87208b5fc1962ad06ce961e51186f3e..c7b740087003113a00c5eccc9b0405b6
// Spigot end
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 2f2e07094a362ea1f459da85eb9ef84945a6e206..ee509d7b06a9785a39b59329a19531047953831b 100644
index d70d97c65d5bdb47a17a226d65bad8ba1421b11b..5b2980866ae3cd78f1852b0ad396ff1967ddfc16 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -247,7 +247,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@ -31,7 +31,7 @@ index 2f2e07094a362ea1f459da85eb9ef84945a6e206..ee509d7b06a9785a39b59329a1953104
if (!OldUsersConverter.serverReadyAfterUserconversion(this)) {
diff --git a/src/main/java/net/minecraft/server/players/GameProfileCache.java b/src/main/java/net/minecraft/server/players/GameProfileCache.java
index fb110ecb7fa8d0de7d8ce8e239d1db341a333203..717a0d1c1f4df7ebd5f4cdd5e24cabe3fb66bf06 100644
index d246563021c32127e570809f4d849b6a156f4dc6..2249beff3200c5dab1e81bd3d10f2c3bf1e7dbc9 100644
--- a/src/main/java/net/minecraft/server/players/GameProfileCache.java
+++ b/src/main/java/net/minecraft/server/players/GameProfileCache.java
@@ -127,7 +127,7 @@ public class GameProfileCache {

Datei anzeigen

@ -34,10 +34,10 @@ index 715873e52708762b25c29caf6d41d7cb8f79ce57..39bd98b9496e4a27fd69a2de7c83c406
continue;
}
diff --git a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java
index 71206f52a234a17db13062d975cbf66d1ffebc9a..f3fcd345178efd4917ef79cb141275a987f99e58 100644
index 3112173b3449f2c4c9b0851ceaf02abb01853362..9c45e49f480ccd72f6d6c94e5dec41c4becc76cf 100644
--- a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java
+++ b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java
@@ -284,7 +284,9 @@ public class StructureTemplate {
@@ -285,7 +285,9 @@ public class StructureTemplate {
definedstructure_blockinfo.nbt.putLong("LootTableSeed", random.nextLong());
}

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Avoid blocking on Network Manager creation
Per Paper issue 294
diff --git a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
index 0b657174309b6eaee0c8a2d6c17dd467d278739c..5e1a6f2cd2d0d9c6b17c446fa782e4089cc138d5 100644
index a44520e8fb35d349d6481f369e39db1fdb475749..0e04532b8f1d48116eb46dcef7952bfcc0d11394 100644
--- a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
+++ b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
@@ -62,6 +62,15 @@ public class ServerConnectionListener {
@@ -63,6 +63,15 @@ public class ServerConnectionListener {
public volatile boolean running;
private final List<ChannelFuture> channels = Collections.synchronizedList(Lists.newArrayList());
final List<Connection> connections = Collections.synchronizedList(Lists.newArrayList());
@ -25,7 +25,7 @@ index 0b657174309b6eaee0c8a2d6c17dd467d278739c..5e1a6f2cd2d0d9c6b17c446fa782e408
public ServerConnectionListener(MinecraftServer server) {
this.server = server;
@@ -97,7 +106,8 @@ public class ServerConnectionListener {
@@ -98,7 +107,8 @@ public class ServerConnectionListener {
int j = ServerConnectionListener.this.server.getRateLimitPacketsPerSecond();
Object object = j > 0 ? new RateKickingConnection(j) : new Connection(PacketFlow.SERVERBOUND);
@ -35,7 +35,7 @@ index 0b657174309b6eaee0c8a2d6c17dd467d278739c..5e1a6f2cd2d0d9c6b17c446fa782e408
channel.pipeline().addLast("packet_handler", (ChannelHandler) object);
((Connection) object).setListener(new ServerHandshakePacketListenerImpl(ServerConnectionListener.this.server, (Connection) object));
}
@@ -156,6 +166,7 @@ public class ServerConnectionListener {
@@ -157,6 +167,7 @@ public class ServerConnectionListener {
synchronized (this.connections) {
// Spigot Start

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Don't lookup game profiles that have no UUID and no name
diff --git a/src/main/java/net/minecraft/server/players/GameProfileCache.java b/src/main/java/net/minecraft/server/players/GameProfileCache.java
index 717a0d1c1f4df7ebd5f4cdd5e24cabe3fb66bf06..d00e8486c145200b2431cf92d7049a6d87d55227 100644
index 2249beff3200c5dab1e81bd3d10f2c3bf1e7dbc9..3295fd4bca58cf8feeff2fcefa514a5ec89310f9 100644
--- a/src/main/java/net/minecraft/server/players/GameProfileCache.java
+++ b/src/main/java/net/minecraft/server/players/GameProfileCache.java
@@ -98,6 +98,7 @@ public class GameProfileCache {

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Add setting for proxy online mode status
TODO: Add isProxyOnlineMode check to Metrics
diff --git a/src/main/java/net/minecraft/server/players/GameProfileCache.java b/src/main/java/net/minecraft/server/players/GameProfileCache.java
index d00e8486c145200b2431cf92d7049a6d87d55227..c7edbd12361cfd3dcf1359917d579fae4c3cc8a7 100644
index 3295fd4bca58cf8feeff2fcefa514a5ec89310f9..376845f5a25a348e76193fac5c047b0ba2fb080f 100644
--- a/src/main/java/net/minecraft/server/players/GameProfileCache.java
+++ b/src/main/java/net/minecraft/server/players/GameProfileCache.java
@@ -98,7 +98,8 @@ public class GameProfileCache {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Configurable packet in spam threshold
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index a33a142ba55be937fb19f70239f8327f8b7f236e..299dc4ff01642a5d7229a1e0540c3154e42e25a7 100644
index 6d09bd67753a16effb80224bb4c970f7bf3aeb9a..d3d141d18d9e66bc04e4c1af38b44bdd41e8d416 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1535,13 +1535,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
@@ -1601,13 +1601,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
// Spigot start - limit place/interactions
private int limitedPackets;
private long lastLimitedPacket = -1;

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Configurable flying kick messages
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 299dc4ff01642a5d7229a1e0540c3154e42e25a7..6aac105a9717b02af648be82fe8e1b2b30bef8a6 100644
index d3d141d18d9e66bc04e4c1af38b44bdd41e8d416..aea8d2376e88a327985f7f5d34e355cd9090941e 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -327,7 +327,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
@@ -355,7 +355,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
if (this.clientIsFloating && !this.player.isSleeping() && !this.player.isPassenger()) {
if (++this.aboveGroundTickCount > 80) {
ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating too long!", this.player.getName().getString());
@ -17,7 +17,7 @@ index 299dc4ff01642a5d7229a1e0540c3154e42e25a7..6aac105a9717b02af648be82fe8e1b2b
return;
}
} else {
@@ -346,7 +346,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
@@ -374,7 +374,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
if (this.clientVehicleIsFloating && this.player.getRootVehicle().getControllingPassenger() == this.player) {
if (++this.aboveGroundVehicleTickCount > 80) {
ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating a vehicle too long!", this.player.getName().getString());

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Cache user authenticator threads
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
index ff8773f3671970bd759303f7a4bbc17d4df5a1de..13f8f3a2a6382ef51567cc6f46b573d971f700f6 100644
index 5054c3208d1723a33a96d23edcbc9f1483b879e5..72bc5648706380639440456fc938d9350e12f1cc 100644
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
@@ -120,6 +120,18 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
@@ -122,6 +122,18 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se
}
@ -27,7 +27,7 @@ index ff8773f3671970bd759303f7a4bbc17d4df5a1de..13f8f3a2a6382ef51567cc6f46b573d9
// Spigot start
public void initUUID()
{
@@ -258,8 +270,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
@@ -258,8 +270,8 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se
this.connection.send(new ClientboundHelloPacket("", this.server.getKeyPair().getPublic().getEncoded(), this.nonce));
} else {
// Spigot start
@ -38,7 +38,7 @@ index ff8773f3671970bd759303f7a4bbc17d4df5a1de..13f8f3a2a6382ef51567cc6f46b573d9
@Override
public void run() {
try {
@@ -270,7 +282,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
@@ -270,7 +282,8 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se
server.server.getLogger().log(java.util.logging.Level.WARNING, "Exception verifying " + ServerLoginPacketListenerImpl.this.gameProfile.getName(), ex);
}
}
@ -48,7 +48,7 @@ index ff8773f3671970bd759303f7a4bbc17d4df5a1de..13f8f3a2a6382ef51567cc6f46b573d9
// Spigot end
}
@@ -311,7 +324,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
@@ -313,7 +326,8 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se
throw new IllegalStateException("Protocol error", cryptographyexception);
}
@ -58,7 +58,7 @@ index ff8773f3671970bd759303f7a4bbc17d4df5a1de..13f8f3a2a6382ef51567cc6f46b573d9
public void run() {
GameProfile gameprofile = ServerLoginPacketListenerImpl.this.gameProfile;
@@ -356,10 +370,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
@@ -358,10 +372,8 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se
return ServerLoginPacketListenerImpl.this.server.getPreventProxyConnections() && socketaddress instanceof InetSocketAddress ? ((InetSocketAddress) socketaddress).getAddress() : null;
}

Datei anzeigen

@ -34,10 +34,10 @@ index 6ec5a1525d0b8ced8fe78d3eab29c5eb82996844..2442c287a7f26cfee10a19e9015558cd
return (double) pos.getMaxBlockX() > this.getMinX() && (double) pos.getMinBlockX() < this.getMaxX() && (double) pos.getMaxBlockZ() > this.getMinZ() && (double) pos.getMinBlockZ() < this.getMaxZ();
}
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
index 91666d0c8116353b80d49941f17a3a8405eb50a7..0f92f2906195f5b2b70ca02a46fa111a46f8f18f 100644
index 2b543472302faf4b6298efe9bc44c023051f4997..b1eecc184bc9daf0a9c7db8da06e11bfb63d9d88 100644
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
@@ -387,6 +387,7 @@ public abstract class ChunkGenerator {
@@ -390,6 +390,7 @@ public abstract class ChunkGenerator {
while (iterator.hasNext()) {
ChunkPos chunkcoordintpair = (ChunkPos) iterator.next();

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Optimize ItemStack.isEmpty()
Remove hashMap lookup every check, simplify code to remove ternary
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
index 758f0a620551838e32d5c68f7ee755f7ea374a46..e7dbcacff58ce4b48f315eae80878c136b740416 100644
index 0e19f49ca2496b1c42d27289bcea15d26993ca85..c0959edaef2bc0ebcfa482cd120855c23d83f2b8 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -245,7 +245,7 @@ public final class ItemStack {

Datei anzeigen

@ -26,7 +26,7 @@ index 32ef3edebe94a2014168b7e438752a80b2687e5f..ab6c58eed6707ab7b0aa3e7549a871ad
// Paper end
buf.writeComponent(this.text);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index c8d63359c77ce11711df3ebed295fdd989d601a5..7f4ed398c48534eec4303a394f360f476b7757ad 100644
index 16103cea67ec657edfd57b2a1d582794efeac4b6..198d679a0f46324b2ec483d474cff0829bbd6844 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -274,6 +274,26 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Properly fix item duplication bug
Credit to prplz for figuring out the real issue
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 02dd7ca5f7845803623488d7c7e84a2eb22b2d90..5cd7e7eb7c1288cf4c1f13f63b3ea0cc34d6beb8 100644
index b117a98dea77755bee33f8a141f8df16b587beeb..8f4b8e4911d5c3bb82c9ac246c041c0eb51a3123 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -2200,7 +2200,7 @@ public class ServerPlayer extends Player {
@@ -2189,7 +2189,7 @@ public class ServerPlayer extends Player {
@Override
public boolean isImmobile() {
@ -19,10 +19,10 @@ index 02dd7ca5f7845803623488d7c7e84a2eb22b2d90..5cd7e7eb7c1288cf4c1f13f63b3ea0cc
@Override
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 6aac105a9717b02af648be82fe8e1b2b30bef8a6..aafeb6643bcc08ae1d88ba2a68f1f6a29c8ce2b7 100644
index aea8d2376e88a327985f7f5d34e355cd9090941e..c14ab179046b3c608190ddf1ffa1048411c664aa 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -3037,7 +3037,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
@@ -3253,7 +3253,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
public final boolean isDisconnected() {

Datei anzeigen

@ -7,10 +7,10 @@ Saving players async is extremely dangerous. This will force it to main
the same way we handle async chunk loads.
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 3fe3d417b6c1ff49a412c308bfe6a43182d0986e..6c86e18cb59a4e9a906269d570d228f05c700a48 100644
index 029e537c129dd19039ac30065f3319558d30ba64..c0541a83881a3329577897e6c4f3009db17aca4a 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -1040,11 +1040,13 @@ public abstract class PlayerList {
@@ -1044,11 +1044,13 @@ public abstract class PlayerList {
}
public void saveAll() {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Don't allow entities to ride themselves - #572
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index a96d50b68d6ce6fe9b36de5af132b2fa6d08961c..9d854cb4722ccd3a665fd29aff8bf368163c30e4 100644
index 0fe534337ea72b338583039644f1f2b5be76d385..0c9cabfb5ff3733ac857889482474555b17b4e5c 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2322,6 +2322,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -2319,6 +2319,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
protected boolean addPassenger(Entity entity) { // CraftBukkit

Datei anzeigen

@ -131,7 +131,7 @@ index b3433ce9c722bdab81848a6c2d121ca510c48509..16a1a005f2dda30cf804bf51638383ef
@Override
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 292f5dddd644880fc759fa8634d633ad40f3bf4f..8c5e4958f087a3f688261a44377dde39bc134b80 100644
index d33495915e63e4cae16b3c1ed536bae916a944d9..9f6629189a126c12a2d45098e12f41d8e45147a4 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -1723,7 +1723,8 @@ public abstract class LivingEntity extends Entity {
@ -284,7 +284,7 @@ index dbdba510d8ff3c622ed928151cf525cfd1d1b1b5..aa0ba9c7dcb0ee81c9081031c447eeab
world.levelEvent(1042, blockposition, 0);
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
index 60c5d4c97a340120f49f51b3d1dc7e6f2a19a936..0422e389e5b9577417d09490a15584ed5b885209 100644
index 4b3dc4648709abbdd6ac0972c298a64a875e5f6c..77125720fcbeb7bfc180effb27cfb78c74832ce5 100644
--- a/src/main/java/net/minecraft/world/level/block/Block.java
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
@@ -376,8 +376,13 @@ public class Block extends BlockBehaviour implements ItemLike {

Datei anzeigen

@ -12,7 +12,7 @@ just as it does in Vanilla, but entity pushing logic will be capped.
You can set this to 0 to disable collisions.
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 9d854cb4722ccd3a665fd29aff8bf368163c30e4..1daffb325617f8e9f3218aa879eb7d8467d69447 100644
index 0c9cabfb5ff3733ac857889482474555b17b4e5c..778549f30d941352014983adb0e7a4457e6eb11b 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -379,6 +379,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@ -24,10 +24,10 @@ index 9d854cb4722ccd3a665fd29aff8bf368163c30e4..1daffb325617f8e9f3218aa879eb7d84
private org.bukkit.util.Vector origin;
@javax.annotation.Nullable
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 8c5e4958f087a3f688261a44377dde39bc134b80..20bc6684b0394fe08aa35c371bf668d8ebcf98b1 100644
index 9f6629189a126c12a2d45098e12f41d8e45147a4..841149ffcdb2228fac3ac2bdc56c02ed26f219f6 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3261,8 +3261,11 @@ public abstract class LivingEntity extends Entity {
@@ -3264,8 +3264,11 @@ public abstract class LivingEntity extends Entity {
}
}

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Make targetSize more aggressive in the chunk unload queue
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index e1200e903e39c3e5cb023e1bd4fe104907c0c6eb..702d885b6a5caf8cabc40934893a081b01906781 100644
index 1c73599e37e9b830ff0ab9bcc9edc7b63daa6ca1..dd318c213742299fca1335fadf1f4465b471d7ea 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -232,7 +232,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -233,7 +233,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
this.entityMap = new Int2ObjectOpenHashMap();
this.chunkTypeCache = new Long2ByteOpenHashMap();
this.chunkSaveCooldowns = new Long2LongOpenHashMap();
@ -17,7 +17,7 @@ index e1200e903e39c3e5cb023e1bd4fe104907c0c6eb..702d885b6a5caf8cabc40934893a081b
this.structureTemplateManager = structureTemplateManager;
Path path = session.getDimensionPath(world.dimension());
@@ -587,7 +587,6 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -588,7 +588,6 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
private void processUnloads(BooleanSupplier shouldKeepTicking) {
LongIterator longiterator = this.toDrop.iterator();
@ -25,7 +25,7 @@ index e1200e903e39c3e5cb023e1bd4fe104907c0c6eb..702d885b6a5caf8cabc40934893a081b
for (int i = 0; longiterator.hasNext() && (shouldKeepTicking.getAsBoolean() || i < 200 || this.toDrop.size() > 2000); longiterator.remove()) {
long j = longiterator.nextLong();
ChunkHolder playerchunk = (ChunkHolder) this.updatingChunkMap.remove(j);
@@ -600,7 +599,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -601,7 +600,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
}

Datei anzeigen

@ -30,10 +30,10 @@ will have plugins and worlds saving to the disk has a high potential to result
in corruption/dataloss.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index c7b740087003113a00c5eccc9b0405b62b9da2b7..ff7cc68eeb1aa61c06d50ed47211009d51b2b234 100644
index f3f528cc7f07da69c45e4290de098c0443c7a952..41928abfffbf6102e92cb45532e691b35a603a31 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -219,6 +219,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -221,6 +221,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public final Map<ResourceKey<Level>, ServerLevel> levels;
private PlayerList playerList;
private volatile boolean running;
@ -41,7 +41,7 @@ index c7b740087003113a00c5eccc9b0405b62b9da2b7..ff7cc68eeb1aa61c06d50ed47211009d
private boolean stopped;
private int tickCount;
protected final Proxy proxy;
@@ -882,7 +883,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -884,7 +885,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
if (this.playerList != null) {
MinecraftServer.LOGGER.info("Saving players");
this.playerList.saveAll();
@ -50,7 +50,7 @@ index c7b740087003113a00c5eccc9b0405b62b9da2b7..ff7cc68eeb1aa61c06d50ed47211009d
try { Thread.sleep(100); } catch (InterruptedException ex) {} // CraftBukkit - SPIGOT-625 - give server at least a chance to send packets
}
@@ -962,6 +963,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -964,6 +965,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
public void halt(boolean flag) {
@ -64,10 +64,10 @@ index c7b740087003113a00c5eccc9b0405b62b9da2b7..ff7cc68eeb1aa61c06d50ed47211009d
if (flag) {
try {
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 6c86e18cb59a4e9a906269d570d228f05c700a48..b28bb51e5476b250d9de91f2e380dd8ed2aa7041 100644
index c0541a83881a3329577897e6c4f3009db17aca4a..4d029c6beb0637f87d1d0a265e00b2d5be677b6c 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -1151,8 +1151,15 @@ public abstract class PlayerList {
@@ -1155,8 +1155,15 @@ public abstract class PlayerList {
}
public void removeAll() {

Datei anzeigen

@ -11,10 +11,10 @@ I suspect Mojang may switch to this behavior before full release.
To be converted into a Paper-API event at some point in the future?
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index aafeb6643bcc08ae1d88ba2a68f1f6a29c8ce2b7..61752ae5602e901ed03037cb2dee29f461b68cac 100644
index c14ab179046b3c608190ddf1ffa1048411c664aa..bdef09be892bf2675f713e1f8babada7019c0781 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2259,6 +2259,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
@@ -2439,6 +2439,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
switch (packet.getAction()) {
case PRESS_SHIFT_KEY:
this.player.setShiftKeyDown(true);
@ -29,10 +29,10 @@ index aafeb6643bcc08ae1d88ba2a68f1f6a29c8ce2b7..61752ae5602e901ed03037cb2dee29f4
case RELEASE_SHIFT_KEY:
this.player.setShiftKeyDown(false);
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
index fdda98cb38ec96d0189931c41257cc01966373d5..9aa134e56d661d033bb7229e6ab662534bf9cba9 100644
index 1e3ac1d2cb5adf4c0fa3b703f2ecdc32cd8ce240..07a8abb714a9dfd470ab0486c336e3b58ea927a1 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -587,7 +587,7 @@ public abstract class Player extends LivingEntity {
@@ -588,7 +588,7 @@ public abstract class Player extends LivingEntity {
this.playShoulderEntityAmbientSound(this.getShoulderEntityLeft());
this.playShoulderEntityAmbientSound(this.getShoulderEntityRight());
if (!this.level.isClientSide && (this.fallDistance > 0.5F || this.isInWater()) || this.abilities.flying || this.isSleeping() || this.isInPowderSnow) {

Datei anzeigen

@ -112,10 +112,10 @@ index 0000000000000000000000000000000000000000..685deaa0e5d1ddc13e3a7c0471b1cfcf
+
+}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index ff7cc68eeb1aa61c06d50ed47211009d51b2b234..a4d14a12a5ede30f1e124bfaa5552e70f590dd09 100644
index 41928abfffbf6102e92cb45532e691b35a603a31..68072a78d241bcfb54a206e7b85f038d51e26e58 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -157,7 +157,7 @@ import org.slf4j.Logger;
@@ -156,7 +156,7 @@ import org.slf4j.Logger;
import com.mojang.serialization.DynamicOps;
import com.mojang.serialization.Lifecycle;
import java.util.Random;
@ -124,7 +124,7 @@ index ff7cc68eeb1aa61c06d50ed47211009d51b2b234..a4d14a12a5ede30f1e124bfaa5552e70
import joptsimple.OptionSet;
import net.minecraft.server.bossevents.CustomBossEvents;
import net.minecraft.server.dedicated.DedicatedServer;
@@ -269,7 +269,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -271,7 +271,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public OptionSet options;
public org.bukkit.command.ConsoleCommandSender console;
public org.bukkit.command.RemoteConsoleCommandSender remoteConsole;
@ -133,7 +133,7 @@ index ff7cc68eeb1aa61c06d50ed47211009d51b2b234..a4d14a12a5ede30f1e124bfaa5552e70
public static int currentTick = 0; // Paper - Further improve tick loop
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
public int autosavePeriod;
@@ -353,7 +353,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -355,7 +355,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.datapackconfiguration = datapackconfiguration;
this.registryreadops = registryreadops;
this.vanillaCommandDispatcher = worldstem.dataPackResources().commands; // CraftBukkit
@ -143,7 +143,7 @@ index ff7cc68eeb1aa61c06d50ed47211009d51b2b234..a4d14a12a5ede30f1e124bfaa5552e70
if (System.console() == null && System.getProperty("jline.terminal") == null) {
System.setProperty("jline.terminal", "jline.UnsupportedTerminal");
Main.useJline = false;
@@ -374,6 +376,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -376,6 +378,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
MinecraftServer.LOGGER.warn((String) null, ex);
}
}
@ -171,7 +171,7 @@ index ff7cc68eeb1aa61c06d50ed47211009d51b2b234..a4d14a12a5ede30f1e124bfaa5552e70
public KeyPair getKeyPair() {
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index ee509d7b06a9785a39b59329a19531047953831b..b248c0f481436b1b101dc1f75eaaf8023f4ba0ea 100644
index 5b2980866ae3cd78f1852b0ad396ff1967ddfc16..9411e5664c0067f976018fe19b1e74032f24bd5f 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -103,6 +103,9 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@ -222,10 +222,10 @@ index ee509d7b06a9785a39b59329a19531047953831b..b248c0f481436b1b101dc1f75eaaf802
System.setOut(IoBuilder.forLogger(logger).setLevel(Level.INFO).buildPrintStream());
System.setErr(IoBuilder.forLogger(logger).setLevel(Level.WARN).buildPrintStream());
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index b28bb51e5476b250d9de91f2e380dd8ed2aa7041..9cb9e0a4d1467cb5c23dfd38e83d495a3907d984 100644
index 4d029c6beb0637f87d1d0a265e00b2d5be677b6c..2e583b600e7a7ef94639a27ce719effcf0b9e141 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -159,8 +159,7 @@ public abstract class PlayerList {
@@ -160,8 +160,7 @@ public abstract class PlayerList {
public PlayerList(MinecraftServer server, RegistryAccess.Frozen registryManager, PlayerDataStorage saveHandler, int maxPlayers) {
this.cserver = server.server = new CraftServer((DedicatedServer) server, this);

Datei anzeigen

@ -21,7 +21,7 @@ index c09f1ac470c4055897f8d6c6201bd8dc421cdbfe..049a9c4547428d7306d82ed35bcd470a
}
}
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 5a3b0ceb77d6a4c7d8da5ab93ddb1b3b4452027f..ab34a42c33a828d610a5732381487a6a1a64f801 100644
index a938d75e229ce77973182c9dd25c995a16ef17f6..581725ab12f6bea1216dbf62d5cf3923d4340844 100644
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
@@ -52,6 +52,7 @@ public class ItemEntity extends Entity {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] PlayerPickupItemEvent#setFlyAtPlayer
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 ab34a42c33a828d610a5732381487a6a1a64f801..c9aa79cd6846ea8b04ad0c77fbf5aff3ce216505 100644
index 581725ab12f6bea1216dbf62d5cf3923d4340844..bd78031511b8c7facc3f61f3a23cbf4264fa2d0c 100644
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
@@ -390,6 +390,7 @@ public class ItemEntity extends Entity {
@@ -388,6 +388,7 @@ public class ItemEntity extends Entity {
// CraftBukkit start - fire PlayerPickupItemEvent
int canHold = player.getInventory().canHold(itemstack);
int remaining = i - canHold;
@ -16,7 +16,7 @@ index ab34a42c33a828d610a5732381487a6a1a64f801..c9aa79cd6846ea8b04ad0c77fbf5aff3
if (this.pickupDelay <= 0 && canHold > 0) {
itemstack.setCount(canHold);
@@ -397,8 +398,14 @@ public class ItemEntity extends Entity {
@@ -395,8 +396,14 @@ public class ItemEntity extends Entity {
PlayerPickupItemEvent playerEvent = new PlayerPickupItemEvent((org.bukkit.entity.Player) player.getBukkitEntity(), (org.bukkit.entity.Item) this.getBukkitEntity(), remaining);
playerEvent.setCancelled(!playerEvent.getPlayer().getCanPickupItems());
this.level.getCraftServer().getPluginManager().callEvent(playerEvent);
@ -31,7 +31,7 @@ index ab34a42c33a828d610a5732381487a6a1a64f801..c9aa79cd6846ea8b04ad0c77fbf5aff3
return;
}
@@ -428,7 +435,11 @@ public class ItemEntity extends Entity {
@@ -426,7 +433,11 @@ public class ItemEntity extends Entity {
// CraftBukkit end
if (this.pickupDelay == 0 && (this.owner == null || this.owner.equals(player.getUUID())) && player.getInventory().add(itemstack)) {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] PlayerAttemptPickupItemEvent
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 c9aa79cd6846ea8b04ad0c77fbf5aff3ce216505..a0b27bdeabcabd0bd07b1b495105f9b6af998092 100644
index bd78031511b8c7facc3f61f3a23cbf4264fa2d0c..6ecab1dd5932c4c346cde987cb9463b00a32d385 100644
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
@@ -36,6 +36,7 @@ import net.minecraft.util.Mth;
@ -16,7 +16,7 @@ index c9aa79cd6846ea8b04ad0c77fbf5aff3ce216505..a0b27bdeabcabd0bd07b1b495105f9b6
public class ItemEntity extends Entity {
@@ -392,6 +393,22 @@ public class ItemEntity extends Entity {
@@ -390,6 +391,22 @@ public class ItemEntity extends Entity {
int remaining = i - canHold;
boolean flyAtPlayer = false; // Paper

Datei anzeigen

@ -10,10 +10,10 @@ out due to a sync load, as the worldgen threads will be
stalling on profile lookups.
diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java
index d7e22ddf89619b58516ccef1d75a4c33df61b73c..33ec7786cdf8c32e905d192fc8364418e47404d5 100644
index 168ab805ecc48dd55db90eb7fe1c56fda3f2776c..336a26733b5bf73455f8ec10347c1e08b8e866f7 100644
--- a/src/main/java/net/minecraft/Util.java
+++ b/src/main/java/net/minecraft/Util.java
@@ -80,6 +80,22 @@ public class Util {
@@ -81,6 +81,22 @@ public class Util {
private static final AtomicInteger WORKER_COUNT = new AtomicInteger(1);
private static final ExecutorService BOOTSTRAP_EXECUTOR = makeExecutor("Bootstrap");
private static final ExecutorService BACKGROUND_EXECUTOR = makeExecutor("Main");
@ -34,10 +34,10 @@ index d7e22ddf89619b58516ccef1d75a4c33df61b73c..33ec7786cdf8c32e905d192fc8364418
+ });
+ // Paper end - don't submit BLOCKING PROFILE LOOKUPS to the world gen thread
private static final ExecutorService IO_POOL = makeIoExecutor();
public static LongSupplier timeSource = System::nanoTime;
public static final Ticker TICKER = new Ticker() {
private static final DateTimeFormatter FILENAME_DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd_HH.mm.ss", Locale.ROOT);
public static TimeSource.NanoTimeSource timeSource = System::nanoTime;
diff --git a/src/main/java/net/minecraft/server/players/GameProfileCache.java b/src/main/java/net/minecraft/server/players/GameProfileCache.java
index c7edbd12361cfd3dcf1359917d579fae4c3cc8a7..6c8a1d9c7696fa55dae6ba5e4ea50a0ffc7ea543 100644
index 376845f5a25a348e76193fac5c047b0ba2fb080f..2a0cf0a8a79c09566c598197fc6f8c447d4bbd72 100644
--- a/src/main/java/net/minecraft/server/players/GameProfileCache.java
+++ b/src/main/java/net/minecraft/server/players/GameProfileCache.java
@@ -181,7 +181,7 @@ public class GameProfileCache {

Datei anzeigen

@ -599,7 +599,7 @@ index a48a12a31a3d09a9373b688dcc093035f8f8a300..97b29bcb20e199c2d02457f8025e67e2
String s = (String) Optional.ofNullable((String) optionset.valueOf("world")).orElse(dedicatedserversettings.getProperties().levelName);
LevelStorageSource convertable = LevelStorageSource.createDefault(file.toPath());
diff --git a/src/main/java/net/minecraft/server/players/GameProfileCache.java b/src/main/java/net/minecraft/server/players/GameProfileCache.java
index 6c8a1d9c7696fa55dae6ba5e4ea50a0ffc7ea543..2347c7b44793aabe431b57bb1b44935fefbda6fe 100644
index 2a0cf0a8a79c09566c598197fc6f8c447d4bbd72..5e3bc0590e59770490b1c6c818d99be054214a8a 100644
--- a/src/main/java/net/minecraft/server/players/GameProfileCache.java
+++ b/src/main/java/net/minecraft/server/players/GameProfileCache.java
@@ -136,6 +136,17 @@ public class GameProfileCache {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Shoulder Entities Release API
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
index 9aa134e56d661d033bb7229e6ab662534bf9cba9..794081610e52b7b8e04403510d1ad05f4f11d320 100644
index 07a8abb714a9dfd470ab0486c336e3b58ea927a1..d4e3649f4d66545842a7f8cd3dabad39d185046e 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -2026,20 +2026,44 @@ public abstract class Player extends LivingEntity {
@@ -2036,20 +2036,44 @@ public abstract class Player extends LivingEntity {
}

Datei anzeigen

@ -5,12 +5,12 @@ Subject: [PATCH] Block player logins during server shutdown
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
index 13f8f3a2a6382ef51567cc6f46b573d971f700f6..dc932515bada7f84a386827f3b7e1e8f69bd7159 100644
index 72bc5648706380639440456fc938d9350e12f1cc..fcdd6c954552cf0b7eb914d34b94de248010765b 100644
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
@@ -79,6 +79,12 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
}
@@ -81,6 +81,12 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se
@Override
public void tick() {
+ // Paper start - Do not allow logins while the server is shutting down
+ if (!MinecraftServer.getServer().isRunning()) {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Entity#fromMobSpawner()
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 1daffb325617f8e9f3218aa879eb7d8467d69447..e233f1bd8047c06d69aed0e22c220658b9868729 100644
index 778549f30d941352014983adb0e7a4457e6eb11b..2e7b3de046bace7c4c275654a0f1e9066790db0c 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -380,6 +380,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@ -16,7 +16,7 @@ index 1daffb325617f8e9f3218aa879eb7d8467d69447..e233f1bd8047c06d69aed0e22c220658
@javax.annotation.Nullable
private org.bukkit.util.Vector origin;
@javax.annotation.Nullable
@@ -1959,6 +1960,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -1954,6 +1955,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
nbt.put("Paper.Origin", this.newDoubleList(origin.getX(), origin.getY(), origin.getZ()));
}
@ -27,7 +27,7 @@ index 1daffb325617f8e9f3218aa879eb7d8467d69447..e233f1bd8047c06d69aed0e22c220658
// Paper end
return nbt;
} catch (Throwable throwable) {
@@ -2096,6 +2101,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -2093,6 +2098,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
this.originWorld = originWorld;
origin = new org.bukkit.util.Vector(originTag.getDouble(0), originTag.getDouble(1), originTag.getDouble(2));
}

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] ProfileWhitelistVerifyEvent
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 9cb9e0a4d1467cb5c23dfd38e83d495a3907d984..4a94be565a3a7f7b8b330a35d97a14ef52ac4e50 100644
index 2e583b600e7a7ef94639a27ce719effcf0b9e141..2b633053c56098c4046abe17c23ee2cb76e84887 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -619,9 +619,9 @@ public abstract class PlayerList {
@@ -623,9 +623,9 @@ public abstract class PlayerList {
// return chatmessage;
event.disallow(PlayerLoginEvent.Result.KICK_BANNED, PaperAdventure.asAdventure(ichatmutablecomponent)); // Paper - Adventure
@ -21,7 +21,7 @@ index 9cb9e0a4d1467cb5c23dfd38e83d495a3907d984..4a94be565a3a7f7b8b330a35d97a14ef
} else if (this.getIpBans().isBanned(socketaddress) && !this.getIpBans().get(socketaddress).hasExpired()) {
IpBanListEntry ipbanentry = this.ipBans.get(socketaddress);
@@ -1003,7 +1003,23 @@ public abstract class PlayerList {
@@ -1007,7 +1007,23 @@ public abstract class PlayerList {
}
public boolean isWhiteListed(GameProfile profile) {

Datei anzeigen

@ -6,11 +6,11 @@ Subject: [PATCH] Allow specifying a custom "authentication servers down" kick
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
index dc932515bada7f84a386827f3b7e1e8f69bd7159..d2f0450c6bae722bfa9162b027e723eb10b22c78 100644
index fcdd6c954552cf0b7eb914d34b94de248010765b..6a0cd6763202a0a0e301a3a64f09f8cc60aa6b1d 100644
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
@@ -358,7 +358,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
ServerLoginPacketListenerImpl.this.gameProfile = ServerLoginPacketListenerImpl.this.createFakeProfile(gameprofile);
@@ -360,7 +360,7 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se
ServerLoginPacketListenerImpl.this.gameProfile = gameprofile;
ServerLoginPacketListenerImpl.this.state = ServerLoginPacketListenerImpl.State.READY_TO_ACCEPT;
} else {
- ServerLoginPacketListenerImpl.this.disconnect(Component.translatable("multiplayer.disconnect.authservers_down"));

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerJumpEvent
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 61752ae5602e901ed03037cb2dee29f461b68cac..751086ab2f87269ecd43306b794d8b1c3dcd143f 100644
index bdef09be892bf2675f713e1f8babada7019c0781..60dfaa3d1f873cb6c01fd736e78dde6a9b5c148e 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1217,7 +1217,34 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
@@ -1283,7 +1283,34 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
boolean flag = d8 > 0.0D;
if (this.player.isOnGround() && !packet.isOnGround() && flag) {

Datei anzeigen

@ -15,10 +15,10 @@ also adding some additional logging in order to help work out what is causing
random disconnections for clients.
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 751086ab2f87269ecd43306b794d8b1c3dcd143f..1669732069b255df1b53e3d82e310deab93dd296 100644
index 60dfaa3d1f873cb6c01fd736e78dde6a9b5c148e..1be835e21c1400bbd4f6b793061c3d9f9c0625cd 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2996,14 +2996,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
@@ -3212,14 +3212,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@Override
public void handleKeepAlive(ServerboundKeepAlivePacket packet) {

Datei anzeigen

@ -60,10 +60,10 @@ index 0000000000000000000000000000000000000000..a5a7624f1f372a26b982836cd31cff15
+
+}
diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java
index 0badcf02feafafc9932420ffee5062f7b99a9eb9..0e338ebdea3a02d56e9149a6904bfdc8889167f1 100644
index c06f1e1f08c3a854031b48ecc49e35aeb0d9b628..b132a5ca649833043b81578a2439901eaf4c4ab5 100644
--- a/src/main/java/net/minecraft/network/Connection.java
+++ b/src/main/java/net/minecraft/network/Connection.java
@@ -93,6 +93,10 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
@@ -89,6 +89,10 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
private float averageSentPackets;
private int tickCount;
private boolean handlingFault;
@ -90,7 +90,7 @@ index 9016aced079108aeae09f030a672467a953ef93f..4170bda451df3db43e7d57d87d1abb81
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 7f4ed398c48534eec4303a394f360f476b7757ad..89f722ba437a5c2563af652431432cbc2a607fdd 100644
index 198d679a0f46324b2ec483d474cff0829bbd6844..1c620dc2e798c9d4f0816753362cab8564037ca0 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -218,6 +218,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

Datei anzeigen

@ -17,10 +17,10 @@ from networking or during connections flood of chunk packets on slower clients,
at the cost of dead connections being kept open for longer.
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 1669732069b255df1b53e3d82e310deab93dd296..b3d75627ecf672c048e9129e3e64a1994f683204 100644
index 1be835e21c1400bbd4f6b793061c3d9f9c0625cd..0a2a55979ee58458928f78f1383a653717d0a18a 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -240,7 +240,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
@@ -253,7 +253,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
public ServerPlayer player;
private int tickCount;
private int ackBlockChangesUpTo = -1;
@ -29,29 +29,28 @@ index 1669732069b255df1b53e3d82e310deab93dd296..b3d75627ecf672c048e9129e3e64a199
private boolean keepAlivePending;
private long keepAliveChallenge;
// CraftBukkit start - multithreaded fields
@@ -273,6 +273,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
private int knownMovePacketCount;
private final ChatPreviewThrottler chatPreviewThrottler = new ChatPreviewThrottler();
private final AtomicReference<Instant> lastChatTimeStamp;
@@ -290,6 +290,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
private final SignedMessageChain.Decoder signedMessageDecoder;
private final LastSeenMessagesValidator lastSeenMessagesValidator;
private final FutureChain chatMessageChain;
+ private static final long KEEPALIVE_LIMIT = Long.getLong("paper.playerconnection.keepalive", 30) * 1000; // Paper - provide property to set keepalive limit
public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player) {
this.lastChatTimeStamp = new AtomicReference(Instant.EPOCH);
@@ -360,18 +361,25 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
@@ -388,18 +389,25 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
this.server.getProfiler().push("keepAlive");
- long i = Util.getMillis();
-
- if (i - this.keepAliveTime >= 25000L) { // CraftBukkit
- if (this.keepAlivePending) {
- this.disconnect(Component.translatable("disconnect.timeout"));
- } else {
+ // Paper Start - give clients a longer time to respond to pings as per pre 1.12.2 timings
+ // This should effectively place the keepalive handling back to "as it was" before 1.12.2
+ long currentTime = Util.getMillis();
+ long elapsedTime = currentTime - this.keepAliveTime;
+
- if (i - this.keepAliveTime >= 25000L) { // CraftBukkit
- if (this.keepAlivePending) {
- this.disconnect(Component.translatable("disconnect.timeout"));
- } else {
+ if (this.keepAlivePending) {
+ if (!this.processedDisconnect && elapsedTime >= KEEPALIVE_LIMIT) { // check keepalive limit, don't fire if already disconnected
+ ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked due to keepalive timeout!", this.player.getScoreboardName()); // more info

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Send attack SoundEffects only to players who can see the
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
index 794081610e52b7b8e04403510d1ad05f4f11d320..98d776dc6970c5412cfe54538228c6fda2b0d02e 100644
index d4e3649f4d66545842a7f8cd3dabad39d185046e..b07b9949b144981a8c461fc68bf3c296fd278572 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -1245,7 +1245,7 @@ public abstract class Player extends LivingEntity {
@@ -1246,7 +1246,7 @@ public abstract class Player extends LivingEntity {
int i = b0 + EnchantmentHelper.getKnockbackBonus(this);
if (this.isSprinting() && flag) {
@ -18,7 +18,7 @@ index 794081610e52b7b8e04403510d1ad05f4f11d320..98d776dc6970c5412cfe54538228c6fd
++i;
flag1 = true;
}
@@ -1320,7 +1320,7 @@ public abstract class Player extends LivingEntity {
@@ -1321,7 +1321,7 @@ public abstract class Player extends LivingEntity {
}
}
@ -27,7 +27,7 @@ index 794081610e52b7b8e04403510d1ad05f4f11d320..98d776dc6970c5412cfe54538228c6fd
this.sweepAttack();
}
@@ -1348,15 +1348,15 @@ public abstract class Player extends LivingEntity {
@@ -1349,15 +1349,15 @@ public abstract class Player extends LivingEntity {
}
if (flag2) {
@ -46,7 +46,7 @@ index 794081610e52b7b8e04403510d1ad05f4f11d320..98d776dc6970c5412cfe54538228c6fd
}
}
@@ -1408,7 +1408,7 @@ public abstract class Player extends LivingEntity {
@@ -1409,7 +1409,7 @@ public abstract class Player extends LivingEntity {
this.causeFoodExhaustion(level.spigotConfig.combatExhaustion, EntityExhaustionEvent.ExhaustionReason.ATTACK); // CraftBukkit - EntityExhaustionEvent // Spigot - Change to use configurable value
} else {
@ -55,7 +55,7 @@ index 794081610e52b7b8e04403510d1ad05f4f11d320..98d776dc6970c5412cfe54538228c6fd
if (flag4) {
target.clearFire();
}
@@ -1861,6 +1861,14 @@ public abstract class Player extends LivingEntity {
@@ -1871,6 +1871,14 @@ public abstract class Player extends LivingEntity {
public int getXpNeededForNextLevel() {
return this.experienceLevel >= 30 ? 112 + (this.experienceLevel - 30) * 9 : (this.experienceLevel >= 15 ? 37 + (this.experienceLevel - 15) * 5 : 7 + this.experienceLevel * 2);
}

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerArmorChangeEvent
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 20bc6684b0394fe08aa35c371bf668d8ebcf98b1..39635eae8b2f92ffb171c5cbb37bed5bd610266b 100644
index 841149ffcdb2228fac3ac2bdc56c02ed26f219f6..18d29125c19db2ffc3550a843ee9c3974b619f89 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -1,5 +1,6 @@
@ -15,7 +15,7 @@ index 20bc6684b0394fe08aa35c371bf668d8ebcf98b1..39635eae8b2f92ffb171c5cbb37bed5b
import com.google.common.base.Objects;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
@@ -2974,6 +2975,13 @@ public abstract class LivingEntity extends Entity {
@@ -2977,6 +2978,13 @@ public abstract class LivingEntity extends Entity {
ItemStack itemstack1 = this.getItemBySlot(enumitemslot);
if (!ItemStack.matches(itemstack1, itemstack)) {

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen