Adds a new generation callback using string hash to generate a unique random seed for the chunk generator.
one of the generation callbacks
callback function
Optional
uniqueHashStr: stringif specified, will be used as string hash for seed generation, otherwise default hash string will be used
Listens for chunk loading state changes.
chunk state function watcher
chunk states that should be received by watcher
Listens for local chunk loading state changes.
chunk state function watcher
chunk states that should be received by watcher
If the block on the specified coordinates is a TileEntity block and is not initialized, initializes it and returns created TileEntity object.
Optional
region: BlockSourceTile if one was created, null
otherwise.
Drops item or block with specified ID, count, data and extra on the specified coordinates. For blocks, be sure to use block ID, not the tile ID.
Optional
extra: ItemExtraDataSpawned drop entity ID.
Optional
region: BlockSourceBlockSource *
If the block on the specified coordinates is a TileEntity, returns
null
.Optional
region: BlockSourceRequested TileEntity located on the specified coordinates
or null
if it doesn't.
Current weather object. This value should not be edited, call World.setWeather to change current weather.
Data of the block located on the specified coordinates.
Consider using World.getBlockData instead.
Tile ID of the block located on the specified coordinates.
Consider using World.getBlockID instead.
Sets block in the world using it's tile ID and data.
block tile ID
block data
Consider using World.setBlock instead.
Enables "BlockChanged" event for specified block IDs and registers callback function for the IDs.
string or numeric tile ID, or an array of string and/or numeric tile IDs
function that will be called when "BlockChanged" callback occurs involving one of the blocks. Warning! If both old and new blocks are in the IDs list, callback function will be called twice.
If the block on the specified coordinates is a TileEntity, destroys it, dropping it's container.
Optional
region: BlockSourcetrue
if the tile was destroyed successfully, false
otherwise.
Overrides currently biome on specified coordinates. Consider using World.setBiomeMap in GenerateBiomeMap callback.
Sets current time to day or night.
if true, sets time to 10000 (day), else to 13000 (night)
Consider using World.setWorldTime instead.
Sets grass color on the specified coordinates, uses rgb color model.
grass color to be set for the specified coordinates
Sets current time to day or night.
if true, sets time to 13000 (night), else to 10000 (day)
Consider using World.setWorldTime instead.
Copyright © 2024 Nernar. Copyright © 2020 #mineprogramming. Built with ❤ and TypeDoc.
Module that allows to work with current Minecraft world. Most of the methods are client-side, use BlockSource instead.