MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / getLightFor

Method getLightFor

src/main/java/net/minecraft/world/chunk/Chunk.java:781–788  ·  view source on GitHub ↗
(EnumSkyBlock p_177413_1_, BlockPos pos)

Source from the content-addressed store, hash-verified

779 }
780
781 public int getLightFor(EnumSkyBlock p_177413_1_, BlockPos pos)
782 {
783 int i = pos.getX() & 15;
784 int j = pos.getY();
785 int k = pos.getZ() & 15;
786 ExtendedBlockStorage extendedblockstorage = this.storageArrays[j >> 4];
787 return extendedblockstorage == null ? (this.canSeeSky(pos) ? p_177413_1_.defaultLightValue : 0) : (p_177413_1_ == EnumSkyBlock.SKY ? (this.worldObj.provider.getHasNoSky() ? 0 : extendedblockstorage.getExtSkylightValue(i, j & 15, k)) : (p_177413_1_ == EnumSkyBlock.BLOCK ? extendedblockstorage.getExtBlocklightValue(i, j & 15, k) : p_177413_1_.defaultLightValue));
788 }
789
790 public void setLightFor(EnumSkyBlock p_177431_1_, BlockPos pos, int value)
791 {

Callers 5

callMethod · 0.95
getLightForMethod · 0.95
setBlockStateMethod · 0.95
generateMethod · 0.45

Calls 7

canSeeSkyMethod · 0.95
getExtSkylightValueMethod · 0.95
getExtBlocklightValueMethod · 0.95
getHasNoSkyMethod · 0.80
getXMethod · 0.65
getYMethod · 0.65
getZMethod · 0.65

Tested by

no test coverage detected