Beautiful textures
@@ -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"
|
||||
}
|
||||
}
|
||||
@@ -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",
|
||||
|
||||
@@ -8,6 +8,6 @@
|
||||
"tool": "pickaxe",
|
||||
"requires_tool": true
|
||||
},
|
||||
"drops": "bworld:stone"
|
||||
"drops": "bworld:cobblestone"
|
||||
}
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 210 B |
|
Before Width: | Height: | Size: 157 B After Width: | Height: | Size: 144 B |
|
Before Width: | Height: | Size: 156 B After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 406 B |
|
After Width: | Height: | Size: 257 B |
|
After Width: | Height: | Size: 289 B |
|
After Width: | Height: | Size: 228 B |
|
After Width: | Height: | Size: 190 B |
|
Before Width: | Height: | Size: 343 B |
|
Before Width: | Height: | Size: 264 B After Width: | Height: | Size: 491 B |
|
Before Width: | Height: | Size: 466 B After Width: | Height: | Size: 688 B |
|
Before Width: | Height: | Size: 466 B After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 504 B After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 478 B After Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 429 B After Width: | Height: | Size: 969 B |
|
Before Width: | Height: | Size: 269 B After Width: | Height: | Size: 232 B |
@@ -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 });
|
||||
|
||||
@@ -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");
|
||||
});
|
||||
|
||||