New blocks
@@ -11,6 +11,11 @@
|
||||
"toughness": 3,
|
||||
"tool": "axe"
|
||||
},
|
||||
"drops": "bworld:acacia_log"
|
||||
"drops": "bworld:acacia_log",
|
||||
"components": {
|
||||
"bworld:strippable": {
|
||||
"into": "bworld:stripped_acacia_log"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"format_version": 1,
|
||||
"block": {
|
||||
"id": "bworld:andesite",
|
||||
"textures": "bworld:andesite",
|
||||
"mining": {
|
||||
"toughness": 3,
|
||||
"tool": "pickaxe",
|
||||
"requires_tool": true
|
||||
},
|
||||
"drops": "bworld:andesite"
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,11 @@
|
||||
"toughness": 3,
|
||||
"tool": "axe"
|
||||
},
|
||||
"drops": "bworld:birch_log"
|
||||
"drops": "bworld:birch_log",
|
||||
"components": {
|
||||
"bworld:strippable": {
|
||||
"into": "bworld:stripped_birch_log"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,11 @@
|
||||
"toughness": 3,
|
||||
"tool": "axe"
|
||||
},
|
||||
"drops": "bworld:cherry_log"
|
||||
"drops": "bworld:cherry_log",
|
||||
"components": {
|
||||
"bworld:strippable": {
|
||||
"into": "bworld:stripped_cherry_log"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,11 @@
|
||||
"toughness": 3,
|
||||
"tool": "axe"
|
||||
},
|
||||
"drops": "bworld:dark_oak_log"
|
||||
"drops": "bworld:dark_oak_log",
|
||||
"components": {
|
||||
"bworld:strippable": {
|
||||
"into": "bworld:stripped_dark_oak_log"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,11 @@
|
||||
"toughness": 3,
|
||||
"tool": "axe"
|
||||
},
|
||||
"drops": "bworld:jungle_log"
|
||||
"drops": "bworld:jungle_log",
|
||||
"components": {
|
||||
"bworld:strippable": {
|
||||
"into": "bworld:stripped_jungle_log"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,11 @@
|
||||
"toughness": 3,
|
||||
"tool": "axe"
|
||||
},
|
||||
"drops": "bworld:oak_log"
|
||||
"drops": "bworld:oak_log",
|
||||
"components": {
|
||||
"bworld:strippable": {
|
||||
"into": "bworld:stripped_oak_log"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"format_version": 1,
|
||||
"block": {
|
||||
"id": "bworld:polished_andesite",
|
||||
"textures": "bworld:polished_andesite",
|
||||
"mining": {
|
||||
"toughness": 3,
|
||||
"tool": "pickaxe",
|
||||
"requires_tool": true
|
||||
},
|
||||
"drops": "bworld:polished_andesite"
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,11 @@
|
||||
"toughness": 3,
|
||||
"tool": "axe"
|
||||
},
|
||||
"drops": "bworld:spruce_log"
|
||||
"drops": "bworld:spruce_log",
|
||||
"components": {
|
||||
"bworld:strippable": {
|
||||
"into": "bworld:stripped_spruce_log"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"format_version": 1,
|
||||
"block": {
|
||||
"id": "bworld:stripped_acacia_log",
|
||||
"textures": {
|
||||
"side": "bworld:stripped_acacia_log",
|
||||
"top": "bworld:stripped_acacia_log_top",
|
||||
"bottom": "bworld:stripped_acacia_log_top"
|
||||
},
|
||||
"mining": {
|
||||
"toughness": 3,
|
||||
"tool": "axe"
|
||||
},
|
||||
"drops": "bworld:stripped_acacia_log"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"format_version": 1,
|
||||
"block": {
|
||||
"id": "bworld:stripped_birch_log",
|
||||
"textures": {
|
||||
"side": "bworld:stripped_birch_log",
|
||||
"top": "bworld:stripped_birch_log_top",
|
||||
"bottom": "bworld:stripped_birch_log_top"
|
||||
},
|
||||
"mining": {
|
||||
"toughness": 3,
|
||||
"tool": "axe"
|
||||
},
|
||||
"drops": "bworld:stripped_birch_log"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"format_version": 1,
|
||||
"block": {
|
||||
"id": "bworld:stripped_cherry_log",
|
||||
"textures": {
|
||||
"side": "bworld:stripped_cherry_log",
|
||||
"top": "bworld:stripped_cherry_log_top",
|
||||
"bottom": "bworld:stripped_cherry_log_top"
|
||||
},
|
||||
"mining": {
|
||||
"toughness": 3,
|
||||
"tool": "axe"
|
||||
},
|
||||
"drops": "bworld:stripped_cherry_log"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"format_version": 1,
|
||||
"block": {
|
||||
"id": "bworld:stripped_dark_oak_log",
|
||||
"textures": {
|
||||
"side": "bworld:stripped_dark_oak_log",
|
||||
"top": "bworld:stripped_dark_oak_log_top",
|
||||
"bottom": "bworld:stripped_dark_oak_log_top"
|
||||
},
|
||||
"mining": {
|
||||
"toughness": 3,
|
||||
"tool": "axe"
|
||||
},
|
||||
"drops": "bworld:stripped_dark_oak_log"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"format_version": 1,
|
||||
"block": {
|
||||
"id": "bworld:stripped_jungle_log",
|
||||
"textures": {
|
||||
"side": "bworld:stripped_jungle_log",
|
||||
"top": "bworld:stripped_jungle_log_top",
|
||||
"bottom": "bworld:stripped_jungle_log_top"
|
||||
},
|
||||
"mining": {
|
||||
"toughness": 3,
|
||||
"tool": "axe"
|
||||
},
|
||||
"drops": "bworld:stripped_jungle_log"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"format_version": 1,
|
||||
"block": {
|
||||
"id": "bworld:stripped_oak_log",
|
||||
"textures": {
|
||||
"side": "bworld:stripped_oak_log",
|
||||
"top": "bworld:stripped_oak_log_top",
|
||||
"bottom": "bworld:stripped_oak_log_top"
|
||||
},
|
||||
"mining": {
|
||||
"toughness": 3,
|
||||
"tool": "axe"
|
||||
},
|
||||
"drops": "bworld:stripped_oak_log"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"format_version": 1,
|
||||
"block": {
|
||||
"id": "bworld:stripped_spruce_log",
|
||||
"textures": {
|
||||
"side": "bworld:stripped_spruce_log",
|
||||
"top": "bworld:stripped_spruce_log_top",
|
||||
"bottom": "bworld:stripped_spruce_log_top"
|
||||
},
|
||||
"mining": {
|
||||
"toughness": 3,
|
||||
"tool": "axe"
|
||||
},
|
||||
"drops": "bworld:stripped_spruce_log"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"format_version": 1,
|
||||
"item": {
|
||||
"id": "bworld:andesite",
|
||||
"base_sell_value": 2
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"format_version": 1,
|
||||
"item": {
|
||||
"id": "bworld:polished_andesite",
|
||||
"base_sell_value": 2
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"format_version": 1,
|
||||
"item": {
|
||||
"id": "bworld:stripped_acacia_log",
|
||||
"base_sell_value": 9
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"format_version": 1,
|
||||
"item": {
|
||||
"id": "bworld:stripped_birch_log",
|
||||
"base_sell_value": 9
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"format_version": 1,
|
||||
"item": {
|
||||
"id": "bworld:stripped_cherry_log",
|
||||
"base_sell_value": 9
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"format_version": 1,
|
||||
"item": {
|
||||
"id": "bworld:stripped_dark_oak_log",
|
||||
"base_sell_value": 9
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"format_version": 1,
|
||||
"item": {
|
||||
"id": "bworld:stripped_jungle_log",
|
||||
"base_sell_value": 9
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"format_version": 1,
|
||||
"item": {
|
||||
"id": "bworld:stripped_oak_log",
|
||||
"base_sell_value": 9
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"format_version": 1,
|
||||
"item": {
|
||||
"id": "bworld:stripped_spruce_log",
|
||||
"base_sell_value": 9
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import { register_fishing } from "./fishing.ts";
|
||||
|
||||
export function setup(ctx: ServerContext) {
|
||||
register_hoeable(ctx);
|
||||
register_strippable(ctx);
|
||||
const storage_menu = register_storage(ctx);
|
||||
register_shipping_bin(ctx, storage_menu);
|
||||
register_furnace(ctx);
|
||||
@@ -35,6 +36,20 @@ function register_hoeable(ctx: ServerContext) {
|
||||
});
|
||||
}
|
||||
|
||||
// right clicking with an axe strips the bark off, like a log into its stripped log
|
||||
function register_strippable(ctx: ServerContext) {
|
||||
ctx.components.register_block<{ into: string }>("bworld:strippable", {
|
||||
on_interact(block, params, player) {
|
||||
const held = player.held_item;
|
||||
if (!held || ctx.items.tool(held.id) !== "axe") {
|
||||
return false;
|
||||
}
|
||||
ctx.world.set_block(block.x, block.y, block.z, params.into);
|
||||
return true;
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
// the container a block keeps its items in, made the first time it's needed. blocks placed before tile data
|
||||
// existed don't have one yet
|
||||
function block_container(ctx: ServerContext, block: BlockRef, size: number): Container {
|
||||
|
||||
@@ -8,7 +8,14 @@
|
||||
"bworld:jungle_log",
|
||||
"bworld:acacia_log",
|
||||
"bworld:dark_oak_log",
|
||||
"bworld:cherry_log"
|
||||
"bworld:cherry_log",
|
||||
"bworld:stripped_oak_log",
|
||||
"bworld:stripped_spruce_log",
|
||||
"bworld:stripped_birch_log",
|
||||
"bworld:stripped_jungle_log",
|
||||
"bworld:stripped_acacia_log",
|
||||
"bworld:stripped_dark_oak_log",
|
||||
"bworld:stripped_cherry_log"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,14 @@
|
||||
"bworld:jungle_log",
|
||||
"bworld:acacia_log",
|
||||
"bworld:dark_oak_log",
|
||||
"bworld:cherry_log"
|
||||
"bworld:cherry_log",
|
||||
"bworld:stripped_oak_log",
|
||||
"bworld:stripped_spruce_log",
|
||||
"bworld:stripped_birch_log",
|
||||
"bworld:stripped_jungle_log",
|
||||
"bworld:stripped_acacia_log",
|
||||
"bworld:stripped_dark_oak_log",
|
||||
"bworld:stripped_cherry_log"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 6.4 KiB |
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 6.1 KiB |
|
After Width: | Height: | Size: 6.1 KiB |
|
After Width: | Height: | Size: 358 B |
|
After Width: | Height: | Size: 359 B |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 6.1 KiB |
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 342 B |
|
After Width: | Height: | Size: 369 B |
|
After Width: | Height: | Size: 323 B |
|
After Width: | Height: | Size: 356 B |
|
After Width: | Height: | Size: 5.9 KiB |
|
After Width: | Height: | Size: 6.1 KiB |