🗂️ types#
Built-in recipe-type renderers, one module per family.
Each module registers its renderers when it executes. Importing this package no longer does that on its own,
since PEP 810 defers the imports below: call load_builtin_renderers() to be sure the registry is populated.
awakened_forge#
Stardust Fragment Awakened Forge renderer (3x3 / 3x4 grid).
- class AwakenedForgeRenderer[source]#
Bases:
CraftRendererStardust Fragment
stardust_awakened_forgerecipes (3x3 or 3x4 grid).- types: ClassVar[tuple[str, ...]] = ('stardust_awakened_forge',)[source]#
The craft
typestrings this renderer handles.
- name: ClassVar[str] = '(Stardust Fragment) Awakened Forge'[source]#
Human title shown in the wiki-button hover. Empty = no title line (e.g. crafting recipes).
- static_glyph(
- craft: JsonDict,
3x3 or 3x4 forge template glyph, from the ingredient count.
Called before the shapeless->shaped conversion, so
ingredientsis still the original list.
- append_hover(
- r: RecipeRenderer,
- craft: JsonDict,
- hover: list[TextComponent],
Count + list every grid ingredient.
- render_body(
- r: RecipeRenderer,
- craft: JsonDict,
- name: str,
- content: list[TextComponent],
- result_component: JsonDict,
- page_font: str,
- use_dialog: bool,
- add_change_page_to_ingr: bool,
Lay the ingredient grid out over the forge template, then place the result.
furnace#
Furnace-family renderers: smelting / blasting / smoking / campfire cooking.
- class FurnaceBase[source]#
Bases:
CraftRendererShared layout/glyph/image for all furnace recipes (uses the default single-ingredient hover).
- static_glyph(
- craft: JsonDict,
The furnace template glyph (same for the whole furnace family).
- render_body(
- r: RecipeRenderer,
- craft: JsonDict,
- name: str,
- content: list[TextComponent],
- result_component: JsonDict,
- page_font: str,
- use_dialog: bool,
- add_change_page_to_ingr: bool,
Ingredient on top of the furnace, result on the output slot.
- build_image(
- r: RecipeRenderer,
- name: str,
- page_font: str,
- craft: JsonDict,
- output_name: str = '',
Low-resolution PNG of the ingredient + result pasted onto the furnace template.
- class SmeltingRenderer[source]#
Bases:
FurnaceBasesmeltingrecipes (regular furnace).
- class BlastingRenderer[source]#
Bases:
FurnaceBaseblastingrecipes (blast furnace).
- class SmokingRenderer[source]#
Bases:
FurnaceBasesmokingrecipes (smoker).
- class CampfireRenderer[source]#
Bases:
FurnaceBasecampfire_cookingrecipes.
linear#
Single-row “ingredient -> result” renderers: stonecutting / pulverizing / mining.
- class LinearRenderer[source]#
Bases:
CraftRendererShared single-row layout (ingredient on the left, result on the right).
- render_body(
- r: RecipeRenderer,
- craft: JsonDict,
- name: str,
- content: list[TextComponent],
- result_component: JsonDict,
- page_font: str,
- use_dialog: bool,
- add_change_page_to_ingr: bool,
One ingredient -> result row, duplicated for the two-row hover trick.
- class StonecuttingRenderer[source]#
Bases:
LinearRendererstonecuttingrecipes.- types: ClassVar[tuple[str, ...]] = ('stonecutting',)[source]#
The craft
typestrings this renderer handles.
- class PulverizingRenderer[source]#
Bases:
LinearRendererSimplEnergy
simplenergy_pulverizingrecipes.- types: ClassVar[tuple[str, ...]] = ('simplenergy_pulverizing',)[source]#
The craft
typestrings this renderer handles.
- class MiningRenderer[source]#
Bases:
LinearRendererPseudo-recipe generated from no-silk-touch drops.
- types: ClassVar[tuple[str, ...]] = ('mining',)[source]#
The craft
typestrings this renderer handles.
- name: ClassVar[str] = 'Mining'[source]#
Human title shown in the wiki-button hover. Empty = no title line (e.g. crafting recipes).
- append_hover(
- r: RecipeRenderer,
- craft: JsonDict,
- hover: list[TextComponent],
Mine / Drops / Silk-touch hover lines.
shaped#
Shaped (and shapeless) crafting renderer.
- class ShapedRenderer[source]#
Bases:
CraftRenderercrafting_shaped / crafting_shapeless (shapeless is converted to shaped before rendering).
- types: ClassVar[tuple[str, ...]] = ('crafting_shaped', 'crafting_shapeless')[source]#
The craft
typestrings this renderer handles.
- name: ClassVar[str] = ''[source]#
Human title shown in the wiki-button hover. Empty = no title line (e.g. crafting recipes).
- static_glyph(
- craft: JsonDict,
3x3 or 2x2 grid template glyph depending on the craft’s shape.
- append_hover(
- r: RecipeRenderer,
- craft: JsonDict,
- hover: list[TextComponent],
Count + list every grid ingredient.
- render_body(
- r: RecipeRenderer,
- craft: JsonDict,
- name: str,
- content: list[TextComponent],
- result_component: JsonDict,
- page_font: str,
- use_dialog: bool,
- add_change_page_to_ingr: bool,
Lay the ingredient grid out over the crafting-table template, then place the result.
- static place_small_result(
- content: list[TextComponent],
- shape: list[str],
- result_component: JsonDict,
- use_dialog: bool,
Put the result of a 2x2 grid right of its rows, on the line of the first row’s blank half and the one below.
- build_image(
- r: RecipeRenderer,
- name: str,
- page_font: str,
- craft: JsonDict,
- output_name: str = '',
Low-resolution PNG of the grid + result pasted onto the shaped template.
smithing#
Smithing renderers: smithing_transform / smithing_trim.
- class SmithingTransformRenderer[source]#
Bases:
CraftRenderersmithing_transformrecipes (base + template + addition -> result).- types: ClassVar[tuple[str, ...]] = ('smithing_transform',)[source]#
The craft
typestrings this renderer handles.
- name: ClassVar[str] = 'Smithing Transform'[source]#
Human title shown in the wiki-button hover. Empty = no title line (e.g. crafting recipes).
- append_hover(
- r: RecipeRenderer,
- craft: JsonDict,
- hover: list[TextComponent],
Base / Template / Addition hover lines.
- render_body(
- r: RecipeRenderer,
- craft: JsonDict,
- name: str,
- content: list[TextComponent],
- result_component: JsonDict,
- page_font: str,
- use_dialog: bool,
- add_change_page_to_ingr: bool,
Base, template and addition in a row, then the result.
- class SmithingTrimRenderer[source]#
Bases:
CraftRenderersmithing_trimrecipes (no result item; the trim pattern slot is shown empty).- types: ClassVar[tuple[str, ...]] = ('smithing_trim',)[source]#
The craft
typestrings this renderer handles.
- name: ClassVar[str] = 'Smithing Trim'[source]#
Human title shown in the wiki-button hover. Empty = no title line (e.g. crafting recipes).
- append_hover(
- r: RecipeRenderer,
- craft: JsonDict,
- hover: list[TextComponent],
Base / Template / Addition / Pattern hover lines.
- render_body(
- r: RecipeRenderer,
- craft: JsonDict,
- name: str,
- content: list[TextComponent],
- result_component: JsonDict,
- page_font: str,
- use_dialog: bool,
- add_change_page_to_ingr: bool,
Base, template and addition in a row, with an invisible pattern slot.