
# Eagler Context Redacted Diff
# Copyright (c) 2025 lax1dude. All rights reserved.

# Version: 1.0
# Author: lax1dude

> DELETE  4  @  4 : 5

> INSERT  1 : 2  @  1

+ import java.util.LinkedList;

> CHANGE  2 : 5  @  2 : 5

~ import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
~ 
~ import net.lax1dude.eaglercraft.v1_8.sp.server.EaglerMinecraftServer;

> DELETE  4  @  4 : 6

> DELETE  8  @  8 : 9

> DELETE  3  @  3 : 4

> DELETE  2  @  2 : 5

> CHANGE  1 : 4  @  1 : 4

~ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
~ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DeferredStateManager;

> CHANGE  24 : 26  @  24 : 25

~ 	private List<BlockPos> tileEntityPosQueue;
~ 	private final ChunkCoordIntPair coordsCache;

> CHANGE  8 : 9  @  8 : 9

~ 		this.tileEntityPosQueue = new LinkedList();

> INSERT  5 : 6  @  5

+ 		this.coordsCache = new ChunkCoordIntPair(x, z);

> CHANGE  38 : 39  @  38 : 39

~ 		return this.getHeightValue(pos.x & 15, pos.z & 15);

> CHANGE  29 : 30  @  29 : 30

~ 					Block block = this.getBlock(j, l - 1, k);

> INSERT  61 : 64  @  61

+ 		if (!this.worldObj.isRemote) {
+ 			++EaglerMinecraftServer.counterLightUpdate;
+ 		}

> CHANGE  9 : 12  @  9 : 10

~ 		if (!this.worldObj.isRemote) {
~ 			++EaglerMinecraftServer.counterLightUpdate;
~ 		}

> CHANGE  10 : 13  @  10 : 11

~ 						EnumFacing[] facings = EnumFacing.Plane.HORIZONTAL.facingsArray;
~ 						for (int m = 0; m < facings.length; ++m) {
~ 							EnumFacing enumfacing = facings[m];

> CHANGE  6 : 8  @  6 : 7

~ 						for (int m = 0; m < facings.length; ++m) {
~ 							EnumFacing enumfacing1 = facings[m];

> DELETE  5  @  5 : 6

> DELETE  8  @  8 : 10

> CHANGE  94 : 97  @  94 : 95

~ 				EnumFacing[] facings = EnumFacing.Plane.HORIZONTAL.facingsArray;
~ 				for (int m = 0; m < facings.length; ++m) {
~ 					EnumFacing enumfacing = facings[m];

> INSERT  7 : 10  @  7

+ 			if (!this.worldObj.isRemote) {
+ 				++EaglerMinecraftServer.counterLightUpdate;
+ 			}

> CHANGE  9 : 10  @  9 : 10

~ 		return this.getBlock(x, y, z).getLightOpacity();

> CHANGE  2 : 3  @  2 : 4

~ 	public Block getBlock(int x, int y, int z) {

> CHANGE  3 : 4  @  3 : 9

~ 				return extendedblockstorage.getBlockByExtId(x, y & 15, z);

> CHANGE  3 : 4  @  3 : 4

~ 		return Blocks.air;

> CHANGE  2 : 11  @  2 : 15

~ 	public Block getBlock(final BlockPos pos) {
~ 		if (pos.y >= 0 && pos.y >> 4 < this.storageArrays.length) {
~ 			ExtendedBlockStorage extendedblockstorage = this.storageArrays[pos.y >> 4];
~ 			if (extendedblockstorage != null) {
~ 				int j = pos.x & 15;
~ 				int k = pos.y & 15;
~ 				int i = pos.z & 15;
~ 				return extendedblockstorage.getBlockByExtId(j, k, i);
~ 			}

> DELETE  1  @  1 : 2

> CHANGE  1 : 2  @  1 : 14

~ 		return Blocks.air;

> CHANGE  3 : 10  @  3 : 7

~ 		if (pos.y >= 0 && pos.y >> 4 < this.storageArrays.length) {
~ 			ExtendedBlockStorage extendedblockstorage = this.storageArrays[pos.y >> 4];
~ 			if (extendedblockstorage != null) {
~ 				int j = pos.x & 15;
~ 				int k = pos.y & 15;
~ 				int i = pos.z & 15;
~ 				return extendedblockstorage.get(j, k, i);

> DELETE  1  @  1 : 30

> INSERT  1 : 3  @  1

+ 
+ 		return Blocks.air.getDefaultState();

> CHANGE  16 : 19  @  16 : 19

~ 		int i = pos.x & 15;
~ 		int j = pos.y;
~ 		int k = pos.z & 15;

> CHANGE  86 : 89  @  86 : 89

~ 		int i = blockpos.x & 15;
~ 		int j = blockpos.y;
~ 		int k = blockpos.z & 15;

> CHANGE  1 : 3  @  1 : 2

~ 		return extendedblockstorage == null
~ 				? (this.canSeeSky(blockpos) ? enumskyblock.defaultLightValue : getNoSkyLightValue())

> CHANGE  1 : 2  @  1 : 2

~ 						? (this.worldObj.provider.getHasNoSky() ? getNoSkyLightValue()

> CHANGE  6 : 9  @  6 : 9

~ 		int j = blockpos.x & 15;
~ 		int k = blockpos.y;
~ 		int l = blockpos.z & 15;

> CHANGE  19 : 22  @  19 : 22

~ 		int j = blockpos.x & 15;
~ 		int k = blockpos.y;
~ 		int l = blockpos.z & 15;

> CHANGE  4 : 5  @  4 : 5

~ 					: getNoSkyLightValue();

> CHANGE  1 : 3  @  1 : 2

~ 			int i1 = this.worldObj.provider.getHasNoSky() ? getNoSkyLightValue()
~ 					: extendedblockstorage.getExtSkylightValue(j, k & 15, l);

> INSERT  10 : 14  @  10

+ 	public static int getNoSkyLightValue() {
+ 		return DeferredStateManager.isDeferredRenderer() ? 5 : 0;
+ 	}
+ 

> CHANGE  43 : 46  @  43 : 46

~ 		int i = blockpos.x & 15;
~ 		int j = blockpos.y;
~ 		int k = blockpos.z & 15;

> INSERT  12 : 13  @  12

+ 			BlockPos pos2 = new BlockPos(blockpos);

> CHANGE  1 : 3  @  1 : 3

~ 				tileentity = this.createNewTileEntity(pos2);
~ 				this.worldObj.setTileEntity(pos2, tileentity);

> CHANGE  1 : 2  @  1 : 2

~ 				this.tileEntityPosQueue.add(pos2);

> INSERT  19 : 20  @  19

+ 		blockpos = new BlockPos(blockpos);

> CHANGE  94 : 96  @  94 : 96

~ 						&& (predicate == null || predicate.apply((T) entity))) {
~ 					list.add((T) entity);

> CHANGE  18 : 20  @  18 : 20

~ 	public EaglercraftRandom getRandomWithSeed(long i) {
~ 		return new EaglercraftRandom(this.worldObj.getSeed() + (long) (this.xPosition * this.xPosition * 4987142)

> CHANGE  1 : 2  @  1 : 2

~ 				+ (long) (this.zPosition * 389711) ^ i, !this.worldObj.getWorldInfo().isOldEaglercraftRandom());

> CHANGE  90 : 91  @  90 : 91

~ 			BlockPos blockpos = (BlockPos) this.tileEntityPosQueue.remove(0);

> CHANGE  15 : 16  @  15 : 16

~ 		return coordsCache;

> INSERT  2 : 6  @  2

+ 	public long getChunkCoordLong() {
+ 		return ChunkCoordIntPair.chunkXZ2Int(this.xPosition, this.zPosition);
+ 	}
+ 

> CHANGE  95 : 96  @  95 : 96

~ 		if (chunkManager != null && k == 255) {

> INSERT  42 : 43  @  42

+ 			EnumFacing[] facings = EnumFacing._VALUES;

> CHANGE  5 : 7  @  5 : 7

~ 					for (int m = 0; m < facings.length; ++m) {
~ 						BlockPos blockpos2 = blockpos1.offset(facings[m]);

> CHANGE  29 : 32  @  29 : 30

~ 					EnumFacing[] facings = EnumFacing.Plane.HORIZONTAL.facingsArray;
~ 					for (int i = 0; i < facings.length; ++i) {
~ 						EnumFacing enumfacing = facings[i];

> CHANGE  49 : 50  @  49 : 51

~ 		BlockPos blockpos$mutableblockpos = new BlockPos((this.xPosition << 4) + x, 0, (this.zPosition << 4) + z);

> EOF
