Jump to content

Recommended Posts

Posted

I'm trying to make a recipe using mushrooms, but only the ones that stand on top of blocks, as opposed to the ones that hang on the side of trees. I know there's an "allowedVariants" thing you can add to recipes that should be able to do this, but every time I try, it fails. The recipe I have works when I take out the "allowedVariants" part, but simply won't work when I have it in. I have also tried "tinderhoof-*" and "mushroom-tinderhoof-*" in the brackets.

Here is my recipe: (A lot of it is just placeholder for now.)

{
	"ingredientPattern": "MD",
	"width": 2,
	"height": 1,	
	"ingredients": {
		"M": {
			"type": "block",
			"code": "game:mushroom-*",
			"name": "type",
			"allowedVariants": ["tinderhoof"],
		},
		"D": {
			"type": "block",
			"code": "game:soil-*",
		}
	},
	"output": {
		"type": "block",
		"code": "game:tallfern",
		"quantity": 1
	}
}

Any help would be greatly appreciated.

Posted (edited)
7 hours ago, Lucas Alexander said:

Any help would be greatly appreciated.

If you look at blocktype mushroom.json, you can see that it has two variantgroups, the type and the state, translating into the block names "mushroom-{mushroom}-{state}".

Mushrooms which grow on trees are configured in mushrooms-side.json. The biggest difference in this particular case is, that they also have an orientation added to the name (mushroom-{mushroom}-{state}-{side}). Because of this you could actually skip "allowedVariants" all together.

Currently the recipe isn't working, because the input block "mushroom-*" doesn't exist in combination with the allowed Variants. It would be "mushroom-*-normal". (If you wanted to allow polypores, you would have to add a recipe that accepts "mushroom-*-normal-north".)

If you want to keep your current recipe as is, you could add tinderhoof-normal-north (and all other unwanted mushrooms) to your skipVariants.

Tinderhoof belongs to the polypores btw, they do not grow on the ground. https://wiki.vintagestory.at/Mushroom#Ground_mushrooms

Edited by Brady_The
  • Thanks 1
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.