Block Behaviours
Block behaviours can be customized to add unique properties to blocks. All behaviours are optional and can be applied to both, blocks and decorations.
Blocks also work with most item-behaviours to give the blocks' item special features.
Some block behaviours provide blockstate properties you will have to provide models for, like axis, repeater, crop, directional, etc.
Example of a blockResource entry for the repeater behaviour (can be found as relay block in the example datapack):
Example
Example
blockResource:
models:
facing=up,powered=false: minecraft:custom/block/arcanery/relay/relay_up_off
facing=down,powered=false: minecraft:custom/block/arcanery/relay/relay_down_off
facing=north,powered=false: minecraft:custom/block/arcanery/relay/relay_north_off
facing=south,powered=false: minecraft:custom/block/arcanery/relay/relay_south_off
facing=east,powered=false: minecraft:custom/block/arcanery/relay/relay_east_off
facing=west,powered=false: minecraft:custom/block/arcanery/relay/relay_west_off
facing=up,powered=true: minecraft:custom/block/arcanery/relay/relay_up_on
facing=down,powered=true: minecraft:custom/block/arcanery/relay/relay_down_on
facing=north,powered=true: minecraft:custom/block/arcanery/relay/relay_north_on
facing=south,powered=true: minecraft:custom/block/arcanery/relay/relay_south_on
facing=east,powered=true: minecraft:custom/block/arcanery/relay/relay_east_on
facing=west,powered=true: minecraft:custom/block/arcanery/relay/relay_west_on
{
"blockResource": {
"models": {
"facing=up,powered=false": "minecraft:custom/block/arcanery/relay/relay_up_off",
"facing=down,powered=false": "minecraft:custom/block/arcanery/relay/relay_down_off",
"facing=north,powered=false": "minecraft:custom/block/arcanery/relay/relay_north_off",
"facing=south,powered=false": "minecraft:custom/block/arcanery/relay/relay_south_off",
"facing=east,powered=false": "minecraft:custom/block/arcanery/relay/relay_east_off",
"facing=west,powered=false": "minecraft:custom/block/arcanery/relay/relay_west_off",
"facing=up,powered=true": "minecraft:custom/block/arcanery/relay/relay_up_on",
"facing=down,powered=true": "minecraft:custom/block/arcanery/relay/relay_down_on",
"facing=north,powered=true": "minecraft:custom/block/arcanery/relay/relay_north_on",
"facing=south,powered=true": "minecraft:custom/block/arcanery/relay/relay_south_on",
"facing=east,powered=true": "minecraft:custom/block/arcanery/relay/relay_east_on",
"facing=west,powered=true": "minecraft:custom/block/arcanery/relay/relay_west_on"
}
}
}
You can also provide rotations for the block model like so:
blockResource:
models:
lit=false,facing=north:
model: minecraft:block/furnace
y: 0
lit=false,facing=south:
model: minecraft:block/furnace
y: 180
lit=false,facing=east:
model: minecraft:block/furnace
y: 90
lit=false,facing=west:
model: minecraft:block/furnace
y: 270
lit=true,facing=north:
model: minecraft:block/furnace_on
y: 0
lit=true,facing=south:
model: minecraft:block/furnace_on
y: 180
lit=true,facing=east:
model: minecraft:block/furnace_on
y: 90
lit=true,facing=west:
model: minecraft:block/furnace_on
y: 270
{
"blockResource": {
"models": {
"lit=false,facing=north": { "model": "minecraft:block/furnace", "y": 0 },
"lit=false,facing=south": { "model": "minecraft:block/furnace", "y": 180 },
"lit=false,facing=east": { "model": "minecraft:block/furnace", "y": 90 },
"lit=false,facing=west": { "model": "minecraft:block/furnace", "y": 270 },
"lit=true,facing=north": { "model": "minecraft:block/furnace_on", "y": 0 },
"lit=true,facing=south": { "model": "minecraft:block/furnace_on", "y": 180 },
"lit=true,facing=east": { "model": "minecraft:block/furnace_on", "y": 90 },
"lit=true,facing=west": { "model": "minecraft:block/furnace_on", "y": 270 }
}
}
}
Example of a block with behaviours set
Example of a block with behaviours set
id: mynamespace:myblock
blockResource:
models:
lit=false,facing=north:
model: minecraft:block/furnace
y: 0
lit=false,facing=south:
model: minecraft:block/furnace
y: 180
lit=false,facing=east:
model: minecraft:block/furnace
y: 90
lit=false,facing=west:
model: minecraft:block/furnace
y: 270
lit=true,facing=north:
model: minecraft:block/furnace_on
y: 0
lit=true,facing=south:
model: minecraft:block/furnace_on
y: 180
lit=true,facing=east:
model: minecraft:block/furnace_on
y: 90
lit=true,facing=west:
model: minecraft:block/furnace_on
y: 270
blockModelType: full_block
properties:
destroyTime: 0
blockBase: minecraft:stone
behaviour:
powersource:
value: 15
repeater:
delay: 1
loss: 1
fuel:
value: 10
cosmetic:
slot: chest
model: mynamespace:custom/models/clown_backpack_animated
autoplay: idle
scale: [1.5, 1.5, 1.5]
translation: [0.0, 0.5, 0.0]
strippable:
replacement: minecraft:stone
{
"id": "mynamespace:myblock",
"blockResource": {
"models": {
"lit=false,facing=north": { "model": "minecraft:block/furnace", "y": 0 },
"lit=false,facing=south": { "model": "minecraft:block/furnace", "y": 180 },
"lit=false,facing=east": { "model": "minecraft:block/furnace", "y": 90 },
"lit=false,facing=west": { "model": "minecraft:block/furnace", "y": 270 },
"lit=true,facing=north": { "model": "minecraft:block/furnace_on", "y": 0 },
"lit=true,facing=south": { "model": "minecraft:block/furnace_on", "y": 180 },
"lit=true,facing=east": { "model": "minecraft:block/furnace_on", "y": 90 },
"lit=true,facing=west": { "model": "minecraft:block/furnace_on", "y": 270 }
}
},
"blockModelType": "full_block",
"properties": {
"destroyTime": 0,
"blockBase": "minecraft:stone"
},
"behaviour": {
"powersource": {
"value": 15
},
"repeater": {
"delay": 1,
"loss": 1
},
"fuel": {
"value": 10
},
"cosmetic": {
"slot": "chest",
"model": "mynamespace:custom/models/clown_backpack_animated",
"autoplay": "idle",
"scale": [1.5, 1.5, 1.5],
"translation": [0.0, 0.5, 0.0]
},
"strippable": {
"replacement": "minecraft:stone"
}
}
}
This creates a block + item that can be worn and when worn shows an animated blockbench model on the player. The item is also a food and can be used as fuel source in furnaces.
The block acts as a redstone powersource of level 15 and a repeater/relay and is strippable (turns to stone when stripped with an axe or an item with the stripper item behaviour)
While possible, you probably don't want to combine powersource with repeater for actual blocks/items for obvious reasons.
Behaviours
axis behaviour
Gives the block an axis property/block-state similar to wooden logs/pillars and handles placement.
connectable behaviour
This behaviour allows the block to connect to other blocks, similar to stairs, but requiring a block on both sides of a corner to be present in order to the corner shape. Optionally without the corner states.
shape:middle,single,left,right,inner_left,inner_right,outer_left,outer_rightfacing:north,east,south,west
This behaviour is best used with decorations, as you will only have to define 6 models:
itemResource:
models:
default: minecraft:custom/furniture/benches/middle_connectable
inner: minecraft:custom/furniture/benches/inner_connectable
outer: minecraft:custom/furniture/benches/outer_connectable
middle: minecraft:custom/furniture/benches/middle_connectable
left: minecraft:custom/furniture/benches/left_connectable
right: minecraft:custom/furniture/benches/right_connectable
single: minecraft:custom/furniture/benches/single_connectable
{
"itemResource": {
"models": {
"default": "minecraft:custom/furniture/benches/middle_connectable",
"inner": "minecraft:custom/furniture/benches/inner_connectable",
"outer": "minecraft:custom/furniture/benches/outer_connectable",
"middle": "minecraft:custom/furniture/benches/middle_connectable",
"left": "minecraft:custom/furniture/benches/left_connectable",
"right": "minecraft:custom/furniture/benches/right_connectable",
"single": "minecraft:custom/furniture/benches/single_connectable"
}
}
}
count behaviour
Gives the block a count property/block-state.
Works similar to turtle eggs or candles, allows you to place "multiple blocks/items" into one block.
facing behaviour
Gives the block a facing property/block-state similar to wooden logs/pillars and handles placement.
horizontal_facing behaviour
Gives the block a facing property/block-state similar to furnaces and handles placement.
Does not support up and down facing directions.
crop behaviour
Makes the block behave like a crop, bonemeable, growing, minimum light requirement, etc. Also gives a growth bonus similar to vanilla crops, which check for farmland blocks in a 3x3 area centered below the crop block. The bonus block and radius can be configured.
You probably want to use this behaviour together with the can_survive behaviour.
If you want your custom crop block to not turn farmland into dirt without moisture, like vanilla crops do, add your block to the block tag maintains_farmland.
In order for the farmland to not turn into dirt when placing the crop on top of it, make sure the solid property is set to false
For bee pollination, use the block tag bee_growables.
You can make farmer villagers able to plant the seeds using the item tag villager_plantable_seeds. Villagers will only work on crops that are on top of farmland blocks (vanilla limitation).
maxAge: maximum age steps of this block (from 0 to maxAge-1). Defaults to 4.minLightLevel: Minimum light level this crop needs to survive. Defaults to 8.bonusRadius: Radius to check for bonus blocks for. Defaults to 1.bonusBlock: Bonus block to check for. More bonus blocks means faster growth. Defaults tominecraft:farmland.villagerInteraction: Allows farmer villagers to break and plant the custom crop. Defaults totrue.beeInteraction: Allows bees to pollinate the crop to increase its age. Defaults totrue.
sapling behaviour
Makes your block behave like vanilla saplings, growing based on random ticks and bonemealable.
All identifiers for the configured_placements are optional, they will only get used when configured.
You add your own configured placement for trees using vanilla datapack mechanics.
stage: 0 to 1. You can provide a single model to use for both states, usedefaultas key in that case.
tree: Identifier for a configured_placement (add via datapack or use vanilla ones)minLightLevel: Defaults to9secondaryChance: Chance between 0 and 1 forsecondaryMegaTreeorsecondaryFlowersplacement to be used. Defaults to0randomTickGrowthChance: Defaults to0.15bonemealGrowthChance: Defaults to0.45megaTree: Identifier for a configured_placement. Will get used for 2x2 sapling placementssecondaryMegaTree: Identifier for a configured_placement. Alternative tomegaTreebased onsecondaryChancetree: Identifier for a configured_placement. Normal tree without flowersecondaryTree: Identifier for a configured_placement. Alternative totreebased onsecondaryChanceflowers: Identifier for a configured_placement. Used when there is a flower neaby.secondaryFlowers: Identifier for a configured_placement. Alternative toflowersbased onsecondaryChance
can_survive behaviour
Checks for the block below with one of the configured block tags or blocks list. The block will break off, similar to flowers or crops, when the block below them is not supported.
The behaviour will automatically check for and apply any facing or axis block-state properties.
Useful for bushes/plants/crops/flowers and more
blocks: List of blocks this block can survive on.- Example:
blocks: ["minecraft:stone", "minecraft:sand"]
- Example:
tags: List of block-tags this block can survive on.- Example:
tags: ["minecraft:dirt", "minecraft:sculk_replaceable"]
- Example:
powersource behaviour
Defines the block as a redstone power source.
value: The redstone power value the block emits (can be mapped to a block-state, see below). Defaults to 15
behaviour:
powersource:
value:
age=0: 0
age=1: 15
{
"behaviour": {
"powersource": {
"value": {
"age=0": 0,
"age=1": 15
}
}
}
}
behaviour:
powersource:
value: 5
{
"behaviour": {
"powersource": {
"value": 5
}
}
}
repeater behaviour
Defines the block as a redstone repeater with configurable delay and loss.
delay: Delay in ticks. Defaults to 0loss: Power loss during transfer. Defaults to 0
powered: true, falsefacing: north, east, south, west, up, down
powerlevel behaviour
Supplies a powerlevel blockstate and changes to it depending on the input redstone signal.
strippable behaviour
Defines the block as strippable, replacing it with another block when interacted with an axe.
replacement: The identifier of the block to replace the current block with. Example:minecraft:stonelootTable: Identifier for a loot table to use when the block is stripped. Example:minecraft:bellscrape: Flag whether to show copper scrape particles. Defaults tofalsescrapeWax: Flag whether to show wax scrape particles. Defaults tofalsesound: Custom sound id to play. Defaults tominecraft:item.axe.strip
slab behaviour
Defines the block as slab, top, bottom, double, with placements, waterloggable.
trapdoor behaviour
Trapdoor like block.
facing: north, south, east, west, up, downhalf: top, bottomopen: true, falsewaterlogged: true, false
canOpenByWindCharge: Whether the trapdoor can be opened by a wind charge. Defaults totruecanOpenByHand: Whether the trapdoor can be opened by hand. Defaults totrueopenSound: Open sound. Defaults to wooden trapdoor open sound.closeSound= Close sound. Defaults to wooden trapdoor close sound.
door behaviour
Door-like "block" that is 2 blocks high. Comes with all door block state properties (hinge, open, powered, etc.)
facing: north, south, east, west, up, downhalf: lower, upperopen: true, falsehinge: left, right
canOpenByWindCharge: Whether the door can be opened by a wind charge. Defaults totruecanOpenByHand: Whether the door can be opened by hand. Defaults totrueopenSound: Open sound. Defaults to wooden door open sound.closeSound= Close sound. Defaults to wooden door close sound.
waterloggable behaviour
Simple waterloggable block with a waterlogged property.
There is an alias called simple_waterloggable for backwards compatibility with older filament data packs
drop_xp behaviour
Makes the block drop xp when being mined without the silk-touch enchantment.
behaviour:
drop_xp:
min:
age=0: 0
age=1: 0
age=2: 4
max:
age=0: 0
age=1: 0
age=2: 6
{
"behaviour": {
"drop_xp": {
"min": {
"age=0": 0,
"age=1": 0,
"age=2": 4
},
"max": {
"age=0": 0,
"age=1": 0,
"age=2": 6
}
}
}
}
Using behaviour for crops, you could make a crop that drops xp when fully aged
behaviour:
drop_xp: 6
{
"behaviour": {
"drop_xp": 6
}
}
This will drop 6 xp for any block-state
block_interact_execute behaviour
Executes a command on block interaction from console, as player (@s).
consumes: Flag whether the block should be broken after running the command(s). Defaults tofalsedropBlock: Flag whether the block should drop items when broken. Defaults tofalsecommand: The command string to execute. Empty by defaultcommands: List of commands to execute. Empty by defaultatBlock: false/true flag whether the command should be run at the blocks' positionsound: Optional sound effect to play during execution. Empty by defaultconsole: Run as server/console instead of as player
block_attack_execute behaviour
Executes a command when the block is "attacked", from console, as player (@s).
consumes: Flag whether the block should be broken after running the command(s). Defaults tofalsedropBlock: Flag whether the block should drop items when broken. Defaults tofalsecommand: The command string to execute. Empty by defaultcommands: List of commands to execute. Empty by defaultatBlock: false/true flag whether the command should be run at the blocks' positionsound: Optional sound effect to play during execution. Empty by defaultconsole: Run as server/console instead of as player
oxidizable behaviour
Defines the block as oxidizing block, similar to the vanilla copper blocks, randomly replacing it with another block when it "ages". Can be reverted/scraped by axes and resets with lightning bolts like vanilla copper blocks.
replacement: The identifier of the block to replace the current block with (e.g., "minecraft:stone").weatherState: The current weathering state of this block. Can beunaffected,exposed,weathered,oxidized. Defaults tounaffected. AweatherStateofoxidizedwill not oxidize any further.
budding behaviour
With this behaviour the blocks grows other blocks, similar to budding amethyst blocks. The sides, blocks and chance can be configured.
If the blocks in grows have directional/facing block state properties, they direction of the side the block is growing from will be set.
chance: Chance of the block to grow another block or move a block to the next growth stage in percent, from 0 to 100. Defaults to 20sides: List of sides blocks can grow out. Can benorth,south,east,west,upordown. Defaults to all directionsgrows: List of id's of blocks for the growth stages. Example:["minecraft:chain", "minecraft:end_rod"]
grass_spread behaviour
Allows the block to spread like mycelium or grass blocks do, based on random ticks.
spreadDimensions: Dimensions for the spread position. Not centered around the block. UsespreadOffsetto center it. Defaults to["0..3", "0..5", "0..3]spreadOffset: Offset for the spread position. Defaults to[-1, -3, -1]attemptsPerTick: Attempts to spread, per tick. Defaults to4requiredBrightness: Range of brightness required for the block to spread. Defaults to"9..15"canDecay: Flag wether the block decays, similar to grass with solid blocks on top. Defaults totruedecayBlockState: Block-state the block decays intopropagatesToBlocks: List of List of blocks this block can spread to. Defaults to["minecraft:dirt"]propagatesToBlockTags: List of block tags this block can spread to. Empty by default
falling_block behaviour
Makes the block a gravity affected/falling block like sand or anvils.
delayAfterPlace: Delay in ticks before the block falls. Defaults to2heavy: To cause anvil-like damage. Defaults tofalsedamagePerDistance: Accumulated damage per block fallenmaxDamage: Maximum damage a falling block can dealdisableDrops: Prevent the block from being placed when it falls. This behaves like theCancelDropNBT data for falling block entities. Defaults tofalsedropItem: Flag whether the block should drop as item when it breaks. This behaves like theDropItemsNBT data for falling block entities. Defaults totruesilent: Flag whether sounds are played when the block falls or breakslandSound: Sound played when the block landsbreakSound: Sound played when the block breakscanBeDamaged: Flag whether the block should be placed as the block indamagedBlockdamagedBlock: New block to use when the falling block 'breaks'. Will copy applicable block state propertiesbaseBreakChance: Chance for the block to break into the block indamagedBlockon its ownbreakChancePerDistance: Chance increase per block fallen for the block to break into the block indamagedBlock
falling_block:
delayAfterPlace: 2 # delay in ticks before the block falls
heavy: true # to cause anvil-like damage
damagePerDistance: 2.0 # accumulated damage per block fallen
maxDamage: 40 # maximum damage
disableDrops: false # prevent the block from being placed
silent: false # no sounds
landSound: minecraft:block.anvil.land
breakSound: minecraft:block.anvil.destroy
canBeDamaged: true # flag whether the block should be placed as the block in "damagedBlock"
damagedBlock: minecraft:diamond_block # new block to use, will copy applicable block state property
baseBreakChance: 0.05 # chance for the block to "break" to the block in "damagedBlock"
breakChancePerDistance: 0.05 # chance increase per block fallen
{
"falling_block": {
"delayAfterPlace": 2, // delay in ticks before the block falls
"heavy": true, // to cause anvil-like damage
"damagePerDistance": 2.0, // accumulated damage per block fallen
"maxDamage": 40, // maximum damage
"disableDrops": false, // prevent the block from being placed
"silent": false, // no sounds
"landSound": "minecraft:block.anvil.land",
"breakSound": "minecraft:block.anvil.destroy",
"canBeDamaged": true, // flag whether the block should be placed as the block in "damagedBlock"
"damagedBlock": "minecraft:diamond_block", // new block to use, will copy applicable block state property
"baseBreakChance": 0.05, // chance for the block to "break" to the block in "damagedBlock"
"breakChancePerDistance": 0.05 // chance increase per block fallen
}
}
tnt behaviour
With this behaviour the block can be lit with flint and steel or redstone to spawn a TNT entity with the blockstate of this block.
- unstable: Flag whether the block explodes when a player tries to break it. Defaults to
false - explosionPower: Explosion power. Defaults to
4.0 - fuseTime: Fuse time (delay until the tnt entity explodes). Defaults to
80 - primeSound: Sound to play when the block is primed. Defaults to
minecraft:entity.tnt.primed
Block behaviours with block entity
The following block-behaviours require a block entity. They can not be pushed, so make sure the pushReaction in your block properties is set to destroy, block or ignore.
furnace behaviour
Furnace behaviour with menu.
Combine this with the horizontal_facing behaviour for a vanilla-like furnace block!
Checkout the example datapack to see how to configure it.
hopper behaviour
Hopper behaviour with menu.
facing:north,south,east,west,downenabled:true,false
filterItems: List of items and/or item tags. Defaults is empty. Example:["minecraft:diamond", "#minecraft:dirt"]would allow for diamonds and all items with theminecraft:dirtitem-tag.pickupItemEntities: Flag whether item entities should be picked up. Defaults totruetakeFromContainer: Flag whether items from the container above should be taken. Defaults totruecooldownTimeCooldown time before transfering a new item. Defaults to8
flammable behaviour
Makes the block flammable.
leaf_decay behaviour
Makes the block decay like leaf blocks when no log is attached to it and wasn't placed by a player.
Adds distance and persistent block state properties to the block.
blockTag: Block tag for blocks that prevent leaf decay. Defaults tominecraft:logsdecayChanceChance to decay in each random tick. Can be between 0 and 1. Defaults to1
lamp behaviour
Allows you to create lamps that either switch on/off or cycle through a list of light levels on player interaction.
level: 0 to 15 (optional, only whenmodelsis set totrue)
on: Light level to use for the 'on' state. From0-15off: Light level to use for the 'off' state. From0-15cycle: List of light levels to cycle through. Overwrites theonandoffvalues. Example:[0,7,15]defaultValue: Default light level when placed. From0-15models: Flag whether to use block state models. Ignored by decorations.true/false. Defaults tofalsesound: Sound to play when interacted with succesfully. Can be based on block-state. Empty by default
lamp:
cycle: [0, 2, 4, 6, 8, 10, 12, 14]
{
"lamp": {
"cycle": [0, 2, 4, 6, 8, 10, 12, 14]
}
}
waxable behaviour
Allows the block to be 'waxed' using honeycomb or with filament items that have the "wax" behaviour.
replacement: The identifier of the block to replace the current block with. Example:minecraft:waxed_copper_block
place_on_water behaviour
Allows the block to be placed on water.
Use this behaviour together with the can_survive behaviour to recreate lily-pads!
No fields to configure.
bouncy behaviour
Allows to make the block bouncy, similar to slime but extra bounciness when the player presses space on landing.
bounciness: This value gets multiplied by the entities y-velocity when landing on the block and the player presses space
particle_emitter behaviour
Adds particle emitters to the block.
Most field values can be mapped to block-states and ranges (like 0..1) are supported for numeric values.
enabled: Boolean or state-mapped boolean controlling whether the emitter is active.elements: Array of emitter elements. Each element supports:enabled:true/falseparticle: Particle descriptor or identifier (some particle types accept extra options likecolor)interval: Interval in ticks between emissionsoffset: Offset from block center. Each axis can be a number or range like"0..0.5"count: Number of particles to spawn (can be a single number or a ranged string like"1..5")delta: Delta/spread for particle positionsspeed: Particle speed (can be ranged)force: Boolean whether to force particle spawning
particle_emitter:
enabled:
powerlevel=1: true
powerlevel=0: false
elements:
- enabled: true
particle:
type: scrape
interval: 5
offset: [0.5, "0..0.5", 0.5]
count: 5
delta: [0, 0, 0]
speed: 0.1
force: false
{
"particle_emitter": {
"enabled": {
"powerlevel=1": true,
"powerlevel=0": false
},
"elements": [
{
"enabled": true,
"particle": {
"type": "scrape"
},
"interval": 5,
"offset": [0.5, "0..0.5", 0.5],
"count": 5,
"delta": [0, 0, 0],
"speed": 0.1,
"force": false
}
]
}
}
The offset, count, delta and speed can have ranged values like "0..1" - this will pick a random number between 0 and 1.
Some particle types have additional options like color.
status_effect_emitter behaviour
Adds status effect emitters to the block.
Allows for ranged values and enabling based on block-state.
enabled: Boolean or state-mapped boolean controlling whether the emitter is active.elements: List of effect elements. Each element supports:enabled:true/falseinterval: Interval in ticksonlyPlayer: Iftrue, only players are affectedignoreHeight: Iftrue, vertical distance is ignored when applying the effect (similar to beacons)radius: Cube-shaped radius in blocks to search for entitieseffect: Identifier or name of the status effect (e.g.speed)duration: Duration of the effect in ticksamplifier: Effect amplifier (integer)ambient: Ambient flag for the effectvisible: Whether particles are shownshowIcon: Whether the status effect icon is shown
status_effect_emitter:
enabled:
powerlevel=1: true
powerlevel=0: false
elements:
- enabled: true
interval: 100
onlyPlayer: true
ignoreHeight: false
radius: 16
effect: speed
duration: 200
amplifier: 0
ambient: true
visible: true
showIcon: true
{
"status_effect_emitter": {
"enabled": {
"powerlevel=1": true,
"powerlevel=0": false
},
"elements": [
{
"enabled": true,
"interval": 100,
"onlyPlayer": true,
"ignoreHeight": false,
"radius": 16,
"effect": "speed",
"duration": 200,
"amplifier": 0,
"ambient": true,
"visible": true,
"showIcon": true
}
]
}
}
area_execute behaviour
Executes commands when a players enter/leaves or stays in an area. Optionally based on luckperms permission.
radius: Cube-shaped radius in blocks to check for players. Defaults to16enabled: Boolean or state-mapped flag to enable all commands. Defaults totrueinterval: Interval in ticks between checks. Defaults to40repeatCommand/repeatCommands: Command(s) to run each interval for players inside the areaenterCommand/enterCommands: Command(s) to run when a player first enters the areaexitCommand/exitCommands: Command(s) to run when a player leaves the areaatBlock: Iftrue, commands are executed at the block position (useful for selectors). Defaults tofalseignoreHeight: Iftrue, height is ignored when forming the area (uses world height). Defaults tofalseconsole: Iftrue, commands are executed as the server console instead of the player. Defaults tofalsepermission: Optional permission node to check (requires luckperms) - only players with the permission are considered
area_execute:
radius: 16
enabled: true
interval: 40
enterCommands:
- "title %player% actionbar {\"text\":\"Hello, %player%!\"}"
repeatCommands:
- "playsound minecraft:entity.cat.purr master %player%"
exitCommands:
- "title %player% actionbar {\"text\":\"Goodbye, %player%!\"}"
atBlock: true
ignoreHeight: false
permission: "mything.area.affected" # optional, luckperms based
{
"area_execute": {
"radius": 16,
"enabled": true,
"interval": 40,
"enterCommands": ["title %player% actionbar {\"text\":\"Hello, %player%!\"}"],
"repeatCommands": ["playsound minecraft:entity.cat.purr master %player%"],
"exitCommands": ["title %player% actionbar {\"text\":\"Goodbye, %player%!\"}"],
"atBlock": true,
"ignoreHeight": false,
"permission": "mything.area.affected"
}
}
ignite_entity behaviour
Sets an entity on fire when it is inside the block
lever behaviour
Defines the block as an interactive lever that can emit redstone power and play sounds when toggled.
powerlevel: The redstone power level the lever emits when activated (can be mapped to a block-state). Defaults to15sound: The sound played when the lever is toggled. Defaults tominecraft:block.lever.clickvolume: The volume of the toggle sound. Defaults to0.3pitch: The pitch of the toggle sound. Empty by default
behaviour:
lever:
powerlevel: 15
sound: minecraft:block.lever.click
volume:
powered=true: 0.2
powered=false: 0.3
{
"behaviour": {
"lever": {
"powerlevel": 15,
"sound": "minecraft:block.lever.click",
"volume": {
"powered=true": 0.2,
"powered=false": 0.3
}
}
}
}
button behaviour
Defines the block as an interactive button that can emit redstone power for a limited duration when pressed.
powerlevel: The redstone power level the button emits when activated (can be mapped to a block-state). Defaults to15ticksToStayPressed: Duration in ticks that the button remains pressed before resetting. Defaults to100canBeActivatedByArrows: Whether the button can be triggered by arrows or other projectiles. Defaults totrueclickOnSound: Sound played when the button is pressed. Defaults tominecraft:block.wooden_button.click_onclickOffSound: Sound played when the button is released. Defaults tominecraft:block.wooden_button.click_off
behaviour:
button:
powerlevel:
powered=false: 0
powered=true: 15
ticksToStayPressed:
material=stone: 20
material=wood: 100
canBeActivatedByArrows:
material=stone: false
material=wood: true
{
"behaviour": {
"button": {
"powerlevel": {
"powered=false": 0,
"powered=true": 15
},
"ticksToStayPressed": {
"material=stone": 20,
"material=wood": 100
},
"canBeActivatedByArrows": {
"material=stone": false,
"material=wood": true
}
}
}
}