Beautiful textures

This commit is contained in:
2026-09-27 19:39:29 -03:00
parent b7ded817d9
commit 0d513ab3f2
21 changed files with 41 additions and 7 deletions
+13
View File
@@ -0,0 +1,13 @@
{
"format_version": 1,
"block": {
"id": "bworld:cobblestone",
"textures": "bworld:cobblestone",
"mining": {
"toughness": 3,
"tool": "pickaxe",
"requires_tool": true
},
"drops": "bworld:cobblestone"
}
}
+14 -2
View File
@@ -3,8 +3,10 @@
"block": {
"id": "bworld:furnace",
"textures": {
"front": "bworld:furnace",
"side": "bworld:stone"
"front": "bworld:furnace_front",
"side": "bworld:furnace_side",
"top": "bworld:furnace_top",
"bottom": "bworld:cobblestone"
},
"mining": {
"toughness": 5,
@@ -13,6 +15,16 @@
},
"drops": "bworld:furnace",
"interactive": true,
"variants": {
"lit=1": {
"textures": {
"front": "bworld:furnace_front_lit",
"side": "bworld:furnace_side",
"top": "bworld:furnace_top",
"bottom": "bworld:cobblestone"
}
}
},
"states": [
{
"name": "lit",
+1 -1
View File
@@ -8,6 +8,6 @@
"tool": "pickaxe",
"requires_tool": true
},
"drops": "bworld:stone"
"drops": "bworld:cobblestone"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 210 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 B

After

Width:  |  Height:  |  Size: 144 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 B

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 406 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 257 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 289 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 264 B

After

Width:  |  Height:  |  Size: 491 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 466 B

After

Width:  |  Height:  |  Size: 688 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 466 B

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 504 B

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 478 B

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 429 B

After

Width:  |  Height:  |  Size: 969 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 269 B

After

Width:  |  Height:  |  Size: 232 B

+1 -1
View File
@@ -41,7 +41,7 @@ Deno.test("packing a mod keeps its data, scripts, textures and credits, and give
assert(bmod.credits);
const bworld = read_bmod(Deno.readFileSync(`${folder}/bworld.bmod`), "bworld.bmod");
assertEquals(bworld.data.blocks.length, 41);
assertEquals(bworld.data.blocks.length, 42);
assertEquals(Object.keys(bworld.scripts), ["server"]);
Deno.removeSync(sources, { recursive: true });
+12 -3
View File
@@ -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");
});