UI and tag enhancements

- Fixed partial ticks on transitions
- Transitions center on clicked components
- Added auto-lang for tags
- Moved some other ui stuff around
This commit is contained in:
simibubi 2021-03-05 01:36:41 +01:00
parent d590b23aa7
commit e2c50663a5
30 changed files with 708 additions and 315 deletions

View file

@ -401,19 +401,19 @@ a3a11524cd3515fc01d905767b4b7ea782adaf03 assets/create/blockstates/yellow_seat.j
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
2384c6457ecf24c7b38358179b8fa6eb93b9627a assets/create/lang/en_ud.json 2384c6457ecf24c7b38358179b8fa6eb93b9627a assets/create/lang/en_ud.json
569b3aaadf1e5c5849692c4e918dc762edd9a316 assets/create/lang/en_us.json 52fd28525a66b08652bac2d1a4a5543956b47091 assets/create/lang/en_us.json
70a747f3639180da9cba1b8747fb19dacb1e9619 assets/create/lang/unfinished/de_de.json 00751ce98f978b4568723ebeaa0350d77a380cd8 assets/create/lang/unfinished/de_de.json
610b1e766bc338d38906a160908cdb79e0d3bc54 assets/create/lang/unfinished/es_es.json 2d8c801b475cabc33c7d0f8f318ef9068a4b8cea assets/create/lang/unfinished/es_es.json
8eff0c23695d3e8c26d1265a82324242a9762226 assets/create/lang/unfinished/es_mx.json 1b18ac809eda5655000a56190bd8be467062beab assets/create/lang/unfinished/es_mx.json
fb150f105517632023265602cfc3c948be932917 assets/create/lang/unfinished/fr_fr.json 93340db6d63864fa23bf663954221b68d345a37f assets/create/lang/unfinished/fr_fr.json
09111dedc02d6803134a8276ec481abcaa0e00c7 assets/create/lang/unfinished/it_it.json 299731bb461adb0c55393fa9c1d814861b002ebd assets/create/lang/unfinished/it_it.json
c1f6faed7efb6f224aec7563b0ac6b891bc780d4 assets/create/lang/unfinished/ja_jp.json 947363f4bcec709f398904ece57a5d66294dd6f8 assets/create/lang/unfinished/ja_jp.json
c6139e7280236adcd136d40a94cd1cb708d402c6 assets/create/lang/unfinished/ko_kr.json 11798cdf3c66152fc736cdba465b795c0abac0b4 assets/create/lang/unfinished/ko_kr.json
bb3fda881575df3ae26921edc3f4a3e2ecbc6ccd assets/create/lang/unfinished/nl_nl.json b30301ea195e3c08dc8d1fecfd9a546255ac75b8 assets/create/lang/unfinished/nl_nl.json
8915f0902e59c1bbfb2c16e43e2ce62b3d616e0d assets/create/lang/unfinished/pt_br.json feb0ab7a4c616447dd74e4cf808a003447cfdfe1 assets/create/lang/unfinished/pt_br.json
ad8d2b7c8c7f3ac584218c33f86ba67c1873b7fc assets/create/lang/unfinished/ru_ru.json d12dde0c45bbf29613ade488619b57949ee7068c assets/create/lang/unfinished/ru_ru.json
e549baab96828524fc4694355546c685859956d6 assets/create/lang/unfinished/zh_cn.json b904d41c0cda0d56b1aa519a45a35800589445d5 assets/create/lang/unfinished/zh_cn.json
2506abb1c796aad920e803a8e1427908c5b115c1 assets/create/lang/unfinished/zh_tw.json 47e89b425362abb4241b4ffe73bfaa22fef0b6f0 assets/create/lang/unfinished/zh_tw.json
846200eb548d3bfa2e77b41039de159b4b6cfb45 assets/create/models/block/acacia_window.json 846200eb548d3bfa2e77b41039de159b4b6cfb45 assets/create/models/block/acacia_window.json
1930fa3a3c98d53dd19e4ee7f55bc27fd47aa281 assets/create/models/block/acacia_window_pane_noside.json 1930fa3a3c98d53dd19e4ee7f55bc27fd47aa281 assets/create/models/block/acacia_window_pane_noside.json
1763ea2c9b981d187f5031ba608f3d5d3be3986a assets/create/models/block/acacia_window_pane_noside_alt.json 1763ea2c9b981d187f5031ba608f3d5d3be3986a assets/create/models/block/acacia_window_pane_noside_alt.json

View file

@ -1807,9 +1807,14 @@
"create.ponder.subject": "Subject of this scene", "create.ponder.subject": "Subject of this scene",
"create.ponder.pondering": "Pondering about...", "create.ponder.pondering": "Pondering about...",
"create.ponder.identify_mode": "Identify mode active.\nUnpause with [%1$s]", "create.ponder.identify_mode": "Identify mode active.\nUnpause with [%1$s]",
"create.ponder.associated": "Associated Entries",
"create.ponder.shared.movement_anchors": "With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.movement_anchors": "With the help of Chassis or Super Glue, larger structures can be moved.",
"create.ponder.shared.sneak_and": "Sneak +", "create.ponder.shared.sneak_and": "Sneak +",
"create.ponder.shared.ctrl_and": "Ctrl +", "create.ponder.shared.ctrl_and": "Ctrl +",
"create.ponder.tag.arm_access": "Targets for Mechanical Arms",
"create.ponder.tag.arm_access.description": "Components which can be selected as inputs or outputs to the Mechanical Arm",
"create.ponder.tag.kinetics": "Kinetic Blocks",
"create.ponder.tag.kinetics.description": "Components which help generating, relaying and making use of Rotational Force",
"create.ponder.brass_funnel.scene_0.header": "The Brass Funnel", "create.ponder.brass_funnel.scene_0.header": "The Brass Funnel",
"create.ponder.brass_funnel.scene_0.text_1": "Andesite Funnels can only ever extract single items.", "create.ponder.brass_funnel.scene_0.text_1": "Andesite Funnels can only ever extract single items.",
@ -1866,6 +1871,10 @@
"create.ponder.shaft.scene_1.header": "Encasing Shafts", "create.ponder.shaft.scene_1.header": "Encasing Shafts",
"create.ponder.shaft.scene_1.text_1": "Andesite or Brass Casing can be used to encase them.", "create.ponder.shaft.scene_1.text_1": "Andesite or Brass Casing can be used to encase them.",
"create.ponder.portable_storage_interface.scene_0.header": "Contraption Storage Exchange",
"create.ponder.portable_storage_interface.scene_1.header": "Redstone Control",
"create.ponder.andesite_funnel.scene_0.header": "Using funnels", "create.ponder.andesite_funnel.scene_0.header": "Using funnels",
"create.ponder.andesite_funnel.scene_0.text_1": "Funnels are ideal for transferring items from and to inventories.", "create.ponder.andesite_funnel.scene_0.text_1": "Funnels are ideal for transferring items from and to inventories.",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 1059", "_": "Missing Localizations: 1066",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -1808,9 +1808,14 @@
"create.ponder.subject": "UNLOCALIZED: Subject of this scene", "create.ponder.subject": "UNLOCALIZED: Subject of this scene",
"create.ponder.pondering": "UNLOCALIZED: Pondering about...", "create.ponder.pondering": "UNLOCALIZED: Pondering about...",
"create.ponder.identify_mode": "UNLOCALIZED: Identify mode active.\nUnpause with [%1$s]", "create.ponder.identify_mode": "UNLOCALIZED: Identify mode active.\nUnpause with [%1$s]",
"create.ponder.associated": "UNLOCALIZED: Associated Entries",
"create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.",
"create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +",
"create.ponder.shared.ctrl_and": "UNLOCALIZED: Ctrl +", "create.ponder.shared.ctrl_and": "UNLOCALIZED: Ctrl +",
"create.ponder.tag.arm_access": "UNLOCALIZED: Targets for Mechanical Arms",
"create.ponder.tag.arm_access.description": "UNLOCALIZED: Components which can be selected as inputs or outputs to the Mechanical Arm",
"create.ponder.tag.kinetics": "UNLOCALIZED: Kinetic Blocks",
"create.ponder.tag.kinetics.description": "UNLOCALIZED: Components which help generating, relaying and making use of Rotational Force",
"create.ponder.brass_funnel.scene_0.header": "UNLOCALIZED: The Brass Funnel", "create.ponder.brass_funnel.scene_0.header": "UNLOCALIZED: The Brass Funnel",
"create.ponder.brass_funnel.scene_0.text_1": "UNLOCALIZED: Andesite Funnels can only ever extract single items.", "create.ponder.brass_funnel.scene_0.text_1": "UNLOCALIZED: Andesite Funnels can only ever extract single items.",
@ -1867,6 +1872,10 @@
"create.ponder.shaft.scene_1.header": "UNLOCALIZED: Encasing Shafts", "create.ponder.shaft.scene_1.header": "UNLOCALIZED: Encasing Shafts",
"create.ponder.shaft.scene_1.text_1": "UNLOCALIZED: Andesite or Brass Casing can be used to encase them.", "create.ponder.shaft.scene_1.text_1": "UNLOCALIZED: Andesite or Brass Casing can be used to encase them.",
"create.ponder.portable_storage_interface.scene_0.header": "UNLOCALIZED: Contraption Storage Exchange",
"create.ponder.portable_storage_interface.scene_1.header": "UNLOCALIZED: Redstone Control",
"create.ponder.andesite_funnel.scene_0.header": "UNLOCALIZED: Using funnels", "create.ponder.andesite_funnel.scene_0.header": "UNLOCALIZED: Using funnels",
"create.ponder.andesite_funnel.scene_0.text_1": "UNLOCALIZED: Funnels are ideal for transferring items from and to inventories.", "create.ponder.andesite_funnel.scene_0.text_1": "UNLOCALIZED: Funnels are ideal for transferring items from and to inventories.",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 102", "_": "Missing Localizations: 109",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -1808,9 +1808,14 @@
"create.ponder.subject": "UNLOCALIZED: Subject of this scene", "create.ponder.subject": "UNLOCALIZED: Subject of this scene",
"create.ponder.pondering": "UNLOCALIZED: Pondering about...", "create.ponder.pondering": "UNLOCALIZED: Pondering about...",
"create.ponder.identify_mode": "UNLOCALIZED: Identify mode active.\nUnpause with [%1$s]", "create.ponder.identify_mode": "UNLOCALIZED: Identify mode active.\nUnpause with [%1$s]",
"create.ponder.associated": "UNLOCALIZED: Associated Entries",
"create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.",
"create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +",
"create.ponder.shared.ctrl_and": "UNLOCALIZED: Ctrl +", "create.ponder.shared.ctrl_and": "UNLOCALIZED: Ctrl +",
"create.ponder.tag.arm_access": "UNLOCALIZED: Targets for Mechanical Arms",
"create.ponder.tag.arm_access.description": "UNLOCALIZED: Components which can be selected as inputs or outputs to the Mechanical Arm",
"create.ponder.tag.kinetics": "UNLOCALIZED: Kinetic Blocks",
"create.ponder.tag.kinetics.description": "UNLOCALIZED: Components which help generating, relaying and making use of Rotational Force",
"create.ponder.brass_funnel.scene_0.header": "UNLOCALIZED: The Brass Funnel", "create.ponder.brass_funnel.scene_0.header": "UNLOCALIZED: The Brass Funnel",
"create.ponder.brass_funnel.scene_0.text_1": "UNLOCALIZED: Andesite Funnels can only ever extract single items.", "create.ponder.brass_funnel.scene_0.text_1": "UNLOCALIZED: Andesite Funnels can only ever extract single items.",
@ -1867,6 +1872,10 @@
"create.ponder.shaft.scene_1.header": "UNLOCALIZED: Encasing Shafts", "create.ponder.shaft.scene_1.header": "UNLOCALIZED: Encasing Shafts",
"create.ponder.shaft.scene_1.text_1": "UNLOCALIZED: Andesite or Brass Casing can be used to encase them.", "create.ponder.shaft.scene_1.text_1": "UNLOCALIZED: Andesite or Brass Casing can be used to encase them.",
"create.ponder.portable_storage_interface.scene_0.header": "UNLOCALIZED: Contraption Storage Exchange",
"create.ponder.portable_storage_interface.scene_1.header": "UNLOCALIZED: Redstone Control",
"create.ponder.andesite_funnel.scene_0.header": "UNLOCALIZED: Using funnels", "create.ponder.andesite_funnel.scene_0.header": "UNLOCALIZED: Using funnels",
"create.ponder.andesite_funnel.scene_0.text_1": "UNLOCALIZED: Funnels are ideal for transferring items from and to inventories.", "create.ponder.andesite_funnel.scene_0.text_1": "UNLOCALIZED: Funnels are ideal for transferring items from and to inventories.",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 989", "_": "Missing Localizations: 996",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -1808,9 +1808,14 @@
"create.ponder.subject": "UNLOCALIZED: Subject of this scene", "create.ponder.subject": "UNLOCALIZED: Subject of this scene",
"create.ponder.pondering": "UNLOCALIZED: Pondering about...", "create.ponder.pondering": "UNLOCALIZED: Pondering about...",
"create.ponder.identify_mode": "UNLOCALIZED: Identify mode active.\nUnpause with [%1$s]", "create.ponder.identify_mode": "UNLOCALIZED: Identify mode active.\nUnpause with [%1$s]",
"create.ponder.associated": "UNLOCALIZED: Associated Entries",
"create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.",
"create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +",
"create.ponder.shared.ctrl_and": "UNLOCALIZED: Ctrl +", "create.ponder.shared.ctrl_and": "UNLOCALIZED: Ctrl +",
"create.ponder.tag.arm_access": "UNLOCALIZED: Targets for Mechanical Arms",
"create.ponder.tag.arm_access.description": "UNLOCALIZED: Components which can be selected as inputs or outputs to the Mechanical Arm",
"create.ponder.tag.kinetics": "UNLOCALIZED: Kinetic Blocks",
"create.ponder.tag.kinetics.description": "UNLOCALIZED: Components which help generating, relaying and making use of Rotational Force",
"create.ponder.brass_funnel.scene_0.header": "UNLOCALIZED: The Brass Funnel", "create.ponder.brass_funnel.scene_0.header": "UNLOCALIZED: The Brass Funnel",
"create.ponder.brass_funnel.scene_0.text_1": "UNLOCALIZED: Andesite Funnels can only ever extract single items.", "create.ponder.brass_funnel.scene_0.text_1": "UNLOCALIZED: Andesite Funnels can only ever extract single items.",
@ -1867,6 +1872,10 @@
"create.ponder.shaft.scene_1.header": "UNLOCALIZED: Encasing Shafts", "create.ponder.shaft.scene_1.header": "UNLOCALIZED: Encasing Shafts",
"create.ponder.shaft.scene_1.text_1": "UNLOCALIZED: Andesite or Brass Casing can be used to encase them.", "create.ponder.shaft.scene_1.text_1": "UNLOCALIZED: Andesite or Brass Casing can be used to encase them.",
"create.ponder.portable_storage_interface.scene_0.header": "UNLOCALIZED: Contraption Storage Exchange",
"create.ponder.portable_storage_interface.scene_1.header": "UNLOCALIZED: Redstone Control",
"create.ponder.andesite_funnel.scene_0.header": "UNLOCALIZED: Using funnels", "create.ponder.andesite_funnel.scene_0.header": "UNLOCALIZED: Using funnels",
"create.ponder.andesite_funnel.scene_0.text_1": "UNLOCALIZED: Funnels are ideal for transferring items from and to inventories.", "create.ponder.andesite_funnel.scene_0.text_1": "UNLOCALIZED: Funnels are ideal for transferring items from and to inventories.",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 771", "_": "Missing Localizations: 778",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -1808,9 +1808,14 @@
"create.ponder.subject": "UNLOCALIZED: Subject of this scene", "create.ponder.subject": "UNLOCALIZED: Subject of this scene",
"create.ponder.pondering": "UNLOCALIZED: Pondering about...", "create.ponder.pondering": "UNLOCALIZED: Pondering about...",
"create.ponder.identify_mode": "UNLOCALIZED: Identify mode active.\nUnpause with [%1$s]", "create.ponder.identify_mode": "UNLOCALIZED: Identify mode active.\nUnpause with [%1$s]",
"create.ponder.associated": "UNLOCALIZED: Associated Entries",
"create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.",
"create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +",
"create.ponder.shared.ctrl_and": "UNLOCALIZED: Ctrl +", "create.ponder.shared.ctrl_and": "UNLOCALIZED: Ctrl +",
"create.ponder.tag.arm_access": "UNLOCALIZED: Targets for Mechanical Arms",
"create.ponder.tag.arm_access.description": "UNLOCALIZED: Components which can be selected as inputs or outputs to the Mechanical Arm",
"create.ponder.tag.kinetics": "UNLOCALIZED: Kinetic Blocks",
"create.ponder.tag.kinetics.description": "UNLOCALIZED: Components which help generating, relaying and making use of Rotational Force",
"create.ponder.brass_funnel.scene_0.header": "UNLOCALIZED: The Brass Funnel", "create.ponder.brass_funnel.scene_0.header": "UNLOCALIZED: The Brass Funnel",
"create.ponder.brass_funnel.scene_0.text_1": "UNLOCALIZED: Andesite Funnels can only ever extract single items.", "create.ponder.brass_funnel.scene_0.text_1": "UNLOCALIZED: Andesite Funnels can only ever extract single items.",
@ -1867,6 +1872,10 @@
"create.ponder.shaft.scene_1.header": "UNLOCALIZED: Encasing Shafts", "create.ponder.shaft.scene_1.header": "UNLOCALIZED: Encasing Shafts",
"create.ponder.shaft.scene_1.text_1": "UNLOCALIZED: Andesite or Brass Casing can be used to encase them.", "create.ponder.shaft.scene_1.text_1": "UNLOCALIZED: Andesite or Brass Casing can be used to encase them.",
"create.ponder.portable_storage_interface.scene_0.header": "UNLOCALIZED: Contraption Storage Exchange",
"create.ponder.portable_storage_interface.scene_1.header": "UNLOCALIZED: Redstone Control",
"create.ponder.andesite_funnel.scene_0.header": "UNLOCALIZED: Using funnels", "create.ponder.andesite_funnel.scene_0.header": "UNLOCALIZED: Using funnels",
"create.ponder.andesite_funnel.scene_0.text_1": "UNLOCALIZED: Funnels are ideal for transferring items from and to inventories.", "create.ponder.andesite_funnel.scene_0.text_1": "UNLOCALIZED: Funnels are ideal for transferring items from and to inventories.",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 107", "_": "Missing Localizations: 114",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -1808,9 +1808,14 @@
"create.ponder.subject": "UNLOCALIZED: Subject of this scene", "create.ponder.subject": "UNLOCALIZED: Subject of this scene",
"create.ponder.pondering": "UNLOCALIZED: Pondering about...", "create.ponder.pondering": "UNLOCALIZED: Pondering about...",
"create.ponder.identify_mode": "UNLOCALIZED: Identify mode active.\nUnpause with [%1$s]", "create.ponder.identify_mode": "UNLOCALIZED: Identify mode active.\nUnpause with [%1$s]",
"create.ponder.associated": "UNLOCALIZED: Associated Entries",
"create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.",
"create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +",
"create.ponder.shared.ctrl_and": "UNLOCALIZED: Ctrl +", "create.ponder.shared.ctrl_and": "UNLOCALIZED: Ctrl +",
"create.ponder.tag.arm_access": "UNLOCALIZED: Targets for Mechanical Arms",
"create.ponder.tag.arm_access.description": "UNLOCALIZED: Components which can be selected as inputs or outputs to the Mechanical Arm",
"create.ponder.tag.kinetics": "UNLOCALIZED: Kinetic Blocks",
"create.ponder.tag.kinetics.description": "UNLOCALIZED: Components which help generating, relaying and making use of Rotational Force",
"create.ponder.brass_funnel.scene_0.header": "UNLOCALIZED: The Brass Funnel", "create.ponder.brass_funnel.scene_0.header": "UNLOCALIZED: The Brass Funnel",
"create.ponder.brass_funnel.scene_0.text_1": "UNLOCALIZED: Andesite Funnels can only ever extract single items.", "create.ponder.brass_funnel.scene_0.text_1": "UNLOCALIZED: Andesite Funnels can only ever extract single items.",
@ -1867,6 +1872,10 @@
"create.ponder.shaft.scene_1.header": "UNLOCALIZED: Encasing Shafts", "create.ponder.shaft.scene_1.header": "UNLOCALIZED: Encasing Shafts",
"create.ponder.shaft.scene_1.text_1": "UNLOCALIZED: Andesite or Brass Casing can be used to encase them.", "create.ponder.shaft.scene_1.text_1": "UNLOCALIZED: Andesite or Brass Casing can be used to encase them.",
"create.ponder.portable_storage_interface.scene_0.header": "UNLOCALIZED: Contraption Storage Exchange",
"create.ponder.portable_storage_interface.scene_1.header": "UNLOCALIZED: Redstone Control",
"create.ponder.andesite_funnel.scene_0.header": "UNLOCALIZED: Using funnels", "create.ponder.andesite_funnel.scene_0.header": "UNLOCALIZED: Using funnels",
"create.ponder.andesite_funnel.scene_0.text_1": "UNLOCALIZED: Funnels are ideal for transferring items from and to inventories.", "create.ponder.andesite_funnel.scene_0.text_1": "UNLOCALIZED: Funnels are ideal for transferring items from and to inventories.",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 114", "_": "Missing Localizations: 121",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -1808,9 +1808,14 @@
"create.ponder.subject": "UNLOCALIZED: Subject of this scene", "create.ponder.subject": "UNLOCALIZED: Subject of this scene",
"create.ponder.pondering": "UNLOCALIZED: Pondering about...", "create.ponder.pondering": "UNLOCALIZED: Pondering about...",
"create.ponder.identify_mode": "UNLOCALIZED: Identify mode active.\nUnpause with [%1$s]", "create.ponder.identify_mode": "UNLOCALIZED: Identify mode active.\nUnpause with [%1$s]",
"create.ponder.associated": "UNLOCALIZED: Associated Entries",
"create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.",
"create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +",
"create.ponder.shared.ctrl_and": "UNLOCALIZED: Ctrl +", "create.ponder.shared.ctrl_and": "UNLOCALIZED: Ctrl +",
"create.ponder.tag.arm_access": "UNLOCALIZED: Targets for Mechanical Arms",
"create.ponder.tag.arm_access.description": "UNLOCALIZED: Components which can be selected as inputs or outputs to the Mechanical Arm",
"create.ponder.tag.kinetics": "UNLOCALIZED: Kinetic Blocks",
"create.ponder.tag.kinetics.description": "UNLOCALIZED: Components which help generating, relaying and making use of Rotational Force",
"create.ponder.brass_funnel.scene_0.header": "UNLOCALIZED: The Brass Funnel", "create.ponder.brass_funnel.scene_0.header": "UNLOCALIZED: The Brass Funnel",
"create.ponder.brass_funnel.scene_0.text_1": "UNLOCALIZED: Andesite Funnels can only ever extract single items.", "create.ponder.brass_funnel.scene_0.text_1": "UNLOCALIZED: Andesite Funnels can only ever extract single items.",
@ -1867,6 +1872,10 @@
"create.ponder.shaft.scene_1.header": "UNLOCALIZED: Encasing Shafts", "create.ponder.shaft.scene_1.header": "UNLOCALIZED: Encasing Shafts",
"create.ponder.shaft.scene_1.text_1": "UNLOCALIZED: Andesite or Brass Casing can be used to encase them.", "create.ponder.shaft.scene_1.text_1": "UNLOCALIZED: Andesite or Brass Casing can be used to encase them.",
"create.ponder.portable_storage_interface.scene_0.header": "UNLOCALIZED: Contraption Storage Exchange",
"create.ponder.portable_storage_interface.scene_1.header": "UNLOCALIZED: Redstone Control",
"create.ponder.andesite_funnel.scene_0.header": "UNLOCALIZED: Using funnels", "create.ponder.andesite_funnel.scene_0.header": "UNLOCALIZED: Using funnels",
"create.ponder.andesite_funnel.scene_0.text_1": "UNLOCALIZED: Funnels are ideal for transferring items from and to inventories.", "create.ponder.andesite_funnel.scene_0.text_1": "UNLOCALIZED: Funnels are ideal for transferring items from and to inventories.",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 160", "_": "Missing Localizations: 167",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -1808,9 +1808,14 @@
"create.ponder.subject": "UNLOCALIZED: Subject of this scene", "create.ponder.subject": "UNLOCALIZED: Subject of this scene",
"create.ponder.pondering": "UNLOCALIZED: Pondering about...", "create.ponder.pondering": "UNLOCALIZED: Pondering about...",
"create.ponder.identify_mode": "UNLOCALIZED: Identify mode active.\nUnpause with [%1$s]", "create.ponder.identify_mode": "UNLOCALIZED: Identify mode active.\nUnpause with [%1$s]",
"create.ponder.associated": "UNLOCALIZED: Associated Entries",
"create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.",
"create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +",
"create.ponder.shared.ctrl_and": "UNLOCALIZED: Ctrl +", "create.ponder.shared.ctrl_and": "UNLOCALIZED: Ctrl +",
"create.ponder.tag.arm_access": "UNLOCALIZED: Targets for Mechanical Arms",
"create.ponder.tag.arm_access.description": "UNLOCALIZED: Components which can be selected as inputs or outputs to the Mechanical Arm",
"create.ponder.tag.kinetics": "UNLOCALIZED: Kinetic Blocks",
"create.ponder.tag.kinetics.description": "UNLOCALIZED: Components which help generating, relaying and making use of Rotational Force",
"create.ponder.brass_funnel.scene_0.header": "UNLOCALIZED: The Brass Funnel", "create.ponder.brass_funnel.scene_0.header": "UNLOCALIZED: The Brass Funnel",
"create.ponder.brass_funnel.scene_0.text_1": "UNLOCALIZED: Andesite Funnels can only ever extract single items.", "create.ponder.brass_funnel.scene_0.text_1": "UNLOCALIZED: Andesite Funnels can only ever extract single items.",
@ -1867,6 +1872,10 @@
"create.ponder.shaft.scene_1.header": "UNLOCALIZED: Encasing Shafts", "create.ponder.shaft.scene_1.header": "UNLOCALIZED: Encasing Shafts",
"create.ponder.shaft.scene_1.text_1": "UNLOCALIZED: Andesite or Brass Casing can be used to encase them.", "create.ponder.shaft.scene_1.text_1": "UNLOCALIZED: Andesite or Brass Casing can be used to encase them.",
"create.ponder.portable_storage_interface.scene_0.header": "UNLOCALIZED: Contraption Storage Exchange",
"create.ponder.portable_storage_interface.scene_1.header": "UNLOCALIZED: Redstone Control",
"create.ponder.andesite_funnel.scene_0.header": "UNLOCALIZED: Using funnels", "create.ponder.andesite_funnel.scene_0.header": "UNLOCALIZED: Using funnels",
"create.ponder.andesite_funnel.scene_0.text_1": "UNLOCALIZED: Funnels are ideal for transferring items from and to inventories.", "create.ponder.andesite_funnel.scene_0.text_1": "UNLOCALIZED: Funnels are ideal for transferring items from and to inventories.",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 1258", "_": "Missing Localizations: 1265",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -1808,9 +1808,14 @@
"create.ponder.subject": "UNLOCALIZED: Subject of this scene", "create.ponder.subject": "UNLOCALIZED: Subject of this scene",
"create.ponder.pondering": "UNLOCALIZED: Pondering about...", "create.ponder.pondering": "UNLOCALIZED: Pondering about...",
"create.ponder.identify_mode": "UNLOCALIZED: Identify mode active.\nUnpause with [%1$s]", "create.ponder.identify_mode": "UNLOCALIZED: Identify mode active.\nUnpause with [%1$s]",
"create.ponder.associated": "UNLOCALIZED: Associated Entries",
"create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.",
"create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +",
"create.ponder.shared.ctrl_and": "UNLOCALIZED: Ctrl +", "create.ponder.shared.ctrl_and": "UNLOCALIZED: Ctrl +",
"create.ponder.tag.arm_access": "UNLOCALIZED: Targets for Mechanical Arms",
"create.ponder.tag.arm_access.description": "UNLOCALIZED: Components which can be selected as inputs or outputs to the Mechanical Arm",
"create.ponder.tag.kinetics": "UNLOCALIZED: Kinetic Blocks",
"create.ponder.tag.kinetics.description": "UNLOCALIZED: Components which help generating, relaying and making use of Rotational Force",
"create.ponder.brass_funnel.scene_0.header": "UNLOCALIZED: The Brass Funnel", "create.ponder.brass_funnel.scene_0.header": "UNLOCALIZED: The Brass Funnel",
"create.ponder.brass_funnel.scene_0.text_1": "UNLOCALIZED: Andesite Funnels can only ever extract single items.", "create.ponder.brass_funnel.scene_0.text_1": "UNLOCALIZED: Andesite Funnels can only ever extract single items.",
@ -1867,6 +1872,10 @@
"create.ponder.shaft.scene_1.header": "UNLOCALIZED: Encasing Shafts", "create.ponder.shaft.scene_1.header": "UNLOCALIZED: Encasing Shafts",
"create.ponder.shaft.scene_1.text_1": "UNLOCALIZED: Andesite or Brass Casing can be used to encase them.", "create.ponder.shaft.scene_1.text_1": "UNLOCALIZED: Andesite or Brass Casing can be used to encase them.",
"create.ponder.portable_storage_interface.scene_0.header": "UNLOCALIZED: Contraption Storage Exchange",
"create.ponder.portable_storage_interface.scene_1.header": "UNLOCALIZED: Redstone Control",
"create.ponder.andesite_funnel.scene_0.header": "UNLOCALIZED: Using funnels", "create.ponder.andesite_funnel.scene_0.header": "UNLOCALIZED: Using funnels",
"create.ponder.andesite_funnel.scene_0.text_1": "UNLOCALIZED: Funnels are ideal for transferring items from and to inventories.", "create.ponder.andesite_funnel.scene_0.text_1": "UNLOCALIZED: Funnels are ideal for transferring items from and to inventories.",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 1324", "_": "Missing Localizations: 1331",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -1808,9 +1808,14 @@
"create.ponder.subject": "UNLOCALIZED: Subject of this scene", "create.ponder.subject": "UNLOCALIZED: Subject of this scene",
"create.ponder.pondering": "UNLOCALIZED: Pondering about...", "create.ponder.pondering": "UNLOCALIZED: Pondering about...",
"create.ponder.identify_mode": "UNLOCALIZED: Identify mode active.\nUnpause with [%1$s]", "create.ponder.identify_mode": "UNLOCALIZED: Identify mode active.\nUnpause with [%1$s]",
"create.ponder.associated": "UNLOCALIZED: Associated Entries",
"create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.",
"create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +",
"create.ponder.shared.ctrl_and": "UNLOCALIZED: Ctrl +", "create.ponder.shared.ctrl_and": "UNLOCALIZED: Ctrl +",
"create.ponder.tag.arm_access": "UNLOCALIZED: Targets for Mechanical Arms",
"create.ponder.tag.arm_access.description": "UNLOCALIZED: Components which can be selected as inputs or outputs to the Mechanical Arm",
"create.ponder.tag.kinetics": "UNLOCALIZED: Kinetic Blocks",
"create.ponder.tag.kinetics.description": "UNLOCALIZED: Components which help generating, relaying and making use of Rotational Force",
"create.ponder.brass_funnel.scene_0.header": "UNLOCALIZED: The Brass Funnel", "create.ponder.brass_funnel.scene_0.header": "UNLOCALIZED: The Brass Funnel",
"create.ponder.brass_funnel.scene_0.text_1": "UNLOCALIZED: Andesite Funnels can only ever extract single items.", "create.ponder.brass_funnel.scene_0.text_1": "UNLOCALIZED: Andesite Funnels can only ever extract single items.",
@ -1867,6 +1872,10 @@
"create.ponder.shaft.scene_1.header": "UNLOCALIZED: Encasing Shafts", "create.ponder.shaft.scene_1.header": "UNLOCALIZED: Encasing Shafts",
"create.ponder.shaft.scene_1.text_1": "UNLOCALIZED: Andesite or Brass Casing can be used to encase them.", "create.ponder.shaft.scene_1.text_1": "UNLOCALIZED: Andesite or Brass Casing can be used to encase them.",
"create.ponder.portable_storage_interface.scene_0.header": "UNLOCALIZED: Contraption Storage Exchange",
"create.ponder.portable_storage_interface.scene_1.header": "UNLOCALIZED: Redstone Control",
"create.ponder.andesite_funnel.scene_0.header": "UNLOCALIZED: Using funnels", "create.ponder.andesite_funnel.scene_0.header": "UNLOCALIZED: Using funnels",
"create.ponder.andesite_funnel.scene_0.text_1": "UNLOCALIZED: Funnels are ideal for transferring items from and to inventories.", "create.ponder.andesite_funnel.scene_0.text_1": "UNLOCALIZED: Funnels are ideal for transferring items from and to inventories.",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 110", "_": "Missing Localizations: 117",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -1808,9 +1808,14 @@
"create.ponder.subject": "UNLOCALIZED: Subject of this scene", "create.ponder.subject": "UNLOCALIZED: Subject of this scene",
"create.ponder.pondering": "UNLOCALIZED: Pondering about...", "create.ponder.pondering": "UNLOCALIZED: Pondering about...",
"create.ponder.identify_mode": "UNLOCALIZED: Identify mode active.\nUnpause with [%1$s]", "create.ponder.identify_mode": "UNLOCALIZED: Identify mode active.\nUnpause with [%1$s]",
"create.ponder.associated": "UNLOCALIZED: Associated Entries",
"create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.",
"create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +",
"create.ponder.shared.ctrl_and": "UNLOCALIZED: Ctrl +", "create.ponder.shared.ctrl_and": "UNLOCALIZED: Ctrl +",
"create.ponder.tag.arm_access": "UNLOCALIZED: Targets for Mechanical Arms",
"create.ponder.tag.arm_access.description": "UNLOCALIZED: Components which can be selected as inputs or outputs to the Mechanical Arm",
"create.ponder.tag.kinetics": "UNLOCALIZED: Kinetic Blocks",
"create.ponder.tag.kinetics.description": "UNLOCALIZED: Components which help generating, relaying and making use of Rotational Force",
"create.ponder.brass_funnel.scene_0.header": "UNLOCALIZED: The Brass Funnel", "create.ponder.brass_funnel.scene_0.header": "UNLOCALIZED: The Brass Funnel",
"create.ponder.brass_funnel.scene_0.text_1": "UNLOCALIZED: Andesite Funnels can only ever extract single items.", "create.ponder.brass_funnel.scene_0.text_1": "UNLOCALIZED: Andesite Funnels can only ever extract single items.",
@ -1867,6 +1872,10 @@
"create.ponder.shaft.scene_1.header": "UNLOCALIZED: Encasing Shafts", "create.ponder.shaft.scene_1.header": "UNLOCALIZED: Encasing Shafts",
"create.ponder.shaft.scene_1.text_1": "UNLOCALIZED: Andesite or Brass Casing can be used to encase them.", "create.ponder.shaft.scene_1.text_1": "UNLOCALIZED: Andesite or Brass Casing can be used to encase them.",
"create.ponder.portable_storage_interface.scene_0.header": "UNLOCALIZED: Contraption Storage Exchange",
"create.ponder.portable_storage_interface.scene_1.header": "UNLOCALIZED: Redstone Control",
"create.ponder.andesite_funnel.scene_0.header": "UNLOCALIZED: Using funnels", "create.ponder.andesite_funnel.scene_0.header": "UNLOCALIZED: Using funnels",
"create.ponder.andesite_funnel.scene_0.text_1": "UNLOCALIZED: Funnels are ideal for transferring items from and to inventories.", "create.ponder.andesite_funnel.scene_0.text_1": "UNLOCALIZED: Funnels are ideal for transferring items from and to inventories.",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 108", "_": "Missing Localizations: 115",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -1808,9 +1808,14 @@
"create.ponder.subject": "UNLOCALIZED: Subject of this scene", "create.ponder.subject": "UNLOCALIZED: Subject of this scene",
"create.ponder.pondering": "UNLOCALIZED: Pondering about...", "create.ponder.pondering": "UNLOCALIZED: Pondering about...",
"create.ponder.identify_mode": "UNLOCALIZED: Identify mode active.\nUnpause with [%1$s]", "create.ponder.identify_mode": "UNLOCALIZED: Identify mode active.\nUnpause with [%1$s]",
"create.ponder.associated": "UNLOCALIZED: Associated Entries",
"create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.",
"create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +",
"create.ponder.shared.ctrl_and": "UNLOCALIZED: Ctrl +", "create.ponder.shared.ctrl_and": "UNLOCALIZED: Ctrl +",
"create.ponder.tag.arm_access": "UNLOCALIZED: Targets for Mechanical Arms",
"create.ponder.tag.arm_access.description": "UNLOCALIZED: Components which can be selected as inputs or outputs to the Mechanical Arm",
"create.ponder.tag.kinetics": "UNLOCALIZED: Kinetic Blocks",
"create.ponder.tag.kinetics.description": "UNLOCALIZED: Components which help generating, relaying and making use of Rotational Force",
"create.ponder.brass_funnel.scene_0.header": "UNLOCALIZED: The Brass Funnel", "create.ponder.brass_funnel.scene_0.header": "UNLOCALIZED: The Brass Funnel",
"create.ponder.brass_funnel.scene_0.text_1": "UNLOCALIZED: Andesite Funnels can only ever extract single items.", "create.ponder.brass_funnel.scene_0.text_1": "UNLOCALIZED: Andesite Funnels can only ever extract single items.",
@ -1867,6 +1872,10 @@
"create.ponder.shaft.scene_1.header": "UNLOCALIZED: Encasing Shafts", "create.ponder.shaft.scene_1.header": "UNLOCALIZED: Encasing Shafts",
"create.ponder.shaft.scene_1.text_1": "UNLOCALIZED: Andesite or Brass Casing can be used to encase them.", "create.ponder.shaft.scene_1.text_1": "UNLOCALIZED: Andesite or Brass Casing can be used to encase them.",
"create.ponder.portable_storage_interface.scene_0.header": "UNLOCALIZED: Contraption Storage Exchange",
"create.ponder.portable_storage_interface.scene_1.header": "UNLOCALIZED: Redstone Control",
"create.ponder.andesite_funnel.scene_0.header": "UNLOCALIZED: Using funnels", "create.ponder.andesite_funnel.scene_0.header": "UNLOCALIZED: Using funnels",
"create.ponder.andesite_funnel.scene_0.text_1": "UNLOCALIZED: Funnels are ideal for transferring items from and to inventories.", "create.ponder.andesite_funnel.scene_0.text_1": "UNLOCALIZED: Funnels are ideal for transferring items from and to inventories.",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 113", "_": "Missing Localizations: 120",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -1808,9 +1808,14 @@
"create.ponder.subject": "UNLOCALIZED: Subject of this scene", "create.ponder.subject": "UNLOCALIZED: Subject of this scene",
"create.ponder.pondering": "UNLOCALIZED: Pondering about...", "create.ponder.pondering": "UNLOCALIZED: Pondering about...",
"create.ponder.identify_mode": "UNLOCALIZED: Identify mode active.\nUnpause with [%1$s]", "create.ponder.identify_mode": "UNLOCALIZED: Identify mode active.\nUnpause with [%1$s]",
"create.ponder.associated": "UNLOCALIZED: Associated Entries",
"create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.",
"create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +",
"create.ponder.shared.ctrl_and": "UNLOCALIZED: Ctrl +", "create.ponder.shared.ctrl_and": "UNLOCALIZED: Ctrl +",
"create.ponder.tag.arm_access": "UNLOCALIZED: Targets for Mechanical Arms",
"create.ponder.tag.arm_access.description": "UNLOCALIZED: Components which can be selected as inputs or outputs to the Mechanical Arm",
"create.ponder.tag.kinetics": "UNLOCALIZED: Kinetic Blocks",
"create.ponder.tag.kinetics.description": "UNLOCALIZED: Components which help generating, relaying and making use of Rotational Force",
"create.ponder.brass_funnel.scene_0.header": "UNLOCALIZED: The Brass Funnel", "create.ponder.brass_funnel.scene_0.header": "UNLOCALIZED: The Brass Funnel",
"create.ponder.brass_funnel.scene_0.text_1": "UNLOCALIZED: Andesite Funnels can only ever extract single items.", "create.ponder.brass_funnel.scene_0.text_1": "UNLOCALIZED: Andesite Funnels can only ever extract single items.",
@ -1867,6 +1872,10 @@
"create.ponder.shaft.scene_1.header": "UNLOCALIZED: Encasing Shafts", "create.ponder.shaft.scene_1.header": "UNLOCALIZED: Encasing Shafts",
"create.ponder.shaft.scene_1.text_1": "UNLOCALIZED: Andesite or Brass Casing can be used to encase them.", "create.ponder.shaft.scene_1.text_1": "UNLOCALIZED: Andesite or Brass Casing can be used to encase them.",
"create.ponder.portable_storage_interface.scene_0.header": "UNLOCALIZED: Contraption Storage Exchange",
"create.ponder.portable_storage_interface.scene_1.header": "UNLOCALIZED: Redstone Control",
"create.ponder.andesite_funnel.scene_0.header": "UNLOCALIZED: Using funnels", "create.ponder.andesite_funnel.scene_0.header": "UNLOCALIZED: Using funnels",
"create.ponder.andesite_funnel.scene_0.text_1": "UNLOCALIZED: Funnels are ideal for transferring items from and to inventories.", "create.ponder.andesite_funnel.scene_0.text_1": "UNLOCALIZED: Funnels are ideal for transferring items from and to inventories.",

View file

@ -1,8 +1,17 @@
package com.simibubi.create.foundation.gui; package com.simibubi.create.foundation.gui;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import org.apache.commons.lang3.mutable.MutableBoolean;
import org.apache.commons.lang3.mutable.MutableInt;
import org.lwjgl.glfw.GLFW;
import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.systems.RenderSystem;
import com.simibubi.create.foundation.gui.widgets.AbstractSimiWidget; import com.simibubi.create.foundation.gui.widgets.AbstractSimiWidget;
import com.simibubi.create.foundation.utility.LerpedFloat; import com.simibubi.create.foundation.utility.LerpedFloat;
import net.minecraft.client.MainWindow; import net.minecraft.client.MainWindow;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.screen.Screen; import net.minecraft.client.gui.screen.Screen;
@ -10,26 +19,25 @@ import net.minecraft.client.gui.widget.Widget;
import net.minecraft.util.text.StringTextComponent; import net.minecraft.util.text.StringTextComponent;
import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;
import org.apache.commons.lang3.mutable.MutableBoolean;
import org.apache.commons.lang3.mutable.MutableInt;
import org.apache.logging.log4j.LogManager;
import org.lwjgl.glfw.GLFW;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public abstract class AbstractSimiScreen extends Screen { public abstract class AbstractSimiScreen extends Screen {
protected int sWidth, sHeight; protected int sWidth, sHeight;
protected int guiLeft, guiTop; protected int guiLeft, guiTop;
protected int depthPointX, depthPointY;
protected List<Widget> widgets; protected List<Widget> widgets;
public final LerpedFloat transition = LerpedFloat.linear().startWithValue(0).chase(0, .1f, LerpedFloat.Chaser.LINEAR); public final LerpedFloat transition = LerpedFloat.linear()
.startWithValue(0)
.chase(0, .1f, LerpedFloat.Chaser.LINEAR);
protected AbstractSimiScreen() { protected AbstractSimiScreen() {
super(new StringTextComponent("")); super(new StringTextComponent(""));
widgets = new ArrayList<>(); widgets = new ArrayList<>();
MainWindow window = Minecraft.getInstance()
.getWindow();
depthPointX = window.getScaledWidth() / 2;
depthPointY = window.getScaledHeight() / 2;
} }
protected void setWindowSize(int width, int height) { protected void setWindowSize(int width, int height) {
@ -42,104 +50,102 @@ public abstract class AbstractSimiScreen extends Screen {
@Override @Override
public void tick() { public void tick() {
super.tick(); super.tick();
transition.tickChaser(); transition.tickChaser();
if (transition.getValue() < -0.9995f) {
transition.updateChaseTarget(0);
transition.setValue(0);
ScreenOpener.openLastScreen();
} else if (transition.getValue() > 0.9995f) {
transition.updateChaseTarget(0);
transition.setValue(0);
}
} }
@Override @Override
public void render(int mouseX, int mouseY, float partialTicks) { public void render(int mouseX, int mouseY, float partialTicks) {
partialTicks = partialTicks == 10 ? 0
: Minecraft.getInstance()
.getRenderPartialTicks();
RenderSystem.pushMatrix(); RenderSystem.pushMatrix();
renderTransition(mouseX, mouseY, partialTicks); renderTransition(mouseX, mouseY, partialTicks);
partialTicks = Minecraft.getInstance()
.getRenderPartialTicks();
renderBackground();
renderWindow(mouseX, mouseY, partialTicks); renderWindow(mouseX, mouseY, partialTicks);
for (Widget widget : widgets) for (Widget widget : widgets)
widget.render(mouseX, mouseY, partialTicks); widget.render(mouseX, mouseY, partialTicks);
renderBreadcrumbs(mouseX, mouseY, partialTicks);
renderWindowForeground(mouseX, mouseY, partialTicks); renderWindowForeground(mouseX, mouseY, partialTicks);
for (Widget widget : widgets) for (Widget widget : widgets)
widget.renderToolTip(mouseX, mouseY); widget.renderToolTip(mouseX, mouseY);
RenderSystem.popMatrix(); RenderSystem.popMatrix();
renderBreadcrumbs(mouseX, mouseY, partialTicks);
} }
private void renderTransition(int mouseX, int mouseY, float partialTicks) { private void renderTransition(int mouseX, int mouseY, float partialTicks) {
if (transition.getChaseTarget() != 0) { if (transition.getChaseTarget() == 0) {
if (ScreenOpener.getLastScreen() == null) { renderBackground();
return;
} else if (ScreenOpener.getLastScreen() == this) {
LogManager.getLogger().warn("Tired to render last screen recursively during transition");
return; return;
} }
renderBackground();
Screen lastScreen = ScreenOpener.getPreviouslyRenderedScreen();
float transitionValue = transition.getValue(partialTicks);
double scale = 1 + 0.5 * transitionValue;
// draw last screen into buffer // draw last screen into buffer
if (lastScreen != null && lastScreen != this) {
RenderSystem.pushMatrix();// 1 RenderSystem.pushMatrix();// 1
UIRenderHelper.framebuffer.framebufferClear(Minecraft.IS_RUNNING_ON_MAC); UIRenderHelper.framebuffer.framebufferClear(Minecraft.IS_RUNNING_ON_MAC);
UIRenderHelper.prepFramebufferSize(); UIRenderHelper.prepFramebufferSize();
RenderSystem.pushMatrix();// 2 RenderSystem.pushMatrix();// 2
RenderSystem.translated(0, 0, -1000); RenderSystem.translated(0, 0, -1000);
UIRenderHelper.framebuffer.bindFramebuffer(true); UIRenderHelper.framebuffer.bindFramebuffer(true);
ScreenOpener.getLastScreen().render(mouseX, mouseY, partialTicks); lastScreen.render(mouseX, mouseY, 10);
RenderSystem.popMatrix();// 2 RenderSystem.popMatrix();// 2
Minecraft.getInstance().getFramebuffer().bindFramebuffer(true);
// use the buffer texture // use the buffer texture
float transitionValue = transition.getValue(partialTicks); Minecraft.getInstance()
if (transition.getChaseTarget() < 0) .getFramebuffer()
transitionValue += 1; .bindFramebuffer(true);
//transitionV is ~1 when the older screen is hidden
//transitionV is ~0 when the older screen is still fully visible
double scale = 1 - 0.25 * transitionValue;
MainWindow window = Minecraft.getInstance().getWindow();
int sw = window.getScaledWidth();
int sh = window.getScaledHeight();
RenderSystem.translated(sw * 0.5, sh * 0.5, -10);
RenderSystem.scaled(scale, scale, 1);
RenderSystem.translated(sw * -0.5, sh * -0.5, 0);
UIRenderHelper.drawFramebuffer(sw, sh, 1f - transitionValue); MainWindow window = Minecraft.getInstance()
.getWindow();
int dpx = window.getScaledWidth() / 2;
int dpy = window.getScaledHeight() / 2;
if (lastScreen instanceof AbstractSimiScreen) {
dpx = ((AbstractSimiScreen) lastScreen).depthPointX;
dpy = ((AbstractSimiScreen) lastScreen).depthPointY;
}
// transitionV is 1/-1 when the older screen is hidden
// transitionV is 0 when the older screen is still fully visible
RenderSystem.translated(dpx, dpy, 0);
RenderSystem.scaled(scale, scale, 1);
RenderSystem.translated(-dpx, -dpy, 0);
UIRenderHelper.drawFramebuffer(1f - Math.abs(transitionValue));
RenderSystem.popMatrix();// 1 RenderSystem.popMatrix();// 1
}
// modify current screen as well // modify current screen as well
scale = 1 + 0.02 * (1 - transitionValue); scale = transitionValue > 0 ? 1 - 0.5 * (1 - transitionValue) : 1 + .5 * (1 + transitionValue);
RenderSystem.translated(sw * 0.5, sh * 0.5, 0); RenderSystem.translated(depthPointX, depthPointY, 0);
RenderSystem.scaled(scale, scale, 1); RenderSystem.scaled(scale, scale, 1);
RenderSystem.translated(sw * -0.5, sh * -0.5, 0); RenderSystem.translated(-depthPointX, -depthPointY, 0);
}
} }
@Override @Override
public boolean mouseClicked(double x, double y, int button) { public boolean mouseClicked(double x, double y, int button) {
boolean result = false; boolean result = false;
for (Widget widget : widgets) { for (Widget widget : widgets)
if (widget.mouseClicked(x, y, button)) if (widget.mouseClicked(x, y, button))
result = true; result = true;
}
return result; return result;
} }
@Override @Override
public boolean keyPressed(int code, int p_keyPressed_2_, int p_keyPressed_3_) { public boolean keyPressed(int code, int p_keyPressed_2_, int p_keyPressed_3_) {
for (Widget widget : widgets) { for (Widget widget : widgets)
if (widget.keyPressed(code, p_keyPressed_2_, p_keyPressed_3_)) if (widget.keyPressed(code, p_keyPressed_2_, p_keyPressed_3_))
return true; return true;
}
if (code == GLFW.GLFW_KEY_BACKSPACE) { if (code == GLFW.GLFW_KEY_BACKSPACE) {
ScreenOpener.transitionToLast(); ScreenOpener.openPreviousScreen(this);
return true; return true;
} }
@ -202,13 +208,11 @@ public abstract class AbstractSimiScreen extends Screen {
history.add(0, Minecraft.getInstance().currentScreen); history.add(0, Minecraft.getInstance().currentScreen);
int spacing = 20; int spacing = 20;
List<String> names = history List<String> names = history.stream()
.stream()
.map(AbstractSimiScreen::screenTitle) .map(AbstractSimiScreen::screenTitle)
.collect(Collectors.toList()); .collect(Collectors.toList());
int bWidth = names int bWidth = names.stream()
.stream()
.mapToInt(s -> font.getStringWidth(s) + spacing) .mapToInt(s -> font.getStringWidth(s) + spacing)
.sum(); .sum();
@ -219,26 +223,33 @@ public abstract class AbstractSimiScreen extends Screen {
if (x.getValue() < 25) if (x.getValue() < 25)
x.setValue(25); x.setValue(25);
RenderSystem.pushMatrix();
RenderSystem.translated(0, 0, 600);
names.forEach(s -> { names.forEach(s -> {
int sWidth = font.getStringWidth(s); int sWidth = font.getStringWidth(s);
//UIRenderHelper.breadcrumbArrow(x.getValue(), y.getValue(), sWidth + spacing, 14, spacing/2, 0xbbababab, 0x22ababab); // UIRenderHelper.breadcrumbArrow(x.getValue(), y.getValue(), sWidth + spacing,
UIRenderHelper.breadcrumbArrow(x.getValue(), y.getValue(), sWidth + spacing, 14, spacing/2, 0xdd101010, 0x44101010); // 14, spacing/2, 0xbbababab, 0x22ababab);
UIRenderHelper.breadcrumbArrow(x.getValue(), y.getValue(), sWidth + spacing, 14, spacing / 2, 0xdd101010,
0x44101010);
drawString(font, s, x.getValue() + 5, y.getValue() + 3, first.getValue() ? 0xffeeffee : 0xffddeeff); drawString(font, s, x.getValue() + 5, y.getValue() + 3, first.getValue() ? 0xffeeffee : 0xffddeeff);
first.setFalse(); first.setFalse();
x.add(sWidth + spacing); x.add(sWidth + spacing);
}); });
RenderSystem.popMatrix();
} }
private static String screenTitle(Screen screen) { private static String screenTitle(Screen screen) {
if (screen instanceof AbstractSimiScreen) if (screen instanceof AbstractSimiScreen)
return ((AbstractSimiScreen) screen).getBreadcrumbTitle(); return ((AbstractSimiScreen) screen).getBreadcrumbTitle();
return screen.getClass().getSimpleName(); return screen.getClass()
.getSimpleName();
} }
protected String getBreadcrumbTitle() { protected String getBreadcrumbTitle() {
return this.getClass().getSimpleName(); return this.getClass()
.getSimpleName();
} }
protected void renderWindowForeground(int mouseX, int mouseY, float partialTicks) { protected void renderWindowForeground(int mouseX, int mouseY, float partialTicks) {
@ -253,4 +264,16 @@ public abstract class AbstractSimiScreen extends Screen {
} }
} }
public void centerScalingOn(int x, int y) {
depthPointX = x;
depthPointY = y;
}
public void centerScalingOnMouse() {
MainWindow w = minecraft.getWindow();
double mouseX = minecraft.mouseHelper.getMouseX() * w.getScaledWidth() / w.getWidth();
double mouseY = minecraft.mouseHelper.getMouseY() * w.getScaledHeight() / w.getHeight();
centerScalingOn((int) mouseX, (int) mouseY);
}
} }

View file

@ -1,23 +1,29 @@
package com.simibubi.create.foundation.gui; package com.simibubi.create.foundation.gui;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.screen.Screen;
import javax.annotation.Nullable;
import java.util.ArrayDeque; import java.util.ArrayDeque;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Deque; import java.util.Deque;
import java.util.List; import java.util.List;
import javax.annotation.Nullable;
import com.simibubi.create.foundation.ponder.PonderUI;
import com.simibubi.create.foundation.utility.LerpedFloat;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.screen.Screen;
public class ScreenOpener { public class ScreenOpener {
private static final Deque<Screen> backStack = new ArrayDeque<>(); private static final Deque<Screen> backStack = new ArrayDeque<>();
private static Screen backSteppedFrom = null;
public static void open(Screen screen) { public static void open(Screen screen) {
open(Minecraft.getInstance().currentScreen, screen); open(Minecraft.getInstance().currentScreen, screen);
} }
public static void open(@Nullable Screen current, Screen toOpen) { public static void open(@Nullable Screen current, Screen toOpen) {
backSteppedFrom = null;
if (current != null) { if (current != null) {
if (backStack.size() >= 15) // don't go deeper than 15 steps if (backStack.size() >= 15) // don't go deeper than 15 steps
backStack.pollLast(); backStack.pollLast();
@ -29,28 +35,36 @@ public class ScreenOpener {
openScreen(toOpen); openScreen(toOpen);
} }
public static void openLastScreen() { public static void openPreviousScreen(Screen current) {
if (backStack.isEmpty()) if (backStack.isEmpty())
return; return;
backSteppedFrom = current;
openScreen(backStack.pop()); Screen previousScreen = backStack.pop();
if (previousScreen instanceof AbstractSimiScreen)
((AbstractSimiScreen) previousScreen).transition.startWithValue(-0.1)
.chase(-1, .4f, LerpedFloat.Chaser.EXP);
openScreen(previousScreen);
} }
//transitions are only supported in simiScreens atm. they take care of all the rendering for it // transitions are only supported in simiScreens atm. they take care of all the
// rendering for it
public static void transitionTo(AbstractSimiScreen screen) { public static void transitionTo(AbstractSimiScreen screen) {
screen.transition.updateChaseTarget(1);
open(screen); List<Screen> screenHistory = getScreenHistory();
if (!screenHistory.isEmpty()) {
Screen previouslyRenderedScreen = screenHistory.get(0);
if (screen instanceof PonderUI && previouslyRenderedScreen instanceof PonderUI) {
if (((PonderUI) screen).getSubject()
.isItemEqual(((PonderUI) previouslyRenderedScreen).getSubject())) {
openPreviousScreen(Minecraft.getInstance().currentScreen);
return;
}
}
} }
public static void transitionToLast() { screen.transition.startWithValue(0.1)
if (backStack.isEmpty()) .chase(1, .4f, LerpedFloat.Chaser.EXP);
return; open(screen);
Screen currentScreen = Minecraft.getInstance().currentScreen;
if (currentScreen instanceof AbstractSimiScreen)
((AbstractSimiScreen) currentScreen).transition.updateChaseTarget(-1);
else
openLastScreen();
} }
public static void clearStack() { public static void clearStack() {
@ -62,12 +76,14 @@ public class ScreenOpener {
} }
@Nullable @Nullable
public static Screen getLastScreen() { public static Screen getPreviouslyRenderedScreen() {
return backStack.peek(); return backSteppedFrom != null ? backSteppedFrom : backStack.peek();
} }
private static void openScreen(Screen screen) { private static void openScreen(Screen screen) {
Minecraft.getInstance().enqueue(() -> Minecraft.getInstance().displayGuiScreen(screen)); Minecraft.getInstance()
.enqueue(() -> Minecraft.getInstance()
.displayGuiScreen(screen));
} }
} }

View file

@ -1,7 +1,10 @@
package com.simibubi.create.foundation.gui; package com.simibubi.create.foundation.gui;
import org.lwjgl.opengl.GL11;
import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.systems.RenderSystem;
import com.simibubi.create.foundation.utility.ColorHelper; import com.simibubi.create.foundation.utility.ColorHelper;
import net.minecraft.client.MainWindow; import net.minecraft.client.MainWindow;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.BufferBuilder; import net.minecraft.client.renderer.BufferBuilder;
@ -9,7 +12,6 @@ import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats; import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.client.shader.Framebuffer; import net.minecraft.client.shader.Framebuffer;
import net.minecraftforge.fml.client.gui.GuiUtils; import net.minecraftforge.fml.client.gui.GuiUtils;
import org.lwjgl.opengl.GL11;
public class UIRenderHelper { public class UIRenderHelper {
@ -30,13 +32,15 @@ public class UIRenderHelper {
} }
} }
public static void drawFramebuffer(int width, int height, float alpha) { public static void drawFramebuffer(float alpha) {
float vx = (float) width; MainWindow window = Minecraft.getInstance()
float vy = (float) height; .getWindow();
float vx = (float) window.getScaledWidth();
float vy = (float) window.getScaledHeight();
float tx = (float) framebuffer.framebufferWidth / (float) framebuffer.framebufferTextureWidth; float tx = (float) framebuffer.framebufferWidth / (float) framebuffer.framebufferTextureWidth;
float ty = (float) framebuffer.framebufferHeight / (float) framebuffer.framebufferTextureHeight; float ty = (float) framebuffer.framebufferHeight / (float) framebuffer.framebufferTextureHeight;
RenderSystem.enableTexture(); RenderSystem.enableTexture();
RenderSystem.enableBlend(); RenderSystem.enableBlend();
RenderSystem.disableLighting(); RenderSystem.disableLighting();

View file

@ -7,6 +7,8 @@ import com.google.gson.JsonElement;
import com.google.gson.JsonObject; import com.google.gson.JsonObject;
import com.simibubi.create.Create; import com.simibubi.create.Create;
import com.simibubi.create.foundation.ponder.content.PonderIndex; import com.simibubi.create.foundation.ponder.content.PonderIndex;
import com.simibubi.create.foundation.ponder.content.PonderTagScreen;
import com.simibubi.create.foundation.utility.Couple;
import com.simibubi.create.foundation.utility.Lang; import com.simibubi.create.foundation.utility.Lang;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
@ -14,10 +16,15 @@ import net.minecraft.util.ResourceLocation;
public class PonderLocalization { public class PonderLocalization {
static Map<String, String> shared = new HashMap<>(); static Map<String, String> shared = new HashMap<>();
static Map<String, Couple<String>> tag = new HashMap<>();
static Map<ResourceLocation, Map<Integer, Map<String, String>>> specific = new HashMap<>(); static Map<ResourceLocation, Map<Integer, Map<String, String>>> specific = new HashMap<>();
// //
public static void registerTag(String key, String enUS, String description) {
tag.put(key, Couple.create(enUS, description));
}
public static void registerShared(String key, String enUS) { public static void registerShared(String key, String enUS) {
shared.put(key, enUS); shared.put(key, enUS);
} }
@ -44,9 +51,23 @@ public class PonderLocalization {
return Lang.translate(langKeyForSpecific(component.getPath(), scene, k)); return Lang.translate(langKeyForSpecific(component.getPath(), scene, k));
} }
public static String getTag(String key) {
if (PonderIndex.EDITOR_MODE)
return tag.containsKey(key) ? tag.get(key)
.getFirst() : ("unregistered tag entry:" + key);
return Lang.translate(langKeyForTag(key));
}
public static String getTagDescription(String key) {
if (PonderIndex.EDITOR_MODE)
return tag.containsKey(key) ? tag.get(key)
.getSecond() : ("unregistered tag entry:" + key);
return Lang.translate(langKeyForTagDescription(key));
}
// //
static final String LANG_PREFIX = "ponder."; public static final String LANG_PREFIX = "ponder.";
public static JsonElement record() { public static JsonElement record() {
JsonObject object = new JsonObject(); JsonObject object = new JsonObject();
@ -55,8 +76,14 @@ public class PonderLocalization {
addGeneral(object, PonderTooltipHandler.SUBJECT, "Subject of this scene"); addGeneral(object, PonderTooltipHandler.SUBJECT, "Subject of this scene");
addGeneral(object, PonderUI.PONDERING, "Pondering about..."); addGeneral(object, PonderUI.PONDERING, "Pondering about...");
addGeneral(object, PonderUI.IDENTIFY_MODE, "Identify mode active.\nUnpause with [%1$s]"); addGeneral(object, PonderUI.IDENTIFY_MODE, "Identify mode active.\nUnpause with [%1$s]");
addGeneral(object, PonderTagScreen.ASSOCIATED, "Associated Entries");
shared.forEach((k, v) -> object.addProperty(Create.ID + "." + langKeyForShared(k), v)); shared.forEach((k, v) -> object.addProperty(Create.ID + "." + langKeyForShared(k), v));
tag.forEach((k, v) -> {
object.addProperty(Create.ID + "." + langKeyForTag(k), v.getFirst());
object.addProperty(Create.ID + "." + langKeyForTagDescription(k), v.getSecond());
});
specific.forEach((rl, map) -> { specific.forEach((rl, map) -> {
String component = rl.getPath(); String component = rl.getPath();
for (int i = 0; i < map.size(); i++) { for (int i = 0; i < map.size(); i++) {
@ -84,4 +111,12 @@ public class PonderLocalization {
return LANG_PREFIX + "shared." + k; return LANG_PREFIX + "shared." + k;
} }
protected static String langKeyForTag(String k) {
return LANG_PREFIX + "tag." + k;
}
protected static String langKeyForTagDescription(String k) {
return LANG_PREFIX + "tag." + k + ".description";
}
} }

View file

@ -107,6 +107,7 @@ public class PonderRegistry {
public static JsonElement provideLangEntries() { public static JsonElement provideLangEntries() {
PonderIndex.register(); PonderIndex.register();
PonderTag.register();
SharedText.gatherText(); SharedText.gatherText();
all.forEach((id, list) -> { all.forEach((id, list) -> {
for (int i = 0; i < list.size(); i++) for (int i = 0; i < list.size(); i++)

View file

@ -1,6 +1,9 @@
package com.simibubi.create.foundation.ponder; package com.simibubi.create.foundation.ponder;
import java.util.List;
import com.google.common.base.Strings; import com.google.common.base.Strings;
import com.simibubi.create.foundation.gui.AbstractSimiScreen;
import com.simibubi.create.foundation.gui.ScreenOpener; import com.simibubi.create.foundation.gui.ScreenOpener;
import com.simibubi.create.foundation.ponder.content.PonderIndexScreen; import com.simibubi.create.foundation.ponder.content.PonderIndexScreen;
import com.simibubi.create.foundation.ponder.content.PonderTagScreen; import com.simibubi.create.foundation.ponder.content.PonderTagScreen;
@ -8,6 +11,7 @@ import com.simibubi.create.foundation.utility.AnimationTickHolder;
import com.simibubi.create.foundation.utility.ColorHelper; import com.simibubi.create.foundation.utility.ColorHelper;
import com.simibubi.create.foundation.utility.Lang; import com.simibubi.create.foundation.utility.Lang;
import com.simibubi.create.foundation.utility.LerpedFloat; import com.simibubi.create.foundation.utility.LerpedFloat;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.screen.Screen; import net.minecraft.client.gui.screen.Screen;
@ -21,8 +25,6 @@ import net.minecraft.util.text.StringTextComponent;
import net.minecraft.util.text.TextFormatting; import net.minecraft.util.text.TextFormatting;
import net.minecraftforge.client.event.RenderTooltipEvent; import net.minecraftforge.client.event.RenderTooltipEvent;
import java.util.List;
public class PonderTooltipHandler { public class PonderTooltipHandler {
static LerpedFloat holdWProgress = LerpedFloat.linear() static LerpedFloat holdWProgress = LerpedFloat.linear()
@ -78,6 +80,9 @@ public class PonderTooltipHandler {
if (!subject && InputMappings.isKeyDown(window, keyCode)) { if (!subject && InputMappings.isKeyDown(window, keyCode)) {
if (value >= 1) { if (value >= 1) {
if (currentScreen instanceof AbstractSimiScreen)
((AbstractSimiScreen) currentScreen).centerScalingOnMouse();
ScreenOpener.transitionTo(PonderUI.of(stack)); ScreenOpener.transitionTo(PonderUI.of(stack));
holdWProgress.startWithValue(0); holdWProgress.startWithValue(0);
return; return;

View file

@ -1,14 +1,38 @@
package com.simibubi.create.foundation.ponder; package com.simibubi.create.foundation.ponder;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.stream.IntStream;
import org.apache.commons.lang3.mutable.MutableBoolean;
import org.lwjgl.opengl.GL11;
import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.systems.RenderSystem;
import com.simibubi.create.foundation.gui.*; import com.simibubi.create.foundation.gui.AbstractSimiScreen;
import com.simibubi.create.foundation.gui.AllGuiTextures;
import com.simibubi.create.foundation.gui.AllIcons;
import com.simibubi.create.foundation.gui.GuiGameElement;
import com.simibubi.create.foundation.gui.ScreenOpener;
import com.simibubi.create.foundation.gui.UIRenderHelper;
import com.simibubi.create.foundation.ponder.PonderScene.SceneTransform; import com.simibubi.create.foundation.ponder.PonderScene.SceneTransform;
import com.simibubi.create.foundation.ponder.content.*; import com.simibubi.create.foundation.ponder.content.DebugScenes;
import com.simibubi.create.foundation.ponder.content.PonderChapter;
import com.simibubi.create.foundation.ponder.content.PonderIndex;
import com.simibubi.create.foundation.ponder.content.PonderTag;
import com.simibubi.create.foundation.ponder.content.PonderTagScreen;
import com.simibubi.create.foundation.ponder.ui.PonderButton; import com.simibubi.create.foundation.ponder.ui.PonderButton;
import com.simibubi.create.foundation.renderState.SuperRenderTypeBuffer; import com.simibubi.create.foundation.renderState.SuperRenderTypeBuffer;
import com.simibubi.create.foundation.utility.*; import com.simibubi.create.foundation.utility.AnimationTickHolder;
import com.simibubi.create.foundation.utility.ColorHelper;
import com.simibubi.create.foundation.utility.Iterate;
import com.simibubi.create.foundation.utility.Lang;
import com.simibubi.create.foundation.utility.LerpedFloat;
import com.simibubi.create.foundation.utility.LerpedFloat.Chaser; import com.simibubi.create.foundation.utility.LerpedFloat.Chaser;
import com.simibubi.create.foundation.utility.Pair;
import com.simibubi.create.foundation.utility.Pointing;
import net.minecraft.client.ClipboardHelper; import net.minecraft.client.ClipboardHelper;
import net.minecraft.client.GameSettings; import net.minecraft.client.GameSettings;
import net.minecraft.client.MainWindow; import net.minecraft.client.MainWindow;
@ -28,13 +52,6 @@ import net.minecraft.world.gen.feature.template.PlacementSettings;
import net.minecraft.world.gen.feature.template.Template; import net.minecraft.world.gen.feature.template.Template;
import net.minecraftforge.fml.client.gui.GuiUtils; import net.minecraftforge.fml.client.gui.GuiUtils;
import net.minecraftforge.registries.ForgeRegistries; import net.minecraftforge.registries.ForgeRegistries;
import org.apache.commons.lang3.mutable.MutableBoolean;
import org.lwjgl.opengl.GL11;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.stream.IntStream;
public class PonderUI extends AbstractSimiScreen { public class PonderUI extends AbstractSimiScreen {
@ -61,10 +78,11 @@ public class PonderUI extends AbstractSimiScreen {
private LerpedFloat lazyIndex; private LerpedFloat lazyIndex;
private int index = 0; private int index = 0;
private PonderButton left, right, icon, scan, chap; private PonderButton left, right, scan, chap;
public static PonderUI of(ItemStack item) { public static PonderUI of(ItemStack item) {
return new PonderUI(PonderRegistry.compile(item.getItem().getRegistryName())); return new PonderUI(PonderRegistry.compile(item.getItem()
.getRegistryName()));
} }
public static PonderUI of(PonderChapter chapter) { public static PonderUI of(PonderChapter chapter) {
@ -74,9 +92,17 @@ public class PonderUI extends AbstractSimiScreen {
} }
public PonderUI(List<PonderScene> scenes) { public PonderUI(List<PonderScene> scenes) {
ResourceLocation component = scenes.get(0).component;
if (ForgeRegistries.ITEMS.containsKey(component))
stack = new ItemStack(ForgeRegistries.ITEMS.getValue(component));
else
stack = new ItemStack(ForgeRegistries.BLOCKS.getValue(component));
tags = new ArrayList<>(PonderRegistry.tags.getTags(component));
this.scenes = scenes; this.scenes = scenes;
if (scenes.isEmpty()) { if (scenes.isEmpty()) {
List<PonderStoryBoardEntry> l = Collections.singletonList(new PonderStoryBoardEntry(DebugScenes::empty, "debug/scene_1", new ResourceLocation("minecraft", "stick"))); List<PonderStoryBoardEntry> l = Collections.singletonList(new PonderStoryBoardEntry(DebugScenes::empty,
"debug/scene_1", new ResourceLocation("minecraft", "stick")));
scenes.addAll(PonderRegistry.compile(l)); scenes.addAll(PonderRegistry.compile(l));
} }
lazyIndex = LerpedFloat.linear() lazyIndex = LerpedFloat.linear()
@ -94,26 +120,17 @@ public class PonderUI extends AbstractSimiScreen {
super.init(); super.init();
widgets.clear(); widgets.clear();
ResourceLocation component = scenes.get(0).component;
if (ForgeRegistries.ITEMS.containsKey(component))
stack = new ItemStack(ForgeRegistries.ITEMS.getValue(component));
else
stack = new ItemStack(ForgeRegistries.BLOCKS.getValue(component));
tags = new ArrayList<>(PonderRegistry.tags.getTags(component));
tagButtons = new ArrayList<>(); tagButtons = new ArrayList<>();
tagFades = new ArrayList<>(); tagFades = new ArrayList<>();
tags.forEach(t -> { tags.forEach(t -> {
int i = tagButtons.size(); int i = tagButtons.size();
int x = 31; int x = 31;
int y = 91 + i * 40; int y = 71 + i * 30;
PonderButton b = new PonderButton(x, y, () -> { PonderButton b = new PonderButton(x, y, (mouseX, mouseY) -> {
centerScalingOn(mouseX, mouseY);
ScreenOpener.transitionTo(new PonderTagScreen(t)); ScreenOpener.transitionTo(new PonderTagScreen(t));
}) }).showing(t);
.showing(t)
.fade(0, -1);
widgets.add(b); widgets.add(b);
tagButtons.add(b); tagButtons.add(b);
@ -125,12 +142,9 @@ public class PonderUI extends AbstractSimiScreen {
}); });
widgets.add(icon = new PonderButton(31, 31, () -> {
}).showing(stack).fade(0, -1));
if (chapter != null) { if (chapter != null) {
widgets.add(chap = new PonderButton(width - 31 - 24, 31, () -> { widgets.add(chap = new PonderButton(width - 31 - 24, 31, () -> {
}).showing(chapter).fade(0, -1)); }).showing(chapter));
} }
GameSettings bindings = minecraft.gameSettings; GameSettings bindings = minecraft.gameSettings;
@ -350,19 +364,30 @@ public class PonderUI extends AbstractSimiScreen {
// Chapter title // Chapter title
RenderSystem.pushMatrix(); RenderSystem.pushMatrix();
RenderSystem.translated(0, 0, 800); RenderSystem.translated(0, 0, 800);
int x = icon.x + icon.getWidth() + 8; int x = 31 + 20 + 8;
int y = icon.y; int y = 31;
UIRenderHelper.streak(0, x - 4, y + 10, 26, (int) (150 * fade), 0x101010); String title = activeScene.getTitle();
int wordWrappedHeight = font.getWordWrappedHeight(title, left.x);
drawString(font, Lang.translate(PONDERING), x, y, 0xffa3a3a3); int streakHeight = 35 - 9 + wordWrappedHeight;
y += 12; UIRenderHelper.streak(0, x - 4, y - 12 + streakHeight / 2, streakHeight, (int) (150 * fade), 0x101010);
UIRenderHelper.streak(180, x - 4, y - 12 + streakHeight / 2, streakHeight, (int) (30 * fade), 0x101010);
renderBox(21, 21, 30, 30, false);
GuiGameElement.of(stack)
.at(x - 39, y - 11)
.scale(2)
.render();
drawString(font, Lang.translate(PONDERING), x, y - 6, 0xffa3a3a3);
y += 8;
x += 0; x += 0;
// RenderSystem.translated(0, 3 * (indexDiff), 0); // RenderSystem.translated(0, 3 * (indexDiff), 0);
RenderSystem.translated(x, y, 0); RenderSystem.translated(x, y, 0);
RenderSystem.rotatef(indexDiff * -75, 1, 0, 0); RenderSystem.rotatef(indexDiff * -75, 1, 0, 0);
RenderSystem.translated(0, 0, 5); RenderSystem.translated(0, 0, 5);
font.drawSplitString(activeScene.getTitle(), 0, 0, left.x, ColorHelper.applyAlpha(textColor, 1 - indexDiff)); font.drawSplitString(title, 0, 0, left.x, ColorHelper.applyAlpha(textColor, 1 - indexDiff));
RenderSystem.popMatrix(); RenderSystem.popMatrix();
if (chapter != null) { if (chapter != null) {
@ -372,7 +397,8 @@ public class PonderUI extends AbstractSimiScreen {
UIRenderHelper.streak(180, 4, 10, 26, (int) (150 * fade), 0x101010); UIRenderHelper.streak(180, 4, 10, 26, (int) (150 * fade), 0x101010);
drawRightAlignedString(font, Lang.translate(IN_CHAPTER), 0, 0, 0xffa3a3a3); drawRightAlignedString(font, Lang.translate(IN_CHAPTER), 0, 0, 0xffa3a3a3);
drawRightAlignedString(font, Lang.translate(PonderLocalization.LANG_PREFIX + "chapter." + chapter.getId()), 0, 12, 0xffeeeeee); drawRightAlignedString(font,
Lang.translate(PonderLocalization.LANG_PREFIX + "chapter." + chapter.getId()), 0, 12, 0xffeeeeee);
RenderSystem.popMatrix(); RenderSystem.popMatrix();
} }
@ -451,8 +477,11 @@ public class PonderUI extends AbstractSimiScreen {
// Tags // Tags
List<PonderTag> sceneTags = activeScene.tags; List<PonderTag> sceneTags = activeScene.tags;
boolean highlightAll = sceneTags.contains(PonderTag.Highlight.ALL); boolean highlightAll = sceneTags.contains(PonderTag.Highlight.ALL);
double s = Minecraft.getInstance().getWindow().getGuiScaleFactor(); double s = Minecraft.getInstance()
IntStream.range(0, tagButtons.size()).forEach(i -> { .getWindow()
.getGuiScaleFactor();
IntStream.range(0, tagButtons.size())
.forEach(i -> {
RenderSystem.pushMatrix(); RenderSystem.pushMatrix();
LerpedFloat chase = tagFades.get(i); LerpedFloat chase = tagFades.get(i);
PonderButton button = tagButtons.get(i); PonderButton button = tagButtons.get(i);
@ -470,7 +499,7 @@ public class PonderUI extends AbstractSimiScreen {
int x = button.x + button.getWidth() + 4; int x = button.x + button.getWidth() + 4;
int y = button.y - 2; int y = button.y - 2;
RenderSystem.translated(x, y + 5 * (1 - fade), 0); RenderSystem.translated(x, y + 5 * (1 - fade), 800);
float fadedWidth = 200 * chase.getValue(partialTicks); float fadedWidth = 200 * chase.getValue(partialTicks);
UIRenderHelper.streak(0, 0, 12, 26, (int) fadedWidth, 0x101010); UIRenderHelper.streak(0, 0, 12, 26, (int) fadedWidth, 0x101010);
@ -478,7 +507,8 @@ public class PonderUI extends AbstractSimiScreen {
GL11.glScissor((int) (x * s), 0, (int) (fadedWidth * s), (int) (height * s)); GL11.glScissor((int) (x * s), 0, (int) (fadedWidth * s), (int) (height * s));
GL11.glEnable(GL11.GL_SCISSOR_TEST); GL11.glEnable(GL11.GL_SCISSOR_TEST);
String tagName = Lang.translate("ponder.tag." + this.tags.get(i).getId()); String tagName = this.tags.get(i)
.getTitle();
drawString(tagName, 3, 8, 0xffeedd); drawString(tagName, 3, 8, 0xffeedd);
GL11.glDisable(GL11.GL_SCISSOR_TEST); GL11.glDisable(GL11.GL_SCISSOR_TEST);
@ -523,7 +553,7 @@ public class PonderUI extends AbstractSimiScreen {
return; return;
if (w instanceof PonderButton) { if (w instanceof PonderButton) {
PonderButton mtdButton = (PonderButton) w; PonderButton mtdButton = (PonderButton) w;
mtdButton.runCallback(); mtdButton.runCallback(x, y);
handled.setTrue(); handled.setTrue();
return; return;
} }
@ -587,7 +617,9 @@ public class PonderUI extends AbstractSimiScreen {
if (chapter != null) if (chapter != null)
return Lang.translate(PonderLocalization.LANG_PREFIX + "chapter." + chapter.getId()); return Lang.translate(PonderLocalization.LANG_PREFIX + "chapter." + chapter.getId());
return stack.getItem().getName().getFormattedText(); return stack.getItem()
.getName()
.getFormattedText();
} }
public FontRenderer getFontRenderer() { public FontRenderer getFontRenderer() {

View file

@ -0,0 +1,27 @@
package com.simibubi.create.foundation.ponder.content;
import com.simibubi.create.foundation.ponder.SceneBuilder;
import com.simibubi.create.foundation.ponder.SceneBuildingUtil;
import net.minecraft.util.Direction;
public class MovementActorScenes {
public static void psiTransfer(SceneBuilder scene, SceneBuildingUtil util) {
scene.title("Contraption Storage Exchange");
scene.configureBasePlate(0, 0, 6);
scene.world.showSection(util.select.layer(0), Direction.UP);
scene.idle(5);
scene.world.showSection(util.select.layersFrom(1), Direction.DOWN);
}
public static void psiRedstone(SceneBuilder scene, SceneBuildingUtil util) {
scene.title("Redstone Control");
scene.configureBasePlate(0, 0, 6);
scene.world.showSection(util.select.layer(0), Direction.UP);
scene.idle(5);
scene.world.showSection(util.select.layersFrom(1), Direction.DOWN);
}
}

View file

@ -3,6 +3,7 @@ package com.simibubi.create.foundation.ponder.content;
import com.simibubi.create.AllBlocks; import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllItems; import com.simibubi.create.AllItems;
import com.simibubi.create.foundation.ponder.PonderRegistry; import com.simibubi.create.foundation.ponder.PonderRegistry;
import net.minecraft.block.Blocks; import net.minecraft.block.Blocks;
import net.minecraft.item.Items; import net.minecraft.item.Items;
@ -16,8 +17,10 @@ public class PonderIndex {
// (!) Modifications inside storyboard methods only require re-opening the ui // (!) Modifications inside storyboard methods only require re-opening the ui
PonderRegistry.forComponents(AllBlocks.SHAFT) PonderRegistry.forComponents(AllBlocks.SHAFT)
.addStoryBoard("shaft/relay", KineticsScenes::shaftAsRelay, b -> b.highlightAllTags().chapter(PonderChapter.of("basic_kinetics"))) .addStoryBoard("shaft/relay", KineticsScenes::shaftAsRelay, b -> b.highlightAllTags()
.addStoryBoard("shaft/encasing", KineticsScenes::shaftsCanBeEncased, b -> b.chapter(PonderChapter.of("encasing"))); .chapter(PonderChapter.of("basic_kinetics")))
.addStoryBoard("shaft/encasing", KineticsScenes::shaftsCanBeEncased,
b -> b.chapter(PonderChapter.of("encasing")));
// Funnels // Funnels
PonderRegistry.addStoryBoard(AllBlocks.BRASS_FUNNEL, "funnels/brass", FunnelScenes::brass); PonderRegistry.addStoryBoard(AllBlocks.BRASS_FUNNEL, "funnels/brass", FunnelScenes::brass);
@ -37,6 +40,11 @@ public class PonderIndex {
.addStoryBoard("gantry/direction", GantryScenes::direction) .addStoryBoard("gantry/direction", GantryScenes::direction)
.addStoryBoard("gantry/subgantry", GantryScenes::subgantry); .addStoryBoard("gantry/subgantry", GantryScenes::subgantry);
// Movement Actors
PonderRegistry.forComponents(AllBlocks.PORTABLE_STORAGE_INTERFACE)
.addStoryBoard("portable_interface/transfer", MovementActorScenes::psiTransfer)
.addStoryBoard("portable_interface/redstone", MovementActorScenes::psiRedstone);
// Debug scenes, can be found in game via the Brass Hand // Debug scenes, can be found in game via the Brass Hand
if (EDITOR_MODE) if (EDITOR_MODE)
DebugScenes.registerAll(); DebugScenes.registerAll();
@ -45,27 +53,23 @@ public class PonderIndex {
public static void registerTags() { public static void registerTags() {
PonderRegistry.tags.forItems(AllBlocks.SHAFT.getId()) PonderRegistry.tags.forItems(AllBlocks.SHAFT.getId())
.add(PonderTag.Create.KINETICS); .add(PonderTag.KINETICS);
PonderRegistry.tags.forItems(AllBlocks.ANDESITE_FUNNEL.getId(), AllBlocks.BRASS_FUNNEL.getId()) PonderRegistry.tags.forItems(AllBlocks.ANDESITE_FUNNEL.getId(), AllBlocks.BRASS_FUNNEL.getId())
.add(PonderTag.Create.ARM_ACCESS) .add(PonderTag.ARM_ACCESS)
.add(PonderTag.Vanilla.ITEM_TRANSFER) .add(PonderTag.ITEM_TRANSFER)
.add(PonderTag.Vanilla.REDSTONE_CONTROL); .add(PonderTag.REDSTONE_CONTROL);
PonderRegistry.tags.forTag(PonderTag.Vanilla.REDSTONE_CONTROL) PonderRegistry.tags.forTag(PonderTag.REDSTONE_CONTROL)
.add(Items.REDSTONE.getRegistryName()) .add(Items.REDSTONE.getRegistryName())
.add(Blocks.LEVER.getRegistryName()); .add(Blocks.LEVER.getRegistryName());
PonderRegistry.tags.forTag(PonderTag.Create.KINETICS) PonderRegistry.tags.forTag(PonderTag.KINETICS)
.add(AllBlocks.COGWHEEL.getId()) .add(AllBlocks.COGWHEEL.getId())
.add(AllBlocks.LARGE_COGWHEEL.getId()) .add(AllBlocks.LARGE_COGWHEEL.getId())
.add(AllItems.BELT_CONNECTOR.getId()) .add(AllItems.BELT_CONNECTOR.getId())
.add(AllBlocks.ENCASED_CHAIN_DRIVE.getId()); .add(AllBlocks.ENCASED_CHAIN_DRIVE.getId());
PonderChapter.of("basic_kinetics").addTagsToChapter(
PonderTag.Create.KINETICS
);
} }
} }

View file

@ -63,7 +63,9 @@ public class PonderIndexScreen extends AbstractSimiScreen {
//todo at some point pagination or horizontal scrolling may be needed for chapters/items //todo at some point pagination or horizontal scrolling may be needed for chapters/items
for (PonderChapter chapter : chapters) { for (PonderChapter chapter : chapters) {
ChapterLabel label = new ChapterLabel(chapter, chapterCenterX + layout.getX(), chapterCenterY + layout.getY(), () -> { ChapterLabel label = new ChapterLabel(chapter, chapterCenterX + layout.getX(),
chapterCenterY + layout.getY(), (mouseX, mouseY) -> {
centerScalingOn(mouseX, mouseY);
ScreenOpener.transitionTo(PonderUI.of(chapter)); ScreenOpener.transitionTo(PonderUI.of(chapter));
}); });
@ -98,7 +100,7 @@ public class PonderIndexScreen extends AbstractSimiScreen {
int itemCenterY = (int) (height * itemYmult); int itemCenterY = (int) (height * itemYmult);
for (Item item : items) { for (Item item : items) {
PonderButton button = new PonderButton(itemCenterX + layout.getX() + 4, itemCenterY + layout.getY() + 4, () -> {}) PonderButton button = new PonderButton(itemCenterX + layout.getX() + 4, itemCenterY + layout.getY() + 4, (x, y) -> {})
.showing(new ItemStack(item)); .showing(new ItemStack(item));
button.fade(1); button.fade(1);

View file

@ -4,6 +4,8 @@ import com.mojang.blaze3d.systems.RenderSystem;
import com.simibubi.create.AllBlocks; import com.simibubi.create.AllBlocks;
import com.simibubi.create.foundation.gui.GuiGameElement; import com.simibubi.create.foundation.gui.GuiGameElement;
import com.simibubi.create.foundation.gui.IScreenRenderable; import com.simibubi.create.foundation.gui.IScreenRenderable;
import com.simibubi.create.foundation.ponder.PonderLocalization;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.AbstractGui; import net.minecraft.client.gui.AbstractGui;
import net.minecraft.item.Item; import net.minecraft.item.Item;
@ -15,11 +17,44 @@ import net.minecraftforge.api.distmarker.OnlyIn;
public class PonderTag implements IScreenRenderable { public class PonderTag implements IScreenRenderable {
//
public static final PonderTag
KINETICS = new PonderTag("kinetics").item(AllBlocks.COGWHEEL.get()
.asItem(), true, false)
.defaultLang("Kinetic Blocks", "Components which help generating, relaying and making use of Rotational Force"),
FLUID_TRANSFER = new PonderTag("fluid_transfer").idAsIcon(),
OPEN_INVENTORY = new PonderTag("open_inventory").item(AllBlocks.BASIN.get()
.asItem()),
ARM_ACCESS = new PonderTag("arm_access").item(AllBlocks.MECHANICAL_ARM.get()
.asItem())
.defaultLang("Targets for Mechanical Arms",
"Components which can be selected as inputs or outputs to the Mechanical Arm"),
REDSTONE_CONTROL = new PonderTag("redstone_control").item(Items.REDSTONE, true, false),
ITEM_TRANSFER = new PonderTag("item_transfer").idAsIcon();
public static class Highlight {
public static final PonderTag ALL = new PonderTag("_all");
}
//
private final String id; private final String id;
private ResourceLocation icon; private ResourceLocation icon;
private ItemStack itemIcon = ItemStack.EMPTY; private ItemStack itemIcon = ItemStack.EMPTY;
private ItemStack mainItem = ItemStack.EMPTY; private ItemStack mainItem = ItemStack.EMPTY;
public String getTitle() {
return PonderLocalization.getTag(id);
}
public String getDescription() {
return PonderLocalization.getTagDescription(id);
}
// Builder
public PonderTag(String id) { public PonderTag(String id) {
this.id = id; this.id = id;
} }
@ -28,6 +63,11 @@ public class PonderTag implements IScreenRenderable {
return id; return id;
} }
public PonderTag defaultLang(String title, String description) {
PonderLocalization.registerTag(id, title, description);
return this;
}
public ItemStack getMainItem() { public ItemStack getMainItem() {
return mainItem; return mainItem;
} }
@ -46,8 +86,10 @@ public class PonderTag implements IScreenRenderable {
} }
public PonderTag item(Item item, boolean useAsIcon, boolean useAsMainItem) { public PonderTag item(Item item, boolean useAsIcon, boolean useAsMainItem) {
if (useAsIcon) this.itemIcon = new ItemStack(item); if (useAsIcon)
if (useAsMainItem) this.mainItem = new ItemStack(item); this.itemIcon = new ItemStack(item);
if (useAsMainItem)
this.mainItem = new ItemStack(item);
return this; return this;
} }
@ -57,32 +99,23 @@ public class PonderTag implements IScreenRenderable {
RenderSystem.pushMatrix(); RenderSystem.pushMatrix();
RenderSystem.translated(x, y, 0); RenderSystem.translated(x, y, 0);
if (icon != null) { if (icon != null) {
Minecraft.getInstance().getTextureManager().bindTexture(icon); Minecraft.getInstance()
.getTextureManager()
.bindTexture(icon);
RenderSystem.scaled(0.25, 0.25, 1); RenderSystem.scaled(0.25, 0.25, 1);
//x and y offset, blit z offset, tex x and y, tex width and height, entire tex sheet width and height // x and y offset, blit z offset, tex x and y, tex width and height, entire tex
// sheet width and height
AbstractGui.blit(0, 0, 0, 0, 0, 64, 64, 64, 64); AbstractGui.blit(0, 0, 0, 0, 0, 64, 64, 64, 64);
} else if (!itemIcon.isEmpty()) { } else if (!itemIcon.isEmpty()) {
RenderSystem.translated(-4, -4, 0); RenderSystem.translated(-4, -4, 0);
RenderSystem.scaled(1.5, 1.5, 1); RenderSystem.scaled(1.5, 1.5, 1.5);
GuiGameElement.of(itemIcon).render(); GuiGameElement.of(itemIcon)
.render();
} }
RenderSystem.popMatrix(); RenderSystem.popMatrix();
} }
public static class Create { // Load class
public static final PonderTag KINETICS = new PonderTag("kinetics").item(AllBlocks.COGWHEEL.get().asItem(), true, false); public static void register() {}
public static final PonderTag FLUID_TRANSFER = new PonderTag("fluid_transfer").idAsIcon();
public static final PonderTag OPEN_INVENTORY = new PonderTag("open_inventory").item(AllBlocks.BASIN.get().asItem());
public static final PonderTag ARM_ACCESS = new PonderTag("arm_access").item(AllBlocks.MECHANICAL_ARM.get().asItem());
}
public static class Vanilla {
public static final PonderTag REDSTONE_CONTROL = new PonderTag("redstone_control").item(Items.REDSTONE, true, false);
public static final PonderTag ITEM_TRANSFER = new PonderTag("item_transfer").idAsIcon();
}
public static class Highlight {
public static final PonderTag ALL = new PonderTag("_all");
}
} }

View file

@ -1,16 +1,23 @@
package com.simibubi.create.foundation.ponder.content; package com.simibubi.create.foundation.ponder.content;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import org.apache.commons.lang3.mutable.MutableBoolean;
import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.systems.RenderSystem;
import com.simibubi.create.foundation.gui.AbstractSimiScreen; import com.simibubi.create.foundation.gui.AbstractSimiScreen;
import com.simibubi.create.foundation.gui.GuiGameElement;
import com.simibubi.create.foundation.gui.ScreenOpener; import com.simibubi.create.foundation.gui.ScreenOpener;
import com.simibubi.create.foundation.gui.UIRenderHelper; import com.simibubi.create.foundation.gui.UIRenderHelper;
import com.simibubi.create.foundation.ponder.PonderLocalization;
import com.simibubi.create.foundation.ponder.PonderRegistry; import com.simibubi.create.foundation.ponder.PonderRegistry;
import com.simibubi.create.foundation.ponder.PonderUI; import com.simibubi.create.foundation.ponder.PonderUI;
import com.simibubi.create.foundation.ponder.ui.ChapterLabel; import com.simibubi.create.foundation.ponder.ui.ChapterLabel;
import com.simibubi.create.foundation.ponder.ui.LayoutHelper; import com.simibubi.create.foundation.ponder.ui.LayoutHelper;
import com.simibubi.create.foundation.ponder.ui.PonderButton; import com.simibubi.create.foundation.ponder.ui.PonderButton;
import com.simibubi.create.foundation.utility.Lang; import com.simibubi.create.foundation.utility.Lang;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.client.MainWindow; import net.minecraft.client.MainWindow;
import net.minecraft.client.gui.widget.Widget; import net.minecraft.client.gui.widget.Widget;
@ -20,12 +27,10 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.MathHelper;
import net.minecraftforge.registries.ForgeRegistries; import net.minecraftforge.registries.ForgeRegistries;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
public class PonderTagScreen extends AbstractSimiScreen { public class PonderTagScreen extends AbstractSimiScreen {
public static final String ASSOCIATED = PonderLocalization.LANG_PREFIX + "associated";
protected final PonderTag tag; protected final PonderTag tag;
protected final List<Item> items; protected final List<Item> items;
private final double itemXmult = 0.5; private final double itemXmult = 0.5;
@ -35,12 +40,11 @@ public class PonderTagScreen extends AbstractSimiScreen {
private final double chapterXmult = 0.5; private final double chapterXmult = 0.5;
private final double chapterYmult = 0.75; private final double chapterYmult = 0.75;
protected Rectangle2d chapterArea; protected Rectangle2d chapterArea;
private final double mainXmult = 0.5; // private final double mainXmult = 0.5;
private final double mainYmult = 0.15; private final double mainYmult = 0.15;
private ItemStack hoveredItem = ItemStack.EMPTY; private ItemStack hoveredItem = ItemStack.EMPTY;
public PonderTagScreen(PonderTag tag) { public PonderTagScreen(PonderTag tag) {
this.tag = tag; this.tag = tag;
items = new ArrayList<>(); items = new ArrayList<>();
@ -75,8 +79,13 @@ public class PonderTagScreen extends AbstractSimiScreen {
int itemCenterY = (int) (height * itemYmult); int itemCenterY = (int) (height * itemYmult);
for (Item i : items) { for (Item i : items) {
PonderButton button = new PonderButton(itemCenterX + layout.getX() + 4, itemCenterY + layout.getY() + 4, () -> {}) PonderButton button =
.showing(new ItemStack(i)); new PonderButton(itemCenterX + layout.getX() + 4, itemCenterY + layout.getY() + 4, (mouseX, mouseY) -> {
if (!PonderRegistry.all.containsKey(i.getRegistryName()))
return;
centerScalingOn(mouseX, mouseY);
ScreenOpener.transitionTo(PonderUI.of(new ItemStack(i)));
}).showing(new ItemStack(i));
button.fade(1); button.fade(1);
widgets.add(button); widgets.add(button);
@ -94,7 +103,9 @@ public class PonderTagScreen extends AbstractSimiScreen {
int chapterCenterY = (int) (height * chapterYmult); int chapterCenterY = (int) (height * chapterYmult);
for (PonderChapter chapter : chapters) { for (PonderChapter chapter : chapters) {
ChapterLabel label = new ChapterLabel(chapter, chapterCenterX + layout.getX(), chapterCenterY + layout.getY(), () -> { ChapterLabel label = new ChapterLabel(chapter, chapterCenterX + layout.getX(),
chapterCenterY + layout.getY(), (mouseX, mouseY) -> {
centerScalingOn(mouseX, mouseY);
ScreenOpener.transitionTo(PonderUI.of(chapter)); ScreenOpener.transitionTo(PonderUI.of(chapter));
}); });
@ -127,45 +138,89 @@ public class PonderTagScreen extends AbstractSimiScreen {
renderChapters(mouseX, mouseY, partialTicks); renderChapters(mouseX, mouseY, partialTicks);
// //
int x = (int) (width * mainXmult); // int x = (int) (width * mainXmult);
int y = (int) (height * mainYmult); // int y = (int) (height * mainYmult);
//
// RenderSystem.pushMatrix();
// RenderSystem.translated(x, y, 0);
// RenderSystem.translated(-150, 0, 0);
//
// if (!tag.getMainItem()
// .isEmpty()) {
// RenderSystem.translated(-25, 0, 0);
// PonderUI.renderBox(0, -10, 20, 20, false);
// RenderSystem.pushMatrix();
// RenderSystem.translated(-2, -12, 0);
// RenderSystem.scaled(1.5, 1.5, 1);
// GuiGameElement.of(tag.getMainItem())
// .render();
//
// RenderSystem.popMatrix();
//
// RenderSystem.translated(75, 0, 0);
//
// }
//
// RenderSystem.pushMatrix();
//// RenderSystem.scaled(1.5, 1.5, 1);
//
// // render icon & box
// PonderUI.renderBox(-8, -20, 40, 40, false);
// RenderSystem.translated(0, -10, 100);
// RenderSystem.scaled(1.5, 1.5, 1);
// tag.draw(this, 0, 0);
//
// RenderSystem.popMatrix();
//
// // tag name & description
// UIRenderHelper.streak(0, 36, 0, 39, 350, 0x101010);
// drawString(font, Lang.translate("ponder.tag." + tag.getId()), 41, -16, 0xffff_ffff);
// drawString(font, Lang.translate("ponder.tag." + tag.getId() + ".desc"), 41, -4, 0xffff_ffff);
//
// RenderSystem.popMatrix();
RenderSystem.pushMatrix(); RenderSystem.pushMatrix();
RenderSystem.translated(width / 2 - 120, height * mainYmult - 40, 0);
RenderSystem.pushMatrix();
RenderSystem.translated(0, 0, 800);
int x = 31 + 20 + 8;
int y = 31;
String title = tag.getTitle();
int streakHeight = 35;
UIRenderHelper.streak(0, x - 4, y - 12 + streakHeight / 2, streakHeight, (int) (240), 0x101010);
PonderUI.renderBox(21, 21, 30, 30, false);
drawString(font, Lang.translate(PonderUI.PONDERING), x, y - 6, 0xffa3a3a3);
y += 8;
x += 0;
// RenderSystem.translated(0, 3 * (indexDiff), 0);
RenderSystem.translated(x, y, 0); RenderSystem.translated(x, y, 0);
RenderSystem.translated(-150, 0, 0); RenderSystem.translated(0, 0, 5);
font.drawString(title, 0, 0, 0xeeeeee);
if (!tag.getMainItem().isEmpty()) {
RenderSystem.translated(-25, 0, 0);
PonderUI.renderBox(0, -10, 20, 20, false);
RenderSystem.pushMatrix();
RenderSystem.translated(-2, -12, 0);
RenderSystem.scaled(1.5, 1.5, 1);
GuiGameElement.of(tag.getMainItem()).render();
RenderSystem.popMatrix(); RenderSystem.popMatrix();
RenderSystem.translated(75, 0, 0);
}
RenderSystem.pushMatrix(); RenderSystem.pushMatrix();
RenderSystem.scaled(1.5, 1.5, 1); RenderSystem.translated(23, 23, 0);
RenderSystem.scaled(1.66, 1.66, 1.66);
//render icon & box
PonderUI.renderBox(0, -10, 20, 20, true);
RenderSystem.translated(2, 2 - 10, 100);
tag.draw(this, 0, 0); tag.draw(this, 0, 0);
RenderSystem.popMatrix();
RenderSystem.popMatrix(); RenderSystem.popMatrix();
//tag name & description RenderSystem.pushMatrix();
UIRenderHelper.streak(0, 36, 0, 39, 350, 0x101010); int w = (int) (width * .45);
drawString(font, Lang.translate("ponder.tag." + tag.getId()), 41, -16, 0xffff_ffff); x = (width - w) / 2;
drawString(font, Lang.translate("ponder.tag." + tag.getId() + ".desc"), 41, -4, 0xffff_ffff); y = (int) (height * itemYmult + itemArea.getHeight() + 20);
String desc = tag.getDescription();
int h = font.getWordWrappedHeight(desc, w);
PonderUI.renderBox(x - 3, y - 3, w + 6, h + 6, false);
RenderSystem.translated(0, 0, 100);
font.drawSplitString(desc, x, y, w, 0xeeeeee);
RenderSystem.popMatrix(); RenderSystem.popMatrix();
} }
protected void renderItems(int mouseX, int mouseY, float partialTicks) { protected void renderItems(int mouseX, int mouseY, float partialTicks) {
@ -175,11 +230,16 @@ public class PonderTagScreen extends AbstractSimiScreen {
int x = (int) (width * itemXmult); int x = (int) (width * itemXmult);
int y = (int) (height * itemYmult); int y = (int) (height * itemYmult);
String relatedTitle = Lang.translate(ASSOCIATED);
int stringWidth = font.getStringWidth(relatedTitle);
RenderSystem.pushMatrix(); RenderSystem.pushMatrix();
RenderSystem.translated(x, y, 0); RenderSystem.translated(x, y, 0);
PonderUI.renderBox((sWidth - stringWidth) / 2 - 5, itemArea.getY() - 21, stringWidth + 10, 10, false);
RenderSystem.translated(0, 0, 200);
UIRenderHelper.streak(0, itemArea.getX() - 10, itemArea.getY() - 20, 20, 180, 0x101010); // UIRenderHelper.streak(0, itemArea.getX() - 10, itemArea.getY() - 20, 20, 180, 0x101010);
drawString(font, "Related Items", itemArea.getX() - 5, itemArea.getY() - 25, 0xffddeeff); drawCenteredString(font, relatedTitle, sWidth / 2, itemArea.getY() - 20, 0xeeeeee);
UIRenderHelper.streak(0, 0, 0, itemArea.getHeight() + 10, itemArea.getWidth() / 2 + 75, 0x101010); UIRenderHelper.streak(0, 0, 0, itemArea.getHeight() + 10, itemArea.getWidth() / 2 + 75, 0x101010);
UIRenderHelper.streak(180, 0, 0, itemArea.getHeight() + 10, itemArea.getWidth() / 2 + 75, 0x101010); UIRenderHelper.streak(180, 0, 0, itemArea.getHeight() + 10, itemArea.getWidth() / 2 + 75, 0x101010);
@ -221,11 +281,32 @@ public class PonderTagScreen extends AbstractSimiScreen {
@Override @Override
protected String getBreadcrumbTitle() { protected String getBreadcrumbTitle() {
return Lang.translate("ponder.tag." + tag.getId()); return tag.getTitle();
} }
public ItemStack getHoveredTooltipItem() { public ItemStack getHoveredTooltipItem() {
return hoveredItem; return hoveredItem;
} }
@Override
public boolean mouseClicked(double x, double y, int button) {
MutableBoolean handled = new MutableBoolean(false);
widgets.forEach(w -> {
if (handled.booleanValue())
return;
if (!w.isMouseOver(x, y))
return;
if (w instanceof PonderButton) {
PonderButton mtdButton = (PonderButton) w;
mtdButton.runCallback(x, y);
handled.setTrue();
return;
}
});
if (handled.booleanValue())
return true;
return super.mouseClicked(x, y, button);
}
} }

View file

@ -1,9 +1,13 @@
package com.simibubi.create.foundation.ponder.ui; package com.simibubi.create.foundation.ponder.ui;
import java.util.function.BiConsumer;
import com.mojang.blaze3d.systems.RenderSystem;
import com.simibubi.create.foundation.gui.UIRenderHelper; import com.simibubi.create.foundation.gui.UIRenderHelper;
import com.simibubi.create.foundation.gui.widgets.AbstractSimiWidget; import com.simibubi.create.foundation.gui.widgets.AbstractSimiWidget;
import com.simibubi.create.foundation.ponder.content.PonderChapter; import com.simibubi.create.foundation.ponder.content.PonderChapter;
import com.simibubi.create.foundation.utility.Lang; import com.simibubi.create.foundation.utility.Lang;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
public class ChapterLabel extends AbstractSimiWidget { public class ChapterLabel extends AbstractSimiWidget {
@ -11,7 +15,7 @@ public class ChapterLabel extends AbstractSimiWidget {
private final PonderChapter chapter; private final PonderChapter chapter;
private final PonderButton button; private final PonderButton button;
public ChapterLabel(PonderChapter chapter, int x, int y, Runnable onClick) { public ChapterLabel(PonderChapter chapter, int x, int y, BiConsumer<Integer, Integer> onClick) {
super(x, y, 175, 38); super(x, y, 175, 38);
this.button = new PonderButton(x + 4, y + 4, onClick, 30, 30).showing(chapter); this.button = new PonderButton(x + 4, y + 4, onClick, 30, 30).showing(chapter);
@ -23,7 +27,8 @@ public class ChapterLabel extends AbstractSimiWidget {
@Override @Override
public void render(int mouseX, int mouseY, float partialTicks) { public void render(int mouseX, int mouseY, float partialTicks) {
UIRenderHelper.streak(0, x, y + height / 2, height - 2, width, 0x101010); UIRenderHelper.streak(0, x, y + height / 2, height - 2, width, 0x101010);
drawString(Minecraft.getInstance().fontRenderer, Lang.translate("ponder.chapter." + chapter.getId()), x + 50, y + 20, 0xffddeeff); drawString(Minecraft.getInstance().fontRenderer, Lang.translate("ponder.chapter." + chapter.getId()), x + 50,
y + 20, 0xffddeeff);
button.renderButton(mouseX, mouseY, partialTicks); button.renderButton(mouseX, mouseY, partialTicks);
super.render(mouseX, mouseY, partialTicks); super.render(mouseX, mouseY, partialTicks);
@ -34,6 +39,6 @@ public class ChapterLabel extends AbstractSimiWidget {
if (!button.isMouseOver(x, y)) if (!button.isMouseOver(x, y))
return; return;
button.runCallback(); button.runCallback(x, y);
} }
} }

View file

@ -1,5 +1,7 @@
package com.simibubi.create.foundation.ponder.ui; package com.simibubi.create.foundation.ponder.ui;
import java.util.function.BiConsumer;
import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.systems.RenderSystem;
import com.simibubi.create.foundation.gui.GuiGameElement; import com.simibubi.create.foundation.gui.GuiGameElement;
import com.simibubi.create.foundation.gui.IScreenRenderable; import com.simibubi.create.foundation.gui.IScreenRenderable;
@ -8,6 +10,7 @@ import com.simibubi.create.foundation.ponder.PonderUI;
import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.AnimationTickHolder;
import com.simibubi.create.foundation.utility.ColorHelper; import com.simibubi.create.foundation.utility.ColorHelper;
import com.simibubi.create.foundation.utility.LerpedFloat; import com.simibubi.create.foundation.utility.LerpedFloat;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.settings.KeyBinding; import net.minecraft.client.settings.KeyBinding;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -17,7 +20,7 @@ public class PonderButton extends AbstractSimiWidget {
private IScreenRenderable icon; private IScreenRenderable icon;
private ItemStack item; private ItemStack item;
protected boolean pressed; protected boolean pressed;
private Runnable onClick; private BiConsumer<Integer, Integer> onClick;
private int xFadeModifier; private int xFadeModifier;
private int yFadeModifier; private int yFadeModifier;
private float fade; private float fade;
@ -26,14 +29,19 @@ public class PonderButton extends AbstractSimiWidget {
public static final int SIZE = 20; public static final int SIZE = 20;
public PonderButton(int x, int y, Runnable onClick, int width, int height) { public PonderButton(int x, int y, BiConsumer<Integer, Integer> onClick, int width, int height) {
super(x, y, width, height); super(x, y, width, height);
this.onClick = onClick; this.onClick = onClick;
flash = LerpedFloat.linear().startWithValue(0); flash = LerpedFloat.linear()
.startWithValue(0);
}
public PonderButton(int x, int y, BiConsumer<Integer, Integer> onClick) {
this(x, y, onClick, SIZE, SIZE);
} }
public PonderButton(int x, int y, Runnable onClick) { public PonderButton(int x, int y, Runnable onClick) {
this(x, y, onClick, SIZE, SIZE); this(x, y, ($, $$) -> onClick.run());
} }
public PonderButton showing(IScreenRenderable icon) { public PonderButton showing(IScreenRenderable icon) {
@ -121,8 +129,8 @@ public class PonderButton extends AbstractSimiWidget {
RenderSystem.popMatrix(); RenderSystem.popMatrix();
} }
public void runCallback() { public void runCallback(double mouseX, double mouseY) {
onClick.run(); onClick.accept((int) mouseX, (int) mouseY);
} }
@Override @Override