13
0
geforkt von Mirrors/Paper

More more more more patches

Dieser Commit ist enthalten in:
Nassim Jahnke 2022-06-07 22:45:38 +02:00
Ursprung c321ca57db
Commit aac58bb772
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B
42 geänderte Dateien mit 119 neuen und 123 gelöschten Zeilen

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 72395ede1fe2570fb5bd463ddff191fc50b98191..b339a9b20f2d81a5f93bf2266d9896aae3886c3d 100644
index b50ca694f827b60ab6ae4b91772774b6fef55734..03ddcbaedc8282cc8964014692dd90c87912e46f 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1186,7 +1186,34 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
@@ -1216,7 +1216,34 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
boolean flag = d8 > 0.0D;
if (this.player.isOnGround() && !packet.isOnGround() && flag) {

Datei anzeigen

@ -15,10 +15,10 @@ also adding some additional logging in order to help work out what is causing
random disconnections for clients.
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index b339a9b20f2d81a5f93bf2266d9896aae3886c3d..a74b0cda6451e4368744e6d191bc5cf50eac3109 100644
index 03ddcbaedc8282cc8964014692dd90c87912e46f..8665bbd6e81d55711f82419c3e3edc9357a839f9 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2805,14 +2805,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
@@ -2995,14 +2995,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
@Override
public void handleKeepAlive(ServerboundKeepAlivePacket packet) {
@ -32,7 +32,7 @@ index b339a9b20f2d81a5f93bf2266d9896aae3886c3d..a74b0cda6451e4368744e6d191bc5cf5
} else if (!this.isSingleplayerOwner()) {
+ // Paper start - This needs to be handled on the main thread for plugins
+ server.submit(() -> {
this.disconnect(new TranslatableComponent("disconnect.timeout"));
this.disconnect(Component.translatable("disconnect.timeout"));
+ });
+ // Paper end
}

Datei anzeigen

@ -60,7 +60,7 @@ index 0000000000000000000000000000000000000000..a5a7624f1f372a26b982836cd31cff15
+
+}
diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java
index dac5ab91fca602cdc2dbc308b24e15ce411659a2..1a2184e23f1e1b8e39141689ebc5f1d13d364038 100644
index 0badcf02feafafc9932420ffee5062f7b99a9eb9..0e338ebdea3a02d56e9149a6904bfdc8889167f1 100644
--- a/src/main/java/net/minecraft/network/Connection.java
+++ b/src/main/java/net/minecraft/network/Connection.java
@@ -93,6 +93,10 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
@ -75,10 +75,10 @@ index dac5ab91fca602cdc2dbc308b24e15ce411659a2..1a2184e23f1e1b8e39141689ebc5f1d1
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 63cc89c7769bfcc9d663a1827ad525e3ddd82fe5..a95b2ee0e80832f786bdb8f3d0bc00cbfae26fd4 100644
index 9016aced079108aeae09f030a672467a953ef93f..4170bda451df3db43e7d57d87d1abb81934d7dad 100644
--- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
@@ -155,6 +155,10 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL
@@ -154,6 +154,10 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL
throw new UnsupportedOperationException("Invalid intention " + packet.getIntention());
}
@ -90,10 +90,10 @@ index 63cc89c7769bfcc9d663a1827ad525e3ddd82fe5..a95b2ee0e80832f786bdb8f3d0bc00cb
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index cebdc80d286a5daf1fdc9329dcff4f888890f91b..bb75dd9d6280f36f4ce03236558606c75026059e 100644
index cc4b9c69e7ccbf202c8ead328eb273e549bd21b3..58af2e8e2c0ede727f976e7a26eda75da0b48039 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -221,6 +221,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -219,6 +219,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
}

Datei anzeigen

@ -17,31 +17,27 @@ from networking or during connections flood of chunk packets on slower clients,
at the cost of dead connections being kept open for longer.
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index a74b0cda6451e4368744e6d191bc5cf50eac3109..e7f39bebc1ac4cbc5a0a7109c21d16d8126fd3cc 100644
index 8665bbd6e81d55711f82419c3e3edc9357a839f9..fb681f9607f2b17a5edafc60c40342532e33021c 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -221,9 +221,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
private final MinecraftServer server;
@@ -239,7 +239,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
public ServerPlayer player;
private int tickCount;
- private long keepAliveTime; @Deprecated private void setLastPing(long lastPing) { this.keepAliveTime = lastPing;}; @Deprecated private long getLastPing() { return this.keepAliveTime;}; // Paper - OBFHELPER
- private boolean keepAlivePending; @Deprecated private void setPendingPing(boolean isPending) { this.keepAlivePending = isPending;}; @Deprecated private boolean isPendingPing() { return this.keepAlivePending;}; // Paper - OBFHELPER
- private long keepAliveChallenge; @Deprecated private void setKeepAliveID(long keepAliveID) { this.keepAliveChallenge = keepAliveID;}; @Deprecated private long getKeepAliveID() {return this.keepAliveChallenge; }; // Paper - OBFHELPER
private int ackBlockChangesUpTo = -1;
- private long keepAliveTime;
+ private long keepAliveTime = Util.getMillis();
+ private boolean keepAlivePending;
+ private long keepAliveChallenge;
private boolean keepAlivePending;
private long keepAliveChallenge;
// CraftBukkit start - multithreaded fields
private final AtomicInteger chatSpamTickCount = new AtomicInteger();
// CraftBukkit end
@@ -252,6 +252,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
private int aboveGroundVehicleTickCount;
private int receivedMovePacketCount;
@@ -272,6 +272,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
private int knownMovePacketCount;
private final ChatPreviewThrottler chatPreviewThrottler = new ChatPreviewThrottler();
private final AtomicReference<Instant> lastChatTimeStamp;
+ private static final long KEEPALIVE_LIMIT = Long.getLong("paper.playerconnection.keepalive", 30) * 1000; // Paper - provide property to set keepalive limit
public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player) {
this.server = server;
@@ -333,18 +334,25 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
this.lastChatTimeStamp = new AtomicReference(Instant.EPOCH);
@@ -359,18 +360,25 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
}
this.server.getProfiler().push("keepAlive");
@ -49,7 +45,7 @@ index a74b0cda6451e4368744e6d191bc5cf50eac3109..e7f39bebc1ac4cbc5a0a7109c21d16d8
-
- if (i - this.keepAliveTime >= 25000L) { // CraftBukkit
- if (this.keepAlivePending) {
- this.disconnect(new TranslatableComponent("disconnect.timeout"));
- this.disconnect(Component.translatable("disconnect.timeout"));
- } else {
+ // Paper Start - give clients a longer time to respond to pings as per pre 1.12.2 timings
+ // This should effectively place the keepalive handling back to "as it was" before 1.12.2
@ -59,7 +55,7 @@ index a74b0cda6451e4368744e6d191bc5cf50eac3109..e7f39bebc1ac4cbc5a0a7109c21d16d8
+ if (this.keepAlivePending) {
+ if (!this.processedDisconnect && elapsedTime >= KEEPALIVE_LIMIT) { // check keepalive limit, don't fire if already disconnected
+ ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked due to keepalive timeout!", this.player.getScoreboardName()); // more info
+ this.disconnect(new TranslatableComponent("disconnect.timeout", new Object[0]));
+ this.disconnect(Component.translatable("disconnect.timeout", new Object[0]));
+ }
+ } else {
+ if (elapsedTime >= 15000L) { // 15 seconds

Datei anzeigen

@ -6,18 +6,18 @@ Subject: [PATCH] Send attack SoundEffects only to players who can see the
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
index 7fc4cd29bd487955886c81e6997d832a3185ec8e..de71d57b86d681efe0916dbee53be3ac826f9e2e 100644
index b876bbb08c868bc6984a395b84b0c0aaf1666912..c468e3406bd50b58e4cccba955e3fa9a5a3cb22e 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -31,6 +31,7 @@ import net.minecraft.network.chat.MutableComponent;
import net.minecraft.network.chat.TextComponent;
import net.minecraft.network.chat.TranslatableComponent;
@@ -35,6 +35,7 @@ import net.minecraft.network.chat.ClickEvent;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.MutableComponent;
import net.minecraft.network.protocol.game.ClientboundSetEntityMotionPacket;
+import net.minecraft.network.protocol.game.ClientboundSoundPacket;
import net.minecraft.network.syncher.EntityDataAccessor;
import net.minecraft.network.syncher.EntityDataSerializers;
import net.minecraft.network.syncher.SynchedEntityData;
@@ -1201,7 +1202,7 @@ public abstract class Player extends LivingEntity {
@@ -1247,7 +1248,7 @@ public abstract class Player extends LivingEntity {
int i = b0 + EnchantmentHelper.getKnockbackBonus(this);
if (this.isSprinting() && flag) {
@ -26,7 +26,7 @@ index 7fc4cd29bd487955886c81e6997d832a3185ec8e..de71d57b86d681efe0916dbee53be3ac
++i;
flag1 = true;
}
@@ -1276,7 +1277,7 @@ public abstract class Player extends LivingEntity {
@@ -1322,7 +1323,7 @@ public abstract class Player extends LivingEntity {
}
}
@ -35,7 +35,7 @@ index 7fc4cd29bd487955886c81e6997d832a3185ec8e..de71d57b86d681efe0916dbee53be3ac
this.sweepAttack();
}
@@ -1304,15 +1305,15 @@ public abstract class Player extends LivingEntity {
@@ -1350,15 +1351,15 @@ public abstract class Player extends LivingEntity {
}
if (flag2) {
@ -54,7 +54,7 @@ index 7fc4cd29bd487955886c81e6997d832a3185ec8e..de71d57b86d681efe0916dbee53be3ac
}
}
@@ -1364,7 +1365,7 @@ public abstract class Player extends LivingEntity {
@@ -1410,7 +1411,7 @@ public abstract class Player extends LivingEntity {
this.causeFoodExhaustion(level.spigotConfig.combatExhaustion, EntityExhaustionEvent.ExhaustionReason.ATTACK); // CraftBukkit - EntityExhaustionEvent // Spigot - Change to use configurable value
} else {
@ -63,7 +63,7 @@ index 7fc4cd29bd487955886c81e6997d832a3185ec8e..de71d57b86d681efe0916dbee53be3ac
if (flag4) {
target.clearFire();
}
@@ -1811,6 +1812,14 @@ public abstract class Player extends LivingEntity {
@@ -1863,6 +1864,14 @@ public abstract class Player extends LivingEntity {
public int getXpNeededForNextLevel() {
return this.experienceLevel >= 30 ? 112 + (this.experienceLevel - 30) * 9 : (this.experienceLevel >= 15 ? 37 + (this.experienceLevel - 15) * 5 : 7 + this.experienceLevel * 2);
}

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerArmorChangeEvent
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index a7e09145160f9c26b19a8d61564bf9c04e2616b1..2449cd753ec52b7e2d2213fcd3979d616a33c677 100644
index 2eed84529ad9a34ae88c4f37f2b0c7943f51b0ad..fc63d202e8cc28d5664c0f5749b195e3c1220cc9 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -1,5 +1,6 @@
@ -15,7 +15,7 @@ index a7e09145160f9c26b19a8d61564bf9c04e2616b1..2449cd753ec52b7e2d2213fcd3979d61
import com.google.common.base.Objects;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
@@ -2941,6 +2942,13 @@ public abstract class LivingEntity extends Entity {
@@ -2974,6 +2975,13 @@ public abstract class LivingEntity extends Entity {
ItemStack itemstack1 = this.getItemBySlot(enumitemslot);
if (!ItemStack.matches(itemstack1, itemstack)) {

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Prevent logins from being processed when the player has
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
index 6834c67b38f0679497bef4b2174817d9688cbbd8..73efc3084b04914f7f06875651269fd584b60989 100644
index 6d015b226ea32f9d658ca9674b9500494c837949..c927fc378254812ca630b2d1c48d6b378dee5ef0 100644
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
@@ -75,7 +75,11 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
@@ -86,7 +86,11 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
}
// Paper end
if (this.state == ServerLoginPacketListenerImpl.State.READY_TO_ACCEPT) {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Fix MC-117075: TE Unload Lag Spike
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index d22b7edc9ddea765c11e82346afd3942e37831de..a7fbaa420bf18649cdcb94d53e7d5cfd704d9555 100644
index 4aea5e937e2e0e272e5aeb4e6b9ed750064f3828..fc7d5f89b0ad56ab30d32b8ff2a301a55ad768dc 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -730,6 +730,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -687,6 +687,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
// Spigot start
// Iterator iterator = this.blockEntityTickers.iterator();
int tilesThisCycle = 0;
@ -17,7 +17,7 @@ index d22b7edc9ddea765c11e82346afd3942e37831de..a7fbaa420bf18649cdcb94d53e7d5cfd
for (tileTickPosition = 0; tileTickPosition < this.blockEntityTickers.size(); tileTickPosition++) { // Paper - Disable tick limiters
this.tileTickPosition = (this.tileTickPosition < this.blockEntityTickers.size()) ? this.tileTickPosition : 0;
TickingBlockEntity tickingblockentity = (TickingBlockEntity) this.blockEntityTickers.get(tileTickPosition);
@@ -737,7 +739,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -694,7 +696,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
if (tickingblockentity == null) {
this.getCraftServer().getLogger().severe("Spigot has detected a null entity and has removed it, preventing a crash");
tilesThisCycle--;
@ -25,14 +25,14 @@ index d22b7edc9ddea765c11e82346afd3942e37831de..a7fbaa420bf18649cdcb94d53e7d5cfd
continue;
}
// Spigot end
@@ -745,12 +746,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -702,12 +703,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
if (tickingblockentity.isRemoved()) {
// Spigot start
tilesThisCycle--;
- this.blockEntityTickers.remove(this.tileTickPosition--);
+ toRemove.add(tickingblockentity); // Paper - use removeAll
// Spigot end
} else if (this.shouldTickBlocksAt(ChunkPos.asLong(tickingblockentity.getPos()))) {
} else if (this.shouldTickBlocksAt(tickingblockentity.getPos())) {
tickingblockentity.tick();
}
}

Datei anzeigen

@ -18,10 +18,10 @@ the blockstate that will be valid for restoration, as opposed to dropping
information on restoration when the event is cancelled.
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index a7fbaa420bf18649cdcb94d53e7d5cfd704d9555..46168d119d10231b8b946015245a476e0b56d567 100644
index fc7d5f89b0ad56ab30d32b8ff2a301a55ad768dc..1569c9249804de05b2650463f32a94d599ffd427 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -142,7 +142,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -148,7 +148,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
public boolean preventPoiUpdated = false; // CraftBukkit - SPIGOT-5710
public boolean captureBlockStates = false;
public boolean captureTreeGeneration = false;
@ -30,7 +30,7 @@ index a7fbaa420bf18649cdcb94d53e7d5cfd704d9555..46168d119d10231b8b946015245a476e
public Map<BlockPos, BlockEntity> capturedTileEntities = new HashMap<>();
public List<ItemEntity> captureDrops;
public final it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap<SpawnCategory> ticksPerSpawnCategory = new it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap<>();
@@ -361,7 +361,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -372,7 +372,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
public boolean setBlock(BlockPos pos, BlockState state, int flags, int maxUpdateDepth) {
// CraftBukkit start - tree generation
if (this.captureTreeGeneration) {
@ -39,7 +39,7 @@ index a7fbaa420bf18649cdcb94d53e7d5cfd704d9555..46168d119d10231b8b946015245a476e
if (blockstate == null) {
blockstate = CapturedBlockState.getTreeBlockState(this, pos, flags);
this.capturedBlockStates.put(pos.immutable(), blockstate);
@@ -381,7 +381,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -392,7 +392,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
// CraftBukkit start - capture blockstates
boolean captured = false;
if (this.captureBlockStates && !this.capturedBlockStates.containsKey(pos)) {
@ -49,7 +49,7 @@ index a7fbaa420bf18649cdcb94d53e7d5cfd704d9555..46168d119d10231b8b946015245a476e
this.capturedBlockStates.put(pos.immutable(), blockstate);
captured = true;
}
@@ -650,7 +651,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -599,7 +600,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
public BlockState getBlockState(BlockPos pos) {
// CraftBukkit start - tree generation
if (this.captureTreeGeneration) {

Datei anzeigen

@ -114,10 +114,10 @@ index 7629a51ec284cab0db7e9238027d6acfa4f3083c..a76cce199acdcecfdd8b998ec08974c2
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java
index 51ea68c433c4d530f8404d3174c5a121ce808a96..93a8aeb5545c794ac425c35f8af52a443cd060ca 100644
index 521d981e72955b1e2c96427882e336b034456678..e609cfeaf5aa6807f57360dde9b0dccf40a23eb1 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java
@@ -324,15 +324,30 @@ public final class CraftBlockStates {
@@ -336,15 +336,30 @@ public final class CraftBlockStates {
}
public static BlockState getBlockState(Block block) {

Datei anzeigen

@ -14,10 +14,10 @@ completion, such as offline players.
Also adds isCommand and getLocation to the sync TabCompleteEvent
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index e7f39bebc1ac4cbc5a0a7109c21d16d8126fd3cc..ee482d8942a355d989a2c913c23245bdbfb866a1 100644
index fb681f9607f2b17a5edafc60c40342532e33021c..9e7a3a58bf944e612fa4c3bcb3b87efe5eb21c5b 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -708,10 +708,10 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
@@ -740,10 +740,10 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
@Override
public void handleCustomCommandSuggestions(ServerboundCommandSuggestionPacket packet) {
@ -25,12 +25,12 @@ index e7f39bebc1ac4cbc5a0a7109c21d16d8126fd3cc..ee482d8942a355d989a2c913c23245bd
+ // PlayerConnectionUtils.ensureMainThread(packetplayintabcomplete, this, this.player.getWorldServer()); // Paper - run this async
// CraftBukkit start
if (this.chatSpamTickCount.addAndGet(1) > 500 && !this.server.getPlayerList().isOp(this.player.getGameProfile())) {
- this.disconnect(new TranslatableComponent("disconnect.spam", new Object[0]));
+ server.scheduleOnMain(() -> this.disconnect(new TranslatableComponent("disconnect.spam", new Object[0]))); // Paper
- this.disconnect(Component.translatable("disconnect.spam"));
+ server.scheduleOnMain(() -> this.disconnect(Component.translatable("disconnect.spam", new Object[0]))); // Paper
return;
}
// CraftBukkit end
@@ -721,12 +721,35 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
@@ -753,12 +753,35 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
stringreader.skip();
}
@ -72,10 +72,10 @@ index e7f39bebc1ac4cbc5a0a7109c21d16d8126fd3cc..ee482d8942a355d989a2c913c23245bd
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index c091aa6cbb541ce5349ffb183bc7d67b0c4fafeb..77c5180d36f09cfeb7a82c6e321793ac1a363a48 100644
index fbe26f8a592ed0a3b970b6f02126b6e3e454d8af..5d62881b974081d7207773580697c5d6ccdc8880 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2078,7 +2078,7 @@ public final class CraftServer implements Server {
@@ -2061,7 +2061,7 @@ public final class CraftServer implements Server {
offers = this.tabCompleteChat(player, message);
}

Datei anzeigen

@ -10,10 +10,10 @@ of giving the player experience points.
Both an API To standalone mend, and apply mending logic to .giveExp has been added.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index bb75dd9d6280f36f4ce03236558606c75026059e..19e8ec4baf0967693121b2e3443d436f85f518ec 100644
index 58af2e8e2c0ede727f976e7a26eda75da0b48039..3352880b06a25b90b338dc15c99e9df08caa86dc 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1349,7 +1349,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1347,7 +1347,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
@Override

Datei anzeigen

@ -9,10 +9,10 @@ from triggering monster spawns on a server.
Also a highly more effecient way to blanket block spawns in a world
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index f5cf71258732aa040443eb82e09ab28f130e4c79..81eb73e9fde37e3b196bd899ecd4d614897d1a98 100644
index 943cad9a08d72b90b92f92ef90588501bbf158d5..f9ef45635b731cafc9b6879603cac34c146833b0 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -1114,7 +1114,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -1150,7 +1150,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
chunkRange = (chunkRange > level.spigotConfig.viewDistance) ? (byte) level.spigotConfig.viewDistance : chunkRange;
chunkRange = (chunkRange > 8) ? 8 : chunkRange;
@ -23,7 +23,7 @@ index f5cf71258732aa040443eb82e09ab28f130e4c79..81eb73e9fde37e3b196bd899ecd4d614
// Spigot end
long i = chunkcoordintpair.toLong();
@@ -1131,6 +1133,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -1167,6 +1169,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
entityplayer = (ServerPlayer) iterator.next();
@ -40,10 +40,10 @@ index f5cf71258732aa040443eb82e09ab28f130e4c79..81eb73e9fde37e3b196bd899ecd4d614
return true;
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
index d198303d4d0cff34156c00176ec2f3f2ad42ada4..f2d92cd125cbc1bd6fdab774e7002d6b7eda29fc 100644
index 63e11397d6efb293b140c4c4bca91e49464e8ea6..f4174e4b7c296407cb1b18af77ae855978ec1b6a 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@@ -818,6 +818,15 @@ public class ServerChunkCache extends ChunkSource {
@@ -819,6 +819,15 @@ public class ServerChunkCache extends ChunkSource {
boolean flag2 = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit
Collections.shuffle(list);
@ -60,7 +60,7 @@ index d198303d4d0cff34156c00176ec2f3f2ad42ada4..f2d92cd125cbc1bd6fdab774e7002d6b
while (iterator1.hasNext()) {
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index eaa968b6d91160947235fad29d3b955b3ee149f3..3c780c0679ba004577393b3d801ee18ac7e847b9 100644
index bd6e22b849d6328b2fcc0244cc83a79d9ffb08c8..23bf128cb5b7598a9d4c145b14f8fe692660be0d 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1,5 +1,6 @@
@ -70,7 +70,7 @@ index eaa968b6d91160947235fad29d3b955b3ee149f3..3c780c0679ba004577393b3d801ee18a
import com.google.common.collect.Lists;
import com.mojang.authlib.GameProfile;
import com.mojang.datafixers.util.Either;
@@ -236,6 +237,7 @@ public class ServerPlayer extends Player {
@@ -243,6 +244,7 @@ public class ServerPlayer extends Player {
public Integer clientViewDistance;
public String kickLeaveMessage = null; // SPIGOT-3034: Forward leave message to PlayerQuitEvent
// CraftBukkit end

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] PlayerAdvancementCriterionGrantEvent
diff --git a/src/main/java/net/minecraft/server/PlayerAdvancements.java b/src/main/java/net/minecraft/server/PlayerAdvancements.java
index e5ffc18cbd107b9fd20a9781f6f1979e9598378f..ecd62d2625bc5def3ac68f642f2c6f156060f129 100644
index e4d7bc72545971ce9b74cce18e9b79abef9fefb7..4591364057110b8abe6cc669b76918096cb6b776 100644
--- a/src/main/java/net/minecraft/server/PlayerAdvancements.java
+++ b/src/main/java/net/minecraft/server/PlayerAdvancements.java
@@ -277,6 +277,12 @@ public class PlayerAdvancements {
@@ -276,6 +276,12 @@ public class PlayerAdvancements {
boolean flag1 = advancementprogress.isDone();
if (advancementprogress.grantProgress(criterionName)) {

Datei anzeigen

@ -255,7 +255,7 @@ index 1b8be8a7103e09065a405a22d427b9a747fc1a3e..2afedf24e485dd36e95988843c70af88
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index 20d10e5b54edaf1c5212bbc33b8cd1aa426fa826..d5df6fc244ab82b94196be9c436ba77020716df2 100644
index 4d687fa31f4d889ac755c178b9afd2b927c78ee2..01ceb8de8411193fa407bf19bbd25a4bf44765d3 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -1452,6 +1452,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {

Datei anzeigen

@ -13,10 +13,10 @@ Update adjacent blocks of doors, double plants, pistons and beds
when cancelling interaction.
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
index c0f712fd4dd57080044341c7c7c8faf09572c2c5..91d6885da13138e1def16e1876910ef893ce244d 100644
index b18bb06caf5f034dffbb72120c8f21da482ae3df..53717a4a2bfd841346c00b5f854899e23661122c 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
@@ -196,6 +196,11 @@ public class ServerPlayerGameMode {
@@ -186,6 +186,11 @@ public class ServerPlayerGameMode {
PlayerInteractEvent event = CraftEventFactory.callPlayerInteractEvent(this.player, Action.LEFT_CLICK_BLOCK, pos, direction, this.player.getInventory().getSelected(), InteractionHand.MAIN_HAND);
if (event.isCancelled()) {
// Let the client know the block still exists
@ -28,7 +28,7 @@ index c0f712fd4dd57080044341c7c7c8faf09572c2c5..91d6885da13138e1def16e1876910ef8
this.player.connection.send(new ClientboundBlockUpdatePacket(this.level, pos));
// Update any tile entity data for this block
BlockEntity tileentity = this.level.getBlockEntity(pos);
@@ -513,7 +518,13 @@ public class ServerPlayerGameMode {
@@ -509,7 +514,13 @@ public class ServerPlayerGameMode {
// send a correcting update to the client for the block above as well, this because of replaceable blocks (such as grass, sea grass etc)
player.connection.send(new ClientboundBlockUpdatePacket(world, blockposition.above()));

Datei anzeigen

@ -21,10 +21,10 @@ index 99ce64e4d01b58d887506841451e561c2796c413..665b7f4cddfef1631ba2fad6eebeb193
private void allChunksAreSlimeChunks() {
allChunksAreSlimeChunks = getBoolean("all-chunks-are-slime-chunks", 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 de71d57b86d681efe0916dbee53be3ac826f9e2e..66b474304f659efcc7bd1181e3eaee70657013eb 100644
index c468e3406bd50b58e4cccba955e3fa9a5a3cb22e..3008f0ac5aee6443645b7c888a5e8e5b630138e7 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -1209,6 +1209,7 @@ public abstract class Player extends LivingEntity {
@@ -1255,6 +1255,7 @@ public abstract class Player extends LivingEntity {
boolean flag2 = flag && this.fallDistance > 0.0F && !this.onGround && !this.onClimbable() && !this.isInWater() && !this.hasEffect(MobEffects.BLINDNESS) && !this.isPassenger() && target instanceof LivingEntity;

Datei anzeigen

@ -12,7 +12,7 @@ flushing on the netty event loop, so it won't do the flush on the main thread.
Renable flushing by passing -Dpaper.explicit-flush=true
diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java
index 1a2184e23f1e1b8e39141689ebc5f1d13d364038..7e7d33a843566440f815d779ef2f3db9efc3b92d 100644
index 0e338ebdea3a02d56e9149a6904bfdc8889167f1..311148ba8ca073d522cac81f9a3f66f30eb70909 100644
--- a/src/main/java/net/minecraft/network/Connection.java
+++ b/src/main/java/net/minecraft/network/Connection.java
@@ -96,6 +96,7 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {

Datei anzeigen

@ -190,7 +190,7 @@ index 67455a5ba75c9b816213e44d6872c5ddf8e27e98..23efad80934930beadf15e65781551d4
public ClientboundStatusResponsePacket(ServerStatus metadata) {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 22c4598e00d1a27d86584e7bfcbb73038f2f2c1a..c7881eebb02424ce488d2c04aa736f17402109a0 100644
index f67392be663dd558ce6458dc210c6ac90538d9e5..661ee126886691cbd6db1a6e08ec6ab402698a76 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -2,6 +2,9 @@ package net.minecraft.server;
@ -203,7 +203,7 @@ index 22c4598e00d1a27d86584e7bfcbb73038f2f2c1a..c7881eebb02424ce488d2c04aa736f17
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
@@ -1350,7 +1353,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1312,7 +1315,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.lastServerStatus = i;
this.status.setPlayers(new ServerStatus.Players(this.getMaxPlayers(), this.getPlayerCount()));
if (!this.hidesOnlinePlayers()) {
@ -213,10 +213,10 @@ index 22c4598e00d1a27d86584e7bfcbb73038f2f2c1a..c7881eebb02424ce488d2c04aa736f17
for (int k = 0; k < agameprofile.length; ++k) {
diff --git a/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java
index 2b24a41587fbe1fba70a0ab42d3dc33358f2ba2e..4fa79d37ff4e70c61672cce7c55257c46232c026 100644
index 5d368e34c90fc5191d9ed2352f7aa44c4a299eed..d21549bb272e4848c5ce7c29862f0303aea7f9b7 100644
--- a/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java
@@ -47,6 +47,8 @@ public class ServerStatusPacketListenerImpl implements ServerStatusPacketListene
@@ -46,6 +46,8 @@ public class ServerStatusPacketListenerImpl implements ServerStatusPacketListene
this.connection.disconnect(ServerStatusPacketListenerImpl.DISCONNECT_REASON);
} else {
this.hasRequestedStatus = true;
@ -225,7 +225,7 @@ index 2b24a41587fbe1fba70a0ab42d3dc33358f2ba2e..4fa79d37ff4e70c61672cce7c55257c4
// CraftBukkit start
// this.connection.send(new PacketStatusOutServerInfo(this.server.getStatus()));
final Object[] players = this.server.getPlayerList().players.toArray();
@@ -150,6 +152,9 @@ public class ServerStatusPacketListenerImpl implements ServerStatusPacketListene
@@ -149,6 +151,9 @@ public class ServerStatusPacketListenerImpl implements ServerStatusPacketListene
this.connection.send(new ClientboundStatusResponsePacket(ping));
// CraftBukkit end

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Ability to change PlayerProfile in AsyncPreLoginEvent
This will allow you to change the players name or skin on login.
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
index 73efc3084b04914f7f06875651269fd584b60989..d3462cdc5eee37cedbff80f35d5b9c51e8dcd1da 100644
index c927fc378254812ca630b2d1c48d6b378dee5ef0..5c73ee9b2d3328c9174db067ce674401d7ff5dc9 100644
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
@@ -343,8 +343,16 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
@@ -397,8 +397,16 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
java.util.UUID uniqueId = ServerLoginPacketListenerImpl.this.gameProfile.getId();
final org.bukkit.craftbukkit.CraftServer server = ServerLoginPacketListenerImpl.this.server.server;

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Player.setPlayerProfile API
This can be useful for changing name or skins after a player has logged in.
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
index d3462cdc5eee37cedbff80f35d5b9c51e8dcd1da..5ebc450432805d52457b9f8ff1e2b1981bdd78e6 100644
index 5c73ee9b2d3328c9174db067ce674401d7ff5dc9..136ff7de4ffb91d3fc84a90560a2f5db84703cff 100644
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
@@ -344,11 +344,11 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
@@ -398,11 +398,11 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
final org.bukkit.craftbukkit.CraftServer server = ServerLoginPacketListenerImpl.this.server.server;
// Paper start
@ -24,10 +24,10 @@ index d3462cdc5eee37cedbff80f35d5b9c51e8dcd1da..5ebc450432805d52457b9f8ff1e2b198
playerName = gameProfile.getName();
uniqueId = gameProfile.getId();
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 19e8ec4baf0967693121b2e3443d436f85f518ec..9ab4897d5d0b25fbdcb4a9889b7e73acd993a786 100644
index 3352880b06a25b90b338dc15c99e9df08caa86dc..e976dc1020d50e669d856951354e82977ad3d8ee 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -77,6 +77,7 @@ import net.minecraft.world.entity.ai.attributes.Attributes;
@@ -76,6 +76,7 @@ import net.minecraft.world.entity.ai.attributes.Attributes;
import net.minecraft.world.inventory.AbstractContainerMenu;
import net.minecraft.world.level.GameType;
import net.minecraft.world.level.block.Blocks;
@ -35,7 +35,7 @@ index 19e8ec4baf0967693121b2e3443d436f85f518ec..9ab4897d5d0b25fbdcb4a9889b7e73ac
import net.minecraft.world.level.block.entity.SignBlockEntity;
import net.minecraft.world.level.border.BorderChangeListener;
import net.minecraft.world.level.saveddata.maps.MapDecoration;
@@ -204,11 +205,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -202,11 +203,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return server.getPlayer(getUniqueId()) != null;
}
@ -47,7 +47,7 @@ index 19e8ec4baf0967693121b2e3443d436f85f518ec..9ab4897d5d0b25fbdcb4a9889b7e73ac
@Override
public InetSocketAddress getAddress() {
if (this.getHandle().connection == null) return null;
@@ -1482,8 +1478,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1480,8 +1476,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.hiddenEntities.put(entity.getUniqueId(), hidingPlugins);
// Remove this entity from the hidden player's EntityTrackerEntry
@ -64,7 +64,7 @@ index 19e8ec4baf0967693121b2e3443d436f85f518ec..9ab4897d5d0b25fbdcb4a9889b7e73ac
ChunkMap.TrackedEntity entry = tracker.entityMap.get(other.getId());
if (entry != null) {
entry.removePlayer(this.getHandle());
@@ -1496,8 +1499,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1494,8 +1497,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.getHandle().connection.send(new ClientboundPlayerInfoPacket(ClientboundPlayerInfoPacket.Action.REMOVE_PLAYER, otherPlayer));
}
}
@ -73,7 +73,7 @@ index 19e8ec4baf0967693121b2e3443d436f85f518ec..9ab4897d5d0b25fbdcb4a9889b7e73ac
}
@Override
@@ -1534,8 +1535,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1532,8 +1533,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
this.hiddenEntities.remove(entity.getUniqueId());
@ -90,7 +90,7 @@ index 19e8ec4baf0967693121b2e3443d436f85f518ec..9ab4897d5d0b25fbdcb4a9889b7e73ac
if (other instanceof ServerPlayer) {
ServerPlayer otherPlayer = (ServerPlayer) other;
@@ -1546,9 +1554,51 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1544,9 +1552,51 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
if (entry != null && !entry.seenBy.contains(this.getHandle().connection)) {
entry.updatePlayer(this.getHandle());
}

Datei anzeigen

@ -9,10 +9,10 @@ In Offline Mode, will return an Offline UUID
This is a more performant way to obtain a UUID for a name than loading an OfflinePlayer
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 77c5180d36f09cfeb7a82c6e321793ac1a363a48..8d888beec17bdea0621116d3038bb3d72e4b3c5d 100644
index 5d62881b974081d7207773580697c5d6ccdc8880..3f4556e3f8c7665c64d96109030a669a308ba4a9 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1705,6 +1705,25 @@ public final class CraftServer implements Server {
@@ -1688,6 +1688,25 @@ public final class CraftServer implements Server {
return recipients.size();
}

Datei anzeigen

@ -9,10 +9,10 @@ e.g. servers which allow and support the usage of mod packs.
provide an optional flag to disable this check, at your own risk.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 9ab4897d5d0b25fbdcb4a9889b7e73acd993a786..4fd3b8d55edd44cfc0cfb58f5e623a04426d7edf 100644
index e976dc1020d50e669d856951354e82977ad3d8ee..de76f01f39c44517487c86133d9914994c1c9d7b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -170,6 +170,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -168,6 +168,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Paper start
private org.bukkit.event.player.PlayerResourcePackStatusEvent.Status resourcePackStatus;
private String resourcePackHash;
@ -20,7 +20,7 @@ index 9ab4897d5d0b25fbdcb4a9889b7e73acd993a786..4fd3b8d55edd44cfc0cfb58f5e623a04
// Paper end
public CraftPlayer(CraftServer server, ServerPlayer entity) {
@@ -1798,7 +1799,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1796,7 +1797,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Paper end
public void addChannel(String channel) {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add openSign method to HumanEntity
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
index 26f21754b5ec3d1cbd455c4d9d04af299fc10b1b..09ea221665bd17bc853274d0146987ebadefe46f 100644
index 541f943d307f5307460ea049294fd98d53054d52..c629755ddba58eeff6f38f9396891f98f530e08e 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
@@ -118,15 +118,15 @@ public class CraftSign extends CraftBlockEntityState<SignBlockEntity> implements
@@ -117,15 +117,15 @@ public class CraftSign extends CraftBlockEntityState<SignBlockEntity> implements
}
}

Datei anzeigen

@ -20,10 +20,10 @@ index 665b7f4cddfef1631ba2fad6eebeb19392cf8759..7dbd03897bf98ef19509972fb8d09aa0
+ }
}
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 66b474304f659efcc7bd1181e3eaee70657013eb..7b81d77649997aeb97cd819f380bdfe848702164 100644
index 3008f0ac5aee6443645b7c888a5e8e5b630138e7..ff91d886f26dbce576ae70ab010ee99888595b85 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -1258,7 +1258,11 @@ public abstract class Player extends LivingEntity {
@@ -1304,7 +1304,11 @@ public abstract class Player extends LivingEntity {
}
this.setDeltaMovement(this.getDeltaMovement().multiply(0.6D, 1.0D, 0.6D));

Datei anzeigen

@ -5,18 +5,18 @@ Subject: [PATCH] Fix exploit that allowed colored signs to be created
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index ee482d8942a355d989a2c913c23245bdbfb866a1..ba368d11aac5f440dfb45d0c283013390bb2aeff 100644
index 9e7a3a58bf944e612fa4c3bcb3b87efe5eb21c5b..6b96d3e39fb6de4ce1c82eb36c881331d885fec8 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2811,9 +2811,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
TextFilter.FilteredText currentLine = signText.get(i);
@@ -3001,9 +3001,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
FilteredText<Component> filteredtext = (signText.get(i)).map(Component::literal); // CraftBukkit - decompile error
if (this.player.isTextFilteringEnabled()) {
- lines.add(net.kyori.adventure.text.Component.text(currentLine.getFiltered()));
+ lines.add(net.kyori.adventure.text.Component.text(SharedConstants.filterText(currentLine.getFiltered())));
- lines.add(net.kyori.adventure.text.Component.text(filteredtext.filteredOrElse(CommonComponents.EMPTY).getString())); // Paper - adventure
+ lines.add(net.kyori.adventure.text.Component.text(SharedConstants.filterText(filteredtext.filteredOrElse(CommonComponents.EMPTY).getString()))); // Paper - adventure
} else {
- lines.add(net.kyori.adventure.text.Component.text(currentLine.getRaw()));
+ lines.add(net.kyori.adventure.text.Component.text(SharedConstants.filterText(currentLine.getRaw())));
- lines.add(net.kyori.adventure.text.Component.text(filteredtext.raw().getString())); // Paper - adventure
+ lines.add(net.kyori.adventure.text.Component.text(SharedConstants.filterText(filteredtext.raw().getString()))); // Paper - adventure
}
}
SignChangeEvent event = new SignChangeEvent((org.bukkit.craftbukkit.block.CraftBlock) player.getWorld().getBlockAt(x, y, z), this.player.getBukkitEntity(), lines);

Datei anzeigen

@ -8,7 +8,7 @@ Fires an event anytime an enderman intends to teleport away from the player
You may cancel this, enabling ranged attacks to damage the enderman for example.
diff --git a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
index 78c31a7191a5811732339e5bf8a7f07ef299a324..1decbe53207e25ee34f9948c4dcc79fa6f1138bc 100644
index 6558d005c466728bc59ffaa85af9109055dcf320..8a44d518d15cddc70de2c90d8029dba50d75ca68 100644
--- a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
+++ b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
@@ -113,6 +113,12 @@ public class EnderMan extends Monster implements NeutralMob {
@ -26,14 +26,14 @@ index 78c31a7191a5811732339e5bf8a7f07ef299a324..1decbe53207e25ee34f9948c4dcc79fa
if (!super.setTarget(entityliving, reason, fireEvent)) {
@@ -267,7 +273,7 @@ public class EnderMan extends Monster implements NeutralMob {
if (this.level.isDay() && this.tickCount >= this.targetChangeTime + 600) {
float f = this.getBrightness();
float f = this.getLightLevelDependentMagicValue();
- if (f > 0.5F && this.level.canSeeSky(this.blockPosition()) && this.random.nextFloat() * 30.0F < (f - 0.4F) * 2.0F) {
+ if (f > 0.5F && this.level.canSeeSky(this.blockPosition()) && this.random.nextFloat() * 30.0F < (f - 0.4F) * 2.0F && this.tryEscape(com.destroystokyo.paper.event.entity.EndermanEscapeEvent.Reason.RUNAWAY)) { // Paper
this.setTarget((LivingEntity) null);
this.teleport();
}
@@ -374,17 +380,19 @@ public class EnderMan extends Monster implements NeutralMob {
@@ -378,17 +384,19 @@ public class EnderMan extends Monster implements NeutralMob {
flag = false;
}
@ -54,7 +54,7 @@ index 78c31a7191a5811732339e5bf8a7f07ef299a324..1decbe53207e25ee34f9948c4dcc79fa
this.teleport();
}
@@ -604,7 +612,7 @@ public class EnderMan extends Monster implements NeutralMob {
@@ -608,7 +616,7 @@ public class EnderMan extends Monster implements NeutralMob {
} else {
if (this.target != null && !this.enderman.isPassenger()) {
if (this.enderman.isLookingAtMe((Player) this.target)) {

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Enderman.teleportRandomly()
Ability to trigger the vanilla "teleport randomly" mechanic of an enderman.
diff --git a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
index 1decbe53207e25ee34f9948c4dcc79fa6f1138bc..47f745bb54ab53674f371cb9dfc580fdb770541c 100644
index 8a44d518d15cddc70de2c90d8029dba50d75ca68..cd9233e700328835f0e1d4d32b8ed9671115f63f 100644
--- a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
+++ b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
@@ -282,7 +282,7 @@ public class EnderMan extends Monster implements NeutralMob {

Datei anzeigen

@ -27,10 +27,10 @@ index 7dbd03897bf98ef19509972fb8d09aa071d7de3a..0129a469d991225a0cef281e0e0eeb06
+ }
}
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 9769977c9db77aa52b99b793ca4f5d0c7b54528f..eb6981ca27d27946c748047660ced880c4dea01a 100644
index 5ee25084459f4cfcc8a95001a9d480e4a235f9f0..d2ecaf71e52123d5a015d49049d2a8e5b7332e97 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1991,6 +1991,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -2069,6 +2069,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
public void onTickingEnd(Entity entity) {
ServerLevel.this.entityTickList.remove(entity);
@ -44,7 +44,7 @@ index 9769977c9db77aa52b99b793ca4f5d0c7b54528f..eb6981ca27d27946c748047660ced880
public void onTrackingStart(Entity entity) {
diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
index 1c3ae7c61c06f486e50e57f434b9f360c6cf55be..bdefda914a7f93b8393a06f112ea9239d9685d51 100644
index cf8498165065c7db1be9cf7de492c1a41817cbf1..5cb04230e22e7e9463d4e89792fca569970e10b7 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
@@ -88,6 +88,7 @@ public abstract class Projectile extends Entity {

Datei anzeigen

@ -10,10 +10,10 @@ Adds an option to control the force mode of the particle.
This adds a new Builder API which is much friendlier to use.
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index eb6981ca27d27946c748047660ced880c4dea01a..3cb4a84a08cbf76e39da5f25fea490c26c77a289 100644
index d2ecaf71e52123d5a015d49049d2a8e5b7332e97..abbb28560e1a4c1175ea431d55f903f2b5241830 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1390,12 +1390,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -1482,12 +1482,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
}
public <T extends ParticleOptions> int sendParticles(ServerPlayer sender, T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6, boolean force) {
@ -34,10 +34,10 @@ index eb6981ca27d27946c748047660ced880c4dea01a..3cb4a84a08cbf76e39da5f25fea490c2
if (this.sendParticles(entityplayer, force, d0, d1, d2, packetplayoutworldparticles)) { // CraftBukkit
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 982b6dabf2aa8ac79596a235ffff1be948492b72..4a83fa80d11a5ef840cd556f845b4de84b3ad5f1 100644
index 40fc1c194dbb0d9d407204acf7ca84a65f2814c0..d0835690571063ee40f05f897a526c3bffd6274b 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1813,11 +1813,17 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -1814,11 +1814,17 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override
public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force) {

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Prevent Frosted Ice from loading/holding chunks
1.17: Shouldn't be needed as blocks no longer tick without at least 1 radius chunk loaded.
diff --git a/src/main/java/net/minecraft/world/level/block/FrostedIceBlock.java b/src/main/java/net/minecraft/world/level/block/FrostedIceBlock.java
index 48776edab1479b5e861eca8146da04ebee01c46a..4f27969196fe21b38e81d070fe5c0a999dd320dc 100644
index d2de8192cbdae37fc7baaef998254bd82485fc72..3d4658bdc0616e4d8c26e496158063a515181847 100644
--- a/src/main/java/net/minecraft/world/level/block/FrostedIceBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/FrostedIceBlock.java
@@ -38,7 +38,8 @@ public class FrostedIceBlock extends IceBlock {

Datei anzeigen

@ -8,7 +8,7 @@ Allow control over whether or not an enderman aggros a player.
This allows you to override/extend the pumpkin/stare logic.
diff --git a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
index 47f745bb54ab53674f371cb9dfc580fdb770541c..102cab5a2104d32440ad489847bb7a443beead51 100644
index cd9233e700328835f0e1d4d32b8ed9671115f63f..78a8e5905759d975bb4941b5416fb95ea8c74df5 100644
--- a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
+++ b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
@@ -225,7 +225,15 @@ public class EnderMan extends Monster implements NeutralMob {