[CI-SKIP] Cleanup: PAIL -> OBFHELPER

This commit is contained in:
Sotr
2018-07-25 00:37:20 +08:00
parent cf300713b4
commit 4c7da04d9f
28 changed files with 109 additions and 110 deletions

View File

@@ -11,7 +11,7 @@ import net.minecraft.server.ChunkSection;
public abstract class MixinChunkSection { public abstract class MixinChunkSection {
@Shadow private int nonEmptyBlockCount; @Shadow private int nonEmptyBlockCount;
@Overwrite // PAIL: isEmpty @Overwrite // OBFHELPER: isEmpty
public boolean a() { public boolean a() {
return AkarinGlobalConfig.sendLightOnlyChunkSection ? false : nonEmptyBlockCount == 0; return AkarinGlobalConfig.sendLightOnlyChunkSection ? false : nonEmptyBlockCount == 0;
} }

View File

@@ -52,7 +52,7 @@ public abstract class MixinCommandBan {
entityplayer.playerConnection.disconnect(hasReason ? message : AkarinGlobalConfig.messageBan); entityplayer.playerConnection.disconnect(hasReason ? message : AkarinGlobalConfig.messageBan);
} }
CommandAbstract.a(sender, (ICommand) this, "commands.ban.success", args[0]); // PAIL: notifyCommandListener CommandAbstract.a(sender, (ICommand) this, "commands.ban.success", args[0]); // OBFHELPER: notifyCommandListener
} }
} else { } else {
throw new ExceptionUsage("commands.ban.usage"); throw new ExceptionUsage("commands.ban.usage");

View File

@@ -19,7 +19,7 @@ import net.minecraft.server.MinecraftServer;
@Mixin(value = CommandBanIp.class, remap = false) @Mixin(value = CommandBanIp.class, remap = false)
public abstract class MixinCommandBanIp { public abstract class MixinCommandBanIp {
@Overwrite // PAIL: banIp @Overwrite // OBFHELPER: banIp
protected void a(MinecraftServer server, ICommandListener sender, String args, @Nullable String banReason) { protected void a(MinecraftServer server, ICommandListener sender, String args, @Nullable String banReason) {
// Akarin start - modify message // Akarin start - modify message
boolean hasReason = true; boolean hasReason = true;
@@ -31,7 +31,7 @@ public abstract class MixinCommandBanIp {
IpBanEntry ipbanentry = new IpBanEntry(args, (Date) null, sender.getName(), (Date) null, banReason); IpBanEntry ipbanentry = new IpBanEntry(args, (Date) null, sender.getName(), (Date) null, banReason);
server.getPlayerList().getIPBans().add(ipbanentry); server.getPlayerList().getIPBans().add(ipbanentry);
List<EntityPlayer> withIpPlayers = server.getPlayerList().b(args); // PAIL: getPlayersMatchingAddress List<EntityPlayer> withIpPlayers = server.getPlayerList().b(args); // OBFHELPER: getPlayersMatchingAddress
String[] banPlayerNames = new String[withIpPlayers.size()]; String[] banPlayerNames = new String[withIpPlayers.size()];
for (int i = 0; i < banPlayerNames.length; i++) { for (int i = 0; i < banPlayerNames.length; i++) {
@@ -41,9 +41,9 @@ public abstract class MixinCommandBanIp {
} }
if (withIpPlayers.isEmpty()) { if (withIpPlayers.isEmpty()) {
CommandAbstract.a(sender, (ICommand) this, "commands.banip.success", args); // PAIL: notifyCommandListener CommandAbstract.a(sender, (ICommand) this, "commands.banip.success", args); // OBFHELPER: notifyCommandListener
} else { } else {
CommandAbstract.a(sender, (ICommand) this, "commands.banip.success.players", args, CommandAbstract.a(banPlayerNames)); // PAIL: notifyCommandListener - joinNiceString CommandAbstract.a(sender, (ICommand) this, "commands.banip.success.players", args, CommandAbstract.a(banPlayerNames)); // OBFHELPER: notifyCommandListener - joinNiceString
} }
} }
} }

View File

@@ -30,11 +30,11 @@ public abstract class MixinCommandKick {
message = message + args[i]; message = message + args[i];
} }
target.playerConnection.disconnect(message); target.playerConnection.disconnect(message);
CommandAbstract.a(sender, (ICommand) this, "commands.kick.success.reason", target.getName(), message); // PAIL: notifyCommandListener CommandAbstract.a(sender, (ICommand) this, "commands.kick.success.reason", target.getName(), message); // OBFHELPER: notifyCommandListener
// Akarin end // Akarin end
} else { } else {
target.playerConnection.disconnect(AkarinGlobalConfig.messageKick); // Akarin target.playerConnection.disconnect(AkarinGlobalConfig.messageKick); // Akarin
CommandAbstract.a(sender, (ICommand) this, "commands.kick.success", target.getName()); // PAIL: notifyCommandListener CommandAbstract.a(sender, (ICommand) this, "commands.kick.success", target.getName()); // OBFHELPER: notifyCommandListener
} }
} }
} else { } else {

View File

@@ -23,11 +23,11 @@ public abstract class MixinWorld {
* Returns true if there are no solid, live entities in the specified AxisAlignedBB, excluding the given entity * Returns true if there are no solid, live entities in the specified AxisAlignedBB, excluding the given entity
*/ */
@Overwrite @Overwrite
public boolean a(AxisAlignedBB box, @Nullable Entity target) { // PAIL: checkNoEntityCollision public boolean a(AxisAlignedBB box, @Nullable Entity target) { // OBFHELPER: checkNoEntityCollision
List<Entity> list = this.getEntities(null, box); List<Entity> list = this.getEntities(null, box);
for (Entity each : list) { for (Entity each : list) {
if (!each.dead && each.i && each != target && (target == null || !each.x(target))) { // PAIL: preventEntitySpawning - isRidingSameEntity if (!each.dead && each.i && each != target && (target == null || !each.x(target))) { // OBFHELPER: preventEntitySpawning - isRidingSameEntity
return false; return false;
} }
} }

View File

@@ -67,7 +67,7 @@ public abstract class MixinChunkProviderServer {
} }
} }
activityAccountant.endActivity(); activityAccountant.endActivity();
this.chunkLoader.b(); // PAIL: chunkTick this.chunkLoader.b(); // OBFHELPER: chunkTick
} }
return false; return false;
} }

View File

@@ -121,7 +121,7 @@ public abstract class MixinChunk implements IMixinChunk {
@Inject(method = "b(Z)V", at = @At("HEAD"), cancellable = true) @Inject(method = "b(Z)V", at = @At("HEAD"), cancellable = true)
private void onTickHead(boolean skipRecheckGaps, CallbackInfo ci) { private void onTickHead(boolean skipRecheckGaps, CallbackInfo ci) {
final List<Chunk> neighbors = this.getSurroundingChunks(); final List<Chunk> neighbors = this.getSurroundingChunks();
if (this.isGapLightingUpdated && this.world.worldProvider.m() && !skipRecheckGaps && !neighbors.isEmpty()) { // PAIL: hasSkyLight if (this.isGapLightingUpdated && this.world.worldProvider.m() && !skipRecheckGaps && !neighbors.isEmpty()) { // OBFHELPER: hasSkyLight
lightExecutorService.execute(() -> { lightExecutorService.execute(() -> {
this.recheckGapsAsync(neighbors); this.recheckGapsAsync(neighbors);
}); });
@@ -141,10 +141,10 @@ public abstract class MixinChunk implements IMixinChunk {
while (!this.tileEntityPosQueue.isEmpty()) { while (!this.tileEntityPosQueue.isEmpty()) {
BlockPosition blockpos = this.tileEntityPosQueue.poll(); BlockPosition blockpos = this.tileEntityPosQueue.poll();
if (this.getTileEntity(blockpos, Chunk.EnumTileEntityState.CHECK) == null && this.getBlockData(blockpos).getBlock().isTileEntity()) { // PAIL: getTileEntity if (this.getTileEntity(blockpos, Chunk.EnumTileEntityState.CHECK) == null && this.getBlockData(blockpos).getBlock().isTileEntity()) { // OBFHELPER: getTileEntity
TileEntity tileentity = this.createNewTileEntity(blockpos); TileEntity tileentity = this.createNewTileEntity(blockpos);
this.world.setTileEntity(blockpos, tileentity); this.world.setTileEntity(blockpos, tileentity);
this.world.b(blockpos, blockpos); // PAIL: markBlockRangeForRenderUpdate this.world.b(blockpos, blockpos); // OBFHELPER: markBlockRangeForRenderUpdate
} }
} }
ci.cancel(); ci.cancel();
@@ -157,7 +157,7 @@ public abstract class MixinChunk implements IMixinChunk {
return BlockPosition.ZERO; return BlockPosition.ZERO;
} }
return new BlockPosition(pos.getX(), chunk.b(pos.getX() & 15, pos.getZ() & 15), pos.getZ()); // PAIL: getHeightValue return new BlockPosition(pos.getX(), chunk.b(pos.getX() & 15, pos.getZ() & 15), pos.getZ()); // OBFHELPER: getHeightValue
} }
@Redirect(method = "a(IIII)V", at = @At(value = "INVOKE", target = "net/minecraft/server/World.areChunksLoaded(Lnet/minecraft/server/BlockPosition;I)Z")) @Redirect(method = "a(IIII)V", at = @At(value = "INVOKE", target = "net/minecraft/server/World.areChunksLoaded(Lnet/minecraft/server/BlockPosition;I)Z"))
@@ -190,7 +190,7 @@ public abstract class MixinChunk implements IMixinChunk {
if (chunk == null || chunk.isUnloading()) { if (chunk == null || chunk.isUnloading()) {
continue; continue;
} }
j1 = Math.min(j1, chunk.w()); // PAIL: getLowestHeight j1 = Math.min(j1, chunk.w()); // OBFHELPER: getLowestHeight
} }
this.checkSkylightNeighborHeight(l, i1, j1); this.checkSkylightNeighborHeight(l, i1, j1);
@@ -271,7 +271,7 @@ public abstract class MixinChunk implements IMixinChunk {
this.isLightPopulated = true; this.isLightPopulated = true;
BlockPosition blockpos = new BlockPosition(this.locX << 4, 0, this.locZ << 4); BlockPosition blockpos = new BlockPosition(this.locX << 4, 0, this.locZ << 4);
if (this.world.worldProvider.m()) { // PAIL: hasSkyLight if (this.world.worldProvider.m()) { // OBFHELPER: hasSkyLight
reCheckLight: reCheckLight:
for (int i = 0; i < 16; ++i) { for (int i = 0; i < 16; ++i) {
@@ -285,13 +285,13 @@ public abstract class MixinChunk implements IMixinChunk {
if (this.isLightPopulated) { if (this.isLightPopulated) {
for (EnumDirection enumfacing : EnumDirection.EnumDirectionLimit.HORIZONTAL) { for (EnumDirection enumfacing : EnumDirection.EnumDirectionLimit.HORIZONTAL) {
int k = enumfacing.c() == EnumDirection.EnumAxisDirection.POSITIVE ? 16 : 1; // PAIL: getAxisDirection int k = enumfacing.c() == EnumDirection.EnumAxisDirection.POSITIVE ? 16 : 1; // OBFHELPER: getAxisDirection
final BlockPosition pos = blockpos.shift(enumfacing, k); final BlockPosition pos = blockpos.shift(enumfacing, k);
final Chunk chunk = this.getLightChunk(pos.getX() >> 4, pos.getZ() >> 4, neighbors); final Chunk chunk = this.getLightChunk(pos.getX() >> 4, pos.getZ() >> 4, neighbors);
if (chunk == null) { if (chunk == null) {
continue; continue;
} }
chunk.a(enumfacing.opposite()); // PAIL: checkLightSide chunk.a(enumfacing.opposite()); // OBFHELPER: checkLightSide
} }
this.setSkylightUpdated(); this.setSkylightUpdated();
@@ -315,7 +315,7 @@ public abstract class MixinChunk implements IMixinChunk {
for (int j = i + 16 - 1; j > this.world.getSeaLevel() || j > 0 && !flag1; --j) { for (int j = i + 16 - 1; j > this.world.getSeaLevel() || j > 0 && !flag1; --j) {
blockpos$mutableblockpos.setValues(blockpos$mutableblockpos.getX(), j, blockpos$mutableblockpos.getZ()); blockpos$mutableblockpos.setValues(blockpos$mutableblockpos.getX(), j, blockpos$mutableblockpos.getZ());
int k = this.getBlockData(blockpos$mutableblockpos).c(); // PAIL: getLightOpacity int k = this.getBlockData(blockpos$mutableblockpos).c(); // OBFHELPER: getLightOpacity
if (k == 255 && blockpos$mutableblockpos.getY() < this.world.getSeaLevel()) { if (k == 255 && blockpos$mutableblockpos.getY() < this.world.getSeaLevel()) {
flag1 = true; flag1 = true;
@@ -349,7 +349,7 @@ public abstract class MixinChunk implements IMixinChunk {
*/ */
private Chunk getLightChunk(int chunkX, int chunkZ, List<Chunk> neighbors) { private Chunk getLightChunk(int chunkX, int chunkZ, List<Chunk> neighbors) {
final Chunk currentChunk = (Chunk) (Object) this; final Chunk currentChunk = (Chunk) (Object) this;
if (currentChunk.a(chunkX, chunkZ)) { // PAIL: isAtLocation if (currentChunk.a(chunkX, chunkZ)) { // OBFHELPER: isAtLocation
if (currentChunk.isUnloading()) { if (currentChunk.isUnloading()) {
return null; return null;
} }
@@ -362,7 +362,7 @@ public abstract class MixinChunk implements IMixinChunk {
} }
} }
for (Chunk neighbor : neighbors) { for (Chunk neighbor : neighbors) {
if (neighbor.a(chunkX, chunkZ)) { // PAIL: isAtLocation if (neighbor.a(chunkX, chunkZ)) { // OBFHELPER: isAtLocation
if (neighbor.isUnloading()) { if (neighbor.isUnloading()) {
return null; return null;
} }
@@ -469,7 +469,7 @@ public abstract class MixinChunk implements IMixinChunk {
j = y; j = y;
} }
while (j > 0 && this.getBlockData(x, j - 1, z).c() == 0) { // PAIL: getLightOpacity while (j > 0 && this.getBlockData(x, j - 1, z).c() == 0) { // OBFHELPER: getLightOpacity
--j; --j;
} }
@@ -479,14 +479,14 @@ public abstract class MixinChunk implements IMixinChunk {
int k = this.locX * 16 + x; int k = this.locX * 16 + x;
int l = this.locZ * 16 + z; int l = this.locZ * 16 + z;
if (this.world.worldProvider.m()) { // PAIL: hasSkyLight if (this.world.worldProvider.m()) { // OBFHELPER: hasSkyLight
if (j < i) { if (j < i) {
for (int j1 = j; j1 < i; ++j1) { for (int j1 = j; j1 < i; ++j1) {
ChunkSection extendedblockstorage2 = this.sections[j1 >> 4]; ChunkSection extendedblockstorage2 = this.sections[j1 >> 4];
if (extendedblockstorage2 != Chunk.EMPTY_CHUNK_SECTION) { if (extendedblockstorage2 != Chunk.EMPTY_CHUNK_SECTION) {
extendedblockstorage2.a(x, j1 & 15, z, 15); // PAIL: setSkyLight extendedblockstorage2.a(x, j1 & 15, z, 15); // OBFHELPER: setSkyLight
// this.world.m(new BlockPosition((this.locX << 4) + x, j1, (this.locZ << 4) + z)); // PAIL: notifyLightSet - client side // this.world.m(new BlockPosition((this.locX << 4) + x, j1, (this.locZ << 4) + z)); // OBFHELPER: notifyLightSet - client side
} }
} }
} else { } else {
@@ -494,8 +494,8 @@ public abstract class MixinChunk implements IMixinChunk {
ChunkSection extendedblockstorage = this.sections[i1 >> 4]; ChunkSection extendedblockstorage = this.sections[i1 >> 4];
if (extendedblockstorage != Chunk.EMPTY_CHUNK_SECTION) { if (extendedblockstorage != Chunk.EMPTY_CHUNK_SECTION) {
extendedblockstorage.a(x, i1 & 15, z, 0); // PAIL: setSkyLight extendedblockstorage.a(x, i1 & 15, z, 0); // OBFHELPER: setSkyLight
// this.world.m(new BlockPosition((this.locX << 4) + x, i1, (this.locZ << 4) + z)); // PAIL: notifyLightSet - client side // this.world.m(new BlockPosition((this.locX << 4) + x, i1, (this.locZ << 4) + z)); // OBFHELPER: notifyLightSet - client side
} }
} }
} }
@@ -519,7 +519,7 @@ public abstract class MixinChunk implements IMixinChunk {
ChunkSection extendedblockstorage1 = this.sections[j >> 4]; ChunkSection extendedblockstorage1 = this.sections[j >> 4];
if (extendedblockstorage1 != Chunk.EMPTY_CHUNK_SECTION) { if (extendedblockstorage1 != Chunk.EMPTY_CHUNK_SECTION) {
extendedblockstorage1.a(x, j & 15, z, k1); // PAIL: setSkyLight extendedblockstorage1.a(x, j & 15, z, k1); // OBFHELPER: setSkyLight
} }
} }
} }
@@ -537,9 +537,9 @@ public abstract class MixinChunk implements IMixinChunk {
this.heightMapMinimum = l1; this.heightMapMinimum = l1;
} }
if (this.world.worldProvider.m()) { // PAIL: hasSkyLight if (this.world.worldProvider.m()) { // OBFHELPER: hasSkyLight
for (EnumDirection enumfacing : EnumDirection.EnumDirectionLimit.HORIZONTAL) { for (EnumDirection enumfacing : EnumDirection.EnumDirectionLimit.HORIZONTAL) {
this.updateSkylightNeighborHeight(k + enumfacing.getAdjacentX(), l + enumfacing.getAdjacentZ(), j2, k2); // PAIL: updateSkylightNeighborHeight this.updateSkylightNeighborHeight(k + enumfacing.getAdjacentX(), l + enumfacing.getAdjacentZ(), j2, k2); // OBFHELPER: updateSkylightNeighborHeight
} }
this.updateSkylightNeighborHeight(k, l, j2, k2); this.updateSkylightNeighborHeight(k, l, j2, k2);
@@ -565,7 +565,7 @@ public abstract class MixinChunk implements IMixinChunk {
x2 = i; x2 = i;
} }
if (this.world.worldProvider.m()) { // PAIL: hasSkyLight if (this.world.worldProvider.m()) { // OBFHELPER: hasSkyLight
for (int j = x2; j <= z2; ++j) { for (int j = x2; j <= z2; ++j) {
final BlockPosition pos = new BlockPosition(x1, j, z1); final BlockPosition pos = new BlockPosition(x1, j, z1);
final Chunk chunk = this.getLightChunk(pos.getX() >> 4, pos.getZ() >> 4, null); final Chunk chunk = this.getLightChunk(pos.getX() >> 4, pos.getZ() >> 4, null);
@@ -576,7 +576,7 @@ public abstract class MixinChunk implements IMixinChunk {
} }
} }
this.world.b(x1, x2, z1, x1, z2, z1); // PAIL: markBlockRangeForRenderUpdate this.world.b(x1, x2, z1, x1, z2, z1); // OBFHELPER: markBlockRangeForRenderUpdate
} }
/** /**
@@ -613,7 +613,7 @@ public abstract class MixinChunk implements IMixinChunk {
return false; return false;
} }
if (this.world.worldProvider.m()) { // PAIL: hasSkyLight if (this.world.worldProvider.m()) { // OBFHELPER: hasSkyLight
flag |= ((IMixinWorldServer) this.world).updateLightAsync(EnumSkyBlock.SKY, pos, chunk); flag |= ((IMixinWorldServer) this.world).updateLightAsync(EnumSkyBlock.SKY, pos, chunk);
} }

View File

@@ -37,7 +37,7 @@ import net.minecraft.server.World;
@Mixin(value = World.class, remap = false, priority = 1002) @Mixin(value = World.class, remap = false, priority = 1002)
public abstract class MixinWorld { public abstract class MixinWorld {
@Shadow protected IChunkProvider chunkProvider; @Shadow protected IChunkProvider chunkProvider;
@Shadow int[] J; // PAIL: lightUpdateBlockList @Shadow int[] J; // OBFHELPER: lightUpdateBlockList
@Shadow(aliases = "c") public abstract boolean checkLightFor(EnumSkyBlock lightType, BlockPosition pos); @Shadow(aliases = "c") public abstract boolean checkLightFor(EnumSkyBlock lightType, BlockPosition pos);
@Shadow public abstract MinecraftServer getMinecraftServer(); @Shadow public abstract MinecraftServer getMinecraftServer();

View File

@@ -63,7 +63,7 @@ public abstract class MixinWorldServer extends MixinWorld implements IMixinWorld
} }
@Override @Override
public boolean checkLightFor(EnumSkyBlock lightType, BlockPosition pos) { // PAIL: checkLightFor public boolean checkLightFor(EnumSkyBlock lightType, BlockPosition pos) { // OBFHELPER: checkLightFor
return updateLightAsync(lightType, pos, null); return updateLightAsync(lightType, pos, null);
} }
@@ -83,12 +83,12 @@ public abstract class MixinWorldServer extends MixinWorld implements IMixinWorld
int z = pos.getZ(); int z = pos.getZ();
if (rawLight > current) { if (rawLight > current) {
this.J[blockIndex++] = 133152; // PAIL: lightUpdateBlockList this.J[blockIndex++] = 133152; // OBFHELPER: lightUpdateBlockList
} else if (rawLight < current) { } else if (rawLight < current) {
this.J[blockIndex++] = 133152 | current << 18; // PAIL: lightUpdateBlockList this.J[blockIndex++] = 133152 | current << 18; // OBFHELPER: lightUpdateBlockList
while (recheckIndex < blockIndex) { while (recheckIndex < blockIndex) {
int blockData = this.J[recheckIndex++]; // PAIL: lightUpdateBlockList int blockData = this.J[recheckIndex++]; // OBFHELPER: lightUpdateBlockList
int i2 = (blockData & 63) - 32 + x; int i2 = (blockData & 63) - 32 + x;
int j2 = (blockData >> 6 & 63) - 32 + y; int j2 = (blockData >> 6 & 63) - 32 + y;
int k2 = (blockData >> 12 & 63) - 32 + z; int k2 = (blockData >> 12 & 63) - 32 + z;
@@ -117,12 +117,12 @@ public abstract class MixinWorldServer extends MixinWorld implements IMixinWorld
if (pooledChunk == null) { if (pooledChunk == null) {
continue; continue;
} }
int opacity = Math.max(1, pooledChunk.getBlockData(mutableBlockpos).c()); // PAIL: getLightOpacity int opacity = Math.max(1, pooledChunk.getBlockData(mutableBlockpos).c()); // OBFHELPER: getLightOpacity
lightLevel = this.getLightForAsync(lightType, mutableBlockpos, currentChunk, neighbors); lightLevel = this.getLightForAsync(lightType, mutableBlockpos, currentChunk, neighbors);
// Sponge end // Sponge end
if (lightLevel == l2 - opacity && blockIndex < this.J.length) { // PAIL: lightUpdateBlockList if (lightLevel == l2 - opacity && blockIndex < this.J.length) { // OBFHELPER: lightUpdateBlockList
this.J[blockIndex++] = i4 - x + 32 | j4 - y + 32 << 6 | k4 - z + 32 << 12 | l2 - opacity << 18; // PAIL: lightUpdateBlockList this.J[blockIndex++] = i4 - x + 32 | j4 - y + 32 << 6 | k4 - z + 32 << 12 | l2 - opacity << 18; // OBFHELPER: lightUpdateBlockList
} }
} }
@@ -136,7 +136,7 @@ public abstract class MixinWorldServer extends MixinWorld implements IMixinWorld
} }
while (recheckIndex < blockIndex) { while (recheckIndex < blockIndex) {
int i5 = this.J[recheckIndex++]; // PAIL: lightUpdateBlockList int i5 = this.J[recheckIndex++]; // OBFHELPER: lightUpdateBlockList
int j5 = (i5 & 63) - 32 + x; int j5 = (i5 & 63) - 32 + x;
int k5 = (i5 >> 6 & 63) - 32 + y; int k5 = (i5 >> 6 & 63) - 32 + y;
int l5 = (i5 >> 12 & 63) - 32 + z; int l5 = (i5 >> 12 & 63) - 32 + z;
@@ -151,32 +151,32 @@ public abstract class MixinWorldServer extends MixinWorld implements IMixinWorld
int k6 = Math.abs(j5 - x); int k6 = Math.abs(j5 - x);
int l6 = Math.abs(k5 - y); int l6 = Math.abs(k5 - y);
int i7 = Math.abs(l5 - z); int i7 = Math.abs(l5 - z);
boolean flag = blockIndex < this.J.length - 6; // PAIL: lightUpdateBlockList boolean flag = blockIndex < this.J.length - 6; // OBFHELPER: lightUpdateBlockList
if (k6 + l6 + i7 < 17 && flag) { if (k6 + l6 + i7 < 17 && flag) {
// Sponge start - use thread safe method getLightForAsync // Sponge start - use thread safe method getLightForAsync
if (this.getLightForAsync(lightType, blockpos1.west(), currentChunk, neighbors) < j6) { if (this.getLightForAsync(lightType, blockpos1.west(), currentChunk, neighbors) < j6) {
this.J[blockIndex++] = j5 - 1 - x + 32 + (k5 - y + 32 << 6) + (l5 - z + 32 << 12); // PAIL: lightUpdateBlockList this.J[blockIndex++] = j5 - 1 - x + 32 + (k5 - y + 32 << 6) + (l5 - z + 32 << 12); // OBFHELPER: lightUpdateBlockList
} }
if (this.getLightForAsync(lightType, blockpos1.east(), currentChunk, neighbors) < j6) { if (this.getLightForAsync(lightType, blockpos1.east(), currentChunk, neighbors) < j6) {
this.J[blockIndex++] = j5 + 1 - x + 32 + (k5 - y + 32 << 6) + (l5 - z + 32 << 12); // PAIL: lightUpdateBlockList this.J[blockIndex++] = j5 + 1 - x + 32 + (k5 - y + 32 << 6) + (l5 - z + 32 << 12); // OBFHELPER: lightUpdateBlockList
} }
if (this.getLightForAsync(lightType, blockpos1.down(), currentChunk, neighbors) < j6) { if (this.getLightForAsync(lightType, blockpos1.down(), currentChunk, neighbors) < j6) {
this.J[blockIndex++] = j5 - x + 32 + (k5 - 1 - y + 32 << 6) + (l5 - z + 32 << 12); // PAIL: lightUpdateBlockList this.J[blockIndex++] = j5 - x + 32 + (k5 - 1 - y + 32 << 6) + (l5 - z + 32 << 12); // OBFHELPER: lightUpdateBlockList
} }
if (this.getLightForAsync(lightType, blockpos1.up(), currentChunk, neighbors) < j6) { if (this.getLightForAsync(lightType, blockpos1.up(), currentChunk, neighbors) < j6) {
this.J[blockIndex++] = j5 - x + 32 + (k5 + 1 - y + 32 << 6) + (l5 - z + 32 << 12); // PAIL: lightUpdateBlockList this.J[blockIndex++] = j5 - x + 32 + (k5 + 1 - y + 32 << 6) + (l5 - z + 32 << 12); // OBFHELPER: lightUpdateBlockList
} }
if (this.getLightForAsync(lightType, blockpos1.north(), currentChunk, neighbors) < j6) { if (this.getLightForAsync(lightType, blockpos1.north(), currentChunk, neighbors) < j6) {
this.J[blockIndex++] = j5 - x + 32 + (k5 - y + 32 << 6) + (l5 - 1 - z + 32 << 12); // PAIL: lightUpdateBlockList this.J[blockIndex++] = j5 - x + 32 + (k5 - y + 32 << 6) + (l5 - 1 - z + 32 << 12); // OBFHELPER: lightUpdateBlockList
} }
if (this.getLightForAsync(lightType, blockpos1.south(), currentChunk, neighbors) < j6) { if (this.getLightForAsync(lightType, blockpos1.south(), currentChunk, neighbors) < j6) {
this.J[blockIndex++] = j5 - x + 32 + (k5 - y + 32 << 6) + (l5 + 1 - z + 32 << 12); // PAIL: lightUpdateBlockList this.J[blockIndex++] = j5 - x + 32 + (k5 - y + 32 << 6) + (l5 + 1 - z + 32 << 12); // OBFHELPER: lightUpdateBlockList
} }
// Sponge end // Sponge end
} }
@@ -265,14 +265,14 @@ public abstract class MixinWorldServer extends MixinWorld implements IMixinWorld
// Thread safe methods to retrieve a chunk during async light updates // Thread safe methods to retrieve a chunk during async light updates
// Each method avoids calling getLoadedChunk and instead accesses the passed neighbor chunk list to avoid concurrency issues // Each method avoids calling getLoadedChunk and instead accesses the passed neighbor chunk list to avoid concurrency issues
public Chunk getLightChunk(BlockPosition pos, Chunk currentChunk, List<Chunk> neighbors) { public Chunk getLightChunk(BlockPosition pos, Chunk currentChunk, List<Chunk> neighbors) {
if (currentChunk.a(pos.getX() >> 4, pos.getZ() >> 4)) { // PAIL: isAtLocation if (currentChunk.a(pos.getX() >> 4, pos.getZ() >> 4)) { // OBFHELPER: isAtLocation
if (currentChunk.isUnloading()) { if (currentChunk.isUnloading()) {
return null; return null;
} }
return currentChunk; return currentChunk;
} }
for (Chunk neighbor : neighbors) { for (Chunk neighbor : neighbors) {
if (neighbor.a(pos.getX() >> 4, pos.getZ() >> 4)) { // PAIL: isAtLocation if (neighbor.a(pos.getX() >> 4, pos.getZ() >> 4)) { // OBFHELPER: isAtLocation
if (neighbor.isUnloading()) { if (neighbor.isUnloading()) {
return null; return null;
} }
@@ -288,12 +288,12 @@ public abstract class MixinWorldServer extends MixinWorld implements IMixinWorld
pos = new BlockPosition(pos.getX(), 0, pos.getZ()); pos = new BlockPosition(pos.getX(), 0, pos.getZ());
} }
if (!pos.isValidLocation()) { if (!pos.isValidLocation()) {
return lightType.c; // PAIL: defaultLightValue return lightType.c; // OBFHELPER: defaultLightValue
} }
final Chunk chunk = this.getLightChunk(pos, currentChunk, neighbors); final Chunk chunk = this.getLightChunk(pos, currentChunk, neighbors);
if (chunk == null || chunk.isUnloading()) { if (chunk == null || chunk.isUnloading()) {
return lightType.c; // PAIL: defaultLightValue return lightType.c; // OBFHELPER: defaultLightValue
} }
return chunk.getBrightness(lightType, pos); return chunk.getBrightness(lightType, pos);
@@ -302,15 +302,15 @@ public abstract class MixinWorldServer extends MixinWorld implements IMixinWorld
private int getRawBlockLightAsync(EnumSkyBlock lightType, BlockPosition pos, Chunk currentChunk, List<Chunk> neighbors) { private int getRawBlockLightAsync(EnumSkyBlock lightType, BlockPosition pos, Chunk currentChunk, List<Chunk> neighbors) {
final Chunk chunk = getLightChunk(pos, currentChunk, neighbors); final Chunk chunk = getLightChunk(pos, currentChunk, neighbors);
if (chunk == null || chunk.isUnloading()) { if (chunk == null || chunk.isUnloading()) {
return lightType.c; // PAIL: defaultLightValue return lightType.c; // OBFHELPER: defaultLightValue
} }
if (lightType == EnumSkyBlock.SKY && chunk.c(pos)) { // PAIL: canSeeSky if (lightType == EnumSkyBlock.SKY && chunk.c(pos)) { // OBFHELPER: canSeeSky
return 15; return 15;
} else { } else {
IBlockData blockData = chunk.getBlockData(pos); IBlockData blockData = chunk.getBlockData(pos);
int blockLight = blockData.d(); // getLightValue int blockLight = blockData.d(); // getLightValue
int rawLight = lightType == EnumSkyBlock.SKY ? 0 : blockLight; int rawLight = lightType == EnumSkyBlock.SKY ? 0 : blockLight;
int opacity = blockData.c(); // PAIL: getLightOpacity int opacity = blockData.c(); // OBFHELPER: getLightOpacity
if (opacity >= 15 && blockLight > 0) { if (opacity >= 15 && blockLight > 0) {
opacity = 1; opacity = 1;
@@ -347,7 +347,7 @@ public abstract class MixinWorldServer extends MixinWorld implements IMixinWorld
if (pos.isValidLocation()) { if (pos.isValidLocation()) {
final Chunk chunk = this.getLightChunk(pos, currentChunk, neighbors); final Chunk chunk = this.getLightChunk(pos, currentChunk, neighbors);
if (chunk != null && !chunk.isUnloading()) { if (chunk != null && !chunk.isUnloading()) {
chunk.a(type, pos, lightValue); // PAIL: setLightFor chunk.a(type, pos, lightValue); // OBFHELPER: setLightFor
// this.notifyLightSet(pos); // client side // this.notifyLightSet(pos); // client side
} }
} }

View File

@@ -77,7 +77,7 @@ public abstract class NonblockingServerConnection {
Class<? extends ServerChannel> channelClass; Class<? extends ServerChannel> channelClass;
EventLoopGroup loopGroup; EventLoopGroup loopGroup;
if (Epoll.isAvailable() && this.server.af()) { // PAIL: MinecraftServer::useNativeTransport if (Epoll.isAvailable() && this.server.af()) { // OBFHELPER: MinecraftServer::useNativeTransport
channelClass = EpollServerSocketChannel.class; channelClass = EpollServerSocketChannel.class;
loopGroup = ServerConnection.b.c(); loopGroup = ServerConnection.b.c();
logger.info("Using epoll channel type"); logger.info("Using epoll channel type");
@@ -122,7 +122,7 @@ public abstract class NonblockingServerConnection {
} }
} }
@Shadow public volatile boolean d; // PAIL: neverTerminate @Shadow public volatile boolean d; // OBFHELPER: neverTerminate
/** /**
* Shuts down all open endpoints * Shuts down all open endpoints
*/ */
@@ -139,7 +139,7 @@ public abstract class NonblockingServerConnection {
public void processPackets(NetworkManager manager) { public void processPackets(NetworkManager manager) {
try { try {
manager.a(); // PAIL: NetworkManager::processReceivedPackets manager.a(); // OBFHELPER: NetworkManager::processReceivedPackets
} catch (Exception ex) { } catch (Exception ex) {
logger.warn("Failed to handle packet for {}", manager.getSocketAddress(), ex); logger.warn("Failed to handle packet for {}", manager.getSocketAddress(), ex);
final ChatComponentText message = new ChatComponentText("Internal server error"); final ChatComponentText message = new ChatComponentText("Internal server error");
@@ -168,7 +168,7 @@ public abstract class NonblockingServerConnection {
Iterator<NetworkManager> it = networkManagers.iterator(); Iterator<NetworkManager> it = networkManagers.iterator();
while (it.hasNext()) { while (it.hasNext()) {
NetworkManager manager = it.next(); NetworkManager manager = it.next();
if (manager.h()) continue; // PAIL: NetworkManager::hasNoChannel if (manager.h()) continue; // OBFHELPER: NetworkManager::hasNoChannel
if (manager.isConnected()) { if (manager.isConnected()) {
processPackets(manager); processPackets(manager);

View File

@@ -29,7 +29,7 @@ public abstract class OptimisticNetworkManager {
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
private static final QueuedPacket SIGNAL_PACKET = new QueuedPacket(null); private static final QueuedPacket SIGNAL_PACKET = new QueuedPacket(null);
@Overwrite // PAIL: trySendQueue @Overwrite // OBFHELPER: trySendQueue
private boolean m() { private boolean m() {
if (this.channel != null && this.channel.isOpen()) { if (this.channel != null && this.channel.isOpen()) {
if (this.packets.isEmpty()) { // return if the packet queue is empty so that the write lock by Anti-Xray doesn't affect the vanilla performance at all if (this.packets.isEmpty()) { // return if the packet queue is empty so that the write lock by Anti-Xray doesn't affect the vanilla performance at all

View File

@@ -18,7 +18,7 @@ public abstract class MixinEntity {
private boolean isInLava; private boolean isInLava;
private int lastLavaCheck = Integer.MIN_VALUE; private int lastLavaCheck = Integer.MIN_VALUE;
@Overwrite // PAIL: isInLava @Overwrite // OBFHELPER: isInLava
public boolean au() { public boolean au() {
/* /*
* This originally comes from Migot (https://github.com/Poweruser/Migot/commit/cafbf1707107d2a3aa6232879f305975bb1f0285) * This originally comes from Migot (https://github.com/Poweruser/Migot/commit/cafbf1707107d2a3aa6232879f305975bb1f0285)

View File

@@ -150,7 +150,7 @@ public abstract class PandaRedstoneWire extends Block {
IBlockData state = worldIn.getType(pos); IBlockData state = worldIn.getType(pos);
int oldPower = state.get(BlockRedstoneWire.POWER).intValue(); int oldPower = state.get(BlockRedstoneWire.POWER).intValue();
this.canProvidePower = false; this.canProvidePower = false;
int blockPower = worldIn.z(pos); // PAIL: isBlockIndirectlyGettingPowered int blockPower = worldIn.z(pos); // OBFHELPER: isBlockIndirectlyGettingPowered
this.canProvidePower = true; this.canProvidePower = true;
int wirePower = this.getSurroundingWirePower(worldIn, pos); int wirePower = this.getSurroundingWirePower(worldIn, pos);
@@ -188,7 +188,7 @@ public abstract class PandaRedstoneWire extends Block {
IBlockData state = worldIn.getType(pos); IBlockData state = worldIn.getType(pos);
int oldPower = state.get(BlockRedstoneWire.POWER).intValue(); int oldPower = state.get(BlockRedstoneWire.POWER).intValue();
this.canProvidePower = false; this.canProvidePower = false;
int blockPower = worldIn.z(pos); // PAIL: isBlockIndirectlyGettingPowered int blockPower = worldIn.z(pos); // OBFHELPER: isBlockIndirectlyGettingPowered
this.canProvidePower = true; this.canProvidePower = true;
int wirePower = this.getSurroundingWirePower(worldIn, pos); int wirePower = this.getSurroundingWirePower(worldIn, pos);
// Lower the strength as it moved a block // Lower the strength as it moved a block
@@ -264,11 +264,11 @@ public abstract class PandaRedstoneWire extends Block {
} }
for (EnumDirection facingVertical : facingsVertical) { for (EnumDirection facingVertical : facingsVertical) {
BlockPosition offsetPos = pos.shift(facingVertical); BlockPosition offsetPos = pos.shift(facingVertical);
boolean solidBlock = worldIn.getType(offsetPos).k(); // PAIL: isBlockNormalCube boolean solidBlock = worldIn.getType(offsetPos).k(); // OBFHELPER: isBlockNormalCube
for (EnumDirection facingHorizontal : facingsHorizontal) { for (EnumDirection facingHorizontal : facingsHorizontal) {
// wire can travel upwards if the block on top doesn't cut the wire (is non-solid) // wire can travel upwards if the block on top doesn't cut the wire (is non-solid)
// it can travel down if the block below is solid and the block "diagonal" doesn't cut off the wire (is non-solid) // it can travel down if the block below is solid and the block "diagonal" doesn't cut off the wire (is non-solid)
if ((facingVertical == EnumDirection.UP && !solidBlock) || (facingVertical == EnumDirection.DOWN && solidBlock && !worldIn.getType(offsetPos.shift(facingHorizontal)).k())) { // PAIL: isBlockNormalCube if ((facingVertical == EnumDirection.UP && !solidBlock) || (facingVertical == EnumDirection.DOWN && solidBlock && !worldIn.getType(offsetPos.shift(facingHorizontal)).k())) { // OBFHELPER: isBlockNormalCube
this.addWireToList(worldIn, offsetPos.shift(facingHorizontal), ownPower); this.addWireToList(worldIn, offsetPos.shift(facingHorizontal), ownPower);
} }
} }
@@ -292,10 +292,10 @@ public abstract class PandaRedstoneWire extends Block {
wirePower = this.getPower(worldIn, offsetPos, wirePower); wirePower = this.getPower(worldIn, offsetPos, wirePower);
// Block below the wire need to be solid (Upwards diode of slabs/stairs/glowstone) and no block should cut the wire // Block below the wire need to be solid (Upwards diode of slabs/stairs/glowstone) and no block should cut the wire
if(worldIn.getType(offsetPos).l() && !worldIn.getType(pos.up()).l()) { // PAIL: isNormalCube if(worldIn.getType(offsetPos).l() && !worldIn.getType(pos.up()).l()) { // OBFHELPER: isNormalCube
wirePower = this.getPower(worldIn, offsetPos.up(), wirePower); wirePower = this.getPower(worldIn, offsetPos.up(), wirePower);
// Only get from power below if no block is cutting the wire // Only get from power below if no block is cutting the wire
} else if (!worldIn.getType(offsetPos).l()) { // PAIL: isNormalCube } else if (!worldIn.getType(offsetPos).l()) { // OBFHELPER: isNormalCube
wirePower = this.getPower(worldIn, offsetPos.down(), wirePower); wirePower = this.getPower(worldIn, offsetPos.down(), wirePower);
} }
} }
@@ -327,7 +327,7 @@ public abstract class PandaRedstoneWire extends Block {
// Later add blocks around the surrounding blocks that get powered // Later add blocks around the surrounding blocks that get powered
for (EnumDirection facing : facings) { for (EnumDirection facing : facings) {
BlockPosition offsetPos = pos.shift(facing); BlockPosition offsetPos = pos.shift(facing);
if (!connectedSides.contains(facing.opposite()) && facing != EnumDirection.DOWN || !worldIn.getType(offsetPos).l()) continue; // PAIL: isNormalCube if (!connectedSides.contains(facing.opposite()) && facing != EnumDirection.DOWN || !worldIn.getType(offsetPos).l()) continue; // OBFHELPER: isNormalCube
for (EnumDirection facing1 : facings) { for (EnumDirection facing1 : facings) {
if (this.canBlockBePoweredFromSide(worldIn.getType(offsetPos.shift(facing1)), facing1, false)) if (this.canBlockBePoweredFromSide(worldIn.getType(offsetPos.shift(facing1)), facing1, false))
set.add(offsetPos.shift(facing1)); set.add(offsetPos.shift(facing1));
@@ -412,7 +412,7 @@ public abstract class PandaRedstoneWire extends Block {
*/ */
private void addAllSurroundingBlocks(BlockPosition pos, Set<BlockPosition> set) { private void addAllSurroundingBlocks(BlockPosition pos, Set<BlockPosition> set) {
for (BaseBlockPosition vect : surroundingBlocksOffset) { for (BaseBlockPosition vect : surroundingBlocksOffset) {
set.add(pos.a(vect)); // PAIL: add set.add(pos.a(vect)); // OBFHELPER: add
} }
} }
@@ -445,7 +445,7 @@ public abstract class PandaRedstoneWire extends Block {
public void onPlace(World world, BlockPosition pos, IBlockData state) { public void onPlace(World world, BlockPosition pos, IBlockData state) {
this.updateSurroundingRedstone(world, pos); this.updateSurroundingRedstone(world, pos);
for (BaseBlockPosition vec : surroundingBlocksOffset) { for (BaseBlockPosition vec : surroundingBlocksOffset) {
world.applyPhysics(pos.a(vec), this, false); // PAIL: add world.applyPhysics(pos.a(vec), this, false); // OBFHELPER: add
} }
} }
@@ -462,7 +462,7 @@ public abstract class PandaRedstoneWire extends Block {
super.remove(world, pos, state); super.remove(world, pos, state);
this.updateSurroundingRedstone(world, pos); this.updateSurroundingRedstone(world, pos);
for (BaseBlockPosition vec : surroundingBlocksOffset) { for (BaseBlockPosition vec : surroundingBlocksOffset) {
world.applyPhysics(pos.a(vec), this, false); // PAIL: add world.applyPhysics(pos.a(vec), this, false); // OBFHELPER: add
} }
} }
@@ -477,7 +477,7 @@ public abstract class PandaRedstoneWire extends Block {
*/ */
@Override @Override
@Overwrite @Overwrite
public int b(IBlockData blockState, IBlockAccess blockAccess, BlockPosition pos, EnumDirection side) { // PAIL: getWeakPower public int b(IBlockData blockState, IBlockAccess blockAccess, BlockPosition pos, EnumDirection side) { // OBFHELPER: getWeakPower
if (!this.canProvidePower) { if (!this.canProvidePower) {
return 0; return 0;
} else { } else {
@@ -494,14 +494,14 @@ public abstract class PandaRedstoneWire extends Block {
if (block == Blocks.REDSTONE_WIRE) { if (block == Blocks.REDSTONE_WIRE) {
return true; return true;
} else if (Blocks.UNPOWERED_REPEATER.D(blockState)) { // PAIL: isSameDiode } else if (Blocks.UNPOWERED_REPEATER.D(blockState)) { // OBFHELPER: isSameDiode
EnumDirection enumdirection1 = blockState.get(BlockRepeater.FACING); EnumDirection enumdirection1 = blockState.get(BlockRepeater.FACING);
return enumdirection1 == side || enumdirection1.opposite() == side; return enumdirection1 == side || enumdirection1.opposite() == side;
} else if (Blocks.dk == blockState.getBlock()) { } else if (Blocks.dk == blockState.getBlock()) {
return side == blockState.get(BlockObserver.FACING); // PAIL: OBSERVER return side == blockState.get(BlockObserver.FACING); // OBFHELPER: OBSERVER
} else { } else {
return blockState.m() && side != null; // PAIL: canProvidePower return blockState.m() && side != null; // OBFHELPER: canProvidePower
} }
} }

View File

@@ -50,23 +50,23 @@ public abstract class WeakEnchantmentManager {
@Overwrite @Overwrite
public static int a(Iterable<ItemStack> iterable, DamageSource damageSource) { public static int a(Iterable<ItemStack> iterable, DamageSource damageSource) {
protection.a = 0; // PAIL: damageModifier protection.a = 0; // OBFHELPER: damageModifier
protection.b = damageSource; protection.b = damageSource;
a(protection, iterable); // PAIL: applyEnchantmentModifierArray a(protection, iterable); // OBFHELPER: applyEnchantmentModifierArray
protection.b = null; // Akarin - Remove reference to Damagesource protection.b = null; // Akarin - Remove reference to Damagesource
return protection.a; return protection.a;
} }
@Overwrite @Overwrite
public static void a(EntityLiving user, Entity attacker) { // PAIL: applyThornEnchantments public static void a(EntityLiving user, Entity attacker) { // OBFHELPER: applyThornEnchantments
thorns.b = attacker; thorns.b = attacker;
thorns.a = user; thorns.a = user;
if (user != null) { if (user != null) {
a(thorns, user.aQ()); // PAIL: applyEnchantmentModifierArray - getEquipmentAndArmor a(thorns, user.aQ()); // OBFHELPER: applyEnchantmentModifierArray - getEquipmentAndArmor
} }
if (attacker instanceof EntityHuman) { if (attacker instanceof EntityHuman) {
a(thorns, user.getItemInMainHand()); // PAIL: applyEnchantmentModifier a(thorns, user.getItemInMainHand()); // OBFHELPER: applyEnchantmentModifier
} }
// Akarin Start - remove references to entity objects to avoid memory leaks // Akarin Start - remove references to entity objects to avoid memory leaks
@@ -76,15 +76,15 @@ public abstract class WeakEnchantmentManager {
} }
@Overwrite @Overwrite
public static void b(EntityLiving user, Entity target) { // PAIL: applyArthropodEnchantments public static void b(EntityLiving user, Entity target) { // OBFHELPER: applyArthropodEnchantments
arthropods.a = user; arthropods.a = user;
arthropods.b = target; arthropods.b = target;
if (user != null) { if (user != null) {
a(arthropods, user.aQ()); // PAIL: applyEnchantmentModifierArray - getEquipmentAndArmor a(arthropods, user.aQ()); // OBFHELPER: applyEnchantmentModifierArray - getEquipmentAndArmor
} }
if (user instanceof EntityHuman) { if (user instanceof EntityHuman) {
a(arthropods, user.getItemInMainHand()); // PAIL: applyEnchantmentModifier a(arthropods, user.getItemInMainHand()); // OBFHELPER: applyEnchantmentModifier
} }
// Akarin Start - remove references to entity objects to avoid memory leaks // Akarin Start - remove references to entity objects to avoid memory leaks

View File

@@ -41,16 +41,16 @@ public abstract class MixinEntity {
@Shadow protected int al; @Shadow protected int al;
@Shadow public World world; @Shadow public World world;
// PAIL: onEntityUpdate // OBFHELPER: onEntityUpdate
@Redirect(method = "Y()V", at = @At(value = "FIELD", target = ENTITY_RIDABLE_COOLDOWN_FIELD, opcode = Opcodes.PUTFIELD, ordinal = 0)) @Redirect(method = "Y()V", at = @At(value = "FIELD", target = ENTITY_RIDABLE_COOLDOWN_FIELD, opcode = Opcodes.PUTFIELD, ordinal = 0))
public void fixupEntityCooldown(Entity self, int modifier) { public void fixupEntityCooldown(Entity self, int modifier) {
int ticks = (int) ((IMixinRealTimeTicking) this.world).getRealTimeTicks(); int ticks = (int) ((IMixinRealTimeTicking) this.world).getRealTimeTicks();
this.j = Math.max(0, this.j - ticks); // PAIL: rideCooldown this.j = Math.max(0, this.j - ticks); // OBFHELPER: rideCooldown
} }
@Redirect(method = "Y()V", at = @At(value = "FIELD", target = ENTITY_PORTAL_COUNTER_FIELD, opcode = Opcodes.PUTFIELD, ordinal = 0)) @Redirect(method = "Y()V", at = @At(value = "FIELD", target = ENTITY_PORTAL_COUNTER_FIELD, opcode = Opcodes.PUTFIELD, ordinal = 0))
public void fixupPortalCounter(Entity self, int modifier) { public void fixupPortalCounter(Entity self, int modifier) {
int ticks = (int) ((IMixinRealTimeTicking) this.world).getRealTimeTicks(); int ticks = (int) ((IMixinRealTimeTicking) this.world).getRealTimeTicks();
this.al += ticks; // PAIL: portalCounter this.al += ticks; // OBFHELPER: portalCounter
} }
} }

View File

@@ -34,7 +34,7 @@ import net.minecraft.server.EntityAgeable;
public abstract class MixinEntityAgeable { public abstract class MixinEntityAgeable {
private static final String ENTITY_AGEABLE_SET_GROWING_AGE_METHOD = "Lnet/minecraft/entity/EntityAgeable;setAgeRaw(I)V"; private static final String ENTITY_AGEABLE_SET_GROWING_AGE_METHOD = "Lnet/minecraft/entity/EntityAgeable;setAgeRaw(I)V";
// PAIL: onLivingUpdate // OBFHELPER: onLivingUpdate
@Redirect(method = "n()V", at = @At(value = "INVOKE", target = ENTITY_AGEABLE_SET_GROWING_AGE_METHOD, ordinal = 0)) @Redirect(method = "n()V", at = @At(value = "INVOKE", target = ENTITY_AGEABLE_SET_GROWING_AGE_METHOD, ordinal = 0))
public void fixupGrowingUp(EntityAgeable self, int age) { public void fixupGrowingUp(EntityAgeable self, int age) {
// Subtract the one the original update method added // Subtract the one the original update method added

View File

@@ -37,19 +37,19 @@ import net.minecraft.server.EntityExperienceOrb;
public abstract class MixinEntityExperienceOrb { public abstract class MixinEntityExperienceOrb {
private static final String ENTITY_XP_DELAY_PICKUP_FIELD = "Lnet/minecraft/entity/item/EntityExperienceOrb;c:I"; // PUTFIELD: delayBeforeCanPickup private static final String ENTITY_XP_DELAY_PICKUP_FIELD = "Lnet/minecraft/entity/item/EntityExperienceOrb;c:I"; // PUTFIELD: delayBeforeCanPickup
private static final String ENTITY_XP_AGE_FIELD = "Lnet/minecraft/entity/item/EntityExperienceOrb;b:I"; // PUTFIELD: xpOrbAge private static final String ENTITY_XP_AGE_FIELD = "Lnet/minecraft/entity/item/EntityExperienceOrb;b:I"; // PUTFIELD: xpOrbAge
@Shadow public int c; // PAIL: delayBeforeCanPickup @Shadow public int c; // OBFHELPER: delayBeforeCanPickup
@Shadow public int b; // PAIL: xpOrbAge @Shadow public int b; // OBFHELPER: xpOrbAge
// PAIL: onUpdate // OBFHELPER: onUpdate
@Redirect(method = "B_()V", at = @At(value = "FIELD", target = ENTITY_XP_DELAY_PICKUP_FIELD, opcode = Opcodes.PUTFIELD, ordinal = 0)) @Redirect(method = "B_()V", at = @At(value = "FIELD", target = ENTITY_XP_DELAY_PICKUP_FIELD, opcode = Opcodes.PUTFIELD, ordinal = 0))
public void fixupPickupDelay(EntityExperienceOrb self, int modifier) { public void fixupPickupDelay(EntityExperienceOrb self, int modifier) {
int ticks = (int) ((IMixinRealTimeTicking) self.getWorld()).getRealTimeTicks(); int ticks = (int) ((IMixinRealTimeTicking) self.getWorld()).getRealTimeTicks();
this.c = Math.max(0, this.c - ticks); // PAIL: delayBeforeCanPickup this.c = Math.max(0, this.c - ticks); // OBFHELPER: delayBeforeCanPickup
} }
@Redirect(method = "B_()V", at = @At(value = "FIELD", target = ENTITY_XP_AGE_FIELD, opcode = Opcodes.PUTFIELD, ordinal = 0)) @Redirect(method = "B_()V", at = @At(value = "FIELD", target = ENTITY_XP_AGE_FIELD, opcode = Opcodes.PUTFIELD, ordinal = 0))
public void fixupAge(EntityExperienceOrb self, int modifier) { public void fixupAge(EntityExperienceOrb self, int modifier) {
int ticks = (int) ((IMixinRealTimeTicking) self.getWorld()).getRealTimeTicks(); int ticks = (int) ((IMixinRealTimeTicking) self.getWorld()).getRealTimeTicks();
this.b += ticks; // PAIL: xpOrbAge this.b += ticks; // OBFHELPER: xpOrbAge
} }
} }

View File

@@ -40,11 +40,11 @@ public abstract class MixinEntityHuman {
@Shadow public int bD; @Shadow public int bD;
@Shadow private int sleepTicks; @Shadow private int sleepTicks;
// PAIL: onUpdate // OBFHELPER: onUpdate
@Redirect(method = "B_()V", at = @At(value = "FIELD", target = ENTITY_PLAYER_XP_COOLDOWN_FIELD, opcode = Opcodes.PUTFIELD, ordinal = 0)) @Redirect(method = "B_()V", at = @At(value = "FIELD", target = ENTITY_PLAYER_XP_COOLDOWN_FIELD, opcode = Opcodes.PUTFIELD, ordinal = 0))
public void fixupXpCooldown(EntityHuman self, int modifier) { public void fixupXpCooldown(EntityHuman self, int modifier) {
int ticks = (int) ((IMixinRealTimeTicking) self.getWorld()).getRealTimeTicks(); int ticks = (int) ((IMixinRealTimeTicking) self.getWorld()).getRealTimeTicks();
this.bD = Math.max(0, this.bD - ticks); // PAIL: xpCooldown this.bD = Math.max(0, this.bD - ticks); // OBFHELPER: xpCooldown
} }
@Redirect(method = "B_()V", at = @At(value = "FIELD", target = ENTITY_PLAYER_SLEEP_TIMER_FIELD, opcode = Opcodes.PUTFIELD, ordinal = 0)) @Redirect(method = "B_()V", at = @At(value = "FIELD", target = ENTITY_PLAYER_SLEEP_TIMER_FIELD, opcode = Opcodes.PUTFIELD, ordinal = 0))

View File

@@ -40,7 +40,7 @@ public abstract class MixinEntityItem {
@Shadow public int age; @Shadow public int age;
@Shadow private int pickupDelay; @Shadow private int pickupDelay;
// PAIL: onUpdate // OBFHELPER: onUpdate
@Redirect(method = "B_()V", at = @At(value = "FIELD", target = ENTITY_ITEM_DELAY_PICKUP_FIELD, opcode = Opcodes.PUTFIELD, ordinal = 0)) @Redirect(method = "B_()V", at = @At(value = "FIELD", target = ENTITY_ITEM_DELAY_PICKUP_FIELD, opcode = Opcodes.PUTFIELD, ordinal = 0))
public void fixupPickupDelay(EntityItem self, int modifier) { public void fixupPickupDelay(EntityItem self, int modifier) {
int ticks = (int) ((IMixinRealTimeTicking) self.getWorld()).getRealTimeTicks(); int ticks = (int) ((IMixinRealTimeTicking) self.getWorld()).getRealTimeTicks();

View File

@@ -42,7 +42,7 @@ public abstract class MixinEntityPlayer extends Entity {
super(worldIn); super(worldIn);
} }
// PAIL: decrementTimeUntilPortal // OBFHELPER: decrementTimeUntilPortal
@Redirect(method = "I()V", at = @At(value = "FIELD", target = ENTITY_PLAYER_MP_PORTAL_COOLDOWN_FIELD, opcode = Opcodes.PUTFIELD, ordinal = 0)) @Redirect(method = "I()V", at = @At(value = "FIELD", target = ENTITY_PLAYER_MP_PORTAL_COOLDOWN_FIELD, opcode = Opcodes.PUTFIELD, ordinal = 0))
public void fixupPortalCooldown(EntityPlayer self, int modifier) { public void fixupPortalCooldown(EntityPlayer self, int modifier) {
int ticks = (int) ((IMixinRealTimeTicking) self.getWorld()).getRealTimeTicks(); int ticks = (int) ((IMixinRealTimeTicking) self.getWorld()).getRealTimeTicks();

View File

@@ -38,7 +38,7 @@ public abstract class MixinEntityZombieVillager {
@Shadow(aliases = "du") protected abstract int getConversionProgress(); @Shadow(aliases = "du") protected abstract int getConversionProgress();
// PAIL: onUpdate // OBFHELPER: onUpdate
@Redirect(method = "B_()V", at = @At(value = "INVOKE", target = ENTITY_ZOMBIE_GET_CONVERSION_BOOST_METHOD, ordinal = 0)) @Redirect(method = "B_()V", at = @At(value = "INVOKE", target = ENTITY_ZOMBIE_GET_CONVERSION_BOOST_METHOD, ordinal = 0))
public int fixupConversionTimeBoost(EntityZombieVillager self) { public int fixupConversionTimeBoost(EntityZombieVillager self) {
int ticks = (int) ((IMixinRealTimeTicking) self.getWorld()).getRealTimeTicks(); int ticks = (int) ((IMixinRealTimeTicking) self.getWorld()).getRealTimeTicks();

View File

@@ -13,7 +13,7 @@ public abstract class MixinMinecraftServer implements IMixinRealTimeTicking {
private static long lastTickNanos = System.nanoTime(); private static long lastTickNanos = System.nanoTime();
private static long realTimeTicks = 1; private static long realTimeTicks = 1;
@Inject(method = "C()V", at = @At("HEAD")) // PAIL: fullTick @Inject(method = "C()V", at = @At("HEAD")) // OBFHELPER: fullTick
public void onTickUpdateRealTimeTicks(CallbackInfo ci) { public void onTickUpdateRealTimeTicks(CallbackInfo ci) {
long currentNanos = System.nanoTime(); long currentNanos = System.nanoTime();
realTimeTicks = (currentNanos - lastTickNanos) / 50000000; realTimeTicks = (currentNanos - lastTickNanos) / 50000000;

View File

@@ -43,7 +43,7 @@ public abstract class MixinPlayerConnection {
@Shadow(aliases = "j") private int itemDropThreshold; @Shadow(aliases = "j") private int itemDropThreshold;
@Shadow @Final private MinecraftServer minecraftServer; @Shadow @Final private MinecraftServer minecraftServer;
// PAIL: update // OBFHELPER: update
@Redirect(method = "e()V", at = @At(value = "FIELD", target = NET_HANDLER_PLAY_CHAT_SPAM_FIELD, opcode = Opcodes.PUTFIELD, ordinal = 0)) @Redirect(method = "e()V", at = @At(value = "FIELD", target = NET_HANDLER_PLAY_CHAT_SPAM_FIELD, opcode = Opcodes.PUTFIELD, ordinal = 0))
public void fixupChatSpamCheck(PlayerConnection self, int modifier) { public void fixupChatSpamCheck(PlayerConnection self, int modifier) {
int ticks = (int) ((IMixinRealTimeTicking) this.minecraftServer).getRealTimeTicks(); int ticks = (int) ((IMixinRealTimeTicking) this.minecraftServer).getRealTimeTicks();

View File

@@ -40,7 +40,7 @@ public abstract class MixinPlayerInteractManager {
@Shadow public World world; @Shadow public World world;
@Shadow private int currentTick; @Shadow private int currentTick;
// PAIL: updateBlockRemoving // OBFHELPER: updateBlockRemoving
@Redirect(method = "a()V", at = @At(value = "FIELD", target = PLAYER_INTERACTION_BLOCK_DAMAGE_FIELD, opcode = Opcodes.PUTFIELD, ordinal = 0)) @Redirect(method = "a()V", at = @At(value = "FIELD", target = PLAYER_INTERACTION_BLOCK_DAMAGE_FIELD, opcode = Opcodes.PUTFIELD, ordinal = 0))
public void fixupDiggingTime(PlayerInteractManager self, int modifier) { public void fixupDiggingTime(PlayerInteractManager self, int modifier) {
int ticks = (int) ((IMixinRealTimeTicking) this.world.getMinecraftServer()).getRealTimeTicks(); int ticks = (int) ((IMixinRealTimeTicking) this.world.getMinecraftServer()).getRealTimeTicks();

View File

@@ -39,7 +39,7 @@ public abstract class MixinTileEntityBrewingStand extends TileEntity {
private static final String BREWING_STAND_BREW_TIME_FIELD = "Lnet/minecraft/tileentity/TileEntityBrewingStand;brewTime:I"; private static final String BREWING_STAND_BREW_TIME_FIELD = "Lnet/minecraft/tileentity/TileEntityBrewingStand;brewTime:I";
@Shadow private int brewTime; @Shadow private int brewTime;
// PAIL: update // OBFHELPER: update
@Redirect(method = "e()V", at = @At(value = "FIELD", target = BREWING_STAND_BREW_TIME_FIELD, opcode = Opcodes.PUTFIELD, ordinal = 0)) @Redirect(method = "e()V", at = @At(value = "FIELD", target = BREWING_STAND_BREW_TIME_FIELD, opcode = Opcodes.PUTFIELD, ordinal = 0))
public void fixupBrewTime(TileEntityBrewingStand self, int modifier) { public void fixupBrewTime(TileEntityBrewingStand self, int modifier) {
int ticks = (int) ((IMixinRealTimeTicking) this.getWorld()).getRealTimeTicks(); int ticks = (int) ((IMixinRealTimeTicking) this.getWorld()).getRealTimeTicks();

View File

@@ -43,7 +43,7 @@ public abstract class MixinTileEntityFurnace extends TileEntity {
@Shadow private int cookTime; @Shadow private int cookTime;
@Shadow private int cookTimeTotal; @Shadow private int cookTimeTotal;
// PAIL: update // OBFHELPER: update
@Redirect(method = "e()V", at = @At(value = "FIELD", target = FURNACE_BURN_TIME_FIELD, opcode = Opcodes.PUTFIELD, ordinal = 0)) @Redirect(method = "e()V", at = @At(value = "FIELD", target = FURNACE_BURN_TIME_FIELD, opcode = Opcodes.PUTFIELD, ordinal = 0))
public void fixupBurnTime(TileEntityFurnace self, int modifier) { public void fixupBurnTime(TileEntityFurnace self, int modifier) {
int ticks = (int) ((IMixinRealTimeTicking) this.getWorld()).getRealTimeTicks(); int ticks = (int) ((IMixinRealTimeTicking) this.getWorld()).getRealTimeTicks();

View File

@@ -1,7 +1,6 @@
package net.minecraft.server; package net.minecraft.server;
import com.destroystokyo.paper.exception.ServerInternalException; import com.destroystokyo.paper.exception.ServerInternalException;
import com.google.common.collect.Maps;
import java.io.DataInputStream; import java.io.DataInputStream;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.File; import java.io.File;
@@ -95,7 +94,7 @@ public class RegionFileCache {
} }
// CraftBukkit start - call sites hoisted for synchronization // CraftBukkit start - call sites hoisted for synchronization
public static synchronized NBTTagCompound d(File file, int i, int j) throws IOException { public static synchronized NBTTagCompound d(File file, int i, int j) throws IOException { // OBFHELPER: read
RegionFile regionfile = a(file, i, j); RegionFile regionfile = a(file, i, j);
DataInputStream datainputstream = regionfile.a(i & 31, j & 31); DataInputStream datainputstream = regionfile.a(i & 31, j & 31);
@@ -107,7 +106,7 @@ public class RegionFileCache {
return NBTCompressedStreamTools.a(datainputstream); return NBTCompressedStreamTools.a(datainputstream);
} }
public static synchronized void e(File file, int i, int j, NBTTagCompound nbttagcompound) throws IOException { public static synchronized void e(File file, int i, int j, NBTTagCompound nbttagcompound) throws IOException { // OBFHELPER: write
RegionFile regionfile = a(file, i, j); RegionFile regionfile = a(file, i, j);
DataOutputStream dataoutputstream = regionfile.b(i & 31, j & 31); DataOutputStream dataoutputstream = regionfile.b(i & 31, j & 31);

View File

@@ -27,8 +27,8 @@ public class WorldData {
private int h; private int h;
private int i; private int i;
private int j; private int j;
private volatile long k; // Akarin - volatile - PAIL: time private volatile long k; // Akarin - volatile - OBFHELPER: time
private volatile long l; // Akarin - volatile - PAIL: dayTime private volatile long l; // Akarin - volatile - OBFHELPER: dayTime
private long m; private long m;
private long n; private long n;
private NBTTagCompound o; private NBTTagCompound o;