Archiviert
13
0

more more more more work

Dieser Commit ist enthalten in:
Noah van der Aa 2023-09-21 22:35:39 +02:00
Ursprung 91671751e7
Commit 7ebfdd5e6d
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 547D90BC6FF753CF
58 geänderte Dateien mit 244 neuen und 241 gelöschten Zeilen

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add server-name parameter
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index e45fabbf0a7fe125c1b4f82894a177d061950833..6f2135690892f23e80648d4f9237cea34ec19740 100644
index c4a7da71046a4669eb98d7260d3e00b4f5411a7a..e9dbf4504232ba667ee8f6de18ab5356acd19da6 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -166,6 +166,14 @@ public class Main {

Datei anzeigen

@ -7,10 +7,10 @@ Co-authored-by: Evan McCarthy <evanmccarthy@outlook.com>
Co-authored-by: lexikiq <noellekiq@gmail.com>
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
index 29798faa9cc9aead40e3329307dc63cb7bf838b6..27f99f9ce39aac0bae5e9a7b34fd63833aa4ad26 100644
index 3bf174b1e259aebef9007c66cf2ee8b87eae7681..1a787bd4bdbbf7c78f4bf6bd7e2f36540fec7d50 100644
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
@@ -689,7 +689,7 @@ public class EnderDragon extends Mob implements Enemy {
@@ -680,7 +680,7 @@ public class EnderDragon extends Mob implements Enemy {
// CraftBukkit start - Use relative location for far away sounds
// this.level().globalLevelEvent(1028, this.blockPosition(), 0);
int viewDistance = ((ServerLevel) this.level()).getCraftServer().getViewDistance() * 16;

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 6c4e41d1d9e16492b1e47b5047810b8ffca992e5..776528e50a5abc0e02d9de99231fb47352aa4f43 100644
index dbbca784fe45b7099f683745b36f5c195ca4c2af..d870fbec236a3660f12e0f45cf9431067b18468b 100644
--- a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
+++ b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
@@ -60,6 +60,15 @@ public class ServerConnectionListener {
@@ -61,6 +61,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,17 +25,17 @@ index 6c4e41d1d9e16492b1e47b5047810b8ffca992e5..776528e50a5abc0e02d9de99231fb473
public ServerConnectionListener(MinecraftServer server) {
this.server = server;
@@ -97,7 +106,8 @@ public class ServerConnectionListener {
@@ -100,7 +109,8 @@ public class ServerConnectionListener {
int j = ServerConnectionListener.this.server.getRateLimitPacketsPerSecond();
Connection object = j > 0 ? new RateKickingConnection(j) : new Connection(PacketFlow.SERVERBOUND); // CraftBukkit - decompile error
- ServerConnectionListener.this.connections.add(object);
+ //ServerConnectionListener.this.connections.add(object);
+ //ServerConnectionListener.this.connections.add(object); // Paper
+ pending.add(object); // Paper
channelpipeline.addLast("packet_handler", (ChannelHandler) object);
((Connection) object).setListener(new ServerHandshakePacketListenerImpl(ServerConnectionListener.this.server, (Connection) object));
((Connection) object).configurePacketHandler(channelpipeline);
((Connection) object).setListenerForServerboundHandshake(new ServerHandshakePacketListenerImpl(ServerConnectionListener.this.server, (Connection) object));
}
@@ -158,6 +168,7 @@ public class ServerConnectionListener {
@@ -163,6 +173,7 @@ public class ServerConnectionListener {
synchronized (this.connections) {
// Spigot Start

Datei anzeigen

@ -5,14 +5,14 @@ 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 225e15d686675e21969c4210fa38fef58d920355..5288aec173549a982e42aeeccf7f5f394080955d 100644
index 322e07adc556ee8131d40d89856574b185ee4c94..7056a0309c76fe8980d60afb4e6059deceb210d9 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 {
@@ -86,6 +86,7 @@ public class GameProfileCache {
}
};
+ if (!org.apache.commons.lang3.StringUtils.isBlank(name)) // Paper - Don't lookup a profile with a blank name)
repository.findProfilesByNames(new String[]{name}, Agent.MINECRAFT, profilelookupcallback);
repository.findProfilesByNames(new String[]{name}, profilelookupcallback);
GameProfile gameprofile = (GameProfile) atomicreference.get();

Datei anzeigen

@ -6,20 +6,20 @@ 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 5288aec173549a982e42aeeccf7f5f394080955d..58e923f4ef1980bc7fff1e3b3fcdaad8c4eded53 100644
index 7056a0309c76fe8980d60afb4e6059deceb210d9..82f6404e5c4c5b2c9aea1b1c27ebee1d3c7ee9dc 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 {
@@ -86,7 +86,8 @@ public class GameProfileCache {
}
};
- if (!org.apache.commons.lang3.StringUtils.isBlank(name)) // Paper - Don't lookup a profile with a blank name)
+ if (!org.apache.commons.lang3.StringUtils.isBlank(name) // Paper - Don't lookup a profile with a blank name
+ && io.papermc.paper.configuration.GlobalConfiguration.get().proxies.isProxyOnlineMode()) // Paper - only run in online mode - 100 COL
repository.findProfilesByNames(new String[]{name}, Agent.MINECRAFT, profilelookupcallback);
repository.findProfilesByNames(new String[]{name}, profilelookupcallback);
GameProfile gameprofile = (GameProfile) atomicreference.get();
@@ -116,7 +117,7 @@ public class GameProfileCache {
@@ -104,7 +105,7 @@ public class GameProfileCache {
}
private static boolean usesAuthentication() {
@ -29,24 +29,24 @@ index 5288aec173549a982e42aeeccf7f5f394080955d..58e923f4ef1980bc7fff1e3b3fcdaad8
public void add(GameProfile profile) {
diff --git a/src/main/java/net/minecraft/server/players/OldUsersConverter.java b/src/main/java/net/minecraft/server/players/OldUsersConverter.java
index da98f074ccd5a40c635824112c97fd174c393cb1..6599f874d9f97e9ef4862039ecad7277bbc5fd91 100644
index 0214830d9bc98b8d435ff11f40df65596980cf77..5db27d7bcaaa2eeaeeb08401513d8d23f6cb63c7 100644
--- a/src/main/java/net/minecraft/server/players/OldUsersConverter.java
+++ b/src/main/java/net/minecraft/server/players/OldUsersConverter.java
@@ -66,7 +66,8 @@ public class OldUsersConverter {
@@ -65,7 +65,8 @@ public class OldUsersConverter {
return new String[i];
});
- if (server.usesAuthentication() || org.spigotmc.SpigotConfig.bungee) { // Spigot: bungee = online mode, for now.
+ if (server.usesAuthentication()
+ || (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.isProxyOnlineMode())) { // Spigot: bungee = online mode, for now. // Paper - Handle via setting
server.getProfileRepository().findProfilesByNames(astring, Agent.MINECRAFT, callback);
+ if (server.usesAuthentication() ||
+ (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.isProxyOnlineMode())) { // Spigot: bungee = online mode, for now. // Paper - Handle via setting
server.getProfileRepository().findProfilesByNames(astring, callback);
} else {
String[] astring1 = astring;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 1f294e7841de880ebe99e02265ba28ce8c932d07..e5ec086722ea6049186d48926c66701b118332cf 100644
index 6797239634ba90768e55fcfb37cb2c14141b7d28..e9c908750f40429108ce21cd2e01630d1416435b 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1724,7 +1724,7 @@ public final class CraftServer implements Server {
@@ -1727,7 +1727,7 @@ public final class CraftServer implements Server {
// Spigot Start
GameProfile profile = null;
// Only fetch an online UUID in online mode

Datei anzeigen

@ -9,7 +9,7 @@ object identity checks safely.
Use a simpler optimized hashcode
diff --git a/src/main/java/net/minecraft/world/level/block/state/properties/BooleanProperty.java b/src/main/java/net/minecraft/world/level/block/state/properties/BooleanProperty.java
index 6cdb0716f2a4b29f7a5ecd109bf3c4700ebd22ad..ff1a0d125edd2ea10c870cbb62ae9aa23644b6dc 100644
index 3084343b724098de9791bb74ffb037a499c0c430..bf7ed22094ac92a152e522bafccffb9589f84343 100644
--- a/src/main/java/net/minecraft/world/level/block/state/properties/BooleanProperty.java
+++ b/src/main/java/net/minecraft/world/level/block/state/properties/BooleanProperty.java
@@ -30,8 +30,7 @@ public class BooleanProperty extends Property<Boolean> {
@ -21,9 +21,9 @@ index 6cdb0716f2a4b29f7a5ecd109bf3c4700ebd22ad..ff1a0d125edd2ea10c870cbb62ae9aa2
+ public boolean equals_unused(Object object) { // Paper
if (this == object) {
return true;
} else if (object instanceof BooleanProperty && super.equals(object)) {
} else {
diff --git a/src/main/java/net/minecraft/world/level/block/state/properties/EnumProperty.java b/src/main/java/net/minecraft/world/level/block/state/properties/EnumProperty.java
index 4d6e7b5889ecb81195c7152225ae8e3343d3408c..0bca0f971dac994bd8b6ecd87e8b33e26c0f18f9 100644
index 647e295c7761b95db6da28f6fd043ec963f27872..2d69d1c17f734ee38667d51e6fd0a268211ec595 100644
--- a/src/main/java/net/minecraft/world/level/block/state/properties/EnumProperty.java
+++ b/src/main/java/net/minecraft/world/level/block/state/properties/EnumProperty.java
@@ -45,8 +45,7 @@ public class EnumProperty<T extends Enum<T> & StringRepresentable> extends Prope
@ -35,9 +35,9 @@ index 4d6e7b5889ecb81195c7152225ae8e3343d3408c..0bca0f971dac994bd8b6ecd87e8b33e2
+ public boolean equals_unused(Object object) { // Paper
if (this == object) {
return true;
} else if (object instanceof EnumProperty && super.equals(object)) {
} else {
diff --git a/src/main/java/net/minecraft/world/level/block/state/properties/IntegerProperty.java b/src/main/java/net/minecraft/world/level/block/state/properties/IntegerProperty.java
index 59b5b22a567e4e2be499a2a35aedb10218a7432a..bdbe0362e49e73c05237f9f3143230e0b03e494e 100644
index d6c1b1817ba79a652c4094f003a7d899d4939971..33268d953b30d384564eee6dfab2a37fa722e465 100644
--- a/src/main/java/net/minecraft/world/level/block/state/properties/IntegerProperty.java
+++ b/src/main/java/net/minecraft/world/level/block/state/properties/IntegerProperty.java
@@ -35,8 +35,7 @@ public class IntegerProperty extends Property<Integer> {
@ -49,7 +49,7 @@ index 59b5b22a567e4e2be499a2a35aedb10218a7432a..bdbe0362e49e73c05237f9f3143230e0
+ public boolean equals_unused(Object object) { // Paper
if (this == object) {
return true;
} else if (object instanceof IntegerProperty && super.equals(object)) {
} else {
diff --git a/src/main/java/net/minecraft/world/level/block/state/properties/Property.java b/src/main/java/net/minecraft/world/level/block/state/properties/Property.java
index d1f2e29623b15fdb99ba082fd757a54fd4713761..66b8e23d799adaf872233ea44c54330d75135544 100644
--- a/src/main/java/net/minecraft/world/level/block/state/properties/Property.java

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 6b87ed8b453b149bdd74eb3b164aa3bbcc8c2b13..518bf023127f40190aa29e9a132f19e98051e381 100644
index e58a87d933b916dd246f392577432d8022f117f7..0ce757dd60d167886d56eb651140cec93b1af41e 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1600,13 +1600,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -1498,13 +1498,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
// 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 518bf023127f40190aa29e9a132f19e98051e381..54433d42a13b8967e38eeeb3052b8ff94c62c730 100644
index 0ce757dd60d167886d56eb651140cec93b1af41e..4c9454589b5fe98d8b6be84fe07970efa5f07732 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -357,7 +357,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -336,7 +336,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
if (this.clientIsFloating && !this.player.isSleeping() && !this.player.isPassenger() && !this.player.isDeadOrDying()) {
if (++this.aboveGroundTickCount > 80) {
ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating too long!", this.player.getName().getString());
@ -17,7 +17,7 @@ index 518bf023127f40190aa29e9a132f19e98051e381..54433d42a13b8967e38eeeb3052b8ff9
return;
}
} else {
@@ -376,7 +376,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -355,7 +355,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
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] Add EntityZapEvent
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
index f9704b20e71564ac721a24655b2792c689edf6ba..e04f3f1159c5d5fa2e3956a36e95f8afb5a1d4aa 100644
index 2f97e4f0078cecbcf044d0b27f375638a6ea047b..b70ee1dff0442de32a9e20ad54b246d5eae45e58 100644
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
@@ -850,10 +850,17 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
@@ -851,10 +851,17 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
@Override
public void thunderHit(ServerLevel world, LightningBolt lightning) {
if (world.getDifficulty() != Difficulty.PEACEFUL) {
@ -28,10 +28,10 @@ index f9704b20e71564ac721a24655b2792c689edf6ba..e04f3f1159c5d5fa2e3956a36e95f8af
entitywitch.finalizeSpawn(world, world.getCurrentDifficultyAt(entitywitch.blockPosition()), MobSpawnType.CONVERSION, (SpawnGroupData) null, (CompoundTag) null);
entitywitch.setNoAi(this.isNoAi());
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index db30af9b6b9e737066c8a011e4dfe377f800f523..3849e30f8fad46feefaa901283ad776a93561e23 100644
index 8e1bb9d86ec12240b00ee118a88ebe4dec4e6329..e974520bb5c069229b214962a5e377b92c07e339 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1238,6 +1238,14 @@ public class CraftEventFactory {
@@ -1240,6 +1240,14 @@ public class CraftEventFactory {
return !event.isCancelled();
}

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Filter bad tile entity nbt data from falling blocks
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 93c162fd126824ab0af39568efe0dec21d846810..5b37b5c45bad8d8d262f46a117e3fc858cb40485 100644
index 90f52ed06b4493610f65c8a82d6a3a3b32fef1a7..b8c8b10656e4151c8c19b8cecc3bc7502dd57d3d 100644
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
@@ -334,7 +334,7 @@ public class FallingBlockEntity extends Entity {

Datei anzeigen

@ -5,19 +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 7983033160b77e28eb8135f8709dacd6b806ebe3..9fd44505c33b7ad578d6a471aca8e1c2df5c7dcd 100644
index ef5d73a296982d8b9ac022c5ea755843c2da1c84..490af173c265d03904396e9336c95520fcd16c48 100644
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
@@ -112,6 +112,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
}
+ private static final java.util.concurrent.ExecutorService authenticatorPool = java.util.concurrent.Executors.newCachedThreadPool(new com.google.common.util.concurrent.ThreadFactoryBuilder().setNameFormat("User Authenticator #%d").setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(LOGGER)).build()); // Paper - Cache authenticator threads
+
// Spigot start
public void initUUID()
{
@@ -208,8 +210,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
@@ -139,8 +139,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
this.connection.send(new ClientboundHelloPacket("", this.server.getKeyPair().getPublic().getEncoded(), this.challenge));
} else {
// Spigot start
@ -28,8 +19,8 @@ index 7983033160b77e28eb8135f8709dacd6b806ebe3..9fd44505c33b7ad578d6a471aca8e1c2
@Override
public void run() {
try {
@@ -220,7 +222,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
server.server.getLogger().log(java.util.logging.Level.WARNING, "Exception verifying " + ServerLoginPacketListenerImpl.this.gameProfile.getName(), ex);
@@ -150,7 +150,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
server.server.getLogger().log(java.util.logging.Level.WARNING, "Exception verifying " + ServerLoginPacketListenerImpl.this.requestedUsername, ex);
}
}
- }.start();
@ -38,7 +29,7 @@ index 7983033160b77e28eb8135f8709dacd6b806ebe3..9fd44505c33b7ad578d6a471aca8e1c2
// Spigot end
}
@@ -257,7 +260,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
@@ -223,7 +224,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
throw new IllegalStateException("Protocol error", cryptographyexception);
}
@ -46,9 +37,9 @@ index 7983033160b77e28eb8135f8709dacd6b806ebe3..9fd44505c33b7ad578d6a471aca8e1c2
+ // Paper start - Cache authenticator threads
+ authenticatorPool.execute(new Runnable() {
public void run() {
GameProfile gameprofile = ServerLoginPacketListenerImpl.this.gameProfile;
String s1 = (String) Objects.requireNonNull(ServerLoginPacketListenerImpl.this.requestedUsername, "Player name not initialized");
@@ -302,10 +306,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
@@ -269,10 +271,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
return ServerLoginPacketListenerImpl.this.server.getPreventProxyConnections() && socketaddress instanceof InetSocketAddress ? ((InetSocketAddress) socketaddress).getAddress() : null;
}
@ -61,3 +52,12 @@ index 7983033160b77e28eb8135f8709dacd6b806ebe3..9fd44505c33b7ad578d6a471aca8e1c2
}
// Spigot start
@@ -333,6 +333,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
this.state = ServerLoginPacketListenerImpl.State.ACCEPTED;
}
+ private static final java.util.concurrent.ExecutorService authenticatorPool = java.util.concurrent.Executors.newCachedThreadPool(new com.google.common.util.concurrent.ThreadFactoryBuilder().setNameFormat("User Authenticator #%d").setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(LOGGER)).build()); // Paper - Cache authenticator threads
+
// Spigot start
protected GameProfile createOfflineProfile(String name) {
UUID uuid;

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Command Aliases
Reload the aliases stored in commands.yml
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index e5ec086722ea6049186d48926c66701b118332cf..4fffa7e619e586aa9af77fa99d0e554ffbe5aefb 100644
index e9c908750f40429108ce21cd2e01630d1416435b..c23e5dc08bbcbdc5787c730f0a2857aacff2e69e 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2645,5 +2645,24 @@ public final class CraftServer implements Server {
@@ -2648,5 +2648,24 @@ public final class CraftServer implements Server {
DefaultPermissions.registerCorePermissions();
CraftDefaultPermissions.registerCorePermissions();
}

Datei anzeigen

@ -18,10 +18,10 @@ index 93c83cfedc7d3a169ad0504aa6e63f600873501b..9dffdfe5bbd0517e9a2c6a6770eea07b
--this.count;
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 3849e30f8fad46feefaa901283ad776a93561e23..505f4658dc7b92bf22071e43963ce66f5f2f655b 100644
index e974520bb5c069229b214962a5e377b92c07e339..db681778c2eae84b1e564413ba239b7300ea1789 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1191,6 +1191,17 @@ public class CraftEventFactory {
@@ -1193,6 +1193,17 @@ public class CraftEventFactory {
return event;
}

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Add ProjectileCollideEvent
Deprecated now and replaced with ProjectileHitEvent
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 505f4658dc7b92bf22071e43963ce66f5f2f655b..ceb8d024888425248cb40eb3fbbe39fc4be1207b 100644
index db681778c2eae84b1e564413ba239b7300ea1789..f51a0e99d7e3ad6379057175931cf95e863b45dd 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1335,6 +1335,17 @@ public class CraftEventFactory {
@@ -1337,6 +1337,17 @@ public class CraftEventFactory {
return CraftItemStack.asNMSCopy(bitem);
}
@ -27,7 +27,7 @@ index 505f4658dc7b92bf22071e43963ce66f5f2f655b..ceb8d024888425248cb40eb3fbbe39fc
public static ProjectileLaunchEvent callProjectileLaunchEvent(Entity entity) {
Projectile bukkitEntity = (Projectile) entity.getBukkitEntity();
ProjectileLaunchEvent event = new ProjectileLaunchEvent(bukkitEntity);
@@ -1359,8 +1370,15 @@ public class CraftEventFactory {
@@ -1361,8 +1372,15 @@ public class CraftEventFactory {
if (position.getType() == HitResult.Type.ENTITY) {
hitEntity = ((EntityHitResult) position).getEntity().getBukkitEntity();
}

Datei anzeigen

@ -13,7 +13,7 @@ by adding code to all overrides in:
to return BLOCKED if it is outside the world border.
diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
index 1a69a46340eee4f0273c373cc1a40b4d069a89d4..03cc97b13b1b8eb591b563c1eb52355b00ea3bf1 100644
index d14b329e5bccf13139c32f71da274082efc7199c..68edd488087a6ec1e65797cfbd4118bd0efbab50 100644
--- a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
+++ b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
@@ -158,7 +158,7 @@ public abstract class PathNavigation {

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Optimize World.isLoaded(BlockPosition)Z
Reduce method invocations for World.isLoaded(BlockPosition)Z
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 0c6384c6332babf8e517503c2e9b21a9d6e2ed88..7b681914b7f9e7fb6d2ea607e0d63ca7024a7ec3 100644
index efb2c0f5f7b3acd127f9a570d00c5826c9e9bb6f..936f21b61589a6bcd9bf19c7466b9b1b9a14f280 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -427,6 +427,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable {

Datei anzeigen

@ -34,7 +34,7 @@ index 52325a99ea38530ad69a39ac0215233139f35268..dd74e8a034022fe72a1652f92712182b
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 5f4fa76fe3a1a0a4fc11064fcf57bfab20bd9729..4da303d7e15496f04f0e27bfb613176bc2a72b76 100644
index f739a175e26f250c652c73b8985158fe37c2823a..d70317d0306a7b55ba88b0d2360c9b190454e049 100644
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
@@ -217,6 +217,7 @@ public abstract class ChunkGenerator {

Datei anzeigen

@ -9,10 +9,10 @@ Also allow turning off treasure maps all together as they can eat up Map ID's
which are limited in quantity.
diff --git a/src/main/java/net/minecraft/world/entity/npc/VillagerTrades.java b/src/main/java/net/minecraft/world/entity/npc/VillagerTrades.java
index c29d488d223d817f46bf777656a0c737916c4416..518ef9867421ed9c489fbf5f15e9cbdcaceef6a5 100644
index 43fb44b8cd164b0815335a32f04879b301a54728..8d0ff6e820af9a3f67e25298b34d1539841339d8 100644
--- a/src/main/java/net/minecraft/world/entity/npc/VillagerTrades.java
+++ b/src/main/java/net/minecraft/world/entity/npc/VillagerTrades.java
@@ -386,7 +386,8 @@ public class VillagerTrades {
@@ -451,7 +451,8 @@ public class VillagerTrades {
return null;
} else {
ServerLevel serverLevel = (ServerLevel)entity.level();
@ -23,10 +23,10 @@ index c29d488d223d817f46bf777656a0c737916c4416..518ef9867421ed9c489fbf5f15e9cbdc
ItemStack itemStack = MapItem.create(serverLevel, blockPos.getX(), blockPos.getZ(), (byte)2, true, true);
MapItem.renderBiomePreviewMap(serverLevel, itemStack);
diff --git a/src/main/java/net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java b/src/main/java/net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java
index a8a1e71cfa1cc956d81e5c0d118c57658d272a2d..481456fd69d773e8f3b4eaede3849ce4e599c80f 100644
index a926b07cd3c5d7c6b615302671fedb51eff89faf..7c8267ad6de50daaa3390debf99a354e3e575c87 100644
--- a/src/main/java/net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java
+++ b/src/main/java/net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java
@@ -68,7 +68,16 @@ public class ExplorationMapFunction extends LootItemConditionalFunction {
@@ -75,7 +75,16 @@ public class ExplorationMapFunction extends LootItemConditionalFunction {
Vec3 vec3 = context.getParamOrNull(LootContextParams.ORIGIN);
if (vec3 != null) {
ServerLevel serverLevel = context.getLevel();

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add API methods to control if armour stands can move
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
index af6a2e8c4ce41aaf55b645c37f809c2de7ea780a..be7ed906b4a5a8ffda87ecf66f967061b58f8034 100644
index c0c4bbf25b2da40f53b1cdedb47fdd74b493fba2..d79fbc3e1cab0d4ec38ae25325e55eb23a1b5a19 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
@@ -92,6 +92,7 @@ public class ArmorStand extends LivingEntity {
@ -16,7 +16,7 @@ index af6a2e8c4ce41aaf55b645c37f809c2de7ea780a..be7ed906b4a5a8ffda87ecf66f967061
public ArmorStand(EntityType<? extends ArmorStand> type, Level world) {
super(type, world);
@@ -942,4 +943,13 @@ public class ArmorStand extends LivingEntity {
@@ -950,4 +951,13 @@ public class ArmorStand extends LivingEntity {
public boolean canBeSeenByAnyone() {
return !this.isInvisible() && !this.isMarker();
}

Datei anzeigen

@ -26,10 +26,10 @@ 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 4e85199be8a1a7472d13856a697ec500b9566341..be3c08a3e1fed0588886e11bd0b7fd3e8499c877 100644
index 6deb65557561268ae7126cbb9e177def16d89d97..38c544cdf2230e94850eda4d38afce9df53973a8 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -340,6 +340,29 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -300,6 +300,29 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
// Paper start

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 9e182c4cdf54c9ca7701660df72052d5c8936a55..5c855a15f7847ca37c263755f643eeb1fd79668b 100644
index d90748aab21adf9c7f463e31e7d7eb5f9bc0bbbd..40efa19ffe9275748a62e0546c3fd42bbcb0883d 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -2392,7 +2392,7 @@ public class ServerPlayer extends Player {
@@ -2352,7 +2352,7 @@ public class ServerPlayer extends Player {
@Override
public boolean isImmobile() {
@ -18,11 +18,11 @@ index 9e182c4cdf54c9ca7701660df72052d5c8936a55..5c855a15f7847ca37c263755f643eeb1
}
@Override
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 54433d42a13b8967e38eeeb3052b8ff94c62c730..4233b912d44fb66d2a0502ad66bcf0b29e670f6d 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -3140,7 +3140,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
index e8b12a8ae009023afa2818ecbf398a1440b9926e..6faec2ca225fcebbad65190ab485e2cab77cfd6e 100644
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
@@ -145,7 +145,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
}
public final boolean isDisconnected() {

Datei anzeigen

@ -7,7 +7,7 @@ Provides counts without the ineffeciency of using .getEntities().size()
which creates copy of the collections.
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 7b681914b7f9e7fb6d2ea607e0d63ca7024a7ec3..7cfcbc1e38f5e9145c827dfe26299277a3f14cee 100644
index 936f21b61589a6bcd9bf19c7466b9b1b9a14f280..776a5a9947c56eb63df7ac9797166be456282af1 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -116,7 +116,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@ -20,7 +20,7 @@ index 7b681914b7f9e7fb6d2ea607e0d63ca7024a7ec3..7cfcbc1e38f5e9145c827dfe26299277
private final List<TickingBlockEntity> pendingBlockEntityTickers = Lists.newArrayList();
private boolean tickingBlockEntities;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index b3dfa35bc41191883814c78693a0d958ff3bf19b..d348ca56ae452dc80d5dabe874d9f8d72970fc4d 100644
index d01388bbadf3069357cf52463f4104a1be4d2b56..9d79b31baea99d25218e9d3f27ab895d4f73ef8a 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -154,6 +154,56 @@ public class CraftWorld extends CraftRegionAccessor implements World {

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 7901a8e3659be05d901fd5140e025392ffa0c27c..cf110171ba47051eab94c0195eb155b685a25dca 100644
index 5406ac93eaf9b9f9e810bfbbcf4a35e2f38f680c..a2b4e5fc6b3174705f2232abb2df7bf869dc3926 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -1069,11 +1069,13 @@ public abstract class PlayerList {
@@ -1063,11 +1063,13 @@ public abstract class PlayerList {
}
public void saveAll() {

Datei anzeigen

@ -133,10 +133,10 @@ index 9dffdfe5bbd0517e9a2c6a6770eea07b43ef9b33..6de7fcccb6da757185a38b79b3a22821
@Override
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index d7c437dc575a06e1cdf7b393acaeee6007424687..01b9635e71a55f29e565fc095cc53f102945423d 100644
index c61ddc868fa2eed1dce72ebcf98940756cca401e..45d1b869b0aa2d12000a58c5c3cd1c8232429d36 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -1759,7 +1759,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -1792,7 +1792,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
protected void dropExperience() {
// CraftBukkit start - Update getExpReward() above if the removed if() changes!
if (true && !(this instanceof net.minecraft.world.entity.boss.enderdragon.EnderDragon)) { // CraftBukkit - SPIGOT-2420: Special case ender dragon will drop the xp over time
@ -147,10 +147,10 @@ index d7c437dc575a06e1cdf7b393acaeee6007424687..01b9635e71a55f29e565fc095cc53f10
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/world/entity/animal/Animal.java b/src/main/java/net/minecraft/world/entity/animal/Animal.java
index dfccfde4484d4a495f796caaff31d243ed6cdddc..c2f61ed153260692c96af4f20bc5b7d55cbbc380 100644
index b5b93396166202cbe5a4456794fd394de932262a..be105a4460e9bf2ef4b72a307fa31291c37d5e0e 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Animal.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Animal.java
@@ -261,12 +261,14 @@ public abstract class Animal extends AgeableMob {
@@ -256,12 +256,14 @@ public abstract class Animal extends AgeableMob {
public void finalizeSpawnChildFromBreeding(ServerLevel worldserver, Animal entityanimal, @Nullable AgeableMob entityageable, int experience) {
// CraftBukkit end
@ -169,7 +169,7 @@ index dfccfde4484d4a495f796caaff31d243ed6cdddc..c2f61ed153260692c96af4f20bc5b7d5
this.setAge(6000);
entityanimal.setAge(6000);
this.resetLove();
@@ -275,7 +277,7 @@ public abstract class Animal extends AgeableMob {
@@ -270,7 +272,7 @@ public abstract class Animal extends AgeableMob {
if (worldserver.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
// CraftBukkit start - use event experience
if (experience > 0) {
@ -179,10 +179,10 @@ index dfccfde4484d4a495f796caaff31d243ed6cdddc..c2f61ed153260692c96af4f20bc5b7d5
// CraftBukkit end
}
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 3e14e79847a0992687420ecb3bbeb742ee287714..44b6d232d940d4020fa7664e48a483c20959dde0 100644
index 1bf6126b38dd127bb72b174b049fb3b396db713c..0d4b86411d2d064b04334b508b1cb65695afaebd 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Fox.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java
@@ -898,7 +898,7 @@ public class Fox extends Animal implements VariantHolder<Fox.Type> {
@@ -909,7 +909,7 @@ public class Fox extends Animal implements VariantHolder<Fox.Type> {
if (this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
// CraftBukkit start - use event experience
if (experience > 0) {
@ -192,10 +192,10 @@ index 3e14e79847a0992687420ecb3bbeb742ee287714..44b6d232d940d4020fa7664e48a483c2
// CraftBukkit end
}
diff --git a/src/main/java/net/minecraft/world/entity/animal/Turtle.java b/src/main/java/net/minecraft/world/entity/animal/Turtle.java
index c9c9a7f75ab239829026f419774945341d364e66..3a3f5e567fdefad6887e42c8e9147194ae0c4d89 100644
index 6dba24f47ca76a432a836178af178c2d52631eee..ed1f6e77d5fc9b6f5f52b1a10275783b514c162c 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Turtle.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Turtle.java
@@ -455,7 +455,7 @@ public class Turtle extends Animal {
@@ -464,7 +464,7 @@ public class Turtle extends Animal {
RandomSource randomsource = this.animal.getRandom();
if (this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
@ -205,10 +205,10 @@ index c9c9a7f75ab239829026f419774945341d364e66..3a3f5e567fdefad6887e42c8e9147194
}
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
index 27f99f9ce39aac0bae5e9a7b34fd63833aa4ad26..0f39550f82aa1646dd5e4a887e33c414160ee7d9 100644
index 1a787bd4bdbbf7c78f4bf6bd7e2f36540fec7d50..8bfb2f94226e6b623def141a7af79d0f46d7d445 100644
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
@@ -682,7 +682,7 @@ public class EnderDragon extends Mob implements Enemy {
@@ -673,7 +673,7 @@ public class EnderDragon extends Mob implements Enemy {
if (this.level() instanceof ServerLevel) {
if (this.dragonDeathTime > 150 && this.dragonDeathTime % 5 == 0 && true) { // CraftBukkit - SPIGOT-2420: Already checked for the game rule when calculating the xp
@ -217,7 +217,7 @@ index 27f99f9ce39aac0bae5e9a7b34fd63833aa4ad26..0f39550f82aa1646dd5e4a887e33c414
}
if (this.dragonDeathTime == 1 && !this.isSilent()) {
@@ -710,7 +710,7 @@ public class EnderDragon extends Mob implements Enemy {
@@ -701,7 +701,7 @@ public class EnderDragon extends Mob implements Enemy {
this.move(MoverType.SELF, new Vec3(0.0D, 0.10000000149011612D, 0.0D));
if (this.dragonDeathTime == 200 && this.level() instanceof ServerLevel) {
if (true) { // CraftBukkit - SPIGOT-2420: Already checked for the game rule when calculating the xp
@ -227,10 +227,10 @@ index 27f99f9ce39aac0bae5e9a7b34fd63833aa4ad26..0f39550f82aa1646dd5e4a887e33c414
if (this.dragonFight != null) {
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
index e04f3f1159c5d5fa2e3956a36e95f8afb5a1d4aa..68594d2621267f4b112b4d14d2bec3a0dd6a044a 100644
index b70ee1dff0442de32a9e20ad54b246d5eae45e58..b3127238cea62c47d710abab44f6570103ba9364 100644
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
@@ -637,7 +637,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
@@ -638,7 +638,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
}
if (offer.shouldRewardExp()) {
@ -240,10 +240,10 @@ index e04f3f1159c5d5fa2e3956a36e95f8afb5a1d4aa..68594d2621267f4b112b4d14d2bec3a0
}
diff --git a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
index fb80311e90ec83ca39b213d9348c821c402a1933..65592c41b1519eff77ccd7ddd3c885058f3ed138 100644
index eb15d694ad8c24b659feba53e6992661ba1a9b76..5ea5f424c55f60bf63d3a4d3fe51362939f42f4c 100644
--- a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
+++ b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
@@ -186,7 +186,7 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill
@@ -207,7 +207,7 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill
if (offer.shouldRewardExp()) {
int i = 3 + this.random.nextInt(4);
@ -253,7 +253,7 @@ index fb80311e90ec83ca39b213d9348c821c402a1933..65592c41b1519eff77ccd7ddd3c88505
}
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
index 4377a0f7387a09983a5580d408775f386ea5f487..dbff697927e6a6c745377aafd3b476b58f005882 100644
index af6829c25fcd186adc3575d50cab6d46db9a2fac..5c77992e0c49eb217dd66657b35164225b400518 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
@@ -522,7 +522,7 @@ public class FishingHook extends Projectile {
@ -311,10 +311,10 @@ index 7ed82beb538a25a5246f6288c1dddb4f5f85e997..7646b66bc5ba0288608de0d836c7307e
}
diff --git a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
index 9113fd7070596ecf504837f335022d5eb4ef9a77..d56a64b058d8848e405e33d9884a61ea952a8f71 100644
index e72ed2ed8664cbc408cbe1e38f1f0acacc3841dd..2f628f36c32752d1bac910e180b90639c1ae2c9d 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
@@ -647,7 +647,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
@@ -650,7 +650,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
j = event.getExpToDrop();
// CraftBukkit end

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 069fe5df02806103c9bbef396c2e39ca3be90101..ca46bea3799e1bc962debe742ea75f4d7f4ab771 100644
index 468111bb80e7756371d22eb831596c187538f0c1..b4c91cb985d3772c5b105b8d2267b51d7483e005 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -387,6 +387,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@ -24,19 +24,21 @@ index 069fe5df02806103c9bbef396c2e39ca3be90101..ca46bea3799e1bc962debe742ea75f4d
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 01b9635e71a55f29e565fc095cc53f102945423d..0470329b43afd4e8c5e033666d1c5f8f0a03fe6a 100644
index 45d1b869b0aa2d12000a58c5c3cd1c8232429d36..a8d39b7257332ec8b3b711aab2c4b76a867e73bc 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3317,8 +3317,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
@@ -3349,10 +3349,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
- for (j = 0; j < list.size(); ++j) {
+ this.numCollisions = Math.max(0, this.numCollisions - this.level().paperConfig().collisions.maxEntityCollisions); // Paper
+ for (j = 0; j < list.size() && this.numCollisions < this.level().paperConfig().collisions.maxEntityCollisions; ++j) { // Paper
Entity entity = (Entity) list.get(j);
+ entity.numCollisions++; // Paper
+ this.numCollisions++; // Paper
Iterator iterator1 = list.iterator();
+ this.numCollisions = Math.max(0, this.numCollisions - this.level().paperConfig().collisions.maxEntityCollisions); // Paper
this.doPush(entity);
- while (iterator1.hasNext()) {
+ while (iterator1.hasNext() && this.numCollisions < this.level().paperConfig().collisions.maxEntityCollisions) { // Paper
Entity entity1 = (Entity) iterator1.next();
-
+ entity1.numCollisions++; // Paper
+ this.numCollisions++; // Paper
this.doPush(entity1);
}
}

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Do not let armorstands drown
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
index be7ed906b4a5a8ffda87ecf66f967061b58f8034..68ac3ffae5d800bde3c5b5163a52768a43bb5963 100644
index d79fbc3e1cab0d4ec38ae25325e55eb23a1b5a19..37c19685049ef6b267a74a4323dc4ec33159c3d2 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
@@ -951,5 +951,12 @@ public class ArmorStand extends LivingEntity {
@@ -959,5 +959,12 @@ public class ArmorStand extends LivingEntity {
super.move(type, movement);
}
}

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 b5ededfb23980abca01ef25207cca95ad390a70d..5abde8722e22e074d4ef44956f7bb5344441e174 100644
index 6ab95b11eafe69ed0fd584e87ac0f0bb176ce180..834c60f1e85995c487f59f6504e96385d5d0ff27 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -237,6 +237,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -233,6 +233,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
private Map<ResourceKey<Level>, ServerLevel> levels;
private PlayerList playerList;
private volatile boolean running;
@ -41,7 +41,7 @@ index b5ededfb23980abca01ef25207cca95ad390a70d..5abde8722e22e074d4ef44956f7bb534
private boolean stopped;
private int tickCount;
protected final Proxy proxy;
@@ -900,7 +901,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -872,7 +873,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 b5ededfb23980abca01ef25207cca95ad390a70d..5abde8722e22e074d4ef44956f7bb534
try { Thread.sleep(100); } catch (InterruptedException ex) {} // CraftBukkit - SPIGOT-625 - give server at least a chance to send packets
}
@@ -951,6 +952,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -952,6 +953,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
public void halt(boolean waitForShutdown) {
@ -64,10 +64,10 @@ index b5ededfb23980abca01ef25207cca95ad390a70d..5abde8722e22e074d4ef44956f7bb534
if (waitForShutdown) {
try {
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index cf110171ba47051eab94c0195eb155b685a25dca..bc96f426d488d2a206b763dccdc4034fe24f269d 100644
index a2b4e5fc6b3174705f2232abb2df7bf869dc3926..9d700d27d05c6f276b3ca159735fece0a75ca9b1 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -1181,8 +1181,15 @@ public abstract class PlayerList {
@@ -1175,8 +1175,15 @@ public abstract class PlayerList {
}
public void removeAll() {

Datei anzeigen

@ -14,10 +14,10 @@ To be converted into a Paper-API event at some point in the future?
public net.minecraft.world.entity.player.Player removeEntitiesOnShoulder()V
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 4233b912d44fb66d2a0502ad66bcf0b29e670f6d..0c869475bc81b635e98fa5d396db434ecf2d54e4 100644
index 4c9454589b5fe98d8b6be84fe07970efa5f07732..4ab881766975eb4853094ad0d70e9e0647a0c23e 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2310,6 +2310,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2163,6 +2163,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
switch (packet.getAction()) {
case PRESS_SHIFT_KEY:
this.player.setShiftKeyDown(true);
@ -32,10 +32,10 @@ index 4233b912d44fb66d2a0502ad66bcf0b29e670f6d..0c869475bc81b635e98fa5d396db434e
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 11e7c30e448f192493c65330a65d89ed3e14139f..8ef1798fe9dc42d9f09449ecc7578f4bddff1ed8 100644
index 62a52216e27c0e4847b9c346c35c3d1b7b3b15aa..a2f6e3f381bf251d93a63aff9f9af307350ffc50 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -588,6 +588,7 @@ public abstract class Player extends LivingEntity {
@@ -594,6 +594,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

@ -6,10 +6,10 @@ Subject: [PATCH] Add configuration option to prevent player names from being
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 4fffa7e619e586aa9af77fa99d0e554ffbe5aefb..499bce91cd6818473cddc85a1657ff3b147b3439 100644
index c23e5dc08bbcbdc5787c730f0a2857aacff2e69e..a51ab0eddb94263642b0015967cd2e6987ed2619 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2664,5 +2664,10 @@ public final class CraftServer implements Server {
@@ -2667,5 +2667,10 @@ public final class CraftServer implements Server {
commandMap.registerServerAliases();
return true;
}

Datei anzeigen

@ -25,7 +25,7 @@ Other changes:
Co-Authored-By: Emilia Kond <emilia@rymiel.space>
diff --git a/build.gradle.kts b/build.gradle.kts
index b60a9ab80589eb8a3e9ece76c7eb24cd3d6dbe96..705289d37139e8ec213f972292d4a8efc294f4cf 100644
index ba38153a37e864ab7f02a169da3df8806122aa76..2f562d2fb02d58551338b055a0dd6c05df44e532 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -6,9 +6,30 @@ plugins {
@ -252,10 +252,10 @@ index c3631efda9c7fa531a8a9f18fbee7b5f8655382b..769f6489632302627fa1730cc08e77f5
}
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 5abde8722e22e074d4ef44956f7bb5344441e174..bb1280569181e8e3acb78ef622b4d2f905007222 100644
index 834c60f1e85995c487f59f6504e96385d5d0ff27..440d1db090dfa62843124cec802224553aad51c0 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -165,7 +165,7 @@ import com.mojang.datafixers.util.Pair;
@@ -164,7 +164,7 @@ import com.mojang.datafixers.util.Pair;
import com.mojang.serialization.DynamicOps;
import com.mojang.serialization.Lifecycle;
import java.util.Random;
@ -264,7 +264,7 @@ index 5abde8722e22e074d4ef44956f7bb5344441e174..bb1280569181e8e3acb78ef622b4d2f9
import joptsimple.OptionSet;
import net.minecraft.core.HolderLookup;
import net.minecraft.resources.RegistryOps;
@@ -283,7 +283,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -278,7 +278,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public org.bukkit.craftbukkit.CraftServer server;
public OptionSet options;
public org.bukkit.command.ConsoleCommandSender console;
@ -273,7 +273,7 @@ index 5abde8722e22e074d4ef44956f7bb5344441e174..bb1280569181e8e3acb78ef622b4d2f9
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;
@@ -367,7 +367,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -361,7 +361,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.options = options;
this.worldLoader = worldLoader;
this.vanillaCommandDispatcher = worldstem.dataPackResources().commands; // CraftBukkit
@ -283,16 +283,16 @@ index 5abde8722e22e074d4ef44956f7bb5344441e174..bb1280569181e8e3acb78ef622b4d2f9
if (System.console() == null && System.getProperty("jline.terminal") == null) {
System.setProperty("jline.terminal", "jline.UnsupportedTerminal");
Main.useJline = false;
@@ -388,6 +390,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -382,6 +384,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
MinecraftServer.LOGGER.warn((String) null, ex);
}
}
+ */
+ // Paper end
Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this));
// CraftBukkit end
this.paperConfigurations = services.paperConfigurations(); // Paper
}
@@ -1132,7 +1136,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1125,7 +1129,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
org.spigotmc.WatchdogThread.doStop(); // Spigot
// CraftBukkit start - Restore terminal to original settings
try {
@ -301,7 +301,7 @@ index 5abde8722e22e074d4ef44956f7bb5344441e174..bb1280569181e8e3acb78ef622b4d2f9
} catch (Exception ignored) {
}
// CraftBukkit end
@@ -1586,7 +1590,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1592,7 +1596,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@Override
public void sendSystemMessage(Component message) {
@ -311,7 +311,7 @@ index 5abde8722e22e074d4ef44956f7bb5344441e174..bb1280569181e8e3acb78ef622b4d2f9
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 52c2333afdb3748ffdbcc58ae7629aa2c4b49b74..97df17a1636ac1ba765a8e486cfbb46bfac9ee6c 100644
index 6cc085cf212994cd00dbabd4dd363fc5b3c97281..e11aee38009a6a37dceaf42232e295b71e0b7d40 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -98,6 +98,9 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@ -375,10 +375,10 @@ index 75083eeb9b413e6dd5375007360dce6857a08fff..d292fdb165436f0b9b46b32110f5e09a
if (!SwingUtilities.isEventDispatchThread()) {
SwingUtilities.invokeLater(() -> {
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index bc96f426d488d2a206b763dccdc4034fe24f269d..82db70c548336ada2af556251b8ae8d189417024 100644
index 9d700d27d05c6f276b3ca159735fece0a75ca9b1..0fb1fda1aba730e54d9e922e18de3bd048a78a62 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -169,8 +169,7 @@ public abstract class PlayerList {
@@ -162,8 +162,7 @@ public abstract class PlayerList {
public PlayerList(MinecraftServer server, LayeredRegistryAccess<RegistryLayer> registryManager, PlayerDataStorage saveHandler, int maxPlayers) {
this.cserver = server.server = new CraftServer((DedicatedServer) server, this);
@ -389,7 +389,7 @@ index bc96f426d488d2a206b763dccdc4034fe24f269d..82db70c548336ada2af556251b8ae8d1
this.bans = new UserBanList(PlayerList.USERBANLIST_FILE);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 499bce91cd6818473cddc85a1657ff3b147b3439..bae43a8feeae694658abb864e0aa91ecf0dbe611 100644
index a51ab0eddb94263642b0015967cd2e6987ed2619..15d881193f40dda74996932854283e4551742185 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -44,7 +44,6 @@ import java.util.logging.Level;
@ -398,9 +398,9 @@ index 499bce91cd6818473cddc85a1657ff3b147b3439..bae43a8feeae694658abb864e0aa91ec
import javax.imageio.ImageIO;
-import jline.console.ConsoleReader;
import net.minecraft.advancements.Advancement;
import net.minecraft.advancements.AdvancementHolder;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.commands.Commands;
@@ -1292,9 +1291,13 @@ public final class CraftServer implements Server {
@@ -1295,9 +1294,13 @@ public final class CraftServer implements Server {
return this.logger;
}
@ -415,7 +415,7 @@ index 499bce91cd6818473cddc85a1657ff3b147b3439..bae43a8feeae694658abb864e0aa91ec
@Override
public PluginCommand getPluginCommand(String name) {
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 6f2135690892f23e80648d4f9237cea34ec19740..960885c891c98859e8ef375d0796c8b53fcf562c 100644
index e9dbf4504232ba667ee8f6de18ab5356acd19da6..601288ff52f0f0b0c82a5ff0414b60b8cb6e3a26 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -13,7 +13,6 @@ import java.util.logging.Logger;

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Item#canEntityPickup
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index 1bdfc9c66538d9fd689bdccc1f4bc2dee4b5e7c5..58d6a0bc8e94eaa22dcd5d86522ab378e5b3e7cd 100644
index 873a96693110982600d3e7979489fb00f3cd7941..645ee527b9e7e7edbf3320eae6e441bea84f58f9 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -668,6 +668,11 @@ public abstract class Mob extends LivingEntity implements Targeting {
@@ -669,6 +669,11 @@ public abstract class Mob extends LivingEntity implements Targeting {
ItemEntity entityitem = (ItemEntity) iterator.next();
if (!entityitem.isRemoved() && !entityitem.getItem().isEmpty() && !entityitem.hasPickUpDelay() && this.wantsToPickUp(entityitem.getItem())) {

Datei anzeigen

@ -10,7 +10,7 @@ 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 01eb418bde1dadbbfa30954f81281199b2fec778..0f05d26248d8c999048a88796df227a6a1e3755f 100644
index 9870eccc1dc5c2201f12f8e2affe647f6b0375f8..30237ca94a36197ce21369bdcc7bb1dfafe02680 100644
--- a/src/main/java/net/minecraft/Util.java
+++ b/src/main/java/net/minecraft/Util.java
@@ -82,6 +82,22 @@ public class Util {
@ -35,38 +35,38 @@ index 01eb418bde1dadbbfa30954f81281199b2fec778..0f05d26248d8c999048a88796df227a6
+ // Paper end - don't submit BLOCKING PROFILE LOOKUPS to the world gen thread
private static final ExecutorService IO_POOL = makeIoExecutor();
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;
public static final long NANOS_PER_MILLI = 1000000L;
diff --git a/src/main/java/net/minecraft/server/players/GameProfileCache.java b/src/main/java/net/minecraft/server/players/GameProfileCache.java
index 58e923f4ef1980bc7fff1e3b3fcdaad8c4eded53..4038bb76339d43f18770624bd7fecc79b8d7f2a9 100644
index 82f6404e5c4c5b2c9aea1b1c27ebee1d3c7ee9dc..c70cd016e1978931d115cfca94664897f0158196 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 {
@@ -167,7 +167,7 @@ public class GameProfileCache {
} else {
this.requests.put(username, CompletableFuture.supplyAsync(() -> {
CompletableFuture<Optional<GameProfile>> completablefuture1 = CompletableFuture.supplyAsync(() -> {
return this.get(username);
- }, Util.backgroundExecutor()).whenCompleteAsync((optional, throwable) -> {
+ }, Util.PROFILE_EXECUTOR).whenCompleteAsync((optional, throwable) -> { // Paper - not a good idea to use BLOCKING OPERATIONS on the worldgen executor
this.requests.remove(username);
}, this.executor).whenCompleteAsync((optional, throwable) -> {
consumer.accept(optional);
}, this.executor);
diff --git a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java
index 24ed280a31a10c822cb8b2d2e9bf43ad81d92924..a2fc2c0437999dd09f080eafe8ea466b16cdf57b 100644
index cf7e64eac9e3eb395a0be0a2a4fa0175a731b6e7..f5162f7171c348ff523b18e577246561d79e1c20 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java
@@ -137,7 +137,7 @@ public class SkullBlockEntity extends BlockEntity {
public static void updateGameprofile(@Nullable GameProfile owner, Consumer<GameProfile> callback) {
if (owner != null && !StringUtil.isNullOrEmpty(owner.getName()) && (!owner.isComplete() || !owner.getProperties().containsKey("textures")) && profileCache != null && sessionService != null) {
profileCache.getAsync(owner.getName(), (profile) -> {
- Util.backgroundExecutor().execute(() -> {
+ Util.PROFILE_EXECUTOR.execute(() -> { // Paper - not a good idea to use BLOCKING OPERATIONS on the worldgen executor
Util.ifElse(profile, (profilex) -> {
Property property = Iterables.getFirst(profilex.getProperties().get("textures"), (Property)null);
if (property == null) {
@@ -222,7 +222,7 @@ public class SkullBlockEntity extends BlockEntity {
} else {
return Optional.empty();
}
- }, Util.backgroundExecutor());
+ }, Util.PROFILE_EXECUTOR); // Paper - not a good idea to use BLOCKING OPERATIONS on the worldgen executor
}
private static boolean hasTextures(GameProfile profile) {
diff --git a/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java b/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java
index aa4760ae56d3ba16779d1b04301f0fd75527f9ec..2375b0bac17dd73d6ee12a94b9e4a4143a2e1c65 100644
index 5a21cc441e1c925a7674299073ac374e63b911ec..ac05e268c9f00bca9f8ac19650937eede711810b 100644
--- a/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java
+++ b/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java
@@ -121,7 +121,7 @@ public final class CraftPlayerProfile implements PlayerProfile {
@@ -125,7 +125,7 @@ public final class CraftPlayerProfile implements PlayerProfile {
@Override
public CompletableFuture<PlayerProfile> update() {

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Add UnknownCommandEvent
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
diff --git a/src/main/java/net/minecraft/commands/CommandSourceStack.java b/src/main/java/net/minecraft/commands/CommandSourceStack.java
index fb381a7f3362b5c7848f9c326e9378b76f6fdad9..34fdef41d1eb3fe78bf688d69aae437d89a337bb 100644
index 2ee328f204acf97b23702b4dc3b13b7f33b97a8e..902671a335da23d3945c363afc8abde6f5a1d444 100644
--- a/src/main/java/net/minecraft/commands/CommandSourceStack.java
+++ b/src/main/java/net/minecraft/commands/CommandSourceStack.java
@@ -348,8 +348,13 @@ public class CommandSourceStack implements SharedSuggestionProvider {
@@ -344,8 +344,13 @@ public class CommandSourceStack implements SharedSuggestionProvider {
}
public void sendFailure(Component message) {
@ -25,10 +25,10 @@ index fb381a7f3362b5c7848f9c326e9378b76f6fdad9..34fdef41d1eb3fe78bf688d69aae437d
}
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
index 2fdfc17ef3daf9fb5cc32c807292c71e256d5356..e3394864e29357fec036f9e616472aeab95d035e 100644
index d1ecf61ffecb8669214ad85334374a4569811de8..e63632f09d608371aaeaf09a6dac57c1d8a719d4 100644
--- a/src/main/java/net/minecraft/commands/Commands.java
+++ b/src/main/java/net/minecraft/commands/Commands.java
@@ -137,6 +137,7 @@ public class Commands {
@@ -139,6 +139,7 @@ public class Commands {
public static final int LEVEL_ADMINS = 3;
public static final int LEVEL_OWNERS = 4;
private final com.mojang.brigadier.CommandDispatcher<CommandSourceStack> dispatcher = new com.mojang.brigadier.CommandDispatcher();
@ -36,7 +36,7 @@ index 2fdfc17ef3daf9fb5cc32c807292c71e256d5356..e3394864e29357fec036f9e616472aea
public Commands(Commands.CommandSelection environment, CommandBuildContext commandRegistryAccess) {
this(); // CraftBukkit
@@ -228,6 +229,7 @@ public class Commands {
@@ -234,6 +235,7 @@ public class Commands {
if (environment.includeIntegrated) {
PublishCommand.register(this.dispatcher);
}
@ -44,7 +44,7 @@ index 2fdfc17ef3daf9fb5cc32c807292c71e256d5356..e3394864e29357fec036f9e616472aea
// CraftBukkit start
}
@@ -319,7 +321,16 @@ public class Commands {
@@ -325,7 +327,16 @@ public class Commands {
b1 = 0;
return b1;
} catch (CommandSyntaxException commandsyntaxexception) {
@ -62,7 +62,7 @@ index 2fdfc17ef3daf9fb5cc32c807292c71e256d5356..e3394864e29357fec036f9e616472aea
if (commandsyntaxexception.getInput() != null && commandsyntaxexception.getCursor() >= 0) {
int j = Math.min(commandsyntaxexception.getInput().length(), commandsyntaxexception.getCursor());
MutableComponent ichatmutablecomponent = Component.empty().withStyle(ChatFormatting.GRAY).withStyle((chatmodifier) -> {
@@ -338,7 +349,18 @@ public class Commands {
@@ -344,7 +355,18 @@ public class Commands {
}
ichatmutablecomponent.append((Component) Component.translatable("command.context.here").withStyle(ChatFormatting.RED, ChatFormatting.ITALIC));
@ -83,10 +83,10 @@ index 2fdfc17ef3daf9fb5cc32c807292c71e256d5356..e3394864e29357fec036f9e616472aea
b1 = 0;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index bae43a8feeae694658abb864e0aa91ecf0dbe611..0d7ca54d596377bbe82fa241166c94dae7a40f61 100644
index 15d881193f40dda74996932854283e4551742185..c37793f660c0b2a28e4478dfee0582a61a8faf3c 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -528,6 +528,7 @@ public final class CraftServer implements Server {
@@ -531,6 +531,7 @@ public final class CraftServer implements Server {
}
node = clone;
}
@ -94,7 +94,7 @@ index bae43a8feeae694658abb864e0aa91ecf0dbe611..0d7ca54d596377bbe82fa241166c94da
dispatcher.getDispatcher().getRoot().addChild(node);
} else {
@@ -895,7 +896,13 @@ public final class CraftServer implements Server {
@@ -898,7 +899,13 @@ public final class CraftServer implements Server {
// Spigot start
if (!org.spigotmc.SpigotConfig.unknownCommandMessage.isEmpty()) {

Datei anzeigen

@ -565,7 +565,7 @@ index 0000000000000000000000000000000000000000..7ac27392a8647ef7d0dc78efe78703e9
+ @NotNull GameProfile buildGameProfile();
+}
diff --git a/src/main/java/io/papermc/paper/util/MCUtil.java b/src/main/java/io/papermc/paper/util/MCUtil.java
index dc2ab968ed010289125ac08f0a9ea85af6f6e8bb..82a1a87822e3fc323b92e1aa30ddb0cdb351d89c 100644
index 9572294a50110f2452090da1f32e0a73edc3db05..ff8876b7e7cc2172a2cb5e12d6836b9875cc9aa1 100644
--- a/src/main/java/io/papermc/paper/util/MCUtil.java
+++ b/src/main/java/io/papermc/paper/util/MCUtil.java
@@ -1,5 +1,7 @@
@ -576,15 +576,15 @@ index dc2ab968ed010289125ac08f0a9ea85af6f6e8bb..82a1a87822e3fc323b92e1aa30ddb0cd
import com.google.common.util.concurrent.ThreadFactoryBuilder;
import io.papermc.paper.math.BlockPosition;
import io.papermc.paper.math.FinePosition;
@@ -30,6 +32,7 @@ import net.minecraft.world.level.chunk.ChunkAccess;
import net.minecraft.world.level.chunk.ChunkStatus;
@@ -17,6 +19,7 @@ import net.minecraft.world.level.ClipContext;
import net.minecraft.world.level.Level;
import net.minecraft.world.phys.Vec3;
import org.apache.commons.lang.exception.ExceptionUtils;
+import com.mojang.authlib.GameProfile;
import org.bukkit.Location;
import org.bukkit.block.BlockFace;
import org.bukkit.craftbukkit.CraftWorld;
@@ -378,6 +381,10 @@ public final class MCUtil {
@@ -362,6 +365,10 @@ public final class MCUtil {
return run.get();
}
@ -596,10 +596,10 @@ index dc2ab968ed010289125ac08f0a9ea85af6f6e8bb..82a1a87822e3fc323b92e1aa30ddb0cd
* Calculates distance between 2 entities
* @param e1
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
index 017395b49d4cc0d12246332cc7d4d0113dcd5c5e..839055c2cb941c36c3d7e3eaf61a277b25d16acb 100644
index ae0b713870976d4b1e469a90cef9b2e282dbcaab..6c3e0540dce5f810a7822cefe59228ef77528132 100644
--- a/src/main/java/net/minecraft/server/Main.java
+++ b/src/main/java/net/minecraft/server/Main.java
@@ -181,7 +181,7 @@ public class Main {
@@ -178,7 +178,7 @@ public class Main {
}
File file = (File) optionset.valueOf("universe"); // CraftBukkit
@ -609,10 +609,10 @@ index 017395b49d4cc0d12246332cc7d4d0113dcd5c5e..839055c2cb941c36c3d7e3eaf61a277b
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 4038bb76339d43f18770624bd7fecc79b8d7f2a9..2456edc11b29a92b1648937cd3dd6a9a05706803 100644
index c70cd016e1978931d115cfca94664897f0158196..eac9658fa4cab7a651e10e4e18c679e040e4aed0 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 {
@@ -124,6 +124,17 @@ public class GameProfileCache {
return this.operationCount.incrementAndGet();
}
@ -631,10 +631,10 @@ index 4038bb76339d43f18770624bd7fecc79b8d7f2a9..2456edc11b29a92b1648937cd3dd6a9a
String s1 = name.toLowerCase(Locale.ROOT);
GameProfileCache.GameProfileInfo usercache_usercacheentry = (GameProfileCache.GameProfileInfo) this.profilesByName.get(s1);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 0d7ca54d596377bbe82fa241166c94dae7a40f61..baa2d98530f28b21796c15125ee9dcbbba7bbf77 100644
index c37793f660c0b2a28e4478dfee0582a61a8faf3c..35dc09187b0bed916c9a10f3cf3a900052926a72 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -261,6 +261,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
@@ -264,6 +264,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
import net.md_5.bungee.api.chat.BaseComponent; // Spigot
@ -644,7 +644,7 @@ index 0d7ca54d596377bbe82fa241166c94dae7a40f61..baa2d98530f28b21796c15125ee9dcbb
public final class CraftServer implements Server {
private final String serverName = "Paper"; // Paper
private final String serverVersion;
@@ -303,6 +306,7 @@ public final class CraftServer implements Server {
@@ -306,6 +309,7 @@ public final class CraftServer implements Server {
static {
ConfigurationSerialization.registerClass(CraftOfflinePlayer.class);
ConfigurationSerialization.registerClass(CraftPlayerProfile.class);
@ -652,7 +652,7 @@ index 0d7ca54d596377bbe82fa241166c94dae7a40f61..baa2d98530f28b21796c15125ee9dcbb
CraftItemFactory.instance();
}
@@ -2679,5 +2683,37 @@ public final class CraftServer implements Server {
@@ -2682,5 +2686,37 @@ public final class CraftServer implements Server {
public boolean suggestPlayerNamesWhenNullTabCompletions() {
return io.papermc.paper.configuration.GlobalConfiguration.get().commands.suggestPlayerNamesWhenNullTabCompletions;
}
@ -691,10 +691,10 @@ index 0d7ca54d596377bbe82fa241166c94dae7a40f61..baa2d98530f28b21796c15125ee9dcbb
// Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java b/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java
index 2375b0bac17dd73d6ee12a94b9e4a4143a2e1c65..d1aab4742b605e8807b0e4ca148abe0ed95039f4 100644
index ac05e268c9f00bca9f8ac19650937eede711810b..8d2997efaacbe37d9007861ac871fd2719c2d663 100644
--- a/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java
+++ b/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java
@@ -27,7 +27,7 @@ import org.bukkit.profile.PlayerProfile;
@@ -31,7 +31,7 @@ import org.bukkit.profile.PlayerProfile;
import org.bukkit.profile.PlayerTextures;
@SerializableAs("PlayerProfile")
@ -703,7 +703,7 @@ index 2375b0bac17dd73d6ee12a94b9e4a4143a2e1c65..d1aab4742b605e8807b0e4ca148abe0e
@Nonnull
public static GameProfile validateSkullProfile(@Nonnull GameProfile gameProfile) {
@@ -92,8 +92,10 @@ public final class CraftPlayerProfile implements PlayerProfile {
@@ -96,8 +96,10 @@ public final class CraftPlayerProfile implements PlayerProfile {
}
}
@ -716,7 +716,7 @@ index 2375b0bac17dd73d6ee12a94b9e4a4143a2e1c65..d1aab4742b605e8807b0e4ca148abe0e
}
void rebuildDirtyProperties() {
@@ -236,6 +238,7 @@ public final class CraftPlayerProfile implements PlayerProfile {
@@ -245,6 +247,7 @@ public final class CraftPlayerProfile implements PlayerProfile {
@Override
public Map<String, Object> serialize() {
@ -724,7 +724,7 @@ index 2375b0bac17dd73d6ee12a94b9e4a4143a2e1c65..d1aab4742b605e8807b0e4ca148abe0e
Map<String, Object> map = new LinkedHashMap<>();
if (this.uniqueId != null) {
map.put("uniqueId", this.uniqueId.toString());
@@ -251,10 +254,12 @@ public final class CraftPlayerProfile implements PlayerProfile {
@@ -260,10 +263,12 @@ public final class CraftPlayerProfile implements PlayerProfile {
});
map.put("properties", propertiesData);
}
@ -737,8 +737,8 @@ index 2375b0bac17dd73d6ee12a94b9e4a4143a2e1c65..d1aab4742b605e8807b0e4ca148abe0e
UUID uniqueId = ConfigSerializationUtil.getUuid(map, "uniqueId", true);
String name = ConfigSerializationUtil.getString(map, "name", true);
@@ -268,7 +273,7 @@ public final class CraftPlayerProfile implements PlayerProfile {
profile.properties.put(property.getName(), property);
@@ -277,7 +282,7 @@ public final class CraftPlayerProfile implements PlayerProfile {
profile.properties.put(property.name(), property);
}
}
-
@ -747,7 +747,7 @@ index 2375b0bac17dd73d6ee12a94b9e4a4143a2e1c65..d1aab4742b605e8807b0e4ca148abe0e
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerTextures.java b/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerTextures.java
index e5b61bc1f3a4bfccca386360c4920ffb8b768308..ab1fd3fb39bd40fb867432861462db5f866bce6f 100644
index 3d76d833e428d8760413bb2325a3680c7bcddb32..d734b1bc1ecea935e45893b88d7bf78f5082352e 100644
--- a/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerTextures.java
+++ b/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerTextures.java
@@ -48,7 +48,7 @@ public final class CraftPlayerTextures implements PlayerTextures {

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 8ef1798fe9dc42d9f09449ecc7578f4bddff1ed8..85488adc9c822c89ab5778bc1d48c58e916795c8 100644
index a2f6e3f381bf251d93a63aff9f9af307350ffc50..3d333332ae02951af087cd37cbe7f1ecf8b0c932 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -2036,20 +2036,45 @@ public abstract class Player extends LivingEntity {
@@ -2042,20 +2042,45 @@ public abstract class Player extends LivingEntity {
}
@ -59,7 +59,7 @@ index 8ef1798fe9dc42d9f09449ecc7578f4bddff1ed8..85488adc9c822c89ab5778bc1d48c58e
@Override
public abstract boolean isSpectator();
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
index abe978078270a45f7e77eb2b8a99309f12ca51ee..2f5704b19148f390402c0823030806ba96860286 100644
index b9578f7d0f61d15bee1f99181bf932cdbb0e611c..c40b3b8ff02c0e21fab53f6749f9c72b7e3c48a1 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
@@ -516,6 +516,32 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {

Datei anzeigen

@ -5,10 +5,10 @@ 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 9fd44505c33b7ad578d6a471aca8e1c2df5c7dcd..bab2b06992800885dca42868186163a712ef9d73 100644
index 490af173c265d03904396e9336c95520fcd16c48..b52ed512000328c1ac006fac18d997157faf4cb6 100644
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
@@ -71,6 +71,12 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
@@ -72,6 +72,12 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
@Override
public void tick() {
@ -18,6 +18,6 @@ index 9fd44505c33b7ad578d6a471aca8e1c2df5c7dcd..bab2b06992800885dca42868186163a7
+ return;
+ }
+ // Paper end
if (this.state == ServerLoginPacketListenerImpl.State.READY_TO_ACCEPT) {
this.handleAcceptedLogin();
} else if (this.state == ServerLoginPacketListenerImpl.State.DELAY_ACCEPT) {
if (this.state == ServerLoginPacketListenerImpl.State.VERIFYING) {
this.verifyLoginAndFinishConnectionSetup((GameProfile) Objects.requireNonNull(this.authenticatedProfile));
}

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 ca46bea3799e1bc962debe742ea75f4d7f4ab771..4c8ad4e6ed90d5ba25100abfd2f334a3d1e46288 100644
index b4c91cb985d3772c5b105b8d2267b51d7483e005..3fc715e7ceb35e2309ba3ffeb19ae58cfd25fde6 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -388,6 +388,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@ -16,7 +16,7 @@ index ca46bea3799e1bc962debe742ea75f4d7f4ab771..4c8ad4e6ed90d5ba25100abfd2f334a3
@javax.annotation.Nullable
private org.bukkit.util.Vector origin;
@javax.annotation.Nullable
@@ -2169,6 +2170,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -2125,6 +2126,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 ca46bea3799e1bc962debe742ea75f4d7f4ab771..4c8ad4e6ed90d5ba25100abfd2f334a3
// Paper end
return nbt;
} catch (Throwable throwable) {
@@ -2309,6 +2314,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -2265,6 +2270,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));
}
@ -49,7 +49,7 @@ index 7ae0465091db8e8061737bf93884afa3db49feeb..5d6403fa27521860a69a707dc4358b01
if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, pos).isCancelled()) {
continue;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 5a307e3bf2fc48a74e8c42372f3422fd32224133..02277fc7e48e03d749edb7ec1c3f045dca900615 100644
index 5767eefb09d9e0e3a3d5a006242220b844d28055..a6009f9075035e34150ff692d38cac47930363d1 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -1301,5 +1301,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {

Datei anzeigen

@ -5,13 +5,13 @@ 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 82db70c548336ada2af556251b8ae8d189417024..875b08503fbbac256fad1b3f3d9c742bf1cdced2 100644
index 0fb1fda1aba730e54d9e922e18de3bd048a78a62..0cdab5d4f1b4d368dfee0dc50183a83ca446fc17 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -646,9 +646,9 @@ public abstract class PlayerList {
@@ -633,9 +633,9 @@ public abstract class PlayerList {
// return chatmessage;
event.disallow(PlayerLoginEvent.Result.KICK_BANNED, PaperAdventure.asAdventure(ichatmutablecomponent)); // Paper - Adventure
event.disallow(PlayerLoginEvent.Result.KICK_BANNED, io.papermc.paper.adventure.PaperAdventure.asAdventure(ichatmutablecomponent)); // Paper - Adventure
- } else if (!this.isWhiteListed(gameprofile)) {
- ichatmutablecomponent = Component.translatable("multiplayer.disconnect.not_whitelisted");
- event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(org.spigotmc.SpigotConfig.whitelistMessage)); // Spigot // Paper - Adventure
@ -21,7 +21,7 @@ index 82db70c548336ada2af556251b8ae8d189417024..875b08503fbbac256fad1b3f3d9c742b
} else if (this.getIpBans().isBanned(socketaddress) && !this.getIpBans().get(socketaddress).hasExpired()) {
IpBanListEntry ipbanentry = this.ipBans.get(socketaddress);
@@ -1032,7 +1032,23 @@ public abstract class PlayerList {
@@ -1026,7 +1026,23 @@ public abstract class PlayerList {
}
public boolean isWhiteListed(GameProfile profile) {

Datei anzeigen

@ -31,12 +31,12 @@ index 8ff786c366332588a2df053438f23cc9fb7e2b84..c887d34171f89c731d76c4ca92c70be2
Bootstrap.isBootstrapped = true;
Instant instant = Instant.now();
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 960885c891c98859e8ef375d0796c8b53fcf562c..863a983165aa845abbf7b8f2a3cd0c5057bb47d8 100644
index 601288ff52f0f0b0c82a5ff0414b60b8cb6e3a26..bf34d343fd0b3158bf00f9ce22b45dfd82c75dc5 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -257,10 +257,12 @@ public class Main {
Calendar deadline = Calendar.getInstance();
deadline.add(Calendar.DAY_OF_YEAR, -21);
deadline.add(Calendar.DAY_OF_YEAR, -3);
if (buildDate.before(deadline.getTime())) {
- System.err.println("*** Error, this build is outdated ***");
+ // Paper start - This is some stupid bullshit

Datei anzeigen

@ -7,7 +7,7 @@ Subject: [PATCH] LivingEntity#setKiller
public net.minecraft.world.entity.LivingEntity lastHurtByPlayerTime
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index bba6bce470a11c792bb2edc2171021437e2c9704..24d13be4a5a6cd9d8d9f46c089fd23baa6da954d 100644
index 184ba082edac85a7df16eeebc4473a1a193b6a26..03d791e98d369c1d8fe4a4da11f89301392a934d 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -365,6 +365,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Ocelot despawns should honor nametags and leash
diff --git a/src/main/java/net/minecraft/world/entity/animal/Ocelot.java b/src/main/java/net/minecraft/world/entity/animal/Ocelot.java
index 14b8b844af59ba84211fb029eb2470eb8044faf9..924ea172cab5178e5754bfe09cc7b83c1a66faa6 100644
index 68679cd5857240ec4bc2951fa42a0dbbd4c13ee0..4300fab61765dd224fab084d118aae7294fc9de6 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Ocelot.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Ocelot.java
@@ -133,7 +133,7 @@ public class Ocelot extends Animal {
@@ -135,7 +135,7 @@ public class Ocelot extends Animal {
@Override
public boolean removeWhenFarAway(double distanceSquared) {

Datei anzeigen

@ -6,12 +6,12 @@ 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 bab2b06992800885dca42868186163a712ef9d73..06f3e1f42da85a54187f3decc35c338a3eeb8de4 100644
index b52ed512000328c1ac006fac18d997157faf4cb6..b98c7bb70a2d8867e1236d3c8d78d2cfffe76e28 100644
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
@@ -294,7 +294,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
ServerLoginPacketListenerImpl.this.gameProfile = gameprofile;
ServerLoginPacketListenerImpl.this.state = ServerLoginPacketListenerImpl.State.READY_TO_ACCEPT;
@@ -259,7 +259,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
ServerLoginPacketListenerImpl.LOGGER.warn("Authentication servers are down but will let them in anyway!");
ServerLoginPacketListenerImpl.this.startClientVerification(ServerLoginPacketListenerImpl.this.createOfflineProfile(s1)); // Spigot
} else {
- ServerLoginPacketListenerImpl.this.disconnect(Component.translatable("multiplayer.disconnect.authservers_down"));
+ ServerLoginPacketListenerImpl.this.disconnect(io.papermc.paper.adventure.PaperAdventure.asVanilla(io.papermc.paper.configuration.GlobalConfiguration.get().messages.kick.authenticationServersDown)); // Paper

Datei anzeigen

@ -15,7 +15,7 @@ This may cause additional prefixes to be disabled for plugins bypassing
the plugin logger.
diff --git a/build.gradle.kts b/build.gradle.kts
index 705289d37139e8ec213f972292d4a8efc294f4cf..e1dc32d94576d751c4078d78fbf3ce3b47f02159 100644
index 2f562d2fb02d58551338b055a0dd6c05df44e532..7002a2ccb519ede29244924062f7ed2f49546f7d 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -25,7 +25,7 @@ dependencies {

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 0c869475bc81b635e98fa5d396db434ecf2d54e4..18c9c39fd5574326d9137724773b7403c3c3429d 100644
index 4ab881766975eb4853094ad0d70e9e0647a0c23e..d849ca56d36f4652a5c1526a92f183a2defb3e0d 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1294,7 +1294,34 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -1192,7 +1192,34 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
boolean flag = d7 > 0.0D;
if (this.player.onGround() && !packet.isOnGround() && flag) {

Datei anzeigen

@ -14,11 +14,11 @@ off the main thread.
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 18c9c39fd5574326d9137724773b7403c3c3429d..63003915799f636af2d60778f059a5667e199baf 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -3099,14 +3099,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
index 6faec2ca225fcebbad65190ab485e2cab77cfd6e..e8fb051bf24a4c239ae980c37d8d64f261b5db60 100644
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
@@ -83,14 +83,18 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
@Override
public void handleKeepAlive(ServerboundKeepAlivePacket packet) {
@ -27,14 +27,15 @@ index 18c9c39fd5574326d9137724773b7403c3c3429d..63003915799f636af2d60778f059a566
if (this.keepAlivePending && packet.getId() == this.keepAliveChallenge) {
int i = (int) (Util.getMillis() - this.keepAliveTime);
this.player.latency = (this.player.latency * 3 + i) / 4;
this.latency = (this.latency * 3 + i) / 4;
this.keepAlivePending = false;
} else if (!this.isSingleplayerOwner()) {
- this.disconnect(ServerCommonPacketListenerImpl.TIMEOUT_DISCONNECTION_MESSAGE);
+ // Paper start - This needs to be handled on the main thread for plugins
+ server.submit(() -> {
this.disconnect(Component.translatable("disconnect.timeout"));
+ this.disconnect(ServerCommonPacketListenerImpl.TIMEOUT_DISCONNECTION_MESSAGE);
+ });
+ // Paper end
+ // Paper endg
}
}

Datei anzeigen

@ -60,13 +60,13 @@ index 0000000000000000000000000000000000000000..a5a7624f1f372a26b982836cd31cff15
+
+}
diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java
index 18092ddfd000ef36f0e182ac064c2f667b1e611b..f2c5764a447d0895e90a5aa73ee28a9feb453483 100644
index e7a124403f2b07c96caaaf97d1c9023f9ec2f9d9..e5e4a5fb2c342a249344d207ffea4000cc998710 100644
--- a/src/main/java/net/minecraft/network/Connection.java
+++ b/src/main/java/net/minecraft/network/Connection.java
@@ -116,6 +116,10 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
}
}
// Paper end - add pending task queue
@@ -111,6 +111,10 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
@Nullable
BandwidthDebugMonitor bandwidthDebugMonitor;
public String hostname = ""; // CraftBukkit - add field
+ // Paper start - NetworkClient implementation
+ public int protocolVersion;
+ public java.net.InetSocketAddress virtualHost;
@ -75,11 +75,11 @@ index 18092ddfd000ef36f0e182ac064c2f667b1e611b..f2c5764a447d0895e90a5aa73ee28a9f
public Connection(PacketFlow side) {
this.receiving = side;
diff --git a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
index 77d7f070cce1a47e41b5d4f5a1cc8c778352a126..a3b610cb1ed97a635677bc46ccdf0463c9918585 100644
index 9a327d193d732baea1fadaab7ebc663d6fd5307c..17f01fa589cb7c4eff4233a27e60a5928cbd604d 100644
--- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
@@ -157,6 +157,10 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL
throw new UnsupportedOperationException("Invalid intention " + packet.getIntention());
throw new UnsupportedOperationException("Invalid intention " + packet.intention());
}
+ // Paper start - NetworkClient implementation
@ -90,10 +90,10 @@ index 77d7f070cce1a47e41b5d4f5a1cc8c778352a126..a3b610cb1ed97a635677bc46ccdf0463
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index be3c08a3e1fed0588886e11bd0b7fd3e8499c877..4d83b02dd2f00b613bfb1c7be7c93f0bc00bbf58 100644
index 38c544cdf2230e94850eda4d38afce9df53973a8..e12ae345142f27efa9a4b97c9da522571fc1288a 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -286,6 +286,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -246,6 +246,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
}