A library for data-driven entity effects inspired by enchantment effects.
Find a file
2024-10-31 04:14:21 +11:00
buildSrc Demodularise. 2024-09-21 08:45:29 +10:00
common Prepare for entrypoint class, misc tweaks. 2024-09-21 22:31:50 +10:00
fabric Fix event issues on Fabric. 2024-10-31 04:14:21 +11:00
gradle/wrapper Push currently broken Gradle changes. 2024-06-24 12:09:29 +10:00
neoforge Prepare for entrypoint class, misc tweaks. 2024-09-21 22:31:50 +10:00
.gitattributes Initial commit 2024-06-02 16:32:29 +10:00
.gitignore Initial commit 2024-06-02 16:32:29 +10:00
build.gradle.kts Rewrites to workspace and EntityEffectsAttachment. 2024-09-11 21:55:35 +10:00
gradle.properties Rewrites to workspace and EntityEffectsAttachment. 2024-09-11 21:55:35 +10:00
gradlew Initial commit 2024-06-02 16:32:29 +10:00
gradlew.bat Initial commit 2024-06-02 16:32:29 +10:00
LICENSE Initial commit 2024-06-02 16:32:29 +10:00
README.md Update README.md 2024-09-14 01:16:11 +10:00
settings.gradle.kts Demodularise. 2024-09-21 08:45:29 +10:00

Effect API

Effect API is a library that adds a generic system based on 1.21's enchantment effects, for use within modded datapack content.

Modules

Effect API is modularised with a core module providing most important things, and other modules extending the core module.

The modules within Effect API are as follows:

  • core
  • entity

Data Structure

The data structure of Effect API generally follows a similar structure to those of Enchantment Effects,

An example JSON can be found below:

{
  "effects": {
    "effect_api:tick": [
      {
        "effect": {
          "type": "effect_api:enchantment_entity_effect",
          "effect": {
            "type": "minecraft:ignite",
            "duration": 4.0
          }
        },
        "requirements": {
          "condition": "minecraft:entity_properties",
          "entity": "this",
          "predicate": {
            "stepping_on": {
              "block": {
                "blocks": "minecraft:magma_block"
              }
            }
          }
        }
      }
    ],
    "effect_api:resource": [
      {
        "id": "test:float",
        "resource_type": "effect_api:float",
        "default_value": 5.0
      }
    ]
  }
}