Skip to content

docs: Interaction Libary - #22

Open
runcows wants to merge 2 commits into
Smithed-MC:mainfrom
runcows:feat/interaction-library
Open

runcows wants to merge 2 commits into
Smithed-MC:mainfrom
runcows:feat/interaction-library

Conversation

@runcows

@runcows runcows commented Oct 10, 2026 •

Copy link
Copy Markdown

Adds documention for the new Interaction Library (Smithed-MC/Libraries#68)


Both of these support the following fields
- `command` : String representing a valid command.
- `function` : String representing a valid function [resource location](https://minecraft.wiki/w/Identifier).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or function tag, if prefixed by #

@@ -0,0 +1,46 @@
# Inteaction (v{{ interaction_version }})

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo Inteaction => Interaction


Usually, this is done by summoning the interaction with the relevant data like below:
```{code-block} mcfunction
summon minecraft:interaction ~ ~ ~ {Tags: ["smithed.interaction"], data: {smithed_interaction: {on_right_click: {command: "say hello world"}}}}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For readability, a multi-line command is better

@@ -0,0 +1,10 @@
Example usage:
```{code-block} mcfunction
summon minecraft:interaction ~ ~ ~ {Tags: ["smithed.interaction"], data: {smithed_interaction: {on_right_click: {custom: "sit", height: 0.5}}}}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For readability, a multi-line command is better

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants