Skip to content

Commit

Permalink
楽器違いの修正をお願いします(v2.0.2) #15 を修正\npianoが大文字になっていない問題を修正/n楽器表示のBetaを解除
Browse files Browse the repository at this point in the history
  • Loading branch information
oasoobi committed Nov 5, 2024
1 parent fa2c083 commit 8b7e399
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
11 changes: 8 additions & 3 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"format_version": 2,
"header": {
"name": "Note Block+ v2.0.2",
"name": "Note Block+ v2.0.3",
"description": "音ブロックの音階を表示するアドオン。 \nTwitter:@oasoby",
"min_engine_version": [
1,
Expand All @@ -12,7 +12,7 @@
"version": [
2,
0,
2
3
]
},
"modules": [
Expand Down Expand Up @@ -46,5 +46,10 @@
"module_name": "@minecraft/server-ui",
"version": "1.4.0-beta"
}
]
],
"metadata": {
"authors": ["oasobi"],
"url": "https://go.oasoobi.net/NoteBlockPlus",
"product_type": "addon"
}
}
13 changes: 7 additions & 6 deletions scripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,8 @@ const instruments = {
"sandstone": "bass_drum", //砂岩系
"_ore": "bass_drum", //鉱石系
"deepslate": "bass_drum", //深層岩系
"clay": "bass_drum",
"hardened_clay": "bass_drum", //通常のテラコッタ
"clay": "flute", //粘土
"raw_": "bass_drum", //原石ブロック系
"brick": "bass_drum", //レンガ系
"prismarine": "bass_drum", //プリズマリン系
Expand Down Expand Up @@ -288,7 +289,7 @@ world.beforeEvents.playerInteractWithBlock.subscribe(e => {
}
}
if (!instrument) { //楽器が見つからなかったときにピアノに
instrument = lang == ENGLISH ? "piano" : "ピアノ"
instrument = lang == ENGLISH ? "Piano" : "ピアノ"
}
resultMsg += lang == ENGLISH ? " instrument: " + instrument : " 楽器: " + instrument;
}
Expand All @@ -312,7 +313,7 @@ system.afterEvents.scriptEventReceive.subscribe(e => {
.title("設定")
.dropdown("\n言語", ["English", "日本語"], sourceEntity.getDynamicProperty("language"))
.dropdown("音階の表示形式", ["イタリア式(ドレミ)", "国際式(C,C#,D)"], sourceEntity.getDynamicProperty("scale_notation"))
.toggle("楽器を表示する (Beta)", sourceEntity.getDynamicProperty("is_display_instrument"))
.toggle("楽器を表示する", sourceEntity.getDynamicProperty("is_display_instrument"))
.toggle("クリック数を表示する", sourceEntity.getDynamicProperty("is_display_click_count"))
.toggle("デフォルトに戻す")
.submitButton("変更を適用")
Expand Down Expand Up @@ -342,7 +343,7 @@ system.afterEvents.scriptEventReceive.subscribe(e => {
.title("Settings")
.dropdown("\nLanguage", ["English", "日本語"], sourceEntity.getDynamicProperty("language"))
.dropdown("scale notation", ["solfege(do,re,mi)", "international(C,C#,D)"], sourceEntity.getDynamicProperty("scale_notation"))
.toggle("Show instruments (Beta)", sourceEntity.getDynamicProperty("is_display_instrument"))
.toggle("Show instruments", sourceEntity.getDynamicProperty("is_display_instrument"))
.toggle("Show number of clicks", sourceEntity.getDynamicProperty("is_display_click_count"))
.toggle("Restore settings")
.submitButton("Apply")
Expand Down Expand Up @@ -380,9 +381,9 @@ system.afterEvents.scriptEventReceive.subscribe(e => {
})
} else if (id == "note:version") {
if (sourceEntity.getDynamicProperty("language") == 1) {
sourceEntity.sendMessage("§eNoteBlock+のバージョンは 2.0.2 です。");
sourceEntity.sendMessage("§eNoteBlock+のバージョンは 2.0.3 です。");
} else {
sourceEntity.sendMessage("§eNoteBlock+ is at version 2.0.2.");
sourceEntity.sendMessage("§eNoteBlock+ is at version 2.0.3.");
}
}
})
Expand Down

0 comments on commit 8b7e399

Please sign in to comment.