@@ -1,7 +1,7 @@
|
||||
import { GameMode, system, world } from '@minecraft/server';
|
||||
import { Raycaster } from '../classes/Raycaster';
|
||||
import { Raycaster } from './Raycaster';
|
||||
import { fetchMatchingItemSlot } from '../utils';
|
||||
|
||||
import { Block_state, chinese_text, State_values } from './zh_CN';
|
||||
class BlockInfo {
|
||||
static shownToLastTick = new Set();
|
||||
|
||||
@@ -12,7 +12,9 @@ class BlockInfo {
|
||||
this.showStructureBlockInfo(player);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {import('@minecraft/server').Player} player
|
||||
* */
|
||||
static showStructureBlockInfo(player) {
|
||||
const block = Raycaster.getTargetedStructureBlock(player, { isFirst: true, collideWithWorldBlocks: true, useActiveLayer: true });
|
||||
if (!block && this.shownToLastTick.has(player.id)) {
|
||||
@@ -25,14 +27,14 @@ class BlockInfo {
|
||||
}
|
||||
if (!block)
|
||||
return;
|
||||
player.onScreenDisplay.setActionBar(this.getFormattedBlockInfo(player, block.permutation));
|
||||
player.onScreenDisplay.setActionBar(this.getFormattedBlockInfo(player, block));
|
||||
this.shownToLastTick.add(player.id);
|
||||
}
|
||||
|
||||
static getFormattedBlockInfo(player, block) {
|
||||
return { rawtext: [
|
||||
{ translate: 'construct.blockinfo.header' },
|
||||
this.getSupplyMessage(player, block),
|
||||
this.getSupplyMessage(player, block.permutation),
|
||||
{ text: '\n' },
|
||||
this.getBlockMessage(block)
|
||||
] };
|
||||
@@ -41,8 +43,14 @@ class BlockInfo {
|
||||
static getBlockMessage(block) {
|
||||
if (!block)
|
||||
return { translate: 'construct.blockinfo.unknown' };
|
||||
const message = { rawtext: [{ text: '§a' }, { translate: block.type.id }]};
|
||||
const states = block.getAllStates();
|
||||
const message = { rawtext: [{ text: '§a' }]};
|
||||
if (chinese_text[block.permutation.type.id] !== undefined) {
|
||||
message.rawtext.push({ text: chinese_text[block.permutation.type.id] });
|
||||
} else {
|
||||
message.rawtext.push({ translate: block.permutation.getItemStack().localizationKey });
|
||||
}
|
||||
|
||||
const states = block.permutation.getAllStates();
|
||||
if (Object.keys(states).length > 0)
|
||||
message.rawtext.push({ text: `\n§7${this.getFormattedStates(states)}` });
|
||||
if (block.isWaterlogged)
|
||||
@@ -54,7 +62,14 @@ class BlockInfo {
|
||||
}
|
||||
|
||||
static getFormattedStates(states) {
|
||||
return Object.entries(states).map(([key, value]) => `§7${key}: §3${value}`).join('\n');
|
||||
return Object.entries(states)
|
||||
.map(([stateName, stateValue]) => {
|
||||
if (State_values[stateName] || Block_state[stateName]) {
|
||||
return (`\n§7${Block_state[stateName]}`)
|
||||
.replaceAll('%1', `§a${State_values[stateName][String(stateValue)]}§7`);
|
||||
}
|
||||
})
|
||||
.join('');
|
||||
}
|
||||
|
||||
static getSupplyMessage(player, block) {
|
||||
|
||||
@@ -2,7 +2,8 @@ import { ActionFormData, ModalFormData } from '@minecraft/server-ui';
|
||||
import { MenuFormBuilder } from '../MenuFormBuilder';
|
||||
import { StructureVerifier } from '../Verifier/StructureVerifier';
|
||||
import { StructureStatistics } from '../Structure/StructureStatistics';
|
||||
import { EntityComponentTypes, TicksPerSecond } from '@minecraft/server';
|
||||
import {EntityComponentTypes, TicksPerSecond} from '@minecraft/server';
|
||||
import {dim} from "../zh_CN";
|
||||
|
||||
export class InstanceFormBuilder {
|
||||
static structureVerifier;
|
||||
@@ -17,7 +18,8 @@ export class InstanceFormBuilder {
|
||||
if (instance.hasLocation())
|
||||
body.rawtext.push(...[
|
||||
{ text: '\n' },
|
||||
{ translate: 'construct.instance.menu.location', with: [String(location.location.x), String(location.location.y), String(location.location.z), location.dimensionId] }
|
||||
//{translate:world.getDimension(location.dimensionId).localizationKey},---to be compatible with language files, this method is not used
|
||||
{ translate: 'construct.instance.menu.location', with: [String(location.location.x), String(location.location.y), String(location.location.z), dim[location.dimensionId]] } //all dim names automatically translated
|
||||
]);
|
||||
form.body(body);
|
||||
options.forEach(option => {
|
||||
|
||||
@@ -16,7 +16,7 @@ export class Raycaster {
|
||||
if (block?.type.id !== 'minecraft:air') {
|
||||
blocks.push({
|
||||
permutation: block,
|
||||
location: location
|
||||
location: location,
|
||||
});
|
||||
if (getFirst)
|
||||
break;
|
||||
|
||||
@@ -0,0 +1,860 @@
|
||||
export const chinese_text = {
|
||||
"minecraft:mangrove_double_slab": "红树木双台阶§8--§9星之海",
|
||||
"minecraft:bamboo_mosaic_double_slab": "竹制马赛克双台阶§8--§9星之海",
|
||||
"minecraft:bamboo_double_slab": "竹制双台阶§8--§9星之海",
|
||||
"minecraft:blackstone_double_slab": "黑石双台阶§8--§9星之海",
|
||||
"minecraft:polished_blackstone_brick_double_slab": "磨制黑石砖双台阶§8--§9星之海",
|
||||
"minecraft:polished_blackstone_double_slab": "磨制黑石双台阶§8--§9星之海",
|
||||
"minecraft:polished_tuff_double_slab": "磨制凝灰岩双台阶§8--§9星之海",
|
||||
"minecraft:piston_arm_collision": "活塞臂§8--§9星之海",
|
||||
"minecraft:sticky_piston_arm_collision": "粘液活塞臂§8--§9星之海",
|
||||
"minecraft:light_block": "光源方块§8--§9星之海",
|
||||
"minecraft:light_block_0": "光源方块(亮度0)§8--§9星之海",
|
||||
"minecraft:light_block_1": "光源方块(亮度1)§8--§9星之海",
|
||||
"minecraft:light_block_2": "光源方块(亮度2)§8--§9星之海",
|
||||
"minecraft:light_block_3": "光源方块(亮度3)§8--§9星之海",
|
||||
"minecraft:light_block_4": "光源方块(亮度4)§8--§9星之海",
|
||||
"minecraft:light_block_5": "光源方块(亮度5)§8--§9星之海",
|
||||
"minecraft:light_block_6": "光源方块(亮度6)§8--§9星之海",
|
||||
"minecraft:light_block_7": "光源方块(亮度7)§8--§9星之海",
|
||||
"minecraft:light_block_8": "光源方块(亮度8)§8--§9星之海",
|
||||
"minecraft:light_block_9": "光源方块(亮度9)§8--§9星之海",
|
||||
"minecraft:light_block_10": "光源方块(亮度10)§8--§9星之海",
|
||||
"minecraft:light_block_11": "光源方块(亮度11)§8--§9星之海",
|
||||
"minecraft:light_block_12": "光源方块(亮度12)§8--§9星之海",
|
||||
"minecraft:light_block_13": "光源方块(亮度13)§8--§9星之海",
|
||||
"minecraft:light_block_14": "光源方块(亮度14)§8--§9星之海",
|
||||
"minecraft:light_block_15": "光源方块(亮度15)§8--§9星之海",
|
||||
"minecraft:daylight_detector": "阳光探测器(日)§8--§9星之海",
|
||||
"minecraft:daylight_detector_inverted": "阳光探测器(夜)§8--§9星之海",
|
||||
"minecraft:end_portal": "末地传送门§8--§9星之海",
|
||||
"minecraft:lit_redstone_ore": "发光的红石矿石§8--§9星之海",
|
||||
"minecraft:lit_redstone_lamp": "点亮的红石灯§8--§9星之海",
|
||||
|
||||
"minecraft:smooth_stone_double_slab": "平滑石双台阶§8--§9星之海",
|
||||
"minecraft:prismarine_double_slab": "海晶石双台阶§8--§9星之海",
|
||||
"minecraft:dark_prismarine_double_slab": "暗海晶石双台阶§8--§9星之海",
|
||||
"minecraft:prismarine_brick_double_slab": "海晶石砖双台阶§8--§9星之海",
|
||||
"minecraft:mossy_cobblestone_double_slab": "苔石双台阶§8--§9星之海",
|
||||
"minecraft:red_nether_brick_double_slab": "红色下界砖双台阶§8--§9星之海",
|
||||
"minecraft:smooth_red_sandstone_double_slab": "平滑红砂岩双台阶§8--§9星之海",
|
||||
"minecraft:end_stone_brick_double_slab": "末地石砖双台阶§8--§9星之海",
|
||||
"minecraft:polished_andesite_double_slab": "磨制安山岩双台阶§8--§9星之海",
|
||||
"minecraft:diorite_double_slab": "闪长岩双台阶§8--§9星之海",
|
||||
"minecraft:polished_diorite_double_slab": "磨制闪长岩双台阶§8--§9星之海",
|
||||
"minecraft:granite_double_slab": "花岗岩双台阶§8--§9星之海",
|
||||
"minecraft:polished_granite_double_slab": "磨制花岗岩双台阶§8--§9星之海",
|
||||
"minecraft:smooth_quartz_double_slab": "平滑石英双台阶§8--§9星之海",
|
||||
"minecraft:cut_sandstone_double_slab": "切制砂岩双台阶§8--§9星之海",
|
||||
"minecraft:cut_red_sandstone_double_slab": "切制红砂岩双台阶§8--§9星之海",
|
||||
"minecraft:bubble_column": "气泡柱§8--§9星之海",
|
||||
"minecraft:frame": "展示框§8--§9星之海",
|
||||
"minecraft:glow_frame": "发光展示框§8--§9星之海",
|
||||
"minecraft:tuff_brick_double_slab": "凝灰岩砖双台阶§8--§9星之海",
|
||||
"minecraft:tuff_double_slab": "凝灰岩双台阶§8--§9星之海",
|
||||
"minecraft:acacia_double_slab": "金合欢木双台阶§8--§9星之海",
|
||||
"minecraft:dark_oak_double_slab": "深色橡木双台阶§8--§9星之海",
|
||||
"minecraft:birch_double_slab": "白桦木双台阶§8--§9星之海",
|
||||
"minecraft:jungle_double_slab": "丛林木双台阶§8--§9星之海",
|
||||
"minecraft:oak_double_slab": "橡木双台阶§8--§9星之海",
|
||||
"minecraft:spruce_double_slab": "云杉木双台阶§8--§9星之海",
|
||||
"minecraft:lit_deepslate_redstone_ore": "发光的深层红石矿石§8--§9星之海",
|
||||
"minecraft:cut_copper_double_slab": "切制铜块双台阶§8--§9星之海",
|
||||
"minecraft:exposed_cut_copper_double_slab": "外露切制铜块双台阶§8--§9星之海",
|
||||
"minecraft:weathered_cut_copper_double_slab": "风化切制铜块双台阶§8--§9星之海",
|
||||
"minecraft:oxidized_cut_copper_double_slab": "氧化切制铜块双台阶§8--§9星之海",
|
||||
"minecraft:waxed_cut_copper_double_slab": "涂蜡切制铜块双台阶§8--§9星之海",
|
||||
"minecraft:waxed_weathered_cut_copper_double_slab": "锈蚀的涂蜡切制铜块双台阶§8--§9星之海",
|
||||
"minecraft:waxed_oxidized_cut_copper_double_slab": "氧化的涂蜡切制铜块双台阶§8--§9星之海",
|
||||
"minecraft:waxed_exposed_cut_copper_double_slab": "斑驳的涂蜡切制铜块双台阶§8--§9星之海",
|
||||
"minecraft:repeater": "红石中继器(不充能)§8--§9星之海",
|
||||
"minecraft:powered_repeater": "红石中继器(充能)§8--§9星之海",
|
||||
"minecraft:unpowered_repeater": "红石中继器(不充能)§8--§9星之海",
|
||||
"minecraft:unpowered_comparator": "比较器(不充能)§8--§9星之海",
|
||||
"minecraft:powered_comparator": "比较器(充能)§8--§9星之海",};
|
||||
export let Block_state = {
|
||||
active: "方块%1激活工作",
|
||||
age: "块的年龄(树苗等)是%1",
|
||||
age_bit: "植物幼苗%1生长",
|
||||
allow_underwater_bit: "TNT%1在水中boom",
|
||||
attached_bit: "绊线%1与绊线连接 或悬挂告示牌铰链%1相互平行",
|
||||
attachment: "悬挂物品的悬挂方式是%1",
|
||||
bamboo_leaf_size: "竹叶的大小是%1",
|
||||
bamboo_stalk_thickness: "竹子的长成的粗细是%1",
|
||||
big_dripleaf_tilt: "垂滴叶的倾斜状态是%1",
|
||||
bite_counter: "蛋糕被食用%1口",
|
||||
books_stored: "錾制书架存书:(1=有书)",
|
||||
brewing_stand_slot_a_bit: "酿造台1槽%1药水",
|
||||
brewing_stand_slot_b_bit: "酿造台2槽%1药水",
|
||||
brewing_stand_slot_c_bit: "酿造台3槽%1药水",
|
||||
button_pressed_bit: "按钮%1按下",
|
||||
candles: "该方块内有%1个蜡烛",
|
||||
cauldron_liquid: "锅中的液体是%1",
|
||||
chisel_type: "石英和紫珀块是%1样式",
|
||||
cluster_count: "该方块内有%1个蜡烛海泡菜",
|
||||
color: "方块为%1色",
|
||||
color_bit: "火把%1为彩色火把方块",
|
||||
conditional_bit: "%1条件命令方块",
|
||||
coral_color: "珊瑚方块为%1色",
|
||||
coral_direction: "珊瑚扇朝%1",
|
||||
coral_hang_type_bit: "珊瑚扇%1",
|
||||
covered_bit: "顶层雪%1植物",
|
||||
cracked_state: "海龟蛋%1",
|
||||
crafting: "合成器%1在合成物品",
|
||||
damage: "铁砧%1",
|
||||
dead_bit: "珊瑚或海葵%1",
|
||||
direction: "方块朝%1",
|
||||
dirt_type: "该土块是%1",
|
||||
disarmed_bit: "绊线%1触发(接入电路)",
|
||||
door_hinge_bit: "门的铰链朝%1",
|
||||
double_plant_type: "该高植物是%1",
|
||||
drag_down: "气泡柱朝%1",
|
||||
dripstone_thickness: "该方块是滴水石锥的%1",
|
||||
end_portal_eye_bit: "末地传送门方块%1末影之眼",
|
||||
explode_bit: "TNT方块%1被点燃",
|
||||
facing_direction: "方块朝%1",
|
||||
fill_level: "锅中液体高%1/15层",
|
||||
ground_sign_direction: "告示牌和旗帜的朝%1",
|
||||
growth: "作物的生长阶段是%1/15",
|
||||
hanging: "处于%1",
|
||||
head_piece_bit: "方块是床的%1",
|
||||
height: "顶层雪的厚度是%1/15",
|
||||
huge_mushroom_bits: "蘑菇块%1",
|
||||
in_wall_bit: "栅栏%1到墙",
|
||||
infiniburn_bit: "火%1无限燃烧",
|
||||
item_frame_map_bit: "展示框中%1地图",
|
||||
item_frame_photo_bit: "展示框中%1物品/图片",
|
||||
liquid_depth: "液体方块的厚度%1/15",
|
||||
lit: "方块%1点亮",
|
||||
moisturized_amount: "作物的湿度水平%1/15",
|
||||
monster_egg_stone_type: "虫蛀的%1",
|
||||
natural: "方块%1自然生成",
|
||||
no_drop_bit: "头颅被挖%1掉落",
|
||||
occupied_bit: "床%1占用",
|
||||
ominous: "方块%1不详/试炼版本",
|
||||
open_bit: "各种门%1",
|
||||
orientation: "方块朝%1",
|
||||
output_lit_bit: "比较器的输出%1点亮",
|
||||
output_subtract_bit: "比较器为'%1'模式",
|
||||
pale_moss_carpet_side_east: "苍白苔藓地毯东面%1向上延伸",
|
||||
pale_moss_carpet_side_north: "苍白苔藓地毯北面%1向上延伸",
|
||||
pale_moss_carpet_side_south: "苍白苔藓地毯南面%1向上延伸",
|
||||
pale_moss_carpet_side_west: "苍白苔藓地毯西面%1向上延伸",
|
||||
persistent_bit: "树叶%1自动掉落性",
|
||||
portal_axis: "2向方块的朝向%1",
|
||||
powered_bit: "检测器或绊线%1触发",
|
||||
rail_data_bit: "铁轨%1红石信号",
|
||||
rail_direction: "%1",
|
||||
redstone_signal: "红石信号强度是%1/15",
|
||||
repeater_delay: "红石中继器是%1/4档位",
|
||||
sea_grass_type: "%1",
|
||||
sponge_type: "%1海绵",
|
||||
stability: "脚手架的稳定性(支柱=0)%1/5",
|
||||
stability_check: "脚手架%1已检查稳定性",
|
||||
stripped_bit: "木头%1去除树皮",
|
||||
structure_block_type: "结构方块是%1",
|
||||
suspended_bit: "绊线%1有效的绊线线路中",
|
||||
tip: "该方块%1方块链(如一条石锥)中的最后一个",
|
||||
toggle_bit: "漏斗%1工作(不充能)",
|
||||
top_slot_bit: "台阶的%1半部分",
|
||||
torch_facing_direction: "火把悬挂方块与火把的相对位置是%1",
|
||||
trial_spawner_state: "试炼刷怪笼%1",
|
||||
triggered_bit: "方块%1红石信号激活",
|
||||
turtle_egg_count: "方块中有%1个海龟蛋",
|
||||
update_bit: "叶或花%1在下一次随机刻时检查是否应枯萎",
|
||||
upper_block_bit: "门或高玉良的%1半部分",
|
||||
upside_down_bit: "楼梯方块或栅门方块%1",
|
||||
vine_direction_bits: "藤蔓的附着方块相对方向是%1",
|
||||
wall_connection_type_east: "墙向东%1",
|
||||
wall_connection_type_north: "墙向北%1",
|
||||
wall_connection_type_south: "墙向南%1",
|
||||
wall_connection_type_west: "墙向西%1",
|
||||
wall_post_bit: "墙%1中心柱",
|
||||
weirdo_direction: "楼梯%1"
|
||||
};
|
||||
export let State_values = {
|
||||
active: {
|
||||
true: "是",
|
||||
false: "否"
|
||||
},
|
||||
age: {},
|
||||
age_bit: {
|
||||
true: "能",
|
||||
false: "不能"
|
||||
},
|
||||
allow_underwater_bit: {
|
||||
true: "能",
|
||||
false: "不能"
|
||||
},
|
||||
attached_bit: {
|
||||
true: "是",
|
||||
false: "不"
|
||||
},
|
||||
attachment: {
|
||||
standing: "直立",
|
||||
hanging: "悬挂",
|
||||
side: "侧挂",
|
||||
multiple: "多方面依赖"
|
||||
},
|
||||
bamboo_leaf_size: {
|
||||
no_leaves: "无竹叶",
|
||||
small_leaves: "少竹叶",
|
||||
large_leaves: "多竹叶"
|
||||
},
|
||||
bamboo_stalk_thickness: {
|
||||
thin: "薄",
|
||||
thick: "厚"
|
||||
},
|
||||
big_dripleaf_tilt: {
|
||||
none: "无倾斜",
|
||||
unstable: "不稳定",
|
||||
partial_tilt: "半倾斜",
|
||||
full_tilt: "完全倾斜"
|
||||
},
|
||||
bite_counter: {},
|
||||
books_stored: {
|
||||
0: `
|
||||
000
|
||||
000`,
|
||||
1: `
|
||||
100
|
||||
000`,
|
||||
2: `
|
||||
010
|
||||
000`,
|
||||
3: `
|
||||
110
|
||||
000`,
|
||||
4: `
|
||||
001
|
||||
000`,
|
||||
5: `
|
||||
101
|
||||
000`,
|
||||
6: `
|
||||
011
|
||||
000`,
|
||||
7: `
|
||||
111
|
||||
000`,
|
||||
8: `
|
||||
000
|
||||
100`,
|
||||
9: `
|
||||
100
|
||||
100`,
|
||||
10: `
|
||||
010
|
||||
100`,
|
||||
11: `
|
||||
110
|
||||
100`,
|
||||
12: `
|
||||
001
|
||||
100`,
|
||||
13: `
|
||||
101
|
||||
100`,
|
||||
14: `
|
||||
011
|
||||
100`,
|
||||
15: `
|
||||
111
|
||||
100`,
|
||||
16: `
|
||||
000
|
||||
010`,
|
||||
17: `
|
||||
100
|
||||
010`,
|
||||
18: `
|
||||
010
|
||||
010`,
|
||||
19: `
|
||||
110
|
||||
010`,
|
||||
20: `
|
||||
001
|
||||
010`,
|
||||
21: `
|
||||
101
|
||||
010`,
|
||||
22: `
|
||||
011
|
||||
010`,
|
||||
23: `
|
||||
111
|
||||
010`,
|
||||
24: `
|
||||
000
|
||||
110`,
|
||||
25: `
|
||||
100
|
||||
110`,
|
||||
26: `
|
||||
010
|
||||
110`,
|
||||
27: `
|
||||
110
|
||||
110`,
|
||||
28: `
|
||||
001
|
||||
110`,
|
||||
29: `
|
||||
101
|
||||
110`,
|
||||
30: `
|
||||
011
|
||||
110`,
|
||||
31: `
|
||||
111
|
||||
110`,
|
||||
32: `
|
||||
000
|
||||
001`,
|
||||
33: `
|
||||
100
|
||||
001`,
|
||||
34: `
|
||||
010
|
||||
001`,
|
||||
35: `
|
||||
110
|
||||
001`,
|
||||
36: `
|
||||
001
|
||||
001`,
|
||||
37: `
|
||||
101
|
||||
001`,
|
||||
38: `
|
||||
011
|
||||
001`,
|
||||
39: `
|
||||
111
|
||||
001`,
|
||||
40: `
|
||||
000
|
||||
101`,
|
||||
41: `
|
||||
100
|
||||
101`,
|
||||
42: `
|
||||
010
|
||||
101`,
|
||||
43: `
|
||||
110
|
||||
101`,
|
||||
44: `
|
||||
001
|
||||
101`,
|
||||
45: `
|
||||
101
|
||||
101`,
|
||||
46: `
|
||||
011
|
||||
101`,
|
||||
47: `
|
||||
111
|
||||
101`,
|
||||
48: `
|
||||
000
|
||||
011`,
|
||||
49: `
|
||||
100
|
||||
011`,
|
||||
50: `
|
||||
010
|
||||
011`,
|
||||
51: `
|
||||
110
|
||||
011`,
|
||||
52: `
|
||||
001
|
||||
011`,
|
||||
53: `
|
||||
101
|
||||
011`,
|
||||
54: `
|
||||
011
|
||||
011`,
|
||||
55: `
|
||||
111
|
||||
011`,
|
||||
56: `
|
||||
000
|
||||
111`,
|
||||
57: `
|
||||
100
|
||||
111`,
|
||||
58: `
|
||||
010
|
||||
111`,
|
||||
59: `
|
||||
110
|
||||
111`,
|
||||
60: `
|
||||
001
|
||||
111`,
|
||||
61: `
|
||||
101
|
||||
111`,
|
||||
62: `
|
||||
011
|
||||
111`,
|
||||
63: `
|
||||
111
|
||||
111`
|
||||
},
|
||||
brewing_stand_slot_a_bit: {
|
||||
true: "有",
|
||||
false: "无"
|
||||
},
|
||||
brewing_stand_slot_b_bit: {
|
||||
true: "有",
|
||||
false: "无"
|
||||
},
|
||||
brewing_stand_slot_c_bit: {
|
||||
true: "有",
|
||||
false: "无"
|
||||
},
|
||||
button_pressed_bit: {
|
||||
true: "被",
|
||||
false: "未"
|
||||
},
|
||||
candles: {
|
||||
"0": "1",
|
||||
"1": "2",
|
||||
"2": "3",
|
||||
"3": "4"
|
||||
},
|
||||
cauldron_liquid: {
|
||||
water: "水",
|
||||
lava: "岩浆",
|
||||
powder_snow: "细雪"
|
||||
},
|
||||
cluster_count: {
|
||||
"0": "1",
|
||||
"1": "2",
|
||||
"2": "3",
|
||||
"3": "4",
|
||||
"4": "5",
|
||||
"5": "6",
|
||||
"6": "7",
|
||||
"7": "8",
|
||||
"8": "9",
|
||||
"9": "10"
|
||||
},
|
||||
color: {
|
||||
white: "白",
|
||||
orange: "橙",
|
||||
magenta: "品红",
|
||||
light_blue: "淡蓝",
|
||||
yellow: "黄",
|
||||
lime: "黄绿",
|
||||
pink: "粉",
|
||||
gray: "灰",
|
||||
silver: "淡灰",
|
||||
cyan: "青",
|
||||
purple: "紫",
|
||||
blue: "蓝",
|
||||
brown: "棕",
|
||||
green: "绿",
|
||||
red: "红",
|
||||
black: "黑"
|
||||
},
|
||||
color_bit: {
|
||||
true: "是",
|
||||
false: "不是"
|
||||
},
|
||||
conditional_bit: {
|
||||
true: "是",
|
||||
false: "不是"
|
||||
},
|
||||
coral_direction: {
|
||||
2: "北",
|
||||
3: "南",
|
||||
1: "东",
|
||||
0: "西"
|
||||
},
|
||||
coral_hang_type_bit: {
|
||||
true: "悬挂状态",
|
||||
false: "不悬挂"
|
||||
},
|
||||
covered_bit: {
|
||||
true: "含",
|
||||
false: "不含"
|
||||
},
|
||||
cracked_state: {
|
||||
no_cracks: "无裂纹",
|
||||
cracked: "有裂纹",
|
||||
max_cracked: "大裂纹"
|
||||
},
|
||||
crafting: {
|
||||
true: "正",
|
||||
false: "不"
|
||||
},
|
||||
damage: {
|
||||
undamaged: "无破损",
|
||||
slightly_damaged: "轻微破损",
|
||||
very_damaged: "严重破损",
|
||||
broken: "已损坏"
|
||||
},
|
||||
dead_bit: {
|
||||
true: "死亡",
|
||||
false: "鲜活"
|
||||
},
|
||||
direction: {
|
||||
0: "南",
|
||||
2: "北",
|
||||
3: "东",
|
||||
1: "西"
|
||||
},
|
||||
dirt_type: {
|
||||
normal: "泥土",
|
||||
coarse: "砂土"
|
||||
},
|
||||
disarmed_bit: {
|
||||
true: "能",
|
||||
false: "不能"
|
||||
},
|
||||
door_hinge_bit: {
|
||||
true: "东",
|
||||
false: "西"
|
||||
},
|
||||
drag_down: {
|
||||
true: "下",
|
||||
false: "上"
|
||||
},
|
||||
dripstone_thickness: {
|
||||
tip: "末梢",
|
||||
frustum: "末端",
|
||||
base: "基底",
|
||||
middle: "中部",
|
||||
merge: "柱形末梢(2对向尖端相连)"
|
||||
},
|
||||
end_portal_eye_bit: {
|
||||
true: "有",
|
||||
false: "无"
|
||||
},
|
||||
explode_bit: {
|
||||
true: "已",
|
||||
false: "未"
|
||||
},
|
||||
facing_direction: {
|
||||
"0": "下",
|
||||
"1": "上",
|
||||
"2": "北",
|
||||
"3": "南",
|
||||
"4": "西",
|
||||
"5": "东"
|
||||
},
|
||||
fill_level: {},
|
||||
ground_sign_direction: {
|
||||
0: "南",
|
||||
1: "南偏西22.5°",
|
||||
2: "西南",
|
||||
3: "西偏南22.5°",
|
||||
4: "西",
|
||||
5: "西偏北22.5°",
|
||||
6: "西北",
|
||||
7: "北偏西22.5°",
|
||||
8: "北",
|
||||
9: "北偏东22.5°",
|
||||
10: "东北",
|
||||
11: "东偏北22.5°",
|
||||
12: "东",
|
||||
13: "东偏南22.5°",
|
||||
14: "东南",
|
||||
15: "南偏东22.5°"
|
||||
},
|
||||
growth: {},
|
||||
hanging: {
|
||||
true: "悬挂状态",
|
||||
false: "非悬挂状态。"
|
||||
},
|
||||
head_piece_bit: {
|
||||
true: "床头",
|
||||
false: "床尾"
|
||||
},
|
||||
height: {},
|
||||
huge_mushroom_bits: {
|
||||
"0": "6面都是气孔",
|
||||
"1": "上西北面是蘑菇盖,其他面是气孔",
|
||||
"2": "上北面是蘑菇盖,其他面是气孔",
|
||||
"3": "上北东面是蘑菇盖,其他面是气孔",
|
||||
"4": "上西面是蘑菇盖,其他面是气孔",
|
||||
"5": "上面是蘑菇盖,其他面是气孔",
|
||||
"6": "上东面是蘑菇盖,其他面是气孔",
|
||||
"7": "上南西面是蘑菇盖,其他面是气孔",
|
||||
"8": "上南面是蘑菇盖,其他面是气孔",
|
||||
"9": "上东南面是蘑菇盖,其他面是气孔",
|
||||
"10": "4侧面都是蘑菇柄,上下面是气孔",
|
||||
"11": "未使用,6面都是气孔",
|
||||
"12": "未使用,6面都是气孔",
|
||||
"13": "未使用,6面都是气孔",
|
||||
"14": "6面都是蘑菇盖",
|
||||
"15": "6面都是蘑菇柄"
|
||||
},
|
||||
in_wall_bit: {
|
||||
true: "连接",
|
||||
false: "不连接"
|
||||
},
|
||||
infiniburn_bit: {
|
||||
true: "可",
|
||||
false: "不可"
|
||||
},
|
||||
item_frame_map_bit: {
|
||||
true: "有",
|
||||
false: "无"
|
||||
},
|
||||
item_frame_photo_bit: {
|
||||
true: "有",
|
||||
false: "无"
|
||||
},
|
||||
liquid_depth: {},
|
||||
lit: {
|
||||
true: "是",
|
||||
false: "未"
|
||||
},
|
||||
moisturized_amount: {},
|
||||
natural: {
|
||||
true: "被",
|
||||
false: "未"
|
||||
},
|
||||
no_drop_bit: {
|
||||
true: "有",
|
||||
false: "无"
|
||||
},
|
||||
occupied_bit: {
|
||||
true: "被",
|
||||
false: "未被"
|
||||
},
|
||||
ominous: {
|
||||
true: "是",
|
||||
false: "不是"
|
||||
},
|
||||
open_bit: {
|
||||
true: "打开",
|
||||
false: "关闭"
|
||||
},
|
||||
orientation: {
|
||||
0: "无",
|
||||
1: "北",
|
||||
2: "东",
|
||||
3: "北, 东",
|
||||
4: "南",
|
||||
5: "北, 南",
|
||||
6: "东, 南",
|
||||
7: "北, 东, 南",
|
||||
8: "西",
|
||||
9: "北, 西",
|
||||
10: "东, 西",
|
||||
11: "北, 东, 西",
|
||||
12: "南, 西",
|
||||
13: "北, 南, 西",
|
||||
14: "东, 南, 西",
|
||||
15: "北, 东, 南, 西"
|
||||
},
|
||||
output_lit_bit: {
|
||||
true: "被",
|
||||
false: "未"
|
||||
},
|
||||
output_subtract_bit: {
|
||||
true: "减",
|
||||
false: "加"
|
||||
},
|
||||
pale_moss_carpet_side_east: {
|
||||
none: "不",
|
||||
short: "较少",
|
||||
tall: "较多"
|
||||
},
|
||||
pale_moss_carpet_side_north: {
|
||||
none: "不",
|
||||
short: "较少",
|
||||
tall: "较多"
|
||||
},
|
||||
pale_moss_carpet_side_south: {
|
||||
none: "不",
|
||||
short: "较少",
|
||||
tall: "较多"
|
||||
},
|
||||
pale_moss_carpet_side_west: {
|
||||
none: "不",
|
||||
short: "较少",
|
||||
tall: "较多"
|
||||
},
|
||||
persistent_bit: {
|
||||
true: "有",
|
||||
false: "无"
|
||||
},
|
||||
portal_axis: {
|
||||
x: "南北朝向",
|
||||
z: "东西朝向"
|
||||
},
|
||||
powered_bit: {
|
||||
true: "被",
|
||||
false: "未"
|
||||
},
|
||||
rail_data_bit: {
|
||||
true: "有",
|
||||
false: "无"
|
||||
},
|
||||
rail_direction: {
|
||||
0: "南北朝向的平坦铁轨",
|
||||
1: "东西朝向的平坦铁轨",
|
||||
2: "朝向东的上坡铁轨",
|
||||
3: "朝向西的上坡铁轨",
|
||||
4: "朝向北的上坡铁轨",
|
||||
5: "朝向南的上坡铁轨",
|
||||
6: "东南方向的转弯铁轨",
|
||||
7: "西南方向的转弯铁轨",
|
||||
8: "西北方向的转弯铁轨",
|
||||
9: "东北方向的转弯铁轨"
|
||||
},
|
||||
redstone_signal: {},
|
||||
repeater_delay: {
|
||||
0: 1,
|
||||
1: 2,
|
||||
2: 3,
|
||||
3: 4
|
||||
},
|
||||
sea_grass_type: {
|
||||
default: "普通海草",
|
||||
double_top: "高海草上半部",
|
||||
double_bot: "高海草下半部"
|
||||
},
|
||||
sponge_type: {
|
||||
dry: "干",
|
||||
wet: "湿"
|
||||
},
|
||||
stability: {},
|
||||
stability_check: {
|
||||
true: "是",
|
||||
false: "否"
|
||||
},
|
||||
stripped_bit: {
|
||||
true: "被",
|
||||
false: "未"
|
||||
},
|
||||
structure_block_type: {
|
||||
data: "数据模式",
|
||||
save: "保存模式",
|
||||
load: "加载模式",
|
||||
corner: "角落模式",
|
||||
invalid: "无效模式",
|
||||
export: "3D输出模式"
|
||||
},
|
||||
suspended_bit: {
|
||||
true: "在",
|
||||
false: "不在"
|
||||
},
|
||||
tip: {
|
||||
true: "不是",
|
||||
false: "是"
|
||||
},
|
||||
toggle_bit: {
|
||||
true: "可",
|
||||
false: "不可"
|
||||
},
|
||||
top_slot_bit: {
|
||||
true: "上",
|
||||
false: "下"
|
||||
},
|
||||
torch_facing_direction: {
|
||||
unknown: "未知",
|
||||
west: "西",
|
||||
east: "东",
|
||||
north: "北",
|
||||
south: "南",
|
||||
top: "顶部"
|
||||
},
|
||||
trial_spawner_state: {
|
||||
"0": "未激活",
|
||||
"1": "待玩家加入试炼",
|
||||
"2": "可刷生物",
|
||||
"3": "试炼生物全被清除,待喷出奖励",
|
||||
"4": "喷出奖励",
|
||||
"5": "冷却阶段,无法激活"
|
||||
},
|
||||
triggered_bit: {
|
||||
true: "被",
|
||||
false: "未被"
|
||||
},
|
||||
turtle_egg_count: {
|
||||
one_egg: "1",
|
||||
two_egg: "2",
|
||||
three_egg: "3",
|
||||
four_egg: "4"
|
||||
},
|
||||
update_bit: {
|
||||
true: "需要",
|
||||
false: "不需要"
|
||||
},
|
||||
upper_block_bit: {
|
||||
true: "上",
|
||||
false: "下"
|
||||
},
|
||||
upside_down_bit: {
|
||||
true: "倒置",
|
||||
false: "正放"
|
||||
},
|
||||
vine_direction_bits: {
|
||||
0: "无",
|
||||
1: "北",
|
||||
2: "东",
|
||||
3: "北, 东",
|
||||
4: "南",
|
||||
5: "北, 南",
|
||||
6: "东, 南",
|
||||
7: "北, 东, 南",
|
||||
8: "西",
|
||||
9: "北, 西",
|
||||
10: "东, 西",
|
||||
11: "北, 东, 西",
|
||||
12: "南, 西",
|
||||
13: "北, 南, 西",
|
||||
14: "东, 南, 西",
|
||||
15: "北, 东, 南, 西"
|
||||
},
|
||||
wall_connection_type_east: {
|
||||
none: "不连接方块",
|
||||
short: "连接方块,较矮",
|
||||
tall: "连接方块,较高"
|
||||
},
|
||||
wall_connection_type_north: {
|
||||
none: "不连接方块",
|
||||
short: "连接方块,较矮",
|
||||
tall: "连接方块,较高"
|
||||
},
|
||||
wall_connection_type_south: {
|
||||
none: "不连接方块",
|
||||
short: "连接方块,较矮",
|
||||
tall: "连接方块,较高"
|
||||
},
|
||||
wall_connection_type_west: {
|
||||
none: "不连接方块",
|
||||
short: "连接方块,较矮",
|
||||
tall: "连接方块,较高"
|
||||
},
|
||||
wall_post_bit: {
|
||||
true: "有",
|
||||
false: "没有"
|
||||
},
|
||||
weirdo_direction: {
|
||||
0: "朝西",
|
||||
1: "朝东",
|
||||
2: "朝北",
|
||||
3: "朝南"
|
||||
}
|
||||
};
|
||||
|
||||
//dim zh
|
||||
export const dim = {
|
||||
overworld: "主世界",
|
||||
nether: "下界",
|
||||
the_end: "末地",
|
||||
"minecraft:overworld": "主世界",
|
||||
"minecraft:nether": "下界",
|
||||
"minecraft:the_end": "末地"
|
||||
}
|
||||
@@ -61,7 +61,7 @@ function handleWaterlogging(block, structureBlock) {
|
||||
function playBlockPlacementSound(player, block, structureBlock) {
|
||||
const blockId = structureBlock.type.id.replace('minecraft:', '');
|
||||
const blockData = blocks[blockId];
|
||||
let blockSound = blockData['sound'] || 'stone';
|
||||
let blockSound = blockData?.sound || 'stone';//fix error with missing sound
|
||||
let blockSoundId = block_sounds[blockSound].events.place?.sound
|
||||
|| block_sounds[block_sounds[blockSound].base].events.place?.sound;
|
||||
player.dimension.playSound(blockSoundId, block.location);
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
[
|
||||
"en_US"
|
||||
"en_US",
|
||||
"zh_CN"
|
||||
]
|
||||
@@ -0,0 +1,111 @@
|
||||
## 物品
|
||||
construct.menu.name=投影构筑菜单
|
||||
construct.easyplace.name=便捷放置器
|
||||
construct.materialgrabber.name=材料收集器
|
||||
|
||||
## 菜单
|
||||
construct.menu.open.closechat=§8请关闭聊天窗口以打开菜单
|
||||
construct.menu.open.timeout=§8菜单已超时
|
||||
construct.menu.submit=§2确定
|
||||
construct.menu.instance.button.unknown=未知
|
||||
construct.menu.instance.button.place=§a放置项目
|
||||
construct.menu.instance.button.enable=§a启用项目
|
||||
construct.menu.instance.button.disable=§c禁用项目
|
||||
construct.menu.instance.button.rename=重命名项目
|
||||
construct.menu.instance.button.delete=§c删除项目
|
||||
construct.menu.instance.button.nextLayer=增加图层
|
||||
construct.menu.instance.button.previousLayer=减少图层
|
||||
construct.menu.instance.button.move=移至此处
|
||||
construct.menu.instance.button.flexibleMove=自由移动项目
|
||||
construct.menu.instance.button.statistics=统计数据
|
||||
construct.menu.instance.button.settings=设置
|
||||
construct.menu.instance.button.materials=材料列表
|
||||
construct.menu.instance.unknownOption=§c未知选项: %s
|
||||
construct.menu.instance.nameEmpty=§c项目名称不能为空
|
||||
|
||||
construct.instance.flexibleMove.alreadyMoving=§c此项目已处于移动状态
|
||||
construct.instance.flexibleMove.start=§a正在移动"%s", 完成后使用"投影构筑菜单"物品确认 ## 插入字符串: 实例名称
|
||||
construct.instance.flexibleMove.finish=§a已将"%1"移动至%2 ## 插入字符串: 项目名称, 坐标
|
||||
construct.instance.rename.error=§c重命名项目时出错: %s
|
||||
construct.instance.validation.alreadyRunning=§c检验已在进行中, 请稍后
|
||||
construct.instance.validation.formfail=§c创建统计表单时出错
|
||||
construct.instance.menu.body=项目: §a%1\n§f结构: §2%2 ## 插入字符串: 项目名称, 结构名称
|
||||
construct.instance.menu.location=§7(%4 %1 %2 %3 ) ## 当项目已放置时添加到主体; 插入字符串: x, y, z 坐标, 维度(We change the dimension name to be inserted according to the client language)
|
||||
construct.instance.menu.rename=请输入项目的新名称:
|
||||
construct.instance.option.validation=方块检验
|
||||
construct.instance.option.validation.description=检验并且显示项目中缺失和摆放错误的方块
|
||||
construct.instance.option.layer=层级
|
||||
construct.instance.option.layer.description=更改活动的层级, 使用 0 表示所有层级
|
||||
construct.instance.materials.noinventory=§c无效的玩家背包
|
||||
construct.instance.materials.missing.header=§c背包中缺失的材料:
|
||||
construct.instance.materials.missing.button=显示缺失材料
|
||||
construct.instance.materials.layer=§7(第%s层) ## 当项目处于层级模式时添加到标题; 插入字符串: 图层编号
|
||||
construct.instance.materials.all.header=§a所有材料:
|
||||
construct.instance.materials.all.button=显示所有材料
|
||||
|
||||
construct.materials.grabber.menu.title= 材料收集器
|
||||
construct.materials.grabber.menu.success=§7成功选择"§2%s§f"为材料收集器的目标项目 ## 插入字符串: 项目名称
|
||||
construct.materials.grabber.menu.header=§7当前项目:
|
||||
construct.materials.grabber.menu.noinstance=§7无
|
||||
construct.materials.grabber.menu.selectinstance=§7请选择一个项目:
|
||||
|
||||
construct.structure.statistics.header=§f"§a%s§f"的统计信息: ## 插入字符串: 项目名称
|
||||
construct.structure.statistics.blocks=§7方块总数: §2%s ## 插入字符串: 结构中非空气方块的数量
|
||||
construct.structure.statistics.skipped=§c[!]本次分析跳过了%s个方块 ## 插入字符串: 分析跳过的方块数量
|
||||
construct.structure.statistics.correct=§7正确的方块: §a%s ## 插入字符串: 正确放置的方块数量
|
||||
construct.structure.statistics.stateincorrect=§7方块状态有误: §e%s ## 插入字符串: 状态错误的方块数量
|
||||
construct.structure.statistics.incorrect=§7方块位置错误: §c%s ## 插入字符串: 位置错误的方块数量
|
||||
construct.structure.statistics.missing=§7缺失方块: §3%s ## 插入字符串: 缺失的方块数量
|
||||
|
||||
## 结构方块信息显示
|
||||
construct.blockinfo.header=结构:
|
||||
construct.blockinfo.none=§7无
|
||||
construct.blockinfo.nosupply=§c[缺少材料] ## 目标方块在玩家背包中缺失
|
||||
construct.blockinfo.unknown=§7未知
|
||||
construct.blockinfo.waterlogged=§3是§7含水方块
|
||||
|
||||
construct.mainmenu.instance.exists=§c项目名称"%s"已被占用, 请尝试使用其他名称 ## 插入字符串: 项目名称
|
||||
construct.mainmenu.instance.notfound=§c未找到结构ID"%s"; 若你查找的是已放入structures文件夹的结构, 请重启存档后重试 ## 插入字符串: 结构名称
|
||||
construct.mainmenu.title=§l§2投影·构建 ## 这是addon的名称
|
||||
construct.mainmenu.selectinstance=请选择一个项目:
|
||||
construct.mainmenu.settings=构建设置
|
||||
construct.mainmenu.newinstance=创建新项目
|
||||
construct.mainmenu.newinstance.prompt=请输入新项目的名称:
|
||||
construct.mainmenu.newinstance.placeholder=示例_项目 ## 用户输入项目名称的文本框中的占位符文本
|
||||
construct.mainmenu.selectstructure.header=请选择一个结构:
|
||||
construct.mainmenu.selectstructure.other=其他
|
||||
construct.mainmenu.selectstructure.howto=如何添加/移除结构
|
||||
construct.mainmenu.selectstructure.other.prompt=请输入结构ID:
|
||||
construct.mainmenu.selectstructure.other.placeholder=示例_结构 ## 用户输入结构名称的文本框中的占位符文本
|
||||
construct.mainmenu.selectstructure.howto.add.header=§a如何添加结构:
|
||||
construct.mainmenu.selectstructure.howto.add.structureblock=§7-使用§f结构方块§7或§f/structure§7命令保存一个结构
|
||||
construct.mainmenu.selectstructure.howto.add.or=§7§l或§r
|
||||
construct.mainmenu.selectstructure.howto.add.mcstructure=§7-将§f.mcstructure§7文件添加到此插件的§fstructures文件夹§7; 选择结构时, 选择§f其他§7选项, 然后使用文件名(不带'.mcstructure')作为§f结构ID§7; 使用后, 它会被添加到结构列表中
|
||||
construct.mainmenu.selectstructure.howto.remove.header=§c如何移除结构:
|
||||
construct.mainmenu.selectstructure.howto.remove.body=§7-使用§f/structure delete§7命令从存档中移除结构
|
||||
|
||||
## 命令
|
||||
|
||||
construct.commands.construct=打开投影构筑菜单
|
||||
construct.commands.item=获得投影构筑菜单物品,可以使用它打开投影构筑菜单
|
||||
construct.commands.item.denyorigin=此命令只能由玩家使用
|
||||
construct.commands.item.fail=§c给予投影构筑菜单物品时发送错误
|
||||
construct.commands.item.success=§a您获得了投影构筑菜单物品, 使用它以打开投影构筑菜单
|
||||
|
||||
## 选项
|
||||
|
||||
construct.option.enabled=现已启用!
|
||||
construct.option.disabled=现已禁用
|
||||
construct.option.easyplace.name=便捷放置
|
||||
construct.option.easyplace.description=帮助放置正确的方块
|
||||
construct.option.easyplace.howto=把"便捷放置器"物品持于副手, 在项目中放置方块时自动修正方块
|
||||
construct.option.easyplace.actionprevented=§c操作被便捷放置功能阻止
|
||||
construct.option.fasteasyplace.name=快速放置
|
||||
construct.option.fasteasyplace.description=使用即可放置建筑对应的所需方块
|
||||
construct.option.fasteasyplace.howto=主手持"便捷放置器"物品, 对准建筑中缺失的方块长按(右键)即可补放
|
||||
construct.option.materialgrabber.name=材料收集器
|
||||
construct.option.materialgrabber.description=从箱子等容器中获取建筑所需物品
|
||||
construct.option.materialgrabber.howto=使用"材料收集器"物品与箱子等容器交互, 即可从中获取建筑所需物品
|
||||
construct.option.materialgrabber.grabbed.zero=§7已收集 0 个物品
|
||||
construct.option.materialgrabber.grabbed.one=§a已收集 1 个物品
|
||||
construct.option.materialgrabber.grabbed.many=§a已收集 %s 个物品 ## 插入字符串: 收集给玩家的物品数
|
||||
Reference in New Issue
Block a user