Origins (Fabric)

Origins (Fabric)

15M Downloads

Modify Insomnia Ticks, Modify Stats not functioning as stated on the Wiki.

Clark919 opened this issue ยท 1 comments

commented

Game Version: 1.19.2
Modloader: Fabric
Origins Version: v1.7.1 and up.

I've tried using two variations of a power to prevent Phantom spawns:

{
  "type": "origins:multiple",
  "prevent_sleep": {
    "type": "origins:prevent_sleep",
    "set_spawn_point": true,
    "message": "Suits of Armor don't need to sleep."
  },
  "prevent_phantoms": {
    "type": "origins:modify_insomnia_ticks",
    "modifier": {
      "operation": "set_total",
      "value": 0
    }
  },
  "name": "Restless",
  "description": "You cannot sleep, but you do not suffer from insomnia."
}

(Yields no error in the console.)

{
  "type": "origins:multiple",
  "prevent_sleep": {
    "type": "origins:prevent_sleep",
    "message": "Suits of Armor don't need to sleep."
  },
  "prevent_phantoms": {
    "type": "origins:action_over_time",
    "entity_action": {
      "type": "origins:modify_stat",
      "stat": "minecraft:time_since_rest",
      "modifier": {
        "operation": "set_total",
        "value": 0
      }
    },
    "interval": 20
  },
  "name": "Restless",
  "description": "You cannot sleep, but you do not suffer from insomnia."
}

Error in console:
Error reading data field at entity_action.stat: Not a JSON Object: "minecraft:time_since_rest"
(I have also tried this power with minecraft.custom:minecraft.time_since_rest like the wiki suggests but to no avail.)

As far as I can tell, neither of these powers work as intended, although their syntax is the same as indicated by the Wiki page examples. Phantoms will still spawn, and the "Time Since Rest" stat still continues to increment.

commented

Regarding the modify_stat entity action type, this is actually a mistake on the wiki (It should now be fixed on the latest version of the wiki). The stat field should be an object containing two fields: type and id. You can check the Minecraft Fandom wiki page for Statistics for a list of statistic types and names.

Here's how your stat field should look like:

"stat": {
    "type": "minecraft:custom",
    "id": "minecraft:time_since_rest"
}