mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 11:06:29 +01:00
1.13: Readd Anti-Xray (#1366)
* Decompile fixes for ProtoChunk and DataPaletteBlock * Do changes * final change * more changes * First Anti-Xray build * Fixes and cleanups * Cleanups and renamings * Cleanups renamings and move OBFHELPERs to 0004-MC-Utils.patch * Implement obfuscation for newly generated chunks * Implement chunk edge mode * Implement block updates * Cleanups * Rebuild patches
This commit is contained in:
parent
da126a405e
commit
bd232d80da
@ -1,11 +1,11 @@
|
|||||||
From 3d58bb7e7759377a0a59a8cf388372f8918dea2f Mon Sep 17 00:00:00 2001
|
From 6691919def0c0a2eb8baccb043701888ab8b2044 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Wed, 30 Mar 2016 19:36:20 -0400
|
Date: Wed, 30 Mar 2016 19:36:20 -0400
|
||||||
Subject: [PATCH] MC Dev fixes
|
Subject: [PATCH] MC Dev fixes
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
|
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||||
index 002da2a191..9f3aa24590 100644
|
index 002da2a19..9f3aa2459 100644
|
||||||
--- a/src/main/java/net/minecraft/server/BlockPosition.java
|
--- a/src/main/java/net/minecraft/server/BlockPosition.java
|
||||||
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
|
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||||
@@ -150,7 +150,7 @@ public class BlockPosition extends BaseBlockPosition {
|
@@ -150,7 +150,7 @@ public class BlockPosition extends BaseBlockPosition {
|
||||||
@ -59,7 +59,7 @@ index 002da2a191..9f3aa24590 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java
|
diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java
|
||||||
index 650ef14758..35aea4829f 100644
|
index 650ef1475..35aea4829 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkSection.java
|
--- a/src/main/java/net/minecraft/server/ChunkSection.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ChunkSection.java
|
+++ b/src/main/java/net/minecraft/server/ChunkSection.java
|
||||||
@@ -15,7 +15,7 @@ public class ChunkSection {
|
@@ -15,7 +15,7 @@ public class ChunkSection {
|
||||||
@ -71,8 +71,47 @@ index 650ef14758..35aea4829f 100644
|
|||||||
this.emittedLight = new NibbleArray();
|
this.emittedLight = new NibbleArray();
|
||||||
if (flag) {
|
if (flag) {
|
||||||
this.skyLight = new NibbleArray();
|
this.skyLight = new NibbleArray();
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/DataPaletteBlock.java b/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
||||||
|
index 20b1bc1b4..030ec8704 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
||||||
|
@@ -75,14 +75,14 @@ public class DataPaletteBlock<T> implements DataPaletteExpandable<T> {
|
||||||
|
public int onResize(int i, T t0) {
|
||||||
|
this.b();
|
||||||
|
DataBits databits = this.a;
|
||||||
|
- DataPalette datapalette = this.h;
|
||||||
|
+ DataPalette<T> datapalette = this.h; // Paper - decompile fix
|
||||||
|
|
||||||
|
this.b(i);
|
||||||
|
|
||||||
|
int j;
|
||||||
|
|
||||||
|
for (j = 0; j < databits.b(); ++j) {
|
||||||
|
- Object object = datapalette.a(databits.a(j));
|
||||||
|
+ T object = datapalette.a(databits.a(j)); // Paper - decompile fix
|
||||||
|
|
||||||
|
if (object != null) {
|
||||||
|
this.setBlockIndex(j, object);
|
||||||
|
@@ -111,7 +111,7 @@ public class DataPaletteBlock<T> implements DataPaletteExpandable<T> {
|
||||||
|
}
|
||||||
|
|
||||||
|
protected T a(int i) {
|
||||||
|
- Object object = this.h.a(this.a.a(i));
|
||||||
|
+ T object = this.h.a(this.a.a(i)); // Paper - decompile fix
|
||||||
|
|
||||||
|
return object == null ? this.g : object;
|
||||||
|
}
|
||||||
|
@@ -138,7 +138,7 @@ public class DataPaletteBlock<T> implements DataPaletteExpandable<T> {
|
||||||
|
int j = along.length * 64 / 4096;
|
||||||
|
|
||||||
|
if (this.h == this.b) {
|
||||||
|
- DataPaletteHash datapalettehash = new DataPaletteHash(this.d, i, this.c, this.e, this.f);
|
||||||
|
+ DataPaletteHash<T> datapalettehash = new DataPaletteHash<>(this.d, i, this.c, this.e, this.f); // Paper - decompile fix
|
||||||
|
|
||||||
|
datapalettehash.a(nbttaglist);
|
||||||
|
DataBits databits = new DataBits(i, 4096, along);
|
||||||
diff --git a/src/main/java/net/minecraft/server/DedicatedPlayerList.java b/src/main/java/net/minecraft/server/DedicatedPlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/DedicatedPlayerList.java b/src/main/java/net/minecraft/server/DedicatedPlayerList.java
|
||||||
index 4997255c79..a5545bd4c4 100644
|
index 4997255c7..a5545bd4c 100644
|
||||||
--- a/src/main/java/net/minecraft/server/DedicatedPlayerList.java
|
--- a/src/main/java/net/minecraft/server/DedicatedPlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/DedicatedPlayerList.java
|
+++ b/src/main/java/net/minecraft/server/DedicatedPlayerList.java
|
||||||
@@ -135,8 +135,4 @@ public class DedicatedPlayerList extends PlayerList {
|
@@ -135,8 +135,4 @@ public class DedicatedPlayerList extends PlayerList {
|
||||||
@ -85,7 +124,7 @@ index 4997255c79..a5545bd4c4 100644
|
|||||||
- }
|
- }
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/DefinedStructure.java b/src/main/java/net/minecraft/server/DefinedStructure.java
|
diff --git a/src/main/java/net/minecraft/server/DefinedStructure.java b/src/main/java/net/minecraft/server/DefinedStructure.java
|
||||||
index a661789c1e..785a1a2184 100644
|
index a661789c1..785a1a218 100644
|
||||||
--- a/src/main/java/net/minecraft/server/DefinedStructure.java
|
--- a/src/main/java/net/minecraft/server/DefinedStructure.java
|
||||||
+++ b/src/main/java/net/minecraft/server/DefinedStructure.java
|
+++ b/src/main/java/net/minecraft/server/DefinedStructure.java
|
||||||
@@ -88,7 +88,7 @@ public class DefinedStructure {
|
@@ -88,7 +88,7 @@ public class DefinedStructure {
|
||||||
@ -140,7 +179,7 @@ index a661789c1e..785a1a2184 100644
|
|||||||
|
|
||||||
public Iterator<IBlockData> iterator() {
|
public Iterator<IBlockData> iterator() {
|
||||||
diff --git a/src/main/java/net/minecraft/server/EnumDirection.java b/src/main/java/net/minecraft/server/EnumDirection.java
|
diff --git a/src/main/java/net/minecraft/server/EnumDirection.java b/src/main/java/net/minecraft/server/EnumDirection.java
|
||||||
index 188d49d820..854ad49b6c 100644
|
index 188d49d82..854ad49b6 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EnumDirection.java
|
--- a/src/main/java/net/minecraft/server/EnumDirection.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EnumDirection.java
|
+++ b/src/main/java/net/minecraft/server/EnumDirection.java
|
||||||
@@ -255,7 +255,7 @@ public enum EnumDirection implements INamable {
|
@@ -255,7 +255,7 @@ public enum EnumDirection implements INamable {
|
||||||
@ -204,7 +243,7 @@ index 188d49d820..854ad49b6c 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/LocaleLanguage.java b/src/main/java/net/minecraft/server/LocaleLanguage.java
|
diff --git a/src/main/java/net/minecraft/server/LocaleLanguage.java b/src/main/java/net/minecraft/server/LocaleLanguage.java
|
||||||
index 8f06c58485..4361b2cee5 100644
|
index 8f06c5848..4361b2cee 100644
|
||||||
--- a/src/main/java/net/minecraft/server/LocaleLanguage.java
|
--- a/src/main/java/net/minecraft/server/LocaleLanguage.java
|
||||||
+++ b/src/main/java/net/minecraft/server/LocaleLanguage.java
|
+++ b/src/main/java/net/minecraft/server/LocaleLanguage.java
|
||||||
@@ -34,7 +34,7 @@ public class LocaleLanguage {
|
@@ -34,7 +34,7 @@ public class LocaleLanguage {
|
||||||
@ -217,7 +256,7 @@ index 8f06c58485..4361b2cee5 100644
|
|||||||
|
|
||||||
this.e = SystemUtils.b();
|
this.e = SystemUtils.b();
|
||||||
diff --git a/src/main/java/net/minecraft/server/MathHelper.java b/src/main/java/net/minecraft/server/MathHelper.java
|
diff --git a/src/main/java/net/minecraft/server/MathHelper.java b/src/main/java/net/minecraft/server/MathHelper.java
|
||||||
index 86585a13ff..f52b9c6f0a 100644
|
index 86585a13f..f52b9c6f0 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MathHelper.java
|
--- a/src/main/java/net/minecraft/server/MathHelper.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MathHelper.java
|
+++ b/src/main/java/net/minecraft/server/MathHelper.java
|
||||||
@@ -8,7 +8,7 @@ import java.util.function.IntPredicate;
|
@@ -8,7 +8,7 @@ import java.util.function.IntPredicate;
|
||||||
@ -229,8 +268,57 @@ index 86585a13ff..f52b9c6f0a 100644
|
|||||||
for (int i = 0; i < afloat.length; ++i) {
|
for (int i = 0; i < afloat.length; ++i) {
|
||||||
afloat[i] = (float) Math.sin((double) i * 3.141592653589793D * 2.0D / 65536.0D);
|
afloat[i] = (float) Math.sin((double) i * 3.141592653589793D * 2.0D / 65536.0D);
|
||||||
}
|
}
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/ProtoChunk.java b/src/main/java/net/minecraft/server/ProtoChunk.java
|
||||||
|
index 824e68b50..584a86c11 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/ProtoChunk.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/ProtoChunk.java
|
||||||
|
@@ -65,7 +65,7 @@ public class ProtoChunk implements IChunkAccess {
|
||||||
|
this.b = chunkcoordintpair;
|
||||||
|
this.p = chunkconverter;
|
||||||
|
Predicate predicate = (block) -> {
|
||||||
|
- return block == null || block.getBlockData().isAir();
|
||||||
|
+ return block == null || ((Block) block).getBlockData().isAir(); // Paper - decompile fix
|
||||||
|
};
|
||||||
|
RegistryBlocks registryblocks = Block.REGISTRY;
|
||||||
|
|
||||||
|
@@ -325,8 +325,8 @@ public class ProtoChunk implements IChunkAccess {
|
||||||
|
}
|
||||||
|
|
||||||
|
private HeightMap c(HeightMap.Type heightmap_type) {
|
||||||
|
- return (HeightMap) this.f.computeIfAbsent(heightmap_type, (heightmap_type) -> {
|
||||||
|
- HeightMap heightmap = new HeightMap(this, heightmap_type);
|
||||||
|
+ return (HeightMap) this.f.computeIfAbsent(heightmap_type, (heightmap_type1) -> { // Paper - decompile fix
|
||||||
|
+ HeightMap heightmap = new HeightMap(this, heightmap_type1); // Paper - decompile fix
|
||||||
|
|
||||||
|
heightmap.a();
|
||||||
|
return heightmap;
|
||||||
|
@@ -372,13 +372,13 @@ public class ProtoChunk implements IChunkAccess {
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
public LongSet b(String s) {
|
||||||
|
- return (LongSet) this.o.computeIfAbsent(s, (s) -> {
|
||||||
|
+ return (LongSet) this.o.computeIfAbsent(s, (s1) -> { // Paper - decompile fix
|
||||||
|
return new LongOpenHashSet();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void a(String s, long i) {
|
||||||
|
- ((LongSet) this.o.computeIfAbsent(s, (s) -> {
|
||||||
|
+ ((LongSet) this.o.computeIfAbsent(s, (s1) -> { // Paper - decompile fix
|
||||||
|
return new LongOpenHashSet();
|
||||||
|
})).add(i);
|
||||||
|
this.c = true;
|
||||||
|
@@ -493,7 +493,7 @@ public class ProtoChunk implements IChunkAccess {
|
||||||
|
}
|
||||||
|
|
||||||
|
public BitSet a(WorldGenStage.Features worldgenstage_features) {
|
||||||
|
- return (BitSet) this.t.computeIfAbsent(worldgenstage_features, (worldgenstage_features) -> {
|
||||||
|
+ return (BitSet) this.t.computeIfAbsent(worldgenstage_features, (worldgenstage_features1) -> { // Paper - decompile fix
|
||||||
|
return new BitSet(65536);
|
||||||
|
});
|
||||||
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/RegistryID.java b/src/main/java/net/minecraft/server/RegistryID.java
|
diff --git a/src/main/java/net/minecraft/server/RegistryID.java b/src/main/java/net/minecraft/server/RegistryID.java
|
||||||
index 3b8f6ec167..bde5714dd6 100644
|
index 3b8f6ec16..bde5714dd 100644
|
||||||
--- a/src/main/java/net/minecraft/server/RegistryID.java
|
--- a/src/main/java/net/minecraft/server/RegistryID.java
|
||||||
+++ b/src/main/java/net/minecraft/server/RegistryID.java
|
+++ b/src/main/java/net/minecraft/server/RegistryID.java
|
||||||
@@ -6,7 +6,7 @@ import java.util.Arrays;
|
@@ -6,7 +6,7 @@ import java.util.Arrays;
|
||||||
@ -271,7 +359,7 @@ index 3b8f6ec167..bde5714dd6 100644
|
|||||||
this.f = 0;
|
this.f = 0;
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/ShapeDetector.java b/src/main/java/net/minecraft/server/ShapeDetector.java
|
diff --git a/src/main/java/net/minecraft/server/ShapeDetector.java b/src/main/java/net/minecraft/server/ShapeDetector.java
|
||||||
index 43596cb2d5..3faf74a22f 100644
|
index 43596cb2d..3faf74a22 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ShapeDetector.java
|
--- a/src/main/java/net/minecraft/server/ShapeDetector.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ShapeDetector.java
|
+++ b/src/main/java/net/minecraft/server/ShapeDetector.java
|
||||||
@@ -171,7 +171,7 @@ public class ShapeDetector {
|
@@ -171,7 +171,7 @@ public class ShapeDetector {
|
||||||
@ -284,7 +372,7 @@ index 43596cb2d5..3faf74a22f 100644
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/VoxelShape.java b/src/main/java/net/minecraft/server/VoxelShape.java
|
diff --git a/src/main/java/net/minecraft/server/VoxelShape.java b/src/main/java/net/minecraft/server/VoxelShape.java
|
||||||
index 4b5463cca2..53c9f21887 100644
|
index 4b5463cca..53c9f2188 100644
|
||||||
--- a/src/main/java/net/minecraft/server/VoxelShape.java
|
--- a/src/main/java/net/minecraft/server/VoxelShape.java
|
||||||
+++ b/src/main/java/net/minecraft/server/VoxelShape.java
|
+++ b/src/main/java/net/minecraft/server/VoxelShape.java
|
||||||
@@ -67,7 +67,7 @@ public abstract class VoxelShape {
|
@@ -67,7 +67,7 @@ public abstract class VoxelShape {
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
From 42457b83f3c35c1e566f635b53505bc0c53f1eaf Mon Sep 17 00:00:00 2001
|
From b78498d654658ee40447dbcbef775b255505987f Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Mon, 28 Mar 2016 20:55:47 -0400
|
Date: Mon, 28 Mar 2016 20:55:47 -0400
|
||||||
Subject: [PATCH] MC Utils
|
Subject: [PATCH] MC Utils
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java
|
diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java
|
||||||
index c3e990bdff..e2a7b4be2c 100644
|
index c3e990bd..e2a7b4be 100644
|
||||||
--- a/src/main/java/net/minecraft/server/BaseBlockPosition.java
|
--- a/src/main/java/net/minecraft/server/BaseBlockPosition.java
|
||||||
+++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java
|
+++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java
|
||||||
@@ -93,7 +93,7 @@ public class BaseBlockPosition implements Comparable<BaseBlockPosition> {
|
@@ -93,7 +93,7 @@ public class BaseBlockPosition implements Comparable<BaseBlockPosition> {
|
||||||
@ -18,7 +18,7 @@ index c3e990bdff..e2a7b4be2c 100644
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
|
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||||
index 9f3aa24590..7dbea90902 100644
|
index 9f3aa245..7dbea909 100644
|
||||||
--- a/src/main/java/net/minecraft/server/BlockPosition.java
|
--- a/src/main/java/net/minecraft/server/BlockPosition.java
|
||||||
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
|
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||||
@@ -10,7 +10,6 @@ import org.apache.logging.log4j.Logger;
|
@@ -10,7 +10,6 @@ import org.apache.logging.log4j.Logger;
|
||||||
@ -54,7 +54,7 @@ index 9f3aa24590..7dbea90902 100644
|
|||||||
return this.c(MathHelper.floor(d0), MathHelper.floor(d1), MathHelper.floor(d2));
|
return this.c(MathHelper.floor(d0), MathHelper.floor(d1), MathHelper.floor(d2));
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||||
index 03c96de98b..2d06202da7 100644
|
index 03c96de9..2d06202d 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||||
@@ -28,7 +28,7 @@ import com.google.common.collect.Lists; // CraftBukkit
|
@@ -28,7 +28,7 @@ import com.google.common.collect.Lists; // CraftBukkit
|
||||||
@ -75,7 +75,7 @@ index 03c96de98b..2d06202da7 100644
|
|||||||
public TileEntity a(BlockPosition blockposition, Chunk.EnumTileEntityState chunk_enumtileentitystate) {
|
public TileEntity a(BlockPosition blockposition, Chunk.EnumTileEntityState chunk_enumtileentitystate) {
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkCoordIntPair.java b/src/main/java/net/minecraft/server/ChunkCoordIntPair.java
|
diff --git a/src/main/java/net/minecraft/server/ChunkCoordIntPair.java b/src/main/java/net/minecraft/server/ChunkCoordIntPair.java
|
||||||
index 00a530c51c..2947d9ff6a 100644
|
index 00a530c5..2947d9ff 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkCoordIntPair.java
|
--- a/src/main/java/net/minecraft/server/ChunkCoordIntPair.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ChunkCoordIntPair.java
|
+++ b/src/main/java/net/minecraft/server/ChunkCoordIntPair.java
|
||||||
@@ -24,6 +24,8 @@ public class ChunkCoordIntPair {
|
@@ -24,6 +24,8 @@ public class ChunkCoordIntPair {
|
||||||
@ -87,8 +87,90 @@ index 00a530c51c..2947d9ff6a 100644
|
|||||||
public static long a(int i, int j) {
|
public static long a(int i, int j) {
|
||||||
return (long) i & 4294967295L | ((long) j & 4294967295L) << 32;
|
return (long) i & 4294967295L | ((long) j & 4294967295L) << 32;
|
||||||
}
|
}
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
|
||||||
|
index 5d9118da..8b50ec53 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
|
||||||
|
@@ -15,7 +15,7 @@ import org.apache.logging.log4j.Logger;
|
||||||
|
public class ChunkTaskScheduler extends Scheduler<ChunkCoordIntPair, ChunkStatus, ProtoChunk> {
|
||||||
|
|
||||||
|
private static final Logger b = LogManager.getLogger();
|
||||||
|
- private final World c;
|
||||||
|
+ private final World c; private final World getWorld() { return this.c; } // Paper - OBFHELPER
|
||||||
|
private final ChunkGenerator<?> d;
|
||||||
|
private final IChunkLoader e;
|
||||||
|
private final IAsyncTaskHandler f;
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/DataBits.java b/src/main/java/net/minecraft/server/DataBits.java
|
||||||
|
index d24ec3d5..9e83610f 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/DataBits.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/DataBits.java
|
||||||
|
@@ -60,6 +60,7 @@ public class DataBits {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+ public long[] getDataBits() { return this.a(); } // Paper - OBFHELPER
|
||||||
|
public long[] a() {
|
||||||
|
return this.a;
|
||||||
|
}
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/DataPalette.java b/src/main/java/net/minecraft/server/DataPalette.java
|
||||||
|
index dae40b9c..0be0b0ef 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/DataPalette.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/DataPalette.java
|
||||||
|
@@ -4,8 +4,10 @@ import javax.annotation.Nullable;
|
||||||
|
|
||||||
|
public interface DataPalette<T> {
|
||||||
|
|
||||||
|
+ default int getDataBits(T object) { return this.a(object); } // Paper - OBFHELPER
|
||||||
|
int a(T t0);
|
||||||
|
|
||||||
|
+ @Nullable default T getObject(int dataBits) { return this.a(dataBits); } // Paper - OBFHELPER
|
||||||
|
@Nullable
|
||||||
|
T a(int i);
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/DataPaletteBlock.java b/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
||||||
|
index 030ec870..575f9b55 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
||||||
|
@@ -9,7 +9,7 @@ import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
public class DataPaletteBlock<T> implements DataPaletteExpandable<T> {
|
||||||
|
|
||||||
|
- private final DataPalette<T> b;
|
||||||
|
+ private final DataPalette<T> b; private final DataPalette<T> getDataPaletteGlobal() { return this.b; } // Paper - OBFHELPER
|
||||||
|
private final DataPaletteExpandable<T> c = (i, object) -> {
|
||||||
|
return 0;
|
||||||
|
};
|
||||||
|
@@ -17,9 +17,9 @@ public class DataPaletteBlock<T> implements DataPaletteExpandable<T> {
|
||||||
|
private final Function<NBTTagCompound, T> e;
|
||||||
|
private final Function<T, NBTTagCompound> f;
|
||||||
|
private final T g;
|
||||||
|
- protected DataBits a;
|
||||||
|
- private DataPalette<T> h;
|
||||||
|
- private int i;
|
||||||
|
+ protected DataBits a; protected DataBits getDataBits() { return this.a; } // Paper - OBFHELPER
|
||||||
|
+ private DataPalette<T> h; private DataPalette<T> getDataPalette() { return this.h; } // Paper - OBFHELPER
|
||||||
|
+ private int i; private int getBitsPerObject() { return this.i; } // Paper - OBFHELPER
|
||||||
|
private final ReentrantLock j = new ReentrantLock();
|
||||||
|
|
||||||
|
private void b() {
|
||||||
|
@@ -54,6 +54,7 @@ public class DataPaletteBlock<T> implements DataPaletteExpandable<T> {
|
||||||
|
return j << 8 | k << 4 | i;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ private void initialize(int bitsPerObject) { this.b(bitsPerObject); } // Paper - OBFHELPER
|
||||||
|
private void b(int i) {
|
||||||
|
if (i != this.i) {
|
||||||
|
this.i = i;
|
||||||
|
@@ -116,6 +117,7 @@ public class DataPaletteBlock<T> implements DataPaletteExpandable<T> {
|
||||||
|
return object == null ? this.g : object;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ public void writeDataPaletteBlock(PacketDataSerializer packetDataSerializer) { this.b(packetDataSerializer); } // Paper - OBFHELPER
|
||||||
|
public void b(PacketDataSerializer packetdataserializer) {
|
||||||
|
this.b();
|
||||||
|
packetdataserializer.writeByte(this.i);
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityCreature.java b/src/main/java/net/minecraft/server/EntityCreature.java
|
diff --git a/src/main/java/net/minecraft/server/EntityCreature.java b/src/main/java/net/minecraft/server/EntityCreature.java
|
||||||
index b347567699..ceed50d8de 100644
|
index b3475676..ceed50d8 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityCreature.java
|
--- a/src/main/java/net/minecraft/server/EntityCreature.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityCreature.java
|
+++ b/src/main/java/net/minecraft/server/EntityCreature.java
|
||||||
@@ -6,6 +6,7 @@ import org.bukkit.event.entity.EntityUnleashEvent;
|
@@ -6,6 +6,7 @@ import org.bukkit.event.entity.EntityUnleashEvent;
|
||||||
@ -100,7 +182,7 @@ index b347567699..ceed50d8de 100644
|
|||||||
private float b;
|
private float b;
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
index 514c951516..5b33997529 100644
|
index 514c9515..5b339975 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
@@ -122,6 +122,7 @@ public abstract class EntityLiving extends Entity {
|
@@ -122,6 +122,7 @@ public abstract class EntityLiving extends Entity {
|
||||||
@ -112,7 +194,7 @@ index 514c951516..5b33997529 100644
|
|||||||
@Override
|
@Override
|
||||||
public float getBukkitYaw() {
|
public float getBukkitYaw() {
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityMonster.java b/src/main/java/net/minecraft/server/EntityMonster.java
|
diff --git a/src/main/java/net/minecraft/server/EntityMonster.java b/src/main/java/net/minecraft/server/EntityMonster.java
|
||||||
index 494ce0bc06..04c3756ea3 100644
|
index 494ce0bc..04c3756e 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityMonster.java
|
--- a/src/main/java/net/minecraft/server/EntityMonster.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityMonster.java
|
+++ b/src/main/java/net/minecraft/server/EntityMonster.java
|
||||||
@@ -2,6 +2,7 @@ package net.minecraft.server;
|
@@ -2,6 +2,7 @@ package net.minecraft.server;
|
||||||
@ -124,7 +206,7 @@ index 494ce0bc06..04c3756ea3 100644
|
|||||||
super(entitytypes, world);
|
super(entitytypes, world);
|
||||||
this.b_ = 5;
|
this.b_ = 5;
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
|
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||||
index ca2a14d7ac..9a513b4e3a 100644
|
index ca2a14d7..9a513b4e 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityTypes.java
|
--- a/src/main/java/net/minecraft/server/EntityTypes.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
|
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||||
@@ -3,6 +3,7 @@ package net.minecraft.server;
|
@@ -3,6 +3,7 @@ package net.minecraft.server;
|
||||||
@ -167,7 +249,7 @@ index ca2a14d7ac..9a513b4e3a 100644
|
|||||||
private boolean c = true;
|
private boolean c = true;
|
||||||
private boolean d = true;
|
private boolean d = true;
|
||||||
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
|
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
|
||||||
index 359979cc1c..0c54eaa529 100644
|
index 359979cc..0c54eaa5 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ItemStack.java
|
--- a/src/main/java/net/minecraft/server/ItemStack.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ItemStack.java
|
+++ b/src/main/java/net/minecraft/server/ItemStack.java
|
||||||
@@ -26,6 +26,7 @@ import org.bukkit.TreeType;
|
@@ -26,6 +26,7 @@ import org.bukkit.TreeType;
|
||||||
@ -197,7 +279,7 @@ index 359979cc1c..0c54eaa529 100644
|
|||||||
this.tag = nbttagcompound;
|
this.tag = nbttagcompound;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/LotoSelectorEntry.java b/src/main/java/net/minecraft/server/LotoSelectorEntry.java
|
diff --git a/src/main/java/net/minecraft/server/LotoSelectorEntry.java b/src/main/java/net/minecraft/server/LotoSelectorEntry.java
|
||||||
index a540167d6d..add618866b 100644
|
index a540167d..add61886 100644
|
||||||
--- a/src/main/java/net/minecraft/server/LotoSelectorEntry.java
|
--- a/src/main/java/net/minecraft/server/LotoSelectorEntry.java
|
||||||
+++ b/src/main/java/net/minecraft/server/LotoSelectorEntry.java
|
+++ b/src/main/java/net/minecraft/server/LotoSelectorEntry.java
|
||||||
@@ -85,11 +85,11 @@ public abstract class LotoSelectorEntry {
|
@@ -85,11 +85,11 @@ public abstract class LotoSelectorEntry {
|
||||||
@ -216,7 +298,7 @@ index a540167d6d..add618866b 100644
|
|||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java
|
diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000..70cdc3f102
|
index 00000000..70cdc3f1
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/net/minecraft/server/MCUtil.java
|
+++ b/src/main/java/net/minecraft/server/MCUtil.java
|
||||||
@@ -0,0 +1,292 @@
|
@@ -0,0 +1,292 @@
|
||||||
@ -513,7 +595,7 @@ index 0000000000..70cdc3f102
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/net/minecraft/server/NBTBase.java b/src/main/java/net/minecraft/server/NBTBase.java
|
diff --git a/src/main/java/net/minecraft/server/NBTBase.java b/src/main/java/net/minecraft/server/NBTBase.java
|
||||||
index 8170a84280..e21e60b003 100644
|
index 8170a842..e21e60b0 100644
|
||||||
--- a/src/main/java/net/minecraft/server/NBTBase.java
|
--- a/src/main/java/net/minecraft/server/NBTBase.java
|
||||||
+++ b/src/main/java/net/minecraft/server/NBTBase.java
|
+++ b/src/main/java/net/minecraft/server/NBTBase.java
|
||||||
@@ -20,7 +20,7 @@ public interface NBTBase {
|
@@ -20,7 +20,7 @@ public interface NBTBase {
|
||||||
@ -535,7 +617,7 @@ index 8170a84280..e21e60b003 100644
|
|||||||
case 0:
|
case 0:
|
||||||
return "TAG_End";
|
return "TAG_End";
|
||||||
diff --git a/src/main/java/net/minecraft/server/NBTList.java b/src/main/java/net/minecraft/server/NBTList.java
|
diff --git a/src/main/java/net/minecraft/server/NBTList.java b/src/main/java/net/minecraft/server/NBTList.java
|
||||||
index 1a81d8e5f6..057c2077a0 100644
|
index 1a81d8e5..057c2077 100644
|
||||||
--- a/src/main/java/net/minecraft/server/NBTList.java
|
--- a/src/main/java/net/minecraft/server/NBTList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/NBTList.java
|
+++ b/src/main/java/net/minecraft/server/NBTList.java
|
||||||
@@ -13,7 +13,7 @@ public abstract class NBTList<T extends NBTBase> extends AbstractList<T> impleme
|
@@ -13,7 +13,7 @@ public abstract class NBTList<T extends NBTBase> extends AbstractList<T> impleme
|
||||||
@ -561,7 +643,7 @@ index 1a81d8e5f6..057c2077a0 100644
|
|||||||
+ public abstract NBTList<T> clone(); // Paper - decompile fix
|
+ public abstract NBTList<T> clone(); // Paper - decompile fix
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/NBTTagByteArray.java b/src/main/java/net/minecraft/server/NBTTagByteArray.java
|
diff --git a/src/main/java/net/minecraft/server/NBTTagByteArray.java b/src/main/java/net/minecraft/server/NBTTagByteArray.java
|
||||||
index 11ffa6c342..3ff3a29835 100644
|
index 11ffa6c3..3ff3a298 100644
|
||||||
--- a/src/main/java/net/minecraft/server/NBTTagByteArray.java
|
--- a/src/main/java/net/minecraft/server/NBTTagByteArray.java
|
||||||
+++ b/src/main/java/net/minecraft/server/NBTTagByteArray.java
|
+++ b/src/main/java/net/minecraft/server/NBTTagByteArray.java
|
||||||
@@ -66,7 +66,8 @@ public class NBTTagByteArray extends NBTList<NBTTagByte> {
|
@@ -66,7 +66,8 @@ public class NBTTagByteArray extends NBTList<NBTTagByte> {
|
||||||
@ -575,7 +657,7 @@ index 11ffa6c342..3ff3a29835 100644
|
|||||||
|
|
||||||
System.arraycopy(this.data, 0, abyte, 0, this.data.length);
|
System.arraycopy(this.data, 0, abyte, 0, this.data.length);
|
||||||
diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java
|
diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java
|
||||||
index 7fc9b5ff32..e658816c24 100644
|
index 7fc9b5ff..e658816c 100644
|
||||||
--- a/src/main/java/net/minecraft/server/NBTTagCompound.java
|
--- a/src/main/java/net/minecraft/server/NBTTagCompound.java
|
||||||
+++ b/src/main/java/net/minecraft/server/NBTTagCompound.java
|
+++ b/src/main/java/net/minecraft/server/NBTTagCompound.java
|
||||||
@@ -24,7 +24,7 @@ public class NBTTagCompound implements NBTBase {
|
@@ -24,7 +24,7 @@ public class NBTTagCompound implements NBTBase {
|
||||||
@ -611,7 +693,7 @@ index 7fc9b5ff32..e658816c24 100644
|
|||||||
- }
|
- }
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/NBTTagIntArray.java b/src/main/java/net/minecraft/server/NBTTagIntArray.java
|
diff --git a/src/main/java/net/minecraft/server/NBTTagIntArray.java b/src/main/java/net/minecraft/server/NBTTagIntArray.java
|
||||||
index f5c9b97d5c..d121ad4f7a 100644
|
index f5c9b97d..d121ad4f 100644
|
||||||
--- a/src/main/java/net/minecraft/server/NBTTagIntArray.java
|
--- a/src/main/java/net/minecraft/server/NBTTagIntArray.java
|
||||||
+++ b/src/main/java/net/minecraft/server/NBTTagIntArray.java
|
+++ b/src/main/java/net/minecraft/server/NBTTagIntArray.java
|
||||||
@@ -132,7 +132,7 @@ public class NBTTagIntArray extends NBTList<NBTTagInt> {
|
@@ -132,7 +132,7 @@ public class NBTTagIntArray extends NBTList<NBTTagInt> {
|
||||||
@ -624,7 +706,7 @@ index f5c9b97d5c..d121ad4f7a 100644
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/NBTTagList.java b/src/main/java/net/minecraft/server/NBTTagList.java
|
diff --git a/src/main/java/net/minecraft/server/NBTTagList.java b/src/main/java/net/minecraft/server/NBTTagList.java
|
||||||
index b3c944d701..a8280acf94 100644
|
index b3c944d7..a8280acf 100644
|
||||||
--- a/src/main/java/net/minecraft/server/NBTTagList.java
|
--- a/src/main/java/net/minecraft/server/NBTTagList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/NBTTagList.java
|
+++ b/src/main/java/net/minecraft/server/NBTTagList.java
|
||||||
@@ -14,7 +14,7 @@ import org.apache.logging.log4j.Logger;
|
@@ -14,7 +14,7 @@ import org.apache.logging.log4j.Logger;
|
||||||
@ -661,8 +743,82 @@ index b3c944d701..a8280acf94 100644
|
|||||||
- return this.add((NBTBase) object);
|
- return this.add((NBTBase) object);
|
||||||
- }
|
- }
|
||||||
}
|
}
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java
|
||||||
|
index 0afaea81..26da8972 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/NetworkManager.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/NetworkManager.java
|
||||||
|
@@ -44,7 +44,7 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
||||||
|
return new DefaultEventLoopGroup(0, (new ThreadFactoryBuilder()).setNameFormat("Netty Local Client IO #%d").setDaemon(true).build());
|
||||||
|
});
|
||||||
|
private final EnumProtocolDirection h;
|
||||||
|
- private final Queue<NetworkManager.QueuedPacket> i = Queues.newConcurrentLinkedQueue();
|
||||||
|
+ private final Queue<NetworkManager.QueuedPacket> i = Queues.newConcurrentLinkedQueue(); private final Queue<NetworkManager.QueuedPacket> getPacketQueue() { return this.i; } // Paper - OBFHELPER
|
||||||
|
private final ReentrantReadWriteLock j = new ReentrantReadWriteLock();
|
||||||
|
public Channel channel;
|
||||||
|
// Spigot Start // PAIL
|
||||||
|
@@ -168,6 +168,7 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
+ private void dispatchPacket(Packet<?> packet, @Nullable GenericFutureListener<? extends Future<? super Void>> genericFutureListener) { this.b(packet, genericFutureListener); } // Paper - OBFHELPER
|
||||||
|
private void b(Packet<?> packet, @Nullable GenericFutureListener<? extends Future<? super Void>> genericfuturelistener) {
|
||||||
|
EnumProtocol enumprotocol = EnumProtocol.a(packet);
|
||||||
|
EnumProtocol enumprotocol1 = (EnumProtocol) this.channel.attr(NetworkManager.c).get();
|
||||||
|
@@ -208,6 +209,7 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
+ private void sendPacketQueue() { this.o(); } // Paper - OBFHELPER
|
||||||
|
private void o() {
|
||||||
|
if (this.channel != null && this.channel.isOpen()) {
|
||||||
|
this.j.readLock().lock();
|
||||||
|
@@ -338,9 +340,9 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
||||||
|
|
||||||
|
static class QueuedPacket {
|
||||||
|
|
||||||
|
- private final Packet<?> a;
|
||||||
|
+ private final Packet<?> a; private final Packet<?> getPacket() { return this.a; } // Paper - OBFHELPER
|
||||||
|
@Nullable
|
||||||
|
- private final GenericFutureListener<? extends Future<? super Void>> b;
|
||||||
|
+ private final GenericFutureListener<? extends Future<? super Void>> b; private final GenericFutureListener<? extends Future<? super Void>> getGenericFutureListener() { return this.b; } // Paper - OBFHELPER
|
||||||
|
|
||||||
|
public QueuedPacket(Packet<?> packet, @Nullable GenericFutureListener<? extends Future<? super Void>> genericfuturelistener) {
|
||||||
|
this.a = packet;
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/PacketDataSerializer.java b/src/main/java/net/minecraft/server/PacketDataSerializer.java
|
||||||
|
index d04afceb..a63a5811 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/PacketDataSerializer.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/PacketDataSerializer.java
|
||||||
|
@@ -33,6 +33,7 @@ public class PacketDataSerializer extends ByteBuf {
|
||||||
|
this.a = bytebuf;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ public static int countBytes(int i) { return PacketDataSerializer.a(i); } // Paper - OBFHELPER
|
||||||
|
public static int a(int i) {
|
||||||
|
for (int j = 1; j < 5; ++j) {
|
||||||
|
if ((i & -1 << j * 7) == 0) {
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
||||||
|
index 1aa36156..ae95fdf9 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
||||||
|
@@ -13,7 +13,7 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
||||||
|
private int a;
|
||||||
|
private int b;
|
||||||
|
private int c;
|
||||||
|
- private byte[] d;
|
||||||
|
+ private byte[] d; private byte[] getData() { return this.d; } // Paper - OBFHELPER
|
||||||
|
private List<NBTTagCompound> e;
|
||||||
|
private boolean f;
|
||||||
|
|
||||||
|
@@ -97,6 +97,7 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
||||||
|
return bytebuf;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ public int writeChunk(PacketDataSerializer packetDataSerializer, Chunk chunk, boolean writeSkyLightArray, int chunkSectionSelector) { return this.a(packetDataSerializer, chunk, writeSkyLightArray, chunkSectionSelector); } // Paper - OBFHELPER
|
||||||
|
public int a(PacketDataSerializer packetdataserializer, Chunk chunk, boolean flag, int i) {
|
||||||
|
int j = 0;
|
||||||
|
ChunkSection[] achunksection = chunk.getSections();
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
index 0618962e75..42e0630e60 100644
|
index 0618962e..42e0630e 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
@@ -66,9 +66,9 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
@@ -66,9 +66,9 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||||
@ -679,7 +835,7 @@ index 0618962e75..42e0630e60 100644
|
|||||||
private volatile int chatThrottle;
|
private volatile int chatThrottle;
|
||||||
private static final AtomicIntegerFieldUpdater chatSpamField = AtomicIntegerFieldUpdater.newUpdater(PlayerConnection.class, "chatThrottle");
|
private static final AtomicIntegerFieldUpdater chatSpamField = AtomicIntegerFieldUpdater.newUpdater(PlayerConnection.class, "chatThrottle");
|
||||||
diff --git a/src/main/java/net/minecraft/server/RegistryBlockID.java b/src/main/java/net/minecraft/server/RegistryBlockID.java
|
diff --git a/src/main/java/net/minecraft/server/RegistryBlockID.java b/src/main/java/net/minecraft/server/RegistryBlockID.java
|
||||||
index ef332d6517..7cc7eb7735 100644
|
index ef332d65..a804a67e 100644
|
||||||
--- a/src/main/java/net/minecraft/server/RegistryBlockID.java
|
--- a/src/main/java/net/minecraft/server/RegistryBlockID.java
|
||||||
+++ b/src/main/java/net/minecraft/server/RegistryBlockID.java
|
+++ b/src/main/java/net/minecraft/server/RegistryBlockID.java
|
||||||
@@ -8,7 +8,7 @@ import java.util.Iterator;
|
@@ -8,7 +8,7 @@ import java.util.Iterator;
|
||||||
@ -700,8 +856,16 @@ index ef332d6517..7cc7eb7735 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.c.set(i, t0);
|
this.c.set(i, t0);
|
||||||
|
@@ -56,6 +56,7 @@ public class RegistryBlockID<T> implements Registry<T> {
|
||||||
|
return Iterators.filter(this.c.iterator(), Predicates.notNull());
|
||||||
|
}
|
||||||
|
|
||||||
|
+ public int size() { return this.a(); } // Paper - OBFHELPER
|
||||||
|
public int a() {
|
||||||
|
return this.b.size();
|
||||||
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/ServerPing.java b/src/main/java/net/minecraft/server/ServerPing.java
|
diff --git a/src/main/java/net/minecraft/server/ServerPing.java b/src/main/java/net/minecraft/server/ServerPing.java
|
||||||
index 2179664a0c..d7e1ecc031 100644
|
index 2179664a..d7e1ecc0 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ServerPing.java
|
--- a/src/main/java/net/minecraft/server/ServerPing.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ServerPing.java
|
+++ b/src/main/java/net/minecraft/server/ServerPing.java
|
||||||
@@ -102,11 +102,11 @@ public class ServerPing {
|
@@ -102,11 +102,11 @@ public class ServerPing {
|
||||||
@ -747,5 +911,5 @@ index 2179664a0c..d7e1ecc031 100644
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
2.18.0
|
2.14.1.windows.1
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 1e1413f50f5a67afcf8a7a2d53f85af1b349aa32 Mon Sep 17 00:00:00 2001
|
From 1c884ab552ea64dad0dd97cecd57f6eb71c5074e Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Sun, 11 Mar 2018 14:13:33 -0400
|
Date: Sun, 11 Mar 2018 14:13:33 -0400
|
||||||
Subject: [PATCH] Disable Explicit Network Manager Flushing
|
Subject: [PATCH] Disable Explicit Network Manager Flushing
|
||||||
@ -12,7 +12,7 @@ flushing on the netty event loop, so it won't do the flush on the main thread.
|
|||||||
Renable flushing by passing -Dpaper.explicit-flush=true
|
Renable flushing by passing -Dpaper.explicit-flush=true
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java
|
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java
|
||||||
index 61f9eb3e64..2272f1239b 100644
|
index 4f3f88ff..f8facddb 100644
|
||||||
--- a/src/main/java/net/minecraft/server/NetworkManager.java
|
--- a/src/main/java/net/minecraft/server/NetworkManager.java
|
||||||
+++ b/src/main/java/net/minecraft/server/NetworkManager.java
|
+++ b/src/main/java/net/minecraft/server/NetworkManager.java
|
||||||
@@ -66,6 +66,7 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
@@ -66,6 +66,7 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
||||||
@ -23,7 +23,7 @@ index 61f9eb3e64..2272f1239b 100644
|
|||||||
// Paper end
|
// Paper end
|
||||||
|
|
||||||
public NetworkManager(EnumProtocolDirection enumprotocoldirection) {
|
public NetworkManager(EnumProtocolDirection enumprotocoldirection) {
|
||||||
@@ -236,7 +237,7 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
@@ -238,7 +239,7 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.channel != null) {
|
if (this.channel != null) {
|
||||||
@ -33,5 +33,5 @@ index 61f9eb3e64..2272f1239b 100644
|
|||||||
|
|
||||||
if (this.u++ % 20 == 0) {
|
if (this.u++ % 20 == 0) {
|
||||||
--
|
--
|
||||||
2.18.0
|
2.14.1.windows.1
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ diff --git a/src/main/java/net/minecraft/server/PacketDataSerializer.java b/src/
|
|||||||
index d04afceb7..b0e8ffc4b 100644
|
index d04afceb7..b0e8ffc4b 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PacketDataSerializer.java
|
--- a/src/main/java/net/minecraft/server/PacketDataSerializer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PacketDataSerializer.java
|
+++ b/src/main/java/net/minecraft/server/PacketDataSerializer.java
|
||||||
@@ -251,6 +251,15 @@ public class PacketDataSerializer extends ByteBuf {
|
@@ -252,6 +252,15 @@ public class PacketDataSerializer extends ByteBuf {
|
||||||
CraftItemStack.setItemMeta(itemstack, CraftItemStack.getItemMeta(itemstack));
|
CraftItemStack.setItemMeta(itemstack, CraftItemStack.getItemMeta(itemstack));
|
||||||
// Spigot end
|
// Spigot end
|
||||||
nbttagcompound = itemstack.getTag();
|
nbttagcompound = itemstack.getTag();
|
||||||
@ -44,7 +44,7 @@ index d04afceb7..b0e8ffc4b 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.a(nbttagcompound);
|
this.a(nbttagcompound);
|
||||||
@@ -271,6 +280,16 @@ public class PacketDataSerializer extends ByteBuf {
|
@@ -272,6 +281,16 @@ public class PacketDataSerializer extends ByteBuf {
|
||||||
itemstack.setTag(this.j());
|
itemstack.setTag(this.j());
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
if (itemstack.getTag() != null) {
|
if (itemstack.getTag() != null) {
|
||||||
@ -73,7 +73,7 @@ index 1aa36156a..c5f0b8530 100644
|
|||||||
|
|
||||||
this.e.add(nbttagcompound);
|
this.e.add(nbttagcompound);
|
||||||
}
|
}
|
||||||
@@ -121,7 +122,7 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
@@ -122,7 +123,7 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
||||||
BiomeBase[] abiomebase = chunk.getBiomeIndex();
|
BiomeBase[] abiomebase = chunk.getBiomeIndex();
|
||||||
|
|
||||||
for (l = 0; l < abiomebase.length; ++l) {
|
for (l = 0; l < abiomebase.length; ++l) {
|
||||||
@ -126,5 +126,5 @@ index 85fd8dab6..16a5537ce 100644
|
|||||||
|
|
||||||
public NBTTagCompound aa_() {
|
public NBTTagCompound aa_() {
|
||||||
--
|
--
|
||||||
2.18.0
|
2.14.1.windows.1
|
||||||
|
|
||||||
|
1581
Spigot-Server-Patches/0348-Anti-Xray.patch
Normal file
1581
Spigot-Server-Patches/0348-Anti-Xray.patch
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user