Metamorph

Metamorph

4M Downloads

morphs.json not working

Yakna opened this issue ยท 12 comments

commented

Hi. I tried to use the morphs.json in the "config" binder with the example, but it didn't work. I saw that there is another morphs.json in the mod jar. I am sad of being unable to use it. Help.

commented

Could you pastebin the morphs.json?

commented

K.
Here it is all what is inside. (1.12.1):
{
"Wolf": {
"abilities": ["prevent_fall"],
"action": "small_fireball",
"health": 40,
"speed": 0.15
},
"Bat": {
"abilities": ["glide", "hungerless"],
"action": "explode",
"health": 20,
"hostile": true
}
}

commented

I suggest you to read the wiki page about configuring morphs (it's in the navigation bar on top, the one that says Wiki).

Change Wolf to minecraft:wolf and Bat to minecraft:bat, and it should work (unless there is a JSON validation error).

commented

i changed and it didnt work. i changed the commas and didnt work. I think that the morphs.json inside the mod overrides the one in the config binder.

commented

Wait. i have to put the example INSIDE the ones that were already there? So it is like:
{{
"Wolf": {
"abilities": ["prevent_fall"],
"action": "small_fireball",
"health": 40,
"speed": 0.15
},
"Bat": {
"abilities": ["glide", "hungerless"],
"action": "explode",
"health": 20,
"hostile": true
}
}}

commented

No. You had to put in the morphs.json this:

{
    "minecraft:wolf": {
        "abilities": ["prevent_fall"],
        "action": "small_fireball",
        "health": 40,
        "speed": 0.15
    },
    "minecraft:bat": {
        "abilities": ["glide", "hungerless"],
        "action": "explode",
        "health": 20,
        "hostile": true
    }
}
commented

i will try it tomorrow.

commented

for the Elder Guardian, i should put minecraft:elder_guardian?

commented

Thanks! It worked. ๐Ÿ‘

commented

I've tried making another custom morph, along with the example ones, but it didn't work. Here it is:
{
"minecraft:wolf": {
"abilities": ["prevent_fall"],
"action": "small_fireball",
"health": 40,
"speed": 0.15
},
"minecraft:bat": {
"abilities": ["glide", "hungerless"],
"action": "explode",
"health": 20,
"hostile": true
},
"minecraft:guardian": {
"abilities": ["prevent_fall", "fly"],
"action": "small_fireball",
"health": 100,
"speed": 1
"hostile": true
}

commented

Your JSON is invalid. Here is the correct one:

{
	"minecraft:wolf": {
		"abilities": ["prevent_fall"],
		"action": "small_fireball",
		"health": 40,
		"speed": 0.15
	},
	"minecraft:bat": {
		"abilities": ["glide", "hungerless"],
		"action": "explode",
		"health": 20,
		"hostile": true
	},
	"minecraft:guardian": {
		"abilities": ["prevent_fall", "fly"],
		"action": "small_fireball",
		"health": 100,
		"speed": 1,
		"hostile": true
	}
}

In the future, check whether JSON is valid first, before posting any issues related to configuration. You can use this website for example.

commented

By the way, check the Wiki. It covers how to find out morph names. Here is an excerpt from Wiki:

To find out a morph name for a morph you want to disable [or configure], you could use:

  1. Creative morph menu has a grey label under morph's name. That's the morph ID.
  2. If it's an erroring morph, you could check its ID in the log. Metamorph outputs a morph name when a morph is throwing exception (i.e. erroring) during creative morph menu initialization.