Compare commits
23 Commits
build-178
...
feat/async
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7278888017 | ||
|
|
d1a9c55403 | ||
|
|
29fabdd8f3 | ||
|
|
ae1f11a394 | ||
|
|
b45f3843c2 | ||
|
|
8e31fc9945 | ||
|
|
ccd629843c | ||
|
|
ada5265608 | ||
|
|
f508c9cd84 | ||
|
|
e6c765ef71 | ||
|
|
cb1b2a78ac | ||
|
|
ad43ef6000 | ||
|
|
eb571af123 | ||
|
|
9925aa59c7 | ||
|
|
2dc38b4f88 | ||
|
|
4401555131 | ||
|
|
6da53043d4 | ||
|
|
ea1493dd8f | ||
|
|
e18e9091fb | ||
|
|
40d552627b | ||
|
|
6b0aab7b0b | ||
|
|
3ca4adc05e | ||
|
|
5df1740ff7 |
@@ -2,7 +2,7 @@ group = dev.kaiijumc.kaiiju
|
||||
version = 1.20.1-R0.1-SNAPSHOT
|
||||
mcVersion = 1.20.1
|
||||
|
||||
foliaRef = bd96e299d4fd3cc5887e537ae1c889a4247dcf81
|
||||
foliaRef = daacd4255022f3a1bf74dd3e84f751be838678ac
|
||||
|
||||
org.gradle.caching=true
|
||||
org.gradle.parallel=true
|
||||
|
||||
@@ -22,7 +22,7 @@ index ab08e11f13921163b8ff1ff51ff9e9b86d2b47c7..b42a3466f145a92608c8746fd4beb529
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 3c5b412ac6b09c667b05d9c44f341d4e8506c4cc..797e404a0963c1c91c17611c42b96a36a89e9c1d 100644
|
||||
index b2feaea169fa9d3977c3dfdfdf3dea9283f5d854..1ab0d3e0653028b7d93177c28c1f532d8b10b1b1 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -263,6 +263,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -54,7 +54,7 @@ index 3c5b412ac6b09c667b05d9c44f341d4e8506c4cc..797e404a0963c1c91c17611c42b96a36
|
||||
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
|
||||
@@ -3515,6 +3530,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3523,6 +3538,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
@Override
|
||||
public void handleKeepAlive(ServerboundKeepAlivePacket packet) {
|
||||
|
||||
@@ -22,10 +22,10 @@ index 816db23fa64aab69e3034484c00645ebd0479978..7c6c74f95c2534624a928ccf6b0a4b9d
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 13f03fed1e353fc57062f7084958c6f1cbf9ea6e..a73f2d85caad3639def29c4289dbe941acb2fd2f 100644
|
||||
index 0c50b516d0ff1c2812a877b57148f01861f8027f..b971f35b69a930dddcf603207f524dc95e09f0fd 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3939,6 +3939,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3943,6 +3943,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
|
||||
protected boolean tryEndPortal() {
|
||||
io.papermc.paper.util.TickThread.ensureTickThread(this, "Cannot portal entity async");
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Vanilla end portal teleportation
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index a73f2d85caad3639def29c4289dbe941acb2fd2f..ea246b52b913b40a7d359eb3656b09cca14538a3 100644
|
||||
index b971f35b69a930dddcf603207f524dc95e09f0fd..135573308662845ecc73fde1c620345e1f372538 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -4027,10 +4027,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -4031,10 +4031,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
(chunks) -> {
|
||||
ServerLevel.makeObsidianPlatform(destination, null, targetPos);
|
||||
|
||||
|
||||
@@ -22,10 +22,10 @@ index b23f2df433d7ebc871f4009081c28ed9054d91c7..ec71f3f52cb8f7931aabd94619d2e7a2
|
||||
|
||||
public static String serverModName = "Kaiiju";
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 797e404a0963c1c91c17611c42b96a36a89e9c1d..c261a6c566eb24ded856a8db57623dd77339d003 100644
|
||||
index 1ab0d3e0653028b7d93177c28c1f532d8b10b1b1..86e14f3d853d6134b7d7b3770107529de8ac2c91 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2648,6 +2648,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2656,6 +2656,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
|
||||
if (this.player.isImmobile()) return; // CraftBukkit
|
||||
this.player.resetLastActionTime();
|
||||
@@ -33,7 +33,7 @@ index 797e404a0963c1c91c17611c42b96a36a89e9c1d..c261a6c566eb24ded856a8db57623dd7
|
||||
// CraftBukkit start - Raytrace to look for 'rogue armswings'
|
||||
float f1 = this.player.getXRot();
|
||||
float f2 = this.player.getYRot();
|
||||
@@ -2670,6 +2671,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2678,6 +2679,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
if (event.isCancelled()) return;
|
||||
// CraftBukkit end
|
||||
|
||||
@@ -6,11 +6,30 @@ Subject: [PATCH] Teleport async if we cannot move entity off-main
|
||||
Entities with huge velocity (100k+ velocity anarchy travel exploit) might disappear / crash the server because they travel a region each tick.
|
||||
TODO: Entities with huge velocity still throw stacktraces because they are ticked in "null" regions.
|
||||
|
||||
diff --git a/src/main/java/dev/kaiijumc/kaiiju/KaiijuWorldConfig.java b/src/main/java/dev/kaiijumc/kaiiju/KaiijuWorldConfig.java
|
||||
index e2fb7d7a7b3126d386b46442c115085d1974ac4e..44f5540a6a5733cf6f10f6b04fc9611ac4e53685 100644
|
||||
--- a/src/main/java/dev/kaiijumc/kaiiju/KaiijuWorldConfig.java
|
||||
+++ b/src/main/java/dev/kaiijumc/kaiiju/KaiijuWorldConfig.java
|
||||
@@ -169,6 +169,7 @@ public class KaiijuWorldConfig {
|
||||
public boolean fixTripWireStateInconsistency = true;
|
||||
public boolean safeTeleporting = true;
|
||||
public boolean sandDuplication = false;
|
||||
+ public boolean teleportAsyncOnHighVelocity = false;
|
||||
|
||||
private void gameplaySettings() {
|
||||
fixVoidTrading = getBoolean("gameplay.fix-void-trading", fixVoidTrading);
|
||||
@@ -176,5 +177,6 @@ public class KaiijuWorldConfig {
|
||||
fixTripWireStateInconsistency = getBoolean("gameplay.fix-tripwire-state-inconsistency", fixTripWireStateInconsistency);
|
||||
safeTeleporting = getBoolean("gameplay.safe-teleportation", safeTeleporting);
|
||||
sandDuplication = getBoolean("gameplay.sand-duplication", sandDuplication);
|
||||
+ teleportAsyncOnHighVelocity = getBoolean("gameplay.teleport-async-on-high-velocity", teleportAsyncOnHighVelocity);
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index ea246b52b913b40a7d359eb3656b09cca14538a3..ea260c79cbc35829a7213630886abc085c63040f 100644
|
||||
index 135573308662845ecc73fde1c620345e1f372538..812b2c216003b8decedef1353acab1b44d146e08 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1126,7 +1126,18 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -1126,7 +1126,20 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,18 +37,20 @@ index ea246b52b913b40a7d359eb3656b09cca14538a3..ea260c79cbc35829a7213630886abc08
|
||||
this.setPos(this.getX() + vec3d1.x, this.getY() + vec3d1.y, this.getZ() + vec3d1.z);
|
||||
+ // Kaiiju start - Teleport async if we cannot move entity off-main
|
||||
+ } catch (IllegalStateException e) {
|
||||
+ if (this.level().kaiijuConfig.teleportAsyncOnHighVelocity)
|
||||
+ this.teleportAsync((ServerLevel) this.level(), this.position().add(vec3d1),
|
||||
+ this.getYRot(), this.getXRot(),
|
||||
+ Vec3.ZERO, PlayerTeleportEvent.TeleportCause.UNKNOWN,
|
||||
+ null, PlayerTeleportEvent.TeleportCause.UNKNOWN,
|
||||
+ Entity.TELEPORT_FLAG_LOAD_CHUNK | Entity.TELEPORT_FLAG_TELEPORT_PASSENGERS,
|
||||
+ null
|
||||
+ );
|
||||
+ else LOGGER.error("High velocity entity caused off-main setPos: ", e);
|
||||
+ }
|
||||
+ // Kaiiju end
|
||||
}
|
||||
|
||||
this.level().getProfiler().pop();
|
||||
@@ -3864,13 +3875,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3868,13 +3881,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
// check for same region
|
||||
if (destination == this.level()) {
|
||||
Vec3 currPos = this.position();
|
||||
|
||||
1286
patches/server/0043-Async-path-processing.patch
Normal file
1286
patches/server/0043-Async-path-processing.patch
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user