Skip to content

Instantly share code, notes, and snippets.

@apace100
apace100 / damage_sources.md
Created May 21, 2023 18:31
Deprecation of damage sources in Apoli (Minecraft 1.19.4+)

TL;DR for Datapackers - What you should do

If you're creating a datapack with Apoli, e.g. an Origins datapack, you should check whether you use any of these things:

  • damage entity action
  • damage bientity action
  • damage_over_time power type

While your datapack might work without any changes, you should update it to ensure correct functionality both now and going forward.

To update to using damage types, change from using the field source or damage_source to using the new field damage_type. Register a new damage type for each different kind of damage you use in your datapack, and specify the ID in the corresponding action or power.

@apace100
apace100 / my_toggling_active_power.json
Last active February 24, 2021 17:51
How to create an active power which toggles between two different actions
{
"__comment": "Note that this example assumes that powers are in the mypack namespace, i.e. data/mypack/powers/",
"type": "origins:active_self",
"entity_action": {
"type": "origins:if_else",
"condition": {
"type": "origins:resource",
"resource": "mypack:my_toggling_active_power_state",
"comparison": "==",
"compare_to": 0