You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

118 lines
6.8 KiB
JavaScript

// features/mb_grid.js grid & canopy multiblocks, defined as data.
import { defineGridMultiblock } from "../core/multiblock.js";
export const FLOWER_CART = defineGridMultiblock({
prefix: "rzb_dcs:fc_", anchorKey: "3_0_0", name: "flower cart",
actionBar: (placed, total) => "§aFlower cart v3: placed " + placed + "/" + total + " cells",
cells: {
"0_0_0": [3, 0, 0], "0_0_1": [3, 0, 1], "1_0_0": [2, 0, 0], "1_0_1": [2, 0, 1], "1_1_0": [2, 1, 0],
"1_1_1": [2, 1, 1], "1_2_0": [2, 2, 0], "1_2_1": [2, 2, 1], "2_0_0": [1, 0, 0], "2_0_1": [1, 0, 1],
"2_1_0": [1, 1, 0], "2_1_1": [1, 1, 1], "2_2_0": [1, 2, 0], "2_2_1": [1, 2, 1], "3_0_0": [0, 0, 0],
"3_0_1": [0, 0, 1], "3_1_0": [0, 1, 0], "4_0_0": [-1, 0, 0], "4_0_1": [-1, 0, 1], "4_1_0": [-1, 1, 0],
"4_1_1": [-1, 1, 1], "5_0_0": [-2, 0, 0], "5_1_0": [-2, 1, 0],
},
});
export const ICE_CREAM_CART = defineGridMultiblock({
prefix: "rzb_dcs:ic_", anchorKey: "1_0_0", name: "ice cream cart",
actionBar: (placed, total) => "§aIce cream cart: placed " + placed + "/" + total + " cells",
cells: { "0_0_0": [-1, 0, 0], "0_1_0": [-1, 1, 0], "1_0_0": [0, 0, 0], "1_1_0": [0, 1, 0], "1_2_0": [0, 2, 0], "2_0_0": [1, 0, 0], "2_1_0": [1, 1, 0], "2_2_0": [1, 2, 0] },
});
export const ANTIQUE_TREE = defineGridMultiblock({
prefix: "rzb_dcs:", anchorKey: "at_1_1_0_1", name: "antique christmas tree", undefinedBlocks: true,
cells: { "at_1_0_0_0": [-1, 0, -1], "at_1_0_0_1": [-1, 0, 0], "at_1_0_0_2": [-1, 0, 1], "at_1_0_1_0": [-1, 1, -1], "at_1_0_1_1": [-1, 1, 0], "at_1_0_1_2": [-1, 1, 1], "at_1_0_2_0": [-1, 2, -1], "at_1_0_2_1": [-1, 2, 0], "at_1_0_2_2": [-1, 2, 1], "at_1_0_3_0": [-1, 3, -1], "at_1_0_3_1": [-1, 3, 0], "at_1_0_3_2": [-1, 3, 1], "at_1_1_0_0": [0, 0, -1], "at_1_1_0_1": [0, 0, 0], "at_1_1_0_2": [0, 0, 1], "at_1_1_1_0": [0, 1, -1], "at_1_1_1_1": [0, 1, 0], "at_1_1_1_2": [0, 1, 1], "at_1_1_2_0": [0, 2, -1], "at_1_1_2_1": [0, 2, 0], "at_1_1_2_2": [0, 2, 1], "at_1_1_3_0": [0, 3, -1], "at_1_1_3_1": [0, 3, 0], "at_1_1_3_2": [0, 3, 1], "at_1_2_0_0": [1, 0, -1], "at_1_2_0_1": [1, 0, 0], "at_1_2_0_2": [1, 0, 1], "at_1_2_1_0": [1, 1, -1], "at_1_2_1_1": [1, 1, 0], "at_1_2_1_2": [1, 1, 1], "at_1_2_2_0": [1, 2, -1], "at_1_2_2_1": [1, 2, 0], "at_1_2_2_2": [1, 2, 1], "at_1_2_3_0": [1, 3, -1], "at_1_2_3_1": [1, 3, 0], "at_1_2_3_2": [1, 3, 1] },
});
export const TENT = defineGridMultiblock({
prefix: "rzb_dcs:tent_", anchorKey: "fr_l", name: "tent", undefinedBlocks: true,
cells: { fr_l: [0, 0, 0], fr_r: [-1, 0, 0], bl: [0, 0, 1], br: [-1, 0, 1] },
});
const lgOK = (nb) => nb && (nb.typeId === "minecraft:air" || nb.typeId === "minecraft:water" || nb.typeId === "minecraft:flowing_water");
export const LOUNGER_COLORS = ["rainbow", "red", "orange", "yellow", "green", "blue", "purple", "pink"]; // index = entity rzb_dcs:color
export const LOUNGER = defineGridMultiblock({
prefix: "rzb_dcs:su03_", anchorKey: "0_0_0", name: "pool lounger", canReplace: lgOK, undefinedBlocks: true, color: true,
cells: { "0_0_0": [0, 0, 0], "0_0_1": [0, 0, 1], "0_0_2": [0, 0, 2] },
});
export const DIVING_BOARD = defineGridMultiblock({
prefix: "rzb_dcs:dv_", anchorKey: "front", name: "diving board", canReplace: lgOK, undefinedBlocks: true,
cells: { front: [0, 0, 0], mid: [0, 0, 1], end: [0, 0, 2] },
});
export const UMBRELLA_BAMBOO = defineGridMultiblock({
prefix: "rzb_dcs:um_", anchorKey: "3_0_3", name: "umbrella", rotating: false, color: true,
cells: {
"0_2_3": [-3, 2, 0], "1_2_1": [-2, 2, -2], "1_2_2": [-2, 2, -1], "1_2_3": [-2, 2, 0], "1_2_4": [-2, 2, 1],
"1_2_5": [-2, 2, 2], "2_2_1": [-1, 2, -2], "2_2_2": [-1, 2, -1], "2_2_3": [-1, 2, 0], "2_2_4": [-1, 2, 1],
"2_2_5": [-1, 2, 2], "3_0_3": [0, 0, 0], "3_1_3": [0, 1, 0], "3_2_0": [0, 2, -3], "3_2_1": [0, 2, -2],
"3_2_2": [0, 2, -1], "3_2_3": [0, 2, 0], "3_2_4": [0, 2, 1], "3_2_5": [0, 2, 2], "3_2_6": [0, 2, 3],
"4_2_1": [1, 2, -2], "4_2_2": [1, 2, -1], "4_2_3": [1, 2, 0], "4_2_4": [1, 2, 1], "4_2_5": [1, 2, 2],
"5_2_1": [2, 2, -2], "5_2_2": [2, 2, -1], "5_2_3": [2, 2, 0], "5_2_4": [2, 2, 1], "5_2_5": [2, 2, 2],
"6_2_3": [3, 2, 0],
},
});
export const UMBRELLA_BEACH = defineGridMultiblock({
prefix: "rzb_dcs:bu_", anchorKey: "3_0_3", name: "umbrella", rotating: false, color: true,
cells: {
"1_2_2": [-2, 2, -1], "1_2_3": [-2, 2, 0], "1_2_4": [-2, 2, 1], "2_2_1": [-1, 2, -2], "2_2_2": [-1, 2, -1],
"2_2_3": [-1, 2, 0], "2_2_4": [-1, 2, 1], "2_2_5": [-1, 2, 2], "3_0_3": [0, 0, 0], "3_1_3": [0, 1, 0],
"3_2_1": [0, 2, -2], "3_2_2": [0, 2, -1], "3_2_3": [0, 2, 0], "3_2_4": [0, 2, 1], "3_2_5": [0, 2, 2],
"4_2_1": [1, 2, -2], "4_2_2": [1, 2, -1], "4_2_3": [1, 2, 0], "4_2_4": [1, 2, 1], "4_2_5": [1, 2, 2],
"5_2_2": [2, 2, -1], "5_2_3": [2, 2, 0], "5_2_4": [2, 2, 1],
},
});
export const BAMBOO_TABLE = defineGridMultiblock({
prefix: "rzb_dcs:bt_", anchorKey: "0_0_0", name: "table", rotating: false, color: true,
cells: { "0_0_0": [0, 0, 0] },
});
export const BT_COLORS = ["yellow", "green"];
export const MANTEL = defineGridMultiblock({
prefix: "rzb_dcs:", anchorKey: "mn_1_1_0_0", name: "christmas mantel", rotating: true, undefinedBlocks: true,
cells: { "mn_1_0_0_0": [-1, 0, 0], "mn_1_0_1_0": [-1, 1, 0], "mn_1_1_0_0": [0, 0, 0], "mn_1_1_1_0": [0, 1, 0], "mn_1_2_0_0": [1, 0, 0], "mn_1_2_1_0": [1, 1, 0], "mn_1_2_2_0": [1, 2, 0] },
});
export const PICNIC = defineGridMultiblock({
prefix: "rzb_dcs:sp38_", anchorKey: "fr_l", name: "picnic table", rotating: true, undefinedBlocks: true,
cells: {
fr_l: [0, 0, 0], fr_r: [-1, 0, 0],
bl: [0, 0, -1], br: [-1, 0, -1],
},
});
export const TRAMPOLINE = defineGridMultiblock({
prefix: "rzb_dcs:tr_", anchorKey: "fl", name: "trampoline", rotating: false, undefinedBlocks: true,
cells: { fl: [0, 0, 0], fr: [-1, 0, 0], bl: [0, 0, 1], br: [-1, 0, 1] },
});
export const KOINO_CHILDREN = defineGridMultiblock({
prefix: "rzb_dcs:sp15_", anchorKey: "pole", name: "koinobori children", rotating: true, undefinedBlocks: true,
cells: { pole: [0, 0, 0], fish: [-1, 0, 0] },
});
export const KOINO_CHILDREN_2 = defineGridMultiblock({ // colour variant 2
prefix: "rzb_dcs:sp15_2_", anchorKey: "pole", name: "koinobori children 2", rotating: true, undefinedBlocks: true,
cells: { pole: [0, 0, 0], fish: [-1, 0, 0] },
});
export const KOINO_PARENTS = defineGridMultiblock({
prefix: "rzb_dcs:sp16_", anchorKey: "pole", name: "koinobori parents", rotating: true, undefinedBlocks: true,
cells: { pole: [0, 0, 0], fish: [-1, 0, 0] },
});
export const KOINO_TOP = defineGridMultiblock({
prefix: "rzb_dcs:sp18_", anchorKey: "pole", name: "koinobori top", rotating: true, undefinedBlocks: true,
cells: { pole: [0, 0, 0], fish: [-1, 0, 0] },
});
export const JACUZZI = defineGridMultiblock({
prefix: "rzb_dcs:jc_", anchorKey: "fr_mid", name: "jacuzzi", rotating: true, undefinedBlocks: true,
cells: {
fr_l: [1, 0, 0], fr_mid: [0, 0, 0], fr_r: [-1, 0, 0],
mid_l: [1, 0, 1], center: [0, 0, 1], mid_r: [-1, 0, 1],
b_l: [1, 0, 2], b_mid: [0, 0, 2], b_r: [-1, 0, 2],
},
});