Denizen Script Mechanisms


Mechanisms are found in object properties, the 'adjust' command, and similar. These are used to change the state of an object.
Learn about how mechanisms work in The Beginner's Guide.


Showing 32 out of 644 mechanisms...
Nameblock_resistance
ObjectMaterialTag
InputElementTag(Decimal)
Related Tags<MaterialTag.block_resistance> Returns the explosion resistance for all blocks of this material type.
DescriptionSets the explosion resistance for all blocks of this material type.
Generated Example
- adjust <material[stone]> block_resistance:0
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/MaterialTag.java#L755

Nameblock_strength
ObjectMaterialTag
InputElementTag(Decimal)
Related Tags<MaterialTag.block_strength> Returns the material's strength level. (Only for block materials). (...)
DescriptionSets the strength for all blocks of this material type.
This does not work for specifically obsidian (as it is a hardcoded special case in the Minecraft internals).
Generated Example
- adjust <material[stone]> block_strength:-1
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/MaterialTag.java#L770

Namebottles
ObjectMaterialTag
InputListTag
Related Tags<MaterialTag.bottles> Returns a list of booleans that represent whether a slot in a brewing stand has a bottle. (...)
DescriptionSets the bottles in a brewing stand. Input is a list of booleans representing whether that slot has a bottle.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/material/MaterialBrewingStand.java#L84

Namecount
ObjectMaterialTag
InputElementTag(Number)
Related Tags<MaterialTag.count> Returns the amount of pickles in a Sea Pickle material, eggs in a Turtle Egg material, charges in a Respawn Anchor material, or candles in a Candle material.
<MaterialTag.count_min> Returns the minimum amount of pickles allowed in a Sea Pickle material, eggs in a Turtle Egg material, charges in a Respawn Anchor material, or candles in a Candle material.
<MaterialTag.count_max> Returns the maximum amount of pickles allowed in a Sea Pickle material, eggs in a Turtle Egg material, charges in a Respawn Anchor material, or candles in a Candle material.
DescriptionSets the amount of pickles in a Sea Pickle material, eggs in a Turtle Egg material, charges in a Respawn Anchor material, or candles in a Candle material.
Generated Example
- adjust <material[stone]> count:1
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/material/MaterialCount.java#L183

Namedelay
ObjectMaterialTag
InputElementTag(Number)
Related Tags<MaterialTag.delay> Returns the current delay of a redstone repeater material.
<MaterialTag.max_delay> Returns the maximum delay allowed for the redstone repeater material.
<MaterialTag.min_delay> Returns the minimum delay allowed for the redstone repeater material.
DescriptionSets the delay of a redstone repeater material.
Generated Example
- adjust <material[stone]> delay:1
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/material/MaterialDelay.java#L107

Namedirection
ObjectMaterialTag
InputElementTag
Related Tags<MaterialTag.direction> Returns the current facing direction for a directional material (like a door or a bed). (...)
<MaterialTag.valid_directions> Returns a list of directions that are valid for a directional material. (...)
DescriptionSets the current facing direction for a directional material (like a door or a bed).
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/material/MaterialDirectional.java#L327

Namedistance
ObjectMaterialTag
InputElementTag(Number)
Related Tags<MaterialTag.distance> Returns the horizontal distance between a scaffolding block and the nearest scaffolding block placed above a 'bottom' scaffold, (...)
DescriptionSets the horizontal distance between a scaffolding block and the nearest scaffolding block placed above a 'bottom' scaffold, or between a leaves block and the nearest log.
Generated Example
- adjust <material[stone]> distance:2
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/material/MaterialDistance.java#L95

Namefaces
ObjectMaterialTag
InputListTag
Related Tags<MaterialTag.faces> Returns a list of the current faces for a material that has multiple faces (like a mushroom block). (...)
<MaterialTag.valid_faces> Returns a list of faces that are valid for a material that has multiple faces. (...)
DescriptionSets the current faces for a material that has multiple faces (like a mushroom block).
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/material/MaterialFaces.java#L97

Namehalf
ObjectMaterialTag
InputElementTag
Related Tags<MaterialTag.half> Returns the current half for a bisected material (like a door, double-plant, chest, or a bed). (...)
DescriptionSets the current half for a bisected material (like a door, double-plant, chest, or a bed).
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/material/MaterialHalf.java#L168

Nameheights
ObjectMaterialTag
InputElementTag
Related Tags<MaterialTag.heights> Deprecated in favor of Tag:MaterialTag.sides
DescriptionDeprecated in favor of Mechanism:MaterialTag.sides
DeprecatedUse 'sides'
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/material/MaterialSides.java#L126

Namehinge
ObjectMaterialTag
InputElementTag
Related Tags<MaterialTag.hinge> Returns a door's hinge side. (...)
DescriptionSets a door's hinge side to LEFT or RIGHT.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/material/MaterialHinge.java#L71

Nameinstrument
ObjectMaterialTag
InputElementTag
Related Tags<MaterialTag.instrument> Returns the name of the instrument played from this note block, (...)
DescriptionSets the instrument played from this note block,
for valid instruments see list at 🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Instrument.html.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/material/MaterialInstrument.java#L77

Nameis_locked
ObjectMaterialTag
InputElementTag(Boolean)
Related Tags<MaterialTag.is_locked> Returns whether this redstone repeater material is locked.
DescriptionSets this redstone repeater material to be locked.
Generated Example
- adjust <material[stone]> is_locked:true
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/material/MaterialLocked.java#L74

Nameleaf_size
ObjectMaterialTag
InputElementTag
Related Tags<MaterialTag.leaf_size> Returns the size of the leaves for this bamboo block. (...)
DescriptionSets the size of the leaves for this bamboo block.
Valid input is SMALL, LARGE, or NONE.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/material/MaterialLeafSize.java#L75

Namemax_stack_size
ObjectMaterialTag
InputElementTag(Number)
Related Tags<MaterialTag.max_stack_size> Returns the maximum amount of this material that can be held in a stack.
DescriptionSets the maximum stack size for all items this material type.
Note that altering this will probably require a script performing "- inventory update" in the event "after player clicks in inventory:" to maintain sync.
The maximum the client will interact with is stacks of 64, however you can set the max up to 127 and the client will render it, but refuse to move stacks properly.
Generated Example
- adjust <material[stone]> max_stack_size:4
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/MaterialTag.java#L740

Namemode
ObjectMaterialTag
InputElementTag
Related Tags<MaterialTag.mode> Returns a block's mode. (...)
DescriptionSet a block's mode.
For comparators, input is COMPARE or SUBTRACT.
For piston_heads, input is NORMAL or SHORT.
For bubble_columns, input is NORMAL or DRAG.
For structure_blocks, input is CORNER, DATA, LOAD, or SAVE.
For sculk_sensors, input is ACTIVE, COOLDOWN, or INACTIVE.
For daylight_detectors, input is INVERTED or NORMAL.
For command_blocks, input is CONDITIONAL or NORMAL.
For big_dripleafs, input is FULL, NONE, PARTIAL, or UNSTABLE.
For sculk_catalysts, input is BLOOM or NORMAL.
For sculk_shriekers, input is SHRIEKING or NORMAL.
For tripwires, input is ARMED or DISARMED.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/material/MaterialMode.java#L218

Namenote
ObjectMaterialTag
InputElementTag(Number)
Related Tags<MaterialTag.note> Returns the note played from this note block, as an ID number from 0 to 24.
<MaterialTag.note_tone> Returns the tone of note played from this note block, as a letter from A to F, sometimes with a # to indicate sharp. (...)
<MaterialTag.note_octave> Returns the octave of note played from this note block, as 0, 1, or 2.
DescriptionSets the note played from this note block, as an ID number from 0 to 24.
Generated Example
- adjust <material[stone]> note:3
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/material/MaterialNote.java#L97

Namepersistent
ObjectMaterialTag
InputElementTag(Boolean)
Related Tags<MaterialTag.persistent> Returns whether this block will decay from being too far away from a tree.
DescriptionSets leaves blocks to ignore decay, or to obey it.
Generated Example
- adjust <material[stone]> persistent:false
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/material/MaterialPersistent.java#L70

Namepiston_reaction
ObjectMaterialTag
InputElementTag
Related Tags<MaterialTag.piston_reaction> Returns the material's piston reaction. (Only for block materials).
DescriptionSets the piston reaction for all blocks of this material type.
Input may be: NORMAL (push and pull allowed), DESTROY (break when pushed), BLOCK (prevent a push or pull), IGNORE (don't use this), or PUSH_ONLY (push allowed but not pull)
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/MaterialTag.java#L564

Namepower
ObjectMaterialTag
InputElementTag(Number)
Related Tags<MaterialTag.power> Returns the redstone power level of an analogue-powerable block.
<MaterialTag.max_power> Returns the maximum redstone power an analogue-powerable block can have.
DescriptionSets the redstone power level of an analogue-powerable block.
Generated Example
- adjust <material[stone]> power:2
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/material/MaterialPower.java#L78

Nameshape
ObjectMaterialTag
InputElementTag
Related Tags<MaterialTag.shape> Returns the shape of a block. (...)
DescriptionSets the shape of a block.
For stairs, input is the corner shape as INNER_LEFT, INNER_RIGHT, OUTER_LEFT, OUTER_RIGHT, or STRAIGHT.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/material/MaterialShape.java#L71

Namesides
ObjectMaterialTag
InputElementTag
Related Tags<MaterialTag.sides> Returns the list of heights for a wall block, or connections for a redstone wire, in order North|East|South|West|Vertical. (...)
DescriptionSets the list of heights for a wall block, or connections for a redstone wire, in order North|East|South|West|Vertical.
For wall blocks: For n/e/s/w, can be "tall", "low", or "none". For vertical, can be "tall" or "none".
For redstone wires: For n/e/s/w, can be "none", "side", or "up". No vertical.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/material/MaterialSides.java#L136

Namesnowy
ObjectMaterialTag
InputElementTag(Boolean)
Related Tags<MaterialTag.snowy> Returns whether this material is covered in snow or not.
DescriptionSets this material to be covered in snow, or not.
Generated Example
- adjust <material[stone]> snowy:false
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/material/MaterialSnowable.java#L74

Nameswitched
ObjectMaterialTag
InputElementTag(Boolean)
Related Tags<MaterialTag.switched> Returns whether a material is 'switched on', which has different semantic meaning depending on the material type. (...)
DescriptionSets whether a material is 'switched on', which has different semantic meaning depending on the material type.
More specifically, this sets whether:
- a Powerable material (like pressure plates) is activated
- an Openable material (like doors) is open
- a dispenser is powered and should dispense its contents
- a daylight sensor can see the sun
- a lightable block is lit
- a piston block is extended
- an end portal frame has an ender eye in it
- a hopper is NOT being powered by redstone
- a sculk_shrieker can summon a warden
Generated Example
- adjust <material[stone]> switched:true
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/material/MaterialSwitchable.java#L230

Nameunstable
ObjectMaterialTag
InputElementTag(Boolean)
Related Tags<MaterialTag.unstable> Returns whether this TNT block is unstable (explodes when punched).
DescriptionSets whether this TNT block is unstable (explodes when punched).
Generated Example
- adjust <material[stone]> unstable:true
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/material/MaterialUnstable.java#L74

Namevanilla_tags
ObjectMaterialTag
InputListTag
Related Tags<MaterialTag.vanilla_tags> Returns a list of vanilla tags that apply to this material. See also 🔗https://minecraft.wiki/w/Tag.
DescriptionSets a material's vanilla tags.
Any tag name will be accepted - meaning, any tag name input will be added to the material, regardless of whether it previously existed or not.
Note that this gets reset once server resources are reloaded (see Event:server resources reloaded).
Example
# Adds the guarded_by_piglins tag to Netherrack, without removing its other tags.
- adjust <material[netherrack]> vanilla_tags:<material[netherrack].vanilla_tags.include[guarded_by_piglins]>
Example
# Removes the dead_bush_may_place_on tag from <[material]>, while keeping its other tags.
- adjust <[material]> vanilla_tags:<[material].vanilla_tags.exclude[dead_bush_may_place_on]>
Example
# Removes all vanilla tags from <[material]>, leaving it with only the wither_summon_base_blocks tag.
- adjust <[material]> vanilla_tags:wither_summon_base_blocks
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/MaterialTag.java#L706

Namewaterlogged
ObjectMaterialTag
InputElementTag(Boolean)
Related Tags<MaterialTag.waterlogged> Returns whether this block is waterlogged or not.
DescriptionSets this block to be waterlogged, or not.
Generated Example
- adjust <material[stone]> waterlogged:false
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/material/MaterialWaterlogged.java#L74

Nameage
ObjectMaterialTag
InputElementTag(Number)
Related Tags<MaterialTag.age> (Property) Returns an ageable material's current age. This includes plant growth. (...)
Description(Property) Sets an ageable material's current age. This includes plant growth.
See also Tag:MaterialTag.maximum_age.
Generated Example
- adjust <material[stone]> age:1
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/material/MaterialAge.java#L18

Nameattached
ObjectMaterialTag
InputElementTag(Boolean)
Related Tags<MaterialTag.attached> (Property) Returns whether a material is attached. (...)
Description(Property) Sets whether a material is attached.
For a lantern, this sets whether it is hanging from the ceiling.
For a gate, this sets whether it is lowered to attach to a wall block.
For a mangrove_propagule, this sets whether it is hanging from the block above it.
For a tripwire, this sets whether a tripwire hook or string forms a complete tripwire circuit and is ready to trigger.
Updating the property on a tripwire hook will change the texture to indicate a connected string, but will not have any effect when used on the tripwire string itself.
It may however still be used to check whether the string forms a circuit.
For hanging signs, this affects signs hanging below a block and changes whether the chains are vertical (false) or diagonal (true).
Generated Example
- adjust <material[stone]> attached:true
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/material/MaterialAttached.java#L17

Nameattachment_face
ObjectMaterialTag
InputElementTag
Related Tags<MaterialTag.attachment_face> (Property) Returns the current attach direction for attachable materials such as switches, grindstones, and bells. (...)
Description(Property) Sets the current attach direction for attachable materials such as switches, grindstones, and bells.
For bell values, see 🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/block/data/type/Bell.Attachment.html
For all other supported type values, see 🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/block/data/FaceAttachable.AttachedFace.html
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/material/MaterialAttachmentFace.java#L13

Namelevel
ObjectMaterialTag
InputElementTag(Number)
Related Tags<MaterialTag.level> (Property) Returns the current level for a Levelled material, cake, beehives, snow, farmland, or brushable blocks. (...)
Description(Property) Sets the current level for a Levelled material, cake, beehives, snow, farmland, or brushable blocks.
"Levelled" materials include: water, lava, cauldrons, composters, light blocks, brushable blocks, and any other future Levelled implementing types.
For light blocks, this is the brightness of the light.
For water/lava this is the height of the liquid block.
For cauldrons, this is the amount of liquid contained.
For cake, this is the number of bites left.
For beehives/bee nests, this is the amount of honey contained.
For snow, this is the number of partial layers, or the height, of a snow block.
For farmland, this is the moisture level.
For composters, this is the amount of compost.
For brushable blocks (also referred to as "suspicious blocks"), this is the level of dusting. 1.20+ only.
See also Tag:MaterialTag.maximum_level and Tag:MaterialTag.minimum_level.
Generated Example
- adjust <material[stone]> level:3
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/material/MaterialLevel.java#L19

Nametype
ObjectMaterialTag
InputElementTag
Related Tags<MaterialTag.type> (Property) Returns the current type of the block. (...)
Description(Property) Sets the current type of the block.
For slabs, input is TOP, BOTTOM, or DOUBLE.
For piston_heads, input is NORMAL or STICKY.
For campfires, input is NORMAL or SIGNAL.
For pointed dripstone, input is BASE, FRUSTUM, MIDDLE, TIP, or TIP_MERGE.
For cave vines, input is NORMAL or BERRIES.
For scaffolding, input is NORMAL or BOTTOM.
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/material/MaterialBlockType.java#L13