Jump to content

recipe in compatibility patch trying to call up variants that don't exist


Go to solution Solved by Brady_The,

Recommended Posts

Posted

I have a mod that adds wood veneer to VS, and I'm trying to add a compatibility patch with Wood Stain, a mod that... well, does what it says on the tin.

here's the recipe:

{
	"ingredientPattern": "F,L",
	"width": 1,
	"height": 2,
	"ingredients": {
		"F": {
			"type": "item",
			"code": "framesaw-*",
			"isTool": true,
			"toolDurabilityCost": 8
		},
		"L": {
			"type": "block",
			"code": "woodstain:staineddebarkedlog-{color}-{logtype}-ud",

			"name": "color",
			"allowedVariants": ["blue", "red", "yellow", "purple", "pink", "green", "orange", "brown", "gray", "black", "white"],

			"name": "logtype",
			"allowedVariants": ["acacia", "aged", "veryaged", "baldcypress", "birch", "ebony", "kapok", "larch", "maple", "oak", "pine", "purpleheart", "redwood", "walnut"],

		}
	},
	"output": {
		"type": "block",
		"code": "woodstained-{color}-{logtype}-stain",
		"quantity":16,


	},
}

here's the blocktype:
 

{
    "code": "woodstained",
    "variantgroups": [

            {
      "code": "color",
      "states":["blue", "red", "yellow", "purple", "pink", "green", "orange", "brown", "gray", "black", "white"]
    },

    {
        "code": "veneertype",
        "states": ["acacia", "aged", "veryaged", "baldcypress", "birch", "ebony", "kapok", "larch", "maple", "oak", "pine", "purpleheart", "redwood", "walnut"]
    },

    {
        "code": "direction",
        "states": ["stain", "stain90", "stain180", "stain270"]
    }
    ],

	"creativeinventory": {
		"general": [ "*" ],
		"WoodVeneer": [ "*" ],
		"decorative": [ "*" ],
	},

	"blockmaterial": "Wood",
	"drawtype": "JSON",
	"shape": {
    "base": "game:block/basic/layers/1voxel"
    },
	"selectionBox": { x1: 0, y1: 0, z1: 0, x2: 1, y2: 0.0625, z2: 1
	},
	"collisionBox": { x1: 0, y1: 0, z1: 0, x2: 1, y2: 0.0625, z2: 1
	},
	"sidesolid": {
		"all": false
	},
	"sideopaque": {
		"all": false
	},

	"attributes": {
    "canChisel": true,
    "chiselShapeFromCollisionBox": true
    },

	"texturesbytype": {
		"*-stain": {
			"all": { "base": "game:block/wood/debarked/{veneertype}",
			        "blendedOverlays": [
          {
            "base": "woodstain:block/wood/stain/overlay-{color}",
            "blendMode": "Overlay"
          }
        ],}
		},

		"*-stain90": {
		"all": {"base": "game:block/wood/debarked/{veneertype}",
		        "blendedOverlays": [
          {
            "base": "woodstain:block/wood/stain/overlay-{color}",
            "blendMode": "Overlay"
          }
        ],
		rotation: 90}
		},


		"*-stain180": {
		"all": {"base": "game:block/wood/debarked/{veneertype}",
		        "blendedOverlays": [
          {
            "base": "woodstain:block/wood/stain/overlay-{color}",
            "blendMode": "Overlay"
          }
        ],
		rotation: 180}
		},


		"*-stain270": {
		"all": {"base": "game:block/wood/debarked/{veneertype}",
		        "blendedOverlays": [
          {
            "base": "woodstain:block/wood/stain/overlay-{color}",
            "blendMode": "Overlay"
          }
        ],
		rotation: 270}
		},

	},

	"tpHandTransform": {
		"translation": { x: -2, y: -1.8, z: -2.5 },
		"rotation": { x: -37, y: -45, z: -25 }
	},

	"resistance": 0.5,

	"sounds": {
		"place": "game:block/cloth",
		"walk": "game:walk/wood1"
	}
}


when I run this version of my veneer mod with woodstain and nothing else, I get this error:
 

6.6.2026 19:42:59 [Warning] Failed resolving crafting recipe ingredient with code woodveneer:woodstained-blue-veryagedrotten-stain in Grid recipe
6.6.2026 19:42:59 [Error] Grid Recipe 'woodveneer:recipes/grid/compat-woodstain/woodstained.json': Output woodveneer:woodstained-blue-veryagedrotten-stain cannot be resolved.
6.6.2026 19:42:59 [Warning] Failed resolving crafting recipe ingredient with code woodveneer:woodstained-red-veryagedrotten-stain in Grid recipe
6.6.2026 19:42:59 [Error] Grid Recipe 'woodveneer:recipes/grid/compat-woodstain/woodstained.json': Output woodveneer:woodstained-red-veryagedrotten-stain cannot be resolved.
6.6.2026 19:42:59 [Warning] Failed resolving crafting recipe ingredient with code woodveneer:woodstained-yellow-veryagedrotten-stain in Grid recipe

and so on, all for variants that are not supposed to exist. "veryagedrotten", "rotten", and "veryrotten", the variant sets that show up in these messages, aren't in the allowed variants of the blocktype or the recipe.

The mod actually works exactly the way it's supposed to; I can make veneers out of all the other stained logs, but not out of any rotten logs. If it weren't for the spammy error messages in world startup and the main server log, I wouldn't know there was anything wrong (aside from maybe noticing things being a little sluggish at startup). I've been hitting my head against this for a while and I've found several exciting new ways to break things, shuffled the names of various variables around, and familiarized myself with both the asset adding/overwriting and json patch methods of patching, but I have not found a solution. I do not understand why the game is trying to call up variants that don't exist and then complaining to me that they don't exist.

Attached are the full server-main log and the entire mod as it currently stands, in case that's helpful.

Thanks in advance for any advice you may have.
 

 

server-main.log veneer2204-aaaaaaaaaa.zip

  • Solution
Posted (edited)

The old "allowed/skipVariants" format you are using only allows one {variable} per ingredient. The second in your recipe is effectively ignored.

Switching to the new format for Grid Recipe Crafting introduced in 1.21.0 should get rid of these errors.

{
	"ingredientPattern": "F,L",
	"width": 1,
	"height": 2,
	"ingredients": {
		"F": {
			"type": "item",
			"code": "framesaw-*",
			"isTool": true,
			"toolDurabilityCost": 8
		},
		"L": {
			"type": "block",
			"code": "woodstain:staineddebarkedlog-{color}-{logtype}-ud"
		}
	},
	"allowedVariants": {
		"color": [ "black", "blue", "brown", "gray", "green", "orange", "pink", "purple", "red", "white", "yellow" ],
		"logtype": [ "acacia", "aged", "baldcypress", "birch", "ebony", "kapok", "larch", "maple", "oak", "pine", "purpleheart", "redwood", "veryaged", "walnut" ]
		},
	"output": {
		"type": "block",
		"code": "woodstained-{color}-{logtype}-stain",
		"quantity": 16
	}
}
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.