Mystical Agriculture

Mystical Agriculture

112M Downloads

Allow to add essence vessel colors using other means like Kubejs

Titop54 opened this issue ยท 2 comments

commented

Currently, essence colors from its determined from this essence_vessel_colors.json, which only has 4 essences

Adding a recipe using Kubejs or a datapack allows that essence to enter the essence vessel but get the hex color 0xFFFFFF by default, which can be changed using resourcepacks

For example, in Kubejs, you can load java classes, which could solve this, but the hashmap containing the colors has a private attribute, not allowing that.

Describe the solution you'd like
Change from private to public or have a method to access it

Describe alternatives you've considered
Configuration or use color of that essence

Additional context
Here is an example of colors changed from private to public working:

Kubejs example
Image

In-game after a few game restart and reload, to test it:
Image

Also I would like to say thanks you for creating a wonderful mod

commented

The intended way is to add your own essence_vessel_colors.json file in a resource pack as mentioned in the docs:
https://blakesmods.com/docs/mysticalagriculture/awakening-recipes#essence-vessel-colors

The essence color manager is client side only so I doubt that workaround would work when connecting to a dedicated server.

commented

As you said, the intented way are the resourcepacks, but the suggestion is more like an alternative ways for people if they don't want to use resourcepack

For the second part, made a server, and as you said, that workaround on servers didnt work well, but there are other ways to do that (my example was a bad one, ngl)

Image Image

Although the example on the photo can be more complicated (since, all colors are reset after reload), at least it works on a dedicated server and on singleplayer (same code as server):

Image