Skip to content

Mod Compatibility

Draylar edited this page Aug 22, 2020 · 2 revisions

If you're looking to add Wolves With Armor compatibility to your mod, this is the right place to be. WWA allows for cross-mod compatibility through Static Content and Maybe Data, which means you can ship Wolf armor with 3 json files (1 data file, 1 recipe file, 1 model file) and 1 texture file-- no dependencies or code needed!

To start, add a data file at resources/static_data/wolveswitharmor/wolf_armor. How about Obsidian wolf armor (obsidian_wolf_armor.json)?

{
   "name":"obsidian",
   "bonus":10,
   "fireproof":true
}

Note: fireproof defaults to false, meaning you only need to specify it if the value is true.

We can then add a recipe file at resources/data/modid/mayberecipes/obsidian_wolf_armor.json:

{
   "condition":{
      "modid":"wolveswitharmor"
   },
   "recipe":{
      "type":"minecraft:crafting_shaped",
      "pattern":[
         "dgd"
      ],
      "key":{
         "g":{
            "item":"minecraft:gold_ingot"
         },
         "d":{
            "item":"minecraft:obsidian"
         }
      },
      "result":{
         "item":"wolveswitharmor:obsidian_wolf_armor",
         "count":1
      }
   }
}

Add assets & textures like you normally would, with the namespace being wolveswitharmor. That's it, you're done! Your Obsidian Wolf Armor will appear in-game when Wolves With Armor is loaded, but do nothing (and log no errors) when WWA is not present.

Clone this wiki locally