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
This commit is contained in:
simibubi 2022-06-20 21:48:54 +02:00
parent e0a8c7afd1
commit 65bacbde20
46 changed files with 539 additions and 259 deletions

View file

@ -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

View file

@ -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",

View file

@ -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",

View file

@ -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",

View file

@ -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",

View file

@ -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",

View file

@ -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",

View file

@ -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",

View file

@ -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",

View file

@ -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",

View file

@ -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",

View file

@ -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",

View file

@ -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",

View file

@ -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",

View file

@ -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",

View file

@ -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",

View file

@ -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",

View file

@ -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<FluidTankBlock> 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();

View file

@ -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() {

View file

@ -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<HandC
public boolean isPathfindable(BlockState state, BlockGetter reader, BlockPos pos, PathComputationType type) {
return false;
}
public static Couple<Integer> getSpeedRange() {
return Couple.create(32, 32);
}
}

View file

@ -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<Integer> getSpeedRange() {
return Couple.create(16, 16);
}
}

View file

@ -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;

View file

@ -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<Component> tooltip, boolean isPlayerSneaking) {
return false;

View file

@ -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<Integer> getSpeedRange() {
return Couple.create(16, 64);
}
}

View file

@ -77,5 +77,10 @@ public class SteamEngineRenderer extends SafeTileEntityRenderer<SteamEngineTileE
.rotateY(AngleHelper.horizontalAngle(facing))
.rotateX(AngleHelper.verticalAngle(facing) + 90);
}
@Override
public int getViewDistance() {
return 128;
}
}

View file

@ -10,12 +10,15 @@ import com.simibubi.create.AllSoundEvents;
import com.simibubi.create.content.contraptions.base.GeneratingKineticTileEntity;
import com.simibubi.create.content.contraptions.base.IRotate;
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
import com.simibubi.create.content.contraptions.components.structureMovement.bearing.WindmillBearingTileEntity.RotationDirection;
import com.simibubi.create.content.contraptions.fluids.tank.FluidTankTileEntity;
import com.simibubi.create.content.contraptions.goggles.IHaveGoggleInformation;
import com.simibubi.create.foundation.advancement.AllAdvancements;
import com.simibubi.create.foundation.tileEntity.SmartTileEntity;
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
import com.simibubi.create.foundation.tileEntity.behaviour.scrollvalue.ScrollOptionBehaviour;
import com.simibubi.create.foundation.utility.AngleHelper;
import com.simibubi.create.foundation.utility.Lang;
import com.simibubi.create.foundation.utility.VecHelper;
import net.minecraft.core.BlockPos;
@ -37,6 +40,8 @@ import net.minecraftforge.fml.DistExecutor;
public class SteamEngineTileEntity extends SmartTileEntity implements IHaveGoggleInformation {
protected ScrollOptionBehaviour<RotationDirection> movementDirection;
public WeakReference<PoweredShaftTileEntity> target;
public WeakReference<FluidTankTileEntity> source;
@ -48,9 +53,21 @@ public class SteamEngineTileEntity extends SmartTileEntity implements IHaveGoggl
@Override
public void addBehaviours(List<TileEntityBehaviour> 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)

View file

@ -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;
}
}

View file

@ -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)

View file

@ -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<WindmillBe
public BlockEntityType<? extends WindmillBearingTileEntity> getTileEntityType() {
return AllTileEntities.WINDMILL_BEARING.get();
}
public static Couple<Integer> getSpeedRange() {
return Couple.create(1, 16);
}
}

View file

@ -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),

View file

@ -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<Wate
return AllTileEntities.WATER_WHEEL.get();
}
public static Couple<Integer> getSpeedRange() {
Integer base = AllConfigs.SERVER.kinetics.waterWheelBaseSpeed.get();
Integer flow = AllConfigs.SERVER.kinetics.waterWheelFlowSpeed.get();
return Couple.create(base, base + 4 * flow);
}
}

View file

@ -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<FluidTankT
return CAMPFIRE_SMOKE_CLIP;
return pState.getShape(pLevel, pPos);
}
@Override
public VoxelShape getBlockSupportShape(BlockState pState, BlockGetter pReader, BlockPos pPos) {
return Shapes.block();
}
@Override
public BlockState updateShape(BlockState pState, Direction pDirection, BlockState pNeighborState,
LevelAccessor pLevel, BlockPos pCurrentPos, BlockPos pNeighborPos) {

View file

@ -132,9 +132,9 @@ public class BlazeBurnerRenderer extends SafeTileEntityRenderer<BlazeBurnerTileE
.renderInto(ms, solid);
draw(CachedBufferer.partial(rods, blockState)
.translate(0, offset1 + animation, 0), 0, modelTransform, ms, solid);
.translate(0, offset1 + animation + .125f, 0), 0, modelTransform, ms, solid);
draw(CachedBufferer.partial(rods2, blockState)
.translate(0, offset2 + animation - .25f, 0), 0, modelTransform, ms, solid);
.translate(0, offset2 + animation - 3 / 16f, 0), 0, modelTransform, ms, solid);
ms.popPose();
}

View file

@ -263,7 +263,7 @@ public class BlazeBurnerTileEntity extends SmartTileEntity {
level = HeatLevel.SEETHING;
break;
case NORMAL:
boolean lowPercent = (double) remainingBurnTime / MAX_HEAT_CAPACITY < 0.1;
boolean lowPercent = (double) remainingBurnTime / MAX_HEAT_CAPACITY < 0.0125;
level = lowPercent ? HeatLevel.FADING : HeatLevel.KINDLED;
break;
default:

View file

@ -2,6 +2,7 @@ package com.simibubi.create.content.contraptions.relays.elementary;
import java.util.function.Predicate;
import com.google.common.base.Predicates;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllShapes;
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
@ -32,7 +33,7 @@ import net.minecraft.world.phys.shapes.VoxelShape;
public class ShaftBlock extends AbstractSimpleShaftBlock {
private static final int placementHelperId = PlacementHelpers.register(new PlacementHelper());
public static final int placementHelperId = PlacementHelpers.register(new PlacementHelper());
public ShaftBlock(Properties properties) {
super(properties);
@ -117,7 +118,8 @@ public class ShaftBlock extends AbstractSimpleShaftBlock {
// shafts and cogs
private PlacementHelper() {
super(state -> 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<BlockState> getStatePredicate() {
return AllBlocks.SHAFT::has;
return Predicates.or(AllBlocks.SHAFT::has, AllBlocks.POWERED_SHAFT::has);
}
@Override

View file

@ -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";
}
}

View file

@ -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

View file

@ -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

View file

@ -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<ResourceLocation, Double> DEFAULT_IMPACTS = new HashMap<>();
public static final Map<ResourceLocation, Double> DEFAULT_CAPACITIES = new HashMap<>();
public static final Map<ResourceLocation, Supplier<Couple<Integer>>> 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<Couple<Integer>> provider) {
GENERATOR_SPEEDS.put(blockId, provider);
}
public static <B extends Block, P> NonNullUnaryOperator<BlockBuilder<B, P>> setNoImpact() {
return setImpact(0);
}
public static <B extends Block, P> NonNullUnaryOperator<BlockBuilder<B, P>> 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 <B extends Block, P> NonNullUnaryOperator<BlockBuilder<B, P>> 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 <B extends Block, P> NonNullUnaryOperator<BlockBuilder<B, P>> setGeneratorSpeed(
Supplier<Couple<Integer>> provider) {
return b -> {
setGeneratorSpeed(new ResourceLocation(b.getOwner()
.getModid(), b.getName()), provider);
return b;
};
}

View file

@ -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<Integer> getGeneratedRPM(Block block);
}
}

View file

@ -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<Double> 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<Double> value = getCapacities().get(key);
if (value != null) {
if (value != null)
return value.get();
}
return 0;
}
@Override
public Couple<Integer> getGeneratedRPM(Block block) {
block = redirectValues(block);
ResourceLocation key = block.getRegistryName();
Supplier<Couple<Integer>> 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;
}

View file

@ -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)

View file

@ -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()))
;

View file

@ -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())),

View file

@ -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<Integer> 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();
}
}

View file

@ -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",