Environment Detector¶
The Environment Detector provides current information from the environment like the current time, the current moon phase, the light level of the block and many more.
| Peripheral Name | Interfaces with | Has events | Introduced in |
|---|---|---|---|
| environment_detector | World | No | 0.1b |
Functions¶
getBiome¶
getBiome() -> string
Returns the current biome the block is in.
1 2 3 4 | |
getBlockLightLevel¶
getBlockLightLevel() -> number
Returns the block light level (0 to 15) at the detector block, this can be influenced by light sources
getSkyLightLevel¶
getSkyLightLevel() -> number
Returns the current sky light level from 0 to 15 (like a daylight sensor).
getDayLightLevel¶
getDayLightLevel() -> number
Returns the day light level of the current world from 0 to 15. This is uneffected by blocks covering the peripheral.
getTime¶
getTime() -> number
WIP
Returns the daytime of the current world.
isSlimeChunk¶
isSlimeChunk() -> boolean
Returns true if the current chunk is a slime chunk.
getDimension¶
getDimension() -> string
Returns the name of the current dimension (ex. minecraft:overworld, minecraft:the_nether or minecraft:the_end).
1 2 3 4 | |
listDimensions¶
listDimensions() -> table
Returns a table with all of the registered dimensions for the current world, this includes modded dimensions.
Example
As an example listDimensions might return a table like so:
{"minecraft:overworld", "minecraft:the_nether", "minecraft:the_end", "twilightforest:twilight_forest"}
getMoon¶
getMoon() -> number, string
Returns the current moon phase's id and its name
Info
There are 8 different moon phases:
| ID | Name |
|---|---|
| 0 | Full moon |
| 1 | Waning gibbous |
| 2 | Third quarter |
| 3 | Waning crescent |
| 4 | New moon |
| 5 | Waxing crescent |
| 6 | First quarter |
| 7 | Waxing gibbous |
isRaining¶
isRaining() -> boolean
Returns true if it is raining.
isThunder¶
isThunder() -> boolean
Returns true if it is thundering.
isSunny¶
isSunny() -> boolean
Returns true if it is sunny.
getRadiation¶
getRadiation() -> table
Added in version 0.6.1b
Requirement
Requires the Mekanism mod to be installed
Returns the current radiation level from the Mekanism mod with the radiation unit.
Properties¶
| table | Description |
|---|---|
radiation: string |
The current radiation level as a string |
unit: string |
The radiation unit |
getRadiationRaw¶
getRadiationRaw() -> number
Added in version 0.6.5b
Requirement
Requires the Mekanism mod to be installed
Returns the current raw radiation level in Sv/h.
scanEntities¶
scanEntities(range: number, detailed: boolean | nil, filter: string | nil) -> table
Returns a table with all entities in the given range.
Coordinates are relative and not absolute.
filter may be an entity type ID, or an entity tag starts with #.
scanShips¶
scanShips(range: number) -> table
Requirement
Requires Valkyrien Skies to be installed.
Returns a table with all ships in the given range.
Coordinates are relative and not absolute.
Changelog/Trivia¶
0.8
Added vs2 integration scanShips.
0.6.5b
Added getRadiationRaw
0.6.1b
Added getRadiation
0.3.3b
Added many 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.