mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 08:27:43 +01:00
Fix paper's anti-xray with temp workaround
This commit is contained in:
40
patches/server/0272-Fix-paper-s-anti-xray.patch
Normal file
40
patches/server/0272-Fix-paper-s-anti-xray.patch
Normal file
@@ -0,0 +1,40 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <Blake.Galbreath@Gmail.com>
|
||||
Date: Tue, 1 Mar 2022 19:35:53 -0600
|
||||
Subject: [PATCH] Fix paper's anti-xray
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index e149cca91f87645d1479156d0ff40b8b6527fefc..d363c3f6d4813effcc984fe13e563b6198458d65 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -499,6 +499,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
this.dragonParts = new Int2ObjectOpenHashMap();
|
||||
this.tickTime = flag1;
|
||||
this.server = minecraftserver;
|
||||
+ this.chunkPacketBlockController = this.paperConfig.antiXray ? new com.destroystokyo.paper.antixray.ChunkPacketBlockControllerAntiXray(this, executor) : com.destroystokyo.paper.antixray.ChunkPacketBlockController.NO_OPERATION_INSTANCE; // Paper - Anti-Xray // Purpur moved from Level.<init> (until paper fixes this)
|
||||
// Purpur start - enable/disable MobSpawners per world
|
||||
this.customSpawners = Lists.newArrayList();
|
||||
if (purpurConfig.phantomSpawning) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index bdd9282783382a2e6ad525ca27f1be88be4ca3c1..06b9b05b432809e64e41ca71516182e36248a7c7 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -162,7 +162,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
public final org.spigotmc.SpigotWorldConfig spigotConfig; // Spigot
|
||||
|
||||
public final com.destroystokyo.paper.PaperWorldConfig paperConfig; // Paper
|
||||
- public final com.destroystokyo.paper.antixray.ChunkPacketBlockController chunkPacketBlockController; // Paper - Anti-Xray
|
||||
+ public com.destroystokyo.paper.antixray.ChunkPacketBlockController chunkPacketBlockController; // Paper - Anti-Xray // Purpur - make non-final (until paper fixes this)
|
||||
|
||||
public final org.purpurmc.purpur.PurpurWorldConfig purpurConfig; // Purpur
|
||||
|
||||
@@ -403,7 +403,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
this.keepSpawnInMemory = this.paperConfig.keepSpawnInMemory; // Paper
|
||||
this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime);
|
||||
this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime);
|
||||
- this.chunkPacketBlockController = this.paperConfig.antiXray ? new com.destroystokyo.paper.antixray.ChunkPacketBlockControllerAntiXray(this, executor) : com.destroystokyo.paper.antixray.ChunkPacketBlockController.NO_OPERATION_INSTANCE; // Paper - Anti-Xray
|
||||
+ //this.chunkPacketBlockController = this.paperConfig.antiXray ? new com.destroystokyo.paper.antixray.ChunkPacketBlockControllerAntiXray(this, executor) : com.destroystokyo.paper.antixray.ChunkPacketBlockController.NO_OPERATION_INSTANCE; // Paper - Anti-Xray // Purpur - moved to ServerLevel.<init> (until paper fixes this)
|
||||
this.entitySliceManager = new io.papermc.paper.world.EntitySliceManager((ServerLevel)this); // Paper
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user