public virtual int getSavedLightValue(EnumSkyBlock enumskyblock, int i, int j, int k) { if (enumskyblock == EnumSkyBlock.Sky) { return(skylightMap.getNibble(i, j, k)); } if (enumskyblock == EnumSkyBlock.Block) { return(blocklightMap.getNibble(i, j, k)); } else { return(0); } }
public virtual void setLightValue(EnumSkyBlock enumskyblock, int i, int j, int k, int l) { isModified = true; if (enumskyblock == EnumSkyBlock.Sky) { skylightMap.setNibble(i, j, k, l); } else if (enumskyblock == EnumSkyBlock.Block) { blocklightMap.setNibble(i, j, k, l); } else { return; } }
public override void setLightValue(EnumSkyBlock enumskyblock, int i, int j, int k, int l) { }
public override int getSavedLightValue(EnumSkyBlock enumskyblock, int i, int j, int k) { return 0; }
public override int getSavedLightValue(EnumSkyBlock enumskyblock, int i, int j, int k) { return(0); }
public virtual void func_484_a(EnumSkyBlock enumskyblock, int i, int j, int k, int l, int i1, int j1, bool flag) { if (worldProvider.field_4306_c && enumskyblock == EnumSkyBlock.Sky) { return; } field_4268_y++; if (field_4268_y == 50) { field_4268_y--; return; } int k1 = (l + i)/2; int l1 = (j1 + k)/2; if (!blockExists(k1, 64, l1)) { field_4268_y--; return; } if (getChunkFromBlockCoords(k1, l1).func_21101_g()) { return; } int i2 = field_821_y.size(); if (flag) { int j2 = 5; if (j2 > i2) { j2 = i2; } for (int l2 = 0; l2 < j2; l2++) { var metadatachunkblock = (MetadataChunkBlock) field_821_y.get(field_821_y.size() - l2 - 1); if (metadatachunkblock.field_957_a == enumskyblock && metadatachunkblock.func_692_a(i, j, k, l, i1, j1)) { field_4268_y--; return; } } } field_821_y.add(new MetadataChunkBlock(enumskyblock, i, j, k, l, i1, j1)); int k2 = 0xf4240; if (field_821_y.size() > 0xf4240) { [email protected]( (new StringBuilder()).append("More than ").append(k2).append(" updates, aborting lighting updates"). toString()); field_821_y.clear(); } field_4268_y--; }
public virtual void func_483_a(EnumSkyBlock enumskyblock, int i, int j, int k, int l, int i1, int j1) { func_484_a(enumskyblock, i, j, k, l, i1, j1, true); }
public virtual void setLightValue(EnumSkyBlock enumskyblock, int i, int j, int k, int l) { if (((((i >= -32000000) && (k >= -32000000)) && ((i < 0x1e84800) && (k <= 0x1e84800))) && (j >= 0)) && ((j < 0x80) && chunkExists(i >> 4, k >> 4))) { return; } if (j < 0) { return; } if (j >= 128) { return; } if (!chunkExists(i >> 4, k >> 4)) { return; } Chunk chunk = getChunkFromChunkCoords(i >> 4, k >> 4); chunk.setLightValue(enumskyblock, i & 0xf, j, k & 0xf, l); for (int i1 = 0; i1 < worldAccesses.size(); i1++) { ((IWorldAccess) worldAccesses.get(i1)).func_683_a(i, j, k); } }
public void neighborLightPropagationChanged(EnumSkyBlock enumskyblock, int i, int j, int k, int l) { if (worldProvider.field_4306_c && enumskyblock == EnumSkyBlock.Sky) { return; } if (!blockExists(i, j, k)) { return; } if (enumskyblock == EnumSkyBlock.Sky) { if (canExistingBlockSeeTheSky(i, j, k)) { l = 15; } } else if (enumskyblock == EnumSkyBlock.Block) { int i1 = getBlockId(i, j, k); if (Block.lightValue[i1] > l) { l = Block.lightValue[i1]; } } if (getSavedLightValue(enumskyblock, i, j, k) != l) { func_483_a(enumskyblock, i, j, k, i, j, k); } }
public virtual int getSavedLightValue(EnumSkyBlock enumskyblock, int i, int j, int k) { if ((((j < 0) || (j >= 0x80)) || ((i < -32000000) || (k < -32000000))) || ((i >= 0x1e84800) || (k > 0x1e84800))) { return enumskyblock.field_984_c; } int num = i >> 4; int num2 = k >> 4; if (!chunkExists(num, num2)) { return 0; } return getChunkFromChunkCoords(num, num2).getSavedLightValue(enumskyblock, i & 15, j, k & 15); }
public virtual int getSavedLightValue(EnumSkyBlock enumskyblock, int i, int j, int k) { if (enumskyblock == EnumSkyBlock.Sky) { return skylightMap.getNibble(i, j, k); } if (enumskyblock == EnumSkyBlock.Block) { return blocklightMap.getNibble(i, j, k); } else { return 0; } }