Clean up a lot of obfuscation helpers and impls
This fixes a bug with obfuscation helpers for attack cooldown But every other change should stay the same. Cleaning up a lot of helpers that pointed to already unobfuscated items. Also adds final to many of the obfhelpers to assist with inlining. This is pretty much a patch maintenance
This commit is contained in:
@@ -218,7 +218,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ // We've used an invalid region file.
|
||||
+ throw new IllegalStateException("RegionFile is closed");
|
||||
+ }
|
||||
+ this.statuses[this.getChunkLocation(new ChunkCoordIntPair(x, z))] = status;
|
||||
+ this.statuses[getChunkLocation(x, z)] = status;
|
||||
+ }
|
||||
+
|
||||
+ public ChunkStatus getStatusIfCached(int x, int z) {
|
||||
@@ -226,7 +226,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ // We've used an invalid region file.
|
||||
+ throw new IllegalStateException("RegionFile is closed");
|
||||
+ }
|
||||
+ final int location = this.getChunkLocation(new ChunkCoordIntPair(x, z));
|
||||
+ final int location = getChunkLocation(x, z);
|
||||
+ return this.statuses[location];
|
||||
+ }
|
||||
+ // Paper end
|
||||
@@ -238,7 +238,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
return this.getOffset(chunkcoordintpair) != 0;
|
||||
}
|
||||
|
||||
+ private final int getChunkLocation(ChunkCoordIntPair chunkcoordintpair) { return this.g(chunkcoordintpair); } // Paper - OBFHELPER
|
||||
+ private static int getChunkLocation(int x, int z) { return (x & 31) + (z & 31) * 32; } // Paper - OBFHELPER - sort of, mirror of logic below
|
||||
private static int g(ChunkCoordIntPair chunkcoordintpair) {
|
||||
return chunkcoordintpair.j() + chunkcoordintpair.k() * 32;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user