Beautiful textures
This commit is contained in:
@@ -3,6 +3,7 @@ import { AIR, CHUNK_HEIGHT } from "$/common/constants.ts";
|
||||
import { BlockRegistry, EverythingRegistry, ItemRegistry } from "$/common/everything_registry.ts";
|
||||
import { block_from_json, block_to_json, item_from_json, item_to_json } from "$/common/mod_data.ts";
|
||||
import { generate_raw_chunk } from "$/common/generation.ts";
|
||||
import { block_variant } from "$/common/block_models.ts";
|
||||
import { load_worldgen } from "$/common/worldgen_loader.ts";
|
||||
import { create_mod } from "$/tools/new_mod.ts";
|
||||
import { PROTOCOL_VERSION } from "$/common/protocol.ts";
|
||||
@@ -25,9 +26,9 @@ Deno.test("the base game loads from mods/bworld", async () => {
|
||||
const { game } = await test_game("mods");
|
||||
const bworld = (entries: [string, unknown][]) => entries.filter(([id]) => id.startsWith("bworld:")).length;
|
||||
// 7 kinds of log, planks and leaves
|
||||
assertEquals(bworld(EverythingRegistry.entries("blocks")), 41);
|
||||
// 33 items (20 of them tools) plus the item forms of the 36 blocks that have one
|
||||
assertEquals(bworld(EverythingRegistry.entries("items")), 69);
|
||||
assertEquals(bworld(EverythingRegistry.entries("blocks")), 42);
|
||||
// 33 items (20 of them tools) plus the item forms of the 37 blocks that have one
|
||||
assertEquals(bworld(EverythingRegistry.entries("items")), 70);
|
||||
// bworld's 15 (4 wood tools, 7 planks), the cooking pot and stove are farmersdelight's
|
||||
assertEquals(game.recipes.shaped.length, 17);
|
||||
// every log smelts and burns
|
||||
@@ -238,3 +239,11 @@ Deno.test("every tier of pickaxe, axe, shovel and hoe exists and can be made", a
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Deno.test("a lit furnace shows its lit front", async () => {
|
||||
await test_game("mods");
|
||||
const furnace = EverythingRegistry.get<BlockRegistry>("blocks", "bworld:furnace")!;
|
||||
const front = (lit: number) => (block_variant(furnace, { lit }).textures as Record<string, string>).front;
|
||||
assertEquals(front(0), "bworld:furnace_front");
|
||||
assertEquals(front(1), "bworld:furnace_front_lit");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user