Repository navigation
Conversation
edayot
left a comment
There was a problem hiding this comment.
Tested in game and it works for me, really great lib !, others personal opinions :
the follow and height functionality can't overlap, some users might find it strange, but they can implement that themself
|
|
||
| id: smithed.interaction | ||
| name: Smithed Interaction | ||
| version: "1.0.0" |
There was a problem hiding this comment.
not sure about the version, no others libs have a major version set to 1
There was a problem hiding this comment.
The other open new Lib PR is using a 1 major version 😁
But for a more serious answer, I consider the summit version the 0 major version (and I dont believe in 0 versioning :P)
| store result score #check_gametime smithed.interaction.temp run data get entity @s TIMESTAMP | ||
| unless score #check_gametime smithed.interaction.temp = #current_gametime smithed.interaction.temp run return run data remove entity @s action['type'] | ||
| raw f"execute on {action['on']} unless entity @s[tag=smithed.interaction.player] run return fail" | ||
| if data entity @s SHORTCUT_LOC at @s function ~/try_shortcut: |
There was a problem hiding this comment.
I don't understand why a specific action has to be made here for the sit functionality, can't we use the function action to do the same thing
There was a problem hiding this comment.
i now understand that it's a syntax thing, but it would be more clear that it's just a nice function tag like #smithed.interaction:custom/sit instead of #smithed.interaction:event/on_right_click/custom/sit
just a personal opinion at this point, i don't care if it's one or the other
| # -------------------- -------------------- # | ||
| # --------------------------------------------------- # | ||
| function smithed.interaction:impl/custom/sit: | ||
| # Functions |
There was a problem hiding this comment.
needs the # @public macro for the version check, since it's in a function tag
| } | ||
| } | ||
|
|
||
| append function_tag smithed.interaction:event/on_right_click/custom/sit {"values":[(~/)]} |
There was a problem hiding this comment.
move the function tag at the top of the function definition, so it's clear that this is called in a function tag
There was a problem hiding this comment.
Also don't forget to use the prefixed calls function tag for the version check
| raw # custom : sit | ||
| scoreboard objectives add smithed.interaction.sittable_id dummy | ||
| scoreboard players add #next smithed.interaction.sittable_id 0 | ||
| schedule function SEC 1t |
There was a problem hiding this comment.
you need to add theses function to the beet config in the meta.smithed.versioning.scheduled_paths
this way when two version of the lib are loaded at the same time, they can cancel the scheduled function by themself
There was a problem hiding this comment.
i just found that crafter don't use it, i'm going to update it
There was a problem hiding this comment.
Im confused on this one, because I dont think any of the libraries use this
There was a problem hiding this comment.
they do, because, the default value of the list is impl/technical/tick, most libs use this as the tick function, but the interaction lib doesn't
There was a problem hiding this comment.
this is a bit harder than i thought, i'm going to check myself and suggest an edit
| ``` | ||
| $ pip install beet mecha | ||
| $ git clone https://github.com/Smithed-MC/Libraries | ||
| $ cd Libraries/interaction |
There was a problem hiding this comment.
this is the wrong relative path, should be Libraries/src/smithed_libraries/packs/interaction or just Libraries looking at the next command
This PR adds a new library
smithed.interactionspinning off of the Interaction API developed for Summit '26. It enables easier usage of InteractionsThis is paired with the corresponding docs PR Smithed-MC/Docs#22