From b38dd90431117629787054862b3a1b22061bf6a3 Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Tue, 4 May 2021 18:04:00 +0200 Subject: [PATCH] Subcreatica, Part II - Diving helmets now display a timer near the hotbar when underwater - Copper backtanks now play an effect when accumulated air is maxed - Copper backtank blocks can now be waterlogged - Copper backtank cogs now animate - Fixed subtitle of equip sounds --- src/generated/resources/.cache/cache | 34 ++--- .../create/blockstates/copper_backtank.json | 23 +++- .../resources/assets/create/lang/en_us.json | 1 + .../assets/create/lang/unfinished/de_de.json | 3 +- .../assets/create/lang/unfinished/es_es.json | 3 +- .../assets/create/lang/unfinished/es_mx.json | 3 +- .../assets/create/lang/unfinished/fr_fr.json | 3 +- .../assets/create/lang/unfinished/it_it.json | 3 +- .../assets/create/lang/unfinished/ja_jp.json | 3 +- .../assets/create/lang/unfinished/ko_kr.json | 3 +- .../assets/create/lang/unfinished/nl_nl.json | 3 +- .../assets/create/lang/unfinished/pl_pl.json | 3 +- .../assets/create/lang/unfinished/pt_br.json | 3 +- .../assets/create/lang/unfinished/ru_ru.json | 3 +- .../assets/create/lang/unfinished/zh_cn.json | 3 +- .../assets/create/lang/unfinished/zh_tw.json | 3 +- .../resources/assets/create/sounds.json | 9 ++ .../data/create/advancements/aesthetics.json | 4 +- .../com/simibubi/create/AllBlockPartials.java | 1 + .../java/com/simibubi/create/AllItems.java | 19 +-- .../com/simibubi/create/AllSoundEvents.java | 32 ++++- src/main/java/com/simibubi/create/Create.java | 1 + .../curiosities/armor/AllArmorMaterials.java | 7 +- .../armor/CopperBacktankArmorLayer.java | 62 ++++++++- .../armor/CopperBacktankBlock.java | 58 +++++++- .../armor/CopperBacktankRenderer.java | 27 ++++ .../armor/CopperBacktankTileEntity.java | 35 ++++- .../curiosities/armor/DivingHelmetItem.java | 26 ++-- .../simibubi/create/events/ClientEvents.java | 16 ++- .../models/block/copper_backtank/block.json | 111 +--------------- .../block/copper_backtank/block_cogs.json | 125 ++++++++++++++++++ 31 files changed, 445 insertions(+), 185 deletions(-) create mode 100644 src/main/resources/assets/create/models/block/copper_backtank/block_cogs.json diff --git a/src/generated/resources/.cache/cache b/src/generated/resources/.cache/cache index 2c0a3e73e..f24219921 100644 --- a/src/generated/resources/.cache/cache +++ b/src/generated/resources/.cache/cache @@ -53,7 +53,7 @@ b59324f051f21d8ce1a48a08f4721a61a3c414d6 assets/create/blockstates/chute.json e5e3757e99c139d67b2a70288466d8a74d818841 assets/create/blockstates/cogwheel.json 36f54136a7756c97f71bc6b47ef4e8e575e72879 assets/create/blockstates/content_observer.json cfea7283f0ebd2432d67e80a523f2a12e24c0bd5 assets/create/blockstates/controller_rail.json -2a956df55577ce02384af372a15f41ec626b84b0 assets/create/blockstates/copper_backtank.json +961b615124ea9a5a5735e8a79f81a702de7da2cf assets/create/blockstates/copper_backtank.json f8eff64c75fc599e9a44a003f54ae9931cd8ce7c assets/create/blockstates/copper_block.json cabf6b8c59eb0e3d56a0a5a856ca058bb3200882 assets/create/blockstates/copper_casing.json 3355a852cdc717e257ca19b3db836068964733e3 assets/create/blockstates/copper_ore.json @@ -408,20 +408,20 @@ a3a11524cd3515fc01d905767b4b7ea782adaf03 assets/create/blockstates/yellow_seat.j 7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json a6d814f94926d88764c38862cc4ece9c367e023b assets/create/lang/en_ud.json -80e3112fe5ab12a9bbe7c272ab50904eee351f44 assets/create/lang/en_us.json -9b8c1f501cb57098f3ac67c8fd4532246a0c59bb assets/create/lang/unfinished/de_de.json -9d0482aa7a410bdb9b44bb7c1e24bda0343e1306 assets/create/lang/unfinished/es_es.json -6e401a93ef63da54673d125892893468f04931be assets/create/lang/unfinished/es_mx.json -466fe4336c8c45fab9027e18103f8c7ef5c94fef assets/create/lang/unfinished/fr_fr.json -62d87f787237fbf2ace70eafb536cf5283c4dd16 assets/create/lang/unfinished/it_it.json -e83d8ed48ebf35ce6ba3fac10efff80ce9ffc050 assets/create/lang/unfinished/ja_jp.json -448bdf719bd40bb4cb8f013d29e1c65c1277f4ff assets/create/lang/unfinished/ko_kr.json -a4229b2f23223f31a1b869d5a07ff61128ddd2e8 assets/create/lang/unfinished/nl_nl.json -9d1594172ba55eab5b96bd48f5204b082493e5e8 assets/create/lang/unfinished/pl_pl.json -ba271a34ebf9c23c239fcdf94d71623bfcaaefb1 assets/create/lang/unfinished/pt_br.json -0c78fdaa30db8d54122bb055167ee41e4d1e010c assets/create/lang/unfinished/ru_ru.json -899752fff0af288e71fb1f7c771910395c701477 assets/create/lang/unfinished/zh_cn.json -a7189982351b90b3cde43529a0fbdef696bda22e assets/create/lang/unfinished/zh_tw.json +95f238e0df097f74a7845a58a02d27c3989305ce assets/create/lang/en_us.json +e03638c344f9f80f5cee92c5e4ce4986478e65a5 assets/create/lang/unfinished/de_de.json +dae908c13b54fa5123bad98dd38ba35d58edaaf0 assets/create/lang/unfinished/es_es.json +bf9142028bbd21a4441381c06c3b4557e60e49c5 assets/create/lang/unfinished/es_mx.json +e4f70996f672bc50e8cfeaccd150075c0a07a917 assets/create/lang/unfinished/fr_fr.json +34c1226afddeaf7824fc1aaf65f40505b3811a91 assets/create/lang/unfinished/it_it.json +17a4ed49d461a537ca8e59fc95d12909780105d7 assets/create/lang/unfinished/ja_jp.json +dd1e77bf533b4bf0e7fa358d48ce5643d08b21c3 assets/create/lang/unfinished/ko_kr.json +0faf1940b7c9664be63d02b3685ed0252528a9ce assets/create/lang/unfinished/nl_nl.json +996e1392e3ffcdb6d41a66cf6bd752e301c52b12 assets/create/lang/unfinished/pl_pl.json +49e35e88d59fb49cb1889e960a18371d0616b963 assets/create/lang/unfinished/pt_br.json +af5ee82802fc0e42012c575cd9da1cf36b88b035 assets/create/lang/unfinished/ru_ru.json +63db3153b522775cad4f91eb509e14568bfb0c3c assets/create/lang/unfinished/zh_cn.json +f533c7c7c1cc2b11908377bd807ff006902d5e34 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 @@ -1651,8 +1651,8 @@ 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 -7b73f40a65af0c2288c886928c609ec783c0fc40 assets/create/sounds.json -0f1b4b980afba9bf2caf583b88e261bba8b10313 data/create/advancements/aesthetics.json +3fd540489a0038a78c6b02f81e89d95e53596b2b assets/create/sounds.json +5d0cc4c0255dc241e61c173b31ddca70c88d08e4 data/create/advancements/aesthetics.json 187921fa131b06721bfaf63f2623a28c141aae9a data/create/advancements/andesite_alloy.json 0ea2db7173b5be28b289ea7c9a6a0cf5805c60c7 data/create/advancements/andesite_casing.json 83c046bd200623933545c9e4326f782fb02c87fa data/create/advancements/arm_blaze_burner.json diff --git a/src/generated/resources/assets/create/blockstates/copper_backtank.json b/src/generated/resources/assets/create/blockstates/copper_backtank.json index 129133b16..7aa8d2045 100644 --- a/src/generated/resources/assets/create/blockstates/copper_backtank.json +++ b/src/generated/resources/assets/create/blockstates/copper_backtank.json @@ -1,17 +1,32 @@ { "variants": { - "facing=north": { + "facing=north,waterlogged=false": { "model": "create:block/copper_backtank/block" }, - "facing=south": { + "facing=south,waterlogged=false": { "model": "create:block/copper_backtank/block", "y": 180 }, - "facing=west": { + "facing=west,waterlogged=false": { "model": "create:block/copper_backtank/block", "y": 270 }, - "facing=east": { + "facing=east,waterlogged=false": { + "model": "create:block/copper_backtank/block", + "y": 90 + }, + "facing=north,waterlogged=true": { + "model": "create:block/copper_backtank/block" + }, + "facing=south,waterlogged=true": { + "model": "create:block/copper_backtank/block", + "y": 180 + }, + "facing=west,waterlogged=true": { + "model": "create:block/copper_backtank/block", + "y": 270 + }, + "facing=east,waterlogged=true": { "model": "create:block/copper_backtank/block", "y": 90 } diff --git a/src/generated/resources/assets/create/lang/en_us.json b/src/generated/resources/assets/create/lang/en_us.json index 329397aea..b7324fd07 100644 --- a/src/generated/resources/assets/create/lang/en_us.json +++ b/src/generated/resources/assets/create/lang/en_us.json @@ -1146,6 +1146,7 @@ "create.subtitle.blaze_munch": "Blaze Burner munches", "create.subtitle.schematicannon_launch_block": "Schematicannon fires", "create.subtitle.funnel_flap": "Funnel Flaps", + "create.subtitle.copper_armor_equip": "Diving equipment clinks", "create.subtitle.schematicannon_finish": "Schematicannon dings", "create.subtitle.scroll_value": "Scroll-input clicks", "create.subtitle.mechanical_press_activation": "Mechanical Press clangs", diff --git a/src/generated/resources/assets/create/lang/unfinished/de_de.json b/src/generated/resources/assets/create/lang/unfinished/de_de.json index 57b3d2f08..324c91d17 100644 --- a/src/generated/resources/assets/create/lang/unfinished/de_de.json +++ b/src/generated/resources/assets/create/lang/unfinished/de_de.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 939", + "_": "Missing Localizations: 940", "_": "->------------------------] Game Elements [------------------------<-", @@ -1147,6 +1147,7 @@ "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.copper_armor_equip": "UNLOCALIZED: Diving equipment clinks", "create.subtitle.schematicannon_finish": "Bauplankanone endet", "create.subtitle.scroll_value": "UNLOCALIZED: Scroll-input clicks", "create.subtitle.mechanical_press_activation": "Mechanische Presse wird aktiviert", diff --git a/src/generated/resources/assets/create/lang/unfinished/es_es.json b/src/generated/resources/assets/create/lang/unfinished/es_es.json index a40f532be..90f7ba71f 100644 --- a/src/generated/resources/assets/create/lang/unfinished/es_es.json +++ b/src/generated/resources/assets/create/lang/unfinished/es_es.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 640", + "_": "Missing Localizations: 641", "_": "->------------------------] Game Elements [------------------------<-", @@ -1147,6 +1147,7 @@ "create.subtitle.blaze_munch": "Blaze mastica felizmente", "create.subtitle.schematicannon_launch_block": "Disparos de Schematicannon", "create.subtitle.funnel_flap": "UNLOCALIZED: Funnel Flaps", + "create.subtitle.copper_armor_equip": "UNLOCALIZED: Diving equipment clinks", "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", diff --git a/src/generated/resources/assets/create/lang/unfinished/es_mx.json b/src/generated/resources/assets/create/lang/unfinished/es_mx.json index 1b3d7fca1..a6287481c 100644 --- a/src/generated/resources/assets/create/lang/unfinished/es_mx.json +++ b/src/generated/resources/assets/create/lang/unfinished/es_mx.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 1263", + "_": "Missing Localizations: 1264", "_": "->------------------------] Game Elements [------------------------<-", @@ -1147,6 +1147,7 @@ "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.copper_armor_equip": "UNLOCALIZED: Diving equipment clinks", "create.subtitle.schematicannon_finish": "UNLOCALIZED: Schematicannon dings", "create.subtitle.scroll_value": "UNLOCALIZED: Scroll-input clicks", "create.subtitle.mechanical_press_activation": "UNLOCALIZED: Mechanical Press clangs", diff --git a/src/generated/resources/assets/create/lang/unfinished/fr_fr.json b/src/generated/resources/assets/create/lang/unfinished/fr_fr.json index f012ee374..201ca083f 100644 --- a/src/generated/resources/assets/create/lang/unfinished/fr_fr.json +++ b/src/generated/resources/assets/create/lang/unfinished/fr_fr.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 1191", + "_": "Missing Localizations: 1192", "_": "->------------------------] Game Elements [------------------------<-", @@ -1147,6 +1147,7 @@ "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.copper_armor_equip": "UNLOCALIZED: Diving equipment clinks", "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", diff --git a/src/generated/resources/assets/create/lang/unfinished/it_it.json b/src/generated/resources/assets/create/lang/unfinished/it_it.json index 372763b7c..e8509ce0d 100644 --- a/src/generated/resources/assets/create/lang/unfinished/it_it.json +++ b/src/generated/resources/assets/create/lang/unfinished/it_it.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 657", + "_": "Missing Localizations: 658", "_": "->------------------------] Game Elements [------------------------<-", @@ -1147,6 +1147,7 @@ "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.copper_armor_equip": "UNLOCALIZED: Diving equipment clinks", "create.subtitle.schematicannon_finish": "Finiture cannoneschematico", "create.subtitle.scroll_value": "UNLOCALIZED: Scroll-input clicks", "create.subtitle.mechanical_press_activation": "Pressa meccanica attiva", diff --git a/src/generated/resources/assets/create/lang/unfinished/ja_jp.json b/src/generated/resources/assets/create/lang/unfinished/ja_jp.json index 3d36576f0..4d9481522 100644 --- a/src/generated/resources/assets/create/lang/unfinished/ja_jp.json +++ b/src/generated/resources/assets/create/lang/unfinished/ja_jp.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 21", + "_": "Missing Localizations: 22", "_": "->------------------------] Game Elements [------------------------<-", @@ -1147,6 +1147,7 @@ "create.subtitle.blaze_munch": "ブレイズの咀嚼音", "create.subtitle.schematicannon_launch_block": "概略図砲が発射する", "create.subtitle.funnel_flap": "ファンネルがはためく", + "create.subtitle.copper_armor_equip": "UNLOCALIZED: Diving equipment clinks", "create.subtitle.schematicannon_finish": "概略図砲が作業を終える", "create.subtitle.scroll_value": "スクロールのカチカチ音", "create.subtitle.mechanical_press_activation": "メカニカルプレスがガーンと鳴る", diff --git a/src/generated/resources/assets/create/lang/unfinished/ko_kr.json b/src/generated/resources/assets/create/lang/unfinished/ko_kr.json index 27b30614d..9f2072e14 100644 --- a/src/generated/resources/assets/create/lang/unfinished/ko_kr.json +++ b/src/generated/resources/assets/create/lang/unfinished/ko_kr.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 710", + "_": "Missing Localizations: 711", "_": "->------------------------] Game Elements [------------------------<-", @@ -1147,6 +1147,7 @@ "create.subtitle.blaze_munch": "블레이즈가 행복하게 섭취함", "create.subtitle.schematicannon_launch_block": "청사진 대포가 발포함", "create.subtitle.funnel_flap": "UNLOCALIZED: Funnel Flaps", + "create.subtitle.copper_armor_equip": "UNLOCALIZED: Diving equipment clinks", "create.subtitle.schematicannon_finish": "청사진 대포가 끝남", "create.subtitle.scroll_value": "UNLOCALIZED: Scroll-input clicks", "create.subtitle.mechanical_press_activation": "압착기가 가동됨", diff --git a/src/generated/resources/assets/create/lang/unfinished/nl_nl.json b/src/generated/resources/assets/create/lang/unfinished/nl_nl.json index b591fd3c1..9dfd61c14 100644 --- a/src/generated/resources/assets/create/lang/unfinished/nl_nl.json +++ b/src/generated/resources/assets/create/lang/unfinished/nl_nl.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 1574", + "_": "Missing Localizations: 1575", "_": "->------------------------] Game Elements [------------------------<-", @@ -1147,6 +1147,7 @@ "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.copper_armor_equip": "UNLOCALIZED: Diving equipment clinks", "create.subtitle.schematicannon_finish": "UNLOCALIZED: Schematicannon dings", "create.subtitle.scroll_value": "UNLOCALIZED: Scroll-input clicks", "create.subtitle.mechanical_press_activation": "UNLOCALIZED: Mechanical Press clangs", diff --git a/src/generated/resources/assets/create/lang/unfinished/pl_pl.json b/src/generated/resources/assets/create/lang/unfinished/pl_pl.json index 6c650e81d..c515f1e65 100644 --- a/src/generated/resources/assets/create/lang/unfinished/pl_pl.json +++ b/src/generated/resources/assets/create/lang/unfinished/pl_pl.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 35", + "_": "Missing Localizations: 36", "_": "->------------------------] Game Elements [------------------------<-", @@ -1147,6 +1147,7 @@ "create.subtitle.blaze_munch": "Płomyk szczęśliwie przeżuwa", "create.subtitle.schematicannon_launch_block": "Schematoarmata strzela", "create.subtitle.funnel_flap": "UNLOCALIZED: Funnel Flaps", + "create.subtitle.copper_armor_equip": "UNLOCALIZED: Diving equipment clinks", "create.subtitle.schematicannon_finish": "Schematoarmata skończyła", "create.subtitle.scroll_value": "UNLOCALIZED: Scroll-input clicks", "create.subtitle.mechanical_press_activation": "Mechaniczna prasa się uruchamia", diff --git a/src/generated/resources/assets/create/lang/unfinished/pt_br.json b/src/generated/resources/assets/create/lang/unfinished/pt_br.json index 8dba2f866..cf7587f56 100644 --- a/src/generated/resources/assets/create/lang/unfinished/pt_br.json +++ b/src/generated/resources/assets/create/lang/unfinished/pt_br.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 1626", + "_": "Missing Localizations: 1627", "_": "->------------------------] Game Elements [------------------------<-", @@ -1147,6 +1147,7 @@ "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.copper_armor_equip": "UNLOCALIZED: Diving equipment clinks", "create.subtitle.schematicannon_finish": "UNLOCALIZED: Schematicannon dings", "create.subtitle.scroll_value": "UNLOCALIZED: Scroll-input clicks", "create.subtitle.mechanical_press_activation": "UNLOCALIZED: Mechanical Press clangs", diff --git a/src/generated/resources/assets/create/lang/unfinished/ru_ru.json b/src/generated/resources/assets/create/lang/unfinished/ru_ru.json index d3a7127fe..3eb45c5a5 100644 --- a/src/generated/resources/assets/create/lang/unfinished/ru_ru.json +++ b/src/generated/resources/assets/create/lang/unfinished/ru_ru.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 554", + "_": "Missing Localizations: 555", "_": "->------------------------] Game Elements [------------------------<-", @@ -1147,6 +1147,7 @@ "create.subtitle.blaze_munch": "Всполох радостно жуёт", "create.subtitle.schematicannon_launch_block": "Выстрелы схематичной пушки", "create.subtitle.funnel_flap": "UNLOCALIZED: Funnel Flaps", + "create.subtitle.copper_armor_equip": "UNLOCALIZED: Diving equipment clinks", "create.subtitle.schematicannon_finish": "Схематичная пушка закончила работу", "create.subtitle.scroll_value": "UNLOCALIZED: Scroll-input clicks", "create.subtitle.mechanical_press_activation": "Механический пресс активирован", diff --git a/src/generated/resources/assets/create/lang/unfinished/zh_cn.json b/src/generated/resources/assets/create/lang/unfinished/zh_cn.json index 3c39e3730..1647bf98e 100644 --- a/src/generated/resources/assets/create/lang/unfinished/zh_cn.json +++ b/src/generated/resources/assets/create/lang/unfinished/zh_cn.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 40", + "_": "Missing Localizations: 41", "_": "->------------------------] Game Elements [------------------------<-", @@ -1147,6 +1147,7 @@ "create.subtitle.blaze_munch": "烈焰人:咀嚼", "create.subtitle.schematicannon_launch_block": "蓝图加农炮:发射", "create.subtitle.funnel_flap": "UNLOCALIZED: Funnel Flaps", + "create.subtitle.copper_armor_equip": "UNLOCALIZED: Diving equipment clinks", "create.subtitle.schematicannon_finish": "蓝图加农炮:叮", "create.subtitle.scroll_value": "UNLOCALIZED: Scroll-input clicks", "create.subtitle.mechanical_press_activation": "辊压机:工作中", diff --git a/src/generated/resources/assets/create/lang/unfinished/zh_tw.json b/src/generated/resources/assets/create/lang/unfinished/zh_tw.json index d74d17d2a..acc5c68e9 100644 --- a/src/generated/resources/assets/create/lang/unfinished/zh_tw.json +++ b/src/generated/resources/assets/create/lang/unfinished/zh_tw.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 659", + "_": "Missing Localizations: 660", "_": "->------------------------] Game Elements [------------------------<-", @@ -1147,6 +1147,7 @@ "create.subtitle.blaze_munch": "烈焰使者開心地吃著", "create.subtitle.schematicannon_launch_block": "藍圖大炮發射", "create.subtitle.funnel_flap": "UNLOCALIZED: Funnel Flaps", + "create.subtitle.copper_armor_equip": "UNLOCALIZED: Diving equipment clinks", "create.subtitle.schematicannon_finish": "藍圖大炮完成任務", "create.subtitle.scroll_value": "UNLOCALIZED: Scroll-input clicks", "create.subtitle.mechanical_press_activation": "液壓機工作", diff --git a/src/generated/resources/assets/create/sounds.json b/src/generated/resources/assets/create/sounds.json index 24f47e279..19f268c60 100644 --- a/src/generated/resources/assets/create/sounds.json +++ b/src/generated/resources/assets/create/sounds.json @@ -49,6 +49,15 @@ ], "subtitle": "create.subtitle.contraption_disassemble" }, + "copper_armor_equip": { + "sounds": [ + { + "name": "minecraft:item.armor.equip_gold", + "type": "event" + } + ], + "subtitle": "create.subtitle.copper_armor_equip" + }, "crafter_click": { "sounds": [ { diff --git a/src/generated/resources/data/create/advancements/aesthetics.json b/src/generated/resources/data/create/advancements/aesthetics.json index d723cbe38..59a86f429 100644 --- a/src/generated/resources/data/create/advancements/aesthetics.json +++ b/src/generated/resources/data/create/advancements/aesthetics.json @@ -28,8 +28,8 @@ "trigger": "create:bracket_apply", "conditions": { "accepted_entries": [ - "create:cogwheel", - "create:large_cogwheel" + "create:large_cogwheel", + "create:cogwheel" ] } }, diff --git a/src/main/java/com/simibubi/create/AllBlockPartials.java b/src/main/java/com/simibubi/create/AllBlockPartials.java index d7402294c..046ca169d 100644 --- a/src/main/java/com/simibubi/create/AllBlockPartials.java +++ b/src/main/java/com/simibubi/create/AllBlockPartials.java @@ -100,6 +100,7 @@ public class AllBlockPartials { EJECTOR_TOP = get("weighted_ejector/top"), COPPER_BACKTANK_SHAFT = get("copper_backtank/block_shaft_input"), + COPPER_BACKTANK_COGS = get("copper_backtank/block_cogs"), COUPLING_ATTACHMENT = getEntity("minecart_coupling/attachment"), COUPLING_RING = getEntity("minecart_coupling/ring"), diff --git a/src/main/java/com/simibubi/create/AllItems.java b/src/main/java/com/simibubi/create/AllItems.java index 5adcdf7aa..2d13ad744 100644 --- a/src/main/java/com/simibubi/create/AllItems.java +++ b/src/main/java/com/simibubi/create/AllItems.java @@ -1,10 +1,10 @@ package com.simibubi.create; +import static com.simibubi.create.AllTags.forgeItemTag; import static com.simibubi.create.AllTags.AllItemTags.CREATE_INGOTS; import static com.simibubi.create.AllTags.AllItemTags.CRUSHED_ORES; import static com.simibubi.create.AllTags.AllItemTags.NUGGETS; import static com.simibubi.create.AllTags.AllItemTags.PLATES; -import static com.simibubi.create.AllTags.forgeItemTag; import static com.simibubi.create.content.AllSections.CURIOSITIES; import static com.simibubi.create.content.AllSections.KINETICS; import static com.simibubi.create.content.AllSections.LOGISTICS; @@ -261,23 +261,24 @@ public class AllItems { REGISTRATE.startSection(CURIOSITIES); } - public static final ItemEntry TREE_FERTILIZER = - REGISTRATE.item("tree_fertilizer", TreeFertilizerItem::new) - .register(); - public static final ItemEntry - DIVING_HELMET = REGISTRATE.item("diving_helmet", DivingHelmetItem::new) - .register(), - - COPPER_BACKTANK = REGISTRATE + COPPER_BACKTANK = + REGISTRATE .item("copper_backtank", p -> new CopperBacktankItem(p, new BlockItem(AllBlocks.COPPER_BACKTANK.get(), p))) .model(AssetLookup.customGenericItemModel("_", "item")) .register(), + DIVING_HELMET = REGISTRATE.item("diving_helmet", DivingHelmetItem::new) + .register(), + DIVING_BOOTS = REGISTRATE.item("diving_boots", DivingBootsItem::new) .register(); + public static final ItemEntry TREE_FERTILIZER = + REGISTRATE.item("tree_fertilizer", TreeFertilizerItem::new) + .register(); + // Schematics static { diff --git a/src/main/java/com/simibubi/create/AllSoundEvents.java b/src/main/java/com/simibubi/create/AllSoundEvents.java index 32976ac3f..d4f99209b 100644 --- a/src/main/java/com/simibubi/create/AllSoundEvents.java +++ b/src/main/java/com/simibubi/create/AllSoundEvents.java @@ -148,6 +148,11 @@ public class AllSoundEvents { .category(SoundCategory.BLOCKS) .build(), + COPPER_ARMOR_EQUIP = create("copper_armor_equip").subtitle("Diving equipment clinks") + .playExisting(SoundEvents.ITEM_ARMOR_EQUIP_GOLD, 1f, 1f) + .category(SoundCategory.PLAYERS) + .build(), + BLAZE_MUNCH = create("blaze_munch").subtitle("Blaze Burner munches") .playExisting(SoundEvents.ENTITY_GENERIC_EAT, .5f, 1f) .category(SoundCategory.BLOCKS) @@ -162,6 +167,11 @@ public class AllSoundEvents { for (SoundEntry entry : entries.values()) entry.register(registry); } + + public static void prepare() { + for (SoundEntry entry : entries.values()) + entry.prepare(); + } public static JsonElement provideLangEntries() { JsonObject object = new JsonObject(); @@ -278,6 +288,8 @@ public class AllSoundEvents { this.category = category; } + public abstract void prepare(); + public abstract void register(IForgeRegistry registry); public abstract void write(JsonObject json); @@ -346,18 +358,23 @@ public class AllSoundEvents { this.wrappedEvents = wrappedEvents; compiledEvents = Lists.newArrayList(); } - + @Override - public void register(IForgeRegistry registry) { + public void prepare() { for (int i = 0; i < wrappedEvents.size(); i++) { ResourceLocation location = Create.asResource(getIdOf(i)); SoundEvent sound = new SoundEvent(location).setRegistryName(location); - registry.register(sound); compiledEvents.add(Pair.of(sound, wrappedEvents.get(i) .getSecond())); } } + @Override + public void register(IForgeRegistry registry) { + for (Pair> pair : compiledEvents) + registry.register(pair.getFirst()); + } + @Override public SoundEvent getMainEvent() { return compiledEvents.get(0) @@ -413,11 +430,16 @@ public class AllSoundEvents { public CustomSoundEntry(String id, String subtitle, SoundCategory category) { super(id, subtitle, category); } + + @Override + public void prepare() { + ResourceLocation location = getLocation(); + event = new SoundEvent(location).setRegistryName(location); + } @Override public void register(IForgeRegistry registry) { - ResourceLocation location = getLocation(); - registry.register(event = new SoundEvent(location).setRegistryName(location)); + registry.register(event); } @Override diff --git a/src/main/java/com/simibubi/create/Create.java b/src/main/java/com/simibubi/create/Create.java index 8880d98f4..c62a11acb 100644 --- a/src/main/java/com/simibubi/create/Create.java +++ b/src/main/java/com/simibubi/create/Create.java @@ -78,6 +78,7 @@ public class Create { IEventBus modEventBus = FMLJavaModLoadingContext.get() .getModEventBus(); + AllSoundEvents.prepare(); AllBlocks.register(); AllItems.register(); AllFluids.register(); diff --git a/src/main/java/com/simibubi/create/content/curiosities/armor/AllArmorMaterials.java b/src/main/java/com/simibubi/create/content/curiosities/armor/AllArmorMaterials.java index 0de52335a..1b0f7f6e1 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/armor/AllArmorMaterials.java +++ b/src/main/java/com/simibubi/create/content/curiosities/armor/AllArmorMaterials.java @@ -3,21 +3,20 @@ package com.simibubi.create.content.curiosities.armor; import java.util.function.Supplier; import com.simibubi.create.AllItems; +import com.simibubi.create.AllSoundEvents; import net.minecraft.inventory.EquipmentSlotType; import net.minecraft.item.IArmorMaterial; import net.minecraft.item.crafting.Ingredient; import net.minecraft.util.LazyValue; import net.minecraft.util.SoundEvent; -import net.minecraft.util.SoundEvents; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; public enum AllArmorMaterials implements IArmorMaterial { - COPPER("copper", 7, new int[] { 1, 3, 5, 2 }, 25, SoundEvents.ITEM_ARMOR_EQUIP_GOLD, 0.0F, 0.0F, () -> { - return Ingredient.fromItems(AllItems.COPPER_INGOT.get()); - }) + COPPER("copper", 7, new int[] { 1, 3, 4, 2 }, 25, AllSoundEvents.COPPER_ARMOR_EQUIP.getMainEvent(), 0.0F, 0.0F, + () -> Ingredient.fromItems(AllItems.COPPER_INGOT.get())) ; diff --git a/src/main/java/com/simibubi/create/content/curiosities/armor/CopperBacktankArmorLayer.java b/src/main/java/com/simibubi/create/content/curiosities/armor/CopperBacktankArmorLayer.java index 7e307582c..d7ad90fe4 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/armor/CopperBacktankArmorLayer.java +++ b/src/main/java/com/simibubi/create/content/curiosities/armor/CopperBacktankArmorLayer.java @@ -1,13 +1,20 @@ package com.simibubi.create.content.curiosities.armor; import com.mojang.blaze3d.matrix.MatrixStack; +import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllBlocks; import com.simibubi.create.AllItems; import com.simibubi.create.CreateClient; +import com.simibubi.create.foundation.gui.GuiGameElement; import com.simibubi.create.foundation.render.SuperByteBuffer; +import com.simibubi.create.foundation.utility.AngleHelper; +import com.simibubi.create.foundation.utility.AnimationTickHolder; +import com.simibubi.create.foundation.utility.ColorHelper; import net.minecraft.block.BlockState; +import net.minecraft.client.MainWindow; import net.minecraft.client.Minecraft; +import net.minecraft.client.entity.player.ClientPlayerEntity; import net.minecraft.client.renderer.IRenderTypeBuffer; import net.minecraft.client.renderer.IRenderTypeBuffer.Impl; import net.minecraft.client.renderer.RenderType; @@ -19,7 +26,11 @@ import net.minecraft.client.renderer.entity.model.BipedModel; import net.minecraft.client.renderer.entity.model.EntityModel; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.Pose; +import net.minecraft.tags.FluidTags; import net.minecraft.util.Direction; +import net.minecraft.util.StringUtils; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.StringTextComponent; public class CopperBacktankArmorLayer> extends LayerRenderer { @@ -50,14 +61,28 @@ public class CopperBacktankArmorLayer((LivingRenderer) entityRenderer); } + public static void renderRemainingAirOverlay(MatrixStack ms, Impl buffers, int light, int overlay, float pt) { + ClientPlayerEntity player = Minecraft.getInstance().player; + if (player == null) + return; + if (player.isSpectator() || player.isCreative()) + return; + if (!player.getPersistentData() + .contains("VisualBacktankAir")) + return; + if (!player.areEyesInFluid(FluidTags.WATER)) + return; + + int timeLeft = player.getPersistentData() + .getInt("VisualBacktankAir"); + + ms.push(); + + MainWindow window = Minecraft.getInstance() + .getWindow(); + ms.translate(window.getScaledWidth() / 2 + 90, window.getScaledHeight() - 53, 0); + + ITextComponent text = new StringTextComponent(StringUtils.ticksToElapsedTime(timeLeft * 20)); + GuiGameElement.of(AllItems.COPPER_BACKTANK.asStack()) + .at(0, 0) + .render(ms); + int color = 0xFF_FFFFFF; + if (timeLeft < 60 && timeLeft % 2 == 0) { + color = ColorHelper.mixColors(0xFF_FF0000, color, Math.max(timeLeft / 60f, .25f)); + } + Minecraft.getInstance().fontRenderer.drawWithShadow(ms, text, 16, 5, color); + buffers.draw(); + + ms.pop(); + } + } diff --git a/src/main/java/com/simibubi/create/content/curiosities/armor/CopperBacktankBlock.java b/src/main/java/com/simibubi/create/content/curiosities/armor/CopperBacktankBlock.java index 028b40d53..53327ec31 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/armor/CopperBacktankBlock.java +++ b/src/main/java/com/simibubi/create/content/curiosities/armor/CopperBacktankBlock.java @@ -8,31 +8,74 @@ import com.simibubi.create.AllTileEntities; import com.simibubi.create.content.contraptions.base.HorizontalKineticBlock; import com.simibubi.create.foundation.block.ITE; +import net.minecraft.block.Block; import net.minecraft.block.BlockState; +import net.minecraft.block.IWaterLoggable; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.fluid.FluidState; +import net.minecraft.fluid.Fluids; import net.minecraft.inventory.EquipmentSlotType; import net.minecraft.item.BlockItem; +import net.minecraft.item.BlockItemUseContext; import net.minecraft.item.ItemStack; +import net.minecraft.pathfinding.PathType; +import net.minecraft.state.StateContainer.Builder; +import net.minecraft.state.properties.BlockStateProperties; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ActionResultType; import net.minecraft.util.Direction; import net.minecraft.util.Direction.Axis; 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; import net.minecraft.util.math.shapes.VoxelShape; import net.minecraft.util.text.ITextComponent; import net.minecraft.world.IBlockReader; +import net.minecraft.world.IWorld; import net.minecraft.world.IWorldReader; import net.minecraft.world.World; import net.minecraftforge.common.util.FakePlayer; -public class CopperBacktankBlock extends HorizontalKineticBlock implements ITE { +public class CopperBacktankBlock extends HorizontalKineticBlock + implements ITE, IWaterLoggable { public CopperBacktankBlock(Properties properties) { super(properties); + setDefaultState(super.getDefaultState().with(BlockStateProperties.WATERLOGGED, false)); + } + + @Override + public FluidState getFluidState(BlockState state) { + return state.get(BlockStateProperties.WATERLOGGED) ? Fluids.WATER.getStillFluidState(false) + : Fluids.EMPTY.getDefaultState(); + } + + @Override + protected void fillStateContainer(Builder builder) { + builder.add(BlockStateProperties.WATERLOGGED); + super.fillStateContainer(builder); + } + + @Override + public BlockState updatePostPlacement(BlockState state, Direction direction, BlockState neighbourState, + IWorld world, BlockPos pos, BlockPos neighbourPos) { + if (state.get(BlockStateProperties.WATERLOGGED)) { + world.getPendingFluidTicks() + .scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickRate(world)); + } + return state; + } + + @Override + public BlockState getStateForPlacement(BlockItemUseContext context) { + FluidState ifluidstate = context.getWorld() + .getFluidState(context.getPos()); + return super.getStateForPlacement(context).with(BlockStateProperties.WATERLOGGED, + Boolean.valueOf(ifluidstate.getFluid() == Fluids.WATER)); } @Override @@ -63,14 +106,20 @@ public class CopperBacktankBlock extends HorizontalKineticBlock implements ITE