mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-14 19:13:42 +01:00
Miscellaneous fixes and improvements
- Fix ColorAttribute not showing color name - Refactor some code related to SpeedLevel - Improve goggles predicate API - Make ToolboxInventory use Item#canFitInsideContainerItems - Prevent toolbox items from being placed inside of shulker boxes - Fix shadow steel always converting below y=0 instead of the min build height
This commit is contained in:
parent
bf1b6382ee
commit
c1ba7683a7
66 changed files with 240 additions and 204 deletions
10
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
10
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
|
@ -11,7 +11,7 @@ body:
|
||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
label: Reproduction Steps
|
label: Reproduction Steps
|
||||||
description: Tell us about the steps to reproduce the bug
|
description: Tell us about the steps to reproduce the bug.
|
||||||
value: |
|
value: |
|
||||||
1.
|
1.
|
||||||
2.
|
2.
|
||||||
|
@ -28,13 +28,13 @@ body:
|
||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
label: Screenshots and Videos
|
label: Screenshots and Videos
|
||||||
description: If applicable, add screenshots or videos to help explain your problem
|
description: If applicable, add screenshots or videos to help explain your problem.
|
||||||
validations:
|
validations:
|
||||||
required: false
|
required: false
|
||||||
- type: input
|
- type: input
|
||||||
attributes:
|
attributes:
|
||||||
label: Crash Report or Log
|
label: Crash Report or Log
|
||||||
description: If applicable, please add a **link** to the crash report or log that was created when this issue occured. You can upload the crash report to a site like Pastebin or GitHub Gist. Please **do not** paste the whole crash report in this issue
|
description: If applicable, please add a **link** to the crash report or log that was created when this issue occured. You can upload the crash report to a site like Pastebin or GitHub Gist. Please **do not** paste the whole crash report in this issue.
|
||||||
validations:
|
validations:
|
||||||
required: false
|
required: false
|
||||||
- type: input
|
- type: input
|
||||||
|
@ -121,7 +121,7 @@ body:
|
||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
label: Other Mods
|
label: Other Mods
|
||||||
description: Please list any other mods that were running when the crash happened
|
description: Please list any other mods that were running when the crash happened.
|
||||||
validations:
|
validations:
|
||||||
required: false
|
required: false
|
||||||
- type: textarea
|
- type: textarea
|
||||||
|
@ -132,4 +132,4 @@ body:
|
||||||
required: false
|
required: false
|
||||||
- type: markdown
|
- type: markdown
|
||||||
attributes:
|
attributes:
|
||||||
value: "Thank you for taking the time to make this bug report and to help improve Create"
|
value: "Thank you for taking the time to make this bug report and help improve Create!"
|
||||||
|
|
6
.github/ISSUE_TEMPLATE/suggestion.yml
vendored
6
.github/ISSUE_TEMPLATE/suggestion.yml
vendored
|
@ -11,15 +11,15 @@ body:
|
||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
label: Screenshots and Videos
|
label: Screenshots and Videos
|
||||||
description: If applicable, add screenshots or videos to help explain your suggestion
|
description: If applicable, add screenshots or videos to help explain your suggestion.
|
||||||
validations:
|
validations:
|
||||||
required: false
|
required: false
|
||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
label: Additional Context
|
label: Additional Context
|
||||||
description: Add any extra context about the suggestion here
|
description: Add any extra context about the suggestion here.
|
||||||
validations:
|
validations:
|
||||||
required: false
|
required: false
|
||||||
- type: markdown
|
- type: markdown
|
||||||
attributes:
|
attributes:
|
||||||
value: "Thank you for taking the time to make this suggestion and to help improve Create"
|
value: "Thank you for taking the time to make this suggestion and help improve Create!"
|
||||||
|
|
|
@ -531,21 +531,21 @@ bf2b0310500213ff853c748c236eb5d01f61658e assets/create/blockstates/yellow_toolbo
|
||||||
7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json
|
7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json
|
||||||
b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json
|
b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json
|
||||||
7880ce16e8b649e26d01cecee271648027f26651 assets/create/lang/en_ud.json
|
7880ce16e8b649e26d01cecee271648027f26651 assets/create/lang/en_ud.json
|
||||||
aca02d2ab91e288e65e07470a117ace325299130 assets/create/lang/en_us.json
|
194fbc2c94d07a5fc1712c8b579973e92fafa5d8 assets/create/lang/en_us.json
|
||||||
64aa458040affc16c4412297cdb5ee13ad010660 assets/create/lang/unfinished/de_de.json
|
a711143e849fdc488e43e8eb284248955bbf1ceb assets/create/lang/unfinished/de_de.json
|
||||||
7f36bcf491d6890a563c8d03c281e300576f446d assets/create/lang/unfinished/es_cl.json
|
f5218855767129457b3e10ae1d7c254b5af29f27 assets/create/lang/unfinished/es_cl.json
|
||||||
0c44dc2a7f3157c463a26900ec75b0278b372cc9 assets/create/lang/unfinished/es_es.json
|
92882d65db2ee109a3e79d4156277f925f4a387c assets/create/lang/unfinished/es_es.json
|
||||||
ee7d298b7234ba25b373eb9d9f2a3ec52aeca233 assets/create/lang/unfinished/fr_fr.json
|
02f3a6a3a281d59489cb0c02db249aaff7aaa433 assets/create/lang/unfinished/fr_fr.json
|
||||||
e642827b0c2530c490f6a4961cba9f6d91d3783c assets/create/lang/unfinished/it_it.json
|
fd2eb2cc4987ae9ddadd6452fc853091b6a93982 assets/create/lang/unfinished/it_it.json
|
||||||
e92011006f03ed066b51eb5d03011a982589ff37 assets/create/lang/unfinished/ja_jp.json
|
64d40f6fb9a873b8c107b82236f0b8fddc010c72 assets/create/lang/unfinished/ja_jp.json
|
||||||
6441efd98496beff0dcfbd15fd1dd20f5e26eaaf assets/create/lang/unfinished/ko_kr.json
|
7b680aca19dd1b015e72c1af91f388313eabcfac assets/create/lang/unfinished/ko_kr.json
|
||||||
2313eaab1f7eabd4d6d481c139e3fe84ebb4a1eb assets/create/lang/unfinished/nl_nl.json
|
bae90b8439e02d2f97f0eb65f2261e4e0d80aea5 assets/create/lang/unfinished/nl_nl.json
|
||||||
5a35cb79c97578730d20f766a59443afe484ad03 assets/create/lang/unfinished/pl_pl.json
|
d640931ab5f23128910228880a4beccd45af3cce assets/create/lang/unfinished/pl_pl.json
|
||||||
1112631bcb7d1503dec6e605ef1c4828a1726551 assets/create/lang/unfinished/pt_br.json
|
f2ecb8fdd15cd042198d50e25b9dcafc9409423e assets/create/lang/unfinished/pt_br.json
|
||||||
36b1368644fb946a97044610932e2a11ddf508b3 assets/create/lang/unfinished/pt_pt.json
|
0baffa79e99e78a81d9933c44aeefe6282e634ea assets/create/lang/unfinished/pt_pt.json
|
||||||
8ffe7f27cd6fce29116f9e0920c792376545aa2c assets/create/lang/unfinished/ru_ru.json
|
c77ae5ebbbd4ead7a641b9a2bf8b17073e73ecb9 assets/create/lang/unfinished/ru_ru.json
|
||||||
967dd607e8784ad7d8851c18f89e32661543a394 assets/create/lang/unfinished/zh_cn.json
|
9acc0e92774c0e4b6207f08d3a85a81b1a7a0734 assets/create/lang/unfinished/zh_cn.json
|
||||||
5cd389eba3817fc4d5cbaa0ce15ccdb7fbe6c0bf assets/create/lang/unfinished/zh_tw.json
|
60b348950274d79f267ae8e6283e5a23a6c65720 assets/create/lang/unfinished/zh_tw.json
|
||||||
487a511a01b2a4531fb672f917922312db78f958 assets/create/models/block/acacia_window.json
|
487a511a01b2a4531fb672f917922312db78f958 assets/create/models/block/acacia_window.json
|
||||||
b48060cba1a382f373a05bf0039054053eccf076 assets/create/models/block/acacia_window_pane_noside.json
|
b48060cba1a382f373a05bf0039054053eccf076 assets/create/models/block/acacia_window_pane_noside.json
|
||||||
3066db1bf03cffa1a9c7fbacf47ae586632f4eb3 assets/create/models/block/acacia_window_pane_noside_alt.json
|
3066db1bf03cffa1a9c7fbacf47ae586632f4eb3 assets/create/models/block/acacia_window_pane_noside_alt.json
|
||||||
|
|
|
@ -1231,8 +1231,9 @@
|
||||||
"create.tooltip.keyCtrl": "Ctrl",
|
"create.tooltip.keyCtrl": "Ctrl",
|
||||||
"create.tooltip.speedRequirement": "Speed Requirement: %1$s",
|
"create.tooltip.speedRequirement": "Speed Requirement: %1$s",
|
||||||
"create.tooltip.speedRequirement.none": "None",
|
"create.tooltip.speedRequirement.none": "None",
|
||||||
|
"create.tooltip.speedRequirement.slow": "Slow",
|
||||||
"create.tooltip.speedRequirement.medium": "Moderate",
|
"create.tooltip.speedRequirement.medium": "Moderate",
|
||||||
"create.tooltip.speedRequirement.high": "Fast",
|
"create.tooltip.speedRequirement.fast": "Fast",
|
||||||
"create.tooltip.stressImpact": "Kinetic Stress Impact: %1$s",
|
"create.tooltip.stressImpact": "Kinetic Stress Impact: %1$s",
|
||||||
"create.tooltip.stressImpact.low": "Low",
|
"create.tooltip.stressImpact.low": "Low",
|
||||||
"create.tooltip.stressImpact.medium": "Moderate",
|
"create.tooltip.stressImpact.medium": "Moderate",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 1324",
|
"_": "Missing Localizations: 1325",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -1232,8 +1232,9 @@
|
||||||
"create.tooltip.keyCtrl": "Strg",
|
"create.tooltip.keyCtrl": "Strg",
|
||||||
"create.tooltip.speedRequirement": "Geschwindigkeitsanforderung: %1$s",
|
"create.tooltip.speedRequirement": "Geschwindigkeitsanforderung: %1$s",
|
||||||
"create.tooltip.speedRequirement.none": "Keine",
|
"create.tooltip.speedRequirement.none": "Keine",
|
||||||
|
"create.tooltip.speedRequirement.slow": "UNLOCALIZED: Slow",
|
||||||
"create.tooltip.speedRequirement.medium": "Moderat",
|
"create.tooltip.speedRequirement.medium": "Moderat",
|
||||||
"create.tooltip.speedRequirement.high": "Schnell",
|
"create.tooltip.speedRequirement.fast": "Schnell",
|
||||||
"create.tooltip.stressImpact": "Kinetische Belastungsauswirkung: %1$s",
|
"create.tooltip.stressImpact": "Kinetische Belastungsauswirkung: %1$s",
|
||||||
"create.tooltip.stressImpact.low": "Niedrig",
|
"create.tooltip.stressImpact.low": "Niedrig",
|
||||||
"create.tooltip.stressImpact.medium": "Moderat",
|
"create.tooltip.stressImpact.medium": "Moderat",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 335",
|
"_": "Missing Localizations: 336",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -1232,8 +1232,9 @@
|
||||||
"create.tooltip.keyCtrl": "Ctrl",
|
"create.tooltip.keyCtrl": "Ctrl",
|
||||||
"create.tooltip.speedRequirement": "Requqrimiento de Velocidad: %1$s",
|
"create.tooltip.speedRequirement": "Requqrimiento de Velocidad: %1$s",
|
||||||
"create.tooltip.speedRequirement.none": "Ninguno",
|
"create.tooltip.speedRequirement.none": "Ninguno",
|
||||||
|
"create.tooltip.speedRequirement.slow": "UNLOCALIZED: Slow",
|
||||||
"create.tooltip.speedRequirement.medium": "Moderado",
|
"create.tooltip.speedRequirement.medium": "Moderado",
|
||||||
"create.tooltip.speedRequirement.high": "Rápidp",
|
"create.tooltip.speedRequirement.fast": "Rápido",
|
||||||
"create.tooltip.stressImpact": "Impacto en el Estrés Cinético: %1$s",
|
"create.tooltip.stressImpact": "Impacto en el Estrés Cinético: %1$s",
|
||||||
"create.tooltip.stressImpact.low": "Bajo",
|
"create.tooltip.stressImpact.low": "Bajo",
|
||||||
"create.tooltip.stressImpact.medium": "Moderado",
|
"create.tooltip.stressImpact.medium": "Moderado",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 6",
|
"_": "Missing Localizations: 7",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -1232,8 +1232,9 @@
|
||||||
"create.tooltip.keyCtrl": "Ctrl",
|
"create.tooltip.keyCtrl": "Ctrl",
|
||||||
"create.tooltip.speedRequirement": "Requisitos de velocidad: %1$s",
|
"create.tooltip.speedRequirement": "Requisitos de velocidad: %1$s",
|
||||||
"create.tooltip.speedRequirement.none": "Ninguno",
|
"create.tooltip.speedRequirement.none": "Ninguno",
|
||||||
|
"create.tooltip.speedRequirement.slow": "UNLOCALIZED: Slow",
|
||||||
"create.tooltip.speedRequirement.medium": "Moderado",
|
"create.tooltip.speedRequirement.medium": "Moderado",
|
||||||
"create.tooltip.speedRequirement.high": "Rápido",
|
"create.tooltip.speedRequirement.fast": "Rápido",
|
||||||
"create.tooltip.stressImpact": "Impacto de estrés: %1$s",
|
"create.tooltip.stressImpact": "Impacto de estrés: %1$s",
|
||||||
"create.tooltip.stressImpact.low": "Bajo",
|
"create.tooltip.stressImpact.low": "Bajo",
|
||||||
"create.tooltip.stressImpact.medium": "Moderado",
|
"create.tooltip.stressImpact.medium": "Moderado",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 1586",
|
"_": "Missing Localizations: 1587",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -1232,8 +1232,9 @@
|
||||||
"create.tooltip.keyCtrl": "Ctrl",
|
"create.tooltip.keyCtrl": "Ctrl",
|
||||||
"create.tooltip.speedRequirement": "Vitesse requise: %1$s",
|
"create.tooltip.speedRequirement": "Vitesse requise: %1$s",
|
||||||
"create.tooltip.speedRequirement.none": "Aucune",
|
"create.tooltip.speedRequirement.none": "Aucune",
|
||||||
|
"create.tooltip.speedRequirement.slow": "UNLOCALIZED: Slow",
|
||||||
"create.tooltip.speedRequirement.medium": "Modérée",
|
"create.tooltip.speedRequirement.medium": "Modérée",
|
||||||
"create.tooltip.speedRequirement.high": "Rapide",
|
"create.tooltip.speedRequirement.fast": "Rapide",
|
||||||
"create.tooltip.stressImpact": "Impact du stress: %1$s",
|
"create.tooltip.stressImpact": "Impact du stress: %1$s",
|
||||||
"create.tooltip.stressImpact.low": "Faible",
|
"create.tooltip.stressImpact.low": "Faible",
|
||||||
"create.tooltip.stressImpact.medium": "Modéré",
|
"create.tooltip.stressImpact.medium": "Modéré",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 1275",
|
"_": "Missing Localizations: 1276",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -1232,8 +1232,9 @@
|
||||||
"create.tooltip.keyCtrl": "Ctrl",
|
"create.tooltip.keyCtrl": "Ctrl",
|
||||||
"create.tooltip.speedRequirement": "Velocità richiesta: %1$s",
|
"create.tooltip.speedRequirement": "Velocità richiesta: %1$s",
|
||||||
"create.tooltip.speedRequirement.none": "Nessuna",
|
"create.tooltip.speedRequirement.none": "Nessuna",
|
||||||
|
"create.tooltip.speedRequirement.slow": "UNLOCALIZED: Slow",
|
||||||
"create.tooltip.speedRequirement.medium": "Moderata",
|
"create.tooltip.speedRequirement.medium": "Moderata",
|
||||||
"create.tooltip.speedRequirement.high": "Veloce",
|
"create.tooltip.speedRequirement.fast": "Veloce",
|
||||||
"create.tooltip.stressImpact": "Impatto sullo stress: %1$s",
|
"create.tooltip.stressImpact": "Impatto sullo stress: %1$s",
|
||||||
"create.tooltip.stressImpact.low": "Basso",
|
"create.tooltip.stressImpact.low": "Basso",
|
||||||
"create.tooltip.stressImpact.medium": "Moderato",
|
"create.tooltip.stressImpact.medium": "Moderato",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 1",
|
"_": "Missing Localizations: 2",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -1232,8 +1232,9 @@
|
||||||
"create.tooltip.keyCtrl": "Ctrl",
|
"create.tooltip.keyCtrl": "Ctrl",
|
||||||
"create.tooltip.speedRequirement": "必要な回転速度: %1$s",
|
"create.tooltip.speedRequirement": "必要な回転速度: %1$s",
|
||||||
"create.tooltip.speedRequirement.none": "無し",
|
"create.tooltip.speedRequirement.none": "無し",
|
||||||
|
"create.tooltip.speedRequirement.slow": "UNLOCALIZED: Slow",
|
||||||
"create.tooltip.speedRequirement.medium": "中速",
|
"create.tooltip.speedRequirement.medium": "中速",
|
||||||
"create.tooltip.speedRequirement.high": "高速",
|
"create.tooltip.speedRequirement.fast": "高速",
|
||||||
"create.tooltip.stressImpact": "応力への影響: %1$s",
|
"create.tooltip.stressImpact": "応力への影響: %1$s",
|
||||||
"create.tooltip.stressImpact.low": "低",
|
"create.tooltip.stressImpact.low": "低",
|
||||||
"create.tooltip.stressImpact.medium": "中",
|
"create.tooltip.stressImpact.medium": "中",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 1",
|
"_": "Missing Localizations: 2",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -1232,8 +1232,9 @@
|
||||||
"create.tooltip.keyCtrl": "Ctrl",
|
"create.tooltip.keyCtrl": "Ctrl",
|
||||||
"create.tooltip.speedRequirement": "요구 회전속도: %1$s",
|
"create.tooltip.speedRequirement": "요구 회전속도: %1$s",
|
||||||
"create.tooltip.speedRequirement.none": "없음",
|
"create.tooltip.speedRequirement.none": "없음",
|
||||||
|
"create.tooltip.speedRequirement.slow": "UNLOCALIZED: Slow",
|
||||||
"create.tooltip.speedRequirement.medium": "보통",
|
"create.tooltip.speedRequirement.medium": "보통",
|
||||||
"create.tooltip.speedRequirement.high": "빠름",
|
"create.tooltip.speedRequirement.fast": "빠름",
|
||||||
"create.tooltip.stressImpact": "피로도 부하: %1$s",
|
"create.tooltip.stressImpact": "피로도 부하: %1$s",
|
||||||
"create.tooltip.stressImpact.low": "낮음",
|
"create.tooltip.stressImpact.low": "낮음",
|
||||||
"create.tooltip.stressImpact.medium": "보통",
|
"create.tooltip.stressImpact.medium": "보통",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 1939",
|
"_": "Missing Localizations: 1940",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -1232,8 +1232,9 @@
|
||||||
"create.tooltip.keyCtrl": "Ctrl",
|
"create.tooltip.keyCtrl": "Ctrl",
|
||||||
"create.tooltip.speedRequirement": "Snelheid eis: %1$s",
|
"create.tooltip.speedRequirement": "Snelheid eis: %1$s",
|
||||||
"create.tooltip.speedRequirement.none": "Geen",
|
"create.tooltip.speedRequirement.none": "Geen",
|
||||||
|
"create.tooltip.speedRequirement.slow": "UNLOCALIZED: Slow",
|
||||||
"create.tooltip.speedRequirement.medium": "Gemiddeld",
|
"create.tooltip.speedRequirement.medium": "Gemiddeld",
|
||||||
"create.tooltip.speedRequirement.high": "Snel",
|
"create.tooltip.speedRequirement.fast": "Snel",
|
||||||
"create.tooltip.stressImpact": "Stress Impact: %1$s",
|
"create.tooltip.stressImpact": "Stress Impact: %1$s",
|
||||||
"create.tooltip.stressImpact.low": "Laag",
|
"create.tooltip.stressImpact.low": "Laag",
|
||||||
"create.tooltip.stressImpact.medium": "Gemiddeld",
|
"create.tooltip.stressImpact.medium": "Gemiddeld",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 374",
|
"_": "Missing Localizations: 375",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -1232,8 +1232,9 @@
|
||||||
"create.tooltip.keyCtrl": "Ctrl",
|
"create.tooltip.keyCtrl": "Ctrl",
|
||||||
"create.tooltip.speedRequirement": "Wymagana prędkość: %1$s",
|
"create.tooltip.speedRequirement": "Wymagana prędkość: %1$s",
|
||||||
"create.tooltip.speedRequirement.none": "Brak",
|
"create.tooltip.speedRequirement.none": "Brak",
|
||||||
|
"create.tooltip.speedRequirement.slow": "UNLOCALIZED: Slow",
|
||||||
"create.tooltip.speedRequirement.medium": "Umiarkowana",
|
"create.tooltip.speedRequirement.medium": "Umiarkowana",
|
||||||
"create.tooltip.speedRequirement.high": "Wysoka",
|
"create.tooltip.speedRequirement.fast": "Wysoka",
|
||||||
"create.tooltip.stressImpact": "Wpływ na obciążenie: %1$s",
|
"create.tooltip.stressImpact": "Wpływ na obciążenie: %1$s",
|
||||||
"create.tooltip.stressImpact.low": "Niski",
|
"create.tooltip.stressImpact.low": "Niski",
|
||||||
"create.tooltip.stressImpact.medium": "Umiarkowany",
|
"create.tooltip.stressImpact.medium": "Umiarkowany",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 1186",
|
"_": "Missing Localizations: 1187",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -1232,8 +1232,9 @@
|
||||||
"create.tooltip.keyCtrl": "UNLOCALIZED: Ctrl",
|
"create.tooltip.keyCtrl": "UNLOCALIZED: Ctrl",
|
||||||
"create.tooltip.speedRequirement": "UNLOCALIZED: Speed Requirement: %1$s",
|
"create.tooltip.speedRequirement": "UNLOCALIZED: Speed Requirement: %1$s",
|
||||||
"create.tooltip.speedRequirement.none": "UNLOCALIZED: None",
|
"create.tooltip.speedRequirement.none": "UNLOCALIZED: None",
|
||||||
|
"create.tooltip.speedRequirement.slow": "UNLOCALIZED: Slow",
|
||||||
"create.tooltip.speedRequirement.medium": "UNLOCALIZED: Moderate",
|
"create.tooltip.speedRequirement.medium": "UNLOCALIZED: Moderate",
|
||||||
"create.tooltip.speedRequirement.high": "UNLOCALIZED: Fast",
|
"create.tooltip.speedRequirement.fast": "UNLOCALIZED: Fast",
|
||||||
"create.tooltip.stressImpact": "UNLOCALIZED: Kinetic Stress Impact: %1$s",
|
"create.tooltip.stressImpact": "UNLOCALIZED: Kinetic Stress Impact: %1$s",
|
||||||
"create.tooltip.stressImpact.low": "UNLOCALIZED: Low",
|
"create.tooltip.stressImpact.low": "UNLOCALIZED: Low",
|
||||||
"create.tooltip.stressImpact.medium": "UNLOCALIZED: Moderate",
|
"create.tooltip.stressImpact.medium": "UNLOCALIZED: Moderate",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 1558",
|
"_": "Missing Localizations: 1559",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -1232,8 +1232,9 @@
|
||||||
"create.tooltip.keyCtrl": "UNLOCALIZED: Ctrl",
|
"create.tooltip.keyCtrl": "UNLOCALIZED: Ctrl",
|
||||||
"create.tooltip.speedRequirement": "UNLOCALIZED: Speed Requirement: %1$s",
|
"create.tooltip.speedRequirement": "UNLOCALIZED: Speed Requirement: %1$s",
|
||||||
"create.tooltip.speedRequirement.none": "UNLOCALIZED: None",
|
"create.tooltip.speedRequirement.none": "UNLOCALIZED: None",
|
||||||
|
"create.tooltip.speedRequirement.slow": "UNLOCALIZED: Slow",
|
||||||
"create.tooltip.speedRequirement.medium": "UNLOCALIZED: Moderate",
|
"create.tooltip.speedRequirement.medium": "UNLOCALIZED: Moderate",
|
||||||
"create.tooltip.speedRequirement.high": "UNLOCALIZED: Fast",
|
"create.tooltip.speedRequirement.fast": "UNLOCALIZED: Fast",
|
||||||
"create.tooltip.stressImpact": "UNLOCALIZED: Kinetic Stress Impact: %1$s",
|
"create.tooltip.stressImpact": "UNLOCALIZED: Kinetic Stress Impact: %1$s",
|
||||||
"create.tooltip.stressImpact.low": "UNLOCALIZED: Low",
|
"create.tooltip.stressImpact.low": "UNLOCALIZED: Low",
|
||||||
"create.tooltip.stressImpact.medium": "UNLOCALIZED: Moderate",
|
"create.tooltip.stressImpact.medium": "UNLOCALIZED: Moderate",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 379",
|
"_": "Missing Localizations: 380",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -1232,8 +1232,9 @@
|
||||||
"create.tooltip.keyCtrl": "Ctrl",
|
"create.tooltip.keyCtrl": "Ctrl",
|
||||||
"create.tooltip.speedRequirement": "Требование к скорости: %1$s",
|
"create.tooltip.speedRequirement": "Требование к скорости: %1$s",
|
||||||
"create.tooltip.speedRequirement.none": "Нет",
|
"create.tooltip.speedRequirement.none": "Нет",
|
||||||
|
"create.tooltip.speedRequirement.slow": "UNLOCALIZED: Slow",
|
||||||
"create.tooltip.speedRequirement.medium": "Умеренная",
|
"create.tooltip.speedRequirement.medium": "Умеренная",
|
||||||
"create.tooltip.speedRequirement.high": "Быстрая",
|
"create.tooltip.speedRequirement.fast": "Быстрая",
|
||||||
"create.tooltip.stressImpact": "Создаваемая нагрузка: %1$s",
|
"create.tooltip.stressImpact": "Создаваемая нагрузка: %1$s",
|
||||||
"create.tooltip.stressImpact.low": "Низкая",
|
"create.tooltip.stressImpact.low": "Низкая",
|
||||||
"create.tooltip.stressImpact.medium": "Средняя",
|
"create.tooltip.stressImpact.medium": "Средняя",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 1",
|
"_": "Missing Localizations: 2",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -1232,8 +1232,9 @@
|
||||||
"create.tooltip.keyCtrl": "Ctrl",
|
"create.tooltip.keyCtrl": "Ctrl",
|
||||||
"create.tooltip.speedRequirement": "需求转速:%1$s",
|
"create.tooltip.speedRequirement": "需求转速:%1$s",
|
||||||
"create.tooltip.speedRequirement.none": "无",
|
"create.tooltip.speedRequirement.none": "无",
|
||||||
|
"create.tooltip.speedRequirement.slow": "UNLOCALIZED: Slow",
|
||||||
"create.tooltip.speedRequirement.medium": "适当",
|
"create.tooltip.speedRequirement.medium": "适当",
|
||||||
"create.tooltip.speedRequirement.high": "快",
|
"create.tooltip.speedRequirement.fast": "快",
|
||||||
"create.tooltip.stressImpact": "应力影响:%1$s",
|
"create.tooltip.stressImpact": "应力影响:%1$s",
|
||||||
"create.tooltip.stressImpact.low": "低",
|
"create.tooltip.stressImpact.low": "低",
|
||||||
"create.tooltip.stressImpact.medium": "中",
|
"create.tooltip.stressImpact.medium": "中",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 393",
|
"_": "Missing Localizations: 394",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -1232,8 +1232,9 @@
|
||||||
"create.tooltip.keyCtrl": "Ctrl",
|
"create.tooltip.keyCtrl": "Ctrl",
|
||||||
"create.tooltip.speedRequirement": "需求速度:%1$s",
|
"create.tooltip.speedRequirement": "需求速度:%1$s",
|
||||||
"create.tooltip.speedRequirement.none": "無",
|
"create.tooltip.speedRequirement.none": "無",
|
||||||
|
"create.tooltip.speedRequirement.slow": "UNLOCALIZED: Slow",
|
||||||
"create.tooltip.speedRequirement.medium": "適當",
|
"create.tooltip.speedRequirement.medium": "適當",
|
||||||
"create.tooltip.speedRequirement.high": "快",
|
"create.tooltip.speedRequirement.fast": "快",
|
||||||
"create.tooltip.stressImpact": "動能消耗:%1$s",
|
"create.tooltip.stressImpact": "動能消耗:%1$s",
|
||||||
"create.tooltip.stressImpact.low": "低",
|
"create.tooltip.stressImpact.low": "低",
|
||||||
"create.tooltip.stressImpact.medium": "中",
|
"create.tooltip.stressImpact.medium": "中",
|
||||||
|
|
|
@ -175,6 +175,7 @@ import com.simibubi.create.foundation.data.CreateRegistrate;
|
||||||
import com.simibubi.create.foundation.data.ModelGen;
|
import com.simibubi.create.foundation.data.ModelGen;
|
||||||
import com.simibubi.create.foundation.data.SharedProperties;
|
import com.simibubi.create.foundation.data.SharedProperties;
|
||||||
import com.simibubi.create.foundation.item.TooltipHelper;
|
import com.simibubi.create.foundation.item.TooltipHelper;
|
||||||
|
import com.simibubi.create.foundation.item.UncontainableBlockItem;
|
||||||
import com.simibubi.create.foundation.utility.ColorHandlers;
|
import com.simibubi.create.foundation.utility.ColorHandlers;
|
||||||
import com.simibubi.create.foundation.utility.Couple;
|
import com.simibubi.create.foundation.utility.Couple;
|
||||||
import com.simibubi.create.foundation.utility.DyeHelper;
|
import com.simibubi.create.foundation.utility.DyeHelper;
|
||||||
|
@ -1503,7 +1504,7 @@ public class AllBlocks {
|
||||||
})
|
})
|
||||||
.onRegisterAfter(Item.class, v -> TooltipHelper.referTo(v, "block.create.toolbox"))
|
.onRegisterAfter(Item.class, v -> TooltipHelper.referTo(v, "block.create.toolbox"))
|
||||||
.tag(AllBlockTags.TOOLBOXES.tag)
|
.tag(AllBlockTags.TOOLBOXES.tag)
|
||||||
.item()
|
.item(UncontainableBlockItem::new)
|
||||||
.model((c, p) -> p.withExistingParent(colourName + "_toolbox", p.modLoc("block/toolbox/item"))
|
.model((c, p) -> p.withExistingParent(colourName + "_toolbox", p.modLoc("block/toolbox/item"))
|
||||||
.texture("0", p.modLoc("block/toolbox/" + colourName)))
|
.texture("0", p.modLoc("block/toolbox/" + colourName)))
|
||||||
.tag(AllItemTags.TOOLBOXES.tag)
|
.tag(AllItemTags.TOOLBOXES.tag)
|
||||||
|
|
|
@ -2,7 +2,6 @@ package com.simibubi.create;
|
||||||
|
|
||||||
import com.simibubi.create.content.contraptions.components.actors.SeatEntity;
|
import com.simibubi.create.content.contraptions.components.actors.SeatEntity;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.AbstractContraptionEntity;
|
import com.simibubi.create.content.contraptions.components.structureMovement.AbstractContraptionEntity;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionEntityRenderer;
|
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.ControlledContraptionEntity;
|
import com.simibubi.create.content.contraptions.components.structureMovement.ControlledContraptionEntity;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.OrientedContraptionEntity;
|
import com.simibubi.create.content.contraptions.components.structureMovement.OrientedContraptionEntity;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.OrientedContraptionEntityRenderer;
|
import com.simibubi.create.content.contraptions.components.structureMovement.OrientedContraptionEntityRenderer;
|
||||||
|
@ -10,6 +9,7 @@ import com.simibubi.create.content.contraptions.components.structureMovement.gan
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.glue.GlueInstance;
|
import com.simibubi.create.content.contraptions.components.structureMovement.glue.GlueInstance;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.glue.SuperGlueEntity;
|
import com.simibubi.create.content.contraptions.components.structureMovement.glue.SuperGlueEntity;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.glue.SuperGlueRenderer;
|
import com.simibubi.create.content.contraptions.components.structureMovement.glue.SuperGlueRenderer;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionEntityRenderer;
|
||||||
import com.simibubi.create.content.curiosities.tools.BlueprintEntity;
|
import com.simibubi.create.content.curiosities.tools.BlueprintEntity;
|
||||||
import com.simibubi.create.content.curiosities.tools.BlueprintRenderer;
|
import com.simibubi.create.content.curiosities.tools.BlueprintRenderer;
|
||||||
import com.simibubi.create.content.curiosities.weapons.PotatoProjectileEntity;
|
import com.simibubi.create.content.curiosities.weapons.PotatoProjectileEntity;
|
||||||
|
|
|
@ -19,32 +19,31 @@ import net.minecraft.world.level.block.state.BlockState;
|
||||||
public interface IRotate extends IWrenchable {
|
public interface IRotate extends IWrenchable {
|
||||||
|
|
||||||
enum SpeedLevel {
|
enum SpeedLevel {
|
||||||
NONE,
|
NONE(ChatFormatting.DARK_GRAY, 0x000000, 0),
|
||||||
MEDIUM,
|
SLOW(ChatFormatting.GREEN, 0x22FF22, 10),
|
||||||
FAST;
|
MEDIUM(ChatFormatting.AQUA, 0x0084FF, 20),
|
||||||
|
FAST(ChatFormatting.LIGHT_PURPLE, 0xFF55FF, 30);
|
||||||
|
|
||||||
|
private final ChatFormatting textColor;
|
||||||
|
private final int color;
|
||||||
|
private final int particleSpeed;
|
||||||
|
|
||||||
|
SpeedLevel(ChatFormatting textColor, int color, int particleSpeed) {
|
||||||
|
this.textColor = textColor;
|
||||||
|
this.color = color;
|
||||||
|
this.particleSpeed = particleSpeed;
|
||||||
|
}
|
||||||
|
|
||||||
public ChatFormatting getTextColor() {
|
public ChatFormatting getTextColor() {
|
||||||
return this == NONE ? ChatFormatting.GREEN
|
return textColor;
|
||||||
: this == MEDIUM ? ChatFormatting.AQUA : ChatFormatting.LIGHT_PURPLE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getColor() {
|
public int getColor() {
|
||||||
return this == NONE ? 0x22FF22 : this == MEDIUM ? 0x0084FF : 0xFF55FF;
|
return color;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getParticleSpeed() {
|
public int getParticleSpeed() {
|
||||||
return this == NONE ? 10 : this == MEDIUM ? 20 : 30;
|
return particleSpeed;
|
||||||
}
|
|
||||||
|
|
||||||
public static SpeedLevel of(float speed) {
|
|
||||||
speed = Math.abs(speed);
|
|
||||||
|
|
||||||
if (speed >= AllConfigs.SERVER.kinetics.fastSpeed.get()) {
|
|
||||||
return FAST;
|
|
||||||
} else if (speed >= AllConfigs.SERVER.kinetics.mediumSpeed.get()) {
|
|
||||||
return MEDIUM;
|
|
||||||
}
|
|
||||||
return NONE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public float getSpeedValue() {
|
public float getSpeedValue() {
|
||||||
|
@ -53,22 +52,31 @@ public interface IRotate extends IWrenchable {
|
||||||
return AllConfigs.SERVER.kinetics.fastSpeed.get().floatValue();
|
return AllConfigs.SERVER.kinetics.fastSpeed.get().floatValue();
|
||||||
case MEDIUM:
|
case MEDIUM:
|
||||||
return AllConfigs.SERVER.kinetics.mediumSpeed.get().floatValue();
|
return AllConfigs.SERVER.kinetics.mediumSpeed.get().floatValue();
|
||||||
|
case SLOW:
|
||||||
|
return 1;
|
||||||
case NONE:
|
case NONE:
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Component getFormattedSpeedText(float speed, boolean overstressed){
|
public static SpeedLevel of(float speed) {
|
||||||
|
speed = Math.abs(speed);
|
||||||
|
|
||||||
|
if (speed >= AllConfigs.SERVER.kinetics.fastSpeed.get())
|
||||||
|
return FAST;
|
||||||
|
if (speed >= AllConfigs.SERVER.kinetics.mediumSpeed.get())
|
||||||
|
return MEDIUM;
|
||||||
|
if (speed >= 1)
|
||||||
|
return SLOW;
|
||||||
|
return NONE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Component getFormattedSpeedText(float speed, boolean overstressed) {
|
||||||
SpeedLevel speedLevel = of(speed);
|
SpeedLevel speedLevel = of(speed);
|
||||||
|
|
||||||
MutableComponent level = new TextComponent(ItemDescription.makeProgressBar(3, speedLevel.ordinal()));
|
MutableComponent level = new TextComponent(ItemDescription.makeProgressBar(3, speedLevel.ordinal()));
|
||||||
|
level.append(Lang.translate("tooltip.speedRequirement." + Lang.asId(speedLevel.name())));
|
||||||
if (speedLevel == SpeedLevel.MEDIUM)
|
|
||||||
level.append(Lang.translate("tooltip.speedRequirement.medium"));
|
|
||||||
if (speedLevel == SpeedLevel.FAST)
|
|
||||||
level.append(Lang.translate("tooltip.speedRequirement.high"));
|
|
||||||
|
|
||||||
level.append(" (" + IHaveGoggleInformation.format(Math.abs(speed))).append(Lang.translate("generic.unit.rpm")).append(") ");
|
level.append(" (" + IHaveGoggleInformation.format(Math.abs(speed))).append(Lang.translate("generic.unit.rpm")).append(") ");
|
||||||
|
|
||||||
if (overstressed)
|
if (overstressed)
|
||||||
|
@ -82,40 +90,49 @@ public interface IRotate extends IWrenchable {
|
||||||
}
|
}
|
||||||
|
|
||||||
enum StressImpact {
|
enum StressImpact {
|
||||||
LOW,
|
LOW(ChatFormatting.YELLOW, ChatFormatting.GREEN),
|
||||||
MEDIUM,
|
MEDIUM(ChatFormatting.GOLD, ChatFormatting.YELLOW),
|
||||||
HIGH,
|
HIGH(ChatFormatting.RED, ChatFormatting.GOLD),
|
||||||
OVERSTRESSED;
|
OVERSTRESSED(ChatFormatting.RED, ChatFormatting.RED);
|
||||||
|
|
||||||
|
private final ChatFormatting absoluteColor;
|
||||||
|
private final ChatFormatting relativeColor;
|
||||||
|
|
||||||
|
StressImpact(ChatFormatting absoluteColor, ChatFormatting relativeColor) {
|
||||||
|
this.absoluteColor = absoluteColor;
|
||||||
|
this.relativeColor = relativeColor;
|
||||||
|
}
|
||||||
|
|
||||||
public ChatFormatting getAbsoluteColor() {
|
public ChatFormatting getAbsoluteColor() {
|
||||||
return this == LOW ? ChatFormatting.YELLOW : this == MEDIUM ? ChatFormatting.GOLD : ChatFormatting.RED;
|
return absoluteColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ChatFormatting getRelativeColor() {
|
public ChatFormatting getRelativeColor() {
|
||||||
return this == LOW ? ChatFormatting.GREEN : this == MEDIUM ? ChatFormatting.YELLOW : this == HIGH ? ChatFormatting.GOLD : ChatFormatting.RED;
|
return relativeColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static StressImpact of(double stressPercent){
|
public static StressImpact of(double stressPercent) {
|
||||||
if (stressPercent > 1) return StressImpact.OVERSTRESSED;
|
if (stressPercent > 1)
|
||||||
else if (stressPercent > .75d) return StressImpact.HIGH;
|
return StressImpact.OVERSTRESSED;
|
||||||
else if (stressPercent > .5d) return StressImpact.MEDIUM;
|
if (stressPercent > .75d)
|
||||||
else return StressImpact.LOW;
|
return StressImpact.HIGH;
|
||||||
|
if (stressPercent > .5d)
|
||||||
|
return StressImpact.MEDIUM;
|
||||||
|
return StressImpact.LOW;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isEnabled() {
|
public static boolean isEnabled() {
|
||||||
return !AllConfigs.SERVER.kinetics.disableStress.get();
|
return !AllConfigs.SERVER.kinetics.disableStress.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Component getFormattedStressText(double stressPercent){
|
public static Component getFormattedStressText(double stressPercent) {
|
||||||
StressImpact stressLevel = of(stressPercent);
|
StressImpact stressLevel = of(stressPercent);
|
||||||
ChatFormatting color = stressLevel.getRelativeColor();
|
|
||||||
|
|
||||||
MutableComponent level = new TextComponent(ItemDescription.makeProgressBar(3, Math.min(stressLevel.ordinal(), 2)));
|
MutableComponent level = new TextComponent(ItemDescription.makeProgressBar(3, Math.min(stressLevel.ordinal() + 1, 3)));
|
||||||
level.append(Lang.translate("tooltip.stressImpact." + Lang.asId(stressLevel.name())));
|
level.append(Lang.translate("tooltip.stressImpact." + Lang.asId(stressLevel.name())));
|
||||||
|
|
||||||
level.append(String.format(" (%s%%) ", (int) (stressPercent * 100)));
|
level.append(String.format(" (%s%%) ", (int) (stressPercent * 100)));
|
||||||
|
|
||||||
return level.withStyle(color);
|
return level.withStyle(stressLevel.getRelativeColor());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -124,7 +141,7 @@ public interface IRotate extends IWrenchable {
|
||||||
public Axis getRotationAxis(BlockState state);
|
public Axis getRotationAxis(BlockState state);
|
||||||
|
|
||||||
public default SpeedLevel getMinimumRequiredSpeedLevel() {
|
public default SpeedLevel getMinimumRequiredSpeedLevel() {
|
||||||
return SpeedLevel.NONE;
|
return SpeedLevel.SLOW;
|
||||||
}
|
}
|
||||||
|
|
||||||
public default boolean hideStressImpact() {
|
public default boolean hideStressImpact() {
|
||||||
|
|
|
@ -357,13 +357,7 @@ public class KineticTileEntity extends SmartTileEntity
|
||||||
return true;
|
return true;
|
||||||
IRotate def = (IRotate) state.getBlock();
|
IRotate def = (IRotate) state.getBlock();
|
||||||
SpeedLevel minimumRequiredSpeedLevel = def.getMinimumRequiredSpeedLevel();
|
SpeedLevel minimumRequiredSpeedLevel = def.getMinimumRequiredSpeedLevel();
|
||||||
if (minimumRequiredSpeedLevel == null)
|
return Math.abs(getSpeed()) >= minimumRequiredSpeedLevel.getSpeedValue();
|
||||||
return true;
|
|
||||||
if (minimumRequiredSpeedLevel == SpeedLevel.MEDIUM)
|
|
||||||
return Math.abs(getSpeed()) >= AllConfigs.SERVER.kinetics.mediumSpeed.get();
|
|
||||||
if (minimumRequiredSpeedLevel == SpeedLevel.FAST)
|
|
||||||
return Math.abs(getSpeed()) >= AllConfigs.SERVER.kinetics.fastSpeed.get();
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void switchToBlockState(Level world, BlockPos pos, BlockState state) {
|
public static void switchToBlockState(Level world, BlockPos pos, BlockState state) {
|
||||||
|
|
|
@ -155,18 +155,18 @@ public class MechanicalCrafterBlock extends HorizontalKineticBlock
|
||||||
@Override
|
@Override
|
||||||
public InteractionResult use(BlockState state, Level worldIn, BlockPos pos, Player player, InteractionHand handIn,
|
public InteractionResult use(BlockState state, Level worldIn, BlockPos pos, Player player, InteractionHand handIn,
|
||||||
BlockHitResult hit) {
|
BlockHitResult hit) {
|
||||||
ItemStack heldItem = player.getItemInHand(handIn);
|
|
||||||
boolean isHand = heldItem.isEmpty() && handIn == InteractionHand.MAIN_HAND;
|
|
||||||
|
|
||||||
BlockEntity te = worldIn.getBlockEntity(pos);
|
BlockEntity te = worldIn.getBlockEntity(pos);
|
||||||
if (!(te instanceof MechanicalCrafterTileEntity))
|
if (!(te instanceof MechanicalCrafterTileEntity crafter))
|
||||||
return InteractionResult.PASS;
|
return InteractionResult.PASS;
|
||||||
MechanicalCrafterTileEntity crafter = (MechanicalCrafterTileEntity) te;
|
|
||||||
boolean wrenched = AllItems.WRENCH.isIn(heldItem);
|
ItemStack heldItem = player.getItemInHand(handIn);
|
||||||
|
|
||||||
if (AllBlocks.MECHANICAL_ARM.isIn(heldItem))
|
if (AllBlocks.MECHANICAL_ARM.isIn(heldItem))
|
||||||
return InteractionResult.PASS;
|
return InteractionResult.PASS;
|
||||||
|
|
||||||
|
boolean isHand = heldItem.isEmpty() && handIn == InteractionHand.MAIN_HAND;
|
||||||
|
boolean wrenched = AllItems.WRENCH.isIn(heldItem);
|
||||||
|
|
||||||
if (hit.getDirection() == state.getValue(HORIZONTAL_FACING)) {
|
if (hit.getDirection() == state.getValue(HORIZONTAL_FACING)) {
|
||||||
|
|
||||||
if (crafter.phase != Phase.IDLE && !wrenched) {
|
if (crafter.phase != Phase.IDLE && !wrenched) {
|
||||||
|
|
|
@ -49,6 +49,7 @@ import com.simibubi.create.content.contraptions.components.structureMovement.pul
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.pulley.PulleyBlock.MagnetBlock;
|
import com.simibubi.create.content.contraptions.components.structureMovement.pulley.PulleyBlock.MagnetBlock;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.pulley.PulleyBlock.RopeBlock;
|
import com.simibubi.create.content.contraptions.components.structureMovement.pulley.PulleyBlock.RopeBlock;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.pulley.PulleyTileEntity;
|
import com.simibubi.create.content.contraptions.components.structureMovement.pulley.PulleyTileEntity;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionLighter;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.render.EmptyLighter;
|
import com.simibubi.create.content.contraptions.components.structureMovement.render.EmptyLighter;
|
||||||
import com.simibubi.create.content.contraptions.fluids.tank.FluidTankTileEntity;
|
import com.simibubi.create.content.contraptions.fluids.tank.FluidTankTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.relays.advanced.GantryShaftBlock;
|
import com.simibubi.create.content.contraptions.relays.advanced.GantryShaftBlock;
|
||||||
|
|
|
@ -4,6 +4,7 @@ import com.jozufozu.flywheel.light.LightProvider;
|
||||||
import com.jozufozu.flywheel.light.MovingListener;
|
import com.jozufozu.flywheel.light.MovingListener;
|
||||||
import com.jozufozu.flywheel.util.box.GridAlignedBB;
|
import com.jozufozu.flywheel.util.box.GridAlignedBB;
|
||||||
import com.jozufozu.flywheel.util.box.ImmutableBox;
|
import com.jozufozu.flywheel.util.box.ImmutableBox;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionLighter;
|
||||||
import com.simibubi.create.foundation.config.AllConfigs;
|
import com.simibubi.create.foundation.config.AllConfigs;
|
||||||
|
|
||||||
public class NonStationaryLighter<C extends Contraption> extends ContraptionLighter<C> implements MovingListener {
|
public class NonStationaryLighter<C extends Contraption> extends ContraptionLighter<C> implements MovingListener {
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package com.simibubi.create.content.contraptions.components.structureMovement;
|
package com.simibubi.create.content.contraptions.components.structureMovement;
|
||||||
|
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionEntityRenderer;
|
||||||
|
|
||||||
import net.minecraft.client.renderer.culling.Frustum;
|
import net.minecraft.client.renderer.culling.Frustum;
|
||||||
import net.minecraft.client.renderer.entity.EntityRendererProvider;
|
import net.minecraft.client.renderer.entity.EntityRendererProvider;
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ package com.simibubi.create.content.contraptions.components.structureMovement.be
|
||||||
|
|
||||||
import com.jozufozu.flywheel.util.box.GridAlignedBB;
|
import com.jozufozu.flywheel.util.box.GridAlignedBB;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.Contraption;
|
import com.simibubi.create.content.contraptions.components.structureMovement.Contraption;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionLighter;
|
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionLighter;
|
||||||
|
|
||||||
public class AnchoredLighter extends ContraptionLighter<Contraption> {
|
public class AnchoredLighter extends ContraptionLighter<Contraption> {
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,8 @@ import org.apache.commons.lang3.tuple.Pair;
|
||||||
import com.simibubi.create.AllTags.AllBlockTags;
|
import com.simibubi.create.AllTags.AllBlockTags;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.AssemblyException;
|
import com.simibubi.create.content.contraptions.components.structureMovement.AssemblyException;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.Contraption;
|
import com.simibubi.create.content.contraptions.components.structureMovement.Contraption;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionLighter;
|
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionType;
|
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionType;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionLighter;
|
||||||
import com.simibubi.create.foundation.config.AllConfigs;
|
import com.simibubi.create.foundation.config.AllConfigs;
|
||||||
|
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
|
|
|
@ -8,8 +8,8 @@ import org.apache.commons.lang3.tuple.Pair;
|
||||||
|
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.AssemblyException;
|
import com.simibubi.create.content.contraptions.components.structureMovement.AssemblyException;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.Contraption;
|
import com.simibubi.create.content.contraptions.components.structureMovement.Contraption;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionLighter;
|
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionType;
|
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionType;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionLighter;
|
||||||
import com.simibubi.create.foundation.utility.NBTHelper;
|
import com.simibubi.create.foundation.utility.NBTHelper;
|
||||||
|
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
|
|
|
@ -2,9 +2,9 @@ package com.simibubi.create.content.contraptions.components.structureMovement.be
|
||||||
|
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.AssemblyException;
|
import com.simibubi.create.content.contraptions.components.structureMovement.AssemblyException;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.Contraption;
|
import com.simibubi.create.content.contraptions.components.structureMovement.Contraption;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionLighter;
|
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionType;
|
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionType;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.NonStationaryLighter;
|
import com.simibubi.create.content.contraptions.components.structureMovement.NonStationaryLighter;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionLighter;
|
||||||
|
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.core.Direction;
|
import net.minecraft.core.Direction;
|
||||||
|
|
|
@ -2,10 +2,10 @@ package com.simibubi.create.content.contraptions.components.structureMovement.ga
|
||||||
|
|
||||||
import com.simibubi.create.AllBlocks;
|
import com.simibubi.create.AllBlocks;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.AssemblyException;
|
import com.simibubi.create.content.contraptions.components.structureMovement.AssemblyException;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionLighter;
|
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionType;
|
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionType;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.NonStationaryLighter;
|
import com.simibubi.create.content.contraptions.components.structureMovement.NonStationaryLighter;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.TranslatingContraption;
|
import com.simibubi.create.content.contraptions.components.structureMovement.TranslatingContraption;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionLighter;
|
||||||
|
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.core.Direction;
|
import net.minecraft.core.Direction;
|
||||||
|
|
|
@ -9,10 +9,10 @@ import org.apache.commons.lang3.tuple.Pair;
|
||||||
import com.simibubi.create.AllBlocks;
|
import com.simibubi.create.AllBlocks;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.AssemblyException;
|
import com.simibubi.create.content.contraptions.components.structureMovement.AssemblyException;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.Contraption;
|
import com.simibubi.create.content.contraptions.components.structureMovement.Contraption;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionLighter;
|
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionType;
|
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionType;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.NonStationaryLighter;
|
import com.simibubi.create.content.contraptions.components.structureMovement.NonStationaryLighter;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.mounted.CartAssemblerTileEntity.CartMovementMode;
|
import com.simibubi.create.content.contraptions.components.structureMovement.mounted.CartAssemblerTileEntity.CartMovementMode;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionLighter;
|
||||||
import com.simibubi.create.foundation.utility.Iterate;
|
import com.simibubi.create.foundation.utility.Iterate;
|
||||||
import com.simibubi.create.foundation.utility.NBTHelper;
|
import com.simibubi.create.foundation.utility.NBTHelper;
|
||||||
import com.simibubi.create.foundation.utility.VecHelper;
|
import com.simibubi.create.foundation.utility.VecHelper;
|
||||||
|
|
|
@ -16,10 +16,10 @@ import org.apache.commons.lang3.tuple.Pair;
|
||||||
|
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.AssemblyException;
|
import com.simibubi.create.content.contraptions.components.structureMovement.AssemblyException;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.BlockMovementChecks;
|
import com.simibubi.create.content.contraptions.components.structureMovement.BlockMovementChecks;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionLighter;
|
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionType;
|
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionType;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.TranslatingContraption;
|
import com.simibubi.create.content.contraptions.components.structureMovement.TranslatingContraption;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock.PistonState;
|
import com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock.PistonState;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionLighter;
|
||||||
import com.simibubi.create.foundation.config.AllConfigs;
|
import com.simibubi.create.foundation.config.AllConfigs;
|
||||||
import com.simibubi.create.foundation.utility.VecHelper;
|
import com.simibubi.create.foundation.utility.VecHelper;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package com.simibubi.create.content.contraptions.components.structureMovement.piston;
|
package com.simibubi.create.content.contraptions.components.structureMovement.piston;
|
||||||
|
|
||||||
import com.jozufozu.flywheel.util.box.GridAlignedBB;
|
import com.jozufozu.flywheel.util.box.GridAlignedBB;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionLighter;
|
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionLighter;
|
||||||
|
|
||||||
import net.minecraft.core.Vec3i;
|
import net.minecraft.core.Vec3i;
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package com.simibubi.create.content.contraptions.components.structureMovement.pulley;
|
package com.simibubi.create.content.contraptions.components.structureMovement.pulley;
|
||||||
|
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.AssemblyException;
|
import com.simibubi.create.content.contraptions.components.structureMovement.AssemblyException;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionLighter;
|
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionType;
|
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionType;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.TranslatingContraption;
|
import com.simibubi.create.content.contraptions.components.structureMovement.TranslatingContraption;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionLighter;
|
||||||
|
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.nbt.CompoundTag;
|
import net.minecraft.nbt.CompoundTag;
|
||||||
|
|
|
@ -2,7 +2,7 @@ package com.simibubi.create.content.contraptions.components.structureMovement.pu
|
||||||
|
|
||||||
import com.jozufozu.flywheel.util.box.GridAlignedBB;
|
import com.jozufozu.flywheel.util.box.GridAlignedBB;
|
||||||
import com.simibubi.create.AllBlocks;
|
import com.simibubi.create.AllBlocks;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionLighter;
|
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionLighter;
|
||||||
|
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.world.level.Level;
|
import net.minecraft.world.level.Level;
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
package com.simibubi.create.content.contraptions.components.structureMovement;
|
package com.simibubi.create.content.contraptions.components.structureMovement.render;
|
||||||
|
|
||||||
import com.mojang.blaze3d.vertex.PoseStack;
|
import com.mojang.blaze3d.vertex.PoseStack;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher;
|
import com.simibubi.create.content.contraptions.components.structureMovement.AbstractContraptionEntity;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.Contraption;
|
||||||
|
|
||||||
import net.minecraft.client.renderer.MultiBufferSource;
|
import net.minecraft.client.renderer.MultiBufferSource;
|
||||||
import net.minecraft.client.renderer.culling.Frustum;
|
import net.minecraft.client.renderer.culling.Frustum;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.simibubi.create.content.contraptions.components.structureMovement;
|
package com.simibubi.create.content.contraptions.components.structureMovement.render;
|
||||||
|
|
||||||
import com.jozufozu.flywheel.light.GPULightVolume;
|
import com.jozufozu.flywheel.light.GPULightVolume;
|
||||||
import com.jozufozu.flywheel.light.LightListener;
|
import com.jozufozu.flywheel.light.LightListener;
|
||||||
|
@ -7,6 +7,7 @@ import com.jozufozu.flywheel.light.LightUpdater;
|
||||||
import com.jozufozu.flywheel.light.ListenerStatus;
|
import com.jozufozu.flywheel.light.ListenerStatus;
|
||||||
import com.jozufozu.flywheel.util.box.GridAlignedBB;
|
import com.jozufozu.flywheel.util.box.GridAlignedBB;
|
||||||
import com.jozufozu.flywheel.util.box.ImmutableBox;
|
import com.jozufozu.flywheel.util.box.ImmutableBox;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.Contraption;
|
||||||
|
|
||||||
import net.minecraft.world.level.LightLayer;
|
import net.minecraft.world.level.LightLayer;
|
||||||
|
|
|
@ -2,7 +2,6 @@ package com.simibubi.create.content.contraptions.components.structureMovement.re
|
||||||
|
|
||||||
import com.jozufozu.flywheel.util.box.GridAlignedBB;
|
import com.jozufozu.flywheel.util.box.GridAlignedBB;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.Contraption;
|
import com.simibubi.create.content.contraptions.components.structureMovement.Contraption;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionLighter;
|
|
||||||
|
|
||||||
// so other contraptions don't crash before they have a lighter
|
// so other contraptions don't crash before they have a lighter
|
||||||
public class EmptyLighter extends ContraptionLighter<Contraption> {
|
public class EmptyLighter extends ContraptionLighter<Contraption> {
|
||||||
|
|
|
@ -22,7 +22,6 @@ import com.mojang.blaze3d.vertex.PoseStack;
|
||||||
import com.mojang.math.Matrix4f;
|
import com.mojang.math.Matrix4f;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.AbstractContraptionEntity;
|
import com.simibubi.create.content.contraptions.components.structureMovement.AbstractContraptionEntity;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.Contraption;
|
import com.simibubi.create.content.contraptions.components.structureMovement.Contraption;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionLighter;
|
|
||||||
import com.simibubi.create.foundation.render.CreateContexts;
|
import com.simibubi.create.foundation.render.CreateContexts;
|
||||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
package com.simibubi.create.content.contraptions.goggles;
|
package com.simibubi.create.content.contraptions.goggles;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.LinkedList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.function.Supplier;
|
|
||||||
|
|
||||||
import com.mojang.blaze3d.vertex.PoseStack;
|
import com.mojang.blaze3d.vertex.PoseStack;
|
||||||
import com.simibubi.create.AllBlocks;
|
import com.simibubi.create.AllBlocks;
|
||||||
|
@ -33,7 +31,6 @@ import net.minecraft.network.chat.Component;
|
||||||
import net.minecraft.network.chat.FormattedText;
|
import net.minecraft.network.chat.FormattedText;
|
||||||
import net.minecraft.network.chat.TextComponent;
|
import net.minecraft.network.chat.TextComponent;
|
||||||
import net.minecraft.util.Mth;
|
import net.minecraft.util.Mth;
|
||||||
import net.minecraft.world.entity.EquipmentSlot;
|
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
|
@ -46,7 +43,6 @@ public class GoggleOverlayRenderer {
|
||||||
|
|
||||||
public static final IIngameOverlay OVERLAY = GoggleOverlayRenderer::renderOverlay;
|
public static final IIngameOverlay OVERLAY = GoggleOverlayRenderer::renderOverlay;
|
||||||
|
|
||||||
private static final List<Supplier<Boolean>> customGogglePredicates = new LinkedList<>();
|
|
||||||
private static final Map<Object, OutlineEntry> outlines = CreateClient.OUTLINER.getOutlines();
|
private static final Map<Object, OutlineEntry> outlines = CreateClient.OUTLINER.getOutlines();
|
||||||
|
|
||||||
public static int hoverTicks = 0;
|
public static int hoverTicks = 0;
|
||||||
|
@ -73,7 +69,6 @@ public class GoggleOverlayRenderer {
|
||||||
Minecraft mc = Minecraft.getInstance();
|
Minecraft mc = Minecraft.getInstance();
|
||||||
ClientLevel world = mc.level;
|
ClientLevel world = mc.level;
|
||||||
BlockPos pos = result.getBlockPos();
|
BlockPos pos = result.getBlockPos();
|
||||||
ItemStack headSlot = mc.player.getItemBySlot(EquipmentSlot.HEAD);
|
|
||||||
BlockEntity te = world.getBlockEntity(pos);
|
BlockEntity te = world.getBlockEntity(pos);
|
||||||
|
|
||||||
if (lastHovered == null || lastHovered.equals(pos))
|
if (lastHovered == null || lastHovered.equals(pos))
|
||||||
|
@ -82,9 +77,7 @@ public class GoggleOverlayRenderer {
|
||||||
hoverTicks = 0;
|
hoverTicks = 0;
|
||||||
lastHovered = pos;
|
lastHovered = pos;
|
||||||
|
|
||||||
boolean wearingGoggles = AllItems.GOGGLES.isIn(headSlot);
|
boolean wearingGoggles = GogglesItem.isWearingGoggles(mc.player);
|
||||||
for (Supplier<Boolean> supplier : customGogglePredicates)
|
|
||||||
wearingGoggles |= supplier.get();
|
|
||||||
|
|
||||||
boolean hasGoggleInformation = te instanceof IHaveGoggleInformation;
|
boolean hasGoggleInformation = te instanceof IHaveGoggleInformation;
|
||||||
boolean hasHoveringInformation = te instanceof IHaveHoveringInformation;
|
boolean hasHoveringInformation = te instanceof IHaveHoveringInformation;
|
||||||
|
@ -200,12 +193,4 @@ public class GoggleOverlayRenderer {
|
||||||
poseStack.popPose();
|
poseStack.popPose();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Use this method to add custom entry points to the goggles overlay, e.g. custom
|
|
||||||
* armor, handheld alternatives, etc.
|
|
||||||
*/
|
|
||||||
public static void registerCustomGoggleCondition(Supplier<Boolean> condition) {
|
|
||||||
customGogglePredicates.add(condition);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
package com.simibubi.create.content.contraptions.goggles;
|
package com.simibubi.create.content.contraptions.goggles;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.function.Predicate;
|
||||||
|
|
||||||
import com.simibubi.create.AllItems;
|
import com.simibubi.create.AllItems;
|
||||||
|
|
||||||
import net.minecraft.world.InteractionHand;
|
import net.minecraft.world.InteractionHand;
|
||||||
|
@ -16,6 +20,11 @@ import net.minecraft.world.level.block.DispenserBlock;
|
||||||
|
|
||||||
public class GogglesItem extends Item {
|
public class GogglesItem extends Item {
|
||||||
|
|
||||||
|
private static final List<Predicate<Player>> IS_WEARING_PREDICATES = new ArrayList<>();
|
||||||
|
static {
|
||||||
|
addIsWearingPredicate(player -> AllItems.GOGGLES.isIn(player.getItemBySlot(EquipmentSlot.HEAD)));
|
||||||
|
}
|
||||||
|
|
||||||
public GogglesItem(Properties properties) {
|
public GogglesItem(Properties properties) {
|
||||||
super(properties);
|
super(properties);
|
||||||
DispenserBlock.registerBehavior(this, ArmorItem.DISPENSE_ITEM_BEHAVIOR);
|
DispenserBlock.registerBehavior(this, ArmorItem.DISPENSE_ITEM_BEHAVIOR);
|
||||||
|
@ -39,11 +48,21 @@ public class GogglesItem extends Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean canSeeParticles(Player player) {
|
public static boolean isWearingGoggles(Player player) {
|
||||||
for (ItemStack itemStack : player.getArmorSlots())
|
for (Predicate<Player> predicate : IS_WEARING_PREDICATES) {
|
||||||
if (AllItems.GOGGLES.isIn(itemStack))
|
if (predicate.test(player)) {
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use this method to add custom entry points to the goggles overlay, e.g. custom
|
||||||
|
* armor, handheld alternatives, etc.
|
||||||
|
*/
|
||||||
|
public static void addIsWearingPredicate(Predicate<Player> predicate) {
|
||||||
|
IS_WEARING_PREDICATES.add(predicate);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,7 +88,7 @@ public class RotationIndicatorParticle extends SimpleAnimatedParticle {
|
||||||
double xSpeed, double ySpeed, double zSpeed) {
|
double xSpeed, double ySpeed, double zSpeed) {
|
||||||
Minecraft mc = Minecraft.getInstance();
|
Minecraft mc = Minecraft.getInstance();
|
||||||
LocalPlayer player = mc.player;
|
LocalPlayer player = mc.player;
|
||||||
boolean visible = worldIn != mc.level || player != null && GogglesItem.canSeeParticles(player);
|
boolean visible = worldIn != mc.level || player != null && GogglesItem.isWearingGoggles(player);
|
||||||
return new RotationIndicatorParticle(worldIn, x, y, z, data.color, data.radius1, data.radius2, data.speed,
|
return new RotationIndicatorParticle(worldIn, x, y, z, data.color, data.radius1, data.radius2, data.speed,
|
||||||
data.getAxis(), data.lifeSpan, visible, this.spriteSet);
|
data.getAxis(), data.lifeSpan, visible, this.spriteSet);
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,11 +27,10 @@ public class SpeedGaugeTileEntity extends GaugeTileEntity {
|
||||||
super.onSpeedChanged(prevSpeed);
|
super.onSpeedChanged(prevSpeed);
|
||||||
float speed = Math.abs(getSpeed());
|
float speed = Math.abs(getSpeed());
|
||||||
|
|
||||||
color = speed == 0 ? 0x333333
|
color = Color.mixColors(SpeedLevel.of(speed)
|
||||||
: Color.mixColors(SpeedLevel.of(speed)
|
|
||||||
.getColor(), 0xffffff, .25f);
|
.getColor(), 0xffffff, .25f);
|
||||||
if (speed == 69)
|
if (speed == 69)
|
||||||
AllTriggers.triggerForNearbyPlayers(AllTriggers.SPEED_READ, level, worldPosition, 6, GogglesItem::canSeeParticles);
|
AllTriggers.triggerForNearbyPlayers(AllTriggers.SPEED_READ, level, worldPosition, 6, GogglesItem::isWearingGoggles);
|
||||||
|
|
||||||
dialTarget = getDialTarget(speed);
|
dialTarget = getDialTarget(speed);
|
||||||
setChanged();
|
setChanged();
|
||||||
|
|
|
@ -73,9 +73,7 @@ public class StressGaugeTileEntity extends GaugeTileEntity {
|
||||||
tooltip.add(componentSpacing.plainCopy().append(Lang.translate("gui.stressometer.title").withStyle(ChatFormatting.GRAY)));
|
tooltip.add(componentSpacing.plainCopy().append(Lang.translate("gui.stressometer.title").withStyle(ChatFormatting.GRAY)));
|
||||||
|
|
||||||
if (getTheoreticalSpeed() == 0)
|
if (getTheoreticalSpeed() == 0)
|
||||||
tooltip.add(new TextComponent(spacing + ItemDescription.makeProgressBar(3, -1)).append(Lang.translate("gui.stressometer.no_rotation")).withStyle(ChatFormatting.DARK_GRAY));
|
tooltip.add(new TextComponent(spacing + ItemDescription.makeProgressBar(3, 0)).append(Lang.translate("gui.stressometer.no_rotation")).withStyle(ChatFormatting.DARK_GRAY));
|
||||||
// tooltip.add(new StringTextComponent(TextFormatting.DARK_GRAY + ItemDescription.makeProgressBar(3, -1)
|
|
||||||
// + Lang.translate("gui.stressometer.no_rotation")));
|
|
||||||
else {
|
else {
|
||||||
tooltip.add(componentSpacing.plainCopy().append(StressImpact.getFormattedStressText(stressFraction)));
|
tooltip.add(componentSpacing.plainCopy().append(StressImpact.getFormattedStressText(stressFraction)));
|
||||||
|
|
||||||
|
|
|
@ -73,15 +73,12 @@ public class ChromaticCompoundItem extends Item {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onEntityItemUpdate(ItemStack stack, ItemEntity entity) {
|
public boolean onEntityItemUpdate(ItemStack stack, ItemEntity entity) {
|
||||||
double y = entity.getY();
|
|
||||||
double yMotion = entity.getDeltaMovement().y;
|
|
||||||
Level world = entity.level;
|
Level world = entity.level;
|
||||||
CompoundTag data = entity.getPersistentData();
|
|
||||||
CompoundTag itemData = entity.getItem()
|
CompoundTag itemData = entity.getItem()
|
||||||
.getOrCreateTag();
|
.getOrCreateTag();
|
||||||
|
|
||||||
Vec3 positionVec = entity.position();
|
Vec3 positionVec = entity.position();
|
||||||
CRecipes config = AllConfigs.SERVER.recipes;
|
CRecipes config = AllConfigs.SERVER.recipes;
|
||||||
|
|
||||||
if (world.isClientSide) {
|
if (world.isClientSide) {
|
||||||
int light = itemData.getInt("CollectingLight");
|
int light = itemData.getInt("CollectingLight");
|
||||||
if (world.random.nextInt(config.lightSourceCountForRefinedRadiance.get() + 20) < light) {
|
if (world.random.nextInt(config.lightSourceCountForRefinedRadiance.get() + 20) < light) {
|
||||||
|
@ -94,8 +91,13 @@ public class ChromaticCompoundItem extends Item {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
double y = entity.getY();
|
||||||
|
double yMotion = entity.getDeltaMovement().y;
|
||||||
|
int minHeight = world.getMinBuildHeight();
|
||||||
|
CompoundTag data = entity.getPersistentData();
|
||||||
|
|
||||||
// Convert to Shadow steel if in void
|
// Convert to Shadow steel if in void
|
||||||
if (y < 0 && y - yMotion < -10 && config.enableShadowSteelRecipe.get()) {
|
if (y < minHeight && y - yMotion < -10 + minHeight && config.enableShadowSteelRecipe.get()) {
|
||||||
ItemStack newStack = AllItems.SHADOW_STEEL.asStack();
|
ItemStack newStack = AllItems.SHADOW_STEEL.asStack();
|
||||||
newStack.setCount(stack.getCount());
|
newStack.setCount(stack.getCount());
|
||||||
data.putBoolean("JustCreated", true);
|
data.putBoolean("JustCreated", true);
|
||||||
|
|
|
@ -7,14 +7,11 @@ import java.util.function.Consumer;
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
import com.simibubi.create.AllItems;
|
import com.simibubi.create.AllItems;
|
||||||
import com.simibubi.create.AllTags.AllItemTags;
|
|
||||||
import com.simibubi.create.foundation.utility.NBTHelper;
|
import com.simibubi.create.foundation.utility.NBTHelper;
|
||||||
|
|
||||||
import net.minecraft.nbt.CompoundTag;
|
import net.minecraft.nbt.CompoundTag;
|
||||||
import net.minecraft.nbt.Tag;
|
import net.minecraft.nbt.Tag;
|
||||||
import net.minecraft.world.item.BlockItem;
|
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
import net.minecraft.world.level.block.ShulkerBoxBlock;
|
|
||||||
import net.minecraftforge.items.ItemHandlerHelper;
|
import net.minecraftforge.items.ItemHandlerHelper;
|
||||||
import net.minecraftforge.items.ItemStackHandler;
|
import net.minecraftforge.items.ItemStackHandler;
|
||||||
|
|
||||||
|
@ -91,13 +88,8 @@ public class ToolboxInventory extends ItemStackHandler {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isItemValid(int slot, ItemStack stack) {
|
public boolean isItemValid(int slot, ItemStack stack) {
|
||||||
if (AllItemTags.TOOLBOXES.matches(stack))
|
if (!stack.getItem().canFitInsideContainerItems())
|
||||||
return false;
|
return false;
|
||||||
if (stack.getItem() instanceof BlockItem) {
|
|
||||||
BlockItem blockItem = (BlockItem) stack.getItem();
|
|
||||||
if (blockItem.getBlock() instanceof ShulkerBoxBlock)
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (slot < 0 || slot >= getSlots())
|
if (slot < 0 || slot >= getSlots())
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -10,9 +10,9 @@ import java.util.stream.Collectors;
|
||||||
|
|
||||||
import com.simibubi.create.content.logistics.item.filter.ItemAttribute;
|
import com.simibubi.create.content.logistics.item.filter.ItemAttribute;
|
||||||
|
|
||||||
|
import net.minecraft.client.resources.language.I18n;
|
||||||
import net.minecraft.nbt.CompoundTag;
|
import net.minecraft.nbt.CompoundTag;
|
||||||
import net.minecraft.nbt.ListTag;
|
import net.minecraft.nbt.ListTag;
|
||||||
import net.minecraft.network.chat.TranslatableComponent;
|
|
||||||
import net.minecraft.world.item.DyeColor;
|
import net.minecraft.world.item.DyeColor;
|
||||||
import net.minecraft.world.item.FireworkRocketItem;
|
import net.minecraft.world.item.FireworkRocketItem;
|
||||||
import net.minecraft.world.item.FireworkStarItem;
|
import net.minecraft.world.item.FireworkStarItem;
|
||||||
|
@ -75,7 +75,7 @@ public class ColorAttribute implements ItemAttribute {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object[] getTranslationParameters() {
|
public Object[] getTranslationParameters() {
|
||||||
return new Object[]{new TranslatableComponent(color.getName()).getContents()};
|
return new Object[] { I18n.get("color.minecraft." + color.getName()) };
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -21,13 +21,13 @@ import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.simibubi.create.AllItems;
|
|
||||||
import com.simibubi.create.content.contraptions.base.IRotate;
|
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.SpeedLevel;
|
||||||
import com.simibubi.create.content.contraptions.base.IRotate.StressImpact;
|
import com.simibubi.create.content.contraptions.base.IRotate.StressImpact;
|
||||||
import com.simibubi.create.content.contraptions.components.fan.EncasedFanBlock;
|
import com.simibubi.create.content.contraptions.components.fan.EncasedFanBlock;
|
||||||
import com.simibubi.create.content.contraptions.components.flywheel.engine.FurnaceEngineBlock;
|
import com.simibubi.create.content.contraptions.components.flywheel.engine.FurnaceEngineBlock;
|
||||||
import com.simibubi.create.content.contraptions.components.waterwheel.WaterWheelBlock;
|
import com.simibubi.create.content.contraptions.components.waterwheel.WaterWheelBlock;
|
||||||
|
import com.simibubi.create.content.contraptions.goggles.GogglesItem;
|
||||||
import com.simibubi.create.foundation.block.BlockStressValues;
|
import com.simibubi.create.foundation.block.BlockStressValues;
|
||||||
import com.simibubi.create.foundation.config.AllConfigs;
|
import com.simibubi.create.foundation.config.AllConfigs;
|
||||||
import com.simibubi.create.foundation.config.CKinetics;
|
import com.simibubi.create.foundation.config.CKinetics;
|
||||||
|
@ -39,7 +39,6 @@ import net.minecraft.client.gui.screens.Screen;
|
||||||
import net.minecraft.network.chat.Component;
|
import net.minecraft.network.chat.Component;
|
||||||
import net.minecraft.network.chat.MutableComponent;
|
import net.minecraft.network.chat.MutableComponent;
|
||||||
import net.minecraft.network.chat.TextComponent;
|
import net.minecraft.network.chat.TextComponent;
|
||||||
import net.minecraft.world.entity.EquipmentSlot;
|
|
||||||
import net.minecraft.world.level.block.Block;
|
import net.minecraft.world.level.block.Block;
|
||||||
|
|
||||||
public class ItemDescription {
|
public class ItemDescription {
|
||||||
|
@ -90,7 +89,7 @@ public class ItemDescription {
|
||||||
CKinetics config = AllConfigs.SERVER.kinetics;
|
CKinetics config = AllConfigs.SERVER.kinetics;
|
||||||
Component rpmUnit = Lang.translate("generic.unit.rpm");
|
Component rpmUnit = Lang.translate("generic.unit.rpm");
|
||||||
|
|
||||||
boolean hasGoggles = AllItems.GOGGLES.isIn(Minecraft.getInstance().player.getItemBySlot(EquipmentSlot.HEAD));
|
boolean hasGoggles = GogglesItem.isWearingGoggles(Minecraft.getInstance().player);
|
||||||
|
|
||||||
SpeedLevel minimumRequiredSpeedLevel;
|
SpeedLevel minimumRequiredSpeedLevel;
|
||||||
boolean showStressImpact;
|
boolean showStressImpact;
|
||||||
|
@ -102,13 +101,12 @@ public class ItemDescription {
|
||||||
showStressImpact = !((IRotate) block).hideStressImpact();
|
showStressImpact = !((IRotate) block).hideStressImpact();
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean hasSpeedRequirement = minimumRequiredSpeedLevel != SpeedLevel.NONE;
|
boolean hasSpeedRequirement = minimumRequiredSpeedLevel != SpeedLevel.NONE && minimumRequiredSpeedLevel != SpeedLevel.SLOW;
|
||||||
boolean hasStressImpact =
|
boolean hasStressImpact =
|
||||||
StressImpact.isEnabled() && showStressImpact && BlockStressValues.getImpact(block) > 0;
|
StressImpact.isEnabled() && showStressImpact && BlockStressValues.getImpact(block) > 0;
|
||||||
boolean hasStressCapacity = StressImpact.isEnabled() && BlockStressValues.hasCapacity(block);
|
boolean hasStressCapacity = StressImpact.isEnabled() && BlockStressValues.hasCapacity(block);
|
||||||
|
|
||||||
if (hasSpeedRequirement) {
|
if (hasSpeedRequirement) {
|
||||||
List<Component> speedLevels = Lang.translatedOptions("tooltip.speedRequirement", "none", "medium", "high");
|
|
||||||
int index = minimumRequiredSpeedLevel.ordinal();
|
int index = minimumRequiredSpeedLevel.ordinal();
|
||||||
MutableComponent level =
|
MutableComponent level =
|
||||||
new TextComponent(makeProgressBar(3, index)).withStyle(minimumRequiredSpeedLevel.getTextColor());
|
new TextComponent(makeProgressBar(3, index)).withStyle(minimumRequiredSpeedLevel.getTextColor());
|
||||||
|
@ -118,7 +116,7 @@ public class ItemDescription {
|
||||||
.append(rpmUnit)
|
.append(rpmUnit)
|
||||||
.append("+");
|
.append("+");
|
||||||
else
|
else
|
||||||
level.append(speedLevels.get(index));
|
level.append(Lang.translate("tooltip.speedRequirement." + Lang.asId(minimumRequiredSpeedLevel.name())));
|
||||||
|
|
||||||
list.add(Lang.translate("tooltip.speedRequirement")
|
list.add(Lang.translate("tooltip.speedRequirement")
|
||||||
.withStyle(GRAY));
|
.withStyle(GRAY));
|
||||||
|
@ -126,19 +124,18 @@ public class ItemDescription {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasStressImpact) {
|
if (hasStressImpact) {
|
||||||
List<Component> stressLevels = Lang.translatedOptions("tooltip.stressImpact", "low", "medium", "high");
|
|
||||||
double impact = BlockStressValues.getImpact(block);
|
double impact = BlockStressValues.getImpact(block);
|
||||||
StressImpact impactId = impact >= config.highStressImpact.get() ? StressImpact.HIGH
|
StressImpact impactId = impact >= config.highStressImpact.get() ? StressImpact.HIGH
|
||||||
: (impact >= config.mediumStressImpact.get() ? StressImpact.MEDIUM : StressImpact.LOW);
|
: (impact >= config.mediumStressImpact.get() ? StressImpact.MEDIUM : StressImpact.LOW);
|
||||||
int index = impactId.ordinal();
|
int index = impactId.ordinal();
|
||||||
MutableComponent level =
|
MutableComponent level =
|
||||||
new TextComponent(makeProgressBar(3, index)).withStyle(impactId.getAbsoluteColor());
|
new TextComponent(makeProgressBar(3, index + 1)).withStyle(impactId.getAbsoluteColor());
|
||||||
|
|
||||||
if (hasGoggles)
|
if (hasGoggles)
|
||||||
level.append(impact + "x ")
|
level.append(impact + "x ")
|
||||||
.append(rpmUnit);
|
.append(rpmUnit);
|
||||||
else
|
else
|
||||||
level.append(stressLevels.get(index));
|
level.append(Lang.translate("tooltip.stressImpact." + Lang.asId(impactId.name())));
|
||||||
|
|
||||||
list.add(Lang.translate("tooltip.stressImpact")
|
list.add(Lang.translate("tooltip.stressImpact")
|
||||||
.withStyle(GRAY));
|
.withStyle(GRAY));
|
||||||
|
@ -146,20 +143,18 @@ public class ItemDescription {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasStressCapacity) {
|
if (hasStressCapacity) {
|
||||||
List<Component> stressCapacityLevels =
|
|
||||||
Lang.translatedOptions("tooltip.capacityProvided", "low", "medium", "high");
|
|
||||||
double capacity = BlockStressValues.getCapacity(block);
|
double capacity = BlockStressValues.getCapacity(block);
|
||||||
StressImpact impactId = capacity >= config.highCapacity.get() ? StressImpact.LOW
|
StressImpact impactId = capacity >= config.highCapacity.get() ? StressImpact.LOW
|
||||||
: (capacity >= config.mediumCapacity.get() ? StressImpact.MEDIUM : StressImpact.HIGH);
|
: (capacity >= config.mediumCapacity.get() ? StressImpact.MEDIUM : StressImpact.HIGH);
|
||||||
int index = StressImpact.values().length - 2 - impactId.ordinal();
|
int index = StressImpact.values().length - 2 - impactId.ordinal();
|
||||||
MutableComponent level =
|
MutableComponent level =
|
||||||
new TextComponent(makeProgressBar(3, index)).withStyle(impactId.getAbsoluteColor());
|
new TextComponent(makeProgressBar(3, index + 1)).withStyle(impactId.getAbsoluteColor());
|
||||||
|
|
||||||
if (hasGoggles)
|
if (hasGoggles)
|
||||||
level.append(capacity + "x ")
|
level.append(capacity + "x ")
|
||||||
.append(rpmUnit);
|
.append(rpmUnit);
|
||||||
else
|
else
|
||||||
level.append(stressCapacityLevels.get(index));
|
level.append(Lang.translate("tooltip.capacityProvided." + Lang.asId(impactId.name())));
|
||||||
|
|
||||||
// if (!isEngine && ((IRotate) block).showCapacityWithAnnotation())
|
// if (!isEngine && ((IRotate) block).showCapacityWithAnnotation())
|
||||||
// level +=
|
// level +=
|
||||||
|
@ -183,8 +178,8 @@ public class ItemDescription {
|
||||||
|
|
||||||
public static String makeProgressBar(int length, int filledLength) {
|
public static String makeProgressBar(int length, int filledLength) {
|
||||||
String bar = " ";
|
String bar = " ";
|
||||||
int emptySpaces = length - 1 - filledLength;
|
int emptySpaces = length - filledLength;
|
||||||
for (int i = 0; i <= filledLength; i++)
|
for (int i = 0; i < filledLength; i++)
|
||||||
bar += "\u2588";
|
bar += "\u2588";
|
||||||
for (int i = 0; i < emptySpaces; i++)
|
for (int i = 0; i < emptySpaces; i++)
|
||||||
bar += "\u2592";
|
bar += "\u2592";
|
||||||
|
|
|
@ -10,8 +10,8 @@ import java.util.function.Supplier;
|
||||||
|
|
||||||
import com.google.common.base.Strings;
|
import com.google.common.base.Strings;
|
||||||
import com.mojang.bridge.game.Language;
|
import com.mojang.bridge.game.Language;
|
||||||
import com.simibubi.create.AllItems;
|
|
||||||
import com.simibubi.create.content.AllSections;
|
import com.simibubi.create.content.AllSections;
|
||||||
|
import com.simibubi.create.content.contraptions.goggles.GogglesItem;
|
||||||
import com.simibubi.create.content.contraptions.goggles.IHaveGoggleInformation;
|
import com.simibubi.create.content.contraptions.goggles.IHaveGoggleInformation;
|
||||||
import com.simibubi.create.foundation.item.ItemDescription.Palette;
|
import com.simibubi.create.foundation.item.ItemDescription.Palette;
|
||||||
import com.simibubi.create.foundation.utility.Couple;
|
import com.simibubi.create.foundation.utility.Couple;
|
||||||
|
@ -25,7 +25,6 @@ import net.minecraft.client.resources.language.I18n;
|
||||||
import net.minecraft.network.chat.Component;
|
import net.minecraft.network.chat.Component;
|
||||||
import net.minecraft.network.chat.MutableComponent;
|
import net.minecraft.network.chat.MutableComponent;
|
||||||
import net.minecraft.network.chat.TextComponent;
|
import net.minecraft.network.chat.TextComponent;
|
||||||
import net.minecraft.world.entity.EquipmentSlot;
|
|
||||||
import net.minecraft.world.entity.player.Player;
|
import net.minecraft.world.entity.player.Player;
|
||||||
import net.minecraft.world.item.Item;
|
import net.minecraft.world.item.Item;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
@ -235,10 +234,10 @@ public class TooltipHelper {
|
||||||
public static boolean hasTooltip(ItemStack stack, Player player) {
|
public static boolean hasTooltip(ItemStack stack, Player player) {
|
||||||
checkLocale();
|
checkLocale();
|
||||||
|
|
||||||
boolean hasGlasses = AllItems.GOGGLES.isIn(player.getItemBySlot(EquipmentSlot.HEAD));
|
boolean hasGoggles = GogglesItem.isWearingGoggles(player);
|
||||||
|
|
||||||
if (hasGlasses != gogglesMode) {
|
if (hasGoggles != gogglesMode) {
|
||||||
gogglesMode = hasGlasses;
|
gogglesMode = hasGoggles;
|
||||||
cachedTooltips.clear();
|
cachedTooltips.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
package com.simibubi.create.foundation.item;
|
||||||
|
|
||||||
|
import net.minecraft.world.item.BlockItem;
|
||||||
|
import net.minecraft.world.level.block.Block;
|
||||||
|
|
||||||
|
public class UncontainableBlockItem extends BlockItem {
|
||||||
|
public UncontainableBlockItem(Block block, Properties properties) {
|
||||||
|
super(block, properties);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canFitInsideContainerItems() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
|
@ -13,7 +13,7 @@ import net.minecraft.world.level.Level;
|
||||||
|
|
||||||
public class EdgeInteractionBehaviour extends TileEntityBehaviour {
|
public class EdgeInteractionBehaviour extends TileEntityBehaviour {
|
||||||
|
|
||||||
public static BehaviourType<EdgeInteractionBehaviour> TYPE = new BehaviourType<>();
|
public static final BehaviourType<EdgeInteractionBehaviour> TYPE = new BehaviourType<>();
|
||||||
|
|
||||||
ConnectionCallback connectionCallback;
|
ConnectionCallback connectionCallback;
|
||||||
ConnectivityPredicate connectivityPredicate;
|
ConnectivityPredicate connectivityPredicate;
|
||||||
|
|
|
@ -42,11 +42,11 @@ public class EdgeInteractionHandler {
|
||||||
EdgeInteractionBehaviour behaviour = TileEntityBehaviour.get(world, pos, EdgeInteractionBehaviour.TYPE);
|
EdgeInteractionBehaviour behaviour = TileEntityBehaviour.get(world, pos, EdgeInteractionBehaviour.TYPE);
|
||||||
if (behaviour == null)
|
if (behaviour == null)
|
||||||
return;
|
return;
|
||||||
|
if (behaviour.requiredItem.isPresent() && behaviour.requiredItem.get() != heldItem.getItem())
|
||||||
|
return;
|
||||||
BlockHitResult ray = RaycastHelper.rayTraceRange(world, player, 10);
|
BlockHitResult ray = RaycastHelper.rayTraceRange(world, player, 10);
|
||||||
if (ray == null)
|
if (ray == null)
|
||||||
return;
|
return;
|
||||||
if (behaviour.requiredItem.orElse(heldItem.getItem()) != heldItem.getItem())
|
|
||||||
return;
|
|
||||||
|
|
||||||
Direction activatedDirection = getActivatedDirection(world, pos, ray.getDirection(), ray.getLocation(), behaviour);
|
Direction activatedDirection = getActivatedDirection(world, pos, ray.getDirection(), ray.getLocation(), behaviour);
|
||||||
if (activatedDirection == null)
|
if (activatedDirection == null)
|
||||||
|
|
|
@ -1148,7 +1148,7 @@
|
||||||
"create.tooltip.speedRequirement": "Geschwindigkeitsanforderung: %1$s",
|
"create.tooltip.speedRequirement": "Geschwindigkeitsanforderung: %1$s",
|
||||||
"create.tooltip.speedRequirement.none": "Keine",
|
"create.tooltip.speedRequirement.none": "Keine",
|
||||||
"create.tooltip.speedRequirement.medium": "Moderat",
|
"create.tooltip.speedRequirement.medium": "Moderat",
|
||||||
"create.tooltip.speedRequirement.high": "Schnell",
|
"create.tooltip.speedRequirement.fast": "Schnell",
|
||||||
"create.tooltip.stressImpact": "Kinetische Belastungsauswirkung: %1$s",
|
"create.tooltip.stressImpact": "Kinetische Belastungsauswirkung: %1$s",
|
||||||
"create.tooltip.stressImpact.low": "Niedrig",
|
"create.tooltip.stressImpact.low": "Niedrig",
|
||||||
"create.tooltip.stressImpact.medium": "Moderat",
|
"create.tooltip.stressImpact.medium": "Moderat",
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
"create.recipe.fan_washing.fan": "Fan behind Flowing Water",
|
"create.recipe.fan_washing.fan": "Fan behind Flowing Water",
|
||||||
"create.recipe.fan_smoking": "Bulk Smoking",
|
"create.recipe.fan_smoking": "Bulk Smoking",
|
||||||
"create.recipe.fan_smoking.fan": "Fan behind Fire",
|
"create.recipe.fan_smoking.fan": "Fan behind Fire",
|
||||||
"create.recipe.fan_haunting": "Bulk Haunting",
|
"create.recipe.fan_haunting": "Bulk Haunting",
|
||||||
"create.recipe.fan_haunting.fan": "Fan behind Soul Fire",
|
"create.recipe.fan_haunting.fan": "Fan behind Soul Fire",
|
||||||
"create.recipe.fan_blasting": "Bulk Blasting",
|
"create.recipe.fan_blasting": "Bulk Blasting",
|
||||||
"create.recipe.fan_blasting.fan": "Fan behind Lava",
|
"create.recipe.fan_blasting.fan": "Fan behind Lava",
|
||||||
|
@ -461,8 +461,9 @@
|
||||||
|
|
||||||
"create.tooltip.speedRequirement": "Speed Requirement: %1$s",
|
"create.tooltip.speedRequirement": "Speed Requirement: %1$s",
|
||||||
"create.tooltip.speedRequirement.none": "None",
|
"create.tooltip.speedRequirement.none": "None",
|
||||||
|
"create.tooltip.speedRequirement.slow": "Slow",
|
||||||
"create.tooltip.speedRequirement.medium": "Moderate",
|
"create.tooltip.speedRequirement.medium": "Moderate",
|
||||||
"create.tooltip.speedRequirement.high": "Fast",
|
"create.tooltip.speedRequirement.fast": "Fast",
|
||||||
|
|
||||||
"create.tooltip.stressImpact": "Kinetic Stress Impact: %1$s",
|
"create.tooltip.stressImpact": "Kinetic Stress Impact: %1$s",
|
||||||
"create.tooltip.stressImpact.low": "Low",
|
"create.tooltip.stressImpact.low": "Low",
|
||||||
|
|
|
@ -1146,7 +1146,7 @@
|
||||||
"create.tooltip.speedRequirement": "Requqrimiento de Velocidad: %1$s",
|
"create.tooltip.speedRequirement": "Requqrimiento de Velocidad: %1$s",
|
||||||
"create.tooltip.speedRequirement.none": "Ninguno",
|
"create.tooltip.speedRequirement.none": "Ninguno",
|
||||||
"create.tooltip.speedRequirement.medium": "Moderado",
|
"create.tooltip.speedRequirement.medium": "Moderado",
|
||||||
"create.tooltip.speedRequirement.high": "Rápidp",
|
"create.tooltip.speedRequirement.fast": "Rápido",
|
||||||
"create.tooltip.stressImpact": "Impacto en el Estrés Cinético: %1$s",
|
"create.tooltip.stressImpact": "Impacto en el Estrés Cinético: %1$s",
|
||||||
"create.tooltip.stressImpact.low": "Bajo",
|
"create.tooltip.stressImpact.low": "Bajo",
|
||||||
"create.tooltip.stressImpact.medium": "Moderado",
|
"create.tooltip.stressImpact.medium": "Moderado",
|
||||||
|
|
|
@ -1228,7 +1228,7 @@
|
||||||
"create.tooltip.speedRequirement": "Requisitos de velocidad: %1$s",
|
"create.tooltip.speedRequirement": "Requisitos de velocidad: %1$s",
|
||||||
"create.tooltip.speedRequirement.none": "Ninguno",
|
"create.tooltip.speedRequirement.none": "Ninguno",
|
||||||
"create.tooltip.speedRequirement.medium": "Moderado",
|
"create.tooltip.speedRequirement.medium": "Moderado",
|
||||||
"create.tooltip.speedRequirement.high": "Rápido",
|
"create.tooltip.speedRequirement.fast": "Rápido",
|
||||||
"create.tooltip.stressImpact": "Impacto de estrés: %1$s",
|
"create.tooltip.stressImpact": "Impacto de estrés: %1$s",
|
||||||
"create.tooltip.stressImpact.low": "Bajo",
|
"create.tooltip.stressImpact.low": "Bajo",
|
||||||
"create.tooltip.stressImpact.medium": "Moderado",
|
"create.tooltip.stressImpact.medium": "Moderado",
|
||||||
|
|
|
@ -623,7 +623,7 @@
|
||||||
"create.tooltip.speedRequirement": "Vitesse requise: %1$s",
|
"create.tooltip.speedRequirement": "Vitesse requise: %1$s",
|
||||||
"create.tooltip.speedRequirement.none": "Aucune",
|
"create.tooltip.speedRequirement.none": "Aucune",
|
||||||
"create.tooltip.speedRequirement.medium": "Modérée",
|
"create.tooltip.speedRequirement.medium": "Modérée",
|
||||||
"create.tooltip.speedRequirement.high": "Rapide",
|
"create.tooltip.speedRequirement.fast": "Rapide",
|
||||||
"create.tooltip.stressImpact": "Impact du stress: %1$s",
|
"create.tooltip.stressImpact": "Impact du stress: %1$s",
|
||||||
"create.tooltip.stressImpact.low": "Faible",
|
"create.tooltip.stressImpact.low": "Faible",
|
||||||
"create.tooltip.stressImpact.medium": "Modéré",
|
"create.tooltip.stressImpact.medium": "Modéré",
|
||||||
|
|
|
@ -1043,7 +1043,7 @@
|
||||||
"create.tooltip.speedRequirement": "Velocità richiesta: %1$s",
|
"create.tooltip.speedRequirement": "Velocità richiesta: %1$s",
|
||||||
"create.tooltip.speedRequirement.none": "Nessuna",
|
"create.tooltip.speedRequirement.none": "Nessuna",
|
||||||
"create.tooltip.speedRequirement.medium": "Moderata",
|
"create.tooltip.speedRequirement.medium": "Moderata",
|
||||||
"create.tooltip.speedRequirement.high": "Veloce",
|
"create.tooltip.speedRequirement.fast": "Veloce",
|
||||||
"create.tooltip.stressImpact": "Impatto sullo stress: %1$s",
|
"create.tooltip.stressImpact": "Impatto sullo stress: %1$s",
|
||||||
"create.tooltip.stressImpact.low": "Basso",
|
"create.tooltip.stressImpact.low": "Basso",
|
||||||
"create.tooltip.stressImpact.medium": "Moderato",
|
"create.tooltip.stressImpact.medium": "Moderato",
|
||||||
|
|
|
@ -1232,7 +1232,7 @@
|
||||||
"create.tooltip.speedRequirement": "必要な回転速度: %1$s",
|
"create.tooltip.speedRequirement": "必要な回転速度: %1$s",
|
||||||
"create.tooltip.speedRequirement.none": "無し",
|
"create.tooltip.speedRequirement.none": "無し",
|
||||||
"create.tooltip.speedRequirement.medium": "中速",
|
"create.tooltip.speedRequirement.medium": "中速",
|
||||||
"create.tooltip.speedRequirement.high": "高速",
|
"create.tooltip.speedRequirement.fast": "高速",
|
||||||
"create.tooltip.stressImpact": "応力への影響: %1$s",
|
"create.tooltip.stressImpact": "応力への影響: %1$s",
|
||||||
"create.tooltip.stressImpact.low": "低",
|
"create.tooltip.stressImpact.low": "低",
|
||||||
"create.tooltip.stressImpact.medium": "中",
|
"create.tooltip.stressImpact.medium": "中",
|
||||||
|
|
|
@ -1230,7 +1230,7 @@
|
||||||
"create.tooltip.speedRequirement": "요구 회전속도: %1$s",
|
"create.tooltip.speedRequirement": "요구 회전속도: %1$s",
|
||||||
"create.tooltip.speedRequirement.none": "없음",
|
"create.tooltip.speedRequirement.none": "없음",
|
||||||
"create.tooltip.speedRequirement.medium": "보통",
|
"create.tooltip.speedRequirement.medium": "보통",
|
||||||
"create.tooltip.speedRequirement.high": "빠름",
|
"create.tooltip.speedRequirement.fast": "빠름",
|
||||||
"create.tooltip.stressImpact": "피로도 부하: %1$s",
|
"create.tooltip.stressImpact": "피로도 부하: %1$s",
|
||||||
"create.tooltip.stressImpact.low": "낮음",
|
"create.tooltip.stressImpact.low": "낮음",
|
||||||
"create.tooltip.stressImpact.medium": "보통",
|
"create.tooltip.stressImpact.medium": "보통",
|
||||||
|
|
|
@ -405,7 +405,7 @@
|
||||||
"create.tooltip.speedRequirement": "Snelheid eis: %1$s",
|
"create.tooltip.speedRequirement": "Snelheid eis: %1$s",
|
||||||
"create.tooltip.speedRequirement.none": "Geen",
|
"create.tooltip.speedRequirement.none": "Geen",
|
||||||
"create.tooltip.speedRequirement.medium": "Gemiddeld",
|
"create.tooltip.speedRequirement.medium": "Gemiddeld",
|
||||||
"create.tooltip.speedRequirement.high": "Snel",
|
"create.tooltip.speedRequirement.fast": "Snel",
|
||||||
|
|
||||||
"create.tooltip.stressImpact": "Stress Impact: %1$s",
|
"create.tooltip.stressImpact": "Stress Impact: %1$s",
|
||||||
"create.tooltip.stressImpact.low": "Laag",
|
"create.tooltip.stressImpact.low": "Laag",
|
||||||
|
|
|
@ -1116,7 +1116,7 @@
|
||||||
"create.tooltip.speedRequirement": "Wymagana prędkość: %1$s",
|
"create.tooltip.speedRequirement": "Wymagana prędkość: %1$s",
|
||||||
"create.tooltip.speedRequirement.none": "Brak",
|
"create.tooltip.speedRequirement.none": "Brak",
|
||||||
"create.tooltip.speedRequirement.medium": "Umiarkowana",
|
"create.tooltip.speedRequirement.medium": "Umiarkowana",
|
||||||
"create.tooltip.speedRequirement.high": "Wysoka",
|
"create.tooltip.speedRequirement.fast": "Wysoka",
|
||||||
"create.tooltip.stressImpact": "Wpływ na obciążenie: %1$s",
|
"create.tooltip.stressImpact": "Wpływ na obciążenie: %1$s",
|
||||||
"create.tooltip.stressImpact.low": "Niski",
|
"create.tooltip.stressImpact.low": "Niski",
|
||||||
"create.tooltip.stressImpact.medium": "Umiarkowany",
|
"create.tooltip.stressImpact.medium": "Umiarkowany",
|
||||||
|
|
|
@ -1118,7 +1118,7 @@
|
||||||
"create.tooltip.speedRequirement": "Требование к скорости: %1$s",
|
"create.tooltip.speedRequirement": "Требование к скорости: %1$s",
|
||||||
"create.tooltip.speedRequirement.none": "Нет",
|
"create.tooltip.speedRequirement.none": "Нет",
|
||||||
"create.tooltip.speedRequirement.medium": "Умеренная",
|
"create.tooltip.speedRequirement.medium": "Умеренная",
|
||||||
"create.tooltip.speedRequirement.high": "Быстрая",
|
"create.tooltip.speedRequirement.fast": "Быстрая",
|
||||||
"create.tooltip.stressImpact": "Создаваемая нагрузка: %1$s",
|
"create.tooltip.stressImpact": "Создаваемая нагрузка: %1$s",
|
||||||
"create.tooltip.stressImpact.low": "Низкая",
|
"create.tooltip.stressImpact.low": "Низкая",
|
||||||
"create.tooltip.stressImpact.medium": "Средняя",
|
"create.tooltip.stressImpact.medium": "Средняя",
|
||||||
|
|
|
@ -1232,7 +1232,7 @@
|
||||||
"create.tooltip.speedRequirement": "需求转速:%1$s",
|
"create.tooltip.speedRequirement": "需求转速:%1$s",
|
||||||
"create.tooltip.speedRequirement.none": "无",
|
"create.tooltip.speedRequirement.none": "无",
|
||||||
"create.tooltip.speedRequirement.medium": "适当",
|
"create.tooltip.speedRequirement.medium": "适当",
|
||||||
"create.tooltip.speedRequirement.high": "快",
|
"create.tooltip.speedRequirement.fast": "快",
|
||||||
"create.tooltip.stressImpact": "应力影响:%1$s",
|
"create.tooltip.stressImpact": "应力影响:%1$s",
|
||||||
"create.tooltip.stressImpact.low": "低",
|
"create.tooltip.stressImpact.low": "低",
|
||||||
"create.tooltip.stressImpact.medium": "中",
|
"create.tooltip.stressImpact.medium": "中",
|
||||||
|
|
|
@ -1114,7 +1114,7 @@
|
||||||
"create.tooltip.speedRequirement": "需求速度:%1$s",
|
"create.tooltip.speedRequirement": "需求速度:%1$s",
|
||||||
"create.tooltip.speedRequirement.none": "無",
|
"create.tooltip.speedRequirement.none": "無",
|
||||||
"create.tooltip.speedRequirement.medium": "適當",
|
"create.tooltip.speedRequirement.medium": "適當",
|
||||||
"create.tooltip.speedRequirement.high": "快",
|
"create.tooltip.speedRequirement.fast": "快",
|
||||||
"create.tooltip.stressImpact": "動能消耗:%1$s",
|
"create.tooltip.stressImpact": "動能消耗:%1$s",
|
||||||
"create.tooltip.stressImpact.low": "低",
|
"create.tooltip.stressImpact.low": "低",
|
||||||
"create.tooltip.stressImpact.medium": "中",
|
"create.tooltip.stressImpact.medium": "中",
|
||||||
|
|
Loading…
Reference in a new issue