Origin
Enables the player to choose from list of objects which contain the IDs of the origin and its origin layer when the item is used.
Type ID: origins:origin
Note
The field table below outlines the fields of the object to be contained by this component type.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
layer |
Identifier | The ID of the origin layer to be selected. | |
origin |
Identifier | optional | If specified, this origin will be automatically set to the specified origin layer. |
Examples
give @s minecraft:stick[origins:origin = []]
This example will define an origins:origin component to a Stick item that enables the player to select from all the available and enabled origin layers when the item is used.
give @s origins:orb_of_origin[origins:origin = [{layer: "origins:origin"}, {layer: "example:hello_world"}]]
This example will define an origins:origin component to an Orb of Origins item that enables the player to only select an origin from the defined origin layers (origins:origin and example:hello_world) when the item is used.
give @s minecraft:egg[origins:origin = [{layer: "origins:origin", origin: "origins:arachnid"}]]
This example will define an origins:origin component to an Egg item that will automatically set the origin of the player in the origins:origin origin layer to origins:arachnid origin.