EdwinMindcraft / origins-architectury

MIT License
20 stars 17 forks source link

A Set of Bugs/Inconsistencies between Origins (Fabric) and Origins (Forge) #312

Open QuantumXenon opened 1 year ago

QuantumXenon commented 1 year ago

Context

While working on the Forge version of Origins++, I've noticed a few bugs/inconsistencies between the Fabric and Forge versions of Origins. I have been able to reproduce all of them with:

The logs also contain a lot of errors in the form Removed [x] missing powers from origins-plus-plus:[origin]. This doesn't happen on the Fabric version, but I might be missing something on how to get it to work properly on the Forge version.

I appreciate all your help in the past and hope that I haven't caused too many issues with people coming here for help regarding Origins++ and any mistakes I may have made regarding making it work properly for Origins (Forge).

-- QuantumXenon


Issue 1: Rejoining an existing world can sometimes result in an error message

Attempting to rejoin a world which has already been generated will sometimes result in an error message like Registry ResourceKey[minecraft:root/apoli:configured_power] was missing or Invalid player data. See attached log for more information.


Issue 2: origins:restrict_armor not applying to only one equipment slot

When an origin is given the following power, the player is prevented from wearing any armour, rather than just being prevented from wearing a helmet. This power works as expected in the Fabric version.

"type":"origins:restrict_armor",
"head":{
     "type":"origins:armor_value",
     "comparison":">",
     "compare_to":0
}

Issue 3: origins:modify_break_speed does not work as expected

When an origin is given the ability to break bedrock (by increasing their break speed for it, such as in this example), they are unable to mine it. This power works as expected in the Fabric version.

"type":"origins:modify_break_speed",
"block_condition":{
     type":"origins:block",
     block":"minecraft:bedrock"
},
"modifier":{
     "operation":"addition",
     "value":0.005
}

Issue 4: Power that works on Fabric doesn't work on Forge

I'm not sure what the cause of this issue is, but using the following power works as expected in Fabric (mobs with a tag drop an item when killed), whereas on Forge, nothing happens.

"type":"origins:target_action_on_hit",
"entity_action":{
  "type":"origins:if_else",
  "condition":{
     "type":"origins:health",
     "comparison":"<=",
     "compare_to":0
  },
  "if_action":{
     "type":"origins:execute_command",
     "command":"function origins-plus-plus:deathsworn/crystallize"
  },
  "else_action":{
     "type":"origins:execute_command",
     "command":"function origins-plus-plus:deathsworn/set_stats"
  }
},
"target_condition":{
  "type":"origins:and",
  "conditions":[
     {
        "type":"origins:in_tag",
        "tag":"origins-plus-plus:petrified_hearts"
     },
     {
        "type":"origins:nbt",
        "nbt":"{Tags:['Deathsworn_Minion']}",
        "inverted":true
     }
  ]
}

Please let me know if you need any more information regarding any of the issues (or anything else, for that matter).

QuantumXenon commented 1 year ago

latest.log Here is the log, I just noticed that it wasn't included in the original issue report.

QuantumXenon commented 1 year ago

Additional Issue 1: Cannot invoke "io.github.edwinmindcraft.apoli.api.power.configuration.ConfiguredPower.getFactory()" because "power" is null

One of the origins in Origins++ causes a crash with Origins (Forge), but not Origins (Fabric). I'm not sure what the cause is, but it looks to be caused by Apoli. Here is the crash report for more information.

shuu-shu commented 1 year ago

yes please fix this for 1.18.5 ): cant join existing worlds, just keeps crashing. i really wanna use orgins ++

QuantumXenon commented 1 year ago

Additional Issue 2: origins:modify_damage_dealt does not work as expected

This power is supposed to increase damage when a stone sword is used:

"type":"origins:modify_damage_dealt",
"condition":{
    "type":"origins:equipped_item",
    "equipment_slot":"mainhand",
    "item_condition":{
        "type":"origins:ingredient",
        "ingredient":{
            "item":"minecraft:stone_sword"
        }
    }
},
"modifier":{
    "operation":"multiply_total",
    "value":1.25
}

With Origins (Fabric), damage dealt is increased (tested using Target Dummy mod), however the damage does not change using the Forge version.

MerchantPug commented 1 year ago

@QuantumXenon Would you mind sending me the entire datapack for Issue 4? There's some specifics like functions and tags that I'm missing here.

QuantumXenon commented 1 year ago

Thanks for taking the time to resolve the various issues I have reported!

Unfortunately, I do not have access to a computer at the moment, so I will only be able to provide URLs. I have done some renaming so some of the names have been changed from the version of the power pasted above.

The data pack can be found at https://github.com/QuantumXenon/origins-plus-plus.

The functions used can be found at https://github.com/QuantumXenon/origins-plus-plus/blob/main/data/origins-plus-plus/functions/deathsworn/crystallize.mcfunction and https://github.com/QuantumXenon/origins-plus-plus/blob/main/data/origins-plus-plus/functions/deathsworn/set_stats.mcfunction

The tag used can be found at https://github.com/QuantumXenon/origins-plus-plus/blob/main/data/origins-plus-plus/tags/entity_types/petrified_heart_mobs.json

Sorry for the inconvenience of not being able to upload specific files.

MerchantPug commented 1 year ago

I'll probably go in and fix that bug at a later date, mainly because I just released a version.