mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-02-05 01:45:00 +01:00
Merge sound stuff
This commit is contained in:
commit
4fa551b452
41 changed files with 977 additions and 128 deletions
|
@ -408,19 +408,19 @@ a3a11524cd3515fc01d905767b4b7ea782adaf03 assets/create/blockstates/yellow_seat.j
|
|||
7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json
|
||||
b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json
|
||||
4ab580b05eecdd48750cb873b7c7ef98a048915b assets/create/lang/en_ud.json
|
||||
ebfd5578f6ef42718c80037e5a6e4d15151621da assets/create/lang/en_us.json
|
||||
4bd58362913f8d8edde00744a4a40172fe1c9b27 assets/create/lang/unfinished/de_de.json
|
||||
3b9ad2085382e2175767ebc295bf1426c5db55c0 assets/create/lang/unfinished/es_es.json
|
||||
0979a0dddc2e7ca0a164653059a7256577152ce7 assets/create/lang/unfinished/es_mx.json
|
||||
0f6ccc13e9684e90e4a6fddbee2bf679ed7fc430 assets/create/lang/unfinished/fr_fr.json
|
||||
1436da7eb2a4b943995c8f60b9704d819d42b513 assets/create/lang/unfinished/it_it.json
|
||||
7508b5c318499188f42f7c7596bf89a3bc2227a2 assets/create/lang/unfinished/ja_jp.json
|
||||
d45df55eb66cd26fd7404674c176cef5e93509a8 assets/create/lang/unfinished/ko_kr.json
|
||||
1a94b23c7a68d0f24f59a12908bd63be44c9c8a0 assets/create/lang/unfinished/nl_nl.json
|
||||
7323a5793a09e37cff61e92cb660d004c2d9e7ee assets/create/lang/unfinished/pt_br.json
|
||||
b8e2d4d06f4f57aa9387162d080abab8dfac956c assets/create/lang/unfinished/ru_ru.json
|
||||
ba7a86b25a9131531bda34daf5ffc42d03c4cf79 assets/create/lang/unfinished/zh_cn.json
|
||||
be1ea320e84306665da73fc021d0c013cee75b1a assets/create/lang/unfinished/zh_tw.json
|
||||
304611e751ede140c40f1bd6aabe5deedb1a972d assets/create/lang/en_us.json
|
||||
8a5eabaddf94e00aba82aefb2589dfbbeca256aa assets/create/lang/unfinished/de_de.json
|
||||
8f517f0bf301df8bbd4e593c8d01988a84b5f347 assets/create/lang/unfinished/es_es.json
|
||||
72228d3f96a2b64e7659fe3e074818565fc7c5ab assets/create/lang/unfinished/es_mx.json
|
||||
a4dfe786b3a3b8fbc7b2b8f5f7e0ae651aba8b68 assets/create/lang/unfinished/fr_fr.json
|
||||
1043d68f4cdf0e3bae33a0fdc1c674abe31957f2 assets/create/lang/unfinished/it_it.json
|
||||
2ffbf79be01436647b5baacb80bce6fc83c5f972 assets/create/lang/unfinished/ja_jp.json
|
||||
9ab33a11eaa36e4abb4be64421067160ee276ff0 assets/create/lang/unfinished/ko_kr.json
|
||||
9c73e2832455a07bc65e5a8c52894085ffa5a59e assets/create/lang/unfinished/nl_nl.json
|
||||
ad1f915a8caeebc2f1c2e3224b1ff3a244922da9 assets/create/lang/unfinished/pt_br.json
|
||||
d1421f69f733e2fedf16817a02d222775ef450a1 assets/create/lang/unfinished/ru_ru.json
|
||||
c1b8459be62f7656d8f8d63066f4a5c3ea68f187 assets/create/lang/unfinished/zh_cn.json
|
||||
ed026aacde00bfb9da6ae50b0778d166a6b84152 assets/create/lang/unfinished/zh_tw.json
|
||||
487a511a01b2a4531fb672f917922312db78f958 assets/create/models/block/acacia_window.json
|
||||
b48060cba1a382f373a05bf0039054053eccf076 assets/create/models/block/acacia_window_pane_noside.json
|
||||
3066db1bf03cffa1a9c7fbacf47ae586632f4eb3 assets/create/models/block/acacia_window_pane_noside_alt.json
|
||||
|
@ -1650,7 +1650,7 @@ d080b1b25e5bc8baf5aee68691b08c7f12ece3b0 assets/create/models/item/windmill_bear
|
|||
866fbb0ce2878a73e0440d1caf6534c8bd7c384f assets/create/models/item/zinc_ingot.json
|
||||
a80fb25a0b655e76be986b5b49fcb0f03461a1ab assets/create/models/item/zinc_nugget.json
|
||||
b1689617190c05ef34bd18456b0c7ae09bb3210f assets/create/models/item/zinc_ore.json
|
||||
f98bf9f870ac5ee5b31c12a20739773c5fee4949 assets/create/sounds.json
|
||||
71739e613693c476e481dfcf38628a4f52f0f570 assets/create/sounds.json
|
||||
5d0cc4c0255dc241e61c173b31ddca70c88d08e4 data/create/advancements/aesthetics.json
|
||||
187921fa131b06721bfaf63f2623a28c141aae9a data/create/advancements/andesite_alloy.json
|
||||
0ea2db7173b5be28b289ea7c9a6a0cf5805c60c7 data/create/advancements/andesite_casing.json
|
||||
|
|
|
@ -1153,15 +1153,22 @@
|
|||
|
||||
"_": "->------------------------] Subtitles [------------------------<-",
|
||||
|
||||
"create.subtitle.schematicannon_launch_block": "Schematicannon fires",
|
||||
"create.subtitle.schematicannon_finish": "Schematicannon dings",
|
||||
"create.subtitle.cogs": "Cogwheels rumble",
|
||||
"create.subtitle.slime_added": "Slime squishes",
|
||||
"create.subtitle.mixing": "Mixing Noises",
|
||||
"create.subtitle.mechanical_press_activation_belt": "Mechanical Press bonks",
|
||||
"create.subtitle.mechanical_press_activation": "Mechanical Press clangs",
|
||||
"create.subtitle.blockzapper_deny": "Declining boop",
|
||||
"create.subtitle.blockzapper_confirm": "Affirmative ding",
|
||||
"create.subtitle.depot_slide": "Item slides",
|
||||
"create.subtitle.blockzapper_place": "Blockzapper zaps",
|
||||
"create.subtitle.blaze_munch": "Blaze Burner munches",
|
||||
"create.subtitle.schematicannon_launch_block": "Schematicannon fires",
|
||||
"create.subtitle.funnel_flap": "Funnel Flaps",
|
||||
"create.subtitle.schematicannon_finish": "Schematicannon dings",
|
||||
"create.subtitle.scroll_value": "Scroll-input clicks",
|
||||
"create.subtitle.mechanical_press_activation": "Mechanical Press clangs",
|
||||
"create.subtitle.blockzapper_deny": "Declining boop",
|
||||
"create.subtitle.cranking": "Hand Crank turns",
|
||||
"create.subtitle.depot_plop": "Item lands",
|
||||
|
||||
|
||||
"_": "->------------------------] Item Descriptions [------------------------<-",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"_": "Missing Localizations: 915",
|
||||
"_": "Missing Localizations: 922",
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -1154,15 +1154,22 @@
|
|||
|
||||
"_": "->------------------------] Subtitles [------------------------<-",
|
||||
|
||||
"create.subtitle.schematicannon_launch_block": "Bauplankanone schießt",
|
||||
"create.subtitle.schematicannon_finish": "Bauplankanone endet",
|
||||
"create.subtitle.cogs": "UNLOCALIZED: Cogwheels rumble",
|
||||
"create.subtitle.slime_added": "Schleim matscht",
|
||||
"create.subtitle.mixing": "UNLOCALIZED: Mixing Noises",
|
||||
"create.subtitle.mechanical_press_activation_belt": "UNLOCALIZED: Mechanical Press bonks",
|
||||
"create.subtitle.mechanical_press_activation": "Mechanische Presse wird aktiviert",
|
||||
"create.subtitle.blockzapper_deny": "Ablehnendes Boop",
|
||||
"create.subtitle.blockzapper_confirm": "Bestätigendes Ding",
|
||||
"create.subtitle.depot_slide": "UNLOCALIZED: Item slides",
|
||||
"create.subtitle.blockzapper_place": "Blöcke zappen an Ort und Stelle",
|
||||
"create.subtitle.blaze_munch": "Lohe kaut glücklich",
|
||||
"create.subtitle.schematicannon_launch_block": "Bauplankanone schießt",
|
||||
"create.subtitle.funnel_flap": "UNLOCALIZED: Funnel Flaps",
|
||||
"create.subtitle.schematicannon_finish": "Bauplankanone endet",
|
||||
"create.subtitle.scroll_value": "UNLOCALIZED: Scroll-input clicks",
|
||||
"create.subtitle.mechanical_press_activation": "Mechanische Presse wird aktiviert",
|
||||
"create.subtitle.blockzapper_deny": "Ablehnendes Boop",
|
||||
"create.subtitle.cranking": "UNLOCALIZED: Hand Crank turns",
|
||||
"create.subtitle.depot_plop": "UNLOCALIZED: Item lands",
|
||||
|
||||
|
||||
"_": "->------------------------] Item Descriptions [------------------------<-",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"_": "Missing Localizations: 608",
|
||||
"_": "Missing Localizations: 615",
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -1154,15 +1154,22 @@
|
|||
|
||||
"_": "->------------------------] Subtitles [------------------------<-",
|
||||
|
||||
"create.subtitle.schematicannon_launch_block": "Disparos de Schematicannon",
|
||||
"create.subtitle.schematicannon_finish": "Acabados de Schematicannon",
|
||||
"create.subtitle.cogs": "UNLOCALIZED: Cogwheels rumble",
|
||||
"create.subtitle.slime_added": "Slime aplastado",
|
||||
"create.subtitle.mixing": "UNLOCALIZED: Mixing Noises",
|
||||
"create.subtitle.mechanical_press_activation_belt": "UNLOCALIZED: Mechanical Press bonks",
|
||||
"create.subtitle.mechanical_press_activation": "La Prensa Mecánica se activa",
|
||||
"create.subtitle.blockzapper_deny": "Boop declinante",
|
||||
"create.subtitle.blockzapper_confirm": "Ding afirmativo",
|
||||
"create.subtitle.depot_slide": "UNLOCALIZED: Item slides",
|
||||
"create.subtitle.blockzapper_place": "Los bloques se colocan en su sitio",
|
||||
"create.subtitle.blaze_munch": "Blaze mastica felizmente",
|
||||
"create.subtitle.schematicannon_launch_block": "Disparos de Schematicannon",
|
||||
"create.subtitle.funnel_flap": "UNLOCALIZED: Funnel Flaps",
|
||||
"create.subtitle.schematicannon_finish": "Acabados de Schematicannon",
|
||||
"create.subtitle.scroll_value": "UNLOCALIZED: Scroll-input clicks",
|
||||
"create.subtitle.mechanical_press_activation": "La Prensa Mecánica se activa",
|
||||
"create.subtitle.blockzapper_deny": "Boop declinante",
|
||||
"create.subtitle.cranking": "UNLOCALIZED: Hand Crank turns",
|
||||
"create.subtitle.depot_plop": "UNLOCALIZED: Item lands",
|
||||
|
||||
|
||||
"_": "->------------------------] Item Descriptions [------------------------<-",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"_": "Missing Localizations: 1266",
|
||||
"_": "Missing Localizations: 1273",
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -1154,15 +1154,22 @@
|
|||
|
||||
"_": "->------------------------] Subtitles [------------------------<-",
|
||||
|
||||
"create.subtitle.schematicannon_launch_block": "UNLOCALIZED: Schematicannon fires",
|
||||
"create.subtitle.schematicannon_finish": "UNLOCALIZED: Schematicannon dings",
|
||||
"create.subtitle.cogs": "UNLOCALIZED: Cogwheels rumble",
|
||||
"create.subtitle.slime_added": "UNLOCALIZED: Slime squishes",
|
||||
"create.subtitle.mixing": "UNLOCALIZED: Mixing Noises",
|
||||
"create.subtitle.mechanical_press_activation_belt": "UNLOCALIZED: Mechanical Press bonks",
|
||||
"create.subtitle.mechanical_press_activation": "UNLOCALIZED: Mechanical Press clangs",
|
||||
"create.subtitle.blockzapper_deny": "UNLOCALIZED: Declining boop",
|
||||
"create.subtitle.blockzapper_confirm": "UNLOCALIZED: Affirmative ding",
|
||||
"create.subtitle.depot_slide": "UNLOCALIZED: Item slides",
|
||||
"create.subtitle.blockzapper_place": "UNLOCALIZED: Blockzapper zaps",
|
||||
"create.subtitle.blaze_munch": "UNLOCALIZED: Blaze Burner munches",
|
||||
"create.subtitle.schematicannon_launch_block": "UNLOCALIZED: Schematicannon fires",
|
||||
"create.subtitle.funnel_flap": "UNLOCALIZED: Funnel Flaps",
|
||||
"create.subtitle.schematicannon_finish": "UNLOCALIZED: Schematicannon dings",
|
||||
"create.subtitle.scroll_value": "UNLOCALIZED: Scroll-input clicks",
|
||||
"create.subtitle.mechanical_press_activation": "UNLOCALIZED: Mechanical Press clangs",
|
||||
"create.subtitle.blockzapper_deny": "UNLOCALIZED: Declining boop",
|
||||
"create.subtitle.cranking": "UNLOCALIZED: Hand Crank turns",
|
||||
"create.subtitle.depot_plop": "UNLOCALIZED: Item lands",
|
||||
|
||||
|
||||
"_": "->------------------------] Item Descriptions [------------------------<-",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"_": "Missing Localizations: 1165",
|
||||
"_": "Missing Localizations: 1172",
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -1154,15 +1154,22 @@
|
|||
|
||||
"_": "->------------------------] Subtitles [------------------------<-",
|
||||
|
||||
"create.subtitle.schematicannon_launch_block": "Tir de schémacanon",
|
||||
"create.subtitle.schematicannon_finish": "Fin de schémacanon",
|
||||
"create.subtitle.cogs": "UNLOCALIZED: Cogwheels rumble",
|
||||
"create.subtitle.slime_added": "Bruit de slime",
|
||||
"create.subtitle.mixing": "UNLOCALIZED: Mixing Noises",
|
||||
"create.subtitle.mechanical_press_activation_belt": "UNLOCALIZED: Mechanical Press bonks",
|
||||
"create.subtitle.mechanical_press_activation": "Activation de la presse mechanique",
|
||||
"create.subtitle.blockzapper_deny": "Boop de déclin",
|
||||
"create.subtitle.blockzapper_confirm": "Ding d'affirmation",
|
||||
"create.subtitle.depot_slide": "UNLOCALIZED: Item slides",
|
||||
"create.subtitle.blockzapper_place": "Blocs se zappant en place",
|
||||
"create.subtitle.blaze_munch": "UNLOCALIZED: Blaze Burner munches",
|
||||
"create.subtitle.schematicannon_launch_block": "Tir de schémacanon",
|
||||
"create.subtitle.funnel_flap": "UNLOCALIZED: Funnel Flaps",
|
||||
"create.subtitle.schematicannon_finish": "Fin de schémacanon",
|
||||
"create.subtitle.scroll_value": "UNLOCALIZED: Scroll-input clicks",
|
||||
"create.subtitle.mechanical_press_activation": "Activation de la presse mechanique",
|
||||
"create.subtitle.blockzapper_deny": "Boop de déclin",
|
||||
"create.subtitle.cranking": "UNLOCALIZED: Hand Crank turns",
|
||||
"create.subtitle.depot_plop": "UNLOCALIZED: Item lands",
|
||||
|
||||
|
||||
"_": "->------------------------] Item Descriptions [------------------------<-",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"_": "Missing Localizations: 625",
|
||||
"_": "Missing Localizations: 632",
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -1154,15 +1154,22 @@
|
|||
|
||||
"_": "->------------------------] Subtitles [------------------------<-",
|
||||
|
||||
"create.subtitle.schematicannon_launch_block": "Tiri del cannoneschematico",
|
||||
"create.subtitle.schematicannon_finish": "Finiture cannoneschematico",
|
||||
"create.subtitle.cogs": "UNLOCALIZED: Cogwheels rumble",
|
||||
"create.subtitle.slime_added": "Slime schiacciato",
|
||||
"create.subtitle.mixing": "UNLOCALIZED: Mixing Noises",
|
||||
"create.subtitle.mechanical_press_activation_belt": "UNLOCALIZED: Mechanical Press bonks",
|
||||
"create.subtitle.mechanical_press_activation": "Pressa meccanica attiva",
|
||||
"create.subtitle.blockzapper_deny": "Boop in calo",
|
||||
"create.subtitle.blockzapper_confirm": "Ding affermativo",
|
||||
"create.subtitle.depot_slide": "UNLOCALIZED: Item slides",
|
||||
"create.subtitle.blockzapper_place": "Posiziona blocchi nello spazio",
|
||||
"create.subtitle.blaze_munch": "Il blaze lo gusta felicemente",
|
||||
"create.subtitle.schematicannon_launch_block": "Tiri del cannoneschematico",
|
||||
"create.subtitle.funnel_flap": "UNLOCALIZED: Funnel Flaps",
|
||||
"create.subtitle.schematicannon_finish": "Finiture cannoneschematico",
|
||||
"create.subtitle.scroll_value": "UNLOCALIZED: Scroll-input clicks",
|
||||
"create.subtitle.mechanical_press_activation": "Pressa meccanica attiva",
|
||||
"create.subtitle.blockzapper_deny": "Boop in calo",
|
||||
"create.subtitle.cranking": "UNLOCALIZED: Hand Crank turns",
|
||||
"create.subtitle.depot_plop": "UNLOCALIZED: Item lands",
|
||||
|
||||
|
||||
"_": "->------------------------] Item Descriptions [------------------------<-",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"_": "Missing Localizations: 607",
|
||||
"_": "Missing Localizations: 614",
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -1154,15 +1154,22 @@
|
|||
|
||||
"_": "->------------------------] Subtitles [------------------------<-",
|
||||
|
||||
"create.subtitle.schematicannon_launch_block": "概略図砲が発射する",
|
||||
"create.subtitle.schematicannon_finish": "概略図砲が作業を終える",
|
||||
"create.subtitle.cogs": "UNLOCALIZED: Cogwheels rumble",
|
||||
"create.subtitle.slime_added": "スライムがぐしゃっとつぶれる",
|
||||
"create.subtitle.mixing": "UNLOCALIZED: Mixing Noises",
|
||||
"create.subtitle.mechanical_press_activation_belt": "UNLOCALIZED: Mechanical Press bonks",
|
||||
"create.subtitle.mechanical_press_activation": "メカニカルプレスが作動する",
|
||||
"create.subtitle.blockzapper_deny": "失敗音",
|
||||
"create.subtitle.blockzapper_confirm": "成功音",
|
||||
"create.subtitle.depot_slide": "UNLOCALIZED: Item slides",
|
||||
"create.subtitle.blockzapper_place": "ブロックを発射して設置する",
|
||||
"create.subtitle.blaze_munch": "ブレイズの咀嚼音",
|
||||
"create.subtitle.schematicannon_launch_block": "概略図砲が発射する",
|
||||
"create.subtitle.funnel_flap": "UNLOCALIZED: Funnel Flaps",
|
||||
"create.subtitle.schematicannon_finish": "概略図砲が作業を終える",
|
||||
"create.subtitle.scroll_value": "UNLOCALIZED: Scroll-input clicks",
|
||||
"create.subtitle.mechanical_press_activation": "メカニカルプレスが作動する",
|
||||
"create.subtitle.blockzapper_deny": "失敗音",
|
||||
"create.subtitle.cranking": "UNLOCALIZED: Hand Crank turns",
|
||||
"create.subtitle.depot_plop": "UNLOCALIZED: Item lands",
|
||||
|
||||
|
||||
"_": "->------------------------] Item Descriptions [------------------------<-",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"_": "Missing Localizations: 678",
|
||||
"_": "Missing Localizations: 685",
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -1154,15 +1154,22 @@
|
|||
|
||||
"_": "->------------------------] Subtitles [------------------------<-",
|
||||
|
||||
"create.subtitle.schematicannon_launch_block": "청사진 대포가 발포함",
|
||||
"create.subtitle.schematicannon_finish": "청사진 대포가 끝남",
|
||||
"create.subtitle.cogs": "UNLOCALIZED: Cogwheels rumble",
|
||||
"create.subtitle.slime_added": "슬라임이 철퍽거림",
|
||||
"create.subtitle.mixing": "UNLOCALIZED: Mixing Noises",
|
||||
"create.subtitle.mechanical_press_activation_belt": "UNLOCALIZED: Mechanical Press bonks",
|
||||
"create.subtitle.mechanical_press_activation": "압착기가 가동됨",
|
||||
"create.subtitle.blockzapper_deny": "취소 효과음",
|
||||
"create.subtitle.blockzapper_confirm": "확인 효과음",
|
||||
"create.subtitle.depot_slide": "UNLOCALIZED: Item slides",
|
||||
"create.subtitle.blockzapper_place": "블록이 순간이동됨",
|
||||
"create.subtitle.blaze_munch": "블레이즈가 행복하게 섭취함",
|
||||
"create.subtitle.schematicannon_launch_block": "청사진 대포가 발포함",
|
||||
"create.subtitle.funnel_flap": "UNLOCALIZED: Funnel Flaps",
|
||||
"create.subtitle.schematicannon_finish": "청사진 대포가 끝남",
|
||||
"create.subtitle.scroll_value": "UNLOCALIZED: Scroll-input clicks",
|
||||
"create.subtitle.mechanical_press_activation": "압착기가 가동됨",
|
||||
"create.subtitle.blockzapper_deny": "취소 효과음",
|
||||
"create.subtitle.cranking": "UNLOCALIZED: Hand Crank turns",
|
||||
"create.subtitle.depot_plop": "UNLOCALIZED: Item lands",
|
||||
|
||||
|
||||
"_": "->------------------------] Item Descriptions [------------------------<-",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"_": "Missing Localizations: 1555",
|
||||
"_": "Missing Localizations: 1562",
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -1154,15 +1154,22 @@
|
|||
|
||||
"_": "->------------------------] Subtitles [------------------------<-",
|
||||
|
||||
"create.subtitle.schematicannon_launch_block": "UNLOCALIZED: Schematicannon fires",
|
||||
"create.subtitle.schematicannon_finish": "UNLOCALIZED: Schematicannon dings",
|
||||
"create.subtitle.cogs": "UNLOCALIZED: Cogwheels rumble",
|
||||
"create.subtitle.slime_added": "UNLOCALIZED: Slime squishes",
|
||||
"create.subtitle.mixing": "UNLOCALIZED: Mixing Noises",
|
||||
"create.subtitle.mechanical_press_activation_belt": "UNLOCALIZED: Mechanical Press bonks",
|
||||
"create.subtitle.mechanical_press_activation": "UNLOCALIZED: Mechanical Press clangs",
|
||||
"create.subtitle.blockzapper_deny": "UNLOCALIZED: Declining boop",
|
||||
"create.subtitle.blockzapper_confirm": "UNLOCALIZED: Affirmative ding",
|
||||
"create.subtitle.depot_slide": "UNLOCALIZED: Item slides",
|
||||
"create.subtitle.blockzapper_place": "UNLOCALIZED: Blockzapper zaps",
|
||||
"create.subtitle.blaze_munch": "UNLOCALIZED: Blaze Burner munches",
|
||||
"create.subtitle.schematicannon_launch_block": "UNLOCALIZED: Schematicannon fires",
|
||||
"create.subtitle.funnel_flap": "UNLOCALIZED: Funnel Flaps",
|
||||
"create.subtitle.schematicannon_finish": "UNLOCALIZED: Schematicannon dings",
|
||||
"create.subtitle.scroll_value": "UNLOCALIZED: Scroll-input clicks",
|
||||
"create.subtitle.mechanical_press_activation": "UNLOCALIZED: Mechanical Press clangs",
|
||||
"create.subtitle.blockzapper_deny": "UNLOCALIZED: Declining boop",
|
||||
"create.subtitle.cranking": "UNLOCALIZED: Hand Crank turns",
|
||||
"create.subtitle.depot_plop": "UNLOCALIZED: Item lands",
|
||||
|
||||
|
||||
"_": "->------------------------] Item Descriptions [------------------------<-",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"_": "Missing Localizations: 1609",
|
||||
"_": "Missing Localizations: 1616",
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -1154,15 +1154,22 @@
|
|||
|
||||
"_": "->------------------------] Subtitles [------------------------<-",
|
||||
|
||||
"create.subtitle.schematicannon_launch_block": "UNLOCALIZED: Schematicannon fires",
|
||||
"create.subtitle.schematicannon_finish": "UNLOCALIZED: Schematicannon dings",
|
||||
"create.subtitle.cogs": "UNLOCALIZED: Cogwheels rumble",
|
||||
"create.subtitle.slime_added": "UNLOCALIZED: Slime squishes",
|
||||
"create.subtitle.mixing": "UNLOCALIZED: Mixing Noises",
|
||||
"create.subtitle.mechanical_press_activation_belt": "UNLOCALIZED: Mechanical Press bonks",
|
||||
"create.subtitle.mechanical_press_activation": "UNLOCALIZED: Mechanical Press clangs",
|
||||
"create.subtitle.blockzapper_deny": "UNLOCALIZED: Declining boop",
|
||||
"create.subtitle.blockzapper_confirm": "UNLOCALIZED: Affirmative ding",
|
||||
"create.subtitle.depot_slide": "UNLOCALIZED: Item slides",
|
||||
"create.subtitle.blockzapper_place": "UNLOCALIZED: Blockzapper zaps",
|
||||
"create.subtitle.blaze_munch": "UNLOCALIZED: Blaze Burner munches",
|
||||
"create.subtitle.schematicannon_launch_block": "UNLOCALIZED: Schematicannon fires",
|
||||
"create.subtitle.funnel_flap": "UNLOCALIZED: Funnel Flaps",
|
||||
"create.subtitle.schematicannon_finish": "UNLOCALIZED: Schematicannon dings",
|
||||
"create.subtitle.scroll_value": "UNLOCALIZED: Scroll-input clicks",
|
||||
"create.subtitle.mechanical_press_activation": "UNLOCALIZED: Mechanical Press clangs",
|
||||
"create.subtitle.blockzapper_deny": "UNLOCALIZED: Declining boop",
|
||||
"create.subtitle.cranking": "UNLOCALIZED: Hand Crank turns",
|
||||
"create.subtitle.depot_plop": "UNLOCALIZED: Item lands",
|
||||
|
||||
|
||||
"_": "->------------------------] Item Descriptions [------------------------<-",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"_": "Missing Localizations: 522",
|
||||
"_": "Missing Localizations: 529",
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -1154,15 +1154,22 @@
|
|||
|
||||
"_": "->------------------------] Subtitles [------------------------<-",
|
||||
|
||||
"create.subtitle.schematicannon_launch_block": "Выстрелы схематичной пушки",
|
||||
"create.subtitle.schematicannon_finish": "Схематичная пушка закончила работу",
|
||||
"create.subtitle.cogs": "UNLOCALIZED: Cogwheels rumble",
|
||||
"create.subtitle.slime_added": "Намазывание слизи",
|
||||
"create.subtitle.mixing": "UNLOCALIZED: Mixing Noises",
|
||||
"create.subtitle.mechanical_press_activation_belt": "UNLOCALIZED: Mechanical Press bonks",
|
||||
"create.subtitle.mechanical_press_activation": "Механический пресс активирован",
|
||||
"create.subtitle.blockzapper_deny": "Тихий буп",
|
||||
"create.subtitle.blockzapper_confirm": "Утвердительный динь",
|
||||
"create.subtitle.depot_slide": "UNLOCALIZED: Item slides",
|
||||
"create.subtitle.blockzapper_place": "Блок запрыгивает на место",
|
||||
"create.subtitle.blaze_munch": "Всполох радостно жуёт",
|
||||
"create.subtitle.schematicannon_launch_block": "Выстрелы схематичной пушки",
|
||||
"create.subtitle.funnel_flap": "UNLOCALIZED: Funnel Flaps",
|
||||
"create.subtitle.schematicannon_finish": "Схематичная пушка закончила работу",
|
||||
"create.subtitle.scroll_value": "UNLOCALIZED: Scroll-input clicks",
|
||||
"create.subtitle.mechanical_press_activation": "Механический пресс активирован",
|
||||
"create.subtitle.blockzapper_deny": "Тихий буп",
|
||||
"create.subtitle.cranking": "UNLOCALIZED: Hand Crank turns",
|
||||
"create.subtitle.depot_plop": "UNLOCALIZED: Item lands",
|
||||
|
||||
|
||||
"_": "->------------------------] Item Descriptions [------------------------<-",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"_": "Missing Localizations: 622",
|
||||
"_": "Missing Localizations: 629",
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -1154,15 +1154,22 @@
|
|||
|
||||
"_": "->------------------------] Subtitles [------------------------<-",
|
||||
|
||||
"create.subtitle.schematicannon_launch_block": "蓝图加农炮:发射",
|
||||
"create.subtitle.schematicannon_finish": "蓝图加农炮:完成任务",
|
||||
"create.subtitle.cogs": "UNLOCALIZED: Cogwheels rumble",
|
||||
"create.subtitle.slime_added": "粘液:挤碎声",
|
||||
"create.subtitle.mixing": "UNLOCALIZED: Mixing Noises",
|
||||
"create.subtitle.mechanical_press_activation_belt": "UNLOCALIZED: Mechanical Press bonks",
|
||||
"create.subtitle.mechanical_press_activation": "辊压机:工作中",
|
||||
"create.subtitle.blockzapper_deny": "放置失败",
|
||||
"create.subtitle.blockzapper_confirm": "选择方块",
|
||||
"create.subtitle.depot_slide": "UNLOCALIZED: Item slides",
|
||||
"create.subtitle.blockzapper_place": "放置方块",
|
||||
"create.subtitle.blaze_munch": "烈焰人:开心地咀嚼着",
|
||||
"create.subtitle.schematicannon_launch_block": "蓝图加农炮:发射",
|
||||
"create.subtitle.funnel_flap": "UNLOCALIZED: Funnel Flaps",
|
||||
"create.subtitle.schematicannon_finish": "蓝图加农炮:完成任务",
|
||||
"create.subtitle.scroll_value": "UNLOCALIZED: Scroll-input clicks",
|
||||
"create.subtitle.mechanical_press_activation": "辊压机:工作中",
|
||||
"create.subtitle.blockzapper_deny": "放置失败",
|
||||
"create.subtitle.cranking": "UNLOCALIZED: Hand Crank turns",
|
||||
"create.subtitle.depot_plop": "UNLOCALIZED: Item lands",
|
||||
|
||||
|
||||
"_": "->------------------------] Item Descriptions [------------------------<-",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"_": "Missing Localizations: 627",
|
||||
"_": "Missing Localizations: 634",
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -1154,15 +1154,22 @@
|
|||
|
||||
"_": "->------------------------] Subtitles [------------------------<-",
|
||||
|
||||
"create.subtitle.schematicannon_launch_block": "藍圖大炮發射",
|
||||
"create.subtitle.schematicannon_finish": "藍圖大炮完成任務",
|
||||
"create.subtitle.cogs": "UNLOCALIZED: Cogwheels rumble",
|
||||
"create.subtitle.slime_added": "黏液擠壓",
|
||||
"create.subtitle.mixing": "UNLOCALIZED: Mixing Noises",
|
||||
"create.subtitle.mechanical_press_activation_belt": "UNLOCALIZED: Mechanical Press bonks",
|
||||
"create.subtitle.mechanical_press_activation": "液壓機工作",
|
||||
"create.subtitle.blockzapper_deny": "放置失敗",
|
||||
"create.subtitle.blockzapper_confirm": "選擇方塊",
|
||||
"create.subtitle.depot_slide": "UNLOCALIZED: Item slides",
|
||||
"create.subtitle.blockzapper_place": "放置方塊",
|
||||
"create.subtitle.blaze_munch": "烈焰使者開心地吃著",
|
||||
"create.subtitle.schematicannon_launch_block": "藍圖大炮發射",
|
||||
"create.subtitle.funnel_flap": "UNLOCALIZED: Funnel Flaps",
|
||||
"create.subtitle.schematicannon_finish": "藍圖大炮完成任務",
|
||||
"create.subtitle.scroll_value": "UNLOCALIZED: Scroll-input clicks",
|
||||
"create.subtitle.mechanical_press_activation": "液壓機工作",
|
||||
"create.subtitle.blockzapper_deny": "放置失敗",
|
||||
"create.subtitle.cranking": "UNLOCALIZED: Hand Crank turns",
|
||||
"create.subtitle.depot_plop": "UNLOCALIZED: Item lands",
|
||||
|
||||
|
||||
"_": "->------------------------] Item Descriptions [------------------------<-",
|
||||
|
|
|
@ -35,6 +35,64 @@
|
|||
],
|
||||
"subtitle": "create.subtitle.blockzapper_place"
|
||||
},
|
||||
"cogs": {
|
||||
"sounds": [
|
||||
"create:cogs"
|
||||
],
|
||||
"subtitle": "create.subtitle.cogs"
|
||||
},
|
||||
"cranking": {
|
||||
"sounds": [
|
||||
{
|
||||
"name": "minecraft:block.wood.place",
|
||||
"type": "event"
|
||||
}
|
||||
],
|
||||
"subtitle": "create.subtitle.cranking"
|
||||
},
|
||||
"cranking_compounded_1": {
|
||||
"sounds": [
|
||||
{
|
||||
"name": "minecraft:block.wooden_button.click_off",
|
||||
"type": "event"
|
||||
}
|
||||
]
|
||||
},
|
||||
"depot_plop": {
|
||||
"sounds": [
|
||||
{
|
||||
"name": "minecraft:entity.item_frame.add_item",
|
||||
"type": "event"
|
||||
}
|
||||
],
|
||||
"subtitle": "create.subtitle.depot_plop"
|
||||
},
|
||||
"depot_slide": {
|
||||
"sounds": [
|
||||
{
|
||||
"name": "minecraft:block.sand.break",
|
||||
"type": "event"
|
||||
}
|
||||
],
|
||||
"subtitle": "create.subtitle.depot_slide"
|
||||
},
|
||||
"funnel_flap": {
|
||||
"sounds": [
|
||||
{
|
||||
"name": "minecraft:entity.item_frame.rotate_item",
|
||||
"type": "event"
|
||||
}
|
||||
],
|
||||
"subtitle": "create.subtitle.funnel_flap"
|
||||
},
|
||||
"funnel_flap_compounded_1": {
|
||||
"sounds": [
|
||||
{
|
||||
"name": "minecraft:block.wool.break",
|
||||
"type": "event"
|
||||
}
|
||||
]
|
||||
},
|
||||
"mechanical_press_activation": {
|
||||
"sounds": [
|
||||
{
|
||||
|
@ -69,6 +127,23 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
"mixing": {
|
||||
"sounds": [
|
||||
{
|
||||
"name": "minecraft:block.gilded_blackstone.break",
|
||||
"type": "event"
|
||||
}
|
||||
],
|
||||
"subtitle": "create.subtitle.mixing"
|
||||
},
|
||||
"mixing_compounded_1": {
|
||||
"sounds": [
|
||||
{
|
||||
"name": "minecraft:block.netherrack.break",
|
||||
"type": "event"
|
||||
}
|
||||
]
|
||||
},
|
||||
"schematicannon_finish": {
|
||||
"sounds": [
|
||||
{
|
||||
|
@ -87,6 +162,15 @@
|
|||
],
|
||||
"subtitle": "create.subtitle.schematicannon_launch_block"
|
||||
},
|
||||
"scroll_value": {
|
||||
"sounds": [
|
||||
{
|
||||
"name": "minecraft:block.note_block.hat",
|
||||
"type": "event"
|
||||
}
|
||||
],
|
||||
"subtitle": "create.subtitle.scroll_value"
|
||||
},
|
||||
"slime_added": {
|
||||
"sounds": [
|
||||
{
|
||||
|
|
|
@ -448,6 +448,7 @@ public class AllBlocks {
|
|||
|
||||
public static final BlockEntry<BasinBlock> BASIN = REGISTRATE.block("basin", BasinBlock::new)
|
||||
.initialProperties(SharedProperties::stone)
|
||||
.properties(p -> p.sound(SoundType.NETHERITE))
|
||||
.blockstate(new BasinGenerator()::generate)
|
||||
.onRegister(addMovementBehaviour(new BasinMovementBehaviour()))
|
||||
.item()
|
||||
|
@ -497,6 +498,7 @@ public class AllBlocks {
|
|||
|
||||
public static final BlockEntry<ChuteBlock> CHUTE = REGISTRATE.block("chute", ChuteBlock::new)
|
||||
.initialProperties(SharedProperties::softMetal)
|
||||
.properties(p -> p.sound(SoundType.NETHERITE))
|
||||
.addLayer(() -> RenderType::getCutoutMipped)
|
||||
.blockstate(new ChuteGenerator()::generate)
|
||||
.item(ChuteItem::new)
|
||||
|
@ -505,6 +507,7 @@ public class AllBlocks {
|
|||
|
||||
public static final BlockEntry<SmartChuteBlock> SMART_CHUTE = REGISTRATE.block("smart_chute", SmartChuteBlock::new)
|
||||
.initialProperties(SharedProperties::softMetal)
|
||||
.properties(p -> p.sound(SoundType.NETHERITE))
|
||||
.blockstate((c, p) -> BlockStateGen.simpleBlock(c, p, AssetLookup.forPowered(c, p)))
|
||||
.item()
|
||||
.transform(customItemModel("_", "block"))
|
||||
|
|
|
@ -45,6 +45,22 @@ public class AllSoundEvents {
|
|||
.category(SoundCategory.BLOCKS)
|
||||
.build(),
|
||||
|
||||
DEPOT_SLIDE = create("depot_slide").subtitle("Item slides")
|
||||
.playExisting(SoundEvents.BLOCK_SAND_BREAK, .125f, 1.5f)
|
||||
.category(SoundCategory.BLOCKS)
|
||||
.build(),
|
||||
|
||||
DEPOT_PLOP = create("depot_plop").subtitle("Item lands")
|
||||
.playExisting(SoundEvents.ENTITY_ITEM_FRAME_ADD_ITEM, .25f, 1.25f)
|
||||
.category(SoundCategory.BLOCKS)
|
||||
.build(),
|
||||
|
||||
FUNNEL_FLAP = create("funnel_flap").subtitle("Funnel Flaps")
|
||||
.playExisting(SoundEvents.ENTITY_ITEM_FRAME_ROTATE_ITEM, .125f, 1.5f)
|
||||
.playExisting(SoundEvents.BLOCK_WOOL_BREAK, .0425f, .75f)
|
||||
.category(SoundCategory.BLOCKS)
|
||||
.build(),
|
||||
|
||||
SLIME_ADDED = create("slime_added").subtitle("Slime squishes")
|
||||
.playExisting(SoundEvents.BLOCK_SLIME_BLOCK_PLACE)
|
||||
.category(SoundCategory.BLOCKS)
|
||||
|
@ -63,11 +79,28 @@ public class AllSoundEvents {
|
|||
.category(SoundCategory.BLOCKS)
|
||||
.build(),
|
||||
|
||||
MIXING = create("mixing").subtitle("Mixing Noises")
|
||||
.playExisting(SoundEvents.BLOCK_GILDED_BLACKSTONE_BREAK, .125f, .5f)
|
||||
.playExisting(SoundEvents.BLOCK_NETHERRACK_BREAK, .125f, .5f)
|
||||
.category(SoundCategory.BLOCKS)
|
||||
.build(),
|
||||
|
||||
CRANKING = create("cranking").subtitle("Hand Crank turns")
|
||||
.playExisting(SoundEvents.BLOCK_WOOD_PLACE, .075f, .5f)
|
||||
.playExisting(SoundEvents.BLOCK_WOODEN_BUTTON_CLICK_OFF, .025f, .5f)
|
||||
.category(SoundCategory.BLOCKS)
|
||||
.build(),
|
||||
|
||||
BLOCKZAPPER_PLACE = create("blockzapper_place").subtitle("Blockzapper zaps")
|
||||
.playExisting(SoundEvents.BLOCK_NOTE_BLOCK_BASEDRUM)
|
||||
.category(SoundCategory.PLAYERS)
|
||||
.build(),
|
||||
|
||||
SCROLL_VALUE = create("scroll_value").subtitle("Scroll-input clicks")
|
||||
.playExisting(SoundEvents.BLOCK_NOTE_BLOCK_HAT, .124f, 1f)
|
||||
.category(SoundCategory.PLAYERS)
|
||||
.build(),
|
||||
|
||||
BLOCKZAPPER_CONFIRM = create("blockzapper_confirm").subtitle("Affirmative ding")
|
||||
.playExisting(SoundEvents.BLOCK_NOTE_BLOCK_BELL, 0.5f, 0.8f)
|
||||
.category(SoundCategory.PLAYERS)
|
||||
|
@ -78,6 +111,10 @@ public class AllSoundEvents {
|
|||
.category(SoundCategory.PLAYERS)
|
||||
.build(),
|
||||
|
||||
COGS = create("cogs").subtitle("Cogwheels rumble")
|
||||
.category(SoundCategory.BLOCKS)
|
||||
.build(),
|
||||
|
||||
BLAZE_MUNCH = create("blaze_munch").subtitle("Blaze Burner munches")
|
||||
.playExisting(SoundEvents.ENTITY_GENERIC_EAT, .5f, 1f)
|
||||
.category(SoundCategory.BLOCKS)
|
||||
|
@ -212,6 +249,8 @@ public class AllSoundEvents {
|
|||
|
||||
public abstract void write(JsonObject json);
|
||||
|
||||
public abstract SoundEvent getMainEvent();
|
||||
|
||||
public String getSubtitleKey() {
|
||||
return Create.ID + ".subtitle." + id;
|
||||
}
|
||||
|
@ -255,6 +294,12 @@ public class AllSoundEvents {
|
|||
|
||||
abstract void play(World world, PlayerEntity entity, double x, double y, double z, float volume, float pitch);
|
||||
|
||||
public void playAt(World world, BlockPos pos, float volume, float pitch, boolean fade) {
|
||||
playAt(world, pos.getX() + .5f, pos.getY() + .5f, pos.getZ() + .5f, volume, pitch, fade);
|
||||
}
|
||||
|
||||
public abstract void playAt(World world, double x, double y, double z, float volume, float pitch, boolean fade);
|
||||
|
||||
}
|
||||
|
||||
static class WrappedSoundEntry extends SoundEntry {
|
||||
|
@ -280,6 +325,12 @@ public class AllSoundEvents {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public SoundEvent getMainEvent() {
|
||||
return compiledEvents.get(0)
|
||||
.getFirst();
|
||||
}
|
||||
|
||||
protected String getIdOf(int i) {
|
||||
return i == 0 ? id : id + "_compounded_" + i;
|
||||
}
|
||||
|
@ -311,6 +362,15 @@ public class AllSoundEvents {
|
|||
volPitch.getSecond() * pitch);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void playAt(World world, double x, double y, double z, float volume, float pitch, boolean fade) {
|
||||
for (Pair<SoundEvent, Couple<Float>> pair : compiledEvents) {
|
||||
Couple<Float> volPitch = pair.getSecond();
|
||||
world.playSound(x, y, z, pair.getFirst(), category, volPitch.getFirst() * volume,
|
||||
volPitch.getSecond() * pitch, fade);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static class CustomSoundEntry extends SoundEntry {
|
||||
|
@ -324,8 +384,12 @@ public class AllSoundEvents {
|
|||
@Override
|
||||
public void register(IForgeRegistry<SoundEvent> registry) {
|
||||
ResourceLocation location = getLocation();
|
||||
SoundEvent sound = new SoundEvent(location).setRegistryName(location);
|
||||
registry.register(sound);
|
||||
registry.register(event = new SoundEvent(location).setRegistryName(location));
|
||||
}
|
||||
|
||||
@Override
|
||||
public SoundEvent getMainEvent() {
|
||||
return event;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -343,6 +407,11 @@ public class AllSoundEvents {
|
|||
world.playSound(entity, x, y, z, event, category, volume, pitch);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void playAt(World world, double x, double y, double z, float volume, float pitch, boolean fade) {
|
||||
world.playSound(x, y, z, event, category, volume, pitch, fade);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -15,10 +15,12 @@ import com.simibubi.create.content.contraptions.base.IRotate.StressImpact;
|
|||
import com.simibubi.create.content.contraptions.goggles.IHaveGoggleInformation;
|
||||
import com.simibubi.create.content.contraptions.goggles.IHaveHoveringInformation;
|
||||
import com.simibubi.create.content.contraptions.relays.elementary.ICogWheel;
|
||||
import com.simibubi.create.content.contraptions.relays.gearbox.GearboxBlock;
|
||||
import com.simibubi.create.foundation.config.AllConfigs;
|
||||
import com.simibubi.create.foundation.item.TooltipHelper;
|
||||
import com.simibubi.create.foundation.render.backend.FastRenderDispatcher;
|
||||
import com.simibubi.create.foundation.render.backend.instancing.IInstanceRendered;
|
||||
import com.simibubi.create.foundation.sound.SoundScapes;
|
||||
import com.simibubi.create.foundation.tileEntity.SmartTileEntity;
|
||||
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
||||
import com.simibubi.create.foundation.utility.Lang;
|
||||
|
@ -36,12 +38,14 @@ import net.minecraft.util.Direction.Axis;
|
|||
import net.minecraft.util.Direction.AxisDirection;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.text.StringTextComponent;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.minecraftforge.fml.DistExecutor;
|
||||
|
||||
public abstract class KineticTileEntity extends SmartTileEntity
|
||||
implements ITickableTileEntity, IHaveGoggleInformation, IHaveHoveringInformation, IInstanceRendered {
|
||||
|
@ -93,6 +97,7 @@ public abstract class KineticTileEntity extends SmartTileEntity
|
|||
|
||||
if (world.isRemote) {
|
||||
cachedBoundingBox = null; // cache the bounding box for every frame between ticks
|
||||
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> this.tickAudio());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -391,21 +396,28 @@ public abstract class KineticTileEntity extends SmartTileEntity
|
|||
boolean notFastEnough = !isSpeedRequirementFulfilled() && getSpeed() != 0;
|
||||
|
||||
if (overStressed && AllConfigs.CLIENT.enableOverstressedTooltip.get()) {
|
||||
tooltip.add(componentSpacing.copy().append(Lang.translate("gui.stressometer.overstressed").formatted(GOLD)));
|
||||
tooltip.add(componentSpacing.copy()
|
||||
.append(Lang.translate("gui.stressometer.overstressed")
|
||||
.formatted(GOLD)));
|
||||
ITextComponent hint = Lang.translate("gui.contraptions.network_overstressed");
|
||||
List<ITextComponent> cutString = TooltipHelper.cutTextComponent(hint, GRAY, TextFormatting.WHITE);
|
||||
for (int i = 0; i < cutString.size(); i++)
|
||||
tooltip.add(componentSpacing.copy().append(cutString.get(i)));
|
||||
tooltip.add(componentSpacing.copy()
|
||||
.append(cutString.get(i)));
|
||||
return true;
|
||||
}
|
||||
|
||||
if (notFastEnough) {
|
||||
tooltip.add(componentSpacing.copy().append(Lang.translate("tooltip.speedRequirement").formatted(GOLD)));
|
||||
ITextComponent hint = Lang.translate("gui.contraptions.not_fast_enough", I18n.format(getBlockState().getBlock()
|
||||
.getTranslationKey()));
|
||||
tooltip.add(componentSpacing.copy()
|
||||
.append(Lang.translate("tooltip.speedRequirement")
|
||||
.formatted(GOLD)));
|
||||
ITextComponent hint =
|
||||
Lang.translate("gui.contraptions.not_fast_enough", I18n.format(getBlockState().getBlock()
|
||||
.getTranslationKey()));
|
||||
List<ITextComponent> cutString = TooltipHelper.cutTextComponent(hint, GRAY, TextFormatting.WHITE);
|
||||
for (int i = 0; i < cutString.size(); i++)
|
||||
tooltip.add(componentSpacing.copy().append(cutString.get(i)));
|
||||
tooltip.add(componentSpacing.copy()
|
||||
.append(cutString.get(i)));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -418,13 +430,21 @@ public abstract class KineticTileEntity extends SmartTileEntity
|
|||
float stressAtBase = calculateStressApplied();
|
||||
|
||||
if (calculateStressApplied() != 0 && StressImpact.isEnabled()) {
|
||||
tooltip.add(componentSpacing.copy().append(Lang.translate("gui.goggles.kinetic_stats")));
|
||||
tooltip.add(componentSpacing.copy().append(Lang.translate("tooltip.stressImpact").formatted(TextFormatting.GRAY)));
|
||||
tooltip.add(componentSpacing.copy()
|
||||
.append(Lang.translate("gui.goggles.kinetic_stats")));
|
||||
tooltip.add(componentSpacing.copy()
|
||||
.append(Lang.translate("tooltip.stressImpact")
|
||||
.formatted(TextFormatting.GRAY)));
|
||||
|
||||
float stressTotal = stressAtBase * Math.abs(getTheoreticalSpeed());
|
||||
|
||||
tooltip.add(componentSpacing.copy().append(new StringTextComponent(" " + IHaveGoggleInformation.format(stressTotal))
|
||||
.append(Lang.translate("generic.unit.stress")).append(" ").formatted(TextFormatting.AQUA)).append(Lang.translate("gui.goggles.at_current_speed").formatted(TextFormatting.DARK_GRAY)));
|
||||
tooltip.add(componentSpacing.copy()
|
||||
.append(new StringTextComponent(" " + IHaveGoggleInformation.format(stressTotal))
|
||||
.append(Lang.translate("generic.unit.stress"))
|
||||
.append(" ")
|
||||
.formatted(TextFormatting.AQUA))
|
||||
.append(Lang.translate("gui.goggles.at_current_speed")
|
||||
.formatted(TextFormatting.DARK_GRAY)));
|
||||
|
||||
added = true;
|
||||
}
|
||||
|
@ -537,6 +557,7 @@ public abstract class KineticTileEntity extends SmartTileEntity
|
|||
}
|
||||
|
||||
protected AxisAlignedBB cachedBoundingBox;
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
if (cachedBoundingBox == null) {
|
||||
|
@ -548,4 +569,24 @@ public abstract class KineticTileEntity extends SmartTileEntity
|
|||
protected AxisAlignedBB makeRenderBoundingBox() {
|
||||
return super.getRenderBoundingBox();
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public void tickAudio() {
|
||||
float componentSpeed = Math.abs(getSpeed());
|
||||
if (componentSpeed == 0)
|
||||
return;
|
||||
float pitch = MathHelper.clamp((componentSpeed / 256f) + .45f, .5f, 1.25f);
|
||||
|
||||
if (isNoisy())
|
||||
SoundScapes.playGeneralKineticAmbience(pos, pitch);
|
||||
|
||||
Block block = getBlockState().getBlock();
|
||||
if (ICogWheel.isSmallCog(block) || ICogWheel.isSmallCog(block) || block instanceof GearboxBlock)
|
||||
SoundScapes.playCogwheelAmbience(pos, pitch);
|
||||
}
|
||||
|
||||
protected boolean isNoisy() {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
package com.simibubi.create.content.contraptions.components.crank;
|
||||
|
||||
import com.simibubi.create.AllBlocks;
|
||||
import com.simibubi.create.AllSoundEvents;
|
||||
import com.simibubi.create.content.contraptions.base.GeneratingKineticTileEntity;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
|
@ -78,4 +80,15 @@ public class HandCrankTileEntity extends GeneratingKineticTileEntity {
|
|||
public boolean shouldRenderAsTE() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tickAudio() {
|
||||
super.tickAudio();
|
||||
if (inUse > 0 && AnimationTickHolder.getTicks() % 2 == 0) {
|
||||
if (!AllBlocks.HAND_CRANK.has(getBlockState()))
|
||||
return;
|
||||
AllSoundEvents.CRANKING.playAt(world, pos, (inUse) / 5f, .65f + (10 - inUse) / 10f, true);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -19,6 +19,7 @@ import com.simibubi.create.foundation.utility.Iterate;
|
|||
import com.simibubi.create.foundation.utility.VecHelper;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.entity.item.ItemEntity;
|
||||
|
@ -39,6 +40,9 @@ import net.minecraft.util.math.shapes.VoxelShapes;
|
|||
import net.minecraft.util.math.vector.Vector3d;
|
||||
import net.minecraft.util.math.vector.Vector3i;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.minecraftforge.fml.DistExecutor;
|
||||
|
||||
public class AirCurrent {
|
||||
|
||||
|
@ -58,6 +62,8 @@ public class AirCurrent {
|
|||
new ArrayList<>();
|
||||
protected List<Entity> caughtEntities = new ArrayList<>();
|
||||
|
||||
static boolean isClientPlayerInAirCurrent;
|
||||
|
||||
public AirCurrent(IAirCurrentSource source) {
|
||||
this.source = source;
|
||||
}
|
||||
|
@ -70,7 +76,8 @@ public class AirCurrent {
|
|||
if (world != null && world.isRemote) {
|
||||
float offset = pushing ? 0.5f : maxDistance + .5f;
|
||||
Vector3d pos = VecHelper.getCenterOf(source.getAirCurrentPos())
|
||||
.add(Vector3d.of(facing.getDirectionVec()).scale(offset));
|
||||
.add(Vector3d.of(facing.getDirectionVec())
|
||||
.scale(offset));
|
||||
if (world.rand.nextFloat() < AllConfigs.CLIENT.fanParticleDensity.get())
|
||||
world.addParticle(new AirFlowParticleData(source.getAirCurrentPos()), pos.x, pos.y, pos.z, 0, 0, 0);
|
||||
}
|
||||
|
@ -108,6 +115,8 @@ public class AirCurrent {
|
|||
|
||||
entity.setMotion(previousMotion.add(new Vector3d(xIn, yIn, zIn).scale(1 / 8f)));
|
||||
entity.fallDistance = 0;
|
||||
DistExecutor.unsafeRunWhenOn(Dist.CLIENT,
|
||||
() -> () -> enableClientPlayerSound(entity, MathHelper.clamp(speed / 128f * .4f, 0.01f, .4f)));
|
||||
|
||||
if (entity instanceof ServerPlayerEntity)
|
||||
((ServerPlayerEntity) entity).connection.floatingTickCount = 0;
|
||||
|
@ -115,7 +124,8 @@ public class AirCurrent {
|
|||
entityDistance -= .5f;
|
||||
InWorldProcessing.Type processingType = getSegmentAt((float) entityDistance);
|
||||
if (entity instanceof ServerPlayerEntity)
|
||||
AllTriggers.triggerFor(AllTriggers.FAN_PROCESSING.constructTriggerFor(processingType), (PlayerEntity) entity);
|
||||
AllTriggers.triggerFor(AllTriggers.FAN_PROCESSING.constructTriggerFor(processingType),
|
||||
(PlayerEntity) entity);
|
||||
|
||||
if (processingType == null || processingType == Type.NONE) {
|
||||
continue;
|
||||
|
@ -343,7 +353,40 @@ public class AirCurrent {
|
|||
InWorldProcessing.Type type;
|
||||
int startOffset;
|
||||
int endOffset;
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
static AirCurrentSound flyingSound;
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
private static void enableClientPlayerSound(Entity e, float maxVolume) {
|
||||
if (e != Minecraft.getInstance()
|
||||
.getRenderViewEntity())
|
||||
return;
|
||||
|
||||
isClientPlayerInAirCurrent = true;
|
||||
|
||||
float pitch = (float) MathHelper.clamp(e.getMotion()
|
||||
.length() * .5f, .5f, 2f);
|
||||
|
||||
if (flyingSound == null || flyingSound.isDonePlaying()) {
|
||||
flyingSound = new AirCurrentSound(SoundEvents.ITEM_ELYTRA_FLYING, pitch);
|
||||
Minecraft.getInstance()
|
||||
.getSoundHandler()
|
||||
.play(flyingSound);
|
||||
}
|
||||
flyingSound.setPitch(pitch);
|
||||
flyingSound.fadeIn(maxVolume);
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public static void tickClientPlayerSounds() {
|
||||
if (!AirCurrent.isClientPlayerInAirCurrent && flyingSound != null)
|
||||
if (flyingSound.isFaded())
|
||||
flyingSound.stop();
|
||||
else
|
||||
flyingSound.fadeOut();
|
||||
isClientPlayerInAirCurrent = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
package com.simibubi.create.content.contraptions.components.fan;
|
||||
|
||||
import net.minecraft.client.audio.TickableSound;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.SoundEvent;
|
||||
|
||||
public class AirCurrentSound extends TickableSound {
|
||||
|
||||
private float pitch;
|
||||
|
||||
protected AirCurrentSound(SoundEvent p_i46532_1_, float pitch) {
|
||||
super(p_i46532_1_, SoundCategory.BLOCKS);
|
||||
this.pitch = pitch;
|
||||
volume = 0.01f;
|
||||
repeat = true;
|
||||
repeatDelay = 0;
|
||||
global = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {}
|
||||
|
||||
public void setPitch(float pitch) {
|
||||
this.pitch = pitch;
|
||||
}
|
||||
|
||||
public void fadeIn(float maxVolume) {
|
||||
volume = Math.min(maxVolume, volume + .05f);
|
||||
}
|
||||
|
||||
public void fadeOut() {
|
||||
volume = Math.max(0, volume - .05f);
|
||||
}
|
||||
|
||||
public boolean isFaded() {
|
||||
return volume == 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getPitch() {
|
||||
return pitch;
|
||||
}
|
||||
|
||||
public void stop() {
|
||||
setDone();
|
||||
}
|
||||
|
||||
}
|
|
@ -4,6 +4,7 @@ import java.util.List;
|
|||
import java.util.Optional;
|
||||
|
||||
import com.simibubi.create.AllRecipeTypes;
|
||||
import com.simibubi.create.AllSoundEvents;
|
||||
import com.simibubi.create.content.contraptions.fluids.FluidFX;
|
||||
import com.simibubi.create.content.contraptions.fluids.recipe.PotionMixingRecipeManager;
|
||||
import com.simibubi.create.content.contraptions.processing.BasinOperatingTileEntity;
|
||||
|
@ -14,6 +15,8 @@ import com.simibubi.create.foundation.config.AllConfigs;
|
|||
import com.simibubi.create.foundation.item.SmartInventory;
|
||||
import com.simibubi.create.foundation.tileEntity.behaviour.fluid.SmartFluidTankBehaviour;
|
||||
import com.simibubi.create.foundation.tileEntity.behaviour.fluid.SmartFluidTankBehaviour.TankSegment;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
import com.simibubi.create.foundation.utility.Couple;
|
||||
import com.simibubi.create.foundation.utility.VecHelper;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
|
@ -27,9 +30,13 @@ import net.minecraft.particles.ItemParticleData;
|
|||
import net.minecraft.particles.ParticleTypes;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraft.util.Direction.Axis;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.SoundEvents;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.math.vector.Vector3d;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.minecraftforge.items.CapabilityItemHandler;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
|
@ -120,6 +127,19 @@ public class MechanicalMixerTileEntity extends BasinOperatingTileEntity {
|
|||
if ((!world.isRemote || isVirtual()) && runningTicks == 20) {
|
||||
if (processingTicks < 0) {
|
||||
processingTicks = MathHelper.clamp((MathHelper.log2((int) (512 / speed))) * 15 + 1, 1, 512);
|
||||
|
||||
Optional<BasinTileEntity> basin = getBasin();
|
||||
if (basin.isPresent()) {
|
||||
Couple<SmartFluidTankBehaviour> tanks = basin.get()
|
||||
.getTanks();
|
||||
if (!tanks.getFirst()
|
||||
.isEmpty()
|
||||
|| !tanks.getSecond()
|
||||
.isEmpty())
|
||||
world.playSound(null, pos, SoundEvents.BLOCK_BUBBLE_COLUMN_WHIRLPOOL_AMBIENT,
|
||||
SoundCategory.BLOCKS, .75f, speed < 65 ? .75f : 1.5f);
|
||||
}
|
||||
|
||||
} else {
|
||||
processingTicks--;
|
||||
if (processingTicks == 0) {
|
||||
|
@ -249,4 +269,18 @@ public class MechanicalMixerTileEntity extends BasinOperatingTileEntity {
|
|||
protected Optional<ITriggerable> getProcessedRecipeTrigger() {
|
||||
return Optional.of(AllTriggers.MIXER_MIX);
|
||||
}
|
||||
|
||||
@Override
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public void tickAudio() {
|
||||
super.tickAudio();
|
||||
|
||||
// SoundEvents.BLOCK_STONE_BREAK
|
||||
boolean slow = Math.abs(getSpeed()) < 65;
|
||||
if (slow && AnimationTickHolder.getTicks() % 2 == 0)
|
||||
return;
|
||||
if (runningTicks == 20)
|
||||
AllSoundEvents.MIXING.playAt(world, pos, .75f, 1, true);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ package com.simibubi.create.content.contraptions.processing;
|
|||
import com.simibubi.create.AllBlocks;
|
||||
import com.simibubi.create.AllShapes;
|
||||
import com.simibubi.create.AllTileEntities;
|
||||
import com.simibubi.create.Create;
|
||||
import com.simibubi.create.content.contraptions.fluids.actors.GenericItemFilling;
|
||||
import com.simibubi.create.content.contraptions.relays.belt.BeltTileEntity;
|
||||
import com.simibubi.create.content.contraptions.wrench.IWrenchable;
|
||||
|
@ -31,6 +32,8 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.ActionResultType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.SoundEvents;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.BlockRayTraceResult;
|
||||
import net.minecraft.util.math.shapes.ISelectionContext;
|
||||
|
@ -100,19 +103,30 @@ public class BasinBlock extends Block implements ITE<BasinTileEntity>, IWrenchab
|
|||
if (EmptyingByBasin.canItemBeEmptied(worldIn, heldItem)
|
||||
|| GenericItemFilling.canItemBeFilled(worldIn, heldItem))
|
||||
return ActionResultType.SUCCESS;
|
||||
if (heldItem.getItem().equals(Items.SPONGE) &&
|
||||
!te.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY).map(iFluidHandler ->
|
||||
iFluidHandler.drain(Integer.MAX_VALUE, IFluidHandler.FluidAction.EXECUTE)).orElse(FluidStack.EMPTY).isEmpty()) {
|
||||
if (heldItem.getItem()
|
||||
.equals(Items.SPONGE)
|
||||
&& !te.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY)
|
||||
.map(iFluidHandler -> iFluidHandler.drain(Integer.MAX_VALUE, IFluidHandler.FluidAction.EXECUTE))
|
||||
.orElse(FluidStack.EMPTY)
|
||||
.isEmpty()) {
|
||||
return ActionResultType.SUCCESS;
|
||||
}
|
||||
return ActionResultType.PASS;
|
||||
}
|
||||
|
||||
IItemHandlerModifiable inv = te.itemCapability.orElse(new ItemStackHandler(1));
|
||||
boolean success = false;
|
||||
for (int slot = 0; slot < inv.getSlots(); slot++) {
|
||||
player.inventory.placeItemBackInInventory(worldIn, inv.getStackInSlot(slot));
|
||||
ItemStack stackInSlot = inv.getStackInSlot(slot);
|
||||
if (stackInSlot.isEmpty())
|
||||
continue;
|
||||
player.inventory.placeItemBackInInventory(worldIn, stackInSlot);
|
||||
inv.setStackInSlot(slot, ItemStack.EMPTY);
|
||||
success = true;
|
||||
}
|
||||
if (success)
|
||||
worldIn.playSound(null, pos, SoundEvents.ENTITY_ITEM_PICKUP, SoundCategory.PLAYERS, .2f,
|
||||
1f + Create.random.nextFloat());
|
||||
te.onEmptied();
|
||||
} catch (TileEntityException e) {
|
||||
}
|
||||
|
|
|
@ -100,4 +100,9 @@ public class GantryShaftTileEntity extends KineticTileEntity {
|
|||
return MathHelper.clamp(-getSpeed() / 512f, -.49f, .49f);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isNoisy() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -4,9 +4,12 @@ import java.util.ArrayList;
|
|||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.mutable.MutableBoolean;
|
||||
|
||||
import com.simibubi.create.AllBlocks;
|
||||
import com.simibubi.create.AllItems;
|
||||
import com.simibubi.create.AllTileEntities;
|
||||
import com.simibubi.create.Create;
|
||||
import com.simibubi.create.content.contraptions.base.HorizontalKineticBlock;
|
||||
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||
import com.simibubi.create.content.contraptions.processing.EmptyingByBasin;
|
||||
|
@ -52,6 +55,8 @@ import net.minecraft.util.Direction.AxisDirection;
|
|||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.Rotation;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.SoundEvents;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.BlockRayTraceResult;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
|
@ -119,11 +124,14 @@ public class BeltBlock extends HorizontalKineticBlock implements ITE<BeltTileEnt
|
|||
return AllItems.BELT_CONNECTOR.asStack();
|
||||
}
|
||||
|
||||
/* FIXME
|
||||
@Override
|
||||
public Material getMaterial(BlockState state) {
|
||||
return state.get(CASING) ? Material.WOOD : Material.WOOL;
|
||||
} */
|
||||
/*
|
||||
* FIXME
|
||||
*
|
||||
* @Override
|
||||
* public Material getMaterial(BlockState state) {
|
||||
* return state.get(CASING) ? Material.WOOD : Material.WOOL;
|
||||
* }
|
||||
*/
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
|
@ -253,11 +261,16 @@ public class BeltBlock extends HorizontalKineticBlock implements ITE<BeltTileEnt
|
|||
return ActionResultType.PASS;
|
||||
if (world.isRemote)
|
||||
return ActionResultType.SUCCESS;
|
||||
MutableBoolean success = new MutableBoolean(false);
|
||||
controllerBelt.getInventory()
|
||||
.applyToEachWithin(belt.index + .5f, .55f, (transportedItemStack) -> {
|
||||
player.inventory.placeItemBackInInventory(world, transportedItemStack.stack);
|
||||
success.setTrue();
|
||||
return TransportedResult.removeItem();
|
||||
});
|
||||
if (success.isTrue())
|
||||
world.playSound(null, pos, SoundEvents.ENTITY_ITEM_PICKUP, SoundCategory.PLAYERS, .2f,
|
||||
1f + Create.random.nextFloat());
|
||||
}
|
||||
|
||||
if (isShaft) {
|
||||
|
|
|
@ -20,9 +20,8 @@ public class SimpleKineticTileEntity extends KineticTileEntity {
|
|||
|
||||
@Override
|
||||
public void addBehaviours(List<TileEntityBehaviour> behaviours) {
|
||||
behaviours.add(
|
||||
new BracketedTileEntityBehaviour(this, state -> state.getBlock() instanceof AbstractShaftBlock).withTrigger(
|
||||
state -> AllTriggers.BRACKET_APPLY_TRIGGER.constructTriggerFor(state.getBlock())));
|
||||
behaviours.add(new BracketedTileEntityBehaviour(this, state -> state.getBlock() instanceof AbstractShaftBlock)
|
||||
.withTrigger(state -> AllTriggers.BRACKET_APPLY_TRIGGER.constructTriggerFor(state.getBlock())));
|
||||
super.addBehaviours(behaviours);
|
||||
}
|
||||
|
||||
|
@ -44,4 +43,9 @@ public class SimpleKineticTileEntity extends KineticTileEntity {
|
|||
return neighbours;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isNoisy() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -10,4 +10,9 @@ public class GearboxTileEntity extends DirectionalShaftHalvesTileEntity {
|
|||
super(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isNoisy() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ import java.util.function.Function;
|
|||
import java.util.function.Predicate;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import com.simibubi.create.AllSoundEvents;
|
||||
import com.simibubi.create.content.contraptions.relays.belt.BeltHelper;
|
||||
import com.simibubi.create.content.contraptions.relays.belt.transport.TransportedItemStack;
|
||||
import com.simibubi.create.content.logistics.block.funnel.AbstractFunnelBlock;
|
||||
|
@ -274,8 +275,16 @@ public class DepotBehaviour extends TileEntityBehaviour {
|
|||
return returned;
|
||||
}
|
||||
|
||||
if (!simulate)
|
||||
if (!simulate) {
|
||||
if (this.isEmpty()) {
|
||||
if (heldItem.insertedFrom.getAxis()
|
||||
.isHorizontal())
|
||||
AllSoundEvents.DEPOT_SLIDE.playOnServer(getWorld(), getPos());
|
||||
else
|
||||
AllSoundEvents.DEPOT_PLOP.playOnServer(getWorld(), getPos());
|
||||
}
|
||||
this.heldItem = heldItem;
|
||||
}
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package com.simibubi.create.content.logistics.block.depot;
|
||||
|
||||
import com.simibubi.create.AllBlocks;
|
||||
import com.simibubi.create.AllSoundEvents;
|
||||
import com.simibubi.create.Create;
|
||||
import com.simibubi.create.content.contraptions.relays.belt.transport.TransportedItemStack;
|
||||
import com.simibubi.create.foundation.item.ItemHelper;
|
||||
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
||||
|
@ -15,6 +17,8 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.util.ActionResultType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.SoundEvents;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.BlockRayTraceResult;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
|
@ -48,6 +52,8 @@ public class SharedDepotBlockMethods {
|
|||
if (!mainItemStack.isEmpty()) {
|
||||
player.inventory.placeItemBackInInventory(world, mainItemStack);
|
||||
behaviour.removeHeldItem();
|
||||
world.playSound(null, pos, SoundEvents.ENTITY_ITEM_PICKUP, SoundCategory.PLAYERS, .2f,
|
||||
1f + Create.random.nextFloat());
|
||||
}
|
||||
ItemStackHandler outputs = behaviour.processingOutputBuffer;
|
||||
for (int i = 0; i < outputs.getSlots(); i++)
|
||||
|
@ -60,6 +66,7 @@ public class SharedDepotBlockMethods {
|
|||
transported.beltPosition = .25f;
|
||||
behaviour.setHeldItem(transported);
|
||||
player.setHeldItem(hand, ItemStack.EMPTY);
|
||||
AllSoundEvents.DEPOT_SLIDE.playOnServer(world, pos);
|
||||
}
|
||||
|
||||
behaviour.tileEntity.notifyUpdate();
|
||||
|
|
|
@ -4,6 +4,7 @@ import java.lang.ref.WeakReference;
|
|||
import java.util.List;
|
||||
|
||||
import com.simibubi.create.AllBlocks;
|
||||
import com.simibubi.create.AllSoundEvents;
|
||||
import com.simibubi.create.content.contraptions.goggles.IHaveHoveringInformation;
|
||||
import com.simibubi.create.content.contraptions.relays.belt.BeltHelper;
|
||||
import com.simibubi.create.content.contraptions.relays.belt.BeltTileEntity;
|
||||
|
@ -61,7 +62,8 @@ public class FunnelTileEntity extends SmartTileEntity implements IHaveHoveringIn
|
|||
BlockState state = getBlockState();
|
||||
if (!FunnelBlock.isFunnel(state))
|
||||
return Mode.INVALID;
|
||||
if (state.method_28500(BlockStateProperties.POWERED).orElse(false))
|
||||
if (state.method_28500(BlockStateProperties.POWERED)
|
||||
.orElse(false))
|
||||
return Mode.PAUSED;
|
||||
if (state.getBlock() instanceof BeltFunnelBlock) {
|
||||
Shape shape = state.get(BeltFunnelBlock.SHAPE);
|
||||
|
@ -156,7 +158,8 @@ public class FunnelTileEntity extends SmartTileEntity implements IHaveHoveringIn
|
|||
.isVertical();
|
||||
boolean up = facing == Direction.UP;
|
||||
|
||||
outputPos = outputPos.add(Vector3d.of(facing.getDirectionVec()).scale(vertical ? up ? .15f : .5f : .25f));
|
||||
outputPos = outputPos.add(Vector3d.of(facing.getDirectionVec())
|
||||
.scale(vertical ? up ? .15f : .5f : .25f));
|
||||
if (!vertical)
|
||||
outputPos = outputPos.subtract(0, .45f, 0);
|
||||
|
||||
|
@ -283,6 +286,7 @@ public class FunnelTileEntity extends SmartTileEntity implements IHaveHoveringIn
|
|||
AllPackets.channel.send(packetTarget(), new FunnelFlapPacket(this, inward));
|
||||
} else {
|
||||
flap.set(inward ? 1 : -1);
|
||||
AllSoundEvents.FUNNEL_FLAP.playAt(world, pos, 1, 1, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ import java.util.List;
|
|||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import com.simibubi.create.Create;
|
||||
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||
import com.simibubi.create.content.logistics.block.mechanicalArm.ArmInteractionPoint.Jukebox;
|
||||
import com.simibubi.create.content.logistics.block.mechanicalArm.ArmInteractionPoint.Mode;
|
||||
|
@ -30,6 +31,8 @@ import net.minecraft.nbt.INBT;
|
|||
import net.minecraft.nbt.ListNBT;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.SoundEvents;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.math.vector.Vector3d;
|
||||
|
@ -339,12 +342,17 @@ public class ArmTileEntity extends KineticTileEntity {
|
|||
if (amountExtracted == 0)
|
||||
continue;
|
||||
|
||||
ItemStack prevHeld = heldItem;
|
||||
heldItem = armInteractionPoint.extract(world, i, amountExtracted, false);
|
||||
phase = Phase.SEARCH_OUTPUTS;
|
||||
chasedPointProgress = 0;
|
||||
chasedPointIndex = -1;
|
||||
sendData();
|
||||
markDirty();
|
||||
|
||||
if (!prevHeld.isItemEqual(heldItem))
|
||||
world.playSound(null, pos, SoundEvents.ENTITY_ITEM_PICKUP, SoundCategory.BLOCKS, .125f,
|
||||
.5f + Create.random.nextFloat() * .25f);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ import com.simibubi.create.Create;
|
|||
import com.simibubi.create.CreateClient;
|
||||
import com.simibubi.create.content.contraptions.KineticDebugger;
|
||||
import com.simibubi.create.content.contraptions.base.IRotate;
|
||||
import com.simibubi.create.content.contraptions.components.fan.AirCurrent;
|
||||
import com.simibubi.create.content.contraptions.components.flywheel.engine.EngineBlock;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionHandler;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.chassis.ChassisRangeDisplay;
|
||||
|
@ -38,6 +39,7 @@ import com.simibubi.create.foundation.render.KineticRenderer;
|
|||
import com.simibubi.create.foundation.render.backend.FastRenderDispatcher;
|
||||
import com.simibubi.create.foundation.render.backend.RenderWork;
|
||||
import com.simibubi.create.foundation.renderState.SuperRenderTypeBuffer;
|
||||
import com.simibubi.create.foundation.sound.SoundScapes;
|
||||
import com.simibubi.create.foundation.tileEntity.behaviour.edgeInteraction.EdgeInteractionRenderer;
|
||||
import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringRenderer;
|
||||
import com.simibubi.create.foundation.tileEntity.behaviour.linked.LinkRenderer;
|
||||
|
@ -87,12 +89,15 @@ public class ClientEvents {
|
|||
@SubscribeEvent
|
||||
public static void onTick(ClientTickEvent event) {
|
||||
World world = Minecraft.getInstance().world;
|
||||
if (event.phase == Phase.START)
|
||||
return;
|
||||
|
||||
if (!isGameActive())
|
||||
return;
|
||||
|
||||
if (event.phase == Phase.START) {
|
||||
AirCurrent.tickClientPlayerSounds();
|
||||
return;
|
||||
}
|
||||
|
||||
SoundScapes.tick();
|
||||
AnimationTickHolder.tick();
|
||||
FastRenderDispatcher.tick();
|
||||
ScrollValueHandler.tick();
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
package com.simibubi.create.foundation.ponder;
|
||||
|
||||
import org.antlr.v4.runtime.misc.IntegerList;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.simibubi.create.foundation.gui.widgets.AbstractSimiWidget;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
import com.simibubi.create.foundation.utility.ColorHelper;
|
||||
import com.simibubi.create.foundation.utility.animation.LerpedFloat;
|
||||
|
||||
import it.unimi.dsi.fastutil.ints.IntList;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.SoundHandler;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
|
@ -59,7 +58,7 @@ public class PonderProgressBar extends AbstractSimiWidget {
|
|||
@Override
|
||||
public void onClick(double mouseX, double mouseY) {
|
||||
PonderScene activeScene = ponder.getActiveScene();
|
||||
IntegerList keyframeTimes = activeScene.keyframeTimes;
|
||||
IntList keyframeTimes = activeScene.keyframeTimes;
|
||||
|
||||
int keyframeIndex = getHoveredKeyframeIndex(activeScene, mouseX);
|
||||
|
||||
|
@ -68,17 +67,17 @@ public class PonderProgressBar extends AbstractSimiWidget {
|
|||
else if (keyframeIndex == keyframeTimes.size())
|
||||
ponder.seekToTime(activeScene.totalTime);
|
||||
else
|
||||
ponder.seekToTime(keyframeTimes.get(keyframeIndex));
|
||||
ponder.seekToTime(keyframeTimes.getInt(keyframeIndex));
|
||||
}
|
||||
|
||||
public int getHoveredKeyframeIndex(PonderScene activeScene, double mouseX) {
|
||||
IntegerList keyframeTimes = activeScene.keyframeTimes;
|
||||
IntList keyframeTimes = activeScene.keyframeTimes;
|
||||
|
||||
int totalTime = activeScene.totalTime;
|
||||
int clickedAtTime = (int) ((mouseX - x) / ((double) width + 4) * totalTime);
|
||||
|
||||
{
|
||||
int lastKeyframeTime = keyframeTimes.get(keyframeTimes.size() - 1);
|
||||
int lastKeyframeTime = keyframeTimes.getInt(keyframeTimes.size() - 1);
|
||||
|
||||
int diffToEnd = totalTime - clickedAtTime;
|
||||
int diffToLast = clickedAtTime - lastKeyframeTime;
|
||||
|
@ -91,7 +90,7 @@ public class PonderProgressBar extends AbstractSimiWidget {
|
|||
int index = -1;
|
||||
|
||||
for (int i = 0; i < keyframeTimes.size(); i++) {
|
||||
int keyframeTime = keyframeTimes.get(i);
|
||||
int keyframeTime = keyframeTimes.getInt(i);
|
||||
|
||||
if (keyframeTime > clickedAtTime)
|
||||
break;
|
||||
|
@ -156,7 +155,7 @@ public class PonderProgressBar extends AbstractSimiWidget {
|
|||
hoverEndColor = 0;
|
||||
hoverStartColor = 0;
|
||||
}
|
||||
IntegerList keyframeTimes = activeScene.keyframeTimes;
|
||||
IntList keyframeTimes = activeScene.keyframeTimes;
|
||||
|
||||
if (hoverIndex == -1)
|
||||
drawKeyframe(ms, activeScene, true, 0, 0, hoverStartColor, hoverEndColor, 8);
|
||||
|
@ -164,7 +163,7 @@ public class PonderProgressBar extends AbstractSimiWidget {
|
|||
drawKeyframe(ms, activeScene, true, activeScene.totalTime, width + 4, hoverStartColor, hoverEndColor, 8);
|
||||
|
||||
for (int i = 0; i < keyframeTimes.size(); i++) {
|
||||
int keyframeTime = keyframeTimes.get(i);
|
||||
int keyframeTime = keyframeTimes.getInt(i);
|
||||
int keyframePos = (int) (((float) keyframeTime) / ((float) activeScene.totalTime) * (width + 4));
|
||||
|
||||
boolean selected = i == hoverIndex;
|
||||
|
|
|
@ -13,7 +13,6 @@ import java.util.function.Consumer;
|
|||
import java.util.function.Function;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import org.antlr.v4.runtime.misc.IntegerList;
|
||||
import org.apache.commons.lang3.mutable.MutableDouble;
|
||||
import org.apache.commons.lang3.mutable.MutableObject;
|
||||
|
||||
|
@ -32,6 +31,8 @@ import com.simibubi.create.foundation.utility.VecHelper;
|
|||
import com.simibubi.create.foundation.utility.animation.LerpedFloat;
|
||||
import com.simibubi.create.foundation.utility.outliner.Outliner;
|
||||
|
||||
import it.unimi.dsi.fastutil.ints.IntArrayList;
|
||||
import it.unimi.dsi.fastutil.ints.IntList;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.ActiveRenderInfo;
|
||||
|
@ -60,7 +61,7 @@ public class PonderScene {
|
|||
int textIndex;
|
||||
String sceneId;
|
||||
|
||||
IntegerList keyframeTimes;
|
||||
IntList keyframeTimes;
|
||||
|
||||
List<PonderInstruction> schedule, activeSchedule;
|
||||
Map<UUID, PonderElement> linkedElements;
|
||||
|
@ -110,7 +111,7 @@ public class PonderScene {
|
|||
info = new SceneRenderInfo();
|
||||
baseWorldSection = new WorldSectionElement();
|
||||
renderViewEntity = new ArmorStandEntity(world, 0, 0, 0);
|
||||
keyframeTimes = new IntegerList(4);
|
||||
keyframeTimes = new IntArrayList(4);
|
||||
scaleFactor = 1;
|
||||
yOffset = 0;
|
||||
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
package com.simibubi.create.foundation.sound;
|
||||
|
||||
import net.minecraft.client.audio.TickableSound;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.SoundEvent;
|
||||
|
||||
public class ContinuousSound extends TickableSound {
|
||||
|
||||
private float sharedPitch;
|
||||
private SoundScape scape;
|
||||
private float relativeVolume;
|
||||
|
||||
protected ContinuousSound(SoundEvent event, SoundScape scape, float sharedPitch, float relativeVolume) {
|
||||
super(event, SoundCategory.AMBIENT);
|
||||
this.scape = scape;
|
||||
this.sharedPitch = sharedPitch;
|
||||
this.relativeVolume = relativeVolume;
|
||||
this.repeat = true;
|
||||
this.repeatDelay = 0;
|
||||
this.global = false;
|
||||
}
|
||||
|
||||
public void remove() {
|
||||
setDone();
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getVolume() {
|
||||
return scape.getVolume() * relativeVolume;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getPitch() {
|
||||
return sharedPitch;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getX() {
|
||||
return scape.getMeanPos().x;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getY() {
|
||||
return scape.getMeanPos().y;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getZ() {
|
||||
return scape.getMeanPos().z;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {}
|
||||
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
package com.simibubi.create.foundation.sound;
|
||||
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.world.ClientWorld;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.SoundEvent;
|
||||
import net.minecraft.util.math.vector.Vector3d;
|
||||
|
||||
public class RepeatingSound {
|
||||
|
||||
private SoundEvent event;
|
||||
private float sharedPitch;
|
||||
private int repeatDelay;
|
||||
private SoundScape scape;
|
||||
private float relativeVolume;
|
||||
|
||||
public RepeatingSound(SoundEvent event, SoundScape scape, float sharedPitch, float relativeVolume,
|
||||
int repeatDelay) {
|
||||
this.event = event;
|
||||
this.scape = scape;
|
||||
this.sharedPitch = sharedPitch;
|
||||
this.relativeVolume = relativeVolume;
|
||||
this.repeatDelay = Math.max(1, repeatDelay);
|
||||
}
|
||||
|
||||
public void tick() {
|
||||
if (AnimationTickHolder.getTicks() % repeatDelay != 0)
|
||||
return;
|
||||
|
||||
ClientWorld world = Minecraft.getInstance().world;
|
||||
Vector3d meanPos = scape.getMeanPos();
|
||||
|
||||
world.playSound(meanPos.x, meanPos.y, meanPos.z, event, SoundCategory.AMBIENT,
|
||||
scape.getVolume() * relativeVolume, sharedPitch, true);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,88 @@
|
|||
package com.simibubi.create.foundation.sound;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.simibubi.create.foundation.sound.SoundScapes.AmbienceGroup;
|
||||
import com.simibubi.create.foundation.sound.SoundScapes.PitchGroup;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
import com.simibubi.create.foundation.utility.VecHelper;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.util.SoundEvent;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.math.vector.Vector3d;
|
||||
|
||||
class SoundScape {
|
||||
List<ContinuousSound> continuous;
|
||||
List<RepeatingSound> repeating;
|
||||
private float pitch;
|
||||
private AmbienceGroup group;
|
||||
private Vector3d meanPos;
|
||||
private PitchGroup pitchGroup;
|
||||
|
||||
public SoundScape(float pitch, AmbienceGroup group) {
|
||||
this.pitchGroup = SoundScapes.getGroupFromPitch(pitch);
|
||||
this.pitch = pitch;
|
||||
this.group = group;
|
||||
continuous = new ArrayList<>();
|
||||
repeating = new ArrayList<>();
|
||||
}
|
||||
|
||||
public SoundScape continuous(SoundEvent sound, float relativeVolume, float relativePitch) {
|
||||
return add(new ContinuousSound(sound, this, pitch * relativePitch, relativeVolume));
|
||||
}
|
||||
|
||||
public SoundScape repeating(SoundEvent sound, float relativeVolume, float relativePitch, int delay) {
|
||||
return add(new RepeatingSound(sound, this, pitch * relativePitch, relativeVolume, delay));
|
||||
}
|
||||
|
||||
public SoundScape add(ContinuousSound continuousSound) {
|
||||
continuous.add(continuousSound);
|
||||
return this;
|
||||
}
|
||||
|
||||
public SoundScape add(RepeatingSound repeatingSound) {
|
||||
repeating.add(repeatingSound);
|
||||
return this;
|
||||
}
|
||||
|
||||
public void play() {
|
||||
continuous.forEach(Minecraft.getInstance()
|
||||
.getSoundHandler()::play);
|
||||
}
|
||||
|
||||
public void tick() {
|
||||
if (AnimationTickHolder.getTicks() % SoundScapes.UPDATE_INTERVAL == 0)
|
||||
meanPos = null;
|
||||
repeating.forEach(RepeatingSound::tick);
|
||||
}
|
||||
|
||||
public void remove() {
|
||||
continuous.forEach(ContinuousSound::remove);
|
||||
}
|
||||
|
||||
public Vector3d getMeanPos() {
|
||||
return meanPos == null ? meanPos = determineMeanPos() : meanPos;
|
||||
}
|
||||
|
||||
private Vector3d determineMeanPos() {
|
||||
meanPos = Vector3d.ZERO;
|
||||
int amount = 0;
|
||||
for (BlockPos blockPos : SoundScapes.getAllLocations(group, pitchGroup)) {
|
||||
meanPos = meanPos.add(VecHelper.getCenterOf(blockPos));
|
||||
amount++;
|
||||
}
|
||||
if (amount == 0)
|
||||
return meanPos;
|
||||
return meanPos.scale(1f / amount);
|
||||
}
|
||||
|
||||
public float getVolume() {
|
||||
int soundCount = SoundScapes.getSoundCount(group, pitchGroup);
|
||||
float argMax = (float) SoundScapes.SOUND_VOLUME_ARG_MAX;
|
||||
return MathHelper.clamp(soundCount / (argMax * 10f), 0, .05f);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,150 @@
|
|||
package com.simibubi.create.foundation.sound;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.IdentityHashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
import java.util.function.BiFunction;
|
||||
|
||||
import com.simibubi.create.AllSoundEvents;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
import com.simibubi.create.foundation.utility.Pair;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.SoundEvents;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
public class SoundScapes {
|
||||
|
||||
static final int MAX_AMBIENT_SOURCE_DISTANCE = 16;
|
||||
static final int UPDATE_INTERVAL = 5;
|
||||
static final int SOUND_VOLUME_ARG_MAX = 15;
|
||||
|
||||
enum AmbienceGroup {
|
||||
|
||||
KINETIC(SoundScapes::kinetic), COG(SoundScapes::cogwheel)
|
||||
|
||||
;
|
||||
|
||||
private BiFunction<Float, AmbienceGroup, SoundScape> factory;
|
||||
|
||||
private AmbienceGroup(BiFunction<Float, AmbienceGroup, SoundScape> factory) {
|
||||
this.factory = factory;
|
||||
}
|
||||
|
||||
public SoundScape instantiate(float pitch) {
|
||||
return factory.apply(pitch, this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static SoundScape kinetic(float pitch, AmbienceGroup group) {
|
||||
return new SoundScape(pitch, group).continuous(SoundEvents.ENTITY_MINECART_INSIDE, .25f, 1);
|
||||
}
|
||||
|
||||
private static SoundScape cogwheel(float pitch, AmbienceGroup group) {
|
||||
return new SoundScape(pitch, group).continuous(AllSoundEvents.COGS.getMainEvent(), 3, 1);
|
||||
}
|
||||
|
||||
enum PitchGroup {
|
||||
VERY_LOW, LOW, NORMAL, HIGH, VERY_HIGH
|
||||
}
|
||||
|
||||
private static Map<AmbienceGroup, Map<PitchGroup, Set<BlockPos>>> counter = new IdentityHashMap<>();
|
||||
private static Map<Pair<AmbienceGroup, PitchGroup>, SoundScape> activeSounds = new HashMap<>();
|
||||
|
||||
public static void playGeneralKineticAmbience(BlockPos pos, float pitch) {
|
||||
if (!outOfRange(pos))
|
||||
addSound(AmbienceGroup.KINETIC, pos, pitch);
|
||||
}
|
||||
|
||||
public static void playCogwheelAmbience(BlockPos pos, float pitch) {
|
||||
if (!outOfRange(pos))
|
||||
addSound(AmbienceGroup.COG, pos, pitch);
|
||||
}
|
||||
|
||||
public static void tick() {
|
||||
activeSounds.values()
|
||||
.forEach(SoundScape::tick);
|
||||
|
||||
if (AnimationTickHolder.getTicks() % UPDATE_INTERVAL != 0)
|
||||
return;
|
||||
|
||||
for (Iterator<Entry<Pair<AmbienceGroup, PitchGroup>, SoundScape>> iterator = activeSounds.entrySet()
|
||||
.iterator(); iterator.hasNext();) {
|
||||
|
||||
Entry<Pair<AmbienceGroup, PitchGroup>, SoundScape> entry = iterator.next();
|
||||
Pair<AmbienceGroup, PitchGroup> key = entry.getKey();
|
||||
SoundScape value = entry.getValue();
|
||||
|
||||
if (getSoundCount(key.getFirst(), key.getSecond()) == 0) {
|
||||
value.remove();
|
||||
iterator.remove();
|
||||
}
|
||||
}
|
||||
|
||||
counter.values()
|
||||
.forEach(m -> m.values()
|
||||
.forEach(Set::clear));
|
||||
}
|
||||
|
||||
public static void addSound(AmbienceGroup group, BlockPos pos, float pitch) {
|
||||
PitchGroup groupFromPitch = getGroupFromPitch(pitch);
|
||||
Set<BlockPos> set = counter.computeIfAbsent(group, ag -> new IdentityHashMap<>())
|
||||
.computeIfAbsent(groupFromPitch, pg -> new HashSet<>());
|
||||
set.add(pos);
|
||||
|
||||
Pair<AmbienceGroup, PitchGroup> pair = Pair.of(group, groupFromPitch);
|
||||
activeSounds.computeIfAbsent(pair, $ -> {
|
||||
SoundScape soundScape = group.instantiate(pitch);
|
||||
soundScape.play();
|
||||
return soundScape;
|
||||
});
|
||||
}
|
||||
|
||||
public static void clean() {
|
||||
BlockPos playerLocation = getCameraPos();
|
||||
for (Map<PitchGroup, Set<BlockPos>> map : counter.values())
|
||||
for (Set<BlockPos> set : map.values())
|
||||
set.removeIf(p -> !playerLocation.withinDistance(p, MAX_AMBIENT_SOURCE_DISTANCE));
|
||||
}
|
||||
|
||||
protected static boolean outOfRange(BlockPos pos) {
|
||||
return !getCameraPos().withinDistance(pos, MAX_AMBIENT_SOURCE_DISTANCE);
|
||||
}
|
||||
|
||||
protected static BlockPos getCameraPos() {
|
||||
Entity renderViewEntity = Minecraft.getInstance().renderViewEntity;
|
||||
if (renderViewEntity == null)
|
||||
return BlockPos.ZERO;
|
||||
BlockPos playerLocation = renderViewEntity.getBlockPos();
|
||||
return playerLocation;
|
||||
}
|
||||
|
||||
public static int getSoundCount(AmbienceGroup group, PitchGroup pitchGroup) {
|
||||
return getAllLocations(group, pitchGroup).size();
|
||||
}
|
||||
|
||||
public static Set<BlockPos> getAllLocations(AmbienceGroup group, PitchGroup pitchGroup) {
|
||||
return counter.getOrDefault(group, Collections.emptyMap())
|
||||
.getOrDefault(pitchGroup, Collections.emptySet());
|
||||
}
|
||||
|
||||
public static PitchGroup getGroupFromPitch(float pitch) {
|
||||
if (pitch < .70)
|
||||
return PitchGroup.VERY_LOW;
|
||||
if (pitch < .90)
|
||||
return PitchGroup.LOW;
|
||||
if (pitch < 1.10)
|
||||
return PitchGroup.NORMAL;
|
||||
if (pitch < 1.30)
|
||||
return PitchGroup.HIGH;
|
||||
return PitchGroup.VERY_HIGH;
|
||||
}
|
||||
|
||||
}
|
|
@ -3,6 +3,7 @@ package com.simibubi.create.foundation.tileEntity.behaviour.filtering;
|
|||
import com.simibubi.create.AllBlocks;
|
||||
import com.simibubi.create.AllItems;
|
||||
import com.simibubi.create.AllKeys;
|
||||
import com.simibubi.create.AllSoundEvents;
|
||||
import com.simibubi.create.content.logistics.item.filter.FilterItem;
|
||||
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
||||
import com.simibubi.create.foundation.tileEntity.behaviour.ValueBoxTransform;
|
||||
|
@ -133,12 +134,20 @@ public class FilteringHandler {
|
|||
((Sided) filtering.slotPositioning).fromSide(result.getFace());
|
||||
if (!filtering.testHit(objectMouseOver.getHitVec()))
|
||||
return false;
|
||||
|
||||
ItemStack filterItem = filtering.getFilter();
|
||||
filtering.ticksUntilScrollPacket = 10;
|
||||
int maxAmount = (filterItem.getItem() instanceof FilterItem) ? 64 : filterItem.getMaxStackSize();
|
||||
int prev = filtering.scrollableValue;
|
||||
filtering.scrollableValue =
|
||||
(int) MathHelper.clamp(filtering.scrollableValue + delta * (AllKeys.ctrlDown() ? 16 : 1), 0, maxAmount);
|
||||
|
||||
if (prev != filtering.scrollableValue) {
|
||||
float pitch = (filtering.scrollableValue) / (float) (maxAmount);
|
||||
pitch = MathHelper.lerp(pitch, 1.5f, 2f);
|
||||
AllSoundEvents.SCROLL_VALUE.play(world, mc.player, blockPos, 1, pitch);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.simibubi.create.foundation.tileEntity.behaviour.scrollvalue;
|
|||
|
||||
import com.simibubi.create.AllItems;
|
||||
import com.simibubi.create.AllKeys;
|
||||
import com.simibubi.create.AllSoundEvents;
|
||||
import com.simibubi.create.foundation.tileEntity.SmartTileEntity;
|
||||
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
||||
import com.simibubi.create.foundation.tileEntity.behaviour.ValueBoxTransform.Sided;
|
||||
|
@ -24,7 +25,8 @@ public class ScrollValueHandler {
|
|||
private static float lastPassiveScroll = 0.0f;
|
||||
private static float passiveScroll = 0.0f;
|
||||
private static float passiveScrollDirection = 1f;
|
||||
private static final PhysicalFloat wrenchCog = PhysicalFloat.create().withDrag(0.3);
|
||||
private static final PhysicalFloat wrenchCog = PhysicalFloat.create()
|
||||
.withDrag(0.3);
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public static boolean onScroll(double delta) {
|
||||
|
@ -47,6 +49,7 @@ public class ScrollValueHandler {
|
|||
|
||||
passiveScrollDirection = (float) -delta;
|
||||
wrenchCog.bump(3, -delta * 10);
|
||||
int prev = scrolling.scrollableValue;
|
||||
|
||||
if (scrolling.needsWrench && !AllItems.WRENCH.isIn(mc.player.getHeldItemMainhand()))
|
||||
return false;
|
||||
|
@ -66,6 +69,11 @@ public class ScrollValueHandler {
|
|||
} else
|
||||
applyTo(delta, scrolling);
|
||||
|
||||
if (prev != scrolling.scrollableValue) {
|
||||
float pitch = (scrolling.scrollableValue - scrolling.min) / (float) (scrolling.max - scrolling.min);
|
||||
pitch = MathHelper.lerp(pitch, 1.5f, 2f);
|
||||
AllSoundEvents.SCROLL_VALUE.play(world, mc.player, blockPos, 1, pitch);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
BIN
src/main/resources/assets/create/sounds/cogs.ogg
Normal file
BIN
src/main/resources/assets/create/sounds/cogs.ogg
Normal file
Binary file not shown.
Loading…
Reference in a new issue