From 65bacbde207c73d4b9b66bcdfc5299066972ffed Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Mon, 20 Jun 2022 21:48:54 +0200 Subject: [PATCH] Down the Checklist, Part I - Minor tweaks to blaze burner animation and timings - Increased Steam engines render distance - Fixed reversed tooltip for stress capacity - Modified stress capacity tooltips to show max achievable su - Fixed fluid tanks no longer able to support blocks like levers - Fixed fluid tanks no longer conducting redstone power - Fixed Players riding a mount standing on a contraption getting kicked for 'flying' - Simplified the Stressometer display source and added a Progress Bar option - Fixed PSIs not updating comparator state when disengaging - Fixed engaged PSIs flickering when another is placed nearby and within a contraption boundary - Fixed shaft placement assist not working on nor through an engine-powered shaft - Steam engines can now be reversed and will adjust the direction automatically when starting on a shaft which is already moving --- src/generated/resources/.cache/cache | 32 ++--- .../resources/assets/create/lang/en_us.json | 12 +- .../assets/create/lang/unfinished/de_de.json | 14 ++- .../assets/create/lang/unfinished/es_cl.json | 14 ++- .../assets/create/lang/unfinished/es_es.json | 14 ++- .../assets/create/lang/unfinished/fr_fr.json | 14 ++- .../assets/create/lang/unfinished/it_it.json | 14 ++- .../assets/create/lang/unfinished/ja_jp.json | 14 ++- .../assets/create/lang/unfinished/ko_kr.json | 14 ++- .../assets/create/lang/unfinished/nl_nl.json | 14 ++- .../assets/create/lang/unfinished/pl_pl.json | 14 ++- .../assets/create/lang/unfinished/pt_br.json | 14 ++- .../assets/create/lang/unfinished/pt_pt.json | 14 ++- .../assets/create/lang/unfinished/ro_ro.json | 14 ++- .../assets/create/lang/unfinished/ru_ru.json | 14 ++- .../assets/create/lang/unfinished/zh_cn.json | 14 ++- .../assets/create/lang/unfinished/zh_tw.json | 14 ++- .../java/com/simibubi/create/AllBlocks.java | 11 +- .../PortableStorageInterfaceTileEntity.java | 3 + .../components/crank/HandCrankBlock.java | 5 + .../components/crank/ValveHandleBlock.java | 5 + .../components/steam/PoweredShaftBlock.java | 25 +++- .../steam/PoweredShaftTileEntity.java | 19 ++- .../components/steam/SteamEngineBlock.java | 5 + .../components/steam/SteamEngineRenderer.java | 5 + .../steam/SteamEngineTileEntity.java | 30 ++++- .../components/steam/SteamEngineValueBox.java | 79 +++++++++++++ .../ContraptionCollider.java | 9 +- .../bearing/WindmillBearingBlock.java | 5 + .../bearing/WindmillBearingTileEntity.java | 2 +- .../waterwheel/WaterWheelBlock.java | 7 ++ .../fluids/tank/FluidTankBlock.java | 8 +- .../burner/BlazeBurnerRenderer.java | 4 +- .../burner/BlazeBurnerTileEntity.java | 2 +- .../relays/elementary/ShaftBlock.java | 8 +- .../source/KineticStressDisplaySource.java | 111 +++++++++--------- .../PercentOrProgressBarDisplaySource.java | 8 +- .../source/RedstonePowerDisplaySource.java | 6 +- .../foundation/block/BlockStressDefaults.java | 28 ++++- .../foundation/block/BlockStressValues.java | 13 +- .../create/foundation/config/CStress.java | 43 ++++--- .../foundation/data/BuilderTransformers.java | 2 + .../data/recipe/EmptyingRecipeGen.java | 3 +- .../data/recipe/FillingRecipeGen.java | 11 +- .../foundation/item/ItemDescription.java | 75 +++++------- .../assets/create/lang/default/interface.json | 12 +- 46 files changed, 539 insertions(+), 259 deletions(-) create mode 100644 src/main/java/com/simibubi/create/content/contraptions/components/steam/SteamEngineValueBox.java diff --git a/src/generated/resources/.cache/cache b/src/generated/resources/.cache/cache index 28f49ce63..a87184bc1 100644 --- a/src/generated/resources/.cache/cache +++ b/src/generated/resources/.cache/cache @@ -558,22 +558,22 @@ bf2b0310500213ff853c748c236eb5d01f61658e assets/create/blockstates/yellow_toolbo 7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json f85edc574ee6de0de7693ffb031266643db6724a assets/create/lang/en_ud.json -3389bcc76a6b6f090f22c087f0c95479e5507825 assets/create/lang/en_us.json -70bb9e6f8264c400c6f641dae8313a79af421adc assets/create/lang/unfinished/de_de.json -fb198125e80986e9660a9cb370cd82706a90bea3 assets/create/lang/unfinished/es_cl.json -fa791d50aa9d01566197305052a92c820e852ba0 assets/create/lang/unfinished/es_es.json -322dfdb1504993658b7c5c5dee22a8393c818501 assets/create/lang/unfinished/fr_fr.json -8e8cbd0c82957867dc90259ebd7a95f5b5c9dd70 assets/create/lang/unfinished/it_it.json -1d9a2e6db1abd0397e155b74f0364686aae52a12 assets/create/lang/unfinished/ja_jp.json -9161f628c9e3e33ce5e409f36685eed93d580113 assets/create/lang/unfinished/ko_kr.json -f88451bc8963fe7368e0c5aed71d8ea473bb34ef assets/create/lang/unfinished/nl_nl.json -fdea9ed14399ebed642fa544520ccd9acb5fbcbe assets/create/lang/unfinished/pl_pl.json -84d99d46413acfefdb3c4945de1eae8a8525e675 assets/create/lang/unfinished/pt_br.json -b95a8fa71094618776fa026e1d859251334a5698 assets/create/lang/unfinished/pt_pt.json -dc5a5b3dda1e294c9d10c6eaedbc6a0a9815615d assets/create/lang/unfinished/ro_ro.json -16be2263ee7db93868e84a8b8cfaa35c430828b4 assets/create/lang/unfinished/ru_ru.json -aef72e79454e1d2f6f6a43d26758086f12015935 assets/create/lang/unfinished/zh_cn.json -9c53051ed8bcaec04ab23d213d02e2595637a3e9 assets/create/lang/unfinished/zh_tw.json +57a2f5cfc09aac190e97fb9f2ca42b304fab5680 assets/create/lang/en_us.json +5dbd68efd854c32656011d3c3cd120a593a19bf8 assets/create/lang/unfinished/de_de.json +7be6eb18aef39f3f8221392653a3882a627233dd assets/create/lang/unfinished/es_cl.json +ecde05c35a44688bde60f641e7072b634c9e1d5b assets/create/lang/unfinished/es_es.json +dbbcf41cd1f79d7c2507219e0dc2b31638084299 assets/create/lang/unfinished/fr_fr.json +6afdfa1b7b94bc00b2ce9471d88290c44077a66f assets/create/lang/unfinished/it_it.json +18327c2775e14b3f9963718851b96a38f0c1da5b assets/create/lang/unfinished/ja_jp.json +71b6e7609551a6c1dcd74904ec08b4658e480593 assets/create/lang/unfinished/ko_kr.json +3d68851099b7a3da153b5348122554a868942274 assets/create/lang/unfinished/nl_nl.json +492b259e69a13d91e092f81ad2629ab0db9d0340 assets/create/lang/unfinished/pl_pl.json +13abb3643e0341ace3f95074215fe3d37482c74b assets/create/lang/unfinished/pt_br.json +273c495ef88363bc685d94e80b9bd09c4fe5cd16 assets/create/lang/unfinished/pt_pt.json +21c869ff5d2f076aa135c30a8c6de32cfd3529b0 assets/create/lang/unfinished/ro_ro.json +0a3f87d04dd6bd672039537df9710ce12ea84028 assets/create/lang/unfinished/ru_ru.json +f91a984ecda39e0dfdab621467289cfd48ad90de assets/create/lang/unfinished/zh_cn.json +19c9edd37eb2f911a60f815ff699766a6b5127a7 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 diff --git a/src/generated/resources/assets/create/lang/en_us.json b/src/generated/resources/assets/create/lang/en_us.json index 82fec239c..82169a8f5 100644 --- a/src/generated/resources/assets/create/lang/en_us.json +++ b/src/generated/resources/assets/create/lang/en_us.json @@ -1324,6 +1324,7 @@ "create.tooltip.stressImpact.medium": "Moderate", "create.tooltip.stressImpact.high": "High", "create.tooltip.stressImpact.overstressed": "Overstressed", + "create.tooltip.up_to": "Up to %1$s", "create.tooltip.capacityProvided": "Kinetic Stress Capacity: %1$s", "create.tooltip.capacityProvided.low": "Small", "create.tooltip.capacityProvided.medium": "Medium", @@ -1681,10 +1682,13 @@ "create.display_source.kinetic_speed": "Rotation Speed (RPM)", "create.display_source.kinetic_speed.absolute": "Ignore Direction", "create.display_source.kinetic_speed.directional": "Include Direction", - "create.display_source.kinetic_stress.current": "Stress Impact (Amount)", - "create.display_source.kinetic_stress.max": "Stress Capacity (Max)", - "create.display_source.kinetic_stress.percent": "Stress Impact (Percent)", - "create.display_source.kinetic_stress.remaining": "Stress Capacity (Remaining)", + "create.display_source.kinetic_stress": "Network Stress", + "create.display_source.kinetic_stress.display": "Displayed Info", + "create.display_source.kinetic_stress.progress_bar": "Progress Bar", + "create.display_source.kinetic_stress.percent": "Percentage", + "create.display_source.kinetic_stress.current": "Stress in SU", + "create.display_source.kinetic_stress.max": "Total Capacity", + "create.display_source.kinetic_stress.remaining": "Remaining SU", "create.display_source.redstone_power": "Redstone Power", "create.display_source.redstone_power.display": "Display Format", "create.display_source.redstone_power.number": "Number", 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 a9b2e8733..e217b5fb7 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: 1173", + "_": "Missing Localizations: 1177", "_": "->------------------------] Game Elements [------------------------<-", @@ -1325,6 +1325,7 @@ "create.tooltip.stressImpact.medium": "Moderat", "create.tooltip.stressImpact.high": "Hoch", "create.tooltip.stressImpact.overstressed": "Überbelastet", + "create.tooltip.up_to": "UNLOCALIZED: Up to %1$s", "create.tooltip.capacityProvided": "Kinetische Belastungskapazität: %1$s", "create.tooltip.capacityProvided.low": "Niedrig", "create.tooltip.capacityProvided.medium": "Mittel", @@ -1682,10 +1683,13 @@ "create.display_source.kinetic_speed": "UNLOCALIZED: Rotation Speed (RPM)", "create.display_source.kinetic_speed.absolute": "UNLOCALIZED: Ignore Direction", "create.display_source.kinetic_speed.directional": "UNLOCALIZED: Include Direction", - "create.display_source.kinetic_stress.current": "UNLOCALIZED: Stress Impact (Amount)", - "create.display_source.kinetic_stress.max": "UNLOCALIZED: Stress Capacity (Max)", - "create.display_source.kinetic_stress.percent": "UNLOCALIZED: Stress Impact (Percent)", - "create.display_source.kinetic_stress.remaining": "UNLOCALIZED: Stress Capacity (Remaining)", + "create.display_source.kinetic_stress": "UNLOCALIZED: Network Stress", + "create.display_source.kinetic_stress.display": "UNLOCALIZED: Displayed Info", + "create.display_source.kinetic_stress.progress_bar": "UNLOCALIZED: Progress Bar", + "create.display_source.kinetic_stress.percent": "UNLOCALIZED: Percentage", + "create.display_source.kinetic_stress.current": "UNLOCALIZED: Stress in SU", + "create.display_source.kinetic_stress.max": "UNLOCALIZED: Total Capacity", + "create.display_source.kinetic_stress.remaining": "UNLOCALIZED: Remaining SU", "create.display_source.redstone_power": "UNLOCALIZED: Redstone Power", "create.display_source.redstone_power.display": "UNLOCALIZED: Display Format", "create.display_source.redstone_power.number": "UNLOCALIZED: Number", diff --git a/src/generated/resources/assets/create/lang/unfinished/es_cl.json b/src/generated/resources/assets/create/lang/unfinished/es_cl.json index db6b3896a..6868315f4 100644 --- a/src/generated/resources/assets/create/lang/unfinished/es_cl.json +++ b/src/generated/resources/assets/create/lang/unfinished/es_cl.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 823", + "_": "Missing Localizations: 827", "_": "->------------------------] Game Elements [------------------------<-", @@ -1325,6 +1325,7 @@ "create.tooltip.stressImpact.medium": "Moderado", "create.tooltip.stressImpact.high": "Alto", "create.tooltip.stressImpact.overstressed": "Sobreestresado", + "create.tooltip.up_to": "UNLOCALIZED: Up to %1$s", "create.tooltip.capacityProvided": "Capacidad de Estrés Cinético: %1$s", "create.tooltip.capacityProvided.low": "Pequeña", "create.tooltip.capacityProvided.medium": "Mediana", @@ -1682,10 +1683,13 @@ "create.display_source.kinetic_speed": "UNLOCALIZED: Rotation Speed (RPM)", "create.display_source.kinetic_speed.absolute": "UNLOCALIZED: Ignore Direction", "create.display_source.kinetic_speed.directional": "UNLOCALIZED: Include Direction", - "create.display_source.kinetic_stress.current": "UNLOCALIZED: Stress Impact (Amount)", - "create.display_source.kinetic_stress.max": "UNLOCALIZED: Stress Capacity (Max)", - "create.display_source.kinetic_stress.percent": "UNLOCALIZED: Stress Impact (Percent)", - "create.display_source.kinetic_stress.remaining": "UNLOCALIZED: Stress Capacity (Remaining)", + "create.display_source.kinetic_stress": "UNLOCALIZED: Network Stress", + "create.display_source.kinetic_stress.display": "UNLOCALIZED: Displayed Info", + "create.display_source.kinetic_stress.progress_bar": "UNLOCALIZED: Progress Bar", + "create.display_source.kinetic_stress.percent": "UNLOCALIZED: Percentage", + "create.display_source.kinetic_stress.current": "UNLOCALIZED: Stress in SU", + "create.display_source.kinetic_stress.max": "UNLOCALIZED: Total Capacity", + "create.display_source.kinetic_stress.remaining": "UNLOCALIZED: Remaining SU", "create.display_source.redstone_power": "UNLOCALIZED: Redstone Power", "create.display_source.redstone_power.display": "UNLOCALIZED: Display Format", "create.display_source.redstone_power.number": "UNLOCALIZED: Number", 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 c9efc40b9..2836cea4b 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: 487", + "_": "Missing Localizations: 491", "_": "->------------------------] Game Elements [------------------------<-", @@ -1325,6 +1325,7 @@ "create.tooltip.stressImpact.medium": "Moderado", "create.tooltip.stressImpact.high": "Alto", "create.tooltip.stressImpact.overstressed": "Sobrecargado", + "create.tooltip.up_to": "UNLOCALIZED: Up to %1$s", "create.tooltip.capacityProvided": "Capacidad de estrés: %1$s", "create.tooltip.capacityProvided.low": "Pequeña", "create.tooltip.capacityProvided.medium": "Media", @@ -1682,10 +1683,13 @@ "create.display_source.kinetic_speed": "UNLOCALIZED: Rotation Speed (RPM)", "create.display_source.kinetic_speed.absolute": "UNLOCALIZED: Ignore Direction", "create.display_source.kinetic_speed.directional": "UNLOCALIZED: Include Direction", - "create.display_source.kinetic_stress.current": "UNLOCALIZED: Stress Impact (Amount)", - "create.display_source.kinetic_stress.max": "UNLOCALIZED: Stress Capacity (Max)", - "create.display_source.kinetic_stress.percent": "UNLOCALIZED: Stress Impact (Percent)", - "create.display_source.kinetic_stress.remaining": "UNLOCALIZED: Stress Capacity (Remaining)", + "create.display_source.kinetic_stress": "UNLOCALIZED: Network Stress", + "create.display_source.kinetic_stress.display": "UNLOCALIZED: Displayed Info", + "create.display_source.kinetic_stress.progress_bar": "UNLOCALIZED: Progress Bar", + "create.display_source.kinetic_stress.percent": "UNLOCALIZED: Percentage", + "create.display_source.kinetic_stress.current": "UNLOCALIZED: Stress in SU", + "create.display_source.kinetic_stress.max": "UNLOCALIZED: Total Capacity", + "create.display_source.kinetic_stress.remaining": "UNLOCALIZED: Remaining SU", "create.display_source.redstone_power": "UNLOCALIZED: Redstone Power", "create.display_source.redstone_power.display": "UNLOCALIZED: Display Format", "create.display_source.redstone_power.number": "UNLOCALIZED: Number", 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 de61ddaa4..34756edde 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: 1979", + "_": "Missing Localizations: 1983", "_": "->------------------------] Game Elements [------------------------<-", @@ -1325,6 +1325,7 @@ "create.tooltip.stressImpact.medium": "Modéré", "create.tooltip.stressImpact.high": "Elevé", "create.tooltip.stressImpact.overstressed": "Surmené", + "create.tooltip.up_to": "UNLOCALIZED: Up to %1$s", "create.tooltip.capacityProvided": "Capacité de stress: %1$s", "create.tooltip.capacityProvided.low": "Petite", "create.tooltip.capacityProvided.medium": "Moyenne", @@ -1682,10 +1683,13 @@ "create.display_source.kinetic_speed": "UNLOCALIZED: Rotation Speed (RPM)", "create.display_source.kinetic_speed.absolute": "UNLOCALIZED: Ignore Direction", "create.display_source.kinetic_speed.directional": "UNLOCALIZED: Include Direction", - "create.display_source.kinetic_stress.current": "UNLOCALIZED: Stress Impact (Amount)", - "create.display_source.kinetic_stress.max": "UNLOCALIZED: Stress Capacity (Max)", - "create.display_source.kinetic_stress.percent": "UNLOCALIZED: Stress Impact (Percent)", - "create.display_source.kinetic_stress.remaining": "UNLOCALIZED: Stress Capacity (Remaining)", + "create.display_source.kinetic_stress": "UNLOCALIZED: Network Stress", + "create.display_source.kinetic_stress.display": "UNLOCALIZED: Displayed Info", + "create.display_source.kinetic_stress.progress_bar": "UNLOCALIZED: Progress Bar", + "create.display_source.kinetic_stress.percent": "UNLOCALIZED: Percentage", + "create.display_source.kinetic_stress.current": "UNLOCALIZED: Stress in SU", + "create.display_source.kinetic_stress.max": "UNLOCALIZED: Total Capacity", + "create.display_source.kinetic_stress.remaining": "UNLOCALIZED: Remaining SU", "create.display_source.redstone_power": "UNLOCALIZED: Redstone Power", "create.display_source.redstone_power.display": "UNLOCALIZED: Display Format", "create.display_source.redstone_power.number": "UNLOCALIZED: Number", 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 f2db49bc5..4e2c6fe99 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: 1750", + "_": "Missing Localizations: 1754", "_": "->------------------------] Game Elements [------------------------<-", @@ -1325,6 +1325,7 @@ "create.tooltip.stressImpact.medium": "Moderato", "create.tooltip.stressImpact.high": "Alto", "create.tooltip.stressImpact.overstressed": "Sovrastressato", + "create.tooltip.up_to": "UNLOCALIZED: Up to %1$s", "create.tooltip.capacityProvided": "Capacità dello stress: %1$s", "create.tooltip.capacityProvided.low": "Piccola", "create.tooltip.capacityProvided.medium": "Media", @@ -1682,10 +1683,13 @@ "create.display_source.kinetic_speed": "UNLOCALIZED: Rotation Speed (RPM)", "create.display_source.kinetic_speed.absolute": "UNLOCALIZED: Ignore Direction", "create.display_source.kinetic_speed.directional": "UNLOCALIZED: Include Direction", - "create.display_source.kinetic_stress.current": "UNLOCALIZED: Stress Impact (Amount)", - "create.display_source.kinetic_stress.max": "UNLOCALIZED: Stress Capacity (Max)", - "create.display_source.kinetic_stress.percent": "UNLOCALIZED: Stress Impact (Percent)", - "create.display_source.kinetic_stress.remaining": "UNLOCALIZED: Stress Capacity (Remaining)", + "create.display_source.kinetic_stress": "UNLOCALIZED: Network Stress", + "create.display_source.kinetic_stress.display": "UNLOCALIZED: Displayed Info", + "create.display_source.kinetic_stress.progress_bar": "UNLOCALIZED: Progress Bar", + "create.display_source.kinetic_stress.percent": "UNLOCALIZED: Percentage", + "create.display_source.kinetic_stress.current": "UNLOCALIZED: Stress in SU", + "create.display_source.kinetic_stress.max": "UNLOCALIZED: Total Capacity", + "create.display_source.kinetic_stress.remaining": "UNLOCALIZED: Remaining SU", "create.display_source.redstone_power": "UNLOCALIZED: Redstone Power", "create.display_source.redstone_power.display": "UNLOCALIZED: Display Format", "create.display_source.redstone_power.number": "UNLOCALIZED: Number", 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 704aed60b..9990850f8 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: 489", + "_": "Missing Localizations: 493", "_": "->------------------------] Game Elements [------------------------<-", @@ -1325,6 +1325,7 @@ "create.tooltip.stressImpact.medium": "中", "create.tooltip.stressImpact.high": "高", "create.tooltip.stressImpact.overstressed": "応力超過", + "create.tooltip.up_to": "UNLOCALIZED: Up to %1$s", "create.tooltip.capacityProvided": "応力許容量: %1$s", "create.tooltip.capacityProvided.low": "小", "create.tooltip.capacityProvided.medium": "中", @@ -1682,10 +1683,13 @@ "create.display_source.kinetic_speed": "UNLOCALIZED: Rotation Speed (RPM)", "create.display_source.kinetic_speed.absolute": "UNLOCALIZED: Ignore Direction", "create.display_source.kinetic_speed.directional": "UNLOCALIZED: Include Direction", - "create.display_source.kinetic_stress.current": "UNLOCALIZED: Stress Impact (Amount)", - "create.display_source.kinetic_stress.max": "UNLOCALIZED: Stress Capacity (Max)", - "create.display_source.kinetic_stress.percent": "UNLOCALIZED: Stress Impact (Percent)", - "create.display_source.kinetic_stress.remaining": "UNLOCALIZED: Stress Capacity (Remaining)", + "create.display_source.kinetic_stress": "UNLOCALIZED: Network Stress", + "create.display_source.kinetic_stress.display": "UNLOCALIZED: Displayed Info", + "create.display_source.kinetic_stress.progress_bar": "UNLOCALIZED: Progress Bar", + "create.display_source.kinetic_stress.percent": "UNLOCALIZED: Percentage", + "create.display_source.kinetic_stress.current": "UNLOCALIZED: Stress in SU", + "create.display_source.kinetic_stress.max": "UNLOCALIZED: Total Capacity", + "create.display_source.kinetic_stress.remaining": "UNLOCALIZED: Remaining SU", "create.display_source.redstone_power": "UNLOCALIZED: Redstone Power", "create.display_source.redstone_power.display": "UNLOCALIZED: Display Format", "create.display_source.redstone_power.number": "UNLOCALIZED: Number", 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 9fb6429d5..5cbb793be 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: 489", + "_": "Missing Localizations: 493", "_": "->------------------------] Game Elements [------------------------<-", @@ -1325,6 +1325,7 @@ "create.tooltip.stressImpact.medium": "보통", "create.tooltip.stressImpact.high": "높음", "create.tooltip.stressImpact.overstressed": "과부하", + "create.tooltip.up_to": "UNLOCALIZED: Up to %1$s", "create.tooltip.capacityProvided": "피로도 용량: %1$s", "create.tooltip.capacityProvided.low": "적음", "create.tooltip.capacityProvided.medium": "보통", @@ -1682,10 +1683,13 @@ "create.display_source.kinetic_speed": "UNLOCALIZED: Rotation Speed (RPM)", "create.display_source.kinetic_speed.absolute": "UNLOCALIZED: Ignore Direction", "create.display_source.kinetic_speed.directional": "UNLOCALIZED: Include Direction", - "create.display_source.kinetic_stress.current": "UNLOCALIZED: Stress Impact (Amount)", - "create.display_source.kinetic_stress.max": "UNLOCALIZED: Stress Capacity (Max)", - "create.display_source.kinetic_stress.percent": "UNLOCALIZED: Stress Impact (Percent)", - "create.display_source.kinetic_stress.remaining": "UNLOCALIZED: Stress Capacity (Remaining)", + "create.display_source.kinetic_stress": "UNLOCALIZED: Network Stress", + "create.display_source.kinetic_stress.display": "UNLOCALIZED: Displayed Info", + "create.display_source.kinetic_stress.progress_bar": "UNLOCALIZED: Progress Bar", + "create.display_source.kinetic_stress.percent": "UNLOCALIZED: Percentage", + "create.display_source.kinetic_stress.current": "UNLOCALIZED: Stress in SU", + "create.display_source.kinetic_stress.max": "UNLOCALIZED: Total Capacity", + "create.display_source.kinetic_stress.remaining": "UNLOCALIZED: Remaining SU", "create.display_source.redstone_power": "UNLOCALIZED: Redstone Power", "create.display_source.redstone_power.display": "UNLOCALIZED: Display Format", "create.display_source.redstone_power.number": "UNLOCALIZED: Number", 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 89fb186ff..13febd5e1 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: 2323", + "_": "Missing Localizations: 2327", "_": "->------------------------] Game Elements [------------------------<-", @@ -1325,6 +1325,7 @@ "create.tooltip.stressImpact.medium": "Gemiddeld", "create.tooltip.stressImpact.high": "Hoog", "create.tooltip.stressImpact.overstressed": "UNLOCALIZED: Overstressed", + "create.tooltip.up_to": "UNLOCALIZED: Up to %1$s", "create.tooltip.capacityProvided": "Stress Capacity: %1$s", "create.tooltip.capacityProvided.low": "Klein", "create.tooltip.capacityProvided.medium": "Gemiddeld", @@ -1682,10 +1683,13 @@ "create.display_source.kinetic_speed": "UNLOCALIZED: Rotation Speed (RPM)", "create.display_source.kinetic_speed.absolute": "UNLOCALIZED: Ignore Direction", "create.display_source.kinetic_speed.directional": "UNLOCALIZED: Include Direction", - "create.display_source.kinetic_stress.current": "UNLOCALIZED: Stress Impact (Amount)", - "create.display_source.kinetic_stress.max": "UNLOCALIZED: Stress Capacity (Max)", - "create.display_source.kinetic_stress.percent": "UNLOCALIZED: Stress Impact (Percent)", - "create.display_source.kinetic_stress.remaining": "UNLOCALIZED: Stress Capacity (Remaining)", + "create.display_source.kinetic_stress": "UNLOCALIZED: Network Stress", + "create.display_source.kinetic_stress.display": "UNLOCALIZED: Displayed Info", + "create.display_source.kinetic_stress.progress_bar": "UNLOCALIZED: Progress Bar", + "create.display_source.kinetic_stress.percent": "UNLOCALIZED: Percentage", + "create.display_source.kinetic_stress.current": "UNLOCALIZED: Stress in SU", + "create.display_source.kinetic_stress.max": "UNLOCALIZED: Total Capacity", + "create.display_source.kinetic_stress.remaining": "UNLOCALIZED: Remaining SU", "create.display_source.redstone_power": "UNLOCALIZED: Redstone Power", "create.display_source.redstone_power.display": "UNLOCALIZED: Display Format", "create.display_source.redstone_power.number": "UNLOCALIZED: Number", 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 91be4ada4..30eed8fd1 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: 862", + "_": "Missing Localizations: 866", "_": "->------------------------] Game Elements [------------------------<-", @@ -1325,6 +1325,7 @@ "create.tooltip.stressImpact.medium": "Umiarkowany", "create.tooltip.stressImpact.high": "Wysoki", "create.tooltip.stressImpact.overstressed": "Przeciążenie", + "create.tooltip.up_to": "UNLOCALIZED: Up to %1$s", "create.tooltip.capacityProvided": "Odporność na obciążenie: %1$s", "create.tooltip.capacityProvided.low": "Niska", "create.tooltip.capacityProvided.medium": "Średnia", @@ -1682,10 +1683,13 @@ "create.display_source.kinetic_speed": "UNLOCALIZED: Rotation Speed (RPM)", "create.display_source.kinetic_speed.absolute": "UNLOCALIZED: Ignore Direction", "create.display_source.kinetic_speed.directional": "UNLOCALIZED: Include Direction", - "create.display_source.kinetic_stress.current": "UNLOCALIZED: Stress Impact (Amount)", - "create.display_source.kinetic_stress.max": "UNLOCALIZED: Stress Capacity (Max)", - "create.display_source.kinetic_stress.percent": "UNLOCALIZED: Stress Impact (Percent)", - "create.display_source.kinetic_stress.remaining": "UNLOCALIZED: Stress Capacity (Remaining)", + "create.display_source.kinetic_stress": "UNLOCALIZED: Network Stress", + "create.display_source.kinetic_stress.display": "UNLOCALIZED: Displayed Info", + "create.display_source.kinetic_stress.progress_bar": "UNLOCALIZED: Progress Bar", + "create.display_source.kinetic_stress.percent": "UNLOCALIZED: Percentage", + "create.display_source.kinetic_stress.current": "UNLOCALIZED: Stress in SU", + "create.display_source.kinetic_stress.max": "UNLOCALIZED: Total Capacity", + "create.display_source.kinetic_stress.remaining": "UNLOCALIZED: Remaining SU", "create.display_source.redstone_power": "UNLOCALIZED: Redstone Power", "create.display_source.redstone_power.display": "UNLOCALIZED: Display Format", "create.display_source.redstone_power.number": "UNLOCALIZED: Number", 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 74a658d59..5acf1dbf6 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: 1356", + "_": "Missing Localizations: 1360", "_": "->------------------------] Game Elements [------------------------<-", @@ -1325,6 +1325,7 @@ "create.tooltip.stressImpact.medium": " Moderado", "create.tooltip.stressImpact.high": " Alto", "create.tooltip.stressImpact.overstressed": ": Sobre estresse", + "create.tooltip.up_to": "UNLOCALIZED: Up to %1$s", "create.tooltip.capacityProvided": "Capacidade de stress cinético: %1$s", "create.tooltip.capacityProvided.low": " Pequeno", "create.tooltip.capacityProvided.medium": " Médio", @@ -1682,10 +1683,13 @@ "create.display_source.kinetic_speed": "UNLOCALIZED: Rotation Speed (RPM)", "create.display_source.kinetic_speed.absolute": "UNLOCALIZED: Ignore Direction", "create.display_source.kinetic_speed.directional": "UNLOCALIZED: Include Direction", - "create.display_source.kinetic_stress.current": "UNLOCALIZED: Stress Impact (Amount)", - "create.display_source.kinetic_stress.max": "UNLOCALIZED: Stress Capacity (Max)", - "create.display_source.kinetic_stress.percent": "UNLOCALIZED: Stress Impact (Percent)", - "create.display_source.kinetic_stress.remaining": "UNLOCALIZED: Stress Capacity (Remaining)", + "create.display_source.kinetic_stress": "UNLOCALIZED: Network Stress", + "create.display_source.kinetic_stress.display": "UNLOCALIZED: Displayed Info", + "create.display_source.kinetic_stress.progress_bar": "UNLOCALIZED: Progress Bar", + "create.display_source.kinetic_stress.percent": "UNLOCALIZED: Percentage", + "create.display_source.kinetic_stress.current": "UNLOCALIZED: Stress in SU", + "create.display_source.kinetic_stress.max": "UNLOCALIZED: Total Capacity", + "create.display_source.kinetic_stress.remaining": "UNLOCALIZED: Remaining SU", "create.display_source.redstone_power": "UNLOCALIZED: Redstone Power", "create.display_source.redstone_power.display": "UNLOCALIZED: Display Format", "create.display_source.redstone_power.number": "UNLOCALIZED: Number", diff --git a/src/generated/resources/assets/create/lang/unfinished/pt_pt.json b/src/generated/resources/assets/create/lang/unfinished/pt_pt.json index 7d35db946..183c2e0c8 100644 --- a/src/generated/resources/assets/create/lang/unfinished/pt_pt.json +++ b/src/generated/resources/assets/create/lang/unfinished/pt_pt.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 2032", + "_": "Missing Localizations: 2036", "_": "->------------------------] Game Elements [------------------------<-", @@ -1325,6 +1325,7 @@ "create.tooltip.stressImpact.medium": "UNLOCALIZED: Moderate", "create.tooltip.stressImpact.high": "UNLOCALIZED: High", "create.tooltip.stressImpact.overstressed": "UNLOCALIZED: Overstressed", + "create.tooltip.up_to": "UNLOCALIZED: Up to %1$s", "create.tooltip.capacityProvided": "UNLOCALIZED: Kinetic Stress Capacity: %1$s", "create.tooltip.capacityProvided.low": "UNLOCALIZED: Small", "create.tooltip.capacityProvided.medium": "UNLOCALIZED: Medium", @@ -1682,10 +1683,13 @@ "create.display_source.kinetic_speed": "UNLOCALIZED: Rotation Speed (RPM)", "create.display_source.kinetic_speed.absolute": "UNLOCALIZED: Ignore Direction", "create.display_source.kinetic_speed.directional": "UNLOCALIZED: Include Direction", - "create.display_source.kinetic_stress.current": "UNLOCALIZED: Stress Impact (Amount)", - "create.display_source.kinetic_stress.max": "UNLOCALIZED: Stress Capacity (Max)", - "create.display_source.kinetic_stress.percent": "UNLOCALIZED: Stress Impact (Percent)", - "create.display_source.kinetic_stress.remaining": "UNLOCALIZED: Stress Capacity (Remaining)", + "create.display_source.kinetic_stress": "UNLOCALIZED: Network Stress", + "create.display_source.kinetic_stress.display": "UNLOCALIZED: Displayed Info", + "create.display_source.kinetic_stress.progress_bar": "UNLOCALIZED: Progress Bar", + "create.display_source.kinetic_stress.percent": "UNLOCALIZED: Percentage", + "create.display_source.kinetic_stress.current": "UNLOCALIZED: Stress in SU", + "create.display_source.kinetic_stress.max": "UNLOCALIZED: Total Capacity", + "create.display_source.kinetic_stress.remaining": "UNLOCALIZED: Remaining SU", "create.display_source.redstone_power": "UNLOCALIZED: Redstone Power", "create.display_source.redstone_power.display": "UNLOCALIZED: Display Format", "create.display_source.redstone_power.number": "UNLOCALIZED: Number", diff --git a/src/generated/resources/assets/create/lang/unfinished/ro_ro.json b/src/generated/resources/assets/create/lang/unfinished/ro_ro.json index 0d7cd2c7d..5a09af010 100644 --- a/src/generated/resources/assets/create/lang/unfinished/ro_ro.json +++ b/src/generated/resources/assets/create/lang/unfinished/ro_ro.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 490", + "_": "Missing Localizations: 494", "_": "->------------------------] Game Elements [------------------------<-", @@ -1325,6 +1325,7 @@ "create.tooltip.stressImpact.medium": "Moderat", "create.tooltip.stressImpact.high": "Ridicat", "create.tooltip.stressImpact.overstressed": "Suprasolicitat", + "create.tooltip.up_to": "UNLOCALIZED: Up to %1$s", "create.tooltip.capacityProvided": "Capacitate Stres Cinetic: %1$s", "create.tooltip.capacityProvided.low": "Mică", "create.tooltip.capacityProvided.medium": "Medie", @@ -1682,10 +1683,13 @@ "create.display_source.kinetic_speed": "UNLOCALIZED: Rotation Speed (RPM)", "create.display_source.kinetic_speed.absolute": "UNLOCALIZED: Ignore Direction", "create.display_source.kinetic_speed.directional": "UNLOCALIZED: Include Direction", - "create.display_source.kinetic_stress.current": "UNLOCALIZED: Stress Impact (Amount)", - "create.display_source.kinetic_stress.max": "UNLOCALIZED: Stress Capacity (Max)", - "create.display_source.kinetic_stress.percent": "UNLOCALIZED: Stress Impact (Percent)", - "create.display_source.kinetic_stress.remaining": "UNLOCALIZED: Stress Capacity (Remaining)", + "create.display_source.kinetic_stress": "UNLOCALIZED: Network Stress", + "create.display_source.kinetic_stress.display": "UNLOCALIZED: Displayed Info", + "create.display_source.kinetic_stress.progress_bar": "UNLOCALIZED: Progress Bar", + "create.display_source.kinetic_stress.percent": "UNLOCALIZED: Percentage", + "create.display_source.kinetic_stress.current": "UNLOCALIZED: Stress in SU", + "create.display_source.kinetic_stress.max": "UNLOCALIZED: Total Capacity", + "create.display_source.kinetic_stress.remaining": "UNLOCALIZED: Remaining SU", "create.display_source.redstone_power": "UNLOCALIZED: Redstone Power", "create.display_source.redstone_power.display": "UNLOCALIZED: Display Format", "create.display_source.redstone_power.number": "UNLOCALIZED: Number", 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 ad64358ee..a6dbcb863 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: 867", + "_": "Missing Localizations: 871", "_": "->------------------------] Game Elements [------------------------<-", @@ -1325,6 +1325,7 @@ "create.tooltip.stressImpact.medium": "Средняя", "create.tooltip.stressImpact.high": "Высокая", "create.tooltip.stressImpact.overstressed": "Перегрузка", + "create.tooltip.up_to": "UNLOCALIZED: Up to %1$s", "create.tooltip.capacityProvided": "Допустимая нагрузка: %1$s", "create.tooltip.capacityProvided.low": "Маленький", "create.tooltip.capacityProvided.medium": "Средний", @@ -1682,10 +1683,13 @@ "create.display_source.kinetic_speed": "UNLOCALIZED: Rotation Speed (RPM)", "create.display_source.kinetic_speed.absolute": "UNLOCALIZED: Ignore Direction", "create.display_source.kinetic_speed.directional": "UNLOCALIZED: Include Direction", - "create.display_source.kinetic_stress.current": "UNLOCALIZED: Stress Impact (Amount)", - "create.display_source.kinetic_stress.max": "UNLOCALIZED: Stress Capacity (Max)", - "create.display_source.kinetic_stress.percent": "UNLOCALIZED: Stress Impact (Percent)", - "create.display_source.kinetic_stress.remaining": "UNLOCALIZED: Stress Capacity (Remaining)", + "create.display_source.kinetic_stress": "UNLOCALIZED: Network Stress", + "create.display_source.kinetic_stress.display": "UNLOCALIZED: Displayed Info", + "create.display_source.kinetic_stress.progress_bar": "UNLOCALIZED: Progress Bar", + "create.display_source.kinetic_stress.percent": "UNLOCALIZED: Percentage", + "create.display_source.kinetic_stress.current": "UNLOCALIZED: Stress in SU", + "create.display_source.kinetic_stress.max": "UNLOCALIZED: Total Capacity", + "create.display_source.kinetic_stress.remaining": "UNLOCALIZED: Remaining SU", "create.display_source.redstone_power": "UNLOCALIZED: Redstone Power", "create.display_source.redstone_power.display": "UNLOCALIZED: Display Format", "create.display_source.redstone_power.number": "UNLOCALIZED: Number", 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 eb821cdd9..1f011ac6c 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: 487", + "_": "Missing Localizations: 491", "_": "->------------------------] Game Elements [------------------------<-", @@ -1325,6 +1325,7 @@ "create.tooltip.stressImpact.medium": "中", "create.tooltip.stressImpact.high": "高", "create.tooltip.stressImpact.overstressed": "过载", + "create.tooltip.up_to": "UNLOCALIZED: Up to %1$s", "create.tooltip.capacityProvided": "应力量:%1$s", "create.tooltip.capacityProvided.low": "小", "create.tooltip.capacityProvided.medium": "中", @@ -1682,10 +1683,13 @@ "create.display_source.kinetic_speed": "UNLOCALIZED: Rotation Speed (RPM)", "create.display_source.kinetic_speed.absolute": "UNLOCALIZED: Ignore Direction", "create.display_source.kinetic_speed.directional": "UNLOCALIZED: Include Direction", - "create.display_source.kinetic_stress.current": "UNLOCALIZED: Stress Impact (Amount)", - "create.display_source.kinetic_stress.max": "UNLOCALIZED: Stress Capacity (Max)", - "create.display_source.kinetic_stress.percent": "UNLOCALIZED: Stress Impact (Percent)", - "create.display_source.kinetic_stress.remaining": "UNLOCALIZED: Stress Capacity (Remaining)", + "create.display_source.kinetic_stress": "UNLOCALIZED: Network Stress", + "create.display_source.kinetic_stress.display": "UNLOCALIZED: Displayed Info", + "create.display_source.kinetic_stress.progress_bar": "UNLOCALIZED: Progress Bar", + "create.display_source.kinetic_stress.percent": "UNLOCALIZED: Percentage", + "create.display_source.kinetic_stress.current": "UNLOCALIZED: Stress in SU", + "create.display_source.kinetic_stress.max": "UNLOCALIZED: Total Capacity", + "create.display_source.kinetic_stress.remaining": "UNLOCALIZED: Remaining SU", "create.display_source.redstone_power": "UNLOCALIZED: Redstone Power", "create.display_source.redstone_power.display": "UNLOCALIZED: Display Format", "create.display_source.redstone_power.number": "UNLOCALIZED: Number", 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 043e8223d..e8c57c02f 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: 881", + "_": "Missing Localizations: 885", "_": "->------------------------] Game Elements [------------------------<-", @@ -1325,6 +1325,7 @@ "create.tooltip.stressImpact.medium": "中", "create.tooltip.stressImpact.high": "高", "create.tooltip.stressImpact.overstressed": "過載", + "create.tooltip.up_to": "UNLOCALIZED: Up to %1$s", "create.tooltip.capacityProvided": "動能生產量:%1$s", "create.tooltip.capacityProvided.low": "小", "create.tooltip.capacityProvided.medium": "中", @@ -1682,10 +1683,13 @@ "create.display_source.kinetic_speed": "UNLOCALIZED: Rotation Speed (RPM)", "create.display_source.kinetic_speed.absolute": "UNLOCALIZED: Ignore Direction", "create.display_source.kinetic_speed.directional": "UNLOCALIZED: Include Direction", - "create.display_source.kinetic_stress.current": "UNLOCALIZED: Stress Impact (Amount)", - "create.display_source.kinetic_stress.max": "UNLOCALIZED: Stress Capacity (Max)", - "create.display_source.kinetic_stress.percent": "UNLOCALIZED: Stress Impact (Percent)", - "create.display_source.kinetic_stress.remaining": "UNLOCALIZED: Stress Capacity (Remaining)", + "create.display_source.kinetic_stress": "UNLOCALIZED: Network Stress", + "create.display_source.kinetic_stress.display": "UNLOCALIZED: Displayed Info", + "create.display_source.kinetic_stress.progress_bar": "UNLOCALIZED: Progress Bar", + "create.display_source.kinetic_stress.percent": "UNLOCALIZED: Percentage", + "create.display_source.kinetic_stress.current": "UNLOCALIZED: Stress in SU", + "create.display_source.kinetic_stress.max": "UNLOCALIZED: Total Capacity", + "create.display_source.kinetic_stress.remaining": "UNLOCALIZED: Remaining SU", "create.display_source.redstone_power": "UNLOCALIZED: Redstone Power", "create.display_source.redstone_power.display": "UNLOCALIZED: Display Format", "create.display_source.redstone_power.number": "UNLOCALIZED: Number", diff --git a/src/main/java/com/simibubi/create/AllBlocks.java b/src/main/java/com/simibubi/create/AllBlocks.java index a25bd657f..1708ce1fc 100644 --- a/src/main/java/com/simibubi/create/AllBlocks.java +++ b/src/main/java/com/simibubi/create/AllBlocks.java @@ -493,6 +493,7 @@ public class AllBlocks { .transform(pickaxeOnly()) .blockstate(new CreativeMotorGenerator()::generate) .transform(BlockStressDefaults.setCapacity(16384.0)) + .transform(BlockStressDefaults.setGeneratorSpeed(() -> Couple.create(0, 256))) .item() .properties(p -> p.rarity(Rarity.EPIC)) .transform(customItemModel()) @@ -506,6 +507,7 @@ public class AllBlocks { .blockstate(BlockStateGen.directionalBlockProviderIgnoresWaterlogged(false)) .addLayer(() -> RenderType::cutoutMipped) .transform(BlockStressDefaults.setCapacity(16.0)) + .transform(BlockStressDefaults.setGeneratorSpeed(WaterWheelBlock::getSpeedRange)) .simpleItem() .register(); @@ -546,6 +548,7 @@ public class AllBlocks { .transform(axeOrPickaxe()) .blockstate(BlockStateGen.directionalBlockProvider(true)) .transform(BlockStressDefaults.setCapacity(8.0)) + .transform(BlockStressDefaults.setGeneratorSpeed(HandCrankBlock::getSpeedRange)) .tag(AllBlockTags.BRITTLE.tag) .onRegister(ItemUseOverrides::addBlock) .item() @@ -739,10 +742,7 @@ public class AllBlocks { .transform(axeOrPickaxe()) .transform(BlockStressDefaults.setNoImpact()) .blockstate(new GaugeGenerator()::generate) - .onRegister(assignDataBehaviour(new KineticStressDisplaySource.Current(), "kinetic_stress_current")) - .onRegister(assignDataBehaviour(new KineticStressDisplaySource.Percent(), "kinetic_stress_percent")) - .onRegister(assignDataBehaviour(new KineticStressDisplaySource.Max(), "kinetic_stress_max")) - .onRegister(assignDataBehaviour(new KineticStressDisplaySource.Remaining(), "kinetic_stress_remaining")) + .onRegister(assignDataBehaviour(new KineticStressDisplaySource(), "kinetic_stress")) .item() .transform(ModelGen.customItemModel("gauge", "_", "item")) .register(); @@ -909,6 +909,7 @@ public class AllBlocks { public static final BlockEntry FLUID_TANK = REGISTRATE.block("fluid_tank", FluidTankBlock::regular) .initialProperties(SharedProperties::copperMetal) .properties(BlockBehaviour.Properties::noOcclusion) + .properties(p -> p.isRedstoneConductor((p1, p2, p3) -> true)) .transform(pickaxeOnly()) .blockstate(new FluidTankGenerator()::generate) .onRegister(CreateRegistrate.blockModel(() -> FluidTankModel::standard)) @@ -982,6 +983,7 @@ public class AllBlocks { .transform(pickaxeOnly()) .blockstate((c, p) -> p.horizontalFaceBlock(c.get(), AssetLookup.partialBaseModel(c, p))) .transform(BlockStressDefaults.setCapacity(1024.0)) + .transform(BlockStressDefaults.setGeneratorSpeed(SteamEngineBlock::getSpeedRange)) .item() .transform(customItemModel()) .register(); @@ -1094,6 +1096,7 @@ public class AllBlocks { .properties(p -> p.color(MaterialColor.PODZOL)) .transform(BuilderTransformers.bearing("windmill", "gearbox", true)) .transform(BlockStressDefaults.setCapacity(512.0)) + .transform(BlockStressDefaults.setGeneratorSpeed(WindmillBearingBlock::getSpeedRange)) .tag(AllBlockTags.SAFE_NBT.tag) .register(); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/PortableStorageInterfaceTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/PortableStorageInterfaceTileEntity.java index eb7b54b60..17c41d628 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/actors/PortableStorageInterfaceTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/PortableStorageInterfaceTileEntity.java @@ -38,6 +38,8 @@ public abstract class PortableStorageInterfaceTileEntity extends SmartTileEntity } public void startTransferringTo(Contraption contraption, float distance) { + if (connectedEntity == contraption.entity) + return; this.distance = Math.min(2, distance); connectedEntity = contraption.entity; startConnecting(); @@ -46,6 +48,7 @@ public abstract class PortableStorageInterfaceTileEntity extends SmartTileEntity protected void stopTransferring() { connectedEntity = null; + level.updateNeighborsAt(worldPosition, getBlockState().getBlock()); } public boolean canTransfer() { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/crank/HandCrankBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/crank/HandCrankBlock.java index c2dfbcdeb..075352fed 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/crank/HandCrankBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/crank/HandCrankBlock.java @@ -8,6 +8,7 @@ import com.simibubi.create.content.contraptions.base.DirectionalKineticBlock; import com.simibubi.create.foundation.advancement.AllAdvancements; import com.simibubi.create.foundation.block.ITE; import com.simibubi.create.foundation.config.AllConfigs; +import com.simibubi.create.foundation.utility.Couple; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; @@ -128,5 +129,9 @@ public class HandCrankBlock extends DirectionalKineticBlock implements ITE getSpeedRange() { + return Couple.create(32, 32); + } } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/crank/ValveHandleBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/crank/ValveHandleBlock.java index 552a97fd4..9c22fa6b4 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/crank/ValveHandleBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/crank/ValveHandleBlock.java @@ -5,6 +5,7 @@ import javax.annotation.ParametersAreNonnullByDefault; import com.jozufozu.flywheel.core.PartialModel; import com.simibubi.create.AllBlocks; import com.simibubi.create.foundation.utility.BlockHelper; +import com.simibubi.create.foundation.utility.Couple; import net.minecraft.core.BlockPos; import net.minecraft.core.NonNullList; @@ -73,5 +74,9 @@ public class ValveHandleBlock extends HandCrankBlock { public int getRotationSpeed() { return 16; } + + public static Couple getSpeedRange() { + return Couple.create(16, 16); + } } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/steam/PoweredShaftBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/steam/PoweredShaftBlock.java index 48b88ff23..ef16af57d 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/steam/PoweredShaftBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/steam/PoweredShaftBlock.java @@ -1,7 +1,5 @@ package com.simibubi.create.content.contraptions.components.steam; -import static net.minecraft.world.level.block.state.properties.BlockStateProperties.WATERLOGGED; - import java.util.Random; import com.simibubi.create.AllBlocks; @@ -11,16 +9,24 @@ import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.relays.elementary.AbstractShaftBlock; import com.simibubi.create.content.contraptions.relays.elementary.ShaftBlock; import com.simibubi.create.foundation.utility.Iterate; +import com.simibubi.create.foundation.utility.placement.IPlacementHelper; +import com.simibubi.create.foundation.utility.placement.PlacementHelpers; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.block.RenderShape; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.VoxelShape; @@ -40,6 +46,21 @@ public class PoweredShaftBlock extends AbstractShaftBlock { return AllTileEntities.POWERED_SHAFT.get(); } + @Override + public InteractionResult use(BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, + BlockHitResult pHit) { + if (pPlayer.isShiftKeyDown() || !pPlayer.mayBuild()) + return InteractionResult.PASS; + + ItemStack heldItem = pPlayer.getItemInHand(pHand); + IPlacementHelper helper = PlacementHelpers.get(ShaftBlock.placementHelperId); + if (helper.matchesItem(heldItem)) + return helper.getOffset(pPlayer, pLevel, pState, pPos, pHit) + .placeInWorld(pLevel, (BlockItem) heldItem.getItem(), pPlayer, pHand, pHit); + + return InteractionResult.PASS; + } + @Override public RenderShape getRenderShape(BlockState pState) { return RenderShape.ENTITYBLOCK_ANIMATED; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/steam/PoweredShaftTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/steam/PoweredShaftTileEntity.java index c9eb2f692..e4bf26365 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/steam/PoweredShaftTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/steam/PoweredShaftTileEntity.java @@ -22,11 +22,20 @@ public class PoweredShaftTileEntity extends GeneratingKineticTileEntity { public BlockPos enginePos; public float engineEfficiency; public int movementDirection; + public int initialTicks; public Block capacityKey; public PoweredShaftTileEntity(BlockEntityType typeIn, BlockPos pos, BlockState state) { super(typeIn, pos, state); movementDirection = 1; + initialTicks = 3; + } + + @Override + public void tick() { + super.tick(); + if (initialTicks > 0) + initialTicks--; } public void update(BlockPos sourcePos, int direction, float efficiency) { @@ -56,7 +65,7 @@ public class PoweredShaftTileEntity extends GeneratingKineticTileEntity { } public boolean canBePoweredBy(BlockPos globalPos) { - return enginePos == null || isPoweredBy(globalPos); + return initialTicks == 0 && (enginePos == null || isPoweredBy(globalPos)); } public boolean isPoweredBy(BlockPos globalPos) { @@ -67,10 +76,13 @@ public class PoweredShaftTileEntity extends GeneratingKineticTileEntity { @Override protected void write(CompoundTag compound, boolean clientPacket) { compound.putInt("Direction", movementDirection); + if (initialTicks > 0) + compound.putInt("Warmup", initialTicks); if (enginePos != null && capacityKey != null) { compound.put("EnginePos", NbtUtils.writeBlockPos(enginePos)); compound.putFloat("EnginePower", engineEfficiency); - compound.putString("EngineType", capacityKey.getRegistryName().toString()); + compound.putString("EngineType", capacityKey.getRegistryName() + .toString()); } super.write(compound, clientPacket); } @@ -79,6 +91,7 @@ public class PoweredShaftTileEntity extends GeneratingKineticTileEntity { protected void read(CompoundTag compound, boolean clientPacket) { super.read(compound, clientPacket); movementDirection = compound.getInt("Direction"); + initialTicks = compound.getInt("Warmup"); enginePos = null; engineEfficiency = 0; if (compound.contains("EnginePos")) { @@ -113,7 +126,7 @@ public class PoweredShaftTileEntity extends GeneratingKineticTileEntity { int combinedCoords = axis.choose(worldPosition.getX(), worldPosition.getY(), worldPosition.getZ()); return super.getRotationAngleOffset(axis) + (combinedCoords % 2 == 0 ? 180 : 0); } - + @Override public boolean addToGoggleTooltip(List tooltip, boolean isPlayerSneaking) { return false; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/steam/SteamEngineBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/steam/SteamEngineBlock.java index 94552ad74..67848b7a7 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/steam/SteamEngineBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/steam/SteamEngineBlock.java @@ -13,6 +13,7 @@ import com.simibubi.create.content.contraptions.wrench.IWrenchable; import com.simibubi.create.foundation.advancement.AdvancementBehaviour; import com.simibubi.create.foundation.block.ITE; import com.simibubi.create.foundation.utility.BlockHelper; +import com.simibubi.create.foundation.utility.Couple; import com.simibubi.create.foundation.utility.placement.IPlacementHelper; import com.simibubi.create.foundation.utility.placement.PlacementHelpers; import com.simibubi.create.foundation.utility.placement.PlacementOffset; @@ -203,5 +204,9 @@ public class SteamEngineBlock extends FaceAttachedHorizontalDirectionalBlock .setValue(PoweredShaftBlock.AXIS, axis)); } } + + public static Couple getSpeedRange() { + return Couple.create(16, 64); + } } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/steam/SteamEngineRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/steam/SteamEngineRenderer.java index 97ec957de..a9def6a7f 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/steam/SteamEngineRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/steam/SteamEngineRenderer.java @@ -77,5 +77,10 @@ public class SteamEngineRenderer extends SafeTileEntityRenderer movementDirection; + public WeakReference target; public WeakReference source; @@ -48,9 +53,21 @@ public class SteamEngineTileEntity extends SmartTileEntity implements IHaveGoggl @Override public void addBehaviours(List behaviours) { + movementDirection = new ScrollOptionBehaviour<>(RotationDirection.class, + Lang.translate("contraptions.windmill.rotation_direction"), this, new SteamEngineValueBox()); + movementDirection.requiresWrench(); + movementDirection.onlyActiveWhen(() -> { + PoweredShaftTileEntity shaft = getShaft(); + return shaft == null || !shaft.hasSource(); + }); + movementDirection.withCallback($ -> onDirectionChanged()); + behaviours.add(movementDirection); + registerAwardables(behaviours, AllAdvancements.STEAM_ENGINE); } + private void onDirectionChanged() {} + @Override public void tick() { super.tick(); @@ -76,11 +93,22 @@ public class SteamEngineTileEntity extends SmartTileEntity implements IHaveGoggl float efficiency = Mth.clamp(tank.boiler.getEngineEfficiency(tank.getTotalTankSize()), 0, 1); if (efficiency > 0) award(AllAdvancements.STEAM_ENGINE); - + int conveyedSpeedLevel = efficiency == 0 ? 1 : verticalTarget ? 1 : (int) GeneratingKineticTileEntity.convertToDirection(1, facing); if (targetAxis == Axis.Z) conveyedSpeedLevel *= -1; + if (movementDirection.get() == RotationDirection.COUNTER_CLOCKWISE) + conveyedSpeedLevel *= -1; + + float shaftSpeed = shaft.getTheoreticalSpeed(); + if (shaft.hasSource() && shaftSpeed != 0 && conveyedSpeedLevel != 0 + && (shaftSpeed > 0) != (conveyedSpeedLevel > 0)) { + movementDirection.setValue(1 - movementDirection.get() + .ordinal()); + conveyedSpeedLevel *= -1; + } + shaft.update(worldPosition, conveyedSpeedLevel, efficiency); if (!level.isClientSide) diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/steam/SteamEngineValueBox.java b/src/main/java/com/simibubi/create/content/contraptions/components/steam/SteamEngineValueBox.java new file mode 100644 index 000000000..2b294850a --- /dev/null +++ b/src/main/java/com/simibubi/create/content/contraptions/components/steam/SteamEngineValueBox.java @@ -0,0 +1,79 @@ +package com.simibubi.create.content.contraptions.components.steam; + +import com.jozufozu.flywheel.util.transform.TransformStack; +import com.mojang.blaze3d.vertex.PoseStack; +import com.simibubi.create.foundation.tileEntity.behaviour.ValueBoxTransform; +import com.simibubi.create.foundation.utility.AngleHelper; +import com.simibubi.create.foundation.utility.Pointing; +import com.simibubi.create.foundation.utility.VecHelper; + +import net.minecraft.core.Direction; +import net.minecraft.core.Direction.Axis; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.Vec3; + +public class SteamEngineValueBox extends ValueBoxTransform.Sided { + + @Override + protected boolean isSideActive(BlockState state, Direction direction) { + return SteamEngineBlock.getFacing(state) + .getAxis() != direction.getAxis(); + } + + @Override + protected Vec3 getLocalOffset(BlockState state) { + Direction side = getSide(); + Direction engineFacing = SteamEngineBlock.getFacing(state); + + float roll = 0; + for (Pointing p : Pointing.values()) { + if (p.getCombinedDirection(engineFacing) == side) + roll = p.getXRotation(); + } + if (engineFacing == Direction.UP) + roll += 180; + + float horizontalAngle = AngleHelper.horizontalAngle(engineFacing); + float verticalAngle = AngleHelper.verticalAngle(engineFacing); + + boolean recessed = roll % 180 == 0; + if (engineFacing.getAxis() == Axis.Y) + recessed ^= state.getValue(SteamEngineBlock.FACING).getAxis() == Axis.X; + + Vec3 local = VecHelper.voxelSpace(8, recessed ? 13 : 15, 9); + + local = VecHelper.rotateCentered(local, roll, Axis.Z); + local = VecHelper.rotateCentered(local, horizontalAngle, Axis.Y); + local = VecHelper.rotateCentered(local, verticalAngle, Axis.X); + + return local; + } + + @Override + protected void rotate(BlockState state, PoseStack ms) { + Direction facing = SteamEngineBlock.getFacing(state); + + if (facing.getAxis() == Axis.Y) { + super.rotate(state, ms); + return; + } + + float roll = 0; + for (Pointing p : Pointing.values()) { + if (p.getCombinedDirection(facing) == getSide()) + roll = p.getXRotation(); + } + + float yRot = AngleHelper.horizontalAngle(facing) + (facing == Direction.DOWN ? 180 : 0); + TransformStack.cast(ms) + .rotateY(yRot) + .rotateX(facing == Direction.DOWN ? -90 : 90) + .rotateY(roll); + } + + @Override + protected Vec3 getSouthLocation() { + return Vec3.ZERO; + } + +} diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionCollider.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionCollider.java index d2710170e..6cdbf9c01 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionCollider.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionCollider.java @@ -88,10 +88,13 @@ public class ContraptionCollider { if (playerType == PlayerType.REMOTE) continue; - if (playerType == PlayerType.SERVER && entity instanceof ServerPlayer) { - ((ServerPlayer) entity).connection.aboveGroundTickCount = 0; + entity.getSelfAndPassengers().forEach(e -> { + if (e instanceof ServerPlayer) + ((ServerPlayer) e).connection.aboveGroundTickCount = 0; + }); + + if (playerType == PlayerType.SERVER) continue; - } if (playerType == PlayerType.CLIENT) if (skipClientPlayer) diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/WindmillBearingBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/WindmillBearingBlock.java index 699da90b5..a28c89f02 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/WindmillBearingBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/WindmillBearingBlock.java @@ -2,6 +2,7 @@ package com.simibubi.create.content.contraptions.components.structureMovement.be import com.simibubi.create.AllTileEntities; import com.simibubi.create.foundation.block.ITE; +import com.simibubi.create.foundation.utility.Couple; import net.minecraft.core.BlockPos; import net.minecraft.world.InteractionHand; @@ -50,5 +51,9 @@ public class WindmillBearingBlock extends BearingBlock implements ITE getTileEntityType() { return AllTileEntities.WINDMILL_BEARING.get(); } + + public static Couple getSpeedRange() { + return Couple.create(1, 16); + } } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/WindmillBearingTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/WindmillBearingTileEntity.java index bea854b50..3be80d2d2 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/WindmillBearingTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/WindmillBearingTileEntity.java @@ -120,7 +120,7 @@ public class WindmillBearingTileEntity extends MechanicalBearingTileEntity { return true; } - static enum RotationDirection implements INamedIconOptions { + public static enum RotationDirection implements INamedIconOptions { CLOCKWISE(AllIcons.I_REFRESH), COUNTER_CLOCKWISE(AllIcons.I_ROTATE_CCW), diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/waterwheel/WaterWheelBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/waterwheel/WaterWheelBlock.java index dded7afdf..058dab2d9 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/waterwheel/WaterWheelBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/waterwheel/WaterWheelBlock.java @@ -9,6 +9,7 @@ import com.simibubi.create.foundation.advancement.AllAdvancements; import com.simibubi.create.foundation.block.ITE; import com.simibubi.create.foundation.config.AllConfigs; import com.simibubi.create.foundation.fluid.FluidHelper; +import com.simibubi.create.foundation.utility.Couple; import com.simibubi.create.foundation.utility.Iterate; import com.simibubi.create.foundation.utility.worldWrappers.WrappedWorld; @@ -215,4 +216,10 @@ public class WaterWheelBlock extends DirectionalKineticBlock implements ITE getSpeedRange() { + Integer base = AllConfigs.SERVER.kinetics.waterWheelBaseSpeed.get(); + Integer flow = AllConfigs.SERVER.kinetics.waterWheelFlowSpeed.get(); + return Couple.create(base, base + 4 * flow); + } + } diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/tank/FluidTankBlock.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/tank/FluidTankBlock.java index 4b09a15d9..126f7c8c1 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/tank/FluidTankBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/tank/FluidTankBlock.java @@ -48,6 +48,7 @@ import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.Vec3; import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.Shapes; import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraftforge.common.util.ForgeSoundType; import net.minecraftforge.common.util.LazyOptional; @@ -130,7 +131,12 @@ public class FluidTankBlock extends Block implements IWrenchable, ITE state.getBlock() instanceof AbstractSimpleShaftBlock, state -> state.getValue(AXIS), AXIS); + super(state -> state.getBlock() instanceof AbstractSimpleShaftBlock + || state.getBlock() instanceof PoweredShaftBlock, state -> state.getValue(AXIS), AXIS); } @Override @@ -128,7 +130,7 @@ public class ShaftBlock extends AbstractSimpleShaftBlock { @Override public Predicate getStatePredicate() { - return AllBlocks.SHAFT::has; + return Predicates.or(AllBlocks.SHAFT::has, AllBlocks.POWERED_SHAFT::has); } @Override diff --git a/src/main/java/com/simibubi/create/content/logistics/block/display/source/KineticStressDisplaySource.java b/src/main/java/com/simibubi/create/content/logistics/block/display/source/KineticStressDisplaySource.java index 98d64e486..117c474e4 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/display/source/KineticStressDisplaySource.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/display/source/KineticStressDisplaySource.java @@ -3,21 +3,51 @@ package com.simibubi.create.content.logistics.block.display.source; import com.simibubi.create.content.contraptions.goggles.IHaveGoggleInformation; import com.simibubi.create.content.contraptions.relays.gauge.StressGaugeTileEntity; import com.simibubi.create.content.logistics.block.display.DisplayLinkContext; -import com.simibubi.create.content.logistics.block.display.target.DisplayTargetStats; +import com.simibubi.create.content.logistics.trains.management.display.FlapDisplayTileEntity; +import com.simibubi.create.foundation.gui.ModularGuiLineBuilder; +import com.simibubi.create.foundation.utility.Lang; import net.minecraft.network.chat.MutableComponent; import net.minecraft.network.chat.TextComponent; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; -public abstract class KineticStressDisplaySource extends NumericSingleLineDisplaySource { - - protected abstract double getValue(StressGaugeTileEntity gaugeTile); +public class KineticStressDisplaySource extends PercentOrProgressBarDisplaySource { @Override - protected MutableComponent provideLine(DisplayLinkContext context, DisplayTargetStats stats) { - if (!(context.getSourceTE() instanceof StressGaugeTileEntity gaugeTile)) - return ZERO; + protected MutableComponent formatNumeric(DisplayLinkContext context, Float currentLevel) { + int mode = getMode(context); + if (mode == 1) + return super.formatNumeric(context, currentLevel); + TextComponent textComponent = new TextComponent(IHaveGoggleInformation.format(currentLevel)); + if (context.getTargetTE() instanceof FlapDisplayTileEntity) + textComponent.append(" "); + return textComponent.append(Lang.translate("generic.unit.stress")); + } - return new TextComponent(IHaveGoggleInformation.format(getValue(gaugeTile))); + private int getMode(DisplayLinkContext context) { + return context.sourceConfig() + .getInt("Mode"); + } + + @Override + protected Float getProgress(DisplayLinkContext context) { + if (!(context.getSourceTE() instanceof StressGaugeTileEntity gaugeTile)) + return null; + + float capacity = gaugeTile.getNetworkCapacity(); + float stress = gaugeTile.getNetworkStress(); + + if (capacity == 0) + return 0f; + + return switch (getMode(context)) { + case 0, 1 -> stress / capacity; + case 2 -> stress; + case 3 -> capacity; + case 4 -> capacity - stress; + default -> 0f; + }; } @Override @@ -25,56 +55,29 @@ public abstract class KineticStressDisplaySource extends NumericSingleLineDispla return true; } - public static class Current extends KineticStressDisplaySource { - - @Override - protected double getValue(StressGaugeTileEntity gaugeTile) { - return gaugeTile.getNetworkStress(); - } - - @Override - protected String getTranslationKey() { - return "kinetic_stress.current"; - } + @Override + protected boolean progressBarActive(DisplayLinkContext context) { + return getMode(context) == 0; } - public static class Max extends KineticStressDisplaySource { - - @Override - protected double getValue(StressGaugeTileEntity gaugeTile) { - return gaugeTile.getNetworkCapacity(); - } - - @Override - protected String getTranslationKey() { - return "kinetic_stress.max"; - } + @Override + @OnlyIn(Dist.CLIENT) + public void initConfigurationWidgets(DisplayLinkContext context, ModularGuiLineBuilder builder, + boolean isFirstLine) { + super.initConfigurationWidgets(context, builder, isFirstLine); + if (isFirstLine) + return; + builder.addSelectionScrollInput(0, 120, + (si, l) -> si + .forOptions(Lang.translatedOptions("display_source.kinetic_stress", "progress_bar", "percent", + "current", "max", "remaining")) + .titled(Lang.translate("display_source.kinetic_stress.display")), + "Mode"); } - public static class Percent extends KineticStressDisplaySource { - - @Override - protected double getValue(StressGaugeTileEntity gaugeTile) { - return gaugeTile.getNetworkStress() / gaugeTile.getNetworkCapacity() * 100; - } - - @Override - protected String getTranslationKey() { - return "kinetic_stress.percent"; - } - } - - public static class Remaining extends KineticStressDisplaySource { - - @Override - protected double getValue(StressGaugeTileEntity gaugeTile) { - return gaugeTile.getNetworkCapacity() - gaugeTile.getNetworkStress(); - } - - @Override - protected String getTranslationKey() { - return "kinetic_stress.remaining"; - } + @Override + protected String getTranslationKey() { + return "kinetic_stress"; } } diff --git a/src/main/java/com/simibubi/create/content/logistics/block/display/source/PercentOrProgressBarDisplaySource.java b/src/main/java/com/simibubi/create/content/logistics/block/display/source/PercentOrProgressBarDisplaySource.java index 5e9809147..3cf68de45 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/display/source/PercentOrProgressBarDisplaySource.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/display/source/PercentOrProgressBarDisplaySource.java @@ -22,7 +22,7 @@ public abstract class PercentOrProgressBarDisplaySource extends NumericSingleLin if (currentLevel == null) return EMPTY_LINE; if (!progressBarActive(context)) - return new TextComponent(formatNumeric(currentLevel)); + return formatNumeric(context, currentLevel); String label = context.sourceConfig() .getString("Label"); @@ -50,13 +50,13 @@ public abstract class PercentOrProgressBarDisplaySource extends NumericSingleLin return new TextComponent(s.toString()); } - protected String formatNumeric(Float currentLevel) { - return Mth.clamp((int) (currentLevel * 100), 0, 100) + "%"; + protected MutableComponent formatNumeric(DisplayLinkContext context, Float currentLevel) { + return new TextComponent(Mth.clamp((int) (currentLevel * 100), 0, 100) + "%"); } @Nullable protected abstract Float getProgress(DisplayLinkContext context); - + protected abstract boolean progressBarActive(DisplayLinkContext context); @Override diff --git a/src/main/java/com/simibubi/create/content/logistics/block/display/source/RedstonePowerDisplaySource.java b/src/main/java/com/simibubi/create/content/logistics/block/display/source/RedstonePowerDisplaySource.java index 4ee7b8d91..172c19d52 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/display/source/RedstonePowerDisplaySource.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/display/source/RedstonePowerDisplaySource.java @@ -4,6 +4,8 @@ import com.simibubi.create.content.logistics.block.display.DisplayLinkContext; import com.simibubi.create.foundation.gui.ModularGuiLineBuilder; import com.simibubi.create.foundation.utility.Lang; +import net.minecraft.network.chat.MutableComponent; +import net.minecraft.network.chat.TextComponent; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraftforge.api.distmarker.Dist; @@ -17,8 +19,8 @@ public class RedstonePowerDisplaySource extends PercentOrProgressBarDisplaySourc } @Override - protected String formatNumeric(Float currentLevel) { - return String.valueOf((int) (currentLevel * 15)); + protected MutableComponent formatNumeric(DisplayLinkContext context, Float currentLevel) { + return new TextComponent(String.valueOf((int) (currentLevel * 15))); } @Override diff --git a/src/main/java/com/simibubi/create/foundation/block/BlockStressDefaults.java b/src/main/java/com/simibubi/create/foundation/block/BlockStressDefaults.java index e37cc643c..1ea374b1b 100644 --- a/src/main/java/com/simibubi/create/foundation/block/BlockStressDefaults.java +++ b/src/main/java/com/simibubi/create/foundation/block/BlockStressDefaults.java @@ -2,7 +2,9 @@ package com.simibubi.create.foundation.block; import java.util.HashMap; import java.util.Map; +import java.util.function.Supplier; +import com.simibubi.create.foundation.utility.Couple; import com.tterrag.registrate.builders.BlockBuilder; import com.tterrag.registrate.util.nullness.NonNullUnaryOperator; @@ -12,14 +14,15 @@ import net.minecraft.world.level.block.Block; public class BlockStressDefaults { /** - * Increment this number if all stress entries should be forced to update in the next release. - * Worlds from the previous version will overwrite potentially changed values - * with the new defaults. + * Increment this number if all stress entries should be forced to update in the + * next release. Worlds from the previous version will overwrite potentially + * changed values with the new defaults. */ public static final int FORCED_UPDATE_VERSION = 2; public static final Map DEFAULT_IMPACTS = new HashMap<>(); public static final Map DEFAULT_CAPACITIES = new HashMap<>(); + public static final Map>> GENERATOR_SPEEDS = new HashMap<>(); public static void setDefaultImpact(ResourceLocation blockId, double impact) { DEFAULT_IMPACTS.put(blockId, impact); @@ -29,20 +32,35 @@ public class BlockStressDefaults { DEFAULT_CAPACITIES.put(blockId, capacity); } + public static void setGeneratorSpeed(ResourceLocation blockId, Supplier> provider) { + GENERATOR_SPEEDS.put(blockId, provider); + } + public static NonNullUnaryOperator> setNoImpact() { return setImpact(0); } public static NonNullUnaryOperator> setImpact(double impact) { return b -> { - setDefaultImpact(new ResourceLocation(b.getOwner().getModid(), b.getName()), impact); + setDefaultImpact(new ResourceLocation(b.getOwner() + .getModid(), b.getName()), impact); return b; }; } public static NonNullUnaryOperator> setCapacity(double capacity) { return b -> { - setDefaultCapacity(new ResourceLocation(b.getOwner().getModid(), b.getName()), capacity); + setDefaultCapacity(new ResourceLocation(b.getOwner() + .getModid(), b.getName()), capacity); + return b; + }; + } + + public static NonNullUnaryOperator> setGeneratorSpeed( + Supplier> provider) { + return b -> { + setGeneratorSpeed(new ResourceLocation(b.getOwner() + .getModid(), b.getName()), provider); return b; }; } diff --git a/src/main/java/com/simibubi/create/foundation/block/BlockStressValues.java b/src/main/java/com/simibubi/create/foundation/block/BlockStressValues.java index 708af3a73..6d2e5f4ff 100644 --- a/src/main/java/com/simibubi/create/foundation/block/BlockStressValues.java +++ b/src/main/java/com/simibubi/create/foundation/block/BlockStressValues.java @@ -5,6 +5,8 @@ import java.util.Map; import javax.annotation.Nullable; +import com.simibubi.create.foundation.utility.Couple; + import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.block.Block; @@ -23,7 +25,8 @@ public class BlockStressValues { @Nullable public static IStressValueProvider getProvider(Block block) { - return getProvider(block.getRegistryName().getNamespace()); + return getProvider(block.getRegistryName() + .getNamespace()); } public static double getImpact(Block block) { @@ -90,6 +93,14 @@ public class BlockStressValues { boolean hasImpact(Block block); boolean hasCapacity(Block block); + + /** + * + * @param block + * @return min, max generated RPM; null if block does not have a stress capacity + */ + @Nullable + Couple getGeneratedRPM(Block block); } } diff --git a/src/main/java/com/simibubi/create/foundation/config/CStress.java b/src/main/java/com/simibubi/create/foundation/config/CStress.java index ae2bc2e28..5ab9d0bc2 100644 --- a/src/main/java/com/simibubi/create/foundation/config/CStress.java +++ b/src/main/java/com/simibubi/create/foundation/config/CStress.java @@ -2,12 +2,12 @@ package com.simibubi.create.foundation.config; import java.util.HashMap; import java.util.Map; +import java.util.function.Supplier; -import com.simibubi.create.AllBlocks; import com.simibubi.create.Create; -import com.simibubi.create.content.contraptions.components.crank.ValveHandleBlock; import com.simibubi.create.foundation.block.BlockStressDefaults; import com.simibubi.create.foundation.block.BlockStressValues.IStressValueProvider; +import com.simibubi.create.foundation.utility.Couple; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.block.Block; @@ -23,20 +23,20 @@ public class CStress extends ConfigBase implements IStressValueProvider { protected void registerAll(Builder builder) { builder.comment("", Comments.su, Comments.impact) .push("impact"); - BlockStressDefaults.DEFAULT_IMPACTS - .forEach((r, i) -> { - if (r.getNamespace().equals(Create.ID)) - getImpacts().put(r, builder.define(r.getPath(), i)); - }); + BlockStressDefaults.DEFAULT_IMPACTS.forEach((r, i) -> { + if (r.getNamespace() + .equals(Create.ID)) + getImpacts().put(r, builder.define(r.getPath(), i)); + }); builder.pop(); builder.comment("", Comments.su, Comments.capacity) .push("capacity"); - BlockStressDefaults.DEFAULT_CAPACITIES - .forEach((r, i) -> { - if (r.getNamespace().equals(Create.ID)) - getCapacities().put(r, builder.define(r.getPath(), i)); - }); + BlockStressDefaults.DEFAULT_CAPACITIES.forEach((r, i) -> { + if (r.getNamespace() + .equals(Create.ID)) + getCapacities().put(r, builder.define(r.getPath(), i)); + }); builder.pop(); } @@ -45,9 +45,8 @@ public class CStress extends ConfigBase implements IStressValueProvider { block = redirectValues(block); ResourceLocation key = block.getRegistryName(); ConfigValue value = getImpacts().get(key); - if (value != null) { + if (value != null) return value.get(); - } return 0; } @@ -56,12 +55,21 @@ public class CStress extends ConfigBase implements IStressValueProvider { block = redirectValues(block); ResourceLocation key = block.getRegistryName(); ConfigValue value = getCapacities().get(key); - if (value != null) { + if (value != null) return value.get(); - } return 0; } + @Override + public Couple getGeneratedRPM(Block block) { + block = redirectValues(block); + ResourceLocation key = block.getRegistryName(); + Supplier> supplier = BlockStressDefaults.GENERATOR_SPEEDS.get(key); + if (supplier == null) + return null; + return supplier.get(); + } + @Override public boolean hasImpact(Block block) { block = redirectValues(block); @@ -77,9 +85,6 @@ public class CStress extends ConfigBase implements IStressValueProvider { } protected Block redirectValues(Block block) { - if (block instanceof ValveHandleBlock) { - return AllBlocks.HAND_CRANK.get(); - } return block; } diff --git a/src/main/java/com/simibubi/create/foundation/data/BuilderTransformers.java b/src/main/java/com/simibubi/create/foundation/data/BuilderTransformers.java index 168c11144..1c5f13e30 100644 --- a/src/main/java/com/simibubi/create/foundation/data/BuilderTransformers.java +++ b/src/main/java/com/simibubi/create/foundation/data/BuilderTransformers.java @@ -220,6 +220,8 @@ public class BuilderTransformers { .texture("3", p.modLoc("block/valve_handle/valve_handle_" + variant))); }) .tag(AllBlockTags.BRITTLE.tag, AllBlockTags.VALVE_HANDLES.tag) + .transform(BlockStressDefaults.setCapacity(8.0)) + .transform(BlockStressDefaults.setGeneratorSpeed(ValveHandleBlock::getSpeedRange)) .onRegister(ItemUseOverrides::addBlock) .item() .tag(AllItemTags.VALVE_HANDLES.tag) diff --git a/src/main/java/com/simibubi/create/foundation/data/recipe/EmptyingRecipeGen.java b/src/main/java/com/simibubi/create/foundation/data/recipe/EmptyingRecipeGen.java index 5f2ab8389..828a10db6 100644 --- a/src/main/java/com/simibubi/create/foundation/data/recipe/EmptyingRecipeGen.java +++ b/src/main/java/com/simibubi/create/foundation/data/recipe/EmptyingRecipeGen.java @@ -26,7 +26,8 @@ public class EmptyingRecipeGen extends ProcessingRecipeGen { FD_MILK = create(Mods.FD.recipeId("milk_bottle"), b -> b.require(Mods.FD, "milk_bottle") .output(ForgeMod.MILK.get(), 250) - .output(Items.GLASS_BOTTLE)) + .output(Items.GLASS_BOTTLE) + .whenModLoaded(Mods.FD.getId())) ; diff --git a/src/main/java/com/simibubi/create/foundation/data/recipe/FillingRecipeGen.java b/src/main/java/com/simibubi/create/foundation/data/recipe/FillingRecipeGen.java index d62f484df..3cdbdc831 100644 --- a/src/main/java/com/simibubi/create/foundation/data/recipe/FillingRecipeGen.java +++ b/src/main/java/com/simibubi/create/foundation/data/recipe/FillingRecipeGen.java @@ -23,23 +23,24 @@ public class FillingRecipeGen extends ProcessingRecipeGen { BUILDERS_TEA = create("builders_tea", b -> b.require(AllFluids.TEA.get(), 250) .require(Items.GLASS_BOTTLE) .output(AllItems.BUILDERS_TEA.get())), - + FD_MILK = create(Mods.FD.recipeId("milk_bottle"), b -> b.require(Tags.Fluids.MILK, 250) .require(Items.GLASS_BOTTLE) - .output(1, Mods.FD, "milk_bottle", 1)), + .output(1, Mods.FD, "milk_bottle", 1) + .whenModLoaded(Mods.FD.getId())), BLAZE_CAKE = create("blaze_cake", b -> b.require(Fluids.LAVA, 250) .require(AllItems.BLAZE_CAKE_BASE.get()) .output(AllItems.BLAZE_CAKE.get())), - + HONEYED_APPLE = create("honeyed_apple", b -> b.require(AllFluidTags.HONEY.tag, 250) .require(Items.APPLE) .output(AllItems.HONEYED_APPLE.get())), - + SWEET_ROLL = create("sweet_roll", b -> b.require(Tags.Fluids.MILK, 250) .require(Items.BREAD) .output(AllItems.SWEET_ROLL.get())), - + CHOCOLATE_BERRIES = create("chocolate_glazed_berries", b -> b.require(AllFluids.CHOCOLATE.get(), 250) .require(Items.SWEET_BERRIES) .output(AllItems.CHOCOLATE_BERRIES.get())), diff --git a/src/main/java/com/simibubi/create/foundation/item/ItemDescription.java b/src/main/java/com/simibubi/create/foundation/item/ItemDescription.java index e3a56e87f..3b600a775 100644 --- a/src/main/java/com/simibubi/create/foundation/item/ItemDescription.java +++ b/src/main/java/com/simibubi/create/foundation/item/ItemDescription.java @@ -22,13 +22,13 @@ import java.util.Arrays; import java.util.List; import com.simibubi.create.content.contraptions.base.IRotate; -import com.simibubi.create.content.contraptions.base.IRotate.SpeedLevel; import com.simibubi.create.content.contraptions.base.IRotate.StressImpact; -import com.simibubi.create.content.contraptions.components.waterwheel.WaterWheelBlock; import com.simibubi.create.content.contraptions.goggles.GogglesItem; +import com.simibubi.create.content.contraptions.goggles.IHaveGoggleInformation; import com.simibubi.create.foundation.block.BlockStressValues; import com.simibubi.create.foundation.config.AllConfigs; import com.simibubi.create.foundation.config.CKinetics; +import com.simibubi.create.foundation.utility.Couple; import com.simibubi.create.foundation.utility.Lang; import net.minecraft.ChatFormatting; @@ -86,42 +86,21 @@ public class ItemDescription { CKinetics config = AllConfigs.SERVER.kinetics; Component rpmUnit = Lang.translate("generic.unit.rpm"); + Component suUnit = Lang.translate("generic.unit.stress"); boolean hasGoggles = GogglesItem.isWearingGoggles(Minecraft.getInstance().player); - SpeedLevel minimumRequiredSpeedLevel; boolean showStressImpact; if (!(block instanceof IRotate)) { - minimumRequiredSpeedLevel = SpeedLevel.NONE; showStressImpact = true; } else { - minimumRequiredSpeedLevel = ((IRotate) block).getMinimumRequiredSpeedLevel(); showStressImpact = !((IRotate) block).hideStressImpact(); } -// boolean hasSpeedRequirement = -// minimumRequiredSpeedLevel != SpeedLevel.NONE && minimumRequiredSpeedLevel != SpeedLevel.SLOW; boolean hasStressImpact = StressImpact.isEnabled() && showStressImpact && BlockStressValues.getImpact(block) > 0; boolean hasStressCapacity = StressImpact.isEnabled() && BlockStressValues.hasCapacity(block); -// if (hasSpeedRequirement) { -// int index = minimumRequiredSpeedLevel.ordinal(); -// MutableComponent level = -// new TextComponent(makeProgressBar(3, index)).withStyle(minimumRequiredSpeedLevel.getTextColor()); -// -// if (hasGoggles) -// level.append(String.valueOf(minimumRequiredSpeedLevel.getSpeedValue())) -// .append(rpmUnit) -// .append("+"); -// else -// level.append(Lang.translate("tooltip.speedRequirement." + Lang.asId(minimumRequiredSpeedLevel.name()))); -// -// list.add(Lang.translate("tooltip.speedRequirement") -// .withStyle(GRAY)); -// list.add(level); -// } - if (hasStressImpact) { double impact = BlockStressValues.getImpact(block); StressImpact impactId = impact >= config.highStressImpact.get() ? StressImpact.HIGH @@ -130,7 +109,7 @@ public class ItemDescription { new TextComponent(makeProgressBar(3, impactId.ordinal() + 1)).withStyle(impactId.getAbsoluteColor()); if (hasGoggles) - level.append(impact + "x ") + level.append(IHaveGoggleInformation.format(impact) + "x ") .append(rpmUnit); else level.append(Lang.translate("tooltip.stressImpact." + Lang.asId(impactId.name()))); @@ -142,25 +121,36 @@ public class ItemDescription { if (hasStressCapacity) { double capacity = BlockStressValues.getCapacity(block); + Couple generatedRPM = BlockStressValues.getProvider(block) + .getGeneratedRPM(block); + StressImpact impactId = capacity >= config.highCapacity.get() ? StressImpact.HIGH : (capacity >= config.mediumCapacity.get() ? StressImpact.MEDIUM : StressImpact.LOW); StressImpact opposite = StressImpact.values()[StressImpact.values().length - 2 - impactId.ordinal()]; MutableComponent level = new TextComponent(makeProgressBar(3, impactId.ordinal() + 1)).withStyle(opposite.getAbsoluteColor()); - if (hasGoggles) - level.append(capacity + "x ") - .append(rpmUnit); - else - level.append(Lang.translate("tooltip.capacityProvided." + Lang.asId(opposite.name()))); - -// if (!isEngine && ((IRotate) block).showCapacityWithAnnotation()) -// level += -// " " + DARK_GRAY + TextFormatting.ITALIC + Lang.translate("tooltip.capacityProvided.asGenerator"); - list.add(Lang.translate("tooltip.capacityProvided") .withStyle(GRAY)); - list.add(level); + + if (hasGoggles) { + level.append(IHaveGoggleInformation.format(capacity) + "x ") + .append(rpmUnit); + list.add(level); + + if (generatedRPM != null) { + MutableComponent amount = + new TextComponent(IHaveGoggleInformation.format(capacity * generatedRPM.getSecond())) + .append(suUnit); + MutableComponent component = !generatedRPM.getFirst() + .equals(generatedRPM.getSecond()) ? Lang.translate("tooltip.up_to", amount) : amount; + list.add(new TextComponent(" -> ").append(component) + .withStyle(DARK_GRAY)); + } + } else { + level.append(Lang.translate("tooltip.capacityProvided." + Lang.asId(impactId.name()))); + list.add(level); + } MutableComponent genSpeed = generatorSpeed(block, rpmUnit); if (!genSpeed.getString() @@ -169,8 +159,6 @@ public class ItemDescription { .withStyle(DARK_GRAY)); } - // if (hasSpeedRequirement || hasStressImpact || hasStressCapacity) - // add(linesOnShift, ""); return list; } @@ -297,16 +285,7 @@ public class ItemDescription { } private static MutableComponent generatorSpeed(Block block, Component unitRPM) { - String value = ""; - - if (block instanceof WaterWheelBlock) { - int baseSpeed = AllConfigs.SERVER.kinetics.waterWheelBaseSpeed.get(); - int speedmod = AllConfigs.SERVER.kinetics.waterWheelFlowSpeed.get(); - value = (speedmod + baseSpeed) + "-" + (baseSpeed + (speedmod * 3)); - } - - return !value.equals("") ? Lang.translate("tooltip.generationSpeed", value, unitRPM) - : TextComponent.EMPTY.plainCopy(); + return TextComponent.EMPTY.plainCopy(); } } diff --git a/src/main/resources/assets/create/lang/default/interface.json b/src/main/resources/assets/create/lang/default/interface.json index 26f552511..e7585d23c 100644 --- a/src/main/resources/assets/create/lang/default/interface.json +++ b/src/main/resources/assets/create/lang/default/interface.json @@ -486,6 +486,7 @@ "create.tooltip.stressImpact.high": "High", "create.tooltip.stressImpact.overstressed": "Overstressed", + "create.tooltip.up_to": "Up to %1$s", "create.tooltip.capacityProvided": "Kinetic Stress Capacity: %1$s", "create.tooltip.capacityProvided.low": "Small", "create.tooltip.capacityProvided.medium": "Medium", @@ -850,10 +851,13 @@ "create.display_source.kinetic_speed": "Rotation Speed (RPM)", "create.display_source.kinetic_speed.absolute": "Ignore Direction", "create.display_source.kinetic_speed.directional": "Include Direction", - "create.display_source.kinetic_stress.current": "Stress Impact (Amount)", - "create.display_source.kinetic_stress.max": "Stress Capacity (Max)", - "create.display_source.kinetic_stress.percent": "Stress Impact (Percent)", - "create.display_source.kinetic_stress.remaining": "Stress Capacity (Remaining)", + "create.display_source.kinetic_stress": "Network Stress", + "create.display_source.kinetic_stress.display": "Displayed Info", + "create.display_source.kinetic_stress.progress_bar": "Progress Bar", + "create.display_source.kinetic_stress.percent": "Percentage", + "create.display_source.kinetic_stress.current": "Stress in SU", + "create.display_source.kinetic_stress.max": "Total Capacity", + "create.display_source.kinetic_stress.remaining": "Remaining SU", "create.display_source.redstone_power": "Redstone Power", "create.display_source.redstone_power.display": "Display Format", "create.display_source.redstone_power.number": "Number",