Support for mod‐added wood - moonfather1/workshop_for_handsome_adventurer GitHub Wiki
Support for 3rd party wood
Yes, this mod offers support for many wood types that other mods will add. This was added in 1.14.
Requirements
The system somewhat relies on Dynamic asset generator by lukebemish. The mod is an optional dependency because there is a backup sub-system for what DAG does and you can use workshop without it. It is still highly recommended, especially if you want to retexture blocks or change recipes.
Editions for 1.18.2 and 1.19.2 do not make use of DAG. Newer versions will keep using it.
What should work without issues
Wood types that follow Mojang's naming structure (something_planks, something_slab, stripped_something_log) are supported without the need for touching config file. That includes BoP, Regions Unexplored and majority of small mods I tried.
Issue: no log or a log that is called something else
Some wood types have no logs, like bamboo or IE's treated wood. Some have "stems" instead of "logs". Take a look at a file called workshop_for_handsome_adventurer-special-common.json
in config directory (we'll explain configs in more detail below). There is a line saying something like:
"stripped_log_substitution_list_for_recipes": "embur=byg:stripped_embur_pedu, sythian=byg:stripped_sythian_stem"
...what that line really means is "do not skip this wood because it doesn't have a log, use specified block in recipes; also use it for block texture unless we specify something else in separate config line.".
Without an entry in this line, mod would not create tables/toolracks/etc. for bamboo, mushroomy stuff, IE's treated wood...
Syntax is like shown above; entries are separated by a comma followed by arbitrary number of spaces; no quotes - quotes are there because it's a string value in json file.
Issue: non-standard names
This may not be obvious.
Wood blocks have a common naming convention, for example birch_slab
corresponds to birch_planks
; we rely on that to generate recipes.
However, for example, GrowthCraft apple wood - their slab is called apple_plank_slab
- to a human it's obvious that that's the block (slab) we need but a mod can't guess that. Similar with a block called 'slab_treated_wood_horizontal'.
So in this case we need to specify all names together.
Here's a factory-default setting:
"blocks_with_dumbass_names": "immersiveengineering:treated_wood_horizontal/slab_treated_wood_horizontal/no_log_for_this_one, growthcraft_apples:apple_plank/apple_plank_slab/apple_wood_log_stripped, vinery:cherry_planks/cherry_slab/stripped_cherry_log"
Ignore cherry wood, we'll explain that later. In case of apple wood, we specified all three blocks this mod needs. In case of creosote-treated wood, we specified two mandatory parts and gave a dummy value for stripped logs. Now we need to put something that substitutes that log in a setting from previous paragraph.
Syntax is several sets in format modId:planks/slab/log. Sets are separated again by a comma and a space or a few.
Issue: duplicates
Mod uses wood name without mod id to maintain lists. That means if you have fir wood from two mods, workshop will generate everything for first type of fir but only recipes for the second type. That means using slabs of the second type of fir will give you shelves made of first type of fir.
Normally, player won't have two biome-adding mods and won't even notice. There is a workaround if the player insists.
A good example here is cherry wood added by Vinery mod. In 1.20 Mojang added cherry (light-pink wood), and Vinery author (authors?) elected not to rename their cherry blocks. So, the workshop would add recipes using dark-red cherry wood but those recipes would give light-pink shelves and tables.
To fix this we need to do two things:
- blacklist "second" wood type:
"blacklist": "vinery:cherry"
- add it to "blocks_with_dumbass_names" line. see previous section for example. in this example, cherry has perfectly fine names. but we'll add it so that it gets added to "special wood list" instead of "duplicate wood list". Done - we have dark-red cherry shelves that fit your wine cellar and we have light-pink shelf as a separate block.
Blacklist can also be used for wood types that you really, really hate to see, but it was actually implement to enable this workaround. Syntax is as usual: use commas and spaces to separate entries.
What else is there in config files
Some settings are kinda-obsolete but author chose not to delete them for a few months. Those are texture_template1_list
, texture_template2_list
, stripped_log_substitution_list_for_textures
. Initially, we had to manually tell this mod where to find textures and these fields are from that version (1.14.0). As of (1.14.5) they are only theoretically used if automatic system fails to work or the user turns it off.
There are a few more things in there but they aren't very important. And they are explained in config file.
About config files
Normal forge config system is nice. Modder doesn't need to worry about where the file is or whether things are synchronized. Normal forge config system comes online after block registration is done. That's ok (modders shouldn't conditionally register stuff) but it means we have to manually write out stuff into separate text files because we need them much earlier.
That's why we have two extra config files. Sorry. Also there is no server-to-client sync. Let's hope nobody can do anything too bad.
Common config
The file is called workshop_for_handsome_adventurer-special-common.json
. It contains things of importance during block registration (what to skip, etc.).
Client config
The file is called workshop_for_handsome_adventurer-special-client.json
. It helps the mod resolve textures. There would be no issue if this differed between players.
Afterword
While this system is quite something - after all, it is powered by unicorn magic - there will be weird incompatibilities and other issues. Please open an issue here on github or contact author on discord. We'll fix it.
Enjoy!