Skip to content

Add a minecraft:set_position entity modifier #4

@ErrorCraft

Description

@ErrorCraft

Add a minecraft:set_position entity modifier that sets the position of an entity. It either takes a minecraft:world or minecraft:local position provider type to specify world or local coordinates. World coordinates can be relative, just like in the teleport command.

Structure

Properties

position: A position provider. Specifies the position to use.

Example

{
    "function": "minecraft:set_position",
    "position": {
        "type": "minecraft:world",
        "x": 1.0,
        "y": 1.0,
        "z": 1.0
    }
}


Position Providers

minecraft:world

Provides a world position.

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.

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
        }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions