stateString
is the string representation of a blockbiomeId
is the biome numerical id
typeId
- The block type ID (numerical or string)properties
- A dictionary of block state properties to build frombiomeId
- The biome numerical id
Constructor of a block
type
is the block numerical idbiomeId
is the biome numerical idmetadata
is the metadata numerical valuestateId
(optional) represents the state of the block (same as metadata in newer versions)
Tells you if heldItemType
is one of the right tool to harvest the block.
heldItemType
the id of the held item (or null if nothing is held)
Parse the block state and return its properties.
(Bedrock Edition) Returns an integer hash to represent the block state.
prefixedName
- The name of the block, including theminecraft:
prefix (string).states
- A record of block state properties.
Tells you how long it will take to dig the block, in milliseconds.
heldItemType
the id of the held item (or null if nothing is held)creative
game in creativeinWater
the bot is in waternotOnGround
the bot is not on the groundenchantments
list of enchantments from the held item (from simplified nbt data) AND equipped armor - Aqua Affinity enchantment on helmet also affects breaking speedeffects
effects on the bot (bot.entity.effects)
Vec3 instance.
Numerical id.
Minecraft ID (string) of the block.
Display name of the block.
Array of bounding boxes representing the block shape. Each bounding box is an array of the form [xmin, ymin, zmin, xmax, ymax, zmax]
. Depends on the type and state of the block.
If this block is a block entity, this contains the NBT data for the entity.
Simplified block entity data using prismarine-nbt's simplify() function. Only for reading - data modified here cannot be saved back later.
Number which represents different things depending on the block. See http://www.minecraftwiki.net/wiki/Data_values#Data
(Bedrock Edition) A hash uniquely representing the block name and its properties (number).
A biome instance. See Biome.
If the block is a sign, contains the sign text.
If the block is a painting, contains information about the painting.
id
position
name
direction
- direction vector telling how the painting is facing.
Boolean, whether the block is considered diggable.
The shape of the block according to the physics engine's collision detection. Currently one of:
block
- currently, partially solid blocks, such as half-slabs and ladders, are considered entirely solid.empty
- such as flowers and lava.
Boolean, true if the block texture has some transparency.
This tells what types of tools will be effective against the block. Possible
values are: null
, rock
, wood
, plant
, melon
, leaves
, dirt
, web
, and wool
.
See http://www.minecraftwiki.net/wiki/Digging and the toolMultipliers
variable at the top of lib/plugins/digging.js for more info.
The set of tools that will allow you to harvest the block.
The blocks or items dropped by that block.
Some blocks may have entity data attached to them. If they do, they contain extra fields which can manipulate the entity NBT data
Sets the text for the sign, can be plaintext, or array of JSON or prismarine-chat instances.
Gets the plain text content of the sign. The first item of the array returned and the second is the back, which will be undefined for versions that don't support writing on the back of signs.
Deprecated, returns a plaintext string containing the sign's text.
Deprecated, sets the text for a sign's text. Can be plaintext, or array of JSON or prismarine-chat instances.