Skip to content
ErrorCraft edited this page Jun 12, 2022 · 1 revision

This is a page with extra definitions related to entity modifiers.

Position Providers

Position providers give a position to use in in the minecraft:set_position entity modifier.

minecraft:world

Provides a world position. Similar to x y z and ~x ~y ~z in the teleport command.

Properties

x: A relative number provider. Specifies the x position.
y: A relative number provider. Specifies the y position.
z: A relative number provider. Specifies the z position.

Example

{
    "function": "minecraft:set_position",
    "position": {
        "type": "minecraft:world",
        "x": 1.0,
        "y": {
            "value": 1.0
        },
        "z": {
            "value": {
                "type": "minecraft:constant",
                "value": 1.0
            },
            "relative": true
        }
    }
}

minecraft:local

Provides a local position. Similar to ^left ^up ^forwards in the teleport command.

Properties

left: A number provider. Specifies the leftwards offset.
up: A number provider. Specifies the upwards offset.
forwards: A number provider. Specifies the forwards offset.

Example

{
    "function": "minecraft:set_position",
    "position": {
        "type": "minecraft:local",
        "left": 1.0,
        "up": 1.0,
        "forwards": {
            "type": "minecraft:constant",
            "value": 1.0
        }
    }
}

Rotation Providers

Rotation providers give a rotation to use in the minecraft:set_rotation entity modifier.

Properties

x: A relative number provider. Specifies the rotation around the x-axis.
y: A relative number provider. Specifies the rotation around the y-axis.

Example

{
    "function": "minecraft:set_rotation",
    "rotation": {
        "x": 10.0,
        "y": {
            "value": 10.0,
            "relative": true
        }
    }
}

Relative Number Providers

Relative number providers are like number providers, but they may be relative to an existing value.

Properties

value: A number provider. Specifies the number to use.
relative: An optional boolean. If true, value will be relative to the passed value.

Example

{
    "value": {
        "type": "minecraft:uniform",
        "min": -1.0,
        "max": 1.0
    }
    "relative": true
}