This mod adds hooks into several methods that can be used to run function files, on events other than every tick.
will you update this mod to 1.15?
In reply to decim0001:
I have a version in dev, but I'm a little burnt out (I'm working towards fixing that). This is the current state:https://www.subscribestar.com/frontrider
There's no Pillager among the entities that I can use to execute a command...why is that so?
Because I missed it. The list of those entities was relatively to get my hands on.
In reply to thefrontrider:
You can actually fix it by hooking up to the corresponding entity event, and doing the check on @s yourself. (That's how the rest of the entity events work)The "event create" command won't crash the function file if the event exists, so you can use that for now. I'll need to update the docs.
I saw that in the latest version the pillager is present, thank you! just a quick reminder that also "drowned", "phantom" and "ravager" are not there yet.
Will be added in the next bugfix version.
does "api:item-finishUsing-" only work when the item is consumed, if it's right clicked with, left click with, or both of the latter 2?
In reply to Nathan22211:
It works when you right-clicked with the item in hand, only if the item already had a use. Adding a proper use tag now.
thanks adding a left click would help because with the current way the tag works it limits me to axe, shovels, and hoes with dynagear
Dynagear is actually one of my intended companions :P Nice to hear that people actually mess with that.
this mod works really well as an alternative to block loot tables, the only problem is that the block-broken tags don't check for what it was mined with by the player
If you use a command that affects the entity that casts it, then it will use the player who mined it as the target. Eg, if you used "clear", then the player's inventory will be cleared.
Man, this is awesome! Just set up my pack to let me search for flint in gravel by right-clicking it while holding a stick... much better than having to dig up millions of cubic meters of the stuff. I'm also trying to figure out some in-world crafting stuff, which kinda works! Though it always happens instantaneously, and I haven't figured out how to make it take time or damage the tool yet.
Is there documentation somewhere on how to target the "user object" mentioned in the readme? I've been using the @p target selector, but it'd be cool to know how that works.
In reply to crystalsoulslayer:
Under the hood, I pass the user of the item to the command as the caster.
Is the caster the @s selector? The @s selector seems to target the block itself, for the block-activate tag at least. Sorry for the n00b questions, I've never played around much with vanilla's command system.
Don't worry, it's also an experiment on my side. @s is the "self" selector (I actually learned that recently.)
On activation, the position is the block's position. With a recheck, I intended to pass down the entity as well (so @s responds to that), but it looks like I did not do that. That's fixed on my end now.
Testing the new entity event system right now. If that's stable, I'll release a new version.
Cool, thanks for the response! :)
Entity events work, item right-clicks are also in there. It will show up soon.
Neat! Updated to the new datapack structure and now the @s target selector is pointing directly at me, as expected. :)
Another question (I'm so sorry): I'm trying to implement a thing where you can use cauldrons as a quenching vessel, but the block activate event isn't triggering with them at all. Are cauldron blocks weird in a way that means I should expect this, or should I go file an issue on GitHub?