#Is it possible to have scripts in one behaviour pack communicate with scripts in another?

13 messages · Page 1 of 1 (latest)

simple bolt
#

I'd appreciate if anyone could tell me if this is possible, as it would be a highly useful functionality to take advantage of. My goal is to have a basic framework that acts as an API for a webserver also provide its functionality to another addon's scripting environment if they're applied to the same world.

#

Something like import { example } from "other_pack"

#

Alternatively I might be able to achieve basic communication through dynamic world properties, but what I posted above would be ideal

buoyant lark
#

just import export not enough ?

#

i dont see why u need two script talk with each other from ur example

simple bolt
#

For example:
One addon provides a framework with template functions/classes for interacting with Render Bender, our third party program to change the hidden Minecraft RTX settings. It would provide templates for distance field detection and settings preset loading.

The other addon uses those template functions to interact with Render Bender. If your addon added a blood moon event, it would use the template settings preset load function to load a preset that makes the tone mapping red.

#

It would be more organized than including the entire Render Bender API library in several addons, should you have multiple that needed to use it applied to the same world.

buoyant lark
#

well only way two addon can communicate with each other is using with scoreboard, entity name tags, entity tags, json entity event triggers

dynamic property is not ideal as u never know when someone requested something you will need to check for change every tick + its is limited

simple bolt
#

I see. I'll probably write the Render Bender API as something you'd copy into an addon for the time being then.

buoyant lark
#

entity tags are great for seamless communication

simple bolt
#

Will definitely consider that as well

#

thanks!

buoyant lark
#

you can wait for others for better ideas