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

Method setLightFor

src/main/java/net/minecraft/world/chunk/Chunk.java:790–816  ·  view source on GitHub ↗
(EnumSkyBlock p_177431_1_, BlockPos pos, int value)

Source from the content-addressed store, hash-verified

788 }
789
790 public void setLightFor(EnumSkyBlock p_177431_1_, BlockPos pos, int value)
791 {
792 int i = pos.getX() & 15;
793 int j = pos.getY();
794 int k = pos.getZ() & 15;
795 ExtendedBlockStorage extendedblockstorage = this.storageArrays[j >> 4];
796
797 if (extendedblockstorage == null)
798 {
799 extendedblockstorage = this.storageArrays[j >> 4] = new ExtendedBlockStorage(j >> 4 << 4, !this.worldObj.provider.getHasNoSky());
800 this.generateSkylightMap();
801 }
802
803 this.isModified = true;
804
805 if (p_177431_1_ == EnumSkyBlock.SKY)
806 {
807 if (!this.worldObj.provider.getHasNoSky())
808 {
809 extendedblockstorage.setExtSkylightValue(i, j & 15, k, value);
810 }
811 }
812 else if (p_177431_1_ == EnumSkyBlock.BLOCK)
813 {
814 extendedblockstorage.setExtBlocklightValue(i, j & 15, k, value);
815 }
816 }
817
818 public int getLightSubtracted(BlockPos pos, int amount)
819 {

Callers 1

setLightForMethod · 0.95

Calls 7

generateSkylightMapMethod · 0.95
setExtSkylightValueMethod · 0.95
setExtBlocklightValueMethod · 0.95
getHasNoSkyMethod · 0.80
getXMethod · 0.65
getYMethod · 0.65
getZMethod · 0.65

Tested by

no test coverage detected