Choo Choo, Part V

- Player can press ctrl to honk when a whistle is present
- Stations now remember the name of briefly disassembled trains
This commit is contained in:
simibubi 2022-06-11 22:02:12 +02:00
parent 141a4069dd
commit 6192da2809
32 changed files with 334 additions and 90 deletions

View file

@ -554,22 +554,22 @@ bf2b0310500213ff853c748c236eb5d01f61658e assets/create/blockstates/yellow_toolbo
7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json
b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json
50f7862ded2d9a955c259a12685906a9ec9ad97a assets/create/lang/en_ud.json
a768ce262b1d113b915306b93805121e6d6f3934 assets/create/lang/en_us.json
c2f79787186fc4ac21c5b357c642e1ab04443411 assets/create/lang/unfinished/de_de.json
abdf065efd476eea939956f2b7d59d9b10df1280 assets/create/lang/unfinished/es_cl.json
1971ba8276f31d0e8af81089a15888038197e858 assets/create/lang/unfinished/es_es.json
ea67e13386220b980c0a0245410c2e3d2c845d35 assets/create/lang/unfinished/fr_fr.json
38c181d840e33f6a277876b6cf4db95a2ef15262 assets/create/lang/unfinished/it_it.json
7e54413e3920b0f4ffc2363d5c521735a177e295 assets/create/lang/unfinished/ja_jp.json
4d3696fa3de235b23d1b29a05a56c495ff11930c assets/create/lang/unfinished/ko_kr.json
7f0e6420fc7685523795aca3c87a12df7029e0cc assets/create/lang/unfinished/nl_nl.json
fb286ebb45b6e191c9357085df2fb21061bed70b assets/create/lang/unfinished/pl_pl.json
269439ab8d7277eb445f76f52342a3b7b72f812c assets/create/lang/unfinished/pt_br.json
6bddc9fc7ae5186747521496d21d0226cc23b01b assets/create/lang/unfinished/pt_pt.json
f7704e9e3200b614c60410feca6c83742d42177d assets/create/lang/unfinished/ro_ro.json
c445375f72f9205d119741c4784e9383020bde10 assets/create/lang/unfinished/ru_ru.json
8986740c8eec44cfe805f7cb242232105369f8fa assets/create/lang/unfinished/zh_cn.json
5c4f08c71c49ab13e9b17e2c1106e5a575448cfc assets/create/lang/unfinished/zh_tw.json
8781f68634fbabc8b16488bc9ab5e8c7b9f95194 assets/create/lang/en_us.json
b2cc029708321d9ab6090a4d933860bb4cb7b9f8 assets/create/lang/unfinished/de_de.json
65eeef03fa6735e9abbdb8c6cc2a69cd230a4bae assets/create/lang/unfinished/es_cl.json
b7480756a55d376d4e6a8e60f75789a426fc7f0b assets/create/lang/unfinished/es_es.json
5aa1154bc42ef79c5540223ce4eed19970b37d1e assets/create/lang/unfinished/fr_fr.json
e92b1d5555aacd0d6d12e3d1d10da6dd639e271a assets/create/lang/unfinished/it_it.json
94248494016943eb7f03438221c17fee36defd2c assets/create/lang/unfinished/ja_jp.json
16f4bad7bbaeeab54fa70fbcaaa7e98fc1c0e8e7 assets/create/lang/unfinished/ko_kr.json
5431e9d8417e0a066c5506864046161724e0ae1a assets/create/lang/unfinished/nl_nl.json
eedae972227343a05fdfaafb48bddc6ce5628096 assets/create/lang/unfinished/pl_pl.json
6930870015be01fd5d6b006d048b54d229735dcb assets/create/lang/unfinished/pt_br.json
611a886f8e9bdd8e0f217524c699bd4c2c0b6e3c assets/create/lang/unfinished/pt_pt.json
4d2c08851e80892498b979152302338a5b772766 assets/create/lang/unfinished/ro_ro.json
174b95e8c244fe79c5567fb00cd121dc113a7ede assets/create/lang/unfinished/ru_ru.json
619673460cf89e46cb8d58703ee58212f519fb91 assets/create/lang/unfinished/zh_cn.json
a1e1bb7a55ddd9bbef58c7cef4058ea9b8aba5b8 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
@ -2195,7 +2195,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
40db9034dcb721eb07630d8a300f899dedd6e2f3 assets/create/sounds.json
de7cdf8d734a067af32883e9d86a10e0542a0f5b assets/create/sounds.json
0f1b4b980afba9bf2caf583b88e261bba8b10313 data/create/advancements/aesthetics.json
613e64b44bed959da899fdd54c1cacb227fb33f2 data/create/advancements/andesite_alloy.json
81885c6bfb85792c88aaa7c9b70f58832945d31f data/create/advancements/andesite_casing.json

View file

@ -1637,12 +1637,12 @@
"create.subtitle.contraption_disassemble": "Contraption stops",
"create.subtitle.peculiar_bell_use": "Peculiar Bell tolls",
"create.subtitle.worldshaper_place": "Worldshaper zaps",
"create.subtitle.whistle_train_manual": "Train honks",
"create.subtitle.steam": "Steam noises",
"create.subtitle.saw_activate_stone": "Mechanical Saw activates",
"create.subtitle.schematicannon_finish": "Schematicannon dings",
"create.subtitle.crafter_craft": "Crafter crafts",
"create.subtitle.wrench_remove": "Component breaks",
"create.subtitle.train2": "Bogey wheels rumble",
"create.subtitle.train3": "Bogey wheels rumble muffled",
"create.subtitle.whistle": "Whistling",
"create.subtitle.cogs": "Cogwheels rumble",
@ -1670,10 +1670,10 @@
"create.subtitle.potato_hit": "Vegetable impacts",
"create.subtitle.saw_activate_wood": "Mechanical Saw activates",
"create.subtitle.whistle_high": "High whistling",
"create.subtitle.whistle_train_manual_low": "Train honks",
"create.subtitle.whistle_train": "Whistling",
"create.subtitle.haunted_bell_convert": "Haunted Bell awakens",
"create.subtitle.train": "Bogey wheels rumble",
"create.subtitle.whistle_train_high": "High whistling",
"create.subtitle.deny": "Declining boop",
"create.subtitle.controller_click": "Controller clicks",
"create.subtitle.whistle_low": "Low whistling",

View file

@ -1638,12 +1638,12 @@
"create.subtitle.contraption_disassemble": "Apparat stoppt",
"create.subtitle.peculiar_bell_use": "Eigenartige Glockenschläge",
"create.subtitle.worldshaper_place": "Geländeformer zippt",
"create.subtitle.whistle_train_manual": "UNLOCALIZED: Train honks",
"create.subtitle.steam": "UNLOCALIZED: Steam noises",
"create.subtitle.saw_activate_stone": "Mechanische Säge wird aktiviert",
"create.subtitle.schematicannon_finish": "Bauplankanone endet",
"create.subtitle.crafter_craft": "Hersteller stellt her",
"create.subtitle.wrench_remove": "Teil entfernt",
"create.subtitle.train2": "UNLOCALIZED: Bogey wheels rumble",
"create.subtitle.train3": "UNLOCALIZED: Bogey wheels rumble muffled",
"create.subtitle.whistle": "UNLOCALIZED: Whistling",
"create.subtitle.cogs": "Zahnräder rattern",
@ -1671,10 +1671,10 @@
"create.subtitle.potato_hit": "Gemüse schlägt ein",
"create.subtitle.saw_activate_wood": "Mechanische Säge wird aktiviert",
"create.subtitle.whistle_high": "UNLOCALIZED: High whistling",
"create.subtitle.whistle_train_manual_low": "UNLOCALIZED: Train honks",
"create.subtitle.whistle_train": "UNLOCALIZED: Whistling",
"create.subtitle.haunted_bell_convert": "Spukglocke erwacht",
"create.subtitle.train": "UNLOCALIZED: Bogey wheels rumble",
"create.subtitle.whistle_train_high": "UNLOCALIZED: High whistling",
"create.subtitle.deny": "Ablehnendes boop",
"create.subtitle.controller_click": "Kontroller klickt",
"create.subtitle.whistle_low": "UNLOCALIZED: Low whistling",

View file

@ -1638,12 +1638,12 @@
"create.subtitle.contraption_disassemble": "Contrapción se detiene",
"create.subtitle.peculiar_bell_use": "Campana Peculiar tañe",
"create.subtitle.worldshaper_place": "El Forma Mundos zapea",
"create.subtitle.whistle_train_manual": "UNLOCALIZED: Train honks",
"create.subtitle.steam": "UNLOCALIZED: Steam noises",
"create.subtitle.saw_activate_stone": "Sierra Mecánica se activa",
"create.subtitle.schematicannon_finish": "Esquemacañón campanea",
"create.subtitle.crafter_craft": "Crafteador craftea",
"create.subtitle.wrench_remove": "Componente se rompe",
"create.subtitle.train2": "UNLOCALIZED: Bogey wheels rumble",
"create.subtitle.train3": "UNLOCALIZED: Bogey wheels rumble muffled",
"create.subtitle.whistle": "UNLOCALIZED: Whistling",
"create.subtitle.cogs": "Engranajes suenan",
@ -1671,10 +1671,10 @@
"create.subtitle.potato_hit": "Impactos vegetales",
"create.subtitle.saw_activate_wood": "Sierra Mecánica se activa",
"create.subtitle.whistle_high": "UNLOCALIZED: High whistling",
"create.subtitle.whistle_train_manual_low": "UNLOCALIZED: Train honks",
"create.subtitle.whistle_train": "UNLOCALIZED: Whistling",
"create.subtitle.haunted_bell_convert": "Campana Embrujada despierta",
"create.subtitle.train": "UNLOCALIZED: Bogey wheels rumble",
"create.subtitle.whistle_train_high": "UNLOCALIZED: High whistling",
"create.subtitle.deny": "Boop denegante",
"create.subtitle.controller_click": "Controlador cliquea",
"create.subtitle.whistle_low": "UNLOCALIZED: Low whistling",

View file

@ -1638,12 +1638,12 @@
"create.subtitle.contraption_disassemble": "Artefacto animado se para",
"create.subtitle.peculiar_bell_use": "Campana peculiar suena",
"create.subtitle.worldshaper_place": "Moldeador de mundos coloca bloques",
"create.subtitle.whistle_train_manual": "UNLOCALIZED: Train honks",
"create.subtitle.steam": "UNLOCALIZED: Steam noises",
"create.subtitle.saw_activate_stone": "Sierra mecánica activada",
"create.subtitle.schematicannon_finish": "Esquematicañón suena",
"create.subtitle.crafter_craft": "Ensamblador mecánico acaba",
"create.subtitle.wrench_remove": "Componente se rompe",
"create.subtitle.train2": "UNLOCALIZED: Bogey wheels rumble",
"create.subtitle.train3": "UNLOCALIZED: Bogey wheels rumble muffled",
"create.subtitle.whistle": "UNLOCALIZED: Whistling",
"create.subtitle.cogs": "Engranajes retumban",
@ -1671,10 +1671,10 @@
"create.subtitle.potato_hit": "Impacto de vegetal",
"create.subtitle.saw_activate_wood": "Sierra mecánica activada",
"create.subtitle.whistle_high": "UNLOCALIZED: High whistling",
"create.subtitle.whistle_train_manual_low": "UNLOCALIZED: Train honks",
"create.subtitle.whistle_train": "UNLOCALIZED: Whistling",
"create.subtitle.haunted_bell_convert": "Campana maldita se despierta",
"create.subtitle.train": "UNLOCALIZED: Bogey wheels rumble",
"create.subtitle.whistle_train_high": "UNLOCALIZED: High whistling",
"create.subtitle.deny": "Pitido denegante",
"create.subtitle.controller_click": "",
"create.subtitle.whistle_low": "UNLOCALIZED: Low whistling",

View file

@ -1638,12 +1638,12 @@
"create.subtitle.contraption_disassemble": "UNLOCALIZED: Contraption stops",
"create.subtitle.peculiar_bell_use": "UNLOCALIZED: Peculiar Bell tolls",
"create.subtitle.worldshaper_place": "UNLOCALIZED: Worldshaper zaps",
"create.subtitle.whistle_train_manual": "UNLOCALIZED: Train honks",
"create.subtitle.steam": "UNLOCALIZED: Steam noises",
"create.subtitle.saw_activate_stone": "UNLOCALIZED: Mechanical Saw activates",
"create.subtitle.schematicannon_finish": "Fin de schémacanon",
"create.subtitle.crafter_craft": "UNLOCALIZED: Crafter crafts",
"create.subtitle.wrench_remove": "UNLOCALIZED: Component breaks",
"create.subtitle.train2": "UNLOCALIZED: Bogey wheels rumble",
"create.subtitle.train3": "UNLOCALIZED: Bogey wheels rumble muffled",
"create.subtitle.whistle": "UNLOCALIZED: Whistling",
"create.subtitle.cogs": "UNLOCALIZED: Cogwheels rumble",
@ -1671,10 +1671,10 @@
"create.subtitle.potato_hit": "UNLOCALIZED: Vegetable impacts",
"create.subtitle.saw_activate_wood": "UNLOCALIZED: Mechanical Saw activates",
"create.subtitle.whistle_high": "UNLOCALIZED: High whistling",
"create.subtitle.whistle_train_manual_low": "UNLOCALIZED: Train honks",
"create.subtitle.whistle_train": "UNLOCALIZED: Whistling",
"create.subtitle.haunted_bell_convert": "UNLOCALIZED: Haunted Bell awakens",
"create.subtitle.train": "UNLOCALIZED: Bogey wheels rumble",
"create.subtitle.whistle_train_high": "UNLOCALIZED: High whistling",
"create.subtitle.deny": "UNLOCALIZED: Declining boop",
"create.subtitle.controller_click": "UNLOCALIZED: Controller clicks",
"create.subtitle.whistle_low": "UNLOCALIZED: Low whistling",

View file

@ -1638,12 +1638,12 @@
"create.subtitle.contraption_disassemble": "UNLOCALIZED: Contraption stops",
"create.subtitle.peculiar_bell_use": "UNLOCALIZED: Peculiar Bell tolls",
"create.subtitle.worldshaper_place": "UNLOCALIZED: Worldshaper zaps",
"create.subtitle.whistle_train_manual": "UNLOCALIZED: Train honks",
"create.subtitle.steam": "UNLOCALIZED: Steam noises",
"create.subtitle.saw_activate_stone": "UNLOCALIZED: Mechanical Saw activates",
"create.subtitle.schematicannon_finish": "Finiture cannoneschematico",
"create.subtitle.crafter_craft": "UNLOCALIZED: Crafter crafts",
"create.subtitle.wrench_remove": "UNLOCALIZED: Component breaks",
"create.subtitle.train2": "UNLOCALIZED: Bogey wheels rumble",
"create.subtitle.train3": "UNLOCALIZED: Bogey wheels rumble muffled",
"create.subtitle.whistle": "UNLOCALIZED: Whistling",
"create.subtitle.cogs": "UNLOCALIZED: Cogwheels rumble",
@ -1671,10 +1671,10 @@
"create.subtitle.potato_hit": "UNLOCALIZED: Vegetable impacts",
"create.subtitle.saw_activate_wood": "UNLOCALIZED: Mechanical Saw activates",
"create.subtitle.whistle_high": "UNLOCALIZED: High whistling",
"create.subtitle.whistle_train_manual_low": "UNLOCALIZED: Train honks",
"create.subtitle.whistle_train": "UNLOCALIZED: Whistling",
"create.subtitle.haunted_bell_convert": "UNLOCALIZED: Haunted Bell awakens",
"create.subtitle.train": "UNLOCALIZED: Bogey wheels rumble",
"create.subtitle.whistle_train_high": "UNLOCALIZED: High whistling",
"create.subtitle.deny": "UNLOCALIZED: Declining boop",
"create.subtitle.controller_click": "UNLOCALIZED: Controller clicks",
"create.subtitle.whistle_low": "UNLOCALIZED: Low whistling",

View file

@ -1638,12 +1638,12 @@
"create.subtitle.contraption_disassemble": "からくりが止まる",
"create.subtitle.peculiar_bell_use": "風変わりな鐘が鳴る",
"create.subtitle.worldshaper_place": "ワールドシェーパーが設置する",
"create.subtitle.whistle_train_manual": "UNLOCALIZED: Train honks",
"create.subtitle.steam": "UNLOCALIZED: Steam noises",
"create.subtitle.saw_activate_stone": "メカニカルソーが動作する",
"create.subtitle.schematicannon_finish": "概略図砲が作業を終える",
"create.subtitle.crafter_craft": "メカニカルクラフターがクラフトする",
"create.subtitle.wrench_remove": "機械を壊す",
"create.subtitle.train2": "UNLOCALIZED: Bogey wheels rumble",
"create.subtitle.train3": "UNLOCALIZED: Bogey wheels rumble muffled",
"create.subtitle.whistle": "UNLOCALIZED: Whistling",
"create.subtitle.cogs": "歯車がゴロゴロと鳴る",
@ -1671,10 +1671,10 @@
"create.subtitle.potato_hit": "野菜の衝撃",
"create.subtitle.saw_activate_wood": "メカニカルソーが動作する",
"create.subtitle.whistle_high": "UNLOCALIZED: High whistling",
"create.subtitle.whistle_train_manual_low": "UNLOCALIZED: Train honks",
"create.subtitle.whistle_train": "UNLOCALIZED: Whistling",
"create.subtitle.haunted_bell_convert": "憑りつかれた鐘が目覚める",
"create.subtitle.train": "UNLOCALIZED: Bogey wheels rumble",
"create.subtitle.whistle_train_high": "UNLOCALIZED: High whistling",
"create.subtitle.deny": "失敗音",
"create.subtitle.controller_click": "コントローラーのカチカチ音",
"create.subtitle.whistle_low": "UNLOCALIZED: Low whistling",

View file

@ -1638,12 +1638,12 @@
"create.subtitle.contraption_disassemble": "구조물이 멈춤",
"create.subtitle.peculiar_bell_use": "황동 종이 울림",
"create.subtitle.worldshaper_place": "세계편집기가 쏨",
"create.subtitle.whistle_train_manual": "UNLOCALIZED: Train honks",
"create.subtitle.steam": "UNLOCALIZED: Steam noises",
"create.subtitle.saw_activate_stone": "톱이 작동함",
"create.subtitle.schematicannon_finish": "청사진 대포가 끝남",
"create.subtitle.crafter_craft": "조합기가 조합함",
"create.subtitle.wrench_remove": "장치가 부숴짐",
"create.subtitle.train2": "UNLOCALIZED: Bogey wheels rumble",
"create.subtitle.train3": "UNLOCALIZED: Bogey wheels rumble muffled",
"create.subtitle.whistle": "UNLOCALIZED: Whistling",
"create.subtitle.cogs": "톱니바퀴가 돌아감",
@ -1671,10 +1671,10 @@
"create.subtitle.potato_hit": "채소가 부딫힘",
"create.subtitle.saw_activate_wood": "톱이 작동함",
"create.subtitle.whistle_high": "UNLOCALIZED: High whistling",
"create.subtitle.whistle_train_manual_low": "UNLOCALIZED: Train honks",
"create.subtitle.whistle_train": "UNLOCALIZED: Whistling",
"create.subtitle.haunted_bell_convert": "종에 귀신이 들림",
"create.subtitle.train": "UNLOCALIZED: Bogey wheels rumble",
"create.subtitle.whistle_train_high": "UNLOCALIZED: High whistling",
"create.subtitle.deny": "취소음",
"create.subtitle.controller_click": "조작기를 누름",
"create.subtitle.whistle_low": "UNLOCALIZED: Low whistling",

View file

@ -1638,12 +1638,12 @@
"create.subtitle.contraption_disassemble": "UNLOCALIZED: Contraption stops",
"create.subtitle.peculiar_bell_use": "UNLOCALIZED: Peculiar Bell tolls",
"create.subtitle.worldshaper_place": "UNLOCALIZED: Worldshaper zaps",
"create.subtitle.whistle_train_manual": "UNLOCALIZED: Train honks",
"create.subtitle.steam": "UNLOCALIZED: Steam noises",
"create.subtitle.saw_activate_stone": "UNLOCALIZED: Mechanical Saw activates",
"create.subtitle.schematicannon_finish": "UNLOCALIZED: Schematicannon dings",
"create.subtitle.crafter_craft": "UNLOCALIZED: Crafter crafts",
"create.subtitle.wrench_remove": "UNLOCALIZED: Component breaks",
"create.subtitle.train2": "UNLOCALIZED: Bogey wheels rumble",
"create.subtitle.train3": "UNLOCALIZED: Bogey wheels rumble muffled",
"create.subtitle.whistle": "UNLOCALIZED: Whistling",
"create.subtitle.cogs": "UNLOCALIZED: Cogwheels rumble",
@ -1671,10 +1671,10 @@
"create.subtitle.potato_hit": "UNLOCALIZED: Vegetable impacts",
"create.subtitle.saw_activate_wood": "UNLOCALIZED: Mechanical Saw activates",
"create.subtitle.whistle_high": "UNLOCALIZED: High whistling",
"create.subtitle.whistle_train_manual_low": "UNLOCALIZED: Train honks",
"create.subtitle.whistle_train": "UNLOCALIZED: Whistling",
"create.subtitle.haunted_bell_convert": "UNLOCALIZED: Haunted Bell awakens",
"create.subtitle.train": "UNLOCALIZED: Bogey wheels rumble",
"create.subtitle.whistle_train_high": "UNLOCALIZED: High whistling",
"create.subtitle.deny": "UNLOCALIZED: Declining boop",
"create.subtitle.controller_click": "UNLOCALIZED: Controller clicks",
"create.subtitle.whistle_low": "UNLOCALIZED: Low whistling",

View file

@ -1638,12 +1638,12 @@
"create.subtitle.contraption_disassemble": "Maszyna staje",
"create.subtitle.peculiar_bell_use": "Dziwny dzwon dzwoni",
"create.subtitle.worldshaper_place": "Kształter strzela",
"create.subtitle.whistle_train_manual": "UNLOCALIZED: Train honks",
"create.subtitle.steam": "UNLOCALIZED: Steam noises",
"create.subtitle.saw_activate_stone": "Mechaniczna piła aktywuje się",
"create.subtitle.schematicannon_finish": "Schematoarmata skończyła",
"create.subtitle.crafter_craft": "Mechaniczny stół rzemieślniczy konstruuje",
"create.subtitle.wrench_remove": "Komponent niszczy się",
"create.subtitle.train2": "UNLOCALIZED: Bogey wheels rumble",
"create.subtitle.train3": "UNLOCALIZED: Bogey wheels rumble muffled",
"create.subtitle.whistle": "UNLOCALIZED: Whistling",
"create.subtitle.cogs": "Koła zębate terkoczą",
@ -1671,10 +1671,10 @@
"create.subtitle.potato_hit": "Warzywo ląduje",
"create.subtitle.saw_activate_wood": "Mechaniczna piła aktywuje się",
"create.subtitle.whistle_high": "UNLOCALIZED: High whistling",
"create.subtitle.whistle_train_manual_low": "UNLOCALIZED: Train honks",
"create.subtitle.whistle_train": "UNLOCALIZED: Whistling",
"create.subtitle.haunted_bell_convert": "Nawiedzony dzwon budzi się",
"create.subtitle.train": "UNLOCALIZED: Bogey wheels rumble",
"create.subtitle.whistle_train_high": "UNLOCALIZED: High whistling",
"create.subtitle.deny": "Dźwięk odmowy",
"create.subtitle.controller_click": "Sterownik klika",
"create.subtitle.whistle_low": "UNLOCALIZED: Low whistling",

View file

@ -1638,12 +1638,12 @@
"create.subtitle.contraption_disassemble": "Engenhoca para",
"create.subtitle.peculiar_bell_use": "Sino peculiar toca",
"create.subtitle.worldshaper_place": "Zaps do terraformador",
"create.subtitle.whistle_train_manual": "UNLOCALIZED: Train honks",
"create.subtitle.steam": "UNLOCALIZED: Steam noises",
"create.subtitle.saw_activate_stone": "Serra mecânica ativa",
"create.subtitle.schematicannon_finish": "Ding do canhão de esquema",
"create.subtitle.crafter_craft": "Fabricador fábrica",
"create.subtitle.wrench_remove": "Componente quebra",
"create.subtitle.train2": "UNLOCALIZED: Bogey wheels rumble",
"create.subtitle.train3": "UNLOCALIZED: Bogey wheels rumble muffled",
"create.subtitle.whistle": "UNLOCALIZED: Whistling",
"create.subtitle.cogs": "tremer da rodas dentadas",
@ -1671,10 +1671,10 @@
"create.subtitle.potato_hit": "Impacto vegetal",
"create.subtitle.saw_activate_wood": "Serra mecânica ativa",
"create.subtitle.whistle_high": "UNLOCALIZED: High whistling",
"create.subtitle.whistle_train_manual_low": "UNLOCALIZED: Train honks",
"create.subtitle.whistle_train": "UNLOCALIZED: Whistling",
"create.subtitle.haunted_bell_convert": "Sino assombrado acorda",
"create.subtitle.train": "UNLOCALIZED: Bogey wheels rumble",
"create.subtitle.whistle_train_high": "UNLOCALIZED: High whistling",
"create.subtitle.deny": "Boop de negação",
"create.subtitle.controller_click": "Clicks do controle",
"create.subtitle.whistle_low": "UNLOCALIZED: Low whistling",

View file

@ -1638,12 +1638,12 @@
"create.subtitle.contraption_disassemble": "UNLOCALIZED: Contraption stops",
"create.subtitle.peculiar_bell_use": "UNLOCALIZED: Peculiar Bell tolls",
"create.subtitle.worldshaper_place": "UNLOCALIZED: Worldshaper zaps",
"create.subtitle.whistle_train_manual": "UNLOCALIZED: Train honks",
"create.subtitle.steam": "UNLOCALIZED: Steam noises",
"create.subtitle.saw_activate_stone": "UNLOCALIZED: Mechanical Saw activates",
"create.subtitle.schematicannon_finish": "UNLOCALIZED: Schematicannon dings",
"create.subtitle.crafter_craft": "UNLOCALIZED: Crafter crafts",
"create.subtitle.wrench_remove": "UNLOCALIZED: Component breaks",
"create.subtitle.train2": "UNLOCALIZED: Bogey wheels rumble",
"create.subtitle.train3": "UNLOCALIZED: Bogey wheels rumble muffled",
"create.subtitle.whistle": "UNLOCALIZED: Whistling",
"create.subtitle.cogs": "UNLOCALIZED: Cogwheels rumble",
@ -1671,10 +1671,10 @@
"create.subtitle.potato_hit": "UNLOCALIZED: Vegetable impacts",
"create.subtitle.saw_activate_wood": "UNLOCALIZED: Mechanical Saw activates",
"create.subtitle.whistle_high": "UNLOCALIZED: High whistling",
"create.subtitle.whistle_train_manual_low": "UNLOCALIZED: Train honks",
"create.subtitle.whistle_train": "UNLOCALIZED: Whistling",
"create.subtitle.haunted_bell_convert": "UNLOCALIZED: Haunted Bell awakens",
"create.subtitle.train": "UNLOCALIZED: Bogey wheels rumble",
"create.subtitle.whistle_train_high": "UNLOCALIZED: High whistling",
"create.subtitle.deny": "UNLOCALIZED: Declining boop",
"create.subtitle.controller_click": "UNLOCALIZED: Controller clicks",
"create.subtitle.whistle_low": "UNLOCALIZED: Low whistling",

View file

@ -1638,12 +1638,12 @@
"create.subtitle.contraption_disassemble": "Invenție se oprește",
"create.subtitle.peculiar_bell_use": "Clopot Ciudat bate",
"create.subtitle.worldshaper_place": "Modelator de Lume face zap",
"create.subtitle.whistle_train_manual": "UNLOCALIZED: Train honks",
"create.subtitle.steam": "UNLOCALIZED: Steam noises",
"create.subtitle.saw_activate_stone": "Ferăstrău Mecanic se activează",
"create.subtitle.schematicannon_finish": "Tun de Schemă face ding",
"create.subtitle.crafter_craft": "Meșter lucrează",
"create.subtitle.wrench_remove": "Component se sparge",
"create.subtitle.train2": "UNLOCALIZED: Bogey wheels rumble",
"create.subtitle.train3": "UNLOCALIZED: Bogey wheels rumble muffled",
"create.subtitle.whistle": "UNLOCALIZED: Whistling",
"create.subtitle.cogs": "Roți Dințate vuie",
@ -1671,10 +1671,10 @@
"create.subtitle.potato_hit": "Impact de legumă",
"create.subtitle.saw_activate_wood": "Ferăstrău Mecanic se activează",
"create.subtitle.whistle_high": "UNLOCALIZED: High whistling",
"create.subtitle.whistle_train_manual_low": "UNLOCALIZED: Train honks",
"create.subtitle.whistle_train": "UNLOCALIZED: Whistling",
"create.subtitle.haunted_bell_convert": "Clopot Bântuit se trezețte",
"create.subtitle.train": "UNLOCALIZED: Bogey wheels rumble",
"create.subtitle.whistle_train_high": "UNLOCALIZED: High whistling",
"create.subtitle.deny": "Boop de refuz",
"create.subtitle.controller_click": "Controlor clickuiește",
"create.subtitle.whistle_low": "UNLOCALIZED: Low whistling",

View file

@ -1638,12 +1638,12 @@
"create.subtitle.contraption_disassemble": "Штуковина останавливается",
"create.subtitle.peculiar_bell_use": "Особенный колокол звонит",
"create.subtitle.worldshaper_place": "Ручной редактор мира делает «Зап»",
"create.subtitle.whistle_train_manual": "UNLOCALIZED: Train honks",
"create.subtitle.steam": "UNLOCALIZED: Steam noises",
"create.subtitle.saw_activate_stone": "Активируется механическая пила",
"create.subtitle.schematicannon_finish": "Схематичная пушка закончила работу",
"create.subtitle.crafter_craft": "Крафтер создаёт",
"create.subtitle.wrench_remove": "Компонент ломается",
"create.subtitle.train2": "UNLOCALIZED: Bogey wheels rumble",
"create.subtitle.train3": "UNLOCALIZED: Bogey wheels rumble muffled",
"create.subtitle.whistle": "UNLOCALIZED: Whistling",
"create.subtitle.cogs": "Шестерни грохочут",
@ -1671,10 +1671,10 @@
"create.subtitle.potato_hit": "Овощ врезается",
"create.subtitle.saw_activate_wood": "Активируется механическая пила",
"create.subtitle.whistle_high": "UNLOCALIZED: High whistling",
"create.subtitle.whistle_train_manual_low": "UNLOCALIZED: Train honks",
"create.subtitle.whistle_train": "UNLOCALIZED: Whistling",
"create.subtitle.haunted_bell_convert": "Призрачный колокол пробуждается",
"create.subtitle.train": "UNLOCALIZED: Bogey wheels rumble",
"create.subtitle.whistle_train_high": "UNLOCALIZED: High whistling",
"create.subtitle.deny": "Отрицательный «Буп»",
"create.subtitle.controller_click": "Клики контроллера",
"create.subtitle.whistle_low": "UNLOCALIZED: Low whistling",

View file

@ -1638,12 +1638,12 @@
"create.subtitle.contraption_disassemble": "结构:停止移动",
"create.subtitle.peculiar_bell_use": "奇异钟:鸣响",
"create.subtitle.worldshaper_place": "环境塑型器:放置方块",
"create.subtitle.whistle_train_manual": "UNLOCALIZED: Train honks",
"create.subtitle.steam": "UNLOCALIZED: Steam noises",
"create.subtitle.saw_activate_stone": "动力锯:切割",
"create.subtitle.schematicannon_finish": "蓝图加农炮:叮",
"create.subtitle.crafter_craft": "动力合成器:合成中",
"create.subtitle.wrench_remove": "组件:被破坏",
"create.subtitle.train2": "UNLOCALIZED: Bogey wheels rumble",
"create.subtitle.train3": "UNLOCALIZED: Bogey wheels rumble muffled",
"create.subtitle.whistle": "UNLOCALIZED: Whistling",
"create.subtitle.cogs": "齿轮:嘎吱作响",
@ -1671,10 +1671,10 @@
"create.subtitle.potato_hit": "土豆:击中",
"create.subtitle.saw_activate_wood": "动力锯:切割",
"create.subtitle.whistle_high": "UNLOCALIZED: High whistling",
"create.subtitle.whistle_train_manual_low": "UNLOCALIZED: Train honks",
"create.subtitle.whistle_train": "UNLOCALIZED: Whistling",
"create.subtitle.haunted_bell_convert": "奇异钟:转化",
"create.subtitle.train": "UNLOCALIZED: Bogey wheels rumble",
"create.subtitle.whistle_train_high": "UNLOCALIZED: High whistling",
"create.subtitle.deny": "提示声:出错",
"create.subtitle.controller_click": "遥控器:按下按钮",
"create.subtitle.whistle_low": "UNLOCALIZED: Low whistling",

View file

@ -1638,12 +1638,12 @@
"create.subtitle.contraption_disassemble": "結構停止",
"create.subtitle.peculiar_bell_use": "黃銅鐘聲",
"create.subtitle.worldshaper_place": "地形塑造器發射聲",
"create.subtitle.whistle_train_manual": "UNLOCALIZED: Train honks",
"create.subtitle.steam": "UNLOCALIZED: Steam noises",
"create.subtitle.saw_activate_stone": "機械鋸子聲",
"create.subtitle.schematicannon_finish": "藍圖大炮完成任務",
"create.subtitle.crafter_craft": "機械合成器合成聲",
"create.subtitle.wrench_remove": "零件移除聲",
"create.subtitle.train2": "UNLOCALIZED: Bogey wheels rumble",
"create.subtitle.train3": "UNLOCALIZED: Bogey wheels rumble muffled",
"create.subtitle.whistle": "UNLOCALIZED: Whistling",
"create.subtitle.cogs": "齒輪隆隆聲",
@ -1671,10 +1671,10 @@
"create.subtitle.potato_hit": "食物撞擊聲",
"create.subtitle.saw_activate_wood": "機械鋸子運作聲",
"create.subtitle.whistle_high": "UNLOCALIZED: High whistling",
"create.subtitle.whistle_train_manual_low": "UNLOCALIZED: Train honks",
"create.subtitle.whistle_train": "UNLOCALIZED: Whistling",
"create.subtitle.haunted_bell_convert": "靈魂鐘轉化聲",
"create.subtitle.train": "UNLOCALIZED: Bogey wheels rumble",
"create.subtitle.whistle_train_high": "UNLOCALIZED: High whistling",
"create.subtitle.deny": "UNLOCALIZED: Declining boop",
"create.subtitle.controller_click": "遙控器按鍵聲",
"create.subtitle.whistle_low": "UNLOCALIZED: Low whistling",

View file

@ -14,8 +14,7 @@
"name": "create:chiff",
"type": "file"
}
],
"subtitle": "create.subtitle.chiff"
]
},
"cogs": {
"sounds": [
@ -416,8 +415,7 @@
"type": "file",
"attenuation_distance": 128
}
],
"subtitle": "create.subtitle.train2"
]
},
"train3": {
"sounds": [
@ -468,15 +466,6 @@
],
"subtitle": "create.subtitle.whistle_train"
},
"whistle_train_high": {
"sounds": [
{
"name": "create:whistle_train_high",
"type": "file"
}
],
"subtitle": "create.subtitle.whistle_train_high"
},
"whistle_train_low": {
"sounds": [
{
@ -486,6 +475,44 @@
],
"subtitle": "create.subtitle.whistle_train_low"
},
"whistle_train_manual": {
"sounds": [
{
"name": "create:whistle_train_manual",
"type": "file",
"attenuation_distance": 64
}
],
"subtitle": "create.subtitle.whistle_train_manual"
},
"whistle_train_manual_end": {
"sounds": [
{
"name": "create:whistle_train_manual_end",
"type": "file",
"attenuation_distance": 64
}
]
},
"whistle_train_manual_low": {
"sounds": [
{
"name": "create:whistle_train_manual_low",
"type": "file",
"attenuation_distance": 64
}
],
"subtitle": "create.subtitle.whistle_train_manual_low"
},
"whistle_train_manual_low_end": {
"sounds": [
{
"name": "create:whistle_train_manual_low_end",
"type": "file",
"attenuation_distance": 64
}
]
},
"worldshaper_place": {
"sounds": [
{

View file

@ -248,7 +248,7 @@ public class AllSoundEvents {
.attenuationDistance(128)
.build(),
TRAIN2 = create("train2").subtitle("Bogey wheels rumble")
TRAIN2 = create("train2").noSubtitle()
.category(SoundSource.NEUTRAL)
.attenuationDistance(128)
.build(),
@ -258,11 +258,7 @@ public class AllSoundEvents {
.attenuationDistance(16)
.build(),
WHISTLE_TRAIN_HIGH = create("whistle_train_high").subtitle("High whistling")
.category(SoundSource.RECORDS)
.build(),
WHISTLE_TRAIN_MEDIUM = create("whistle_train").subtitle("Whistling")
WHISTLE_TRAIN = create("whistle_train").subtitle("Whistling")
.category(SoundSource.RECORDS)
.build(),
@ -270,6 +266,26 @@ public class AllSoundEvents {
.category(SoundSource.RECORDS)
.build(),
WHISTLE_TRAIN_MANUAL = create("whistle_train_manual").subtitle("Train honks")
.category(SoundSource.NEUTRAL)
.attenuationDistance(64)
.build(),
WHISTLE_TRAIN_MANUAL_LOW = create("whistle_train_manual_low").subtitle("Train honks")
.category(SoundSource.NEUTRAL)
.attenuationDistance(64)
.build(),
WHISTLE_TRAIN_MANUAL_END = create("whistle_train_manual_end").noSubtitle()
.category(SoundSource.NEUTRAL)
.attenuationDistance(64)
.build(),
WHISTLE_TRAIN_MANUAL_LOW_END = create("whistle_train_manual_low_end").noSubtitle()
.category(SoundSource.NEUTRAL)
.attenuationDistance(64)
.build(),
WHISTLE_CHIFF = create("chiff").noSubtitle()
.category(SoundSource.RECORDS)
.build(),
@ -640,7 +656,8 @@ public class AllSoundEvents {
}
entry.add("sounds", list);
entry.addProperty("subtitle", getSubtitleKey());
if (hasSubtitle())
entry.addProperty("subtitle", getSubtitleKey());
json.add(id.getPath(), entry);
}

View file

@ -0,0 +1,72 @@
package com.simibubi.create.content.contraptions.components.structureMovement.interaction.controls;
import java.util.UUID;
import java.util.function.Supplier;
import com.simibubi.create.Create;
import com.simibubi.create.content.logistics.trains.entity.Train;
import com.simibubi.create.foundation.networking.AllPackets;
import com.simibubi.create.foundation.networking.SimplePacketBase;
import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.server.level.ServerPlayer;
import net.minecraftforge.network.NetworkEvent.Context;
import net.minecraftforge.network.PacketDistributor;
public class HonkPacket extends SimplePacketBase {
UUID trainId;
boolean isHonk;
public HonkPacket() {}
public HonkPacket(Train train, boolean isHonk) {
trainId = train.id;
this.isHonk = isHonk;
}
public HonkPacket(FriendlyByteBuf buffer) {
trainId = buffer.readUUID();
isHonk = buffer.readBoolean();
}
@Override
public void write(FriendlyByteBuf buffer) {
buffer.writeUUID(trainId);
buffer.writeBoolean(isHonk);
}
@Override
public void handle(Supplier<Context> context) {
Context c = context.get();
c.enqueueWork(() -> {
ServerPlayer sender = c.getSender();
boolean clientSide = sender == null;
Train train = Create.RAILWAYS.sided(clientSide ? null : sender.level).trains.get(trainId);
if (train == null)
return;
if (clientSide) {
if (isHonk)
train.honkTicks = train.honkTicks == 0 ? 20 : 13;
else
train.honkTicks = train.honkTicks > 5 ? 6 : 0;
} else
AllPackets.channel.send(PacketDistributor.ALL.noArg(), new HonkPacket(train, isHonk));
});
c.setPacketHandled(true);
}
public static class Serverbound extends HonkPacket {
public Serverbound(FriendlyByteBuf buffer) {
super(buffer);
}
public Serverbound(Train train, boolean isHonk) {
super(train, isHonk);
}
}
}

View file

@ -8,6 +8,7 @@ import com.simibubi.create.foundation.config.AllConfigs;
import com.simibubi.create.foundation.gui.AllGuiTextures;
import com.simibubi.create.foundation.networking.AllPackets;
import com.simibubi.create.foundation.utility.AngleHelper;
import com.simibubi.create.foundation.utility.ControlsUtil;
import com.simibubi.create.foundation.utility.animation.LerpedFloat;
import com.simibubi.create.foundation.utility.animation.LerpedFloat.Chaser;
import com.simibubi.create.foundation.utility.placement.PlacementHelpers;
@ -34,11 +35,14 @@ public class TrainHUD {
static Double editedThrottle = null;
static int hudPacketCooldown = 5;
static int honkPacketCooldown = 5;
public static Component currentPrompt;
public static boolean currentPromptShadow;
public static int promptKeepAlive = 0;
static boolean usedToHonk;
public static void tick() {
if (promptKeepAlive > 0)
promptKeepAlive--;
@ -63,6 +67,20 @@ public class TrainHUD {
displayedThrottle.chase(editedThrottle != null ? editedThrottle : train.throttle, .75f, Chaser.EXP);
displayedThrottle.tickChaser();
boolean isSprintKeyPressed = ControlsUtil.isActuallyPressed(Minecraft.getInstance().options.keySprint);
if (isSprintKeyPressed && honkPacketCooldown-- <= 0) {
AllPackets.channel.sendToServer(new HonkPacket.Serverbound(train, true));
honkPacketCooldown = 5;
usedToHonk = true;
}
if (!isSprintKeyPressed && usedToHonk) {
AllPackets.channel.sendToServer(new HonkPacket.Serverbound(train, false));
honkPacketCooldown = 0;
usedToHonk = false;
}
if (editedThrottle == null)
return;
if (Mth.equal(editedThrottle, train.throttle)) {
@ -71,10 +89,10 @@ public class TrainHUD {
return;
}
if (hudPacketCooldown-- > 0)
return;
AllPackets.channel.sendToServer(new TrainHUDUpdatePacket.Serverbound(train, editedThrottle));
hudPacketCooldown = 5;
if (hudPacketCooldown-- <= 0) {
AllPackets.channel.sendToServer(new TrainHUDUpdatePacket.Serverbound(train, editedThrottle));
hudPacketCooldown = 5;
}
}
private static Carriage getCarriage() {

View file

@ -13,6 +13,7 @@ import com.simibubi.create.content.contraptions.components.steam.whistle.Whistle
import com.simibubi.create.content.contraptions.components.steam.whistle.WhistleBlock.WhistleSize;
import com.simibubi.create.content.contraptions.components.structureMovement.Contraption;
import com.simibubi.create.foundation.utility.NBTHelper;
import com.simibubi.create.foundation.utility.Pair;
import net.minecraft.core.BlockPos;
import net.minecraft.nbt.CompoundTag;
@ -59,6 +60,31 @@ public class ArrivalSoundQueue {
return backwards ? tick > min : tick < max;
}
public Pair<Boolean, Integer> getFirstWhistle(CarriageContraptionEntity entity) {
Integer firstTick = firstTick();
Integer lastTick = lastTick();
if (firstTick == null || lastTick == null || firstTick > lastTick)
return null;
for (int i = firstTick; i <= lastTick; i++) {
if (!sources.containsKey(i - offset))
continue;
Contraption contraption = entity.getContraption();
for (BlockPos blockPos : sources.get(i - offset)) {
StructureBlockInfo info = contraption.getBlocks()
.get(blockPos);
if (info == null)
continue;
BlockState state = info.state;
if (state.getBlock() instanceof WhistleBlock && info.nbt != null) {
int pitch = info.nbt.getInt("Pitch");
WhistleSize size = state.getValue(WhistleBlock.SIZE);
return Pair.of(size == WhistleSize.LARGE, (size == WhistleSize.SMALL ? 12 : 0) - pitch);
}
}
}
return null;
}
public void serialize(CompoundTag tagIn) {
CompoundTag tag = new CompoundTag();
tag.putInt("Offset", offset);
@ -117,7 +143,7 @@ public class ArrivalSoundQueue {
WhistleSize size = state.getValue(WhistleBlock.SIZE);
float f = (float) Math.pow(2, ((size == WhistleSize.SMALL ? 12 : 0) - pitch) / 12.0);
playSimple(entity,
(size == WhistleSize.LARGE ? AllSoundEvents.WHISTLE_TRAIN_LOW : AllSoundEvents.WHISTLE_TRAIN_MEDIUM)
(size == WhistleSize.LARGE ? AllSoundEvents.WHISTLE_TRAIN_LOW : AllSoundEvents.WHISTLE_TRAIN)
.getMainEvent(),
1, f);
// playSimple(entity, AllSoundEvents.WHISTLE_CHIFF.getMainEvent(), .75f,

View file

@ -1,6 +1,7 @@
package com.simibubi.create.content.logistics.trains.entity;
import com.simibubi.create.AllSoundEvents;
import com.simibubi.create.AllSoundEvents.SoundEntry;
import com.simibubi.create.content.logistics.trains.entity.Carriage.DimensionalCarriageEntity;
import com.simibubi.create.foundation.utility.animation.LerpedFloat;
import com.simibubi.create.foundation.utility.animation.LerpedFloat.Chaser;
@ -26,6 +27,7 @@ public class CarriageSounds {
LoopingSound minecartEsqueSound;
LoopingSound sharedWheelSound;
LoopingSound sharedWheelSoundSeated;
LoopingSound sharedHonkSound;
boolean arrived;
@ -115,7 +117,7 @@ public class CarriageSounds {
volume = Math.min(volume, distanceFactor.getValue() / 800);
float pitch = Mth.clamp(speedFactor.getValue() * 2 + .25f, .75f, 1.95f) - pitchModifier;
float pitch2 = Mth.clamp(speedFactor.getValue() * 2, 0.75f, 1.25f) - pitchModifier;
// float pitch2 = Mth.clamp(speedFactor.getValue() * 2, 0.75f, 1.25f) - pitchModifier;
minecartEsqueSound.setPitch(pitch * 1.5f);
@ -132,17 +134,54 @@ public class CarriageSounds {
if (mainEntity.sounds == null)
mainEntity.sounds = new CarriageSounds(mainEntity);
mainEntity.sounds.submitSharedSoundVolume(soundLocation, volume);
if (carriage != entity.getCarriage())
if (carriage != entity.getCarriage()) {
finalizeSharedVolume(0);
return;
}
break;
}
// finalizeSharedVolume(volume);
// minecartEsqueSound.setLocation(soundLocation);
// sharedWheelSound.setPitch(pitch2);
// sharedWheelSound.setLocation(soundLocation);
// sharedWheelSoundSeated.setPitch(pitch2);
// sharedWheelSoundSeated.setLocation(soundLocation);
if (train.honkTicks == 0) {
if (sharedHonkSound != null) {
sharedHonkSound.stopSound();
sharedHonkSound = null;
}
return;
}
finalizeSharedVolume(volume);
minecartEsqueSound.setLocation(soundLocation);
sharedWheelSound.setPitch(pitch2);
sharedWheelSound.setLocation(soundLocation);
sharedWheelSoundSeated.setPitch(pitch2);
sharedWheelSoundSeated.setLocation(soundLocation);
train.honkTicks--;
train.determineHonk(entity.level);
if (train.lowHonk == null)
return;
boolean low = train.lowHonk;
float honkPitch = (float) Math.pow(2, train.honkPitch / 12.0);
SoundEntry endSound =
!low ? AllSoundEvents.WHISTLE_TRAIN_MANUAL_END : AllSoundEvents.WHISTLE_TRAIN_MANUAL_LOW_END;
SoundEntry continuousSound =
!low ? AllSoundEvents.WHISTLE_TRAIN_MANUAL : AllSoundEvents.WHISTLE_TRAIN_MANUAL_LOW;
if (train.honkTicks == 5)
endSound.playAt(mc.level, soundLocation, 1, honkPitch, false);
if (train.honkTicks == 19)
endSound.playAt(mc.level, soundLocation, .5f, honkPitch, false);
sharedHonkSound = playIfMissing(mc, sharedHonkSound, continuousSound.getMainEvent());
sharedHonkSound.setLocation(soundLocation);
float fadeout = Mth.clamp((3 - train.honkTicks) / 3f, 0, 1);
float fadein = Mth.clamp((train.honkTicks - 17) / 3f, 0, 1);
sharedHonkSound.setVolume(1 - fadeout - fadein);
sharedHonkSound.setPitch(honkPitch);
}
private LoopingSound playIfMissing(Minecraft mc, LoopingSound loopingSound, SoundEvent sound) {
@ -193,6 +232,8 @@ public class CarriageSounds {
sharedWheelSound.stopSound();
if (sharedWheelSoundSeated != null)
sharedWheelSoundSeated.stopSound();
if (sharedHonkSound != null)
sharedHonkSound.stopSound();
}
class LoopingSound extends AbstractTickableSoundInstance {

View file

@ -39,6 +39,7 @@ import com.simibubi.create.content.logistics.trains.management.edgePoint.signal.
import com.simibubi.create.content.logistics.trains.management.edgePoint.signal.SignalBoundary;
import com.simibubi.create.content.logistics.trains.management.edgePoint.signal.SignalEdgeGroup;
import com.simibubi.create.content.logistics.trains.management.edgePoint.station.GlobalStation;
import com.simibubi.create.content.logistics.trains.management.edgePoint.station.StationTileEntity;
import com.simibubi.create.content.logistics.trains.management.schedule.ScheduleRuntime;
import com.simibubi.create.content.logistics.trains.management.schedule.ScheduleRuntime.State;
import com.simibubi.create.foundation.config.AllConfigs;
@ -77,7 +78,7 @@ public class Train {
public double speed = 0;
public double targetSpeed = 0;
public Double speedBeforeStall = null;
public double throttle = 1;
public boolean honk = false;
@ -114,6 +115,10 @@ public class Train {
public boolean derailed;
public int fuelTicks;
public int honkTicks;
public Boolean lowHonk;
public int honkPitch;
int tickOffset;
double[] stress;
@ -675,12 +680,15 @@ public class Train {
int offset = 1;
boolean backwards = currentlyBackwards;
Level level = null;
for (int i = 0; i < carriages.size(); i++) {
Carriage carriage = carriages.get(backwards ? carriages.size() - i - 1 : i);
CarriageContraptionEntity entity = carriage.anyAvailableEntity();
if (entity == null)
return false;
level = entity.level;
if (entity.getContraption() instanceof CarriageContraption cc)
cc.returnStorageForDisassembly(carriage.storage);
@ -695,8 +703,12 @@ public class Train {
}
GlobalStation currentStation = getCurrentStation();
if (currentStation != null)
if (currentStation != null) {
currentStation.cancelReservation(this);
BlockPos tilePos = currentStation.getTilePos();
if (level.getBlockEntity(tilePos) instanceof StationTileEntity ste)
ste.lastDisassembledTrainName = name.copy();
}
Create.RAILWAYS.removeTrain(id);
AllPackets.channel.send(PacketDistributor.ALL.noArg(), new TrainPacket(this, false));
@ -1143,4 +1155,23 @@ public class Train {
return train;
}
public void determineHonk(Level level) {
if (lowHonk != null)
return;
for (int index = 0; index < carriages.size(); index++) {
Carriage carriage = carriages.get(index);
DimensionalCarriageEntity dimensional = carriage.getDimensionalIfPresent(level.dimension());
if (dimensional == null)
return;
CarriageContraptionEntity entity = dimensional.entity.get();
if (entity == null || !(entity.getContraption() instanceof CarriageContraption otherCC))
break;
Pair<Boolean,Integer> first = otherCC.soundQueue.getFirstWhistle(entity);
if (first != null) {
lowHonk = first.getFirst();
honkPitch = first.getSecond();
}
}
}
}

View file

@ -110,27 +110,28 @@ public class StationEditPacket extends TileEntityConfigurationPacket<StationTile
return;
Boolean isAssemblyMode = blockState.getValue(StationBlock.ASSEMBLING);
boolean assemblyComplete = false;
if (tryAssemble != null) {
if (!isAssemblyMode)
return;
if (tryAssemble) {
te.assemble(player.getUUID());
if (te.getStation() != null && te.getStation()
.getPresentTrain() != null) {
level.setBlock(blockPos, blockState.setValue(StationBlock.ASSEMBLING, false), 3);
te.refreshBlockState();
}
assemblyComplete = te.getStation() != null && te.getStation()
.getPresentTrain() != null;
} else {
if (disassembleAndEnterMode(player, te))
te.refreshAssemblyInfo();
}
return;
if (!assemblyComplete)
return;
}
if (isAssemblyMode == assemblyMode)
return;
BlockState newState = blockState.cycle(StationBlock.ASSEMBLING);
Boolean nowAssembling = newState.getValue(StationBlock.ASSEMBLING);
if (nowAssembling) {
if (!disassembleAndEnterMode(player, te))
return;

View file

@ -57,6 +57,7 @@ import net.minecraft.core.Direction.Axis;
import net.minecraft.core.Direction.AxisDirection;
import net.minecraft.core.particles.ParticleTypes;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.chat.Component;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.sounds.SoundSource;
import net.minecraft.util.Mth;
@ -94,6 +95,8 @@ public class StationTileEntity extends SmartTileEntity implements ITransformable
int flagYRot = -1;
boolean flagFlipped;
public Component lastDisassembledTrainName;
public StationTileEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
super(type, pos, state);
@ -608,6 +611,11 @@ public class StationTileEntity extends SmartTileEntity implements ITransformable
Train train = new Train(UUID.randomUUID(), playerUUID, graph, carriages, spacing, contraptions.stream()
.anyMatch(CarriageContraption::hasBackwardControls));
if (lastDisassembledTrainName != null) {
train.name = lastDisassembledTrainName;
lastDisassembledTrainName = null;
}
for (int i = 0; i < contraptions.size(); i++)
carriages.get(i)

View file

@ -18,6 +18,7 @@ import com.simibubi.create.content.contraptions.components.structureMovement.glu
import com.simibubi.create.content.contraptions.components.structureMovement.glue.SuperGlueSelectionPacket;
import com.simibubi.create.content.contraptions.components.structureMovement.interaction.controls.ControlsInputPacket;
import com.simibubi.create.content.contraptions.components.structureMovement.interaction.controls.ControlsStopControllingPacket;
import com.simibubi.create.content.contraptions.components.structureMovement.interaction.controls.HonkPacket;
import com.simibubi.create.content.contraptions.components.structureMovement.interaction.controls.TrainHUDUpdatePacket;
import com.simibubi.create.content.contraptions.components.structureMovement.sync.ClientMotionPacket;
import com.simibubi.create.content.contraptions.components.structureMovement.sync.ContraptionFluidPacket;
@ -140,6 +141,7 @@ public enum AllPackets {
GLUE_REMOVED(SuperGlueRemovalPacket.class, SuperGlueRemovalPacket::new, PLAY_TO_SERVER),
TRAIN_COLLISION(TrainCollisionPacket.class, TrainCollisionPacket::new, PLAY_TO_SERVER),
C_TRAIN_HUD(TrainHUDUpdatePacket.Serverbound.class, TrainHUDUpdatePacket.Serverbound::new, PLAY_TO_SERVER),
C_TRAIN_HONK(HonkPacket.Serverbound.class, HonkPacket.Serverbound::new, PLAY_TO_SERVER),
// Server to Client
SYMMETRY_EFFECT(SymmetryEffectPacket.class, SymmetryEffectPacket::new, PLAY_TO_CLIENT),
@ -172,6 +174,7 @@ public enum AllPackets {
S_CONFIGURE_TRAIN(TrainEditReturnPacket.class, TrainEditReturnPacket::new, PLAY_TO_CLIENT),
CONTROLS_ABORT(ControlsStopControllingPacket.class, ControlsStopControllingPacket::new, PLAY_TO_CLIENT),
S_TRAIN_HUD(TrainHUDUpdatePacket.class, TrainHUDUpdatePacket::new, PLAY_TO_CLIENT),
S_TRAIN_HONK(HonkPacket.class, HonkPacket::new, PLAY_TO_CLIENT),
S_TRAIN_PROMPT(TrainPromptPacket.class, TrainPromptPacket::new, PLAY_TO_CLIENT),
;