13
0
geforkt von Mirrors/Paper

Refactor Anti-Xray and make some fixes to it (#5938)

Dieser Commit ist enthalten in:
stonar96 2021-06-23 10:39:02 +02:00
Ursprung 2c17a86e82
Commit c00618d009
3 geänderte Dateien mit 505 neuen und 538 gelöschten Zeilen

Datei anzeigen

@ -52,7 +52,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- private final LevelChunkSection[] sections;
+ private LevelChunkSection[] sections; // Paper - remove final
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 {
return this.sections;

Datei-Diff unterdrückt, da er zu groß ist Diff laden

Datei anzeigen

@ -35,7 +35,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ //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> {
return this.palette.idFor(objectAdded);
}
@ -64,9 +64,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
this.acquire();
int i = buf.readByte();
@@ -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 synchronized void write(FriendlyByteBuf buf, com.destroystokyo.paper.antixray.ChunkPacketInfo<T> chunkPacketInfo, int bottomBlockY) { // Paper - synchronize
// Paper end
@ -80,7 +80,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ public synchronized void read(ListTag paletteNbt, long[] data) { // Paper - synchronize
try {
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> {
}