mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-01 20:52:12 -07:00
Refactor Anti-Xray and make some fixes to it (#5938)
This commit is contained in:
@@ -52,7 +52,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
- private final LevelChunkSection[] sections;
|
- private final LevelChunkSection[] sections;
|
||||||
+ private LevelChunkSection[] sections; // Paper - remove final
|
+ private LevelChunkSection[] sections; // Paper - remove final
|
||||||
private Set<BlockPos> tiles;
|
private Set<BlockPos> tiles;
|
||||||
private World world; // Paper - Anti-Xray - Add world
|
private World world; // Paper - Anti-Xray - Add parameters
|
||||||
|
|
||||||
@@ -0,0 +0,0 @@ public final class CraftChunkData implements ChunkGenerator.ChunkData {
|
@@ -0,0 +0,0 @@ public final class CraftChunkData implements ChunkGenerator.ChunkData {
|
||||||
return this.sections;
|
return this.sections;
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -35,7 +35,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ //this.lock.release(); // Paper - disable this
|
+ //this.lock.release(); // Paper - disable this
|
||||||
}
|
}
|
||||||
|
|
||||||
// Paper start - Anti-Xray - Add predefined objects
|
// Paper start - Anti-Xray - Add preset values
|
||||||
@@ -0,0 +0,0 @@ public class PalettedContainer<T> implements PaletteResize<T> {
|
@@ -0,0 +0,0 @@ public class PalettedContainer<T> implements PaletteResize<T> {
|
||||||
return this.palette.idFor(objectAdded);
|
return this.palette.idFor(objectAdded);
|
||||||
}
|
}
|
||||||
@@ -64,9 +64,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
this.acquire();
|
this.acquire();
|
||||||
int i = buf.readByte();
|
int i = buf.readByte();
|
||||||
@@ -0,0 +0,0 @@ public class PalettedContainer<T> implements PaletteResize<T> {
|
@@ -0,0 +0,0 @@ public class PalettedContainer<T> implements PaletteResize<T> {
|
||||||
@Deprecated public void write(FriendlyByteBuf buf) {
|
|
||||||
write(buf, null, 0);
|
// Paper start - Anti-Xray - Add chunk packet info
|
||||||
}
|
@Deprecated public void write(FriendlyByteBuf buf) { write(buf, null, 0); } // Notice for updates: Please make sure this method isn't used anywhere
|
||||||
- public void write(FriendlyByteBuf buf, com.destroystokyo.paper.antixray.ChunkPacketInfo<T> chunkPacketInfo, int bottomBlockY) {
|
- public void write(FriendlyByteBuf buf, com.destroystokyo.paper.antixray.ChunkPacketInfo<T> chunkPacketInfo, int bottomBlockY) {
|
||||||
+ public synchronized void write(FriendlyByteBuf buf, com.destroystokyo.paper.antixray.ChunkPacketInfo<T> chunkPacketInfo, int bottomBlockY) { // Paper - synchronize
|
+ public synchronized void write(FriendlyByteBuf buf, com.destroystokyo.paper.antixray.ChunkPacketInfo<T> chunkPacketInfo, int bottomBlockY) { // Paper - synchronize
|
||||||
// Paper end
|
// Paper end
|
||||||
@@ -80,7 +80,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ public synchronized void read(ListTag paletteNbt, long[] data) { // Paper - synchronize
|
+ public synchronized void read(ListTag paletteNbt, long[] data) { // Paper - synchronize
|
||||||
try {
|
try {
|
||||||
this.acquire();
|
this.acquire();
|
||||||
// Paper - Anti-Xray - TODO: Should this.predefinedObjects.length just be added here (faster) or should the contents be compared to calculate the size (less RAM)?
|
// Paper - Anti-Xray - TODO: Should this.presetValues.length just be added here (faster) or should the contents be compared to calculate the size (less RAM)?
|
||||||
@@ -0,0 +0,0 @@ public class PalettedContainer<T> implements PaletteResize<T> {
|
@@ -0,0 +0,0 @@ public class PalettedContainer<T> implements PaletteResize<T> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user