Class Instance
- All Implemented Interfaces:
Audience
,ForwardingAudience
,Pointered
,PacketGroupingAudience
,EventHandler<InstanceEvent>
,Block.Getter
,Block.Setter
,Snapshotable
,Taggable
,TagReadable
,TagWritable
,Tickable
,Schedulable
- Direct Known Subclasses:
InstanceContainer
,SharedInstance
Entity.setInstance(Instance)
.
An instance has entities and chunks, each instance contains its own entity list but the
chunk implementation has to be defined, see InstanceContainer
.
WARNING: when making your own implementation registering the instance manually is required
with InstanceManager.registerInstance(Instance)
, and
you need to be sure to signal the ThreadDispatcher
of every partition/element changes.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minestom.server.instance.block.Block.Getter
Block.Getter.Condition
Nested classes/interfaces inherited from interface net.kyori.adventure.audience.ForwardingAudience
ForwardingAudience.Single
-
Field Summary
-
Constructor Summary
ConstructorDescriptionInstance
(@NotNull UUID uniqueId, DynamicRegistry.Key<DimensionType> dimensionType) Creates a new instance.Instance
(@NotNull UUID uniqueId, DynamicRegistry.Key<DimensionType> dimensionType, @NotNull NamespaceID dimensionName) Creates a new instance.Instance
(@NotNull DynamicRegistry<DimensionType> dimensionTypeRegistry, @NotNull UUID uniqueId, DynamicRegistry.Key<DimensionType> dimensionType, @NotNull NamespaceID dimensionName) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionboolean
breakBlock
(@NotNull Player player, @NotNull Point blockPosition, @NotNull BlockFace blockFace) Does callPlayerBlockBreakEvent
and send particle packetsabstract boolean
breakBlock
(@NotNull Player player, @NotNull Point blockPosition, @NotNull BlockFace blockFace, boolean doBlockUpdates) Does callPlayerBlockBreakEvent
and send particle packets@NotNull InitializeWorldBorderPacket
Creates theInitializeWorldBorderPacket
sent to players who join this instance.@NotNull TimeUpdatePacket
Creates aTimeUpdatePacket
with the current age and time of this instanceabstract void
enableAutoChunkLoad
(boolean enable) When set to true, chunks will load automatically when requested.@NotNull EventNode
<InstanceEvent> void
explode
(float centerX, float centerY, float centerZ, float strength) Creates an explosion at the given position with the given strength.void
explode
(float centerX, float centerY, float centerZ, float strength, @Nullable net.kyori.adventure.nbt.CompoundBinaryTag additionalData) Creates an explosion at the given position with the given strength.abstract @Nullable Generator
Gets the generator associated with the instance@Nullable Block
getBlock
(int x, int y, int z, @NotNull Block.Getter.Condition condition) int
getBlockLight
(int blockX, int blockY, int blockZ) @NotNull DimensionType
abstract @Nullable Chunk
getChunk
(int chunkX, int chunkZ) Gets the loadedChunk
at a position.@Nullable Chunk
getChunkAt
(double x, double z) Gets theChunk
at the given block position, null if not loaded.@Nullable Chunk
getChunkAt
(@NotNull Point point) getChunkEntities
(Chunk chunk) Gets the entities located in the chunk.abstract @NotNull Collection
<@NotNull Chunk> Gets all the instance's loaded chunks.abstract ChunkSupplier
Gets the chunk supplier of the instance.@NotNull Set
<@NotNull EntityCreature> Deprecated.@NotNull String
Gets the instance dimension name.Gets the instanceDimensionType
.Gets the entities in the instance;@Nullable Entity
getEntityById
(int id) Gets an entity based on its id (fromEntity.getEntityId()
).@Nullable Entity
getEntityByUuid
(UUID uuid) Gets an entity based on its UUID (fromEntity.getUuid()
).@NotNull Set
<@NotNull ExperienceOrb> Deprecated.@Nullable ExplosionSupplier
Gets the registeredExplosionSupplier
, or null if none was provided.@NotNull Collection
<Entity> getNearbyEntities
(@NotNull Point point, double range) Gets nearby entities to the given position.@Nullable Player
getPlayerByUuid
(UUID uuid) Gets a player based on its UUID (fromEntity.getUuid()
).Gets the players in the instance;int
getSkyLight
(int blockX, int blockY, int blockZ) long
getTime()
Gets the current time in the instance (sun/moon).int
Gets the rate of the time passing, it is 1 by defaultint
Gets the rate at which the client is updated with the current instance time@NotNull UUID
Gets the instance unique id.@NotNull Weather
Gets the weather of this instancelong
Gets the age of this instance in tick.@NotNull WorldBorder
Gets the current state of the instanceWorldBorder
.abstract boolean
Gets if the instance should auto load chunks.boolean
isChunkLoaded
(int chunkX, int chunkZ) boolean
isChunkLoaded
(Point point) abstract boolean
Determines whether a position in the void.boolean
Gets if the instance has been registered inInstanceManager
.abstract @NotNull CompletableFuture
<@NotNull Chunk> loadChunk
(int chunkX, int chunkZ) @NotNull CompletableFuture
<@NotNull Chunk> Loads the chunk at the givenPoint
with a callback.abstract @NotNull CompletableFuture
<@Nullable Chunk> loadOptionalChunk
(int chunkX, int chunkZ) Loads the chunk if the chunk is already loaded or ifhasEnabledAutoChunkLoad()
returns true.@NotNull CompletableFuture
<@Nullable Chunk> loadOptionalChunk
(@NotNull Point point) boolean
placeBlock
(BlockHandler.Placement placement) abstract boolean
placeBlock
(BlockHandler.Placement placement, boolean doBlockUpdates) void
playSoundExcept
(@Nullable Player excludedPlayer, @NotNull Sound sound, double x, double y, double z) void
playSoundExcept
(@Nullable Player excludedPlayer, @NotNull Sound sound, @NotNull Sound.Emitter emitter) void
playSoundExcept
(@Nullable Player excludedPlayer, @NotNull Sound sound, @NotNull Point point) Plays aSound
at a given point, except to the excluded player@NotNull Pointers
pointers()
abstract @NotNull CompletableFuture
<Void> Saves multiple chunks to permanent storage.abstract @NotNull CompletableFuture
<Void> saveChunkToStorage
(@NotNull Chunk chunk) Saves aChunk
to permanent storage.abstract @NotNull CompletableFuture
<Void> Saves the current instance tags.void
scheduleNextTick
(@NotNull Consumer<Instance> callback) Schedules a task to be run during the next instance tick.@NotNull Scheduler
void
sendBlockAction
(@NotNull Point blockPosition, byte actionId, byte actionParam) Sends aBlockActionPacket
for all the viewers of the specific position.void
abstract void
void
abstract void
setChunkSupplier
(@NotNull ChunkSupplier chunkSupplier) void
setExplosionSupplier
(@Nullable ExplosionSupplier supplier) Registers theExplosionSupplier
to use in this instance.abstract void
setGenerator
(@Nullable Generator generator) Changes the generator of the instanceprotected void
setRegistered
(boolean registered) Changes the registered field.void
setTime
(long time) Changes the current time in the instance, from 0 to 24000.void
setTimeRate
(int timeRate) Changes the time rate of the instancevoid
setTimeSynchronizationTicks
(int timeSynchronizationTicks) Changes the natural client time packet synchronization period, defaults toServerFlag.SERVER_TICKS_PER_SECOND
.void
setWeather
(@NotNull Weather weather) Sets the weather of this instance with a fixed transitionvoid
setWeather
(@NotNull Weather weather, int transitionTicks) Sets the weather on this instance, transitions over timevoid
setWorldAge
(long worldAge) Sets the age of this instance in tick.void
setWorldBorder
(@NotNull WorldBorder worldBorder) Set the instanceWorldBorder
with an instant transition.void
setWorldBorder
(@NotNull WorldBorder worldBorder, double transitionTime) Set the instanceWorldBorder
with a smooth transition.@NotNull TagHandler
void
tick
(long time) Performs a single tick in the instance, including scheduled tasks fromscheduleNextTick(Consumer)
.void
unloadChunk
(int chunkX, int chunkZ) Unloads the chunk at the given position.abstract void
unloadChunk
(@NotNull Chunk chunk) Schedules the removal of aChunk
, this method does not promise when it will be done.@NotNull InstanceSnapshot
updateSnapshot
(@NotNull SnapshotUpdater updater) Updates the currently cached snapshot if required.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.kyori.adventure.audience.Audience
deleteMessage, openBook, removeResourcePacks, removeResourcePacks, removeResourcePacks, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendResourcePacks, sendResourcePacks, showTitle, stopSound
Methods inherited from interface net.minestom.server.instance.block.Block.Getter
getBlock, getBlock, getBlock
Methods inherited from interface net.minestom.server.instance.block.Block.Setter
setBlock
Methods inherited from interface net.kyori.adventure.audience.ForwardingAudience
clearResourcePacks, deleteMessage, filterAudience, forEachAudience, openBook, playSound, removeResourcePacks, removeResourcePacks, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListHeader, sendResourcePacks
Methods inherited from interface net.minestom.server.adventure.audience.PacketGroupingAudience
audiences, clearTitle, hideBossBar, playSound, playSound, playSound, resetTitle, sendActionBar, sendGroupedPacket, sendMessage, sendNotification, sendPlayerListHeaderAndFooter, sendTitlePart, showBossBar, stopSound
Methods inherited from interface net.kyori.adventure.pointer.Pointered
get, getOrDefault, getOrDefaultFrom
Methods inherited from interface net.minestom.server.tag.Taggable
getAndSetTag, getAndUpdateTag, getTag, hasTag, removeTag, setTag, updateAndGetTag, updateTag
-
Field Details
-
uniqueId
-
tagHandler
-
-
Constructor Details
-
Instance
public Instance(@NotNull @NotNull UUID uniqueId, @NotNull DynamicRegistry.Key<DimensionType> dimensionType) Creates a new instance.- Parameters:
uniqueId
- theUUID
of the instancedimensionType
- theDimensionType
of the instance
-
Instance
public Instance(@NotNull @NotNull UUID uniqueId, @NotNull DynamicRegistry.Key<DimensionType> dimensionType, @NotNull @NotNull NamespaceID dimensionName) Creates a new instance.- Parameters:
uniqueId
- theUUID
of the instancedimensionType
- theDimensionType
of the instance
-
Instance
public Instance(@NotNull @NotNull DynamicRegistry<DimensionType> dimensionTypeRegistry, @NotNull @NotNull UUID uniqueId, @NotNull DynamicRegistry.Key<DimensionType> dimensionType, @NotNull @NotNull NamespaceID dimensionName) Creates a new instance.- Parameters:
uniqueId
- theUUID
of the instancedimensionType
- theDimensionType
of the instance
-
-
Method Details
-
scheduleNextTick
Schedules a task to be run during the next instance tick.- Parameters:
callback
- the task to execute during the next instance tick
-
setBlock
- Specified by:
setBlock
in interfaceBlock.Setter
-
setBlock
-
setBlock
public abstract void setBlock(int x, int y, int z, @NotNull @NotNull Block block, boolean doBlockUpdates) -
placeBlock
-
placeBlock
@Internal public abstract boolean placeBlock(@NotNull BlockHandler.Placement placement, boolean doBlockUpdates) -
breakBlock
@Internal public boolean breakBlock(@NotNull @NotNull Player player, @NotNull @NotNull Point blockPosition, @NotNull @NotNull BlockFace blockFace) Does callPlayerBlockBreakEvent
and send particle packets- Parameters:
player
- thePlayer
who break the blockblockPosition
- the position of the broken block- Returns:
- true if the block has been broken, false if it has been cancelled
-
breakBlock
@Internal public abstract boolean breakBlock(@NotNull @NotNull Player player, @NotNull @NotNull Point blockPosition, @NotNull @NotNull BlockFace blockFace, boolean doBlockUpdates) Does callPlayerBlockBreakEvent
and send particle packets- Parameters:
player
- thePlayer
who break the blockblockPosition
- the position of the broken blockdoBlockUpdates
- true to do block updates, false otherwise- Returns:
- true if the block has been broken, false if it has been cancelled
-
loadChunk
@NotNull public abstract @NotNull CompletableFuture<@NotNull Chunk> loadChunk(int chunkX, int chunkZ) - Parameters:
chunkX
- the chunk XchunkZ
- the chunk Z- Returns:
- a
CompletableFuture
completed once the chunk has been loaded
-
loadChunk
Loads the chunk at the givenPoint
with a callback.- Parameters:
point
- the chunk position
-
loadOptionalChunk
@NotNull public abstract @NotNull CompletableFuture<@Nullable Chunk> loadOptionalChunk(int chunkX, int chunkZ) Loads the chunk if the chunk is already loaded or ifhasEnabledAutoChunkLoad()
returns true.- Parameters:
chunkX
- the chunk XchunkZ
- the chunk Z- Returns:
- a
CompletableFuture
completed once the chunk has been processed, can be null if not loaded
-
loadOptionalChunk
@NotNull public @NotNull CompletableFuture<@Nullable Chunk> loadOptionalChunk(@NotNull @NotNull Point point) - Parameters:
point
- the chunk position- Returns:
- a
CompletableFuture
completed once the chunk has been processed, null if not loaded
-
unloadChunk
Schedules the removal of aChunk
, this method does not promise when it will be done.WARNING: during unloading, all entities other than
Player
will be removed.- Parameters:
chunk
- the chunk to unload
-
unloadChunk
public void unloadChunk(int chunkX, int chunkZ) Unloads the chunk at the given position.- Parameters:
chunkX
- the chunk XchunkZ
- the chunk Z
-
getChunk
Gets the loadedChunk
at a position.WARNING: this should only return already-loaded chunk, use
loadChunk(int, int)
or similar to load one instead.- Parameters:
chunkX
- the chunk XchunkZ
- the chunk Z- Returns:
- the chunk at the specified position, null if not loaded
-
isChunkLoaded
public boolean isChunkLoaded(int chunkX, int chunkZ) - Parameters:
chunkX
- the chunk XchunkZ
- this chunk Z- Returns:
- true if the chunk is loaded
-
isChunkLoaded
- Parameters:
point
- coordinate of a block or other- Returns:
- true if the chunk is loaded
-
saveInstance
Saves the current instance tags.Warning: only the global instance data will be saved, not chunks. You would need to call
saveChunksToStorage()
too.- Returns:
- the future called once the instance data has been saved
-
saveChunkToStorage
@NotNull public abstract @NotNull CompletableFuture<Void> saveChunkToStorage(@NotNull @NotNull Chunk chunk) Saves aChunk
to permanent storage.- Parameters:
chunk
- theChunk
to save- Returns:
- future called when the chunk is done saving
-
saveChunksToStorage
Saves multiple chunks to permanent storage.- Returns:
- future called when the chunks are done saving
-
setChunkSupplier
-
getChunkSupplier
Gets the chunk supplier of the instance.- Returns:
- the chunk supplier of the instance
-
generator
Gets the generator associated with the instance- Returns:
- the generator if any
-
setGenerator
Changes the generator of the instance- Parameters:
generator
- the new generator, or null to disable generation
-
getChunks
Gets all the instance's loaded chunks.- Returns:
- an unmodifiable containing all the instance chunks
-
enableAutoChunkLoad
public abstract void enableAutoChunkLoad(boolean enable) When set to true, chunks will load automatically when requested. Otherwise usingloadChunk(int, int)
will be required to even spawn a player- Parameters:
enable
- enable the auto chunk load
-
hasEnabledAutoChunkLoad
public abstract boolean hasEnabledAutoChunkLoad()Gets if the instance should auto load chunks.- Returns:
- true if auto chunk load is enabled, false otherwise
-
isInVoid
Determines whether a position in the void.- Parameters:
point
- the point in the world- Returns:
- true if the point is inside the void
-
isRegistered
public boolean isRegistered()Gets if the instance has been registered inInstanceManager
.- Returns:
- true if the instance has been registered
-
setRegistered
protected void setRegistered(boolean registered) Changes the registered field.WARNING: should only be used by
InstanceManager
.- Parameters:
registered
- true to mark the instance as registered
-
getDimensionType
Gets the instanceDimensionType
.- Returns:
- the dimension of the instance
-
getCachedDimensionType
-
getDimensionName
Gets the instance dimension name.- Returns:
- the dimension name of the instance
-
getWorldAge
public long getWorldAge()Gets the age of this instance in tick.- Returns:
- the age of this instance in tick
-
setWorldAge
public void setWorldAge(long worldAge) Sets the age of this instance in tick. It will send the age to all players. Will send new age to all players in the instance, unaffected bygetTimeSynchronizationTicks()
- Parameters:
worldAge
- the age of this instance in tick
-
getTime
public long getTime()Gets the current time in the instance (sun/moon).- Returns:
- the time in the instance
-
setTime
public void setTime(long time) Changes the current time in the instance, from 0 to 24000.If the time is negative, the vanilla client will not move the sun.
0 = sunrise 6000 = noon 12000 = sunset 18000 = midnight
This method is unaffected by
getTimeRate()
It does send the new time to all players in the instance, unaffected by
getTimeSynchronizationTicks()
- Parameters:
time
- the new time of the instance
-
getTimeRate
public int getTimeRate()Gets the rate of the time passing, it is 1 by default- Returns:
- the time rate of the instance
-
setTimeRate
public void setTimeRate(int timeRate) Changes the time rate of the instance1 is the default value and can be set to 0 to be completely disabled (constant time)
- Parameters:
timeRate
- the new time rate of the instance- Throws:
IllegalStateException
- iftimeRate
is lower than 0
-
getTimeSynchronizationTicks
public int getTimeSynchronizationTicks()Gets the rate at which the client is updated with the current instance time- Returns:
- the client update rate for time related packet
-
setTimeSynchronizationTicks
public void setTimeSynchronizationTicks(int timeSynchronizationTicks) Changes the natural client time packet synchronization period, defaults toServerFlag.SERVER_TICKS_PER_SECOND
.Supplying 0 means that the client will never be synchronized with the current natural instance time (time will still change server-side)
- Parameters:
timeSynchronizationTicks
- the rate to update time in ticks
-
createTimePacket
Creates aTimeUpdatePacket
with the current age and time of this instance- Returns:
- the
TimeUpdatePacket
with this instance data
-
getWorldBorder
Gets the current state of the instanceWorldBorder
.- Returns:
- the
WorldBorder
for the instance of the current tick
-
setWorldBorder
Set the instanceWorldBorder
with a smooth transition.- Parameters:
worldBorder
- the desired final state of the world bordertransitionTime
- the time in seconds this world border's diameter will transition for (0 makes this instant)
-
setWorldBorder
Set the instanceWorldBorder
with an instant transition. seesetWorldBorder(WorldBorder, double)
. -
createInitializeWorldBorderPacket
Creates theInitializeWorldBorderPacket
sent to players who join this instance. -
getEntities
Gets the entities in the instance;- Returns:
- an unmodifiable
Set
containing all the entities in the instance
-
getEntityById
Gets an entity based on its id (fromEntity.getEntityId()
).- Parameters:
id
- the entity id- Returns:
- the entity having the specified id, null if not found
-
getEntityByUuid
Gets an entity based on its UUID (fromEntity.getUuid()
).- Parameters:
uuid
- the entity UUID- Returns:
- the entity having the specified uuid, null if not found
-
getPlayerByUuid
Gets a player based on its UUID (fromEntity.getUuid()
).- Parameters:
uuid
- the player UUID- Returns:
- the player having the specified uuid, null if not found or not a player
-
getPlayers
Gets the players in the instance;- Specified by:
getPlayers
in interfacePacketGroupingAudience
- Returns:
- an unmodifiable
Set
containing all the players in the instance
-
getCreatures
Deprecated.Gets the creatures in the instance;- Returns:
- an unmodifiable
Set
containing all the creatures in the instance
-
getExperienceOrbs
Deprecated.Gets the experience orbs in the instance.- Returns:
- an unmodifiable
Set
containing all the experience orbs in the instance
-
getChunkEntities
Gets the entities located in the chunk. -
getNearbyEntities
@NotNull public @NotNull Collection<Entity> getNearbyEntities(@NotNull @NotNull Point point, double range) Gets nearby entities to the given position.- Parameters:
point
- position to look atrange
- max range from the given point to collect entities at- Returns:
- entities that are not further than the specified distance from the transmitted position.
-
getBlock
@Nullable public @Nullable Block getBlock(int x, int y, int z, @NotNull @NotNull Block.Getter.Condition condition) - Specified by:
getBlock
in interfaceBlock.Getter
-
sendBlockAction
Sends aBlockActionPacket
for all the viewers of the specific position.- Parameters:
blockPosition
- the block positionactionId
- the action id, depends on the blockactionParam
- the action parameter, depends on the block- See Also:
-
getChunkAt
Gets theChunk
at the given block position, null if not loaded.- Parameters:
x
- the X positionz
- the Z position- Returns:
- the chunk at the given position, null if not loaded
-
getChunkAt
- Parameters:
point
- the position- Returns:
- the chunk at the given position, null if not loaded
-
getEntityTracker
-
getUniqueId
Gets the instance unique id.- Returns:
- the instance unique id
-
tick
public void tick(long time) Performs a single tick in the instance, including scheduled tasks fromscheduleNextTick(Consumer)
.Warning: this does not update chunks and entities.
-
getWeather
Gets the weather of this instance- Returns:
- the instance weather
-
setWeather
Sets the weather on this instance, transitions over time- Parameters:
weather
- the new weathertransitionTicks
- the ticks to transition to new weather
-
setWeather
Sets the weather of this instance with a fixed transition- Parameters:
weather
- the new weather
-
tagHandler
- Specified by:
tagHandler
in interfaceTaggable
-
scheduler
- Specified by:
scheduler
in interfaceSchedulable
-
eventNode
- Specified by:
eventNode
in interfaceEventHandler<InstanceEvent>
-
updateSnapshot
Description copied from interface:Snapshotable
Updates the currently cached snapshot if required. The updater can be used to retrieve references to other snapshots while avoiding circular dependency. Be careful to do not storeupdater
anywhere as its data will change when building requested references.This method is not thread-safe, and targeted at internal use since its execution rely on safe-points (e.g. end of ticks)
- Specified by:
updateSnapshot
in interfaceSnapshotable
- Parameters:
updater
- the snapshot updater/context- Returns:
- the updated snapshot
-
playSoundExcept
public void playSoundExcept(@Nullable @Nullable Player excludedPlayer, @NotNull @NotNull Sound sound, @NotNull @NotNull Point point) Plays aSound
at a given point, except to the excluded player- Parameters:
excludedPlayer
- The player in the instance who won't receive the soundsound
- The sound to playpoint
- The point in this instance at which to play the sound
-
playSoundExcept
-
playSoundExcept
public void playSoundExcept(@Nullable @Nullable Player excludedPlayer, @NotNull @NotNull Sound sound, @NotNull Sound.Emitter emitter) -
explode
public void explode(float centerX, float centerY, float centerZ, float strength) Creates an explosion at the given position with the given strength. The algorithm used to compute damages is provided bygetExplosionSupplier()
.- Parameters:
centerX
- the center XcenterY
- the center YcenterZ
- the center Zstrength
- the strength of the explosion- Throws:
IllegalStateException
- If noExplosionSupplier
was supplied
-
explode
public void explode(float centerX, float centerY, float centerZ, float strength, @Nullable @Nullable net.kyori.adventure.nbt.CompoundBinaryTag additionalData) Creates an explosion at the given position with the given strength. The algorithm used to compute damages is provided bygetExplosionSupplier()
.- Parameters:
centerX
- center X of the explosioncenterY
- center Y of the explosioncenterZ
- center Z of the explosionstrength
- the strength of the explosionadditionalData
- data to pass to the explosion supplier- Throws:
IllegalStateException
- If noExplosionSupplier
was supplied
-
getExplosionSupplier
Gets the registeredExplosionSupplier
, or null if none was provided.- Returns:
- the instance explosion supplier, null if none was provided
-
setExplosionSupplier
Registers theExplosionSupplier
to use in this instance.- Parameters:
supplier
- the explosion supplier
-
pointers
- Specified by:
pointers
in interfaceForwardingAudience
- Specified by:
pointers
in interfacePointered
-
getBlockLight
public int getBlockLight(int blockX, int blockY, int blockZ) -
getSkyLight
public int getSkyLight(int blockX, int blockY, int blockZ)
-