Updated Upstream (Paper)
This commit is contained in:
@@ -1786,7 +1786,7 @@ index 5a5ff40df37db9cbd53c584ed26a3ce4888b29c0..ff2862bf1f511196d1e911e2584262ed
|
||||
this.getRandomBlockPosition(j, 0, k, 15, blockposition);
|
||||
int normalY = chunk.getHeight(Heightmap.Types.MOTION_BLOCKING, blockposition.getX() & 15, blockposition.getZ() & 15) + 1;
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 2d8488b9aa088b6d5f0c7e557b8ad0b29bc4cd88..24d48fb4a63c2db19c7f957ad2260415fe1db9fe 100644
|
||||
index d587b2c4e39bce7e098aa9fab361230f72770658..e6e1c46a01961d47a774e34e430c8eacda22d558 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1206,6 +1206,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1797,7 +1797,7 @@ index 2d8488b9aa088b6d5f0c7e557b8ad0b29bc4cd88..24d48fb4a63c2db19c7f957ad2260415
|
||||
// Paper start
|
||||
if (!this.cserver.isPrimaryThread()) {
|
||||
List<String> pageList = packet.getPages();
|
||||
@@ -2346,6 +2347,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2347,6 +2348,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
|
||||
private boolean updateChatOrder(Instant timestamp) {
|
||||
|
||||
@@ -3026,7 +3026,7 @@ index 877498729c66de9aa6a27c9148f7494d7895615c..acd7468ee3c86d3456e96e4ec3d7e6a4
|
||||
Util.logAndPauseIfInIde("Detected setBlock in a far chunk [" + i + ", " + j + "], pos: " + pos + ", status: " + this.generatingStatus + (this.currentlyGenerating == null ? "" : ", currently generating: " + (String) this.currentlyGenerating.get()));
|
||||
hasSetFarWarned = true;
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 24d48fb4a63c2db19c7f957ad2260415fe1db9fe..ae3c1bd67c144fe971d4df6df2ca171b431b6fc5 100644
|
||||
index e6e1c46a01961d47a774e34e430c8eacda22d558..dd53bc05595c6ea7afff23f11e0f54e90078684f 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -261,6 +261,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3307,7 +3307,7 @@ index 24d48fb4a63c2db19c7f957ad2260415fe1db9fe..ae3c1bd67c144fe971d4df6df2ca171b
|
||||
player.getBukkitEntity().setResourcePackStatus(packStatus);
|
||||
this.cserver.getPluginManager().callEvent(new PlayerResourcePackStatusEvent(this.getCraftPlayer(), packStatus)); // CraftBukkit
|
||||
// Paper end
|
||||
@@ -2353,7 +2444,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2354,7 +2445,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
do {
|
||||
instant1 = (Instant) this.lastChatTimeStamp.get();
|
||||
if (timestamp.isBefore(instant1)) {
|
||||
@@ -3316,7 +3316,7 @@ index 24d48fb4a63c2db19c7f957ad2260415fe1db9fe..ae3c1bd67c144fe971d4df6df2ca171b
|
||||
}
|
||||
} while (!this.lastChatTimeStamp.compareAndSet(instant1, timestamp));
|
||||
|
||||
@@ -2490,7 +2581,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2491,7 +2582,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
}
|
||||
// Paper End
|
||||
@@ -3325,7 +3325,7 @@ index 24d48fb4a63c2db19c7f957ad2260415fe1db9fe..ae3c1bd67c144fe971d4df6df2ca171b
|
||||
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
|
||||
this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s);
|
||||
|
||||
@@ -2500,7 +2591,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2501,7 +2592,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
this.cserver.getPluginManager().callEvent(event);
|
||||
|
||||
if (event.isCancelled()) {
|
||||
@@ -3334,7 +3334,7 @@ index 24d48fb4a63c2db19c7f957ad2260415fe1db9fe..ae3c1bd67c144fe971d4df6df2ca171b
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2513,7 +2604,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2514,7 +2605,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
java.util.logging.Logger.getLogger(ServerGamePacketListenerImpl.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
||||
return;
|
||||
} finally {
|
||||
@@ -3343,7 +3343,7 @@ index 24d48fb4a63c2db19c7f957ad2260415fe1db9fe..ae3c1bd67c144fe971d4df6df2ca171b
|
||||
}
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -2779,6 +2870,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2780,6 +2871,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
AABB axisalignedbb = entity.getBoundingBox();
|
||||
|
||||
if (axisalignedbb.distanceToSqr(this.player.getEyePosition()) < ServerGamePacketListenerImpl.MAX_INTERACTION_DISTANCE) {
|
||||
@@ -3351,7 +3351,7 @@ index 24d48fb4a63c2db19c7f957ad2260415fe1db9fe..ae3c1bd67c144fe971d4df6df2ca171b
|
||||
packet.dispatch(new ServerboundInteractPacket.Handler() {
|
||||
private void performInteraction(InteractionHand enumhand, ServerGamePacketListenerImpl.EntityInteraction playerconnection_a, PlayerInteractEntityEvent event) { // CraftBukkit
|
||||
ItemStack itemstack = ServerGamePacketListenerImpl.this.player.getItemInHand(enumhand);
|
||||
@@ -2792,6 +2884,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2793,6 +2885,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
ServerGamePacketListenerImpl.this.cserver.getPluginManager().callEvent(event);
|
||||
|
||||
@@ -3360,7 +3360,7 @@ index 24d48fb4a63c2db19c7f957ad2260415fe1db9fe..ae3c1bd67c144fe971d4df6df2ca171b
|
||||
// Entity in bucket - SPIGOT-4048 and SPIGOT-6859a
|
||||
if ((entity instanceof Bucketable && entity instanceof LivingEntity && origItem != null && origItem.asItem() == Items.WATER_BUCKET) && (event.isCancelled() || ServerGamePacketListenerImpl.this.player.getInventory().getSelected() == null || ServerGamePacketListenerImpl.this.player.getInventory().getSelected().getItem() != origItem)) {
|
||||
entity.getEntityData().resendPossiblyDesyncedEntity(player); // Paper - The entire mob gets deleted, so resend it.
|
||||
@@ -3343,6 +3437,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3344,6 +3438,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3373,7 +3373,7 @@ index 24d48fb4a63c2db19c7f957ad2260415fe1db9fe..ae3c1bd67c144fe971d4df6df2ca171b
|
||||
|
||||
boolean flag1 = packet.getSlotNum() >= 1 && packet.getSlotNum() <= 45;
|
||||
boolean flag2 = itemstack.isEmpty() || itemstack.getDamageValue() >= 0 && itemstack.getCount() <= 64 && !itemstack.isEmpty();
|
||||
@@ -3449,11 +3549,17 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3450,11 +3550,17 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
for (int i = 0; i < signText.size(); ++i) {
|
||||
FilteredText filteredtext = (FilteredText) signText.get(i);
|
||||
|
||||
@@ -3394,7 +3394,7 @@ index 24d48fb4a63c2db19c7f957ad2260415fe1db9fe..ae3c1bd67c144fe971d4df6df2ca171b
|
||||
}
|
||||
SignChangeEvent event = new SignChangeEvent((org.bukkit.craftbukkit.block.CraftBlock) player.getWorld().getBlockAt(x, y, z), this.player.getBukkitEntity(), lines);
|
||||
this.cserver.getPluginManager().callEvent(event);
|
||||
@@ -3475,6 +3581,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3476,6 +3582,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
@Override
|
||||
public void handleKeepAlive(ServerboundKeepAlivePacket packet) {
|
||||
@@ -3411,7 +3411,7 @@ index 24d48fb4a63c2db19c7f957ad2260415fe1db9fe..ae3c1bd67c144fe971d4df6df2ca171b
|
||||
//PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); // CraftBukkit // Paper - This shouldn't be on the main thread
|
||||
if (this.keepAlivePending && packet.getId() == this.keepAliveChallenge) {
|
||||
int i = (int) (Util.getMillis() - this.keepAliveTime);
|
||||
@@ -3525,6 +3641,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3526,6 +3642,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
private static final ResourceLocation CUSTOM_UNREGISTER = new ResourceLocation("unregister");
|
||||
|
||||
private static final ResourceLocation MINECRAFT_BRAND = new ResourceLocation("brand"); // Paper - Brand support
|
||||
@@ -3419,7 +3419,7 @@ index 24d48fb4a63c2db19c7f957ad2260415fe1db9fe..ae3c1bd67c144fe971d4df6df2ca171b
|
||||
|
||||
@Override
|
||||
public void handleCustomPayload(ServerboundCustomPayloadPacket packet) {
|
||||
@@ -3549,6 +3666,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3550,6 +3667,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t unregister custom payload", ex);
|
||||
this.disconnect("Invalid payload UNREGISTER!", org.bukkit.event.player.PlayerKickEvent.Cause.INVALID_PAYLOAD); // Paper - kick event cause
|
||||
}
|
||||
@@ -19072,7 +19072,7 @@ index b91effe91dad2e1aeea0ea31140f7432833b343f..bb628bd3fe8b185f356968697b17e1c4
|
||||
if (!world.addFreshEntity(entitywither, SpawnReason.BUILD_WITHER)) {
|
||||
return;
|
||||
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 2a786c9fd29dc2139cf487fa645cd43345d60167..507b3756238ec3054232b805a9b689be6ea12e25 100644
|
||||
index a3f073066f6e2eea8964461ad2b0409ade202f35..5cd7b4e7065070bf9fcc34b621dba2ccba99a573 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
|
||||
@@ -44,6 +44,7 @@ import net.minecraft.world.level.Level;
|
||||
|
||||
@@ -71,10 +71,10 @@ index efcee39cd7154493de04ca903edbd32b5901b191..a398b71c52817bd68a05613ec037ed6d
|
||||
|
||||
protected boolean convertOldUsers() {
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index dee076d1e6e30f108a79565546182b4751737baa..c18f953950fd2c00a3880fa20c9904a940191666 100644
|
||||
index d40ef5f2961a13572705a0fff8a5e0e9ab6a67bd..b2043528c3cfe1078b5d732cbbea8fbe2f4b5a2c 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2224,10 +2224,19 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2225,10 +2225,19 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
@Override
|
||||
public void send(Packet<?> packet) {
|
||||
|
||||
Reference in New Issue
Block a user