Moonlight Lib

Moonlight Lib

86M Downloads

[Question] [Fabric 1.20.1] Is there a way to bypass forge condition check in `ConditionsHackMixin` ?

Kotori316 opened this issue ยท 2 comments

commented

I'm a mod developer and I recently get some reports that complains some of recipes in my mod don't work.
A user found removing Supplementaries and its dependency(Moonlight) was a solution for the disappearance of my mod recipes.

I read your code and found ConditionsHackMixin is reading forge condition, then removing my recipes like this.

{
  "type": "minecraft:crafting_shaped",
  "category": "misc",
  "conditions": [
    {
      "type": "forge:not",
      "value": {
        "type": "forge:tag_empty",
        "tag": "forge:glass"
      }
    }
  ],
  "fabric:load_conditions": [
    {
      "condition": "fabric:item_tags_populated",
      "values": [
        "c:glass_blocks"
      ]
    }
  ]
}

I wrote both conditions and fabric:load_conditions to make sure this file works in both environment, but with your lib, this recipe will be removed as forge:glass doesn't exist in fabric environment.

So I want to ask you a way to bypass forge condition check in fabric.
I can add fabric tags in forge condition to load recipes in fabric with your lib, but do you think this is the best way to make conditional JSON file?

commented

I'm also pushing on neoforge to add some shared conditions system like we will have for tag (and at which point that tag issue will indeed not appear.

commented

hm yeah thats bad. I'll solve this hack with yet another hack, by checking if "fabric:load_conditions" exist as it should