This commit is contained in:
2026-09-24 23:28:01 -03:00
parent 79faa556de
commit bb42dd662e
73 changed files with 2349 additions and 34 deletions
+3 -3
View File
@@ -80,13 +80,13 @@ BLOCK_BEHAVIORS["bworld:chest"] = {
// furnace
interface FurnaceRecipe {
export interface FurnaceRecipe {
input: string;
output: ItemStack;
cook_time: number;
}
const FURNACE_RECIPES: FurnaceRecipe[] = [
export const FURNACE_RECIPES: FurnaceRecipe[] = [
{
input: "bworld:log",
output: new ItemStack("bworld:coal", 1),
@@ -119,7 +119,7 @@ const FURNACE_RECIPES: FurnaceRecipe[] = [
},
];
const FUEL_VALUES: Record<string, number> = {
export const FUEL_VALUES: Record<string, number> = {
"bworld:coal": 1000,
"bworld:log": 100,
};
+2 -2
View File
@@ -8,7 +8,7 @@ export interface CraftingRecipe {
result: { id: string; count: number };
}
const recipes: CraftingRecipe[] = [
export const CRAFTING_RECIPES: CraftingRecipe[] = [
{
width: 3,
height: 3,
@@ -117,7 +117,7 @@ function matches_recipe(grid: (string | undefined)[], recipe: CraftingRecipe): b
// puts what the grid makes in the result slot
export function update_crafting_result(crafting: Container) {
const grid = get_crafting_grid(crafting);
const recipe = recipes.find((recipe) => matches_recipe(grid, recipe));
const recipe = CRAFTING_RECIPES.find((recipe) => matches_recipe(grid, recipe));
crafting.set_item(CRAFTING_RESULT_SLOT, recipe ? new ItemStack(recipe.result.id, recipe.result.count) : undefined);
}