Skip to content

Environment Detector



The Environment Detector is able to receive information from the environment like the current time, the current moon phase, the light level of the block and many more.


No Events


List of moon phases:

  • 0 Full moon
  • 1 Waning gibbous
  • 2 Third quarter
  • 3 Wanning crescent
  • 4 New moon
  • 5 Waxing crescent
  • 6 First quarter
  • 7 Waxing gibbous

The Environment Detector is easy to use. Wrap the peripheral and use one of the functions.

detector = peripheral.wrap("right") --Defines the detector on the right

--Prints some information to the terminal of the computer
print("Biome ".. detector.getBiome())
print("Current moon phase ".. detector.getMoonName())
print("Is raining ".. detector.isRaining())
print("Current dimension ".. detector.getDimensionName())
Function Returns Description
getBiome() String Returns the biome the block is in.
getSkyLightLevel() int Returns the sky light level above the block.
getBlockLightLevel() int Returns the light level of the block (can be manipulated with light sources).
getDayLightLevel() int Returns the day light level of the current world from 0 to 15 (like the day light sensor).
getTime() (WIP) int Returns the daytime of the current world.
getDimensionProvider() string Returns the provider of the dimension (ex. minecraft).
getDimensionName() string Returns the name of the dimension (ex. the_nether).
getDimensionPaN() string Returns the name with the provider of the dimension (ex. minecraft:overworld).
getMoonName() string Returns the current moon phase as name (ex. Third quarter).
getMoonId() int Returns the current moon phase as id (ex. 2).
getRadiation() table Returns the current radiation from mekanism.
isSlimeChunk() boolean Returns true if the chunk is a slime chunk.
isDimension(string dimension) boolean Returns true if the current dimension matches the first parameter.
isMoon(int moonphase) boolean Returns true if the current moon phase matches the first parameter (ex. 0 = Full moon).
isRaining() boolean Returns true if it's raining.
isThunder() boolean Returns true if it's thundering.
isSunny() boolean Returns true if it's sunny.
listDimensions() table Returns a table with all registered dimensions(also modded dimensions).
getRadiation() table Returns the radiation of mekanism with the unit.
getRadiationRaw() int Returns the raw radiation without unit.


0.6.5b Added getRadiationRaw

0.6.1b Added getRadiation

0.3.3b Added much more functions to the environment detector. The environment detector was a useless block before this update.

0.1b Added the block. It was the second feature of the mod.