🗂️ 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: CraftRenderer

Stardust Fragment stardust_awakened_forge recipes (3x3 or 3x4 grid).

types: ClassVar[tuple[str, ...]] = ('stardust_awakened_forge',)[source]#

The craft type strings 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,
) → str[source]#

3x3 or 3x4 forge template glyph, from the ingredient count.

Called before the shapeless->shaped conversion, so ingredients is still the original list.

append_hover(
r: RecipeRenderer,
craft: JsonDict,
hover: list[TextComponent],
) → None[source]#

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,
) → None[source]#

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: CraftRenderer

Shared layout/glyph/image for all furnace recipes (uses the default single-ingredient hover).

static_glyph(
craft: JsonDict,
) → str[source]#

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,
) → None[source]#

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 = '',
) → None[source]#

Low-resolution PNG of the ingredient + result pasted onto the furnace template.

class SmeltingRenderer[source]#

Bases: FurnaceBase

smelting recipes (regular furnace).

types: ClassVar[tuple[str, ...]] = ('smelting',)[source]#

The craft type strings this renderer handles.

name: ClassVar[str] = 'Smelting'[source]#

Human title shown in the wiki-button hover. Empty = no title line (e.g. crafting recipes).

class BlastingRenderer[source]#

Bases: FurnaceBase

blasting recipes (blast furnace).

types: ClassVar[tuple[str, ...]] = ('blasting',)[source]#

The craft type strings this renderer handles.

name: ClassVar[str] = 'Blasting'[source]#

Human title shown in the wiki-button hover. Empty = no title line (e.g. crafting recipes).

class SmokingRenderer[source]#

Bases: FurnaceBase

smoking recipes (smoker).

types: ClassVar[tuple[str, ...]] = ('smoking',)[source]#

The craft type strings this renderer handles.

name: ClassVar[str] = 'Smoking'[source]#

Human title shown in the wiki-button hover. Empty = no title line (e.g. crafting recipes).

class CampfireRenderer[source]#

Bases: FurnaceBase

campfire_cooking recipes.

types: ClassVar[tuple[str, ...]] = ('campfire_cooking',)[source]#

The craft type strings this renderer handles.

name: ClassVar[str] = 'Campfire Cooking'[source]#

Human title shown in the wiki-button hover. Empty = no title line (e.g. crafting recipes).

linear#

Single-row “ingredient -> result” renderers: stonecutting / pulverizing / mining.

class LinearRenderer[source]#

Bases: CraftRenderer

Shared 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,
) → None[source]#

One ingredient -> result row, duplicated for the two-row hover trick.

class StonecuttingRenderer[source]#

Bases: LinearRenderer

stonecutting recipes.

types: ClassVar[tuple[str, ...]] = ('stonecutting',)[source]#

The craft type strings this renderer handles.

name: ClassVar[str] = 'Stonecutting'[source]#

Human title shown in the wiki-button hover. Empty = no title line (e.g. crafting recipes).

static_glyph(
craft: JsonDict,
) → str[source]#

The stonecutter template glyph.

class PulverizingRenderer[source]#

Bases: LinearRenderer

SimplEnergy simplenergy_pulverizing recipes.

types: ClassVar[tuple[str, ...]] = ('simplenergy_pulverizing',)[source]#

The craft type strings this renderer handles.

name: ClassVar[str] = '(SimplEnergy) Pulverizing'[source]#

Human title shown in the wiki-button hover. Empty = no title line (e.g. crafting recipes).

static_glyph(
craft: JsonDict,
) → str[source]#

The pulverizer template glyph.

class MiningRenderer[source]#

Bases: LinearRenderer

Pseudo-recipe generated from no-silk-touch drops.

types: ClassVar[tuple[str, ...]] = ('mining',)[source]#

The craft type strings this renderer handles.

name: ClassVar[str] = 'Mining'[source]#

Human title shown in the wiki-button hover. Empty = no title line (e.g. crafting recipes).

static_glyph(
craft: JsonDict,
) → str[source]#

The mining (pickaxe) template glyph.

append_hover(
r: RecipeRenderer,
craft: JsonDict,
hover: list[TextComponent],
) → None[source]#

Mine / Drops / Silk-touch hover lines.

shaped#

Shaped (and shapeless) crafting renderer.

class ShapedRenderer[source]#

Bases: CraftRenderer

crafting_shaped / crafting_shapeless (shapeless is converted to shaped before rendering).

types: ClassVar[tuple[str, ...]] = ('crafting_shaped', 'crafting_shapeless')[source]#

The craft type strings 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,
) → str[source]#

3x3 or 2x2 grid template glyph depending on the craft’s shape.

append_hover(
r: RecipeRenderer,
craft: JsonDict,
hover: list[TextComponent],
) → None[source]#

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,
) → None[source]#

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,
) → None[source]#

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 = '',
) → None[source]#

Low-resolution PNG of the grid + result pasted onto the shaped template.

smithing#

Smithing renderers: smithing_transform / smithing_trim.

class SmithingTransformRenderer[source]#

Bases: CraftRenderer

smithing_transform recipes (base + template + addition -> result).

types: ClassVar[tuple[str, ...]] = ('smithing_transform',)[source]#

The craft type strings 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],
) → None[source]#

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,
) → None[source]#

Base, template and addition in a row, then the result.

class SmithingTrimRenderer[source]#

Bases: CraftRenderer

smithing_trim recipes (no result item; the trim pattern slot is shown empty).

types: ClassVar[tuple[str, ...]] = ('smithing_trim',)[source]#

The craft type strings 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],
) → None[source]#

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,
) → None[source]#

Base, template and addition in a row, with an invisible pattern slot.