Sound Registry Refactor

- Improved registration and datagen for custom and combined sounds
This commit is contained in:
simibubi 2021-04-14 23:40:42 +02:00
parent e92e9a7139
commit 13f0823ccb
31 changed files with 541 additions and 319 deletions

View file

@ -407,19 +407,19 @@ a3a11524cd3515fc01d905767b4b7ea782adaf03 assets/create/blockstates/yellow_seat.j
7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json 7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json
b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json
768a724d6c921cb92790364cf7a692fe8742a885 assets/create/lang/en_ud.json 768a724d6c921cb92790364cf7a692fe8742a885 assets/create/lang/en_ud.json
3060ba1eee371d642e0590c3d6e99c2be397c7f5 assets/create/lang/en_us.json 5f5c7ddeea65263977262ae9eef8284a27b342ed assets/create/lang/en_us.json
e3b0bc11cc7b208d248ad339caeebf91aa51a5ef assets/create/lang/unfinished/de_de.json 784fce1f5ae7d571449e8c2645aedca2ae54017d assets/create/lang/unfinished/de_de.json
3b3e7b694b75ab50acfe911935f80da0b3234010 assets/create/lang/unfinished/es_es.json 72dc91f3968daa908451a91514573fa081ba1011 assets/create/lang/unfinished/es_es.json
20d7a808b485b9140bce1c4c483c7fc2218a0611 assets/create/lang/unfinished/es_mx.json e7f818f6250f6a9bcb68d29e3c4a42f4d97d191f assets/create/lang/unfinished/es_mx.json
1e9f530d590556eac0c4d08750d3ebbd83b504f2 assets/create/lang/unfinished/fr_fr.json a3c830d49cb7fbc3942c316859ffe46304dcbb07 assets/create/lang/unfinished/fr_fr.json
a604e3bf8d1b28d4f77cd4fb5b63f5d58988a507 assets/create/lang/unfinished/it_it.json 8263ba5d778e8d8a3255319ab08cee080930345d assets/create/lang/unfinished/it_it.json
371ef25dcdbd268d1f96d19ccd56413c93425ced assets/create/lang/unfinished/ja_jp.json 76d31adf175b248b9a4b63d7b02005155a0e961f assets/create/lang/unfinished/ja_jp.json
7206826ff926de6a04145a17928c00ea28762404 assets/create/lang/unfinished/ko_kr.json 78fc9b2f5695019465930da7b3d20b519d53d128 assets/create/lang/unfinished/ko_kr.json
411d5197f3b5eb75ef7033685fb24df1c02a959f assets/create/lang/unfinished/nl_nl.json c3d24b55cf0f6a4a3ff673e3a07872f055a8747a assets/create/lang/unfinished/nl_nl.json
59756083e6d04f649e860fed9b13657fa12f919b assets/create/lang/unfinished/pt_br.json dee268b4a8c1aace69527b8064b40590a8c63165 assets/create/lang/unfinished/pt_br.json
efae854418421a1ce80494d1da800e778f17afe8 assets/create/lang/unfinished/ru_ru.json 651af36f14adb7851c1a78551bd6631847893b8c assets/create/lang/unfinished/ru_ru.json
58fb522692bf7b15d8fb851f0a807fab04620d45 assets/create/lang/unfinished/zh_cn.json 67dde4056c63b166a48bd9b6dec95ef42d28f826 assets/create/lang/unfinished/zh_cn.json
1e2f8564c19f2fe35ce91e65831b72ab44bedea1 assets/create/lang/unfinished/zh_tw.json 1f3e13923f4d9285b14d494576a10589fe2f3c6d assets/create/lang/unfinished/zh_tw.json
487a511a01b2a4531fb672f917922312db78f958 assets/create/models/block/acacia_window.json 487a511a01b2a4531fb672f917922312db78f958 assets/create/models/block/acacia_window.json
b48060cba1a382f373a05bf0039054053eccf076 assets/create/models/block/acacia_window_pane_noside.json b48060cba1a382f373a05bf0039054053eccf076 assets/create/models/block/acacia_window_pane_noside.json
3066db1bf03cffa1a9c7fbacf47ae586632f4eb3 assets/create/models/block/acacia_window_pane_noside_alt.json 3066db1bf03cffa1a9c7fbacf47ae586632f4eb3 assets/create/models/block/acacia_window_pane_noside_alt.json
@ -1648,7 +1648,7 @@ d080b1b25e5bc8baf5aee68691b08c7f12ece3b0 assets/create/models/item/windmill_bear
866fbb0ce2878a73e0440d1caf6534c8bd7c384f assets/create/models/item/zinc_ingot.json 866fbb0ce2878a73e0440d1caf6534c8bd7c384f assets/create/models/item/zinc_ingot.json
a80fb25a0b655e76be986b5b49fcb0f03461a1ab assets/create/models/item/zinc_nugget.json a80fb25a0b655e76be986b5b49fcb0f03461a1ab assets/create/models/item/zinc_nugget.json
b1689617190c05ef34bd18456b0c7ae09bb3210f assets/create/models/item/zinc_ore.json b1689617190c05ef34bd18456b0c7ae09bb3210f assets/create/models/item/zinc_ore.json
e76041b7ae829fdd7dc0524f6ca4d2f89fca51bb assets/create/sounds.json 56fa207f8d0d76e0435252d13dbe4b967c61aa89 assets/create/sounds.json
5d0cc4c0255dc241e61c173b31ddca70c88d08e4 data/create/advancements/aesthetics.json 5d0cc4c0255dc241e61c173b31ddca70c88d08e4 data/create/advancements/aesthetics.json
187921fa131b06721bfaf63f2623a28c141aae9a data/create/advancements/andesite_alloy.json 187921fa131b06721bfaf63f2623a28c141aae9a data/create/advancements/andesite_alloy.json
0ea2db7173b5be28b289ea7c9a6a0cf5805c60c7 data/create/advancements/andesite_casing.json 0ea2db7173b5be28b289ea7c9a6a0cf5805c60c7 data/create/advancements/andesite_casing.json

View file

@ -1147,16 +1147,18 @@
"create.command.killTPSCommand.status.usage.1": "[Create]: use /killtps start <tickTime> to artificially slow down the server tick", "create.command.killTPSCommand.status.usage.1": "[Create]: use /killtps start <tickTime> to artificially slow down the server tick",
"create.command.killTPSCommand.argument.tickTime": "tickTime", "create.command.killTPSCommand.argument.tickTime": "tickTime",
"create.subtitle.schematicannon_launch_block": "Schematicannon shoots",
"create.subtitle.schematicannon_finish": "Schematicannon finishes", "_": "->------------------------] Subtitles [------------------------<-",
"create.subtitle.schematicannon_launch_block": "Schematicannon fires",
"create.subtitle.schematicannon_finish": "Schematicannon dings",
"create.subtitle.slime_added": "Slime squishes", "create.subtitle.slime_added": "Slime squishes",
"create.subtitle.mechanical_press_activation": "Mechanical Press activates", "create.subtitle.mechanical_press_activation_belt": "Mechanical Press bonks",
"create.subtitle.mechanical_press_item_break": "Metal clanks", "create.subtitle.mechanical_press_activation": "Mechanical Press clangs",
"create.subtitle.blockzapper_place": "Blocks zap into place", "create.subtitle.blockzapper_deny": "Declining boop",
"create.subtitle.blockzapper_confirm": "Affirmative Ding", "create.subtitle.blockzapper_confirm": "Affirmative ding",
"create.subtitle.blockzapper_deny": "Declining Boop", "create.subtitle.blockzapper_place": "Blockzapper zaps",
"create.subtitle.block_funnel_eat": "Funnel CHOMPS", "create.subtitle.blaze_munch": "Blaze Burner munches",
"create.subtitle.blaze_munch": "Blaze munches happily",
"_": "->------------------------] Item Descriptions [------------------------<-", "_": "->------------------------] Item Descriptions [------------------------<-",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 912", "_": "Missing Localizations: 913",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -1148,15 +1148,17 @@
"create.command.killTPSCommand.status.usage.1": "[Create]: Benutze /killtps start <tickTime> um den Server Tick künstlich zu verlangsamen", "create.command.killTPSCommand.status.usage.1": "[Create]: Benutze /killtps start <tickTime> um den Server Tick künstlich zu verlangsamen",
"create.command.killTPSCommand.argument.tickTime": "tickTime", "create.command.killTPSCommand.argument.tickTime": "tickTime",
"_": "->------------------------] Subtitles [------------------------<-",
"create.subtitle.schematicannon_launch_block": "Bauplankanone schießt", "create.subtitle.schematicannon_launch_block": "Bauplankanone schießt",
"create.subtitle.schematicannon_finish": "Bauplankanone endet", "create.subtitle.schematicannon_finish": "Bauplankanone endet",
"create.subtitle.slime_added": "Schleim matscht", "create.subtitle.slime_added": "Schleim matscht",
"create.subtitle.mechanical_press_activation_belt": "UNLOCALIZED: Mechanical Press bonks",
"create.subtitle.mechanical_press_activation": "Mechanische Presse wird aktiviert", "create.subtitle.mechanical_press_activation": "Mechanische Presse wird aktiviert",
"create.subtitle.mechanical_press_item_break": "Metall klonkt",
"create.subtitle.blockzapper_place": "Blöcke zappen an Ort und Stelle",
"create.subtitle.blockzapper_confirm": "Bestätigendes Ding",
"create.subtitle.blockzapper_deny": "Ablehnendes Boop", "create.subtitle.blockzapper_deny": "Ablehnendes Boop",
"create.subtitle.block_funnel_eat": "Trichter MAMPFT", "create.subtitle.blockzapper_confirm": "Bestätigendes Ding",
"create.subtitle.blockzapper_place": "Blöcke zappen an Ort und Stelle",
"create.subtitle.blaze_munch": "Lohe kaut glücklich", "create.subtitle.blaze_munch": "Lohe kaut glücklich",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 605", "_": "Missing Localizations: 606",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -1148,15 +1148,17 @@
"create.command.killTPSCommand.status.usage.1": "[Create]: usar /killtps start <tickTime> para ralentizar artificialmente el tick del servidor", "create.command.killTPSCommand.status.usage.1": "[Create]: usar /killtps start <tickTime> para ralentizar artificialmente el tick del servidor",
"create.command.killTPSCommand.argument.tickTime": "tickTime", "create.command.killTPSCommand.argument.tickTime": "tickTime",
"_": "->------------------------] Subtitles [------------------------<-",
"create.subtitle.schematicannon_launch_block": "Disparos de Schematicannon", "create.subtitle.schematicannon_launch_block": "Disparos de Schematicannon",
"create.subtitle.schematicannon_finish": "Acabados de Schematicannon", "create.subtitle.schematicannon_finish": "Acabados de Schematicannon",
"create.subtitle.slime_added": "Slime aplastado", "create.subtitle.slime_added": "Slime aplastado",
"create.subtitle.mechanical_press_activation_belt": "UNLOCALIZED: Mechanical Press bonks",
"create.subtitle.mechanical_press_activation": "La Prensa Mecánica se activa", "create.subtitle.mechanical_press_activation": "La Prensa Mecánica se activa",
"create.subtitle.mechanical_press_item_break": "Clanks de metal",
"create.subtitle.blockzapper_place": "Los bloques se colocan en su sitio",
"create.subtitle.blockzapper_confirm": "Ding afirmativo",
"create.subtitle.blockzapper_deny": "Boop declinante", "create.subtitle.blockzapper_deny": "Boop declinante",
"create.subtitle.block_funnel_eat": "CHOMPS del embudo", "create.subtitle.blockzapper_confirm": "Ding afirmativo",
"create.subtitle.blockzapper_place": "Los bloques se colocan en su sitio",
"create.subtitle.blaze_munch": "Blaze mastica felizmente", "create.subtitle.blaze_munch": "Blaze mastica felizmente",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 1265", "_": "Missing Localizations: 1264",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -1148,16 +1148,18 @@
"create.command.killTPSCommand.status.usage.1": "UNLOCALIZED: [Create]: use /killtps start <tickTime> to artificially slow down the server tick", "create.command.killTPSCommand.status.usage.1": "UNLOCALIZED: [Create]: use /killtps start <tickTime> to artificially slow down the server tick",
"create.command.killTPSCommand.argument.tickTime": "UNLOCALIZED: tickTime", "create.command.killTPSCommand.argument.tickTime": "UNLOCALIZED: tickTime",
"create.subtitle.schematicannon_launch_block": "UNLOCALIZED: Schematicannon shoots",
"create.subtitle.schematicannon_finish": "UNLOCALIZED: Schematicannon finishes", "_": "->------------------------] Subtitles [------------------------<-",
"create.subtitle.schematicannon_launch_block": "UNLOCALIZED: Schematicannon fires",
"create.subtitle.schematicannon_finish": "UNLOCALIZED: Schematicannon dings",
"create.subtitle.slime_added": "UNLOCALIZED: Slime squishes", "create.subtitle.slime_added": "UNLOCALIZED: Slime squishes",
"create.subtitle.mechanical_press_activation": "UNLOCALIZED: Mechanical Press activates", "create.subtitle.mechanical_press_activation_belt": "UNLOCALIZED: Mechanical Press bonks",
"create.subtitle.mechanical_press_item_break": "UNLOCALIZED: Metal clanks", "create.subtitle.mechanical_press_activation": "UNLOCALIZED: Mechanical Press clangs",
"create.subtitle.blockzapper_place": "UNLOCALIZED: Blocks zap into place", "create.subtitle.blockzapper_deny": "UNLOCALIZED: Declining boop",
"create.subtitle.blockzapper_confirm": "UNLOCALIZED: Affirmative Ding", "create.subtitle.blockzapper_confirm": "UNLOCALIZED: Affirmative ding",
"create.subtitle.blockzapper_deny": "UNLOCALIZED: Declining Boop", "create.subtitle.blockzapper_place": "UNLOCALIZED: Blockzapper zaps",
"create.subtitle.block_funnel_eat": "UNLOCALIZED: Funnel CHOMPS", "create.subtitle.blaze_munch": "UNLOCALIZED: Blaze Burner munches",
"create.subtitle.blaze_munch": "UNLOCALIZED: Blaze munches happily",
"_": "->------------------------] Item Descriptions [------------------------<-", "_": "->------------------------] Item Descriptions [------------------------<-",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 1162", "_": "Missing Localizations: 1163",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -1148,16 +1148,18 @@
"create.command.killTPSCommand.status.usage.1": "[Create]: use /killtps start <tickTime> to artificially slow down the server tick", "create.command.killTPSCommand.status.usage.1": "[Create]: use /killtps start <tickTime> to artificially slow down the server tick",
"create.command.killTPSCommand.argument.tickTime": "tickTime", "create.command.killTPSCommand.argument.tickTime": "tickTime",
"_": "->------------------------] Subtitles [------------------------<-",
"create.subtitle.schematicannon_launch_block": "Tir de schémacanon", "create.subtitle.schematicannon_launch_block": "Tir de schémacanon",
"create.subtitle.schematicannon_finish": "Fin de schémacanon", "create.subtitle.schematicannon_finish": "Fin de schémacanon",
"create.subtitle.slime_added": "Bruit de slime", "create.subtitle.slime_added": "Bruit de slime",
"create.subtitle.mechanical_press_activation_belt": "UNLOCALIZED: Mechanical Press bonks",
"create.subtitle.mechanical_press_activation": "Activation de la presse mechanique", "create.subtitle.mechanical_press_activation": "Activation de la presse mechanique",
"create.subtitle.mechanical_press_item_break": "Cliquetis de métal",
"create.subtitle.blockzapper_place": "Blocs se zappant en place",
"create.subtitle.blockzapper_confirm": "Ding d'affirmation",
"create.subtitle.blockzapper_deny": "Boop de déclin", "create.subtitle.blockzapper_deny": "Boop de déclin",
"create.subtitle.block_funnel_eat": "Croc d'entonoir", "create.subtitle.blockzapper_confirm": "Ding d'affirmation",
"create.subtitle.blaze_munch": "UNLOCALIZED: Blaze munches happily", "create.subtitle.blockzapper_place": "Blocs se zappant en place",
"create.subtitle.blaze_munch": "UNLOCALIZED: Blaze Burner munches",
"_": "->------------------------] Item Descriptions [------------------------<-", "_": "->------------------------] Item Descriptions [------------------------<-",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 622", "_": "Missing Localizations: 623",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -1148,15 +1148,17 @@
"create.command.killTPSCommand.status.usage.1": "[Create]: usa /killtps avvia <tickTime> per rallentare artificialmente il tick del server", "create.command.killTPSCommand.status.usage.1": "[Create]: usa /killtps avvia <tickTime> per rallentare artificialmente il tick del server",
"create.command.killTPSCommand.argument.tickTime": "tickTime", "create.command.killTPSCommand.argument.tickTime": "tickTime",
"_": "->------------------------] Subtitles [------------------------<-",
"create.subtitle.schematicannon_launch_block": "Tiri del cannoneschematico", "create.subtitle.schematicannon_launch_block": "Tiri del cannoneschematico",
"create.subtitle.schematicannon_finish": "Finiture cannoneschematico", "create.subtitle.schematicannon_finish": "Finiture cannoneschematico",
"create.subtitle.slime_added": "Slime schiacciato", "create.subtitle.slime_added": "Slime schiacciato",
"create.subtitle.mechanical_press_activation_belt": "UNLOCALIZED: Mechanical Press bonks",
"create.subtitle.mechanical_press_activation": "Pressa meccanica attiva", "create.subtitle.mechanical_press_activation": "Pressa meccanica attiva",
"create.subtitle.mechanical_press_item_break": "Rumori metallici",
"create.subtitle.blockzapper_place": "Posiziona blocchi nello spazio",
"create.subtitle.blockzapper_confirm": "Ding affermativo",
"create.subtitle.blockzapper_deny": "Boop in calo", "create.subtitle.blockzapper_deny": "Boop in calo",
"create.subtitle.block_funnel_eat": "CHOMPS a imbuto", "create.subtitle.blockzapper_confirm": "Ding affermativo",
"create.subtitle.blockzapper_place": "Posiziona blocchi nello spazio",
"create.subtitle.blaze_munch": "Il blaze lo gusta felicemente", "create.subtitle.blaze_munch": "Il blaze lo gusta felicemente",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 604", "_": "Missing Localizations: 605",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -1148,15 +1148,17 @@
"create.command.killTPSCommand.status.usage.1": "[Create]: /killtps start <tickTime>を使用して、サーバーのティックを意図的に遅くします", "create.command.killTPSCommand.status.usage.1": "[Create]: /killtps start <tickTime>を使用して、サーバーのティックを意図的に遅くします",
"create.command.killTPSCommand.argument.tickTime": "tickTime", "create.command.killTPSCommand.argument.tickTime": "tickTime",
"_": "->------------------------] Subtitles [------------------------<-",
"create.subtitle.schematicannon_launch_block": "概略図砲が発射する", "create.subtitle.schematicannon_launch_block": "概略図砲が発射する",
"create.subtitle.schematicannon_finish": "概略図砲が作業を終える", "create.subtitle.schematicannon_finish": "概略図砲が作業を終える",
"create.subtitle.slime_added": "スライムがぐしゃっとつぶれる", "create.subtitle.slime_added": "スライムがぐしゃっとつぶれる",
"create.subtitle.mechanical_press_activation_belt": "UNLOCALIZED: Mechanical Press bonks",
"create.subtitle.mechanical_press_activation": "メカニカルプレスが作動する", "create.subtitle.mechanical_press_activation": "メカニカルプレスが作動する",
"create.subtitle.mechanical_press_item_break": "金属がガチャンと鳴る",
"create.subtitle.blockzapper_place": "ブロックを発射して設置する",
"create.subtitle.blockzapper_confirm": "成功音",
"create.subtitle.blockzapper_deny": "失敗音", "create.subtitle.blockzapper_deny": "失敗音",
"create.subtitle.block_funnel_eat": "ファンネルが大口で食べる", "create.subtitle.blockzapper_confirm": "成功音",
"create.subtitle.blockzapper_place": "ブロックを発射して設置する",
"create.subtitle.blaze_munch": "ブレイズの咀嚼音", "create.subtitle.blaze_munch": "ブレイズの咀嚼音",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 675", "_": "Missing Localizations: 676",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -1148,15 +1148,17 @@
"create.command.killTPSCommand.status.usage.1": "[Create]: use /killtps start <tickTime> to artificially slow down the server tick", "create.command.killTPSCommand.status.usage.1": "[Create]: use /killtps start <tickTime> to artificially slow down the server tick",
"create.command.killTPSCommand.argument.tickTime": "tickTime", "create.command.killTPSCommand.argument.tickTime": "tickTime",
"_": "->------------------------] Subtitles [------------------------<-",
"create.subtitle.schematicannon_launch_block": "청사진 대포가 발포함", "create.subtitle.schematicannon_launch_block": "청사진 대포가 발포함",
"create.subtitle.schematicannon_finish": "청사진 대포가 끝남", "create.subtitle.schematicannon_finish": "청사진 대포가 끝남",
"create.subtitle.slime_added": "슬라임이 철퍽거림", "create.subtitle.slime_added": "슬라임이 철퍽거림",
"create.subtitle.mechanical_press_activation_belt": "UNLOCALIZED: Mechanical Press bonks",
"create.subtitle.mechanical_press_activation": "압착기가 가동됨", "create.subtitle.mechanical_press_activation": "압착기가 가동됨",
"create.subtitle.mechanical_press_item_break": "금속이 부딫힘",
"create.subtitle.blockzapper_place": "블록이 순간이동됨",
"create.subtitle.blockzapper_confirm": "확인 효과음",
"create.subtitle.blockzapper_deny": "취소 효과음", "create.subtitle.blockzapper_deny": "취소 효과음",
"create.subtitle.block_funnel_eat": "깔때기가 흡입함", "create.subtitle.blockzapper_confirm": "확인 효과음",
"create.subtitle.blockzapper_place": "블록이 순간이동됨",
"create.subtitle.blaze_munch": "블레이즈가 행복하게 섭취함", "create.subtitle.blaze_munch": "블레이즈가 행복하게 섭취함",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 1554", "_": "Missing Localizations: 1553",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -1148,16 +1148,18 @@
"create.command.killTPSCommand.status.usage.1": "UNLOCALIZED: [Create]: use /killtps start <tickTime> to artificially slow down the server tick", "create.command.killTPSCommand.status.usage.1": "UNLOCALIZED: [Create]: use /killtps start <tickTime> to artificially slow down the server tick",
"create.command.killTPSCommand.argument.tickTime": "UNLOCALIZED: tickTime", "create.command.killTPSCommand.argument.tickTime": "UNLOCALIZED: tickTime",
"create.subtitle.schematicannon_launch_block": "UNLOCALIZED: Schematicannon shoots",
"create.subtitle.schematicannon_finish": "UNLOCALIZED: Schematicannon finishes", "_": "->------------------------] Subtitles [------------------------<-",
"create.subtitle.schematicannon_launch_block": "UNLOCALIZED: Schematicannon fires",
"create.subtitle.schematicannon_finish": "UNLOCALIZED: Schematicannon dings",
"create.subtitle.slime_added": "UNLOCALIZED: Slime squishes", "create.subtitle.slime_added": "UNLOCALIZED: Slime squishes",
"create.subtitle.mechanical_press_activation": "UNLOCALIZED: Mechanical Press activates", "create.subtitle.mechanical_press_activation_belt": "UNLOCALIZED: Mechanical Press bonks",
"create.subtitle.mechanical_press_item_break": "UNLOCALIZED: Metal clanks", "create.subtitle.mechanical_press_activation": "UNLOCALIZED: Mechanical Press clangs",
"create.subtitle.blockzapper_place": "UNLOCALIZED: Blocks zap into place", "create.subtitle.blockzapper_deny": "UNLOCALIZED: Declining boop",
"create.subtitle.blockzapper_confirm": "UNLOCALIZED: Affirmative Ding", "create.subtitle.blockzapper_confirm": "UNLOCALIZED: Affirmative ding",
"create.subtitle.blockzapper_deny": "UNLOCALIZED: Declining Boop", "create.subtitle.blockzapper_place": "UNLOCALIZED: Blockzapper zaps",
"create.subtitle.block_funnel_eat": "UNLOCALIZED: Funnel CHOMPS", "create.subtitle.blaze_munch": "UNLOCALIZED: Blaze Burner munches",
"create.subtitle.blaze_munch": "UNLOCALIZED: Blaze munches happily",
"_": "->------------------------] Item Descriptions [------------------------<-", "_": "->------------------------] Item Descriptions [------------------------<-",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 1608", "_": "Missing Localizations: 1607",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -1148,16 +1148,18 @@
"create.command.killTPSCommand.status.usage.1": "UNLOCALIZED: [Create]: use /killtps start <tickTime> to artificially slow down the server tick", "create.command.killTPSCommand.status.usage.1": "UNLOCALIZED: [Create]: use /killtps start <tickTime> to artificially slow down the server tick",
"create.command.killTPSCommand.argument.tickTime": "UNLOCALIZED: tickTime", "create.command.killTPSCommand.argument.tickTime": "UNLOCALIZED: tickTime",
"create.subtitle.schematicannon_launch_block": "UNLOCALIZED: Schematicannon shoots",
"create.subtitle.schematicannon_finish": "UNLOCALIZED: Schematicannon finishes", "_": "->------------------------] Subtitles [------------------------<-",
"create.subtitle.schematicannon_launch_block": "UNLOCALIZED: Schematicannon fires",
"create.subtitle.schematicannon_finish": "UNLOCALIZED: Schematicannon dings",
"create.subtitle.slime_added": "UNLOCALIZED: Slime squishes", "create.subtitle.slime_added": "UNLOCALIZED: Slime squishes",
"create.subtitle.mechanical_press_activation": "UNLOCALIZED: Mechanical Press activates", "create.subtitle.mechanical_press_activation_belt": "UNLOCALIZED: Mechanical Press bonks",
"create.subtitle.mechanical_press_item_break": "UNLOCALIZED: Metal clanks", "create.subtitle.mechanical_press_activation": "UNLOCALIZED: Mechanical Press clangs",
"create.subtitle.blockzapper_place": "UNLOCALIZED: Blocks zap into place", "create.subtitle.blockzapper_deny": "UNLOCALIZED: Declining boop",
"create.subtitle.blockzapper_confirm": "UNLOCALIZED: Affirmative Ding", "create.subtitle.blockzapper_confirm": "UNLOCALIZED: Affirmative ding",
"create.subtitle.blockzapper_deny": "UNLOCALIZED: Declining Boop", "create.subtitle.blockzapper_place": "UNLOCALIZED: Blockzapper zaps",
"create.subtitle.block_funnel_eat": "UNLOCALIZED: Funnel CHOMPS", "create.subtitle.blaze_munch": "UNLOCALIZED: Blaze Burner munches",
"create.subtitle.blaze_munch": "UNLOCALIZED: Blaze munches happily",
"_": "->------------------------] Item Descriptions [------------------------<-", "_": "->------------------------] Item Descriptions [------------------------<-",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 519", "_": "Missing Localizations: 520",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -1148,15 +1148,17 @@
"create.command.killTPSCommand.status.usage.1": "[Create]: используйте /killtps start <Время тика>, чтобы искусственно замедлить тик сервера", "create.command.killTPSCommand.status.usage.1": "[Create]: используйте /killtps start <Время тика>, чтобы искусственно замедлить тик сервера",
"create.command.killTPSCommand.argument.tickTime": "Время тика", "create.command.killTPSCommand.argument.tickTime": "Время тика",
"_": "->------------------------] Subtitles [------------------------<-",
"create.subtitle.schematicannon_launch_block": "Выстрелы схематичной пушки", "create.subtitle.schematicannon_launch_block": "Выстрелы схематичной пушки",
"create.subtitle.schematicannon_finish": "Схематичная пушка закончила работу", "create.subtitle.schematicannon_finish": "Схематичная пушка закончила работу",
"create.subtitle.slime_added": "Намазывание слизи", "create.subtitle.slime_added": "Намазывание слизи",
"create.subtitle.mechanical_press_activation_belt": "UNLOCALIZED: Mechanical Press bonks",
"create.subtitle.mechanical_press_activation": "Механический пресс активирован", "create.subtitle.mechanical_press_activation": "Механический пресс активирован",
"create.subtitle.mechanical_press_item_break": "Лязг металла",
"create.subtitle.blockzapper_place": "Блок запрыгивает на место",
"create.subtitle.blockzapper_confirm": "Утвердительный динь",
"create.subtitle.blockzapper_deny": "Тихий буп", "create.subtitle.blockzapper_deny": "Тихий буп",
"create.subtitle.block_funnel_eat": "Воронкообразный чмопс", "create.subtitle.blockzapper_confirm": "Утвердительный динь",
"create.subtitle.blockzapper_place": "Блок запрыгивает на место",
"create.subtitle.blaze_munch": "Всполох радостно жуёт", "create.subtitle.blaze_munch": "Всполох радостно жуёт",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 619", "_": "Missing Localizations: 620",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -1148,15 +1148,17 @@
"create.command.killTPSCommand.status.usage.1": "[Create]: 用 /killtps start <tickTime> 来手动降低服务器TPS速度", "create.command.killTPSCommand.status.usage.1": "[Create]: 用 /killtps start <tickTime> 来手动降低服务器TPS速度",
"create.command.killTPSCommand.argument.tickTime": "tickTime", "create.command.killTPSCommand.argument.tickTime": "tickTime",
"_": "->------------------------] Subtitles [------------------------<-",
"create.subtitle.schematicannon_launch_block": "蓝图加农炮:发射", "create.subtitle.schematicannon_launch_block": "蓝图加农炮:发射",
"create.subtitle.schematicannon_finish": "蓝图加农炮:完成任务", "create.subtitle.schematicannon_finish": "蓝图加农炮:完成任务",
"create.subtitle.slime_added": "粘液:挤碎声", "create.subtitle.slime_added": "粘液:挤碎声",
"create.subtitle.mechanical_press_activation_belt": "UNLOCALIZED: Mechanical Press bonks",
"create.subtitle.mechanical_press_activation": "辊压机:工作中", "create.subtitle.mechanical_press_activation": "辊压机:工作中",
"create.subtitle.mechanical_press_item_break": "金属碰撞",
"create.subtitle.blockzapper_place": "放置方块",
"create.subtitle.blockzapper_confirm": "选择方块",
"create.subtitle.blockzapper_deny": "放置失败", "create.subtitle.blockzapper_deny": "放置失败",
"create.subtitle.block_funnel_eat": "漏斗:吞食", "create.subtitle.blockzapper_confirm": "选择方块",
"create.subtitle.blockzapper_place": "放置方块",
"create.subtitle.blaze_munch": "烈焰人:开心地咀嚼着", "create.subtitle.blaze_munch": "烈焰人:开心地咀嚼着",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 624", "_": "Missing Localizations: 625",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -1148,15 +1148,17 @@
"create.command.killTPSCommand.status.usage.1": "[Create]: 用 /killtps start <tickTime> 來手動降低伺服器TPS", "create.command.killTPSCommand.status.usage.1": "[Create]: 用 /killtps start <tickTime> 來手動降低伺服器TPS",
"create.command.killTPSCommand.argument.tickTime": "tickTime", "create.command.killTPSCommand.argument.tickTime": "tickTime",
"_": "->------------------------] Subtitles [------------------------<-",
"create.subtitle.schematicannon_launch_block": "藍圖大炮發射", "create.subtitle.schematicannon_launch_block": "藍圖大炮發射",
"create.subtitle.schematicannon_finish": "藍圖大炮完成任務", "create.subtitle.schematicannon_finish": "藍圖大炮完成任務",
"create.subtitle.slime_added": "黏液擠壓", "create.subtitle.slime_added": "黏液擠壓",
"create.subtitle.mechanical_press_activation_belt": "UNLOCALIZED: Mechanical Press bonks",
"create.subtitle.mechanical_press_activation": "液壓機工作", "create.subtitle.mechanical_press_activation": "液壓機工作",
"create.subtitle.mechanical_press_item_break": "金屬碰撞",
"create.subtitle.blockzapper_place": "放置方塊",
"create.subtitle.blockzapper_confirm": "選擇方塊",
"create.subtitle.blockzapper_deny": "放置失敗", "create.subtitle.blockzapper_deny": "放置失敗",
"create.subtitle.block_funnel_eat": "漏斗吸收", "create.subtitle.blockzapper_confirm": "選擇方塊",
"create.subtitle.blockzapper_place": "放置方塊",
"create.subtitle.blaze_munch": "烈焰使者開心地吃著", "create.subtitle.blaze_munch": "烈焰使者開心地吃著",

View file

@ -1,69 +1,12 @@
{ {
"pigclock": { "blaze_munch": {
"sounds": [
"create:pigclock"
],
"subtitle": "create.subtitle.pigclock"
},
"creeperclock": {
"sounds": [
"create:creeperclock"
],
"subtitle": "create.subtitle.creeperclock"
},
"schematicannon_launch_block": {
"sounds": [ "sounds": [
{ {
"name": "minecraft:entity.generic.explode", "name": "minecraft:entity.generic.eat",
"type": "event" "type": "event"
} }
], ],
"subtitle": "create.subtitle.schematicannon_launch_block" "subtitle": "create.subtitle.blaze_munch"
},
"schematicannon_finish": {
"sounds": [
{
"name": "minecraft:block.note_block.bell",
"type": "event"
}
],
"subtitle": "create.subtitle.schematicannon_finish"
},
"slime_added": {
"sounds": [
{
"name": "minecraft:block.slime_block.place",
"type": "event"
}
],
"subtitle": "create.subtitle.slime_added"
},
"mechanical_press_activation": {
"sounds": [
{
"name": "minecraft:block.anvil.land",
"type": "event"
}
],
"subtitle": "create.subtitle.mechanical_press_activation"
},
"mechanical_press_item_break": {
"sounds": [
{
"name": "minecraft:entity.item.break",
"type": "event"
}
],
"subtitle": "create.subtitle.mechanical_press_item_break"
},
"blockzapper_place": {
"sounds": [
{
"name": "minecraft:block.note_block.basedrum",
"type": "event"
}
],
"subtitle": "create.subtitle.blockzapper_place"
}, },
"blockzapper_confirm": { "blockzapper_confirm": {
"sounds": [ "sounds": [
@ -83,22 +26,74 @@
], ],
"subtitle": "create.subtitle.blockzapper_deny" "subtitle": "create.subtitle.blockzapper_deny"
}, },
"block_funnel_eat": { "blockzapper_place": {
"sounds": [ "sounds": [
{ {
"name": "minecraft:entity.generic.eat", "name": "minecraft:block.note_block.basedrum",
"type": "event" "type": "event"
} }
], ],
"subtitle": "create.subtitle.block_funnel_eat" "subtitle": "create.subtitle.blockzapper_place"
}, },
"blaze_munch": { "mechanical_press_activation": {
"sounds": [ "sounds": [
{ {
"name": "minecraft:entity.generic.eat", "name": "minecraft:block.netherite_block.hit",
"type": "event" "type": "event"
} }
], ],
"subtitle": "create.subtitle.blaze_munch" "subtitle": "create.subtitle.mechanical_press_activation"
},
"mechanical_press_activation_compounded_1": {
"sounds": [
{
"name": "minecraft:entity.item.break",
"type": "event"
}
]
},
"mechanical_press_activation_belt": {
"sounds": [
{
"name": "minecraft:block.wool.hit",
"type": "event"
}
],
"subtitle": "create.subtitle.mechanical_press_activation_belt"
},
"mechanical_press_activation_belt_compounded_1": {
"sounds": [
{
"name": "minecraft:entity.item.break",
"type": "event"
}
]
},
"schematicannon_finish": {
"sounds": [
{
"name": "minecraft:block.note_block.bell",
"type": "event"
}
],
"subtitle": "create.subtitle.schematicannon_finish"
},
"schematicannon_launch_block": {
"sounds": [
{
"name": "minecraft:entity.generic.explode",
"type": "event"
}
],
"subtitle": "create.subtitle.schematicannon_launch_block"
},
"slime_added": {
"sounds": [
{
"name": "minecraft:block.slime_block.place",
"type": "event"
}
],
"subtitle": "create.subtitle.slime_added"
} }
} }

View file

@ -2,127 +2,347 @@ package com.simibubi.create;
import java.io.IOException; import java.io.IOException;
import java.nio.file.Path; import java.nio.file.Path;
import java.util.List;
import java.util.Map;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.google.gson.GsonBuilder; import com.google.gson.GsonBuilder;
import com.google.gson.JsonArray; import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject; import com.google.gson.JsonObject;
import com.simibubi.create.foundation.utility.Lang; import com.simibubi.create.foundation.utility.Couple;
import com.simibubi.create.foundation.utility.Pair;
import net.minecraft.data.DataGenerator; import net.minecraft.data.DataGenerator;
import net.minecraft.data.DirectoryCache; import net.minecraft.data.DirectoryCache;
import net.minecraft.data.IDataProvider; import net.minecraft.data.IDataProvider;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.SoundEvent; import net.minecraft.util.SoundEvent;
import net.minecraft.util.SoundEvents; import net.minecraft.util.SoundEvents;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.registries.IForgeRegistry; import net.minecraftforge.registries.IForgeRegistry;
public enum AllSoundEvents implements IDataProvider { //@EventBusSubscriber(bus = Bus.FORGE)
public class AllSoundEvents {
CUCKOO_PIG("pigclock"), public static Map<ResourceLocation, SoundEntry> entries = Maps.newHashMap();
CUCKOO_CREEPER("creeperclock"), public static final SoundEntry
SCHEMATICANNON_LAUNCH_BLOCK(SoundEvents.ENTITY_GENERIC_EXPLODE), SCHEMATICANNON_LAUNCH_BLOCK = create("schematicannon_launch_block").subtitle("Schematicannon fires")
SCHEMATICANNON_FINISH(SoundEvents.BLOCK_NOTE_BLOCK_BELL), .playExisting(SoundEvents.ENTITY_GENERIC_EXPLODE, .1f, 1.1f)
SLIME_ADDED(SoundEvents.BLOCK_SLIME_BLOCK_PLACE), .category(SoundCategory.BLOCKS)
MECHANICAL_PRESS_ACTIVATION(SoundEvents.BLOCK_ANVIL_LAND), .build(),
MECHANICAL_PRESS_ITEM_BREAK(SoundEvents.ENTITY_ITEM_BREAK),
BLOCKZAPPER_PLACE(SoundEvents.BLOCK_NOTE_BLOCK_BASEDRUM),
BLOCKZAPPER_CONFIRM(SoundEvents.BLOCK_NOTE_BLOCK_BELL),
BLOCKZAPPER_DENY(SoundEvents.BLOCK_NOTE_BLOCK_BASS),
BLOCK_FUNNEL_EAT(SoundEvents.ENTITY_GENERIC_EAT),
BLAZE_MUNCH(SoundEvents.ENTITY_GENERIC_EAT)
; SCHEMATICANNON_FINISH = create("schematicannon_finish").subtitle("Schematicannon dings")
.playExisting(SoundEvents.BLOCK_NOTE_BLOCK_BELL, 1, .7f)
.category(SoundCategory.BLOCKS)
.build(),
String id; SLIME_ADDED = create("slime_added").subtitle("Slime squishes")
SoundEvent event, child; .playExisting(SoundEvents.BLOCK_SLIME_BLOCK_PLACE)
private DataGenerator generator; .category(SoundCategory.BLOCKS)
.build(),
// For adding our own sounds at assets/create/sounds/name.ogg MECHANICAL_PRESS_ACTIVATION = create("mechanical_press_activation").subtitle("Mechanical Press clangs")
AllSoundEvents() { .playExisting(SoundEvents.BLOCK_NETHERITE_BLOCK_HIT, .5f, 1.25f)
id = Lang.asId(name()); .playExisting(SoundEvents.ENTITY_ITEM_BREAK, .15f, .75f)
} .category(SoundCategory.BLOCKS)
.build(),
AllSoundEvents(String name) { MECHANICAL_PRESS_ACTIVATION_ON_BELT =
id = name; create("mechanical_press_activation_belt").subtitle("Mechanical Press bonks")
} .playExisting(SoundEvents.BLOCK_WOOL_HIT, .75f, 1f)
.playExisting(SoundEvents.ENTITY_ITEM_BREAK, .15f, .75f)
.category(SoundCategory.BLOCKS)
.build(),
// For wrapping a existing sound with new subtitle BLOCKZAPPER_PLACE = create("blockzapper_place").subtitle("Blockzapper zaps")
AllSoundEvents(SoundEvent child) { .playExisting(SoundEvents.BLOCK_NOTE_BLOCK_BASEDRUM)
this(); .category(SoundCategory.PLAYERS)
this.child = child; .build(),
}
// subtitles are taken from the lang file (create.subtitle.sound_event_name) BLOCKZAPPER_CONFIRM = create("blockzapper_confirm").subtitle("Affirmative ding")
.playExisting(SoundEvents.BLOCK_NOTE_BLOCK_BELL, 0.5f, 0.8f)
.category(SoundCategory.PLAYERS)
.build(),
public SoundEvent get() { BLOCKZAPPER_DENY = create("blockzapper_deny").subtitle("Declining boop")
return event; .playExisting(SoundEvents.BLOCK_NOTE_BLOCK_BASS, 1f, 0.5f)
} .category(SoundCategory.PLAYERS)
.build(),
private String getEventName() { BLAZE_MUNCH = create("blaze_munch").subtitle("Blaze Burner munches")
return id; .playExisting(SoundEvents.ENTITY_GENERIC_EAT, .5f, 1f)
} .category(SoundCategory.BLOCKS)
.build();
public AllSoundEvents generator(DataGenerator generator) { public static SoundEntryBuilder create(String id) {
this.generator = generator; return new SoundEntryBuilder(id);
return this;
} }
public static void register(RegistryEvent.Register<SoundEvent> event) { public static void register(RegistryEvent.Register<SoundEvent> event) {
IForgeRegistry<SoundEvent> registry = event.getRegistry(); IForgeRegistry<SoundEvent> registry = event.getRegistry();
for (SoundEntry entry : entries.values())
for (AllSoundEvents entry : values()) { entry.register(registry);
ResourceLocation rec = new ResourceLocation(Create.ID, entry.getEventName());
SoundEvent sound = new SoundEvent(rec).setRegistryName(rec);
registry.register(sound);
entry.event = sound;
}
} }
public void generate(Path path, DirectoryCache cache) { public static JsonElement provideLangEntries() {
Gson GSON = (new GsonBuilder()).setPrettyPrinting() JsonObject object = new JsonObject();
.disableHtmlEscaping() for (SoundEntry entry : entries.values())
.create(); object.addProperty(entry.getSubtitleKey(), entry.getSubtitle());
path = path.resolve("assets/create"); return object;
}
try { public static SoundEntryProvider provider(DataGenerator generator) {
JsonObject json = new JsonObject(); return new SoundEntryProvider(generator);
for (AllSoundEvents soundEvent : values()) { }
JsonObject entry = new JsonObject();
JsonArray arr = new JsonArray(); // @SubscribeEvent
if (soundEvent.child != null) { // public static void cancelSubtitlesOfCompoundedSounds(PlaySoundEvent event) {
// wrapper // ResourceLocation soundLocation = event.getSound().getSoundLocation();
JsonObject s = new JsonObject(); // if (!soundLocation.getNamespace().equals(Create.ID))
s.addProperty("name", soundEvent.child.getName() // return;
.toString()); // if (soundLocation.getPath().contains("_compounded_")
s.addProperty("type", "event"); // event.setResultSound();
arr.add(s); //
} else { // }
// own sound
arr.add(Create.ID + ":" + soundEvent.getEventName()); private static class SoundEntryProvider implements IDataProvider {
}
entry.add("sounds", arr); private DataGenerator generator;
entry.addProperty("subtitle", Create.ID + ".subtitle." + soundEvent.getEventName());
json.add(soundEvent.getEventName(), entry); public SoundEntryProvider(DataGenerator generator) {
this.generator = generator;
}
@Override
public void act(DirectoryCache cache) throws IOException {
generate(generator.getOutputFolder(), cache);
}
@Override
public String getName() {
return "Create's Custom Sounds";
}
public void generate(Path path, DirectoryCache cache) {
Gson GSON = (new GsonBuilder()).setPrettyPrinting()
.disableHtmlEscaping()
.create();
path = path.resolve("assets/create");
try {
JsonObject json = new JsonObject();
entries.entrySet()
.stream()
.sorted(Map.Entry.comparingByKey())
.forEach(entry -> {
entry.getValue()
.write(json);
});
IDataProvider.save(GSON, cache, json, path.resolve("sounds.json"));
} catch (IOException e) {
e.printStackTrace();
} }
IDataProvider.save(GSON, cache, json, path.resolve("sounds.json"));
} catch (IOException e) {
e.printStackTrace();
} }
} }
@Override static class SoundEntryBuilder {
public void act(DirectoryCache cache) throws IOException {
generate(generator.getOutputFolder(), cache); protected String id;
protected String subtitle = "unregistered";
protected SoundCategory category = SoundCategory.BLOCKS;
List<Pair<SoundEvent, Couple<Float>>> wrappedEvents;
public SoundEntryBuilder(String id) {
wrappedEvents = Lists.newArrayList();
this.id = id;
}
public SoundEntryBuilder subtitle(String subtitle) {
this.subtitle = subtitle;
return this;
}
public SoundEntryBuilder category(SoundCategory category) {
this.category = category;
return this;
}
public SoundEntryBuilder playExisting(SoundEvent event, float volume, float pitch) {
wrappedEvents.add(Pair.of(event, Couple.create(volume, pitch)));
return this;
}
public SoundEntryBuilder playExisting(SoundEvent event) {
return playExisting(event, 1, 1);
}
public SoundEntry build() {
SoundEntry entry = wrappedEvents.isEmpty() ? new CustomSoundEntry(id, subtitle, category)
: new WrappedSoundEntry(id, subtitle, wrappedEvents, category);
entries.put(entry.getLocation(), entry);
return entry;
}
} }
@Override public static abstract class SoundEntry {
public String getName() {
return "Create's Custom Sound: " + name(); protected String id;
protected String subtitle;
protected SoundCategory category;
public SoundEntry(String id, String subtitle, SoundCategory category) {
this.id = id;
this.subtitle = subtitle;
this.category = category;
}
public abstract void register(IForgeRegistry<SoundEvent> registry);
public abstract void write(JsonObject json);
public String getSubtitleKey() {
return Create.ID + ".subtitle." + id;
}
public String getId() {
return id;
}
public ResourceLocation getLocation() {
return Create.asResource(id);
}
public String getSubtitle() {
return subtitle;
}
public void playOnServer(World world, BlockPos pos) {
playOnServer(world, pos, 1, 1);
}
public void playOnServer(World world, BlockPos pos, float volume, float pitch) {
play(world, null, pos, volume, pitch);
}
public void play(World world, PlayerEntity entity, BlockPos pos) {
play(world, entity, pos, 1, 1);
}
public void playFrom(Entity entity) {
playFrom(entity, 1, 1);
}
public void playFrom(Entity entity, float volume, float pitch) {
if (!entity.isSilent())
play(entity.world, null, entity.getBlockPos(), volume, pitch);
}
public void play(World world, PlayerEntity entity, BlockPos pos, float volume, float pitch) {
play(world, entity, pos.getX(), pos.getY(), pos.getZ(), volume, pitch);
}
abstract void play(World world, PlayerEntity entity, double x, double y, double z, float volume, float pitch);
} }
static class WrappedSoundEntry extends SoundEntry {
private List<Pair<SoundEvent, Couple<Float>>> wrappedEvents;
private List<Pair<SoundEvent, Couple<Float>>> compiledEvents;
public WrappedSoundEntry(String id, String subtitle, List<Pair<SoundEvent, Couple<Float>>> wrappedEvents,
SoundCategory category) {
super(id, subtitle, category);
this.wrappedEvents = wrappedEvents;
compiledEvents = Lists.newArrayList();
}
@Override
public void register(IForgeRegistry<SoundEvent> registry) {
for (int i = 0; i < wrappedEvents.size(); i++) {
ResourceLocation location = Create.asResource(getIdOf(i));
SoundEvent sound = new SoundEvent(location).setRegistryName(location);
registry.register(sound);
compiledEvents.add(Pair.of(sound, wrappedEvents.get(i)
.getSecond()));
}
}
protected String getIdOf(int i) {
return i == 0 ? id : id + "_compounded_" + i;
}
@Override
public void write(JsonObject json) {
for (int i = 0; i < wrappedEvents.size(); i++) {
Pair<SoundEvent, Couple<Float>> pair = wrappedEvents.get(i);
JsonObject entry = new JsonObject();
JsonArray list = new JsonArray();
JsonObject s = new JsonObject();
s.addProperty("name", pair.getFirst()
.getName()
.toString());
s.addProperty("type", "event");
list.add(s);
entry.add("sounds", list);
if (i == 0)
entry.addProperty("subtitle", getSubtitleKey());
json.add(getIdOf(i), entry);
}
}
@Override
void play(World world, PlayerEntity entity, double x, double y, double z, float volume, float pitch) {
for (Pair<SoundEvent, Couple<Float>> pair : compiledEvents) {
Couple<Float> volPitch = pair.getSecond();
world.playSound(entity, x, y, z, pair.getFirst(), category, volPitch.getFirst() * volume,
volPitch.getSecond() * pitch);
}
}
}
static class CustomSoundEntry extends SoundEntry {
protected SoundEvent event;
public CustomSoundEntry(String id, String subtitle, SoundCategory category) {
super(id, subtitle, category);
}
@Override
public void register(IForgeRegistry<SoundEvent> registry) {
ResourceLocation location = getLocation();
SoundEvent sound = new SoundEvent(location).setRegistryName(location);
registry.register(sound);
}
@Override
public void write(JsonObject json) {
JsonObject entry = new JsonObject();
JsonArray list = new JsonArray();
list.add(getLocation().toString());
entry.add("sounds", list);
entry.addProperty("subtitle", getSubtitleKey());
json.add(id, entry);
}
@Override
void play(World world, PlayerEntity entity, double x, double y, double z, float volume, float pitch) {
world.playSound(entity, x, y, z, event, category, volume, pitch);
}
}
} }

View file

@ -143,7 +143,7 @@ public class Create {
DataGenerator gen = event.getGenerator(); DataGenerator gen = event.getGenerator();
gen.addProvider(new AllAdvancements(gen)); gen.addProvider(new AllAdvancements(gen));
gen.addProvider(new LangMerger(gen)); gen.addProvider(new LangMerger(gen));
gen.addProvider(AllSoundEvents.BLAZE_MUNCH.generator(gen)); gen.addProvider(AllSoundEvents.provider(gen));
gen.addProvider(new StandardRecipeGen(gen)); gen.addProvider(new StandardRecipeGen(gen));
gen.addProvider(new MechanicalCraftingRecipeGen(gen)); gen.addProvider(new MechanicalCraftingRecipeGen(gen));
ProcessingRecipeGen.registerAll(gen); ProcessingRecipeGen.registerAll(gen);

View file

@ -23,6 +23,8 @@ import com.simibubi.create.foundation.utility.NBTHelper;
import com.simibubi.create.foundation.utility.VecHelper; import com.simibubi.create.foundation.utility.VecHelper;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.item.ItemEntity; import net.minecraft.entity.item.ItemEntity;
import net.minecraft.inventory.IInventory; import net.minecraft.inventory.IInventory;
@ -35,7 +37,6 @@ import net.minecraft.particles.ItemParticleData;
import net.minecraft.particles.ParticleTypes; import net.minecraft.particles.ParticleTypes;
import net.minecraft.tileentity.TileEntityType; import net.minecraft.tileentity.TileEntityType;
import net.minecraft.util.NonNullList; import net.minecraft.util.NonNullList;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.vector.Vector3d; import net.minecraft.util.math.vector.Vector3d;
@ -182,12 +183,11 @@ public class MechanicalPressTileEntity extends BasinOperatingTileEntity {
applyPressingInWorld(); applyPressingInWorld();
if (onBasin()) if (onBasin())
applyCompactingOnBasin(); applyCompactingOnBasin();
if (!world.isRemote) {
world.playSound(null, getPos(), AllSoundEvents.MECHANICAL_PRESS_ITEM_BREAK.get(), SoundCategory.BLOCKS, if (world.getBlockState(pos.down(2)).getSoundType() == SoundType.CLOTH)
.5f, 1f); AllSoundEvents.MECHANICAL_PRESS_ACTIVATION_ON_BELT.playOnServer(world, pos);
world.playSound(null, getPos(), AllSoundEvents.MECHANICAL_PRESS_ACTIVATION.get(), SoundCategory.BLOCKS, else
.125f, 1f); AllSoundEvents.MECHANICAL_PRESS_ACTIVATION.playOnServer(world, pos);
}
} }
if (!world.isRemote && runningTicks > CYCLE) { if (!world.isRemote && runningTicks > CYCLE) {
@ -266,7 +266,7 @@ public class MechanicalPressTileEntity extends BasinOperatingTileEntity {
AllTriggers.triggerForNearbyPlayers(AllTriggers.BONK, world, pos, 4); AllTriggers.triggerForNearbyPlayers(AllTriggers.BONK, world, pos, 4);
entityScanCooldown = 0; entityScanCooldown = 0;
if (!bulk) if (!bulk)
break; break;
} }

View file

@ -18,7 +18,6 @@ import net.minecraft.util.Direction;
import net.minecraft.util.Hand; import net.minecraft.util.Hand;
import net.minecraft.util.Mirror; import net.minecraft.util.Mirror;
import net.minecraft.util.Rotation; import net.minecraft.util.Rotation;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.util.math.vector.Vector3d; import net.minecraft.util.math.vector.Vector3d;
@ -65,7 +64,7 @@ public abstract class AbstractChassisBlock extends RotatedPillarBlock implements
worldIn.addParticle(ParticleTypes.ITEM_SLIME, vec.x, vec.y, vec.z, 0, 0, 0); worldIn.addParticle(ParticleTypes.ITEM_SLIME, vec.x, vec.y, vec.z, 0, 0, 0);
return ActionResultType.SUCCESS; return ActionResultType.SUCCESS;
} }
worldIn.playSound(null, pos, AllSoundEvents.SLIME_ADDED.get(), SoundCategory.BLOCKS, .5f, 1); AllSoundEvents.SLIME_ADDED.playOnServer(worldIn, pos, .5f, 1);
state = state.with(glueableSide, true); state = state.with(glueableSide, true);
} }
} }
@ -86,7 +85,7 @@ public abstract class AbstractChassisBlock extends RotatedPillarBlock implements
return ActionResultType.SUCCESS; return ActionResultType.SUCCESS;
} }
worldIn.playSound(null, pos, AllSoundEvents.SLIME_ADDED.get(), SoundCategory.BLOCKS, .5f, 1); AllSoundEvents.SLIME_ADDED.playOnServer(worldIn, pos, .5f, 1);
worldIn.setBlockState(pos, state.with(affectedSide, isSlimeBall)); worldIn.setBlockState(pos, state.with(affectedSide, isSlimeBall));
return ActionResultType.SUCCESS; return ActionResultType.SUCCESS;
} }

View file

@ -18,7 +18,6 @@ import net.minecraft.client.Minecraft;
import net.minecraft.nbt.CompoundNBT; import net.minecraft.nbt.CompoundNBT;
import net.minecraft.tileentity.TileEntityType; import net.minecraft.tileentity.TileEntityType;
import net.minecraft.util.Direction; import net.minecraft.util.Direction;
import net.minecraft.util.SoundCategory;
import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.fml.DistExecutor; import net.minecraftforge.fml.DistExecutor;
@ -91,8 +90,7 @@ public class StickerTileEntity extends SmartTileEntity implements IInstanceRende
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public void playSound(boolean attach) { public void playSound(boolean attach) {
world.playSound(Minecraft.getInstance().player, pos, AllSoundEvents.SLIME_ADDED.get(), SoundCategory.BLOCKS, AllSoundEvents.SLIME_ADDED.play(world, Minecraft.getInstance().player, pos, 0.35f, attach ? 0.75f : 0.2f);
0.35F, attach ? 0.75F : 0.2f);
} }
} }

View file

@ -96,12 +96,12 @@ public class SuperGlueEntity extends Entity implements IEntityAdditionalSpawnDat
if (onValidSurface()) { if (onValidSurface()) {
AllPackets.channel.send(PacketDistributor.TRACKING_ENTITY.with(() -> this), AllPackets.channel.send(PacketDistributor.TRACKING_ENTITY.with(() -> this),
new GlueEffectPacket(getHangingPosition(), getFacingDirection().getOpposite(), false)); new GlueEffectPacket(getHangingPosition(), getFacingDirection().getOpposite(), false));
playSound(AllSoundEvents.SLIME_ADDED.get(), 0.5F, 0.5F); AllSoundEvents.SLIME_ADDED.playFrom(this, 0.5F, 0.5F);
} }
} }
public void playPlaceSound() { public void playPlaceSound() {
playSound(AllSoundEvents.SLIME_ADDED.get(), 0.5F, 0.75F); AllSoundEvents.SLIME_ADDED.playFrom(this, 0.5F, 0.75F);
} }
protected void updateFacingWithBoundingBox() { protected void updateFacingWithBoundingBox() {

View file

@ -22,7 +22,6 @@ import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction; import net.minecraft.util.Direction;
import net.minecraft.util.Hand; import net.minecraft.util.Hand;
import net.minecraft.util.IStringSerializable; import net.minecraft.util.IStringSerializable;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.util.math.shapes.ISelectionContext; import net.minecraft.util.math.shapes.ISelectionContext;
@ -88,7 +87,7 @@ public class MechanicalPistonBlock extends DirectionalAxisKineticBlock implement
worldIn.addParticle(ParticleTypes.ITEM_SLIME, vec.x, vec.y, vec.z, 0, 0, 0); worldIn.addParticle(ParticleTypes.ITEM_SLIME, vec.x, vec.y, vec.z, 0, 0, 0);
return ActionResultType.SUCCESS; return ActionResultType.SUCCESS;
} }
worldIn.playSound(null, pos, AllSoundEvents.SLIME_ADDED.get(), SoundCategory.BLOCKS, .5f, 1); AllSoundEvents.SLIME_ADDED.playOnServer(worldIn, pos, .5f, 1);
if (!player.isCreative()) if (!player.isCreative())
player.getHeldItem(handIn) player.getHeldItem(handIn)
.shrink(1); .shrink(1);

View file

@ -5,7 +5,6 @@ import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerTil
import net.minecraft.entity.projectile.EggEntity; import net.minecraft.entity.projectile.EggEntity;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.RayTraceResult; import net.minecraft.util.math.RayTraceResult;
@ -52,7 +51,7 @@ public class BlazeBurnerHandler {
heater.notifyUpdate(); heater.notifyUpdate();
} }
world.playSound(null, heater.getPos(), AllSoundEvents.BLAZE_MUNCH.get(), SoundCategory.BLOCKS, .5F, 1F); AllSoundEvents.BLAZE_MUNCH.playOnServer(world, heater.getPos());
} }
} }

View file

@ -15,7 +15,6 @@ import net.minecraft.state.properties.BlockStateProperties;
import net.minecraft.state.properties.StairsShape; import net.minecraft.state.properties.StairsShape;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ActionResultType; import net.minecraft.util.ActionResultType;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.util.math.RayTraceContext; import net.minecraft.util.math.RayTraceContext;
@ -33,7 +32,8 @@ public class ZapperInteractionHandler {
public static void leftClickingBlocksWithTheZapperSelectsTheBlock(PlayerInteractEvent.LeftClickBlock event) { public static void leftClickingBlocksWithTheZapperSelectsTheBlock(PlayerInteractEvent.LeftClickBlock event) {
if (event.getWorld().isRemote) if (event.getWorld().isRemote)
return; return;
ItemStack heldItem = event.getPlayer().getHeldItemMainhand(); ItemStack heldItem = event.getPlayer()
.getHeldItemMainhand();
if (heldItem.getItem() instanceof ZapperItem && trySelect(heldItem, event.getPlayer())) { if (heldItem.getItem() instanceof ZapperItem && trySelect(heldItem, event.getPlayer())) {
event.setCancellationResult(ActionResultType.FAIL); event.setCancellationResult(ActionResultType.FAIL);
event.setCanceled(true); event.setCanceled(true);
@ -87,10 +87,8 @@ public class ZapperInteractionHandler {
data.remove("id"); data.remove("id");
} }
CompoundNBT tag = stack.getOrCreateTag(); CompoundNBT tag = stack.getOrCreateTag();
if (tag.contains("BlockUsed") if (tag.contains("BlockUsed") && NBTUtil.readBlockState(stack.getTag()
&& NBTUtil.readBlockState( .getCompound("BlockUsed")) == newState && Objects.equals(data, tag.get("BlockData"))) {
stack.getTag().getCompound("BlockUsed")) == newState
&& Objects.equals(data, tag.get("BlockData"))) {
return false; return false;
} }
@ -99,9 +97,8 @@ public class ZapperInteractionHandler {
tag.remove("BlockData"); tag.remove("BlockData");
else else
tag.put("BlockData", data); tag.put("BlockData", data);
player.world.playSound(null, player.getBlockPos(), AllSoundEvents.BLOCKZAPPER_CONFIRM.get(),
SoundCategory.BLOCKS, 0.5f, 0.8f);
AllSoundEvents.BLOCKZAPPER_CONFIRM.playOnServer(player.world, player.getBlockPos());
return true; return true;
} }

View file

@ -30,7 +30,6 @@ import net.minecraft.util.ActionResult;
import net.minecraft.util.ActionResultType; import net.minecraft.util.ActionResultType;
import net.minecraft.util.Hand; import net.minecraft.util.Hand;
import net.minecraft.util.HandSide; import net.minecraft.util.HandSide;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.util.math.RayTraceContext; import net.minecraft.util.math.RayTraceContext;
@ -144,8 +143,7 @@ public abstract class ZapperItem extends Item {
// Check if can be used // Check if can be used
ITextComponent msg = validateUsage(item); ITextComponent msg = validateUsage(item);
if (msg != null) { if (msg != null) {
world.playSound(player, player.getBlockPos(), AllSoundEvents.BLOCKZAPPER_DENY.get(), SoundCategory.BLOCKS, AllSoundEvents.BLOCKZAPPER_DENY.play(world, player, player.getBlockPos());
1f, 0.5f);
player.sendStatusMessage(msg.copy().formatted(TextFormatting.RED), true); player.sendStatusMessage(msg.copy().formatted(TextFormatting.RED), true);
return new ActionResult<>(ActionResultType.FAIL, item); return new ActionResult<>(ActionResultType.FAIL, item);
} }

View file

@ -21,7 +21,6 @@ import net.minecraft.item.ItemStack;
import net.minecraft.particles.ParticleTypes; import net.minecraft.particles.ParticleTypes;
import net.minecraft.util.Hand; import net.minecraft.util.Hand;
import net.minecraft.util.HandSide; import net.minecraft.util.HandSide;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.vector.Vector3d; import net.minecraft.util.math.vector.Vector3d;
@ -82,21 +81,21 @@ public class ZapperRenderHandler {
lastRightHandAnimation = rightHandAnimation; lastRightHandAnimation = rightHandAnimation;
leftHandAnimation *= 0.8f; leftHandAnimation *= 0.8f;
rightHandAnimation *= 0.8f; rightHandAnimation *= 0.8f;
if (cachedBeams == null) if (cachedBeams == null)
cachedBeams = new LinkedList<>(); cachedBeams = new LinkedList<>();
cachedBeams.removeIf(b -> b.itensity < .1f); cachedBeams.removeIf(b -> b.itensity < .1f);
if (cachedBeams.isEmpty()) if (cachedBeams.isEmpty())
return; return;
cachedBeams.forEach(beam -> { cachedBeams.forEach(beam -> {
CreateClient.outliner.endChasingLine(beam, beam.start, beam.end, 1 - beam.itensity) CreateClient.outliner.endChasingLine(beam, beam.start, beam.end, 1 - beam.itensity)
.disableNormals() .disableNormals()
.colored(0xffffff) .colored(0xffffff)
.lineWidth(beam.itensity * 1 / 8f); .lineWidth(beam.itensity * 1 / 8f);
}); });
cachedBeams.forEach(b -> b.itensity *= .6f); cachedBeams.forEach(b -> b.itensity *= .6f);
} }
@ -115,8 +114,8 @@ public class ZapperRenderHandler {
public static void playSound(Hand hand, BlockPos position) { public static void playSound(Hand hand, BlockPos position) {
float pitch = hand == Hand.MAIN_HAND ? 2f : 0.9f; float pitch = hand == Hand.MAIN_HAND ? 2f : 0.9f;
Minecraft.getInstance().world.playSound(position, AllSoundEvents.BLOCKZAPPER_PLACE.get(), SoundCategory.BLOCKS, Minecraft mc = Minecraft.getInstance();
0.8f, pitch, false); AllSoundEvents.BLOCKZAPPER_PLACE.play(mc.world, mc.player, position, 0.8f, pitch);
} }
public static void addBeam(LaserBeam beam) { public static void addBeam(LaserBeam beam) {
@ -166,7 +165,7 @@ public class ZapperRenderHandler {
float f4 = -0.4F * MathHelper.sin(event.getSwingProgress() * (float) Math.PI); float f4 = -0.4F * MathHelper.sin(event.getSwingProgress() * (float) Math.PI);
float f5 = MathHelper.sin(event.getSwingProgress() * event.getSwingProgress() * (float) Math.PI); float f5 = MathHelper.sin(event.getSwingProgress() * event.getSwingProgress() * (float) Math.PI);
float f6 = MathHelper.sin(f1 * (float) Math.PI); float f6 = MathHelper.sin(f1 * (float) Math.PI);
ms.translate(f * (f2 + 0.64000005F - .1f), f3 + -0.4F + equipProgress * -0.6F, ms.translate(f * (f2 + 0.64000005F - .1f), f3 + -0.4F + equipProgress * -0.6F,
f4 + -0.71999997F + .3f + recoil); f4 + -0.71999997F + .3f + recoil);
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(f * 75.0F)); ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(f * 75.0F));
@ -181,7 +180,7 @@ public class ZapperRenderHandler {
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(f * -135.0F)); ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(f * -135.0F));
ms.translate(f * 5.6F, 0.0F, 0.0F); ms.translate(f * 5.6F, 0.0F, 0.0F);
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(f * 40.0F)); ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(f * 40.0F));
PlayerRenderer playerrenderer = (PlayerRenderer) mc.getRenderManager() PlayerRenderer playerrenderer = (PlayerRenderer) mc.getRenderManager()
.getRenderer(abstractclientplayerentity); .getRenderer(abstractclientplayerentity);
if (rightHand) { if (rightHand) {

View file

@ -55,7 +55,6 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.tileentity.TileEntityType; import net.minecraft.tileentity.TileEntityType;
import net.minecraft.util.Direction; import net.minecraft.util.Direction;
import net.minecraft.util.Direction.AxisDirection; import net.minecraft.util.Direction.AxisDirection;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MutableBoundingBox; import net.minecraft.util.math.MutableBoundingBox;
@ -409,7 +408,8 @@ public class SchematicannonTileEntity extends SmartTileEntity implements INamedC
ItemRequirement requirement; ItemRequirement requirement;
if (entityMode) { if (entityMode) {
requirement = ItemRequirement.of(blockReader.getEntities().collect(Collectors.toList()) requirement = ItemRequirement.of(blockReader.getEntities()
.collect(Collectors.toList())
.get(printingEntityIndex)); .get(printingEntityIndex));
} else { } else {
@ -459,7 +459,8 @@ public class SchematicannonTileEntity extends SmartTileEntity implements INamedC
ItemStack icon = requirement.isEmpty() || requiredItems.isEmpty() ? ItemStack.EMPTY : requiredItems.get(0); ItemStack icon = requirement.isEmpty() || requiredItems.isEmpty() ? ItemStack.EMPTY : requiredItems.get(0);
if (entityMode) if (entityMode)
launchEntity(target, icon, blockReader.getEntities().collect(Collectors.toList()) launchEntity(target, icon, blockReader.getEntities()
.collect(Collectors.toList())
.get(printingEntityIndex)); .get(printingEntityIndex));
else if (AllBlocks.BELT.has(blockState)) { else if (AllBlocks.BELT.has(blockState)) {
TileEntity te = blockReader.getTileEntity(currentPos.add(schematicAnchor)); TileEntity te = blockReader.getTileEntity(currentPos.add(schematicAnchor));
@ -646,7 +647,8 @@ public class SchematicannonTileEntity extends SmartTileEntity implements INamedC
} }
protected void advanceCurrentPos() { protected void advanceCurrentPos() {
List<Entity> entities = blockReader.getEntities().collect(Collectors.toList()); List<Entity> entities = blockReader.getEntities()
.collect(Collectors.toList());
if (printingEntityIndex != -1) { if (printingEntityIndex != -1) {
printingEntityIndex++; printingEntityIndex++;
@ -692,8 +694,7 @@ public class SchematicannonTileEntity extends SmartTileEntity implements INamedC
statusMsg = "finished"; statusMsg = "finished";
resetPrinter(); resetPrinter();
target = getPos().add(1, 0, 0); target = getPos().add(1, 0, 0);
world.playSound(null, pos.getX(), pos.getY(), pos.getZ(), AllSoundEvents.SCHEMATICANNON_FINISH.get(), AllSoundEvents.SCHEMATICANNON_FINISH.playOnServer(world, pos);
SoundCategory.BLOCKS, 1, .7f);
sendUpdate = true; sendUpdate = true;
} }
@ -875,8 +876,7 @@ public class SchematicannonTileEntity extends SmartTileEntity implements INamedC
} }
public void playFiringSound() { public void playFiringSound() {
world.playSound(null, pos.getX(), pos.getY(), pos.getZ(), AllSoundEvents.SCHEMATICANNON_LAUNCH_BLOCK.get(), AllSoundEvents.SCHEMATICANNON_LAUNCH_BLOCK.playOnServer(world, pos);
SoundCategory.BLOCKS, .1f, 1.1f);
} }
public void sendToContainer(PacketBuffer buffer) { public void sendToContainer(PacketBuffer buffer) {
@ -919,14 +919,15 @@ public class SchematicannonTileEntity extends SmartTileEntity implements INamedC
checklist.require(requirement); checklist.require(requirement);
blocksToPlace++; blocksToPlace++;
} }
blockReader.getEntities().forEach(entity -> { blockReader.getEntities()
ItemRequirement requirement = ItemRequirement.of(entity); .forEach(entity -> {
if (requirement.isEmpty()) ItemRequirement requirement = ItemRequirement.of(entity);
return; if (requirement.isEmpty())
if (requirement.isInvalid()) return;
return; if (requirement.isInvalid())
checklist.require(requirement); return;
}); checklist.require(requirement);
});
} }
checklist.gathered.clear(); checklist.gathered.clear();

View file

@ -2,6 +2,7 @@ package com.simibubi.create.foundation.data;
import com.google.common.base.Supplier; import com.google.common.base.Supplier;
import com.google.gson.JsonElement; import com.google.gson.JsonElement;
import com.simibubi.create.AllSoundEvents;
import com.simibubi.create.Create; import com.simibubi.create.Create;
import com.simibubi.create.foundation.ponder.PonderRegistry; import com.simibubi.create.foundation.ponder.PonderRegistry;
import com.simibubi.create.foundation.utility.FilesHelper; import com.simibubi.create.foundation.utility.FilesHelper;
@ -11,6 +12,7 @@ public enum AllLangPartials {
ADVANCEMENTS("Advancements"), ADVANCEMENTS("Advancements"),
MESSAGES("UI & Messages"), MESSAGES("UI & Messages"),
SUBTITLES("Subtitles", AllSoundEvents::provideLangEntries),
TOOLTIPS("Item Descriptions"), TOOLTIPS("Item Descriptions"),
PONDER("Ponder Content", PonderRegistry::provideLangEntries), PONDER("Ponder Content", PonderRegistry::provideLangEntries),

View file

@ -501,17 +501,6 @@
"create.command.killTPSCommand.status.slowed_by.2": "[Create]: Server tick is back to regular speed :D", "create.command.killTPSCommand.status.slowed_by.2": "[Create]: Server tick is back to regular speed :D",
"create.command.killTPSCommand.status.usage.0": "[Create]: use /killtps stop to bring back server tick to regular speed", "create.command.killTPSCommand.status.usage.0": "[Create]: use /killtps stop to bring back server tick to regular speed",
"create.command.killTPSCommand.status.usage.1": "[Create]: use /killtps start <tickTime> to artificially slow down the server tick", "create.command.killTPSCommand.status.usage.1": "[Create]: use /killtps start <tickTime> to artificially slow down the server tick",
"create.command.killTPSCommand.argument.tickTime": "tickTime", "create.command.killTPSCommand.argument.tickTime": "tickTime"
"create.subtitle.schematicannon_launch_block": "Schematicannon shoots",
"create.subtitle.schematicannon_finish": "Schematicannon finishes",
"create.subtitle.slime_added": "Slime squishes",
"create.subtitle.mechanical_press_activation": "Mechanical Press activates",
"create.subtitle.mechanical_press_item_break": "Metal clanks",
"create.subtitle.blockzapper_place": "Blocks zap into place",
"create.subtitle.blockzapper_confirm": "Affirmative Ding",
"create.subtitle.blockzapper_deny": "Declining Boop",
"create.subtitle.block_funnel_eat": "Funnel CHOMPS",
"create.subtitle.blaze_munch": "Blaze munches happily"
} }