![Armor Statues [Forge & Fabric]](https://media.forgecdn.net/avatars/thumbnails/857/659/256/256/638262418942158461.png)
[Suggestion]: Use Vanilla Tweaks /trigger method if the armor statues data pack is installed
BeeFox-sys opened this issue · 3 comments
Suggestion (Required)
As the title says, if the armor statues datapack by vanilla tweaks is installed into the world, and the user does not have permission to use the /data modify command and the mod is not installed server side, to use the /trigger options from vanilla tweaks.
This will allow for even more useage, however it would mean it might take some time to modify stands as it would have to run several /trigger commands to achive the desired look.
Would you be able to explain how the whole trigger mechanic works in Vanilla Tweaks?
I‘m not very much familiar with datapacks and mcfunctions. But if it’s really possible for non-ops to run those triggers it would be rather simple to implement in the mod as it already has a way for using vanilla commands in the background to modify armour stands when the mod is missing on the server.
the way triggers work is quite simple, when running a command /trigger xyz 4
it sets a scoreboard value to 4, the vanillia tweaks data pack then reads this number and triggers the relative operation, it would require going through the vanillia tweaks code and finding what each function does (or doing it by using the book), and maybe a bit of logic (as vanilla tweaks has some stuff like setting angles, so you could do stuff like move it 45deg then 3 1deg for a 49 deg turn), but it shouldn't be too hard to work out c:
one worry would be ratelimiting on commands, as more then a few seconds of a packet every few ticks results in getting kicked.
looking at the code, it is very well commented so it shouldn't be too hard to figure out, for example an as_trigger score of 151 through 156 will trigger different block alignments.
Thanks for the explanation. This feature is now implemented in v4.0.5 of Armor Statues. I still need to add some basic documentation on this to the mod page, but here is a simple run down:
- Mod is present on the server: Send native network packets to apply armor stand configuration.
- Mod is missing on server, but player is an operator: Use vanilla's
data
command to apply armor stand configuration. - Mod is missing on server, but server has Vanilla Tweaks Armor Statues data pack: Use Armor Statues'
trigger
command implementation to apply armor stand configuration. - Mod is missing on server, and none of the above apply: Do nothing, armor stand configuration cannot be applied.