Skip to content

Custom Powers with Json Things

Hyperlynx edited this page Feb 19, 2025 · 4 revisions

Json Things adds the concept of "thingpacks", which are located in the /thingpacks directory of your instance folder, the same way resourcepacks are. Reactive adds some integration with Json Things to allow you to define new Powers inside of a thingpack.

Custom Powers

Placing the file

First, you'll need to make a thingpack. These have a similar folder structure to resource packs and datapacks -- and they DO require a pack.mcmeta file.

Once this is made, create a JSON file at (your thingpack's name)/things/(any namespace)/reactive/power/(power id).json. (any namespace) can be the same as (your thingpack's name), but doesn't have to be. The resulting power will be located at (any namespace):(power id).

For example, this path would create a Power called testpack:lemonade:

testpack/things/testpack/reactive/power/lemonade.json

File structure

Power JSON files should look something like this:

{
  "name_override": "Lemonade",
  "color": {
    "r" : 255,
    "g" : 240,
    "b" : 10
  },
  "render_water_block": "reactive:fast_water",
  "bottle": "testpack:lemonade_bottle",
  "invisible": false
}

All fields are optional, and will have some default value if left out.

  • name_override specifies a literal string as the name of this Power. If you don't specify this, you could have instead translated this power using the key power.testpack.lemonade in a lang file.

  • color is the color of the Power using RGB format. None of the numbers in the color definition may be over 255 or negative, and Powers do not support alpha values. White by default.

  • render_water_block is the block texture used to render the water in a Crucible and JEI. All built-in Powers use one of the following values:

    • minecraft:water : Normal water (default)
    • reactive:magic_water : Circular shockwaves move in the water
    • reactive:fast_water : Normal water, but the animation is faster
    • reactive:slow_water : Normal water, but the animation is slower 1.21.1 only
    • reactive:noisy_water : Water with a static-like effect overlayed onto it
  • bottle is this power's bottle item. This item will be created if you click the Crucible with a Quartz Bottle while the power is inside. By default, there is no bottle item.

  • invisible causes a power to not appear at all inside the Crucible. The tint of the water will not change at all, no matter what color is set. If omitted, powers are not invisible.

Powers added this way may be used as parameters in recipes, may be added and removed using the /reactive Command, and may even be used as reagents for KubeJS custom reactions.

Custom Power Bottles

Due to a programming quirk, power bottles can't be used to place Power into the Crucible without being specially registered. Thankfully, you can use thingpacks to register items of various types, and Reactive adds a type for power bottles.

Items made using the reactive:power_bottle type are considered valid bottles.

Here is a minimal example:

{
  "type": "reactive:power_bottle",
  "max_stack_size": 64,
  "container": "reactive:quartz_bottle"
}

Refer to Json Things' guide for making items for more information. You'll also have to place an item model and texture somewhere inside of a loaded resourcepack to be able to see the item.