mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-25 12:05:53 +01:00
even more patches
This commit is contained in:
parent
18ad44eabc
commit
5cfc0781d6
@ -8,10 +8,10 @@ the updates per world, so that we can re-use the same packet
|
||||
object for every player unless they have per-player time enabled.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 7cc7918628937dcc14538fe4784bfd6fa068e393..e7fefa95597d4c7388052731a79b8c7c55d2a766 100644
|
||||
index 19e7488055447d3bc402150c6686f96dfd592ac2..76923773118ac2f152ba7b3a0bb5d0e71d95533c 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1408,12 +1408,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1390,12 +1390,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
MinecraftTimings.timeUpdateTimer.startTiming(); // Spigot // Paper
|
||||
// Send time updates to everyone, it will get the right time from the world the player is in.
|
@ -6,10 +6,10 @@ Subject: [PATCH] Use Vanilla Minecart Speeds
|
||||
CraftBukkit changed the values on flying speed, restore back to vanilla
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
|
||||
index 1963a47d8b5471aadc6a054854025e270da15f8b..fa889f93a5c6782957bdbf803915cb5e80e05f3e 100644
|
||||
index 9fcb27ca1b1290c096fb41ad457db716330d11e3..6f9cbba0c063b272afd6aacc3eab02df405b3061 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
|
||||
@@ -105,9 +105,9 @@ public abstract class AbstractMinecart extends Entity {
|
||||
@@ -104,9 +104,9 @@ public abstract class AbstractMinecart extends Entity {
|
||||
private double derailedX = 0.5;
|
||||
private double derailedY = 0.5;
|
||||
private double derailedZ = 0.5;
|
@ -6,7 +6,7 @@ Subject: [PATCH] Fix SpongeAbsortEvent handling
|
||||
Only process drops when the block is actually going to be removed
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/SpongeBlock.java b/src/main/java/net/minecraft/world/level/block/SpongeBlock.java
|
||||
index b8ae2000a44469245c6ba3cda0c0e87b07156b06..1ef8eadd4e59f2e5d2bbd84f6f9bcf37b59db5bd 100644
|
||||
index efa9281278533cd9ced60ffd2c1b2d373d370e7b..842997ea9f25a05d74a2e8300e44cc39a7e9cd96 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/SpongeBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/SpongeBlock.java
|
||||
@@ -130,8 +130,11 @@ public class SpongeBlock extends Block {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Don't allow digging into unloaded chunks
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
index 315dad4789f5f2582ee9b4fc176affd1f57537ef..6219634a57976a6a0a9b32ed08d56107d6b5d1c3 100644
|
||||
index 1d1f355a49e2324902feee10c1717fd772e359c6..44e5ab0b545de41b937c7ce304ce643f78a43734 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
@@ -119,8 +119,8 @@ public class ServerPlayerGameMode {
|
||||
@@ -118,8 +118,8 @@ public class ServerPlayerGameMode {
|
||||
BlockState iblockdata;
|
||||
|
||||
if (this.hasDelayedDestroy) {
|
||||
@ -19,7 +19,7 @@ index 315dad4789f5f2582ee9b4fc176affd1f57537ef..6219634a57976a6a0a9b32ed08d56107
|
||||
this.hasDelayedDestroy = false;
|
||||
} else {
|
||||
float f = this.incrementDestroyProgress(iblockdata, this.delayedDestroyPos, this.delayedTickStart);
|
||||
@@ -131,7 +131,13 @@ public class ServerPlayerGameMode {
|
||||
@@ -130,7 +130,13 @@ public class ServerPlayerGameMode {
|
||||
}
|
||||
}
|
||||
} else if (this.isDestroyingBlock) {
|
||||
@ -34,7 +34,7 @@ index 315dad4789f5f2582ee9b4fc176affd1f57537ef..6219634a57976a6a0a9b32ed08d56107
|
||||
if (iblockdata.isAir()) {
|
||||
this.level.destroyBlockProgress(this.player.getId(), this.destroyPos, -1);
|
||||
this.lastSentState = -1;
|
||||
@@ -163,6 +169,7 @@ public class ServerPlayerGameMode {
|
||||
@@ -162,6 +168,7 @@ public class ServerPlayerGameMode {
|
||||
double d3 = d0 * d0 + d1 * d1 + d2 * d2;
|
||||
|
||||
if (d3 > 36.0D) {
|
||||
@ -42,7 +42,7 @@ index 315dad4789f5f2582ee9b4fc176affd1f57537ef..6219634a57976a6a0a9b32ed08d56107
|
||||
this.player.connection.send(new ClientboundBlockBreakAckPacket(pos, this.level.getBlockState(pos), action, false, "too far"));
|
||||
} else if (pos.getY() >= worldHeight) {
|
||||
this.player.connection.send(new ClientboundBlockBreakAckPacket(pos, this.level.getBlockState(pos), action, false, "too high"));
|
||||
@@ -295,10 +302,12 @@ public class ServerPlayerGameMode {
|
||||
@@ -294,10 +301,12 @@ public class ServerPlayerGameMode {
|
||||
this.player.connection.send(new ClientboundBlockBreakAckPacket(pos, this.level.getBlockState(pos), action, true, "stopped destroying"));
|
||||
} else if (action == ServerboundPlayerActionPacket.Action.ABORT_DESTROY_BLOCK) {
|
||||
this.isDestroyingBlock = false;
|
||||
@ -59,10 +59,10 @@ index 315dad4789f5f2582ee9b4fc176affd1f57537ef..6219634a57976a6a0a9b32ed08d56107
|
||||
|
||||
this.level.destroyBlockProgress(this.player.getId(), pos, -1);
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 38a48add445e8dd6888bc5bb22e7bf5482682536..a615821cf605208c61be27f8bd026437b799de14 100644
|
||||
index 26ca0db447a76c3028dacf96bf9afd3b735bda74..25ec1613f4c9ecc59ec5e27717ff7de9ad9e4398 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1544,7 +1544,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1550,7 +1550,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
case START_DESTROY_BLOCK:
|
||||
case ABORT_DESTROY_BLOCK:
|
||||
case STOP_DESTROY_BLOCK:
|
@ -42,10 +42,10 @@ index 1015fcc6c77bd64c3f3cbf234e85a6602dbfa0d7..769353df1fcdaacecd80085165a1d72f
|
||||
Object val = config.get("settings.save-player-data");
|
||||
if (val instanceof Boolean) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 921128242ba133d73d2ac592a5f4b7515ef2e46c..67eb0b97d6ca74e815140eea7f5262b55f6f8e6e 100644
|
||||
index 41de977650b5b6ebb8120d31f5106342189e4a59..7f20134859f39fc819cc0010b88828f210617c71 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2519,6 +2519,11 @@ public final class CraftServer implements Server {
|
||||
@@ -2531,6 +2531,11 @@ public final class CraftServer implements Server {
|
||||
return com.destroystokyo.paper.PaperConfig.suggestPlayersWhenNullTabCompletions;
|
||||
}
|
||||
|
@ -7,13 +7,13 @@ ray tracing into an unloaded chunk should be treated as a miss
|
||||
this saves a ton of lag for when AI tries to raytrace near unloaded chunks.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/BlockGetter.java b/src/main/java/net/minecraft/world/level/BlockGetter.java
|
||||
index e85e4a2dfceb0aa40e73b43a5e122a5906cac585..fe4dba491b586757a16aa36e62682f364daa2602 100644
|
||||
index 03e0254813b977d0342171a37762fec9629afbad..80fb161de60021e4ddf240376069a4de8f9a7191 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/BlockGetter.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/BlockGetter.java
|
||||
@@ -75,7 +75,15 @@ public interface BlockGetter extends LevelHeightAccessor {
|
||||
|
||||
// CraftBukkit start - moved block handling into separate method for use by Block#rayTrace
|
||||
default BlockHitResult rayTraceBlock(ClipContext raytrace1, BlockPos blockposition) {
|
||||
default BlockHitResult clip(ClipContext raytrace1, BlockPos blockposition) {
|
||||
- BlockState iblockdata = this.getBlockState(blockposition);
|
||||
+ // Paper start - Prevent raytrace from loading chunks
|
||||
+ BlockState iblockdata = this.getTypeIfLoaded(blockposition);
|
@ -7,7 +7,7 @@ If a players inventory is too big to send in a single packet,
|
||||
split the inventory set into multiple packets instead.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java
|
||||
index 636ac646bec67dbd933f00614693af03481b6173..3b943894750022aa84de8af97db3eebf71db1afa 100644
|
||||
index 0aacf2e0155a9a7c9dfe9b368a251aee25ed24fc..0b3f1585618e29685ffcba704f03ff5e581f0851 100644
|
||||
--- a/src/main/java/net/minecraft/network/Connection.java
|
||||
+++ b/src/main/java/net/minecraft/network/Connection.java
|
||||
@@ -120,6 +120,15 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
@ -27,11 +27,11 @@ index 636ac646bec67dbd933f00614693af03481b6173..3b943894750022aa84de8af97db3eebf
|
||||
Connection.LOGGER.debug("Skipping packet due to errors", throwable.getCause());
|
||||
} else {
|
||||
diff --git a/src/main/java/net/minecraft/network/PacketEncoder.java b/src/main/java/net/minecraft/network/PacketEncoder.java
|
||||
index 092d8ecf8d6a7045d2fc379bc0f9ec4ee294d056..b039a32b805fc02033fa862a1c40c4a51639e69a 100644
|
||||
index dfeff0da932b0d66b70f3a5dd281c926c048f2f0..9cdcd4d92f73d1b9866cdef33d2463e843462516 100644
|
||||
--- a/src/main/java/net/minecraft/network/PacketEncoder.java
|
||||
+++ b/src/main/java/net/minecraft/network/PacketEncoder.java
|
||||
@@ -54,7 +54,31 @@ public class PacketEncoder extends MessageToByteEncoder<Packet<?>> {
|
||||
throw var9;
|
||||
@@ -57,7 +57,31 @@ public class PacketEncoder extends MessageToByteEncoder<Packet<?>> {
|
||||
throw var10;
|
||||
}
|
||||
}
|
||||
+
|
||||
@ -100,13 +100,13 @@ index 0e076173033278587df2b5dfbd01cc9005651eb5..dbd8b9b09b82c1b75e8be9dc7416d9f0
|
||||
@Override
|
||||
public void write(FriendlyByteBuf buf) {
|
||||
buf.writeByte(this.containerId);
|
||||
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacket.java
|
||||
index 1451a98d69b185dd15a2d1d7681bcecb6a4f99c1..96626835fee3c0fdb452acacdc9f737ad90c08de 100644
|
||||
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacket.java
|
||||
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacket.java
|
||||
@@ -64,7 +64,7 @@ public class ClientboundLevelChunkPacket implements Packet<ClientGamePacketListe
|
||||
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java
|
||||
index 108c5d7fedc125108ca97ce125520b64a083ccd4..4ed3b1291ac443502e9b99f83ecf02b22509451c 100644
|
||||
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java
|
||||
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java
|
||||
@@ -50,7 +50,7 @@ public class ClientboundLevelChunkPacketData {
|
||||
throw new RuntimeException("Can't read heightmap in packet for [" + x + ", " + z + "]");
|
||||
} else {
|
||||
this.biomes = buf.readVarIntArray(ChunkBiomeContainer.MAX_SIZE);
|
||||
int i = buf.readVarInt();
|
||||
- if (i > 2097152) {
|
||||
+ if (i > 2097152) { // Paper - diff on change - if this changes, update PacketEncoder
|
1
todo.txt
1
todo.txt
@ -3,3 +3,4 @@ Check IBlockDataList#GLOBAL_PALETTE
|
||||
Check if PlayerNaturallySpawnedEvent is called correctly
|
||||
Make sure fluids aren't completly fucked, there may be more sync loads to nuke there as well
|
||||
Improve Server Thread Pool and Thread Priorities: mojang added a max thread count property
|
||||
Use Vanilla Minecart Speeds: is this needed?
|
||||
|
Loading…
Reference in New Issue
Block a user