From 94e4f56fe11b73be080b8aa34ee2f8d498b22db8 Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Mon, 28 Jun 2021 17:02:57 +0200 Subject: [PATCH] Just enough assembly lines - Added JEI integration to Sequenced Assembly - Bit of Refactoring - The amount of steps before the transformation occurs are no longer random - Intermediate item now shows assembly progress in its tooltip --- src/generated/resources/.cache/cache | 42 +-- .../resources/assets/create/lang/en_ud.json | 4 +- .../resources/assets/create/lang/en_us.json | 8 +- .../assets/create/lang/unfinished/de_de.json | 10 +- .../assets/create/lang/unfinished/es_es.json | 10 +- .../assets/create/lang/unfinished/es_mx.json | 10 +- .../assets/create/lang/unfinished/fr_fr.json | 10 +- .../assets/create/lang/unfinished/it_it.json | 10 +- .../assets/create/lang/unfinished/ja_jp.json | 10 +- .../assets/create/lang/unfinished/ko_kr.json | 10 +- .../assets/create/lang/unfinished/nl_nl.json | 10 +- .../assets/create/lang/unfinished/pl_pl.json | 10 +- .../assets/create/lang/unfinished/pt_br.json | 10 +- .../assets/create/lang/unfinished/ru_ru.json | 10 +- .../assets/create/lang/unfinished/zh_cn.json | 10 +- .../assets/create/lang/unfinished/zh_tw.json | 10 +- ..._element.json => clockwork_component.json} | 2 +- ...on => incomplete_clockwork_component.json} | 2 +- .../advancements/integrated_circuit.json | 4 +- .../advancements/integrated_circuit_eob.json | 2 +- .../kinetics/rotation_speed_controller.json | 2 +- .../clockwork_component.json | 77 ++++++ .../recipes/sequenced_assembly/test.json | 123 --------- .../java/com/simibubi/create/AllItems.java | 12 +- .../simibubi/create/compat/jei/CreateJEI.java | 35 ++- .../jei/category/BlockCuttingCategory.java | 1 + .../jei/category/CreateRecipeCategory.java | 24 +- .../compat/jei/category/SawingCategory.java | 11 +- .../category/SequencedAssemblyCategory.java | 241 ++++++++++++++++++ .../category/animations/AnimatedDeployer.java | 2 +- .../category/animations/AnimatedKinetics.java | 2 + .../category/animations/AnimatedPress.java | 2 +- .../jei/category/animations/AnimatedSaw.java | 9 +- .../category/animations/AnimatedSpout.java | 2 +- .../SequencedAssemblySubCategory.java | 154 +++++++++++ .../deployer/DeployerApplicationRecipe.java | 16 +- .../components/press/PressingRecipe.java | 17 +- .../components/saw/CuttingRecipe.java | 21 +- .../fluids/actors/FillingRecipe.java | 18 +- .../itemAssembly/IAssemblyRecipe.java | 29 +++ .../itemAssembly/SequencedAssemblyItem.java | 42 +++ .../itemAssembly/SequencedAssemblyRecipe.java | 81 ++++-- .../SequencedAssemblyRecipeBuilder.java | 18 +- .../SequencedAssemblyRecipeSerializer.java | 31 +-- .../itemAssembly/SequencedRecipe.java | 19 +- .../processing/ProcessingRecipe.java | 13 - .../advancement/AllAdvancements.java | 4 +- .../data/recipe/CreateRecipeProvider.java | 6 +- .../recipe/SequencedAssemblyRecipeGen.java | 36 ++- .../assets/create/lang/default/messages.json | 4 + ...rk_element.png => clockwork_component.png} | Bin ...png => incomplete_clockwork_component.png} | Bin 52 files changed, 912 insertions(+), 334 deletions(-) rename src/generated/resources/assets/create/models/item/{clockwork_element.json => clockwork_component.json} (56%) rename src/generated/resources/assets/create/models/item/{incomplete_clockwork_element.json => incomplete_clockwork_component.json} (51%) create mode 100644 src/generated/resources/data/create/recipes/sequenced_assembly/clockwork_component.json delete mode 100644 src/generated/resources/data/create/recipes/sequenced_assembly/test.json create mode 100644 src/main/java/com/simibubi/create/compat/jei/category/SequencedAssemblyCategory.java create mode 100644 src/main/java/com/simibubi/create/compat/jei/category/sequencedAssembly/SequencedAssemblySubCategory.java create mode 100644 src/main/java/com/simibubi/create/content/contraptions/itemAssembly/IAssemblyRecipe.java create mode 100644 src/main/java/com/simibubi/create/content/contraptions/itemAssembly/SequencedAssemblyItem.java rename src/main/resources/assets/create/textures/item/{clockwork_element.png => clockwork_component.png} (100%) rename src/main/resources/assets/create/textures/item/{incomplete_clockwork_element.png => incomplete_clockwork_component.png} (100%) diff --git a/src/generated/resources/.cache/cache b/src/generated/resources/.cache/cache index e137f4151..cbd09f705 100644 --- a/src/generated/resources/.cache/cache +++ b/src/generated/resources/.cache/cache @@ -409,21 +409,21 @@ a3a11524cd3515fc01d905767b4b7ea782adaf03 assets/create/blockstates/yellow_seat.j 6801fa1f466f172700e573e5b8ee8ee5f9ca4583 assets/create/blockstates/yellow_valve_handle.json 7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json -2626f0a81bf46ad7942d84d0a94ff38c38cae7ec assets/create/lang/en_ud.json -e2b7f06324073f1a6430698d12b759537839cb8a assets/create/lang/en_us.json -8ecb996989b291467854a8eb24a32f79e9bd52d4 assets/create/lang/unfinished/de_de.json -4d8bd237b0281fa91fc3618870374c41ea1a1a8d assets/create/lang/unfinished/es_es.json -c8215e68e7b41cf8855c3578db086575199f7204 assets/create/lang/unfinished/es_mx.json -38ab225118de9c3ede262e422d6a6975e7f7a21d assets/create/lang/unfinished/fr_fr.json -41c15915d496290757e9d35ef822f658b0eb0361 assets/create/lang/unfinished/it_it.json -45f277289f0dc7a36649fe2b6c58b8d8e1ee0f80 assets/create/lang/unfinished/ja_jp.json -446293adc386e71fa586307edaefde3748940be8 assets/create/lang/unfinished/ko_kr.json -50571ba0179b9651590a396b0dd16f96530d9831 assets/create/lang/unfinished/nl_nl.json -e7d28deed74d79691bbfbd6f3517945b94e90fc7 assets/create/lang/unfinished/pl_pl.json -dbe11c5ee7978249d2dbccb34a84713f991f3c95 assets/create/lang/unfinished/pt_br.json -dd9c142126fab8dd08d13a7076911a7c9822b8c1 assets/create/lang/unfinished/ru_ru.json -3c5d4c3d9bc15a77a7f2451b2b3647e295e94454 assets/create/lang/unfinished/zh_cn.json -acc2c8397c7da902634dc4c732c82a260eed46f5 assets/create/lang/unfinished/zh_tw.json +7818080b0809c3a01f28c05c0ed7edf8bcbc7b1d assets/create/lang/en_ud.json +8fa6882a7cb3a89aef2b4b15378be513e0b39035 assets/create/lang/en_us.json +cd1667de5c4baede2cc6b40c18a1dfdbeab4ca92 assets/create/lang/unfinished/de_de.json +33ee62f5383be9038c5f33c6bba7cd352de962b3 assets/create/lang/unfinished/es_es.json +2e00b6f84ca1ed6532d0cb13ce6d534544c128d7 assets/create/lang/unfinished/es_mx.json +e9168dac5cce730ea1425a2d39aa979f7b944ef8 assets/create/lang/unfinished/fr_fr.json +45974fc63f80241b481367895e6f4059821d9d98 assets/create/lang/unfinished/it_it.json +b8292ad388663d5bb144813c81c23737b19a6696 assets/create/lang/unfinished/ja_jp.json +a33f8a2d9675c58420d12a807a079b29979dbb2a assets/create/lang/unfinished/ko_kr.json +9f109e77eb4a258ed30633d423889612dfc3689a assets/create/lang/unfinished/nl_nl.json +08c31f2734fe78242ef889d001cebee28c3cc33a assets/create/lang/unfinished/pl_pl.json +7af2e8033d29038d077c5f7b0b0433d38b9c6f8b assets/create/lang/unfinished/pt_br.json +0a6e6219f07d3eb68c45e2eaebbb5327383a6b06 assets/create/lang/unfinished/ru_ru.json +994953150b977f373424f1e7193c7d5bc1ad1ba3 assets/create/lang/unfinished/zh_cn.json +ebfe8edd3bd161efc819fced5e25f02e2bc93888 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 @@ -1260,7 +1260,7 @@ a47fbe5f2da79080d99ef0975bfa8da4d08f8be4 assets/create/models/item/chiseled_scor fe67c3f380d17735a9436a4579a8be1a02b8e4a0 assets/create/models/item/chute.json 6680a68526576ded5dac2aa3bc9fb9de3e744146 assets/create/models/item/cinder_flour.json c1da21be9f1af4f7a2ef4ec9cd92195d65ada316 assets/create/models/item/clockwork_bearing.json -f738744ce542e8f38eb043d609bc01bf0043837b assets/create/models/item/clockwork_element.json +47fb26e7a75c7bd521f46cdf9c11885769e1c94e assets/create/models/item/clockwork_component.json 0a2a0f0aafeab0088172f77afd40c1fa2cc1f2b8 assets/create/models/item/clutch.json dcb09deae110077bcddf090996b51cc66e9a7de3 assets/create/models/item/cogwheel.json 7717e3b21cff39f497f07687c70c1fa40eaa756d assets/create/models/item/content_observer.json @@ -1423,7 +1423,7 @@ f0d5af58e23e2705b3ef675c30bdf85ed9567c57 assets/create/models/item/honey_bucket. 955e8accadb47f9b360e5fd48cd959c507b00f2d assets/create/models/item/horizontal_framed_glass.json f0e3b2b8a553b6e61746c922c27302dabfff71b6 assets/create/models/item/horizontal_framed_glass_pane.json ff92f6a9dfb73a6ee1eaaed3279c89390ff04a80 assets/create/models/item/hose_pulley.json -93bd17bd2beb5db7f750151bc2c21256d70de5a0 assets/create/models/item/incomplete_clockwork_element.json +94a09bbd2ca14a72f9f79ca9364a2c342c1637e3 assets/create/models/item/incomplete_clockwork_component.json 9d605ce0da83a73b535bce45c107e604364e2b20 assets/create/models/item/iron_sheet.json 52e435014cb03e93411666c4799ebff206e55fc9 assets/create/models/item/item_drain.json 83fa8699318e51f838b483b40b3e897c34ed53d1 assets/create/models/item/jungle_window.json @@ -1700,8 +1700,8 @@ ea0f8acb7c3692b569269e62927725d968a65251 data/create/advancements/hose_pulley.js 9f642faf92b75a28c564e90be8448b9a4328af5e data/create/advancements/infinite_chocolate.json a933fa5e7217e2ffe123ae035cfbc9210ba69fd5 data/create/advancements/infinite_lava.json a8ab0e4ffba358d23f9efaa9f51245b6d490a8be data/create/advancements/infinite_water.json -5937ff2cb0d480c15fe093304c8533afc9934378 data/create/advancements/integrated_circuit.json -acf44f38768c711ddd34067518e2b52104d4b97d data/create/advancements/integrated_circuit_eob.json +86702f4f1bfee988a2fee5647d603c9ea2dfc8b0 data/create/advancements/integrated_circuit.json +b3596d6bdc67fc503ad430f64ad3b7a0a355d3e2 data/create/advancements/integrated_circuit_eob.json 4d7cb129877d6cd68fda66159818e47ca44db078 data/create/advancements/item_drain.json b61d958815f1c2530c11c88c9081d5c794d7f807 data/create/advancements/its_alive.json 9d68fed495a37fc78184e43e432c3181da84d19c data/create/advancements/lava_wheel.json @@ -2982,7 +2982,7 @@ af84b939ced1c0254a27469f857f571afbadc4f6 data/create/recipes/crafting/kinetics/r 0827e86e4b5f9d7023ccc19922bcbbaefd5b42d8 data/create/recipes/crafting/kinetics/red_seat_from_other_seat.json 5a10019d23726940152e26af3239d55d16bc7880 data/create/recipes/crafting/kinetics/red_valve_handle_from_other_valve_handle.json af525e135eb927b64462120d201ecae7a7ec61ed data/create/recipes/crafting/kinetics/rope_pulley.json -cd7f75ef1162578432b49cfcf635f13a03ad3073 data/create/recipes/crafting/kinetics/rotation_speed_controller.json +eab3a50d3252106bb244c6662404ba51d647a641 data/create/recipes/crafting/kinetics/rotation_speed_controller.json d0d7fb94621f6f02fa3137666f20e677022d9d5b data/create/recipes/crafting/kinetics/sail_frame.json 66922e18791c87fadb7629cdf32d3dd2f50ccd13 data/create/recipes/crafting/kinetics/secondary_linear_chassisfrom_conversion.json a17db27e61baa45f8a6ecb46a6d2a5a464704f8b data/create/recipes/crafting/kinetics/sequenced_gearshift.json @@ -3548,7 +3548,7 @@ f7b7ff190929ae525297fecb3c116f32fc05fd88 data/create/recipes/scoria_cobblestone_ a9096822db9d12b6014d6d34e52de5821305c03f data/create/recipes/scoria_cobblestone_wall_from_scoria_cobblestone_stonecutting.json a513468ce4d55fe3b3919bd76ba2bd5b6fac4d4e data/create/recipes/scoria_pillar.json 2e0ecbd3619f080d0fc6fe48307c5a5bcc2e91b4 data/create/recipes/scoria_pillar_from_scoria_stonecutting.json -cc2ef00aa42ad8fb2d5533b318e238e0c977a718 data/create/recipes/sequenced_assembly/test.json +073b7c585b6733e6b984f34b9658566c47540968 data/create/recipes/sequenced_assembly/clockwork_component.json 4e817b521623966fa24186731a70f0e14c03168e data/create/recipes/smelting/aluminum_ingot_compat_silents_mechanisms.json ae90f50589bc06b44765ac8cbb9fbdc2b58fdb32 data/create/recipes/smelting/brass_ingot_from_crushed.json 64cbf425effba00ff2e31d95cffc2be2e0191932 data/create/recipes/smelting/bread.json diff --git a/src/generated/resources/assets/create/lang/en_ud.json b/src/generated/resources/assets/create/lang/en_ud.json index 06574d937..56be2c1fd 100644 --- a/src/generated/resources/assets/create/lang/en_ud.json +++ b/src/generated/resources/assets/create/lang/en_ud.json @@ -436,7 +436,7 @@ "item.create.chocolate_glazed_berries": "s\u01DD\u0131\u0279\u0279\u01DD\u15FA p\u01DDz\u0250\u05DF\u2141 \u01DD\u0287\u0250\u05DFo\u0254o\u0265\u0186", "item.create.chromatic_compound": "punod\u026Fo\u0186 \u0254\u0131\u0287\u0250\u026Fo\u0279\u0265\u0186", "item.create.cinder_flour": "\u0279no\u05DF\u2132 \u0279\u01DDpu\u0131\u0186", - "item.create.clockwork_element": "\u0287u\u01DD\u026F\u01DD\u05DF\u018E \u029E\u0279o\u028D\u029E\u0254o\u05DF\u0186", + "item.create.clockwork_component": "\u0287u\u01DDuod\u026Fo\u0186 \u029E\u0279o\u028D\u029E\u0254o\u05DF\u0186", "item.create.copper_backtank": "\u029Eu\u0250\u0287\u029E\u0254\u0250\u15FA \u0279\u01DDddo\u0186", "item.create.copper_ingot": "\u0287obuI \u0279\u01DDddo\u0186", "item.create.copper_nugget": "\u0287\u01DDbbnN \u0279\u01DDddo\u0186", @@ -471,7 +471,7 @@ "item.create.handheld_worldshaper": "\u0279\u01DDd\u0250\u0265sp\u05DF\u0279oM \u01DD\u028C\u0131\u0287\u0250\u01DD\u0279\u0186", "item.create.honey_bucket": "\u0287\u01DD\u029E\u0254n\u15FA \u028E\u01DDuoH", "item.create.honeyed_apple": "\u01DD\u05DFdd\u2C6F p\u01DD\u028E\u01DDuoH", - "item.create.incomplete_clockwork_element": "\u0287u\u01DD\u026F\u01DD\u05DF\u018E \u029E\u0279o\u028D\u029E\u0254o\u05DF\u0186 \u01DD\u0287\u01DD\u05DFd\u026Fo\u0254uI", + "item.create.incomplete_clockwork_component": "\u0287u\u01DDuod\u026Fo\u0186 \u029E\u0279o\u028D\u029E\u0254o\u05DF\u0186 \u01DD\u0287\u01DD\u05DFd\u026Fo\u0254uI", "item.create.iron_sheet": "\u0287\u01DD\u01DD\u0265S uo\u0279I", "item.create.linked_controller": "\u0279\u01DD\u05DF\u05DFo\u0279\u0287uo\u0186 p\u01DD\u029Eu\u0131\uA780", "item.create.minecart_contraption": "uo\u0131\u0287d\u0250\u0279\u0287uo\u0186 \u0287\u0279\u0250\u0254\u01DDu\u0131W", diff --git a/src/generated/resources/assets/create/lang/en_us.json b/src/generated/resources/assets/create/lang/en_us.json index 1e89cf444..44805bd94 100644 --- a/src/generated/resources/assets/create/lang/en_us.json +++ b/src/generated/resources/assets/create/lang/en_us.json @@ -442,7 +442,7 @@ "item.create.chocolate_glazed_berries": "Chocolate Glazed Berries", "item.create.chromatic_compound": "Chromatic Compound", "item.create.cinder_flour": "Cinder Flour", - "item.create.clockwork_element": "Clockwork Element", + "item.create.clockwork_component": "Clockwork Component", "item.create.copper_backtank": "Copper Backtank", "item.create.copper_ingot": "Copper Ingot", "item.create.copper_nugget": "Copper Nugget", @@ -477,7 +477,7 @@ "item.create.handheld_worldshaper": "Creative Worldshaper", "item.create.honey_bucket": "Honey Bucket", "item.create.honeyed_apple": "Honeyed Apple", - "item.create.incomplete_clockwork_element": "Incomplete Clockwork Element", + "item.create.incomplete_clockwork_component": "Incomplete Clockwork Component", "item.create.iron_sheet": "Iron Sheet", "item.create.linked_controller": "Linked Controller", "item.create.minecart_contraption": "Minecart Contraption", @@ -714,10 +714,14 @@ "create.recipe.draining": "Item Draining", "create.recipe.sequenced_assembly": "Sequenced Assembly", "create.recipe.assembly.next": "Next: %1$s", + "create.recipe.assembly.step": "Step %1$s:", + "create.recipe.assembly.progress": "Progress: %1$s/%2$s", "create.recipe.assembly.pressing": "Process in Press", "create.recipe.assembly.spout_filling_fluid": "Spout %1$s", "create.recipe.assembly.deploying_item": "Deploy %1$s", "create.recipe.assembly.cutting": "Cut with Saw", + "create.recipe.assembly.repeat": "Repeat Sequence %1$s Times", + "create.recipe.assembly.junk": "Random junk", "create.recipe.processing.chance": "%1$s%% Chance", "create.recipe.heat_requirement.none": "No Heating Required", "create.recipe.heat_requirement.heated": "Heated", 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 1f553c230..603f78411 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: 1081", + "_": "Missing Localizations: 1085", "_": "->------------------------] Game Elements [------------------------<-", @@ -443,7 +443,7 @@ "item.create.chocolate_glazed_berries": "Schokoladenglasierte Beeren", "item.create.chromatic_compound": "Chromatische Verbindung", "item.create.cinder_flour": "Aschenmehl", - "item.create.clockwork_element": "UNLOCALIZED: Clockwork Element", + "item.create.clockwork_component": "UNLOCALIZED: Clockwork Component", "item.create.copper_backtank": "UNLOCALIZED: Copper Backtank", "item.create.copper_ingot": "Kupferbarren", "item.create.copper_nugget": "Kupferklumpen", @@ -478,7 +478,7 @@ "item.create.handheld_worldshaper": "Geländeformer", "item.create.honey_bucket": "Honigeimer", "item.create.honeyed_apple": "Honigapfel", - "item.create.incomplete_clockwork_element": "UNLOCALIZED: Incomplete Clockwork Element", + "item.create.incomplete_clockwork_component": "UNLOCALIZED: Incomplete Clockwork Component", "item.create.iron_sheet": "Eisenblech", "item.create.linked_controller": "UNLOCALIZED: Linked Controller", "item.create.minecart_contraption": "Loren Vorrichtung", @@ -715,10 +715,14 @@ "create.recipe.draining": "Gegenstandsablassung", "create.recipe.sequenced_assembly": "UNLOCALIZED: Sequenced Assembly", "create.recipe.assembly.next": "UNLOCALIZED: Next: %1$s", + "create.recipe.assembly.step": "UNLOCALIZED: Step %1$s:", + "create.recipe.assembly.progress": "UNLOCALIZED: Progress: %1$s/%2$s", "create.recipe.assembly.pressing": "UNLOCALIZED: Process in Press", "create.recipe.assembly.spout_filling_fluid": "UNLOCALIZED: Spout %1$s", "create.recipe.assembly.deploying_item": "UNLOCALIZED: Deploy %1$s", "create.recipe.assembly.cutting": "UNLOCALIZED: Cut with Saw", + "create.recipe.assembly.repeat": "UNLOCALIZED: Repeat Sequence %1$s Times", + "create.recipe.assembly.junk": "UNLOCALIZED: Random junk", "create.recipe.processing.chance": "Chance: %1$s%%", "create.recipe.heat_requirement.none": "Keine Hitze benötigt", "create.recipe.heat_requirement.heated": "Wenig Hitze benötigt", 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 c61954de2..404d15d8a 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: 842", + "_": "Missing Localizations: 846", "_": "->------------------------] Game Elements [------------------------<-", @@ -443,7 +443,7 @@ "item.create.chocolate_glazed_berries": "UNLOCALIZED: Chocolate Glazed Berries", "item.create.chromatic_compound": "Compuesto cromático", "item.create.cinder_flour": "Harina de ceniza", - "item.create.clockwork_element": "UNLOCALIZED: Clockwork Element", + "item.create.clockwork_component": "UNLOCALIZED: Clockwork Component", "item.create.copper_backtank": "UNLOCALIZED: Copper Backtank", "item.create.copper_ingot": "Lingote de cobre", "item.create.copper_nugget": "Pepita de cobre", @@ -478,7 +478,7 @@ "item.create.handheld_worldshaper": "Worldshaper", "item.create.honey_bucket": "Cubo de miel", "item.create.honeyed_apple": "UNLOCALIZED: Honeyed Apple", - "item.create.incomplete_clockwork_element": "UNLOCALIZED: Incomplete Clockwork Element", + "item.create.incomplete_clockwork_component": "UNLOCALIZED: Incomplete Clockwork Component", "item.create.iron_sheet": "Lámina de hierro", "item.create.linked_controller": "UNLOCALIZED: Linked Controller", "item.create.minecart_contraption": "Artilugio de vagoneta", @@ -715,10 +715,14 @@ "create.recipe.draining": "Drenador de elementos", "create.recipe.sequenced_assembly": "UNLOCALIZED: Sequenced Assembly", "create.recipe.assembly.next": "UNLOCALIZED: Next: %1$s", + "create.recipe.assembly.step": "UNLOCALIZED: Step %1$s:", + "create.recipe.assembly.progress": "UNLOCALIZED: Progress: %1$s/%2$s", "create.recipe.assembly.pressing": "UNLOCALIZED: Process in Press", "create.recipe.assembly.spout_filling_fluid": "UNLOCALIZED: Spout %1$s", "create.recipe.assembly.deploying_item": "UNLOCALIZED: Deploy %1$s", "create.recipe.assembly.cutting": "UNLOCALIZED: Cut with Saw", + "create.recipe.assembly.repeat": "UNLOCALIZED: Repeat Sequence %1$s Times", + "create.recipe.assembly.junk": "UNLOCALIZED: Random junk", "create.recipe.processing.chance": "%1$s%% Chance", "create.recipe.heat_requirement.none": "No es necesario calentar", "create.recipe.heat_requirement.heated": "Calentado", 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 2ed359dce..e95d500e2 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: 1448", + "_": "Missing Localizations: 1452", "_": "->------------------------] Game Elements [------------------------<-", @@ -443,7 +443,7 @@ "item.create.chocolate_glazed_berries": "UNLOCALIZED: Chocolate Glazed Berries", "item.create.chromatic_compound": "Compuesto Cromático", "item.create.cinder_flour": "Ceniza Molida", - "item.create.clockwork_element": "UNLOCALIZED: Clockwork Element", + "item.create.clockwork_component": "UNLOCALIZED: Clockwork Component", "item.create.copper_backtank": "UNLOCALIZED: Copper Backtank", "item.create.copper_ingot": "Lingote de Cobre", "item.create.copper_nugget": "Pepita de Cobre", @@ -478,7 +478,7 @@ "item.create.handheld_worldshaper": "Pistola de Manipulación de Mundo", "item.create.honey_bucket": "Cubeta de Miel", "item.create.honeyed_apple": "UNLOCALIZED: Honeyed Apple", - "item.create.incomplete_clockwork_element": "UNLOCALIZED: Incomplete Clockwork Element", + "item.create.incomplete_clockwork_component": "UNLOCALIZED: Incomplete Clockwork Component", "item.create.iron_sheet": "Lámina de Hierro", "item.create.linked_controller": "UNLOCALIZED: Linked Controller", "item.create.minecart_contraption": "Artefacto de Vagón", @@ -715,10 +715,14 @@ "create.recipe.draining": "UNLOCALIZED: Item Draining", "create.recipe.sequenced_assembly": "UNLOCALIZED: Sequenced Assembly", "create.recipe.assembly.next": "UNLOCALIZED: Next: %1$s", + "create.recipe.assembly.step": "UNLOCALIZED: Step %1$s:", + "create.recipe.assembly.progress": "UNLOCALIZED: Progress: %1$s/%2$s", "create.recipe.assembly.pressing": "UNLOCALIZED: Process in Press", "create.recipe.assembly.spout_filling_fluid": "UNLOCALIZED: Spout %1$s", "create.recipe.assembly.deploying_item": "UNLOCALIZED: Deploy %1$s", "create.recipe.assembly.cutting": "UNLOCALIZED: Cut with Saw", + "create.recipe.assembly.repeat": "UNLOCALIZED: Repeat Sequence %1$s Times", + "create.recipe.assembly.junk": "UNLOCALIZED: Random junk", "create.recipe.processing.chance": "UNLOCALIZED: %1$s%% Chance", "create.recipe.heat_requirement.none": "UNLOCALIZED: No Heating Required", "create.recipe.heat_requirement.heated": "UNLOCALIZED: Heated", 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 f11bf3391..a82f16e89 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: 1333", + "_": "Missing Localizations: 1337", "_": "->------------------------] Game Elements [------------------------<-", @@ -443,7 +443,7 @@ "item.create.chocolate_glazed_berries": "UNLOCALIZED: Chocolate Glazed Berries", "item.create.chromatic_compound": "Composé chromatique", "item.create.cinder_flour": "Farine de braise", - "item.create.clockwork_element": "UNLOCALIZED: Clockwork Element", + "item.create.clockwork_component": "UNLOCALIZED: Clockwork Component", "item.create.copper_backtank": "UNLOCALIZED: Copper Backtank", "item.create.copper_ingot": "Lingot de cuivre", "item.create.copper_nugget": "Pépite de cuivre", @@ -478,7 +478,7 @@ "item.create.handheld_worldshaper": "Térraformeur portable", "item.create.honey_bucket": "Seau de miel", "item.create.honeyed_apple": "UNLOCALIZED: Honeyed Apple", - "item.create.incomplete_clockwork_element": "UNLOCALIZED: Incomplete Clockwork Element", + "item.create.incomplete_clockwork_component": "UNLOCALIZED: Incomplete Clockwork Component", "item.create.iron_sheet": "Plaque de Fer", "item.create.linked_controller": "UNLOCALIZED: Linked Controller", "item.create.minecart_contraption": "Engin de wagonnet", @@ -715,10 +715,14 @@ "create.recipe.draining": "UNLOCALIZED: Item Draining", "create.recipe.sequenced_assembly": "UNLOCALIZED: Sequenced Assembly", "create.recipe.assembly.next": "UNLOCALIZED: Next: %1$s", + "create.recipe.assembly.step": "UNLOCALIZED: Step %1$s:", + "create.recipe.assembly.progress": "UNLOCALIZED: Progress: %1$s/%2$s", "create.recipe.assembly.pressing": "UNLOCALIZED: Process in Press", "create.recipe.assembly.spout_filling_fluid": "UNLOCALIZED: Spout %1$s", "create.recipe.assembly.deploying_item": "UNLOCALIZED: Deploy %1$s", "create.recipe.assembly.cutting": "UNLOCALIZED: Cut with Saw", + "create.recipe.assembly.repeat": "UNLOCALIZED: Repeat Sequence %1$s Times", + "create.recipe.assembly.junk": "UNLOCALIZED: Random junk", "create.recipe.processing.chance": "%1$s%% de chance", "create.recipe.heat_requirement.none": "Pas de chauffage requis", "create.recipe.heat_requirement.heated": "Chauffé", 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 4fbc3bb25..1b9599e71 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: 859", + "_": "Missing Localizations: 863", "_": "->------------------------] Game Elements [------------------------<-", @@ -443,7 +443,7 @@ "item.create.chocolate_glazed_berries": "UNLOCALIZED: Chocolate Glazed Berries", "item.create.chromatic_compound": "Composto cromatico", "item.create.cinder_flour": "Cenere farinosa", - "item.create.clockwork_element": "UNLOCALIZED: Clockwork Element", + "item.create.clockwork_component": "UNLOCALIZED: Clockwork Component", "item.create.copper_backtank": "UNLOCALIZED: Copper Backtank", "item.create.copper_ingot": "Lingotto di rame", "item.create.copper_nugget": "Pepita di rame", @@ -478,7 +478,7 @@ "item.create.handheld_worldshaper": "Plasmatore del mondo portatile", "item.create.honey_bucket": "Secchio di miele", "item.create.honeyed_apple": "UNLOCALIZED: Honeyed Apple", - "item.create.incomplete_clockwork_element": "UNLOCALIZED: Incomplete Clockwork Element", + "item.create.incomplete_clockwork_component": "UNLOCALIZED: Incomplete Clockwork Component", "item.create.iron_sheet": "Lamiera di ferro", "item.create.linked_controller": "UNLOCALIZED: Linked Controller", "item.create.minecart_contraption": "Contrazione per carrello da miniera", @@ -715,10 +715,14 @@ "create.recipe.draining": "Drenaggio di oggetti", "create.recipe.sequenced_assembly": "UNLOCALIZED: Sequenced Assembly", "create.recipe.assembly.next": "UNLOCALIZED: Next: %1$s", + "create.recipe.assembly.step": "UNLOCALIZED: Step %1$s:", + "create.recipe.assembly.progress": "UNLOCALIZED: Progress: %1$s/%2$s", "create.recipe.assembly.pressing": "UNLOCALIZED: Process in Press", "create.recipe.assembly.spout_filling_fluid": "UNLOCALIZED: Spout %1$s", "create.recipe.assembly.deploying_item": "UNLOCALIZED: Deploy %1$s", "create.recipe.assembly.cutting": "UNLOCALIZED: Cut with Saw", + "create.recipe.assembly.repeat": "UNLOCALIZED: Repeat Sequence %1$s Times", + "create.recipe.assembly.junk": "UNLOCALIZED: Random junk", "create.recipe.processing.chance": "%1$s%% di probabilità", "create.recipe.heat_requirement.none": "Nessun riscaldamento", "create.recipe.heat_requirement.heated": "Riscaldamento", 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 9b153a8d3..454c78ef4 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: 225", + "_": "Missing Localizations: 229", "_": "->------------------------] Game Elements [------------------------<-", @@ -443,7 +443,7 @@ "item.create.chocolate_glazed_berries": "チョコレートグレーズドベリー", "item.create.chromatic_compound": "色彩の化合物", "item.create.cinder_flour": "ネザーラックの粉", - "item.create.clockwork_element": "UNLOCALIZED: Clockwork Element", + "item.create.clockwork_component": "UNLOCALIZED: Clockwork Component", "item.create.copper_backtank": "UNLOCALIZED: Copper Backtank", "item.create.copper_ingot": "銅インゴット", "item.create.copper_nugget": "銅塊", @@ -478,7 +478,7 @@ "item.create.handheld_worldshaper": "携帯型ワールドシェーパー", "item.create.honey_bucket": "ハチミツ入りバケツ", "item.create.honeyed_apple": "リンゴのハチミツかけ", - "item.create.incomplete_clockwork_element": "UNLOCALIZED: Incomplete Clockwork Element", + "item.create.incomplete_clockwork_component": "UNLOCALIZED: Incomplete Clockwork Component", "item.create.iron_sheet": "鉄板", "item.create.linked_controller": "UNLOCALIZED: Linked Controller", "item.create.minecart_contraption": "からくり付きトロッコ", @@ -715,10 +715,14 @@ "create.recipe.draining": "アイテムから排液", "create.recipe.sequenced_assembly": "UNLOCALIZED: Sequenced Assembly", "create.recipe.assembly.next": "UNLOCALIZED: Next: %1$s", + "create.recipe.assembly.step": "UNLOCALIZED: Step %1$s:", + "create.recipe.assembly.progress": "UNLOCALIZED: Progress: %1$s/%2$s", "create.recipe.assembly.pressing": "UNLOCALIZED: Process in Press", "create.recipe.assembly.spout_filling_fluid": "UNLOCALIZED: Spout %1$s", "create.recipe.assembly.deploying_item": "UNLOCALIZED: Deploy %1$s", "create.recipe.assembly.cutting": "UNLOCALIZED: Cut with Saw", + "create.recipe.assembly.repeat": "UNLOCALIZED: Repeat Sequence %1$s Times", + "create.recipe.assembly.junk": "UNLOCALIZED: Random junk", "create.recipe.processing.chance": "%1$s%%チャンス", "create.recipe.heat_requirement.none": "加熱不要", "create.recipe.heat_requirement.heated": "加熱が必要", 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 2180339de..01565bc7e 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: 912", + "_": "Missing Localizations: 916", "_": "->------------------------] Game Elements [------------------------<-", @@ -443,7 +443,7 @@ "item.create.chocolate_glazed_berries": "UNLOCALIZED: Chocolate Glazed Berries", "item.create.chromatic_compound": "색채 혼합물", "item.create.cinder_flour": "잿가루", - "item.create.clockwork_element": "UNLOCALIZED: Clockwork Element", + "item.create.clockwork_component": "UNLOCALIZED: Clockwork Component", "item.create.copper_backtank": "UNLOCALIZED: Copper Backtank", "item.create.copper_ingot": "구리 주괴", "item.create.copper_nugget": "구리 조각", @@ -478,7 +478,7 @@ "item.create.handheld_worldshaper": "휴대용 세계편집기", "item.create.honey_bucket": "꿀 양동이", "item.create.honeyed_apple": "UNLOCALIZED: Honeyed Apple", - "item.create.incomplete_clockwork_element": "UNLOCALIZED: Incomplete Clockwork Element", + "item.create.incomplete_clockwork_component": "UNLOCALIZED: Incomplete Clockwork Component", "item.create.iron_sheet": "철 판", "item.create.linked_controller": "UNLOCALIZED: Linked Controller", "item.create.minecart_contraption": "광산 수레 장치", @@ -715,10 +715,14 @@ "create.recipe.draining": "배수", "create.recipe.sequenced_assembly": "UNLOCALIZED: Sequenced Assembly", "create.recipe.assembly.next": "UNLOCALIZED: Next: %1$s", + "create.recipe.assembly.step": "UNLOCALIZED: Step %1$s:", + "create.recipe.assembly.progress": "UNLOCALIZED: Progress: %1$s/%2$s", "create.recipe.assembly.pressing": "UNLOCALIZED: Process in Press", "create.recipe.assembly.spout_filling_fluid": "UNLOCALIZED: Spout %1$s", "create.recipe.assembly.deploying_item": "UNLOCALIZED: Deploy %1$s", "create.recipe.assembly.cutting": "UNLOCALIZED: Cut with Saw", + "create.recipe.assembly.repeat": "UNLOCALIZED: Repeat Sequence %1$s Times", + "create.recipe.assembly.junk": "UNLOCALIZED: Random junk", "create.recipe.processing.chance": "%1$s%% 확률", "create.recipe.heat_requirement.none": "열이 필요하지 않음", "create.recipe.heat_requirement.heated": "고온으로 가열됨", 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 799bec105..5a39e646f 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: 1714", + "_": "Missing Localizations: 1718", "_": "->------------------------] Game Elements [------------------------<-", @@ -443,7 +443,7 @@ "item.create.chocolate_glazed_berries": "UNLOCALIZED: Chocolate Glazed Berries", "item.create.chromatic_compound": "UNLOCALIZED: Chromatic Compound", "item.create.cinder_flour": "UNLOCALIZED: Cinder Flour", - "item.create.clockwork_element": "UNLOCALIZED: Clockwork Element", + "item.create.clockwork_component": "UNLOCALIZED: Clockwork Component", "item.create.copper_backtank": "UNLOCALIZED: Copper Backtank", "item.create.copper_ingot": "Koperstaaf", "item.create.copper_nugget": "Koper klompje", @@ -478,7 +478,7 @@ "item.create.handheld_worldshaper": "UNLOCALIZED: Creative Worldshaper", "item.create.honey_bucket": "UNLOCALIZED: Honey Bucket", "item.create.honeyed_apple": "UNLOCALIZED: Honeyed Apple", - "item.create.incomplete_clockwork_element": "UNLOCALIZED: Incomplete Clockwork Element", + "item.create.incomplete_clockwork_component": "UNLOCALIZED: Incomplete Clockwork Component", "item.create.iron_sheet": "IJzeren Platen", "item.create.linked_controller": "UNLOCALIZED: Linked Controller", "item.create.minecart_contraption": "UNLOCALIZED: Minecart Contraption", @@ -715,10 +715,14 @@ "create.recipe.draining": "UNLOCALIZED: Item Draining", "create.recipe.sequenced_assembly": "UNLOCALIZED: Sequenced Assembly", "create.recipe.assembly.next": "UNLOCALIZED: Next: %1$s", + "create.recipe.assembly.step": "UNLOCALIZED: Step %1$s:", + "create.recipe.assembly.progress": "UNLOCALIZED: Progress: %1$s/%2$s", "create.recipe.assembly.pressing": "UNLOCALIZED: Process in Press", "create.recipe.assembly.spout_filling_fluid": "UNLOCALIZED: Spout %1$s", "create.recipe.assembly.deploying_item": "UNLOCALIZED: Deploy %1$s", "create.recipe.assembly.cutting": "UNLOCALIZED: Cut with Saw", + "create.recipe.assembly.repeat": "UNLOCALIZED: Repeat Sequence %1$s Times", + "create.recipe.assembly.junk": "UNLOCALIZED: Random junk", "create.recipe.processing.chance": "%1$s%% Kans", "create.recipe.heat_requirement.none": "UNLOCALIZED: No Heating Required", "create.recipe.heat_requirement.heated": "UNLOCALIZED: Heated", 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 0d9483779..6f2a97a8e 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: 201", + "_": "Missing Localizations: 205", "_": "->------------------------] Game Elements [------------------------<-", @@ -443,7 +443,7 @@ "item.create.chocolate_glazed_berries": "Jagody w czekoladzie", "item.create.chromatic_compound": "Związek chromatyczny", "item.create.cinder_flour": "Rozżarzona mąka", - "item.create.clockwork_element": "UNLOCALIZED: Clockwork Element", + "item.create.clockwork_component": "UNLOCALIZED: Clockwork Component", "item.create.copper_backtank": "Miedziany zbiornik w plecaku", "item.create.copper_ingot": "Sztabka miedzi", "item.create.copper_nugget": "Bryłka miedzi", @@ -478,7 +478,7 @@ "item.create.handheld_worldshaper": "Ręczny kształter", "item.create.honey_bucket": "Wiadro miodu", "item.create.honeyed_apple": "Jabłko w miodzie", - "item.create.incomplete_clockwork_element": "UNLOCALIZED: Incomplete Clockwork Element", + "item.create.incomplete_clockwork_component": "UNLOCALIZED: Incomplete Clockwork Component", "item.create.iron_sheet": "Arkusz żelaza", "item.create.linked_controller": "UNLOCALIZED: Linked Controller", "item.create.minecart_contraption": "Maszyna w wagoniku", @@ -715,10 +715,14 @@ "create.recipe.draining": "Osuszanie", "create.recipe.sequenced_assembly": "UNLOCALIZED: Sequenced Assembly", "create.recipe.assembly.next": "UNLOCALIZED: Next: %1$s", + "create.recipe.assembly.step": "UNLOCALIZED: Step %1$s:", + "create.recipe.assembly.progress": "UNLOCALIZED: Progress: %1$s/%2$s", "create.recipe.assembly.pressing": "UNLOCALIZED: Process in Press", "create.recipe.assembly.spout_filling_fluid": "UNLOCALIZED: Spout %1$s", "create.recipe.assembly.deploying_item": "UNLOCALIZED: Deploy %1$s", "create.recipe.assembly.cutting": "UNLOCALIZED: Cut with Saw", + "create.recipe.assembly.repeat": "UNLOCALIZED: Repeat Sequence %1$s Times", + "create.recipe.assembly.junk": "UNLOCALIZED: Random junk", "create.recipe.processing.chance": "%1$s%% szans", "create.recipe.heat_requirement.none": "Nie wymaga podgrzewania", "create.recipe.heat_requirement.heated": "Podrzewane", 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 3a2f07207..9456ef618 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: 1755", + "_": "Missing Localizations: 1759", "_": "->------------------------] Game Elements [------------------------<-", @@ -443,7 +443,7 @@ "item.create.chocolate_glazed_berries": "UNLOCALIZED: Chocolate Glazed Berries", "item.create.chromatic_compound": "UNLOCALIZED: Chromatic Compound", "item.create.cinder_flour": "UNLOCALIZED: Cinder Flour", - "item.create.clockwork_element": "UNLOCALIZED: Clockwork Element", + "item.create.clockwork_component": "UNLOCALIZED: Clockwork Component", "item.create.copper_backtank": "UNLOCALIZED: Copper Backtank", "item.create.copper_ingot": "UNLOCALIZED: Copper Ingot", "item.create.copper_nugget": "UNLOCALIZED: Copper Nugget", @@ -478,7 +478,7 @@ "item.create.handheld_worldshaper": "UNLOCALIZED: Creative Worldshaper", "item.create.honey_bucket": "UNLOCALIZED: Honey Bucket", "item.create.honeyed_apple": "UNLOCALIZED: Honeyed Apple", - "item.create.incomplete_clockwork_element": "UNLOCALIZED: Incomplete Clockwork Element", + "item.create.incomplete_clockwork_component": "UNLOCALIZED: Incomplete Clockwork Component", "item.create.iron_sheet": "Placas de Ferro", "item.create.linked_controller": "UNLOCALIZED: Linked Controller", "item.create.minecart_contraption": "UNLOCALIZED: Minecart Contraption", @@ -715,10 +715,14 @@ "create.recipe.draining": "UNLOCALIZED: Item Draining", "create.recipe.sequenced_assembly": "UNLOCALIZED: Sequenced Assembly", "create.recipe.assembly.next": "UNLOCALIZED: Next: %1$s", + "create.recipe.assembly.step": "UNLOCALIZED: Step %1$s:", + "create.recipe.assembly.progress": "UNLOCALIZED: Progress: %1$s/%2$s", "create.recipe.assembly.pressing": "UNLOCALIZED: Process in Press", "create.recipe.assembly.spout_filling_fluid": "UNLOCALIZED: Spout %1$s", "create.recipe.assembly.deploying_item": "UNLOCALIZED: Deploy %1$s", "create.recipe.assembly.cutting": "UNLOCALIZED: Cut with Saw", + "create.recipe.assembly.repeat": "UNLOCALIZED: Repeat Sequence %1$s Times", + "create.recipe.assembly.junk": "UNLOCALIZED: Random junk", "create.recipe.processing.chance": "%1$s%% de chance", "create.recipe.heat_requirement.none": "UNLOCALIZED: No Heating Required", "create.recipe.heat_requirement.heated": "UNLOCALIZED: Heated", 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 bafa2b39f..6b58a8c53 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: 758", + "_": "Missing Localizations: 762", "_": "->------------------------] Game Elements [------------------------<-", @@ -443,7 +443,7 @@ "item.create.chocolate_glazed_berries": "Ягоды в шоколадной глазури", "item.create.chromatic_compound": "Хроматический компаунд", "item.create.cinder_flour": "Незераковая пыль", - "item.create.clockwork_element": "UNLOCALIZED: Clockwork Element", + "item.create.clockwork_component": "UNLOCALIZED: Clockwork Component", "item.create.copper_backtank": "UNLOCALIZED: Copper Backtank", "item.create.copper_ingot": "Медный слиток", "item.create.copper_nugget": "Кусочек меди", @@ -478,7 +478,7 @@ "item.create.handheld_worldshaper": "Ручной редактор мира", "item.create.honey_bucket": "Ведро мёда", "item.create.honeyed_apple": "Яблоко в меду", - "item.create.incomplete_clockwork_element": "UNLOCALIZED: Incomplete Clockwork Element", + "item.create.incomplete_clockwork_component": "UNLOCALIZED: Incomplete Clockwork Component", "item.create.iron_sheet": "Железный лист", "item.create.linked_controller": "UNLOCALIZED: Linked Controller", "item.create.minecart_contraption": "Вагонеточная штуковина", @@ -715,10 +715,14 @@ "create.recipe.draining": "Осушение предметов", "create.recipe.sequenced_assembly": "UNLOCALIZED: Sequenced Assembly", "create.recipe.assembly.next": "UNLOCALIZED: Next: %1$s", + "create.recipe.assembly.step": "UNLOCALIZED: Step %1$s:", + "create.recipe.assembly.progress": "UNLOCALIZED: Progress: %1$s/%2$s", "create.recipe.assembly.pressing": "UNLOCALIZED: Process in Press", "create.recipe.assembly.spout_filling_fluid": "UNLOCALIZED: Spout %1$s", "create.recipe.assembly.deploying_item": "UNLOCALIZED: Deploy %1$s", "create.recipe.assembly.cutting": "UNLOCALIZED: Cut with Saw", + "create.recipe.assembly.repeat": "UNLOCALIZED: Repeat Sequence %1$s Times", + "create.recipe.assembly.junk": "UNLOCALIZED: Random junk", "create.recipe.processing.chance": "%1$s%% шанса", "create.recipe.heat_requirement.none": "Не требует нагрева", "create.recipe.heat_requirement.heated": "Нагрето", 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 79b58508b..fbb8c741a 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: 242", + "_": "Missing Localizations: 246", "_": "->------------------------] Game Elements [------------------------<-", @@ -443,7 +443,7 @@ "item.create.chocolate_glazed_berries": "巧克力包层浆果", "item.create.chromatic_compound": "异彩化合物", "item.create.cinder_flour": "下界面粉", - "item.create.clockwork_element": "UNLOCALIZED: Clockwork Element", + "item.create.clockwork_component": "UNLOCALIZED: Clockwork Component", "item.create.copper_backtank": "UNLOCALIZED: Copper Backtank", "item.create.copper_ingot": "铜锭", "item.create.copper_nugget": "铜粒", @@ -478,7 +478,7 @@ "item.create.handheld_worldshaper": "手持式环境塑形器", "item.create.honey_bucket": "蜂蜜桶", "item.create.honeyed_apple": "蜜渍苹果", - "item.create.incomplete_clockwork_element": "UNLOCALIZED: Incomplete Clockwork Element", + "item.create.incomplete_clockwork_component": "UNLOCALIZED: Incomplete Clockwork Component", "item.create.iron_sheet": "铁板", "item.create.linked_controller": "UNLOCALIZED: Linked Controller", "item.create.minecart_contraption": "装配过的矿车", @@ -715,10 +715,14 @@ "create.recipe.draining": "分液", "create.recipe.sequenced_assembly": "UNLOCALIZED: Sequenced Assembly", "create.recipe.assembly.next": "UNLOCALIZED: Next: %1$s", + "create.recipe.assembly.step": "UNLOCALIZED: Step %1$s:", + "create.recipe.assembly.progress": "UNLOCALIZED: Progress: %1$s/%2$s", "create.recipe.assembly.pressing": "UNLOCALIZED: Process in Press", "create.recipe.assembly.spout_filling_fluid": "UNLOCALIZED: Spout %1$s", "create.recipe.assembly.deploying_item": "UNLOCALIZED: Deploy %1$s", "create.recipe.assembly.cutting": "UNLOCALIZED: Cut with Saw", + "create.recipe.assembly.repeat": "UNLOCALIZED: Repeat Sequence %1$s Times", + "create.recipe.assembly.junk": "UNLOCALIZED: Random junk", "create.recipe.processing.chance": "%1$s%%概率", "create.recipe.heat_requirement.none": "无需加热", "create.recipe.heat_requirement.heated": "加热", 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 d885d3fff..e0286db63 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: 237", + "_": "Missing Localizations: 241", "_": "->------------------------] Game Elements [------------------------<-", @@ -443,7 +443,7 @@ "item.create.chocolate_glazed_berries": "巧克力甜莓", "item.create.chromatic_compound": "異彩化合物", "item.create.cinder_flour": "地獄麵粉", - "item.create.clockwork_element": "UNLOCALIZED: Clockwork Element", + "item.create.clockwork_component": "UNLOCALIZED: Clockwork Component", "item.create.copper_backtank": "UNLOCALIZED: Copper Backtank", "item.create.copper_ingot": "銅錠", "item.create.copper_nugget": "銅粒", @@ -478,7 +478,7 @@ "item.create.handheld_worldshaper": "地形雕塑器", "item.create.honey_bucket": "蜂蜜桶", "item.create.honeyed_apple": "蜂蜜蘋果", - "item.create.incomplete_clockwork_element": "UNLOCALIZED: Incomplete Clockwork Element", + "item.create.incomplete_clockwork_component": "UNLOCALIZED: Incomplete Clockwork Component", "item.create.iron_sheet": "鐵板", "item.create.linked_controller": "UNLOCALIZED: Linked Controller", "item.create.minecart_contraption": "裝修過的礦車", @@ -715,10 +715,14 @@ "create.recipe.draining": "分液", "create.recipe.sequenced_assembly": "UNLOCALIZED: Sequenced Assembly", "create.recipe.assembly.next": "UNLOCALIZED: Next: %1$s", + "create.recipe.assembly.step": "UNLOCALIZED: Step %1$s:", + "create.recipe.assembly.progress": "UNLOCALIZED: Progress: %1$s/%2$s", "create.recipe.assembly.pressing": "UNLOCALIZED: Process in Press", "create.recipe.assembly.spout_filling_fluid": "UNLOCALIZED: Spout %1$s", "create.recipe.assembly.deploying_item": "UNLOCALIZED: Deploy %1$s", "create.recipe.assembly.cutting": "UNLOCALIZED: Cut with Saw", + "create.recipe.assembly.repeat": "UNLOCALIZED: Repeat Sequence %1$s Times", + "create.recipe.assembly.junk": "UNLOCALIZED: Random junk", "create.recipe.processing.chance": "%1$s%%概率", "create.recipe.heat_requirement.none": "不需要加熱", "create.recipe.heat_requirement.heated": "普通加熱", diff --git a/src/generated/resources/assets/create/models/item/clockwork_element.json b/src/generated/resources/assets/create/models/item/clockwork_component.json similarity index 56% rename from src/generated/resources/assets/create/models/item/clockwork_element.json rename to src/generated/resources/assets/create/models/item/clockwork_component.json index 91bbbb770..6f6237a26 100644 --- a/src/generated/resources/assets/create/models/item/clockwork_element.json +++ b/src/generated/resources/assets/create/models/item/clockwork_component.json @@ -1,6 +1,6 @@ { "parent": "minecraft:item/generated", "textures": { - "layer0": "create:item/clockwork_element" + "layer0": "create:item/clockwork_component" } } \ No newline at end of file diff --git a/src/generated/resources/assets/create/models/item/incomplete_clockwork_element.json b/src/generated/resources/assets/create/models/item/incomplete_clockwork_component.json similarity index 51% rename from src/generated/resources/assets/create/models/item/incomplete_clockwork_element.json rename to src/generated/resources/assets/create/models/item/incomplete_clockwork_component.json index 1cc1e0e40..9dad96684 100644 --- a/src/generated/resources/assets/create/models/item/incomplete_clockwork_element.json +++ b/src/generated/resources/assets/create/models/item/incomplete_clockwork_component.json @@ -1,6 +1,6 @@ { "parent": "minecraft:item/generated", "textures": { - "layer0": "create:item/incomplete_clockwork_element" + "layer0": "create:item/incomplete_clockwork_component" } } \ No newline at end of file diff --git a/src/generated/resources/data/create/advancements/integrated_circuit.json b/src/generated/resources/data/create/advancements/integrated_circuit.json index 1b267bbbe..447fa7e14 100644 --- a/src/generated/resources/data/create/advancements/integrated_circuit.json +++ b/src/generated/resources/data/create/advancements/integrated_circuit.json @@ -2,7 +2,7 @@ "parent": "create:crafter", "display": { "icon": { - "item": "create:clockwork_element" + "item": "create:clockwork_component" }, "title": { "translate": "advancement.create.integrated_circuit" @@ -21,7 +21,7 @@ "conditions": { "items": [ { - "item": "create:clockwork_element" + "item": "create:clockwork_component" } ] } diff --git a/src/generated/resources/data/create/advancements/integrated_circuit_eob.json b/src/generated/resources/data/create/advancements/integrated_circuit_eob.json index 20c6037ba..97e59a334 100644 --- a/src/generated/resources/data/create/advancements/integrated_circuit_eob.json +++ b/src/generated/resources/data/create/advancements/integrated_circuit_eob.json @@ -21,7 +21,7 @@ "conditions": { "items": [ { - "item": "create:clockwork_element" + "item": "create:clockwork_component" } ] } diff --git a/src/generated/resources/data/create/recipes/crafting/kinetics/rotation_speed_controller.json b/src/generated/resources/data/create/recipes/crafting/kinetics/rotation_speed_controller.json index 9946c8447..ad8bfbdff 100644 --- a/src/generated/resources/data/create/recipes/crafting/kinetics/rotation_speed_controller.json +++ b/src/generated/resources/data/create/recipes/crafting/kinetics/rotation_speed_controller.json @@ -6,7 +6,7 @@ ], "key": { "B": { - "item": "create:clockwork_element" + "item": "create:clockwork_component" }, "C": { "item": "create:brass_casing" diff --git a/src/generated/resources/data/create/recipes/sequenced_assembly/clockwork_component.json b/src/generated/resources/data/create/recipes/sequenced_assembly/clockwork_component.json new file mode 100644 index 000000000..a48decec0 --- /dev/null +++ b/src/generated/resources/data/create/recipes/sequenced_assembly/clockwork_component.json @@ -0,0 +1,77 @@ +{ + "type": "create:sequenced_assembly", + "ingredient": { + "tag": "forge:plates/gold" + }, + "transitionalItem": { + "item": "create:incomplete_clockwork_component" + }, + "sequence": [ + { + "type": "create:deploying", + "ingredients": [ + { + "item": "create:incomplete_clockwork_component" + }, + { + "item": "create:cogwheel" + } + ], + "results": [ + { + "item": "create:incomplete_clockwork_component" + } + ] + }, + { + "type": "create:deploying", + "ingredients": [ + { + "item": "create:incomplete_clockwork_component" + }, + { + "item": "create:large_cogwheel" + } + ], + "results": [ + { + "item": "create:incomplete_clockwork_component" + } + ] + }, + { + "type": "create:deploying", + "ingredients": [ + { + "item": "create:incomplete_clockwork_component" + }, + { + "tag": "forge:nuggets/iron" + } + ], + "results": [ + { + "item": "create:incomplete_clockwork_component" + } + ] + } + ], + "results": [ + { + "item": "create:clockwork_component", + "chance": 12.0 + }, + { + "item": "create:golden_sheet", + "chance": 2.0 + }, + { + "item": "create:andesite_alloy", + "chance": 2.0 + }, + { + "item": "create:cogwheel" + } + ], + "loops": 5 +} \ No newline at end of file diff --git a/src/generated/resources/data/create/recipes/sequenced_assembly/test.json b/src/generated/resources/data/create/recipes/sequenced_assembly/test.json deleted file mode 100644 index 5b1fb6948..000000000 --- a/src/generated/resources/data/create/recipes/sequenced_assembly/test.json +++ /dev/null @@ -1,123 +0,0 @@ -{ - "type": "create:sequenced_assembly", - "ingredient": { - "tag": "forge:plates/gold" - }, - "transitionalItem": { - "item": "create:incomplete_clockwork_element" - }, - "sequence": [ - { - "type": "create:deploying", - "ingredients": [ - { - "item": "create:incomplete_clockwork_element" - }, - { - "item": "create:cogwheel" - } - ], - "results": [ - { - "item": "create:incomplete_clockwork_element" - } - ] - }, - { - "type": "create:pressing", - "ingredients": [ - { - "item": "create:incomplete_clockwork_element" - } - ], - "results": [ - { - "item": "create:incomplete_clockwork_element" - } - ] - }, - { - "type": "create:deploying", - "ingredients": [ - { - "item": "create:incomplete_clockwork_element" - }, - { - "item": "create:large_cogwheel" - } - ], - "results": [ - { - "item": "create:incomplete_clockwork_element" - } - ] - }, - { - "type": "create:filling", - "ingredients": [ - { - "item": "create:incomplete_clockwork_element" - }, - { - "fluid": "minecraft:water", - "nbt": {}, - "amount": 100 - } - ], - "results": [ - { - "item": "create:incomplete_clockwork_element" - } - ] - }, - { - "type": "create:deploying", - "ingredients": [ - { - "item": "create:incomplete_clockwork_element" - }, - { - "item": "create:shaft" - } - ], - "results": [ - { - "item": "create:incomplete_clockwork_element" - } - ] - }, - { - "type": "create:cutting", - "ingredients": [ - { - "item": "create:incomplete_clockwork_element" - } - ], - "results": [ - { - "item": "create:incomplete_clockwork_element" - } - ], - "processingTime": 100 - } - ], - "results": [ - { - "item": "create:clockwork_element", - "chance": 10.0 - }, - { - "item": "create:golden_sheet", - "chance": 5.0 - }, - { - "item": "create:andesite_alloy", - "chance": 2.0 - }, - { - "item": "create:cogwheel" - } - ], - "averageSteps": 20, - "maxSteps": 30 -} \ No newline at end of file diff --git a/src/main/java/com/simibubi/create/AllItems.java b/src/main/java/com/simibubi/create/AllItems.java index 0151940aa..c7ca446fb 100644 --- a/src/main/java/com/simibubi/create/AllItems.java +++ b/src/main/java/com/simibubi/create/AllItems.java @@ -17,6 +17,7 @@ import com.simibubi.create.content.contraptions.components.structureMovement.mou import com.simibubi.create.content.contraptions.components.structureMovement.train.MinecartCouplingItem; import com.simibubi.create.content.contraptions.goggles.GogglesItem; import com.simibubi.create.content.contraptions.goggles.GogglesModel; +import com.simibubi.create.content.contraptions.itemAssembly.SequencedAssemblyItem; import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlockItem; import com.simibubi.create.content.contraptions.relays.belt.item.BeltConnectorItem; import com.simibubi.create.content.contraptions.relays.gearbox.VerticalGearboxItem; @@ -81,10 +82,11 @@ public class AllItems { PROPELLER = ingredient("propeller"), WHISK = ingredient("whisk"), BRASS_HAND = ingredient("brass_hand"), CRAFTER_SLOT_COVER = ingredient("crafter_slot_cover"), ELECTRON_TUBE = ingredient("electron_tube"); - public static final ItemEntry INCOMPLETE_CLOCKWORK_ELEMENT = - hiddenIngredient("incomplete_clockwork_element"); + public static final ItemEntry INCOMPLETE_CLOCKWORK_COMPONENT = + REGISTRATE.item("incomplete_clockwork_component", SequencedAssemblyItem::new) + .register(); - public static final ItemEntry CLOCKWORK_ELEMENT = ingredient("clockwork_element"); + public static final ItemEntry CLOCKWORK_COMPONENT = ingredient("clockwork_component"); public static final ItemEntry BLAZE_CAKE_BASE = REGISTRATE.item("blaze_cake_base", HiddenIngredientItem::new) @@ -239,7 +241,7 @@ public class AllItems { static { REGISTRATE.startSection(CURIOSITIES); } - + public static final ItemEntry EXTENDO_GRIP = REGISTRATE.item("extendo_grip", ExtendoGripItem::new) .transform(CreateRegistrate.customRenderedItem(() -> ExtendoGripModel::new)) .model(AssetLookup.itemModelWithPartials()) @@ -304,7 +306,7 @@ public class AllItems { REGISTRATE.item("attribute_filter", FilterItem::attribute) .model(AssetLookup.existingItemModel()) .register(); - + // Schematics static { diff --git a/src/main/java/com/simibubi/create/compat/jei/CreateJEI.java b/src/main/java/com/simibubi/create/compat/jei/CreateJEI.java index 9e34f5f0f..fa9f08c2f 100644 --- a/src/main/java/com/simibubi/create/compat/jei/CreateJEI.java +++ b/src/main/java/com/simibubi/create/compat/jei/CreateJEI.java @@ -33,6 +33,7 @@ import com.simibubi.create.compat.jei.category.PolishingCategory; import com.simibubi.create.compat.jei.category.PressingCategory; import com.simibubi.create.compat.jei.category.ProcessingViaFanCategory; import com.simibubi.create.compat.jei.category.SawingCategory; +import com.simibubi.create.compat.jei.category.SequencedAssemblyCategory; import com.simibubi.create.compat.jei.category.SpoutCategory; import com.simibubi.create.content.contraptions.components.deployer.DeployerApplicationRecipe; import com.simibubi.create.content.contraptions.components.press.MechanicalPressTileEntity; @@ -88,16 +89,16 @@ public class CreateJEI implements IModPlugin { private final List> allCategories = new ArrayList<>(); private final CreateRecipeCategory - milling = register("milling", MillingCategory::new).recipes(AllRecipeTypes.MILLING) - .catalyst(AllBlocks.MILLSTONE::get) - .build(), + milling = register("milling", MillingCategory::new).recipes(AllRecipeTypes.MILLING) + .catalyst(AllBlocks.MILLSTONE::get) + .build(), - crushing = register("crushing", CrushingCategory::new).recipes(AllRecipeTypes.CRUSHING) + crushing = register("crushing", CrushingCategory::new).recipes(AllRecipeTypes.CRUSHING) .recipesExcluding(AllRecipeTypes.MILLING::getType, AllRecipeTypes.CRUSHING::getType) .catalyst(AllBlocks.CRUSHING_WHEEL::get) .build(), - pressing = register("pressing", PressingCategory::new).recipes(AllRecipeTypes.PRESSING) + pressing = register("pressing", PressingCategory::new).recipes(AllRecipeTypes.PRESSING) .catalyst(AllBlocks.MECHANICAL_PRESS::get) .build(), @@ -121,6 +122,14 @@ public class CreateJEI implements IModPlugin { .catalyst(AllBlocks.BASIN::get) .build(), + seqAssembly = register("sequenced_assembly", SequencedAssemblyCategory::new) + .recipes(AllRecipeTypes.SEQUENCED_ASSEMBLY::getType) + .catalyst(AllBlocks.MECHANICAL_PRESS::get) + .catalyst(AllBlocks.MECHANICAL_SAW::get) + .catalyst(AllBlocks.DEPLOYER::get) + .catalyst(AllBlocks.SPOUT::get) + .build(), + autoShapeless = register("automatic_shapeless", MixingCategory::autoShapeless) .recipes(r -> r.getSerializer() == IRecipeSerializer.CRAFTING_SHAPELESS && r.getIngredients() .size() > 1 && !MechanicalPressTileEntity.canCompress(r.getIngredients()), @@ -173,8 +182,8 @@ public class CreateJEI implements IModPlugin { .build(), deploying = register("deploying", DeployingCategory::new) - .recipeList( - () -> DeployerApplicationRecipe.convert(findRecipesByType(AllRecipeTypes.SANDPAPER_POLISHING.type))) + .recipeList( + () -> DeployerApplicationRecipe.convert(findRecipesByType(AllRecipeTypes.SANDPAPER_POLISHING.type))) .recipes(AllRecipeTypes.DEPLOYING) .catalyst(AllBlocks.DEPLOYER::get) .catalyst(AllBlocks.DEPOT::get) @@ -208,11 +217,11 @@ public class CreateJEI implements IModPlugin { mechanicalCrafting = register("mechanical_crafting", MechanicalCraftingCategory::new).recipes(AllRecipeTypes.MECHANICAL_CRAFTING) - .catalyst(AllBlocks.MECHANICAL_CRAFTER::get) - .build(); + .catalyst(AllBlocks.MECHANICAL_CRAFTER::get) + .build(); private > CategoryBuilder register(String name, - Supplier> supplier) { + Supplier> supplier) { return new CategoryBuilder(name, supplier); } @@ -291,13 +300,13 @@ public class CreateJEI implements IModPlugin { } public CategoryBuilder recipeList(Supplier>> list, - Function, T> converter) { + Function, T> converter) { recipeListConsumers.add(recipes -> { List> toAdd = list.get(); if (converter != null) toAdd = toAdd.stream() - .map(converter) - .collect(Collectors.toList()); + .map(converter) + .collect(Collectors.toList()); recipes.addAll(toAdd); }); return this; diff --git a/src/main/java/com/simibubi/create/compat/jei/category/BlockCuttingCategory.java b/src/main/java/com/simibubi/create/compat/jei/category/BlockCuttingCategory.java index f1e1817f9..2d1cfe9b7 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/BlockCuttingCategory.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/BlockCuttingCategory.java @@ -67,6 +67,7 @@ public class BlockCuttingCategory extends CreateRecipeCategory> implements IRec ProcessingOutput output = results.get(slotIndex - 1); float chance = output.getChance(); if (chance != 1) - tooltip.add(1, Lang.translate("recipe.processing.chance", chance < 0.01 ? "<1" : (int) (chance * 100)).formatted(TextFormatting.GOLD)); + tooltip.add(1, Lang.translate("recipe.processing.chance", chance < 0.01 ? "<1" : (int) (chance * 100)) + .formatted(TextFormatting.GOLD)); }); } - public List withImprovedVisibility(List stacks) { + public static List withImprovedVisibility(List stacks) { return stacks.stream() - .map(this::withImprovedVisibility) + .map(CreateRecipeCategory::withImprovedVisibility) .collect(Collectors.toList()); } - public FluidStack withImprovedVisibility(FluidStack stack) { + public static FluidStack withImprovedVisibility(FluidStack stack) { FluidStack display = stack.copy(); int displayedAmount = (int) (stack.getAmount() * .75f) + 250; display.setAmount(displayedAmount); return display; } - protected static void addFluidTooltip(IGuiFluidStackGroup fluidStacks, List inputs, + public static void addFluidTooltip(IGuiFluidStackGroup fluidStacks, List inputs, List outputs) { + addFluidTooltip(fluidStacks, inputs, outputs, -1); + } + + public static void addFluidTooltip(IGuiFluidStackGroup fluidStacks, List inputs, + List outputs, int index) { List amounts = new ArrayList<>(); inputs.forEach(f -> amounts.add(f.getRequiredAmount())); outputs.forEach(f -> amounts.add(f.getAmount())); fluidStacks.addTooltipCallback((slotIndex, input, fluid, tooltip) -> { + if (index != -1 && slotIndex != index) + return; + if (fluid.getFluid() .isEquivalentTo(AllFluids.POTION.get())) { ITextComponent name = fluid.getDisplayName(); @@ -142,12 +151,13 @@ public abstract class CreateRecipeCategory> implements IRec .collect(Collectors.toList())); } - int amount = amounts.get(slotIndex); + int amount = amounts.get(index != -1 ? 0 : slotIndex); ITextComponent text = (Lang.translate("generic.unit.millibuckets", amount)).formatted(TextFormatting.GOLD); if (tooltip.isEmpty()) tooltip.add(0, text); else { - List siblings = tooltip.get(0).getSiblings(); + List siblings = tooltip.get(0) + .getSiblings(); siblings.add(new StringTextComponent(" ")); siblings.add(text); } diff --git a/src/main/java/com/simibubi/create/compat/jei/category/SawingCategory.java b/src/main/java/com/simibubi/create/compat/jei/category/SawingCategory.java index 7e249d103..61f88da28 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/SawingCategory.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/SawingCategory.java @@ -39,7 +39,9 @@ public class SawingCategory extends CreateRecipeCategory { public void setRecipe(IRecipeLayout recipeLayout, CuttingRecipe recipe, IIngredients ingredients) { IGuiItemStackGroup itemStacks = recipeLayout.getItemStacks(); itemStacks.init(0, true, 43, 4); - itemStacks.set(0, Arrays.asList(recipe.getIngredients().get(0).getMatchingStacks())); + itemStacks.set(0, Arrays.asList(recipe.getIngredients() + .get(0) + .getMatchingStacks())); List results = recipe.getRollableResults(); for (int outputIndex = 0; outputIndex < results.size(); outputIndex++) { @@ -47,7 +49,8 @@ public class SawingCategory extends CreateRecipeCategory { int yOffset = (outputIndex / 2) * -19; itemStacks.init(outputIndex + 1, false, 117 + xOffset, 47 + yOffset); - itemStacks.set(outputIndex + 1, results.get(outputIndex).getStack()); + itemStacks.set(outputIndex + 1, results.get(outputIndex) + .getStack()); } addStochasticTooltip(itemStacks, results); @@ -56,13 +59,15 @@ public class SawingCategory extends CreateRecipeCategory { @Override public void draw(CuttingRecipe recipe, MatrixStack matrixStack, double mouseX, double mouseY) { AllGuiTextures.JEI_SLOT.draw(matrixStack, 43, 4); - int size = recipe.getRollableResults().size(); + int size = recipe.getRollableResults() + .size(); for (int i = 0; i < size; i++) { int xOffset = i % 2 == 0 ? 0 : 19; int yOffset = (i / 2) * -19; getRenderedSlot(recipe, i).draw(matrixStack, 117 + xOffset, 47 + yOffset); } AllGuiTextures.JEI_DOWN_ARROW.draw(matrixStack, 70, 6); + AllGuiTextures.JEI_SHADOW.draw(matrixStack, 72 - 17, 42 + 13); saw.draw(matrixStack, 72, 42); } diff --git a/src/main/java/com/simibubi/create/compat/jei/category/SequencedAssemblyCategory.java b/src/main/java/com/simibubi/create/compat/jei/category/SequencedAssemblyCategory.java new file mode 100644 index 000000000..da1b579b8 --- /dev/null +++ b/src/main/java/com/simibubi/create/compat/jei/category/SequencedAssemblyCategory.java @@ -0,0 +1,241 @@ +package com.simibubi.create.compat.jei.category; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +import com.google.common.collect.ImmutableList; +import com.mojang.blaze3d.matrix.MatrixStack; +import com.mojang.blaze3d.systems.RenderSystem; +import com.simibubi.create.AllItems; +import com.simibubi.create.compat.jei.EmptyBackground; +import com.simibubi.create.compat.jei.category.sequencedAssembly.SequencedAssemblySubCategory; +import com.simibubi.create.content.contraptions.itemAssembly.SequencedAssemblyRecipe; +import com.simibubi.create.content.contraptions.itemAssembly.SequencedRecipe; +import com.simibubi.create.foundation.fluid.FluidIngredient; +import com.simibubi.create.foundation.gui.AllGuiTextures; +import com.simibubi.create.foundation.gui.AllIcons; +import com.simibubi.create.foundation.utility.Lang; + +import mezz.jei.api.constants.VanillaTypes; +import mezz.jei.api.gui.IRecipeLayout; +import mezz.jei.api.gui.ingredient.IGuiFluidStackGroup; +import mezz.jei.api.gui.ingredient.IGuiItemStackGroup; +import mezz.jei.api.ingredients.IIngredients; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.FontRenderer; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.Ingredient; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.StringTextComponent; +import net.minecraft.util.text.TextFormatting; +import net.minecraft.util.text.TranslationTextComponent; + +public class SequencedAssemblyCategory extends CreateRecipeCategory { + + Map subCategories = new HashMap<>(); + + public SequencedAssemblyCategory() { + super(itemIcon(AllItems.CLOCKWORK_COMPONENT.get()), new EmptyBackground(180, 115)); + } + + @Override + public Class getRecipeClass() { + return SequencedAssemblyRecipe.class; + } + + @Override + public void setIngredients(SequencedAssemblyRecipe recipe, IIngredients ingredients) { + List assemblyIngredients = getAllItemIngredients(recipe); + List assemblyFluidIngredients = getAllFluidIngredients(recipe); + ingredients.setInputIngredients(assemblyIngredients); + if (!assemblyFluidIngredients.isEmpty()) + ingredients.setInputLists(VanillaTypes.FLUID, assemblyFluidIngredients.stream() + .map(FluidIngredient::getMatchingFluidStacks) + .collect(Collectors.toList())); + ingredients.setOutputs(VanillaTypes.ITEM, + ImmutableList.of(recipe.getRecipeOutput(), recipe.getTransitionalItem())); + } + + @Override + public void setRecipe(IRecipeLayout recipeLayout, SequencedAssemblyRecipe recipe, IIngredients ingredients) { + IGuiItemStackGroup itemStacks = recipeLayout.getItemStacks(); + IGuiFluidStackGroup fluidStacks = recipeLayout.getFluidStacks(); + int xOffset = recipe.getOutputChance() == 1 ? 0 : -7; + + itemStacks.init(0, true, 26 + xOffset, 90); + itemStacks.set(0, Arrays.asList(recipe.getIngredient() + .getMatchingStacks())); + + ItemStack result = recipe.getRecipeOutput(); + itemStacks.init(1, false, 131 + xOffset, 90); + itemStacks.set(1, result); + + int width = 0; + int margin = 3; + for (SequencedRecipe sequencedRecipe : recipe.getSequence()) + width += getSubCategory(sequencedRecipe).getWidth() + margin; + width -= margin; + int x = width / -2 + getBackground().getWidth() / 2; + int index = 2; + int fluidIndex = 0; + for (SequencedRecipe sequencedRecipe : recipe.getSequence()) { + SequencedAssemblySubCategory subCategory = getSubCategory(sequencedRecipe); + index += subCategory.addItemIngredients(sequencedRecipe, itemStacks, x, index); + fluidIndex += subCategory.addFluidIngredients(sequencedRecipe, fluidStacks, x, fluidIndex); + x += subCategory.getWidth() + margin; + } + + itemStacks.addTooltipCallback((slotIndex, input, ingredient, tooltip) -> { + if (slotIndex != 1) + return; + float chance = recipe.getOutputChance(); + if (chance != 1) + tooltip.add(1, Lang.translate("recipe.processing.chance", chance < 0.01 ? "<1" : (int) (chance * 100)) + .formatted(TextFormatting.GOLD)); + }); + } + + private SequencedAssemblySubCategory getSubCategory(SequencedRecipe sequencedRecipe) { + return subCategories.computeIfAbsent(sequencedRecipe.getRecipe() + .getSerializer() + .getRegistryName(), + rl -> sequencedRecipe.getAsAssemblyRecipe() + .getJEISubCategory() + .get() + .get()); + + } + + final String[] romans = { "I", "II", "III", "IV", "V", "VI", "-" }; + + @Override + public void draw(SequencedAssemblyRecipe recipe, MatrixStack matrixStack, double mouseX, double mouseY) { + FontRenderer font = Minecraft.getInstance().fontRenderer; + + matrixStack.push(); + matrixStack.translate(0, 15, 0); + boolean singleOutput = recipe.getOutputChance() == 1; + int xOffset = singleOutput ? 0 : -7; + AllGuiTextures.JEI_SLOT.draw(matrixStack, 26 + xOffset, 75); + (singleOutput ? AllGuiTextures.JEI_SLOT : AllGuiTextures.JEI_CHANCE_SLOT).draw(matrixStack, 131 + xOffset, 75); + AllGuiTextures.JEI_LONG_ARROW.draw(matrixStack, 52 + xOffset, 79); + if (!singleOutput) { + AllGuiTextures.JEI_CHANCE_SLOT.draw(matrixStack, 150 + xOffset, 75); + ITextComponent component = new StringTextComponent("?").formatted(TextFormatting.BOLD); + font.drawWithShadow(matrixStack, component, font.getWidth(component) / -2 + 8 + 150 + xOffset, 2 + 78, + 0xefefef); + } + + if (recipe.getLoops() > 1) { + matrixStack.push(); + matrixStack.translate(15, 9, 0); + RenderSystem.color4f(.65f, .65f, .65f, 1); + AllIcons.I_REFRESH.draw(matrixStack, 50 + xOffset, 75); + RenderSystem.color4f(1, 1, 1, 1); + ITextComponent repeat = new StringTextComponent("x" + recipe.getLoops()); + font.draw(matrixStack, repeat, 66 + xOffset, 80, 0x888888); + matrixStack.pop(); + } + + matrixStack.pop(); + + int width = 0; + int margin = 3; + for (SequencedRecipe sequencedRecipe : recipe.getSequence()) + width += getSubCategory(sequencedRecipe).getWidth() + margin; + width -= margin; + matrixStack.translate(width / -2 + getBackground().getWidth() / 2, 0, 0); + + matrixStack.push(); + List> sequence = recipe.getSequence(); + for (int i = 0; i < sequence.size(); i++) { + SequencedRecipe sequencedRecipe = sequence.get(i); + SequencedAssemblySubCategory subCategory = getSubCategory(sequencedRecipe); + int subWidth = subCategory.getWidth(); + StringTextComponent component = new StringTextComponent("" + romans[Math.min(i, 6)]); + font.draw(matrixStack, component, font.getWidth(component) / -2 + subWidth / 2, 2, 0x888888); + subCategory.draw(sequencedRecipe, matrixStack, mouseX, mouseY, i); + matrixStack.translate(subWidth + margin, 0, 0); + } + matrixStack.pop(); + } + + @Override + public List getTooltipStrings(SequencedAssemblyRecipe recipe, double mouseX, double mouseY) { + List tooltip = new ArrayList(); + + TranslationTextComponent junk = Lang.translate("recipe.assembly.junk"); + + boolean singleOutput = recipe.getOutputChance() == 1; + boolean willRepeat = recipe.getLoops() > 1; + + int xOffset = -7; + int minX = 150 + xOffset; + int maxX = minX + 18; + int minY = 90; + int maxY = minY + 18; + if (!singleOutput && mouseX >= minX && mouseX < maxX && mouseY >= minY && mouseY < maxY) { + float chance = recipe.getOutputChance(); + tooltip.add(junk); + tooltip.add(Lang.translate("recipe.processing.chance", chance < 0.01 ? "<1" : 100 - (int) (chance * 100)) + .formatted(TextFormatting.GOLD)); + return tooltip; + } + + minX = 55 + xOffset; + maxX = minX + 65; + minY = 92; + maxY = minY + 24; + if (willRepeat && mouseX >= minX && mouseX < maxX && mouseY >= minY && mouseY < maxY) { + tooltip.add(Lang.translate("recipe.assembly.repeat", recipe.getLoops())); + return tooltip; + } + + if (mouseY > 5 && mouseY < 84) { + int width = 0; + int margin = 3; + for (SequencedRecipe sequencedRecipe : recipe.getSequence()) + width += getSubCategory(sequencedRecipe).getWidth() + margin; + width -= margin; + xOffset = width / 2 + getBackground().getWidth() / -2; + + double relativeX = mouseX + xOffset; + List> sequence = recipe.getSequence(); + for (int i = 0; i < sequence.size(); i++) { + SequencedRecipe sequencedRecipe = sequence.get(i); + SequencedAssemblySubCategory subCategory = getSubCategory(sequencedRecipe); + if (relativeX >= 0 && relativeX < subCategory.getWidth()) { + tooltip.add(Lang.translate("recipe.assembly.step", i + 1)); + tooltip.add(sequencedRecipe.getAsAssemblyRecipe() + .getDescriptionForAssembly() + .copy() + .formatted(TextFormatting.DARK_GREEN)); + return tooltip; + } + relativeX -= subCategory.getWidth() + margin; + } + } + + return tooltip; + } + + private List getAllFluidIngredients(SequencedAssemblyRecipe recipe) { + List assemblyFluidIngredients = new ArrayList<>(); + recipe.addAdditionalFluidIngredients(assemblyFluidIngredients); + return assemblyFluidIngredients; + } + + private List getAllItemIngredients(SequencedAssemblyRecipe recipe) { + List assemblyIngredients = new ArrayList<>(); + assemblyIngredients.add(recipe.getIngredient()); + assemblyIngredients.add(Ingredient.fromStacks(recipe.getTransitionalItem())); + recipe.addAdditionalIngredients(assemblyIngredients); + return assemblyIngredients; + } + +} diff --git a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedDeployer.java b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedDeployer.java index b71bcd27b..8e5faedab 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedDeployer.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedDeployer.java @@ -31,7 +31,7 @@ public class AnimatedDeployer extends AnimatedKinetics { .scale(scale) .render(matrixStack); - float cycle = AnimationTickHolder.getRenderTime() % 30; + float cycle = (AnimationTickHolder.getRenderTime() - offset * 8) % 30; float offset = cycle < 10 ? cycle / 10f : cycle < 20 ? (20 - cycle) / 10f : 0; matrixStack.push(); diff --git a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedKinetics.java b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedKinetics.java index 3aec8dd85..a07c37fd8 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedKinetics.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedKinetics.java @@ -14,6 +14,8 @@ import net.minecraft.state.properties.BlockStateProperties; import net.minecraft.util.Direction.Axis; public abstract class AnimatedKinetics implements IDrawable { + + public int offset = 0; public static final ILightingSettings DEFAULT_LIGHTING = CustomLightingSettings.builder() .firstLightRotation(12.5f, 45.0f) diff --git a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedPress.java b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedPress.java index 5ca8f159d..7f1b7dca0 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedPress.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedPress.java @@ -48,7 +48,7 @@ public class AnimatedPress extends AnimatedKinetics { } private float getAnimatedHeadOffset() { - float cycle = (AnimationTickHolder.getRenderTime()) % 30; + float cycle = (AnimationTickHolder.getRenderTime() - offset * 8) % 30; if (cycle < 10) { float progress = cycle / 10; return -(progress * progress * progress); diff --git a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedSaw.java b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedSaw.java index b92e8cd2a..1b051efd3 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedSaw.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedSaw.java @@ -4,7 +4,6 @@ import com.mojang.blaze3d.matrix.MatrixStack; import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllBlocks; import com.simibubi.create.content.contraptions.components.saw.SawBlock; -import com.simibubi.create.foundation.gui.AllGuiTextures; import net.minecraft.util.Direction; import net.minecraft.util.Direction.Axis; @@ -16,12 +15,10 @@ public class AnimatedSaw extends AnimatedKinetics { public void draw(MatrixStack matrixStack, int xOffset, int yOffset) { matrixStack.push(); matrixStack.translate(xOffset, yOffset, 0); - AllGuiTextures.JEI_SHADOW.draw(matrixStack, -16, 13); - matrixStack.translate(0, 0, 200); - matrixStack.translate(29, 17, 0); - matrixStack.multiply(Vector3f.POSITIVE_X.getDegreesQuaternion(-22.5f)); - matrixStack.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(90 - 225f)); + matrixStack.translate(2, 22, 0); + matrixStack.multiply(Vector3f.POSITIVE_X.getDegreesQuaternion(-15.5f)); + matrixStack.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(22.5f + 90)); int scale = 25; defaultBlockElement(shaft(Axis.X)) diff --git a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedSpout.java b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedSpout.java index 1f412683d..6d812aab3 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedSpout.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedSpout.java @@ -36,7 +36,7 @@ public class AnimatedSpout extends AnimatedKinetics { .scale(scale) .render(matrixStack); - float cycle = AnimationTickHolder.getRenderTime() % 30; + float cycle = (AnimationTickHolder.getRenderTime() - offset * 8) % 30; float squeeze = cycle < 20 ? MathHelper.sin((float) (cycle / 20f * Math.PI)) : 0; squeeze *= 20; diff --git a/src/main/java/com/simibubi/create/compat/jei/category/sequencedAssembly/SequencedAssemblySubCategory.java b/src/main/java/com/simibubi/create/compat/jei/category/sequencedAssembly/SequencedAssemblySubCategory.java new file mode 100644 index 000000000..15a078376 --- /dev/null +++ b/src/main/java/com/simibubi/create/compat/jei/category/sequencedAssembly/SequencedAssemblySubCategory.java @@ -0,0 +1,154 @@ +package com.simibubi.create.compat.jei.category.sequencedAssembly; + +import java.util.Arrays; +import java.util.Collections; + +import com.google.common.collect.ImmutableList; +import com.mojang.blaze3d.matrix.MatrixStack; +import com.simibubi.create.compat.jei.category.CreateRecipeCategory; +import com.simibubi.create.compat.jei.category.animations.AnimatedDeployer; +import com.simibubi.create.compat.jei.category.animations.AnimatedPress; +import com.simibubi.create.compat.jei.category.animations.AnimatedSaw; +import com.simibubi.create.compat.jei.category.animations.AnimatedSpout; +import com.simibubi.create.content.contraptions.itemAssembly.SequencedRecipe; +import com.simibubi.create.foundation.fluid.FluidIngredient; +import com.simibubi.create.foundation.gui.AllGuiTextures; + +import mezz.jei.api.gui.ingredient.IGuiFluidStackGroup; +import mezz.jei.api.gui.ingredient.IGuiItemStackGroup; + +public abstract class SequencedAssemblySubCategory { + + private int width; + + public SequencedAssemblySubCategory(int width) { + this.width = width; + } + + public int getWidth() { + return width; + } + + public int addItemIngredients(SequencedRecipe recipe, IGuiItemStackGroup itemStacks, int x, int index) { + return 0; + } + + public int addFluidIngredients(SequencedRecipe recipe, IGuiFluidStackGroup fluidStacks, int x, int index) { + return 0; + } + + public abstract void draw(SequencedRecipe recipe, MatrixStack ms, double mouseX, double mouseY, int index); + + public static class AssemblyPressing extends SequencedAssemblySubCategory { + + AnimatedPress press; + + public AssemblyPressing() { + super(25); + press = new AnimatedPress(false); + } + + @Override + public void draw(SequencedRecipe recipe, MatrixStack ms, double mouseX, double mouseY, int index) { + press.offset = index; + ms.push(); + ms.translate(-5, 50, 0); + ms.scale(.6f, .6f, .6f); + press.draw(ms, getWidth() / 2, 0); + ms.pop(); + } + + } + + public static class AssemblySpouting extends SequencedAssemblySubCategory { + + AnimatedSpout spout; + + public AssemblySpouting() { + super(25); + spout = new AnimatedSpout(); + } + + @Override + public int addFluidIngredients(SequencedRecipe recipe, IGuiFluidStackGroup fluidStacks, int x, int index) { + FluidIngredient fluidIngredient = recipe.getRecipe() + .getFluidIngredients() + .get(0); + fluidStacks.init(index, true, x + 4, 15); + fluidStacks.set(index, + CreateRecipeCategory.withImprovedVisibility(fluidIngredient.getMatchingFluidStacks())); + CreateRecipeCategory.addFluidTooltip(fluidStacks, ImmutableList.of(fluidIngredient), + Collections.emptyList(), index); + return 1; + } + + @Override + public void draw(SequencedRecipe recipe, MatrixStack ms, double mouseX, double mouseY, int index) { + spout.offset = index; + AllGuiTextures.JEI_SLOT.draw(ms, 3, 14); + ms.push(); + ms.translate(-7, 50, 0); + ms.scale(.75f, .75f, .75f); + spout.withFluids(recipe.getRecipe() + .getFluidIngredients() + .get(0) + .getMatchingFluidStacks()) + .draw(ms, getWidth() / 2, 0); + ms.pop(); + } + + } + + public static class AssemblyDeploying extends SequencedAssemblySubCategory { + + AnimatedDeployer deployer; + + public AssemblyDeploying() { + super(25); + deployer = new AnimatedDeployer(); + } + + @Override + public int addItemIngredients(SequencedRecipe recipe, IGuiItemStackGroup itemStacks, int x, int index) { + itemStacks.init(index, true, x + 3, 14); + itemStacks.set(index, Arrays.asList(recipe.getRecipe() + .getIngredients() + .get(1) + .getMatchingStacks())); + return 1; + } + + @Override + public void draw(SequencedRecipe recipe, MatrixStack ms, double mouseX, double mouseY, int index) { + deployer.offset = index; + AllGuiTextures.JEI_SLOT.draw(ms, 3, 14); + ms.push(); + ms.translate(-7, 50, 0); + ms.scale(.75f, .75f, .75f); + deployer.draw(ms, getWidth() / 2, 0); + ms.pop(); + } + + } + + public static class AssemblyCutting extends SequencedAssemblySubCategory { + + AnimatedSaw saw; + + public AssemblyCutting() { + super(25); + saw = new AnimatedSaw(); + } + + @Override + public void draw(SequencedRecipe recipe, MatrixStack ms, double mouseX, double mouseY, int index) { + ms.push(); + ms.translate(0, 51.5f, 0); + ms.scale(.6f, .6f, .6f); + saw.draw(ms, getWidth() / 2, 30); + ms.pop(); + } + + } + +} diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerApplicationRecipe.java b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerApplicationRecipe.java index 64bc7093f..2fd87d4a6 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerApplicationRecipe.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerApplicationRecipe.java @@ -1,11 +1,14 @@ package com.simibubi.create.content.contraptions.components.deployer; import java.util.List; +import java.util.function.Supplier; import java.util.stream.Collectors; import com.simibubi.create.AllItems; import com.simibubi.create.AllRecipeTypes; import com.simibubi.create.Create; +import com.simibubi.create.compat.jei.category.sequencedAssembly.SequencedAssemblySubCategory; +import com.simibubi.create.content.contraptions.itemAssembly.IAssemblyRecipe; import com.simibubi.create.content.contraptions.processing.ProcessingRecipe; import com.simibubi.create.content.contraptions.processing.ProcessingRecipeBuilder; import com.simibubi.create.content.contraptions.processing.ProcessingRecipeBuilder.ProcessingRecipeParams; @@ -22,7 +25,7 @@ import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.items.wrapper.RecipeWrapper; -public class DeployerApplicationRecipe extends ProcessingRecipe { +public class DeployerApplicationRecipe extends ProcessingRecipe implements IAssemblyRecipe { public DeployerApplicationRecipe(ProcessingRecipeParams params) { super(AllRecipeTypes.DEPLOYING, params); @@ -70,10 +73,10 @@ public class DeployerApplicationRecipe extends ProcessingRecipe { } @Override - public boolean supportsAssembly() { - return true; + public void addAssemblyIngredients(List list) { + list.add(ingredients.get(1)); } - + @Override @OnlyIn(Dist.CLIENT) public ITextComponent getDescriptionForAssembly() { @@ -84,5 +87,10 @@ public class DeployerApplicationRecipe extends ProcessingRecipe { return Lang.translate("recipe.assembly.deploying_item", new TranslationTextComponent(matchingStacks[0].getTranslationKey()).getString()); } + + @Override + public Supplier> getJEISubCategory() { + return () -> SequencedAssemblySubCategory.AssemblyDeploying::new; + } } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/press/PressingRecipe.java b/src/main/java/com/simibubi/create/content/contraptions/components/press/PressingRecipe.java index 82d9dd597..e6adcc1c2 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/press/PressingRecipe.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/press/PressingRecipe.java @@ -1,12 +1,18 @@ package com.simibubi.create.content.contraptions.components.press; +import java.util.List; +import java.util.function.Supplier; + import javax.annotation.ParametersAreNonnullByDefault; import com.simibubi.create.AllRecipeTypes; +import com.simibubi.create.compat.jei.category.sequencedAssembly.SequencedAssemblySubCategory; +import com.simibubi.create.content.contraptions.itemAssembly.IAssemblyRecipe; import com.simibubi.create.content.contraptions.processing.ProcessingRecipe; import com.simibubi.create.content.contraptions.processing.ProcessingRecipeBuilder.ProcessingRecipeParams; import com.simibubi.create.foundation.utility.Lang; +import net.minecraft.item.crafting.Ingredient; import net.minecraft.util.text.ITextComponent; import net.minecraft.world.World; import net.minecraftforge.api.distmarker.Dist; @@ -14,7 +20,7 @@ import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.items.wrapper.RecipeWrapper; @ParametersAreNonnullByDefault -public class PressingRecipe extends ProcessingRecipe { +public class PressingRecipe extends ProcessingRecipe implements IAssemblyRecipe { public PressingRecipe(ProcessingRecipeParams params) { super(AllRecipeTypes.PRESSING, params); @@ -39,14 +45,17 @@ public class PressingRecipe extends ProcessingRecipe { } @Override - public boolean supportsAssembly() { - return true; - } + public void addAssemblyIngredients(List list) {} @Override @OnlyIn(Dist.CLIENT) public ITextComponent getDescriptionForAssembly() { return Lang.translate("recipe.assembly.pressing"); } + + @Override + public Supplier> getJEISubCategory() { + return () -> SequencedAssemblySubCategory.AssemblyPressing::new; + } } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/saw/CuttingRecipe.java b/src/main/java/com/simibubi/create/content/contraptions/components/saw/CuttingRecipe.java index b368d0508..a49e9ffd8 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/saw/CuttingRecipe.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/saw/CuttingRecipe.java @@ -1,12 +1,18 @@ package com.simibubi.create.content.contraptions.components.saw; +import java.util.List; +import java.util.function.Supplier; + import javax.annotation.ParametersAreNonnullByDefault; import com.simibubi.create.AllRecipeTypes; +import com.simibubi.create.compat.jei.category.sequencedAssembly.SequencedAssemblySubCategory; +import com.simibubi.create.content.contraptions.itemAssembly.IAssemblyRecipe; import com.simibubi.create.content.contraptions.processing.ProcessingRecipe; import com.simibubi.create.content.contraptions.processing.ProcessingRecipeBuilder.ProcessingRecipeParams; import com.simibubi.create.foundation.utility.Lang; +import net.minecraft.item.crafting.Ingredient; import net.minecraft.util.text.ITextComponent; import net.minecraft.world.World; import net.minecraftforge.api.distmarker.Dist; @@ -14,7 +20,7 @@ import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.items.wrapper.RecipeWrapper; @ParametersAreNonnullByDefault -public class CuttingRecipe extends ProcessingRecipe { +public class CuttingRecipe extends ProcessingRecipe implements IAssemblyRecipe { public CuttingRecipe(ProcessingRecipeParams params) { super(AllRecipeTypes.CUTTING, params); @@ -27,7 +33,7 @@ public class CuttingRecipe extends ProcessingRecipe { return ingredients.get(0) .test(inv.getStackInSlot(0)); } - + @Override protected int getMaxInputCount() { return 1; @@ -37,16 +43,19 @@ public class CuttingRecipe extends ProcessingRecipe { protected int getMaxOutputCount() { return 4; } - + @Override - public boolean supportsAssembly() { - return true; - } + public void addAssemblyIngredients(List list) {} @Override @OnlyIn(Dist.CLIENT) public ITextComponent getDescriptionForAssembly() { return Lang.translate("recipe.assembly.cutting"); } + + @Override + public Supplier> getJEISubCategory() { + return () -> SequencedAssemblySubCategory.AssemblyCutting::new; + } } diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/FillingRecipe.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/FillingRecipe.java index d8dea5920..b52dee1c0 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/FillingRecipe.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/FillingRecipe.java @@ -1,13 +1,17 @@ package com.simibubi.create.content.contraptions.fluids.actors; import java.util.List; +import java.util.function.Supplier; import com.simibubi.create.AllRecipeTypes; +import com.simibubi.create.compat.jei.category.sequencedAssembly.SequencedAssemblySubCategory; +import com.simibubi.create.content.contraptions.itemAssembly.IAssemblyRecipe; import com.simibubi.create.content.contraptions.processing.ProcessingRecipe; import com.simibubi.create.content.contraptions.processing.ProcessingRecipeBuilder.ProcessingRecipeParams; import com.simibubi.create.foundation.fluid.FluidIngredient; import com.simibubi.create.foundation.utility.Lang; +import net.minecraft.item.crafting.Ingredient; import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.StringTextComponent; import net.minecraft.util.text.TranslationTextComponent; @@ -17,7 +21,7 @@ import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.items.wrapper.RecipeWrapper; -public class FillingRecipe extends ProcessingRecipe { +public class FillingRecipe extends ProcessingRecipe implements IAssemblyRecipe { public FillingRecipe(ProcessingRecipeParams params) { super(AllRecipeTypes.FILLING, params); @@ -51,8 +55,11 @@ public class FillingRecipe extends ProcessingRecipe { } @Override - public boolean supportsAssembly() { - return true; + public void addAssemblyIngredients(List list) {} + + @Override + public void addAssemblyFluidIngredients(List list) { + list.add(getRequiredFluid()); } @Override @@ -66,5 +73,10 @@ public class FillingRecipe extends ProcessingRecipe { new TranslationTextComponent(matchingFluidStacks.get(0) .getTranslationKey()).getString()); } + + @Override + public Supplier> getJEISubCategory() { + return () -> SequencedAssemblySubCategory.AssemblySpouting::new; + } } diff --git a/src/main/java/com/simibubi/create/content/contraptions/itemAssembly/IAssemblyRecipe.java b/src/main/java/com/simibubi/create/content/contraptions/itemAssembly/IAssemblyRecipe.java new file mode 100644 index 000000000..62d84c7c9 --- /dev/null +++ b/src/main/java/com/simibubi/create/content/contraptions/itemAssembly/IAssemblyRecipe.java @@ -0,0 +1,29 @@ +package com.simibubi.create.content.contraptions.itemAssembly; + +import java.util.List; +import java.util.function.Supplier; + +import com.simibubi.create.compat.jei.category.sequencedAssembly.SequencedAssemblySubCategory; +import com.simibubi.create.foundation.fluid.FluidIngredient; + +import net.minecraft.item.crafting.Ingredient; +import net.minecraft.util.text.ITextComponent; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; + +public interface IAssemblyRecipe { + + default boolean supportsAssembly() { + return true; + } + + @OnlyIn(Dist.CLIENT) + public ITextComponent getDescriptionForAssembly(); + + public void addAssemblyIngredients(List list); + + default void addAssemblyFluidIngredients(List list) {} + + public Supplier> getJEISubCategory(); + +} diff --git a/src/main/java/com/simibubi/create/content/contraptions/itemAssembly/SequencedAssemblyItem.java b/src/main/java/com/simibubi/create/content/contraptions/itemAssembly/SequencedAssemblyItem.java new file mode 100644 index 000000000..b8571fded --- /dev/null +++ b/src/main/java/com/simibubi/create/content/contraptions/itemAssembly/SequencedAssemblyItem.java @@ -0,0 +1,42 @@ +package com.simibubi.create.content.contraptions.itemAssembly; + +import com.simibubi.create.foundation.utility.ColorHelper; + +import net.minecraft.item.Item; +import net.minecraft.item.ItemGroup; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.util.NonNullList; +import net.minecraft.util.math.MathHelper; + +public class SequencedAssemblyItem extends Item { + + public SequencedAssemblyItem(Properties p_i48487_1_) { + super(p_i48487_1_); + } + + @Override + public void fillItemGroup(ItemGroup p_150895_1_, NonNullList p_150895_2_) {} + + @Override + public double getDurabilityForDisplay(ItemStack stack) { + if (!stack.hasTag()) + return 1; + CompoundNBT tag = stack.getTag(); + if (!tag.contains("SequencedAssembly")) + return 1; + return MathHelper.lerp(tag.getCompound("SequencedAssembly") + .getFloat("Progress"), 1, 0); + } + + @Override + public boolean showDurabilityBar(ItemStack stack) { + return true; + } + + @Override + public int getRGBDurabilityForDisplay(ItemStack stack) { + return ColorHelper.mixColors(0xFF_46FFE0, 0xFF_FFC074, (float) getDurabilityForDisplay(stack)); + } + +} diff --git a/src/main/java/com/simibubi/create/content/contraptions/itemAssembly/SequencedAssemblyRecipe.java b/src/main/java/com/simibubi/create/content/contraptions/itemAssembly/SequencedAssemblyRecipe.java index 296387f64..4b8eea67c 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/itemAssembly/SequencedAssemblyRecipe.java +++ b/src/main/java/com/simibubi/create/content/contraptions/itemAssembly/SequencedAssemblyRecipe.java @@ -8,6 +8,7 @@ import com.simibubi.create.AllRecipeTypes; import com.simibubi.create.Create; import com.simibubi.create.content.contraptions.processing.ProcessingOutput; import com.simibubi.create.content.contraptions.processing.ProcessingRecipe; +import com.simibubi.create.foundation.fluid.FluidIngredient; import com.simibubi.create.foundation.utility.Lang; import net.minecraft.client.Minecraft; @@ -35,8 +36,7 @@ public class SequencedAssemblyRecipe implements IRecipe { Ingredient ingredient; List> sequence; - int averageSteps; - int maxSteps; + int loops; ProcessingOutput transitionalItem; List resultPool; @@ -45,8 +45,7 @@ public class SequencedAssemblyRecipe implements IRecipe { this.serializer = serializer; sequence = new ArrayList<>(); resultPool = new ArrayList<>(); - averageSteps = 16; - maxSteps = 32; + loops = 5; } public static > Optional getRecipe(World world, C inv, @@ -62,32 +61,45 @@ public class SequencedAssemblyRecipe implements IRecipe { if (!sequencedAssemblyRecipe.appliesTo(item)) continue; SequencedRecipe nextRecipe = sequencedAssemblyRecipe.getNextRecipe(item); - if (nextRecipe.wrapped.getType() != type || !recipeClass.isInstance(nextRecipe.wrapped)) + ProcessingRecipe recipe = nextRecipe.getRecipe(); + if (recipe.getType() != type || !recipeClass.isInstance(recipe)) continue; - nextRecipe.wrapped.enforceNextResult(() -> sequencedAssemblyRecipe.advance(item)); - return Optional.of(recipeClass.cast(nextRecipe.wrapped)); + recipe.enforceNextResult(() -> sequencedAssemblyRecipe.advance(item)); + return Optional.of(recipeClass.cast(recipe)); } return Optional.empty(); } private ItemStack advance(ItemStack input) { int step = getStep(input); - if (step >= sequence.size()) { - float chance = 1f / (averageSteps - sequence.size()); - if (step >= maxSteps || Create.RANDOM.nextFloat() < chance) - return rollResult(); - } + if ((step + 1) / sequence.size() >= loops) + return rollResult(); - ItemStack advancedItem = ItemHandlerHelper.copyStackWithSize(transitionalItem.getStack(), 1); + ItemStack advancedItem = ItemHandlerHelper.copyStackWithSize(getTransitionalItem(), 1); CompoundNBT itemTag = advancedItem.getOrCreateTag(); CompoundNBT tag = new CompoundNBT(); tag.putString("id", id.toString()); tag.putInt("Step", step + 1); + tag.putFloat("Progress", (step + 1f) / (sequence.size() * loops)); itemTag.put("SequencedAssembly", tag); advancedItem.setTag(itemTag); return advancedItem; } + public int getLoops() { + return loops; + } + + public void addAdditionalIngredients(List list) { + sequence.forEach(sr -> sr.getAsAssemblyRecipe() + .addAssemblyIngredients(list)); + } + + public void addAdditionalFluidIngredients(List list) { + sequence.forEach(sr -> sr.getAsAssemblyRecipe() + .addAssemblyFluidIngredients(list)); + } + private ItemStack rollResult() { float totalWeight = 0; for (ProcessingOutput entry : resultPool) @@ -105,10 +117,8 @@ public class SequencedAssemblyRecipe implements IRecipe { private boolean appliesTo(ItemStack input) { if (ingredient.test(input)) return true; - return input.hasTag() && transitionalItem.getStack() - .getItem() == input.getItem() && input.getTag() - .contains("SequencedAssembly") - && input.getTag() + return input.hasTag() && getTransitionalItem().getItem() == input.getItem() && input.getTag() + .contains("SequencedAssembly") && input.getTag() .getCompound("SequencedAssembly") .getString("id") .equals(id.toString()); @@ -150,6 +160,14 @@ public class SequencedAssemblyRecipe implements IRecipe { .getStack(); } + public float getOutputChance() { + float totalWeight = 0; + for (ProcessingOutput entry : resultPool) + totalWeight += entry.getChance(); + return resultPool.get(0) + .getChance() / totalWeight; + } + @Override public ResourceLocation getId() { return id; @@ -182,15 +200,22 @@ public class SequencedAssemblyRecipe implements IRecipe { return; SequencedAssemblyRecipe sequencedAssemblyRecipe = (SequencedAssemblyRecipe) iRecipe; + int length = sequencedAssemblyRecipe.sequence.size(); + int step = sequencedAssemblyRecipe.getStep(stack); + int total = length * sequencedAssemblyRecipe.loops; toolTip.add(new StringTextComponent("")); toolTip.add(Lang.translate("recipe.sequenced_assembly") .formatted(TextFormatting.GRAY)); - int step = sequencedAssemblyRecipe.getStep(stack); + toolTip.add(Lang.translate("recipe.assembly.progress", step, total) + .formatted(TextFormatting.DARK_GRAY)); - for (int i = 0; i < sequencedAssemblyRecipe.sequence.size(); i++) { - SequencedRecipe sequencedRecipe = - sequencedAssemblyRecipe.sequence.get((i + step) % sequencedAssemblyRecipe.sequence.size()); - ITextComponent textComponent = sequencedRecipe.wrapped.getDescriptionForAssembly(); + int remaining = total - step; + for (int i = 0; i < length; i++) { + if (i >= remaining) + break; + SequencedRecipe sequencedRecipe = sequencedAssemblyRecipe.sequence.get((i + step) % length); + ITextComponent textComponent = sequencedRecipe.getAsAssemblyRecipe() + .getDescriptionForAssembly(); if (i == 0) toolTip.add(Lang.translate("recipe.assembly.next", textComponent) .formatted(TextFormatting.AQUA)); @@ -201,4 +226,16 @@ public class SequencedAssemblyRecipe implements IRecipe { } + public Ingredient getIngredient() { + return ingredient; + } + + public List> getSequence() { + return sequence; + } + + public ItemStack getTransitionalItem() { + return transitionalItem.getStack(); + } + } diff --git a/src/main/java/com/simibubi/create/content/contraptions/itemAssembly/SequencedAssemblyRecipeBuilder.java b/src/main/java/com/simibubi/create/content/contraptions/itemAssembly/SequencedAssemblyRecipeBuilder.java index 5a627281c..756209811 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/itemAssembly/SequencedAssemblyRecipeBuilder.java +++ b/src/main/java/com/simibubi/create/content/contraptions/itemAssembly/SequencedAssemblyRecipeBuilder.java @@ -41,11 +41,12 @@ public class SequencedAssemblyRecipeBuilder { UnaryOperator> builder) { ProcessingRecipeBuilder recipeBuilder = new ProcessingRecipeBuilder<>(factory, new ResourceLocation("dummy")); - Item placeHolder = recipe.transitionalItem.getStack() + Item placeHolder = recipe.getTransitionalItem() .getItem(); - recipe.sequence.add(new SequencedRecipe<>(builder.apply(recipeBuilder.require(placeHolder) - .output(placeHolder)) - .build())); + recipe.getSequence() + .add(new SequencedRecipe<>(builder.apply(recipeBuilder.require(placeHolder) + .output(placeHolder)) + .build())); return this; } @@ -67,13 +68,8 @@ public class SequencedAssemblyRecipeBuilder { return this; } - public SequencedAssemblyRecipeBuilder expectedSteps(int average) { - return expectedStepsAndMax(average, (int) (average * 1.5)); - } - - public SequencedAssemblyRecipeBuilder expectedStepsAndMax(int average, int max) { - recipe.averageSteps = average; - recipe.maxSteps = max; + public SequencedAssemblyRecipeBuilder loops(int loops) { + recipe.loops = loops; return this; } diff --git a/src/main/java/com/simibubi/create/content/contraptions/itemAssembly/SequencedAssemblyRecipeSerializer.java b/src/main/java/com/simibubi/create/content/contraptions/itemAssembly/SequencedAssemblyRecipeSerializer.java index 3226fce52..d7c922399 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/itemAssembly/SequencedAssemblyRecipeSerializer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/itemAssembly/SequencedAssemblyRecipeSerializer.java @@ -20,14 +20,13 @@ public class SequencedAssemblyRecipeSerializer extends ForgeRegistryEntry nestedRecipes.add(i.toJson())); + json.add("ingredient", recipe.getIngredient().serialize()); + recipe.getSequence().forEach(i -> nestedRecipes.add(i.toJson())); recipe.resultPool.forEach(p -> results.add(p.serialize())); json.add("transitionalItem", recipe.transitionalItem.serialize()); json.add("sequence", nestedRecipes); json.add("results", results); - json.addProperty("averageSteps", recipe.averageSteps); - json.addProperty("maxSteps", recipe.maxSteps); + json.addProperty("loops", recipe.loops); } protected SequencedAssemblyRecipe readFromJson(ResourceLocation recipeId, JsonObject json) { @@ -36,27 +35,22 @@ public class SequencedAssemblyRecipeSerializer extends ForgeRegistryEntry sr.writeToBuffer(buffer)); + recipe.getIngredient().write(buffer); + buffer.writeVarInt(recipe.getSequence().size()); + recipe.getSequence().forEach(sr -> sr.writeToBuffer(buffer)); buffer.writeVarInt(recipe.resultPool.size()); recipe.resultPool.forEach(sr -> sr.write(buffer)); recipe.transitionalItem.write(buffer); - buffer.writeInt(recipe.averageSteps); - buffer.writeInt(recipe.maxSteps); + buffer.writeInt(recipe.loops); } protected SequencedAssemblyRecipe readFromBuffer(ResourceLocation recipeId, PacketBuffer buffer) { @@ -64,13 +58,12 @@ public class SequencedAssemblyRecipeSerializer extends ForgeRegistryEntry> { - T wrapped; + private T wrapped; public SequencedRecipe(T wrapped) { this.wrapped = wrapped; } + public IAssemblyRecipe getAsAssemblyRecipe() { + return (IAssemblyRecipe) wrapped; + } + + public ProcessingRecipe getRecipe() { + return wrapped; + } + public JsonObject toJson() { @SuppressWarnings("unchecked") ProcessingRecipeSerializer serializer = (ProcessingRecipeSerializer) wrapped.getSerializer(); @@ -36,12 +44,13 @@ public class SequencedRecipe> { ResourceLocation parentId = parent.getId(); IRecipe recipe = RecipeManager.deserializeRecipe( new ResourceLocation(parentId.getNamespace(), parentId.getPath() + "_step_" + index), json); - if (recipe instanceof ProcessingRecipe) { + if (recipe instanceof ProcessingRecipe && recipe instanceof IAssemblyRecipe) { ProcessingRecipe processingRecipe = (ProcessingRecipe) recipe; - if (processingRecipe.supportsAssembly()) { - Ingredient transit = Ingredient.fromStacks(parent.transitionalItem.getStack()); + IAssemblyRecipe assemblyRecipe = (IAssemblyRecipe) recipe; + if (assemblyRecipe.supportsAssembly()) { + Ingredient transit = Ingredient.fromStacks(parent.getTransitionalItem()); processingRecipe.getIngredients() - .set(0, index == 0 ? Ingredient.merge(ImmutableList.of(transit, parent.ingredient)) : transit); + .set(0, index == 0 ? Ingredient.merge(ImmutableList.of(transit, parent.getIngredient())) : transit); SequencedRecipe sequencedRecipe = new SequencedRecipe<>(processingRecipe); return sequencedRecipe; } diff --git a/src/main/java/com/simibubi/create/content/contraptions/processing/ProcessingRecipe.java b/src/main/java/com/simibubi/create/content/contraptions/processing/ProcessingRecipe.java index 836be4ad3..e3b90a337 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/processing/ProcessingRecipe.java +++ b/src/main/java/com/simibubi/create/content/contraptions/processing/ProcessingRecipe.java @@ -27,10 +27,6 @@ import net.minecraft.item.crafting.Ingredient; import net.minecraft.network.PacketBuffer; import net.minecraft.util.NonNullList; import net.minecraft.util.ResourceLocation; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.StringTextComponent; -import net.minecraftforge.api.distmarker.Dist; -import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.fluids.FluidStack; @MethodsReturnNonnullByDefault @@ -231,13 +227,4 @@ public abstract class ProcessingRecipe implements IRecipe< return enumType; } - public boolean supportsAssembly() { - return false; - } - - @OnlyIn(Dist.CLIENT) - public ITextComponent getDescriptionForAssembly() { - return new StringTextComponent(""); - } - } diff --git a/src/main/java/com/simibubi/create/foundation/advancement/AllAdvancements.java b/src/main/java/com/simibubi/create/foundation/advancement/AllAdvancements.java index 76519a4c7..f6a4793c1 100644 --- a/src/main/java/com/simibubi/create/foundation/advancement/AllAdvancements.java +++ b/src/main/java/com/simibubi/create/foundation/advancement/AllAdvancements.java @@ -335,11 +335,11 @@ public class AllAdvancements implements IDataProvider { .register(t, id + ":overstress_flywheel"); Advancement integrated_circuit = - itemAdvancement("integrated_circuit", AllItems.CLOCKWORK_ELEMENT, TaskType.NORMAL).withParent(crafter) + itemAdvancement("integrated_circuit", AllItems.CLOCKWORK_COMPONENT, TaskType.NORMAL).withParent(crafter) .register(t, id + ":integrated_circuit"); Advancement integrated_circuit_eob = deadEnd().withParent(integrated_circuit) - .withCriterion("0", itemGathered(AllItems.CLOCKWORK_ELEMENT.get())) + .withCriterion("0", itemGathered(AllItems.CLOCKWORK_COMPONENT.get())) .register(t, id + ":integrated_circuit_eob"); Advancement speed_controller = diff --git a/src/main/java/com/simibubi/create/foundation/data/recipe/CreateRecipeProvider.java b/src/main/java/com/simibubi/create/foundation/data/recipe/CreateRecipeProvider.java index f8843a0bf..220862999 100644 --- a/src/main/java/com/simibubi/create/foundation/data/recipe/CreateRecipeProvider.java +++ b/src/main/java/com/simibubi/create/foundation/data/recipe/CreateRecipeProvider.java @@ -98,6 +98,10 @@ public abstract class CreateRecipeProvider extends RecipeProvider { static ITag.INamedTag iron() { return Tags.Items.INGOTS_IRON; } + + static ITag.INamedTag ironNugget() { + return AllTags.forgeItemTag("nuggets/iron"); + } static ITag.INamedTag zinc() { return AllTags.forgeItemTag("ingots/zinc"); @@ -116,7 +120,7 @@ public abstract class CreateRecipeProvider extends RecipeProvider { } static IItemProvider circuit() { - return AllItems.CLOCKWORK_ELEMENT.get(); + return AllItems.CLOCKWORK_COMPONENT.get(); } static ITag.INamedTag copperBlock() { diff --git a/src/main/java/com/simibubi/create/foundation/data/recipe/SequencedAssemblyRecipeGen.java b/src/main/java/com/simibubi/create/foundation/data/recipe/SequencedAssemblyRecipeGen.java index 181a272a8..9fae5a6fa 100644 --- a/src/main/java/com/simibubi/create/foundation/data/recipe/SequencedAssemblyRecipeGen.java +++ b/src/main/java/com/simibubi/create/foundation/data/recipe/SequencedAssemblyRecipeGen.java @@ -6,31 +6,39 @@ import com.simibubi.create.AllBlocks; import com.simibubi.create.AllItems; import com.simibubi.create.Create; import com.simibubi.create.content.contraptions.components.deployer.DeployerApplicationRecipe; -import com.simibubi.create.content.contraptions.components.press.PressingRecipe; -import com.simibubi.create.content.contraptions.components.saw.CuttingRecipe; -import com.simibubi.create.content.contraptions.fluids.actors.FillingRecipe; import com.simibubi.create.content.contraptions.itemAssembly.SequencedAssemblyRecipeBuilder; import net.minecraft.data.DataGenerator; -import net.minecraft.fluid.Fluids; public class SequencedAssemblyRecipeGen extends CreateRecipeProvider { GeneratedRecipe - TEST = create("test", b -> b.require(I.goldSheet()) - .transitionTo(AllItems.INCOMPLETE_CLOCKWORK_ELEMENT.get()) - .addOutput(AllItems.CLOCKWORK_ELEMENT.get(), 10) - .addOutput(AllItems.GOLDEN_SHEET.get(), 5) +// TEST = create("test", b -> b.require(I.goldSheet()) +// .transitionTo(AllItems.INCOMPLETE_CLOCKWORK_COMPONENT.get()) +// .addOutput(AllItems.CLOCKWORK_COMPONENT.get(), 10) +// .addOutput(AllItems.GOLDEN_SHEET.get(), 5) +// .addOutput(AllItems.ANDESITE_ALLOY.get(), 2) +// .addOutput(AllBlocks.COGWHEEL.get(), 1) +// .loops(5) +// .addStep(DeployerApplicationRecipe::new, rb -> rb.require(I.cog())) +// .addStep(PressingRecipe::new, rb -> rb) +// .addStep(FillingRecipe::new, rb -> rb.require(Fluids.LAVA, 500)) +// .addStep(CuttingRecipe::new, rb -> rb.averageProcessingDuration()) +// .addStep(FillingRecipe::new, rb -> rb.require(Fluids.WATER, 100)) +// ) + + CLOCKWORK_COMPONENT = create("clockwork_component", b -> b.require(I.goldSheet()) + .transitionTo(AllItems.INCOMPLETE_CLOCKWORK_COMPONENT.get()) + .addOutput(AllItems.CLOCKWORK_COMPONENT.get(), 12) + .addOutput(AllItems.GOLDEN_SHEET.get(), 2) .addOutput(AllItems.ANDESITE_ALLOY.get(), 2) - .addOutput(AllBlocks.COGWHEEL.get(), 1) - .expectedSteps(20) + .addOutput(AllBlocks.COGWHEEL.get(), 1) //TODO add more junk + .loops(5) .addStep(DeployerApplicationRecipe::new, rb -> rb.require(I.cog())) - .addStep(PressingRecipe::new, rb -> rb) .addStep(DeployerApplicationRecipe::new, rb -> rb.require(I.largeCog())) - .addStep(FillingRecipe::new, rb -> rb.require(Fluids.WATER, 100)) - .addStep(DeployerApplicationRecipe::new, rb -> rb.require(I.shaft())) - .addStep(CuttingRecipe::new, rb -> rb.averageProcessingDuration())) + .addStep(DeployerApplicationRecipe::new, rb -> rb.require(I.ironNugget())) + ) ; public SequencedAssemblyRecipeGen(DataGenerator p_i48262_1_) { diff --git a/src/main/resources/assets/create/lang/default/messages.json b/src/main/resources/assets/create/lang/default/messages.json index 5559152bc..f22e5b8ef 100644 --- a/src/main/resources/assets/create/lang/default/messages.json +++ b/src/main/resources/assets/create/lang/default/messages.json @@ -49,10 +49,14 @@ "create.recipe.sequenced_assembly": "Sequenced Assembly", "create.recipe.assembly.next": "Next: %1$s", + "create.recipe.assembly.step": "Step %1$s:", + "create.recipe.assembly.progress": "Progress: %1$s/%2$s", "create.recipe.assembly.pressing": "Process in Press", "create.recipe.assembly.spout_filling_fluid": "Spout %1$s", "create.recipe.assembly.deploying_item": "Deploy %1$s", "create.recipe.assembly.cutting": "Cut with Saw", + "create.recipe.assembly.repeat": "Repeat Sequence %1$s Times", + "create.recipe.assembly.junk": "Random junk", "create.recipe.processing.chance": "%1$s%% Chance", "create.recipe.heat_requirement.none": "No Heating Required", diff --git a/src/main/resources/assets/create/textures/item/clockwork_element.png b/src/main/resources/assets/create/textures/item/clockwork_component.png similarity index 100% rename from src/main/resources/assets/create/textures/item/clockwork_element.png rename to src/main/resources/assets/create/textures/item/clockwork_component.png diff --git a/src/main/resources/assets/create/textures/item/incomplete_clockwork_element.png b/src/main/resources/assets/create/textures/item/incomplete_clockwork_component.png similarity index 100% rename from src/main/resources/assets/create/textures/item/incomplete_clockwork_element.png rename to src/main/resources/assets/create/textures/item/incomplete_clockwork_component.png