Code Monkey home page Code Monkey logo

Comments (3)

Fuzss avatar Fuzss commented on August 24, 2024

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.

from armorstatues.

BeeFox-sys avatar BeeFox-sys commented on August 24, 2024

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.

from armorstatues.

Fuzss avatar Fuzss commented on August 24, 2024

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:

  1. Mod is present on the server: Send native network packets to apply armor stand configuration.
  2. Mod is missing on server, but player is an operator: Use vanilla's data command to apply armor stand configuration.
  3. 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.
  4. Mod is missing on server, and none of the above apply: Do nothing, armor stand configuration cannot be applied.

from armorstatues.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.