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

Method getLightFor

src/main/java/net/minecraft/world/World.java:784–804  ·  view source on GitHub ↗
(EnumSkyBlock type, BlockPos pos)

Source from the content-addressed store, hash-verified

782 }
783
784 public int getLightFor(EnumSkyBlock type, BlockPos pos)
785 {
786 if (pos.getY() < 0)
787 {
788 pos = new BlockPos(pos.getX(), 0, pos.getZ());
789 }
790
791 if (!this.isValid(pos))
792 {
793 return type.defaultLightValue;
794 }
795 else if (!this.isBlockLoaded(pos))
796 {
797 return type.defaultLightValue;
798 }
799 else
800 {
801 Chunk chunk = this.getChunkFromBlockCoords(pos);
802 return chunk.getLightFor(type, pos);
803 }
804 }
805
806 public void setLightFor(EnumSkyBlock type, BlockPos pos, int lightValue)
807 {

Callers 11

canBlockFreezeMethod · 0.95
canSnowAtMethod · 0.95
getRawLightMethod · 0.95
checkLightForMethod · 0.95
updateTickMethod · 0.45
updatePowerMethod · 0.45
updateTickMethod · 0.45
updateTickMethod · 0.45
isValidLightLevelMethod · 0.45

Calls 7

isValidMethod · 0.95
isBlockLoadedMethod · 0.95
getLightForMethod · 0.95
getYMethod · 0.65
getXMethod · 0.65
getZMethod · 0.65

Tested by

no test coverage detected