mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 23:10:16 +01:00
Some fixes
This commit is contained in:
parent
273ced9170
commit
9c973e84bc
4 changed files with 27 additions and 18 deletions
|
@ -101,6 +101,7 @@ public net.minecraft.server.level.ServerPlayer seenCredits
|
|||
public net.minecraft.server.level.ServerPlayer triggerDimensionChangeTriggers(Lnet/minecraft/server/level/ServerLevel;)V
|
||||
public net.minecraft.server.level.ServerPlayer wardenSpawnTracker
|
||||
public net.minecraft.server.level.ServerPlayer$RespawnPosAngle
|
||||
public net.minecraft.server.level.ServerPlayerGameMode level
|
||||
public net.minecraft.server.level.Ticket key
|
||||
public net.minecraft.server.network.ServerGamePacketListenerImpl isChatMessageIllegal(Ljava/lang/String;)Z
|
||||
public net.minecraft.server.network.ServerLoginPacketListenerImpl connection
|
||||
|
|
|
@ -120,25 +120,28 @@ index 5d1943d37dfad0c12e77179f0866851532d983e9..3aea76690bc3e35758d3bf274777130a
|
|||
}
|
||||
|
||||
diff --git a/net/minecraft/network/protocol/game/ClientboundLevelChunkWithLightPacket.java b/net/minecraft/network/protocol/game/ClientboundLevelChunkWithLightPacket.java
|
||||
index aadf2dccb996e422cacf8bb510cc642e69ee4972..d2d21fe8d7275b01454e09be252d7dd7710cdc2d 100644
|
||||
index 3a384175f8e7f204234bbaf3081bdc20c47a0d4b..5699bc15eba92e22433a20cb8326b59f2ebd3036 100644
|
||||
--- a/net/minecraft/network/protocol/game/ClientboundLevelChunkWithLightPacket.java
|
||||
+++ b/net/minecraft/network/protocol/game/ClientboundLevelChunkWithLightPacket.java
|
||||
@@ -18,13 +18,31 @@ public class ClientboundLevelChunkWithLightPacket implements Packet<ClientGamePa
|
||||
@@ -18,18 +18,31 @@ public class ClientboundLevelChunkWithLightPacket implements Packet<ClientGamePa
|
||||
private final int z;
|
||||
private final ClientboundLevelChunkPacketData chunkData;
|
||||
private final ClientboundLightUpdatePacketData lightData;
|
||||
- // Paper start - Anti-Xray
|
||||
+ // Paper start - Async-Anti-Xray - Ready flag for the connection, add chunk packet info
|
||||
+ private volatile boolean ready;
|
||||
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isReady() {
|
||||
+ return this.ready;
|
||||
+ }
|
||||
+
|
||||
+ public void setReady(boolean ready) {
|
||||
public void setReady(final boolean ready) {
|
||||
- // Empty hook, updated by feature patch
|
||||
+ this.ready = ready;
|
||||
+ }
|
||||
+
|
||||
}
|
||||
- // Paper end - Anti-Xray
|
||||
|
||||
+ @Deprecated @io.papermc.paper.annotation.DoNotUse
|
||||
public ClientboundLevelChunkWithLightPacket(LevelChunk chunk, LevelLightEngine lightEngine, @Nullable BitSet skyLight, @Nullable BitSet blockLight) {
|
||||
+ this(chunk, lightEngine, skyLight, blockLight, true);
|
||||
|
@ -170,18 +173,9 @@ index a4b523ac1926895ccc87464892fa81753ae8f73c..ca9427a7eae9a66f4f1ccedda7b1def7
|
|||
this.levelStorageAccess = levelStorageAccess;
|
||||
this.uuid = org.bukkit.craftbukkit.util.WorldUUID.getUUID(levelStorageAccess.levelDirectory.path().toFile());
|
||||
diff --git a/net/minecraft/server/level/ServerPlayerGameMode.java b/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
index d6a493de667bfe97b722efe40d1530bdb666bb94..bb352ad40da33a9d411836d4fab2664e226a6e38 100644
|
||||
index 732a4f20bade67c57a4f85142849752b72e349ee..6176f0738aa1a18df5d7d4d49fd6961e3f2eb736 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
@@ -28,7 +28,7 @@ import org.slf4j.Logger;
|
||||
|
||||
public class ServerPlayerGameMode {
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
- protected ServerLevel level;
|
||||
+ public ServerLevel level; // Paper - Anti-Xray - protected -> public
|
||||
protected final ServerPlayer player;
|
||||
private GameType gameModeForPlayer = GameType.DEFAULT_MODE;
|
||||
@Nullable
|
||||
@@ -312,6 +312,7 @@ public class ServerPlayerGameMode {
|
||||
org.bukkit.craftbukkit.event.CraftEventFactory.callBlockDamageAbortEvent(this.player, pos, this.player.getInventory().getSelected()); // CraftBukkit
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ index e99836c4073d8b25eddd3b4c784dbdb1f0c4f2b1..a2d788a656b2a5767c8a00bbcaca16ef
|
|||
|
||||
// Paper end - Mob Goal API
|
||||
diff --git a/net/minecraft/world/entity/ai/goal/GoalSelector.java b/net/minecraft/world/entity/ai/goal/GoalSelector.java
|
||||
index eeba224bd575451ba6023df65ef9d9b97f7f1c71..0846ad1f26ee73d72c77b53579a00c321d696b73 100644
|
||||
index eeba224bd575451ba6023df65ef9d9b97f7f1c71..20f0c1a444f40b28fe4de9ebc9eb40243c1f22a0 100644
|
||||
--- a/net/minecraft/world/entity/ai/goal/GoalSelector.java
|
||||
+++ b/net/minecraft/world/entity/ai/goal/GoalSelector.java
|
||||
@@ -24,7 +24,8 @@ public class GoalSelector {
|
||||
|
@ -96,7 +96,7 @@ index eeba224bd575451ba6023df65ef9d9b97f7f1c71..0846ad1f26ee73d72c77b53579a00c32
|
|||
- return false;
|
||||
+ // Paper start - Perf: optimize goal types
|
||||
+ private static boolean goalContainsAnyFlags(WrappedGoal goal, ca.spottedleaf.moonrise.common.set.OptimizedSmallEnumSet<Goal.Flag> flags) {
|
||||
+ return goal.getFlags().hasCommonElements(controls);
|
||||
+ return goal.getFlags().hasCommonElements(flags);
|
||||
}
|
||||
|
||||
private static boolean goalCanBeReplacedForAllFlags(WrappedGoal goal, Map<Goal.Flag, WrappedGoal> flag) {
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
--- a/net/minecraft/network/protocol/game/ClientboundLevelChunkWithLightPacket.java
|
||||
+++ b/net/minecraft/network/protocol/game/ClientboundLevelChunkWithLightPacket.java
|
||||
@@ -18,6 +_,11 @@
|
||||
private final int z;
|
||||
private final ClientboundLevelChunkPacketData chunkData;
|
||||
private final ClientboundLightUpdatePacketData lightData;
|
||||
+ // Paper start - Anti-Xray
|
||||
+ public void setReady(final boolean ready) {
|
||||
+ // Empty hook, updated by feature patch
|
||||
+ }
|
||||
+ // Paper end - Anti-Xray
|
||||
|
||||
public ClientboundLevelChunkWithLightPacket(LevelChunk chunk, LevelLightEngine lightEngine, @Nullable BitSet skyLight, @Nullable BitSet blockLight) {
|
||||
ChunkPos pos = chunk.getPos();
|
Loading…
Reference in a new issue