mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-02-11 12:55:00 +01:00
Ponder
- rebrand - support for particles - support for fluids - support for outliner - coloured text labels - debug scenes - proper UI stuff - proper layered rendering
This commit is contained in:
parent
8ab27904db
commit
18067e8d5c
96 changed files with 2829 additions and 1365 deletions
|
@ -337,7 +337,7 @@ e8b0a401c10d1ba67ed71ba31bd5f9bc28571b65 assets/create/blockstates/powered_toggl
|
||||||
d06cd9a1101b18d306a786320aab12018b1325d6 assets/create/blockstates/purple_sail.json
|
d06cd9a1101b18d306a786320aab12018b1325d6 assets/create/blockstates/purple_sail.json
|
||||||
92957119abd5fbcca36a113b2a80255fd70fc303 assets/create/blockstates/purple_seat.json
|
92957119abd5fbcca36a113b2a80255fd70fc303 assets/create/blockstates/purple_seat.json
|
||||||
61035f8afe75ff7bbd291da5d8690bcbebe679eb assets/create/blockstates/purple_valve_handle.json
|
61035f8afe75ff7bbd291da5d8690bcbebe679eb assets/create/blockstates/purple_valve_handle.json
|
||||||
6fa36883e76e9e403bb429c8f86b8c0d3bba0cff assets/create/blockstates/radial_chassis.json
|
4439fc83a8c7370ab44b211a3fd48abde20a4728 assets/create/blockstates/radial_chassis.json
|
||||||
45877c4d90a7185c2f304edbd67379d800920439 assets/create/blockstates/red_sail.json
|
45877c4d90a7185c2f304edbd67379d800920439 assets/create/blockstates/red_sail.json
|
||||||
da1b08387af7afa0855ee8d040f620c01f20660a assets/create/blockstates/red_seat.json
|
da1b08387af7afa0855ee8d040f620c01f20660a assets/create/blockstates/red_seat.json
|
||||||
722fc77bbf387af8a4016e42cbf9501d2b968881 assets/create/blockstates/red_valve_handle.json
|
722fc77bbf387af8a4016e42cbf9501d2b968881 assets/create/blockstates/red_valve_handle.json
|
||||||
|
@ -401,18 +401,18 @@ 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
|
||||||
e3f618c5b622d21880de858678d1802cbf65e615 assets/create/lang/en_ud.json
|
e3f618c5b622d21880de858678d1802cbf65e615 assets/create/lang/en_ud.json
|
||||||
a3e1a1b7946534a5db2482cc6d43aadbdaf0938f assets/create/lang/en_us.json
|
694cfe3d8fe9793b7ac0fbc7bbd3cf6bf455bf92 assets/create/lang/en_us.json
|
||||||
56c92fc5d2526d6ab9086d2edb03956234cad255 assets/create/lang/unfinished/de_de.json
|
499d461cf16f5a94049fbbe9eb758e0eaa19fa83 assets/create/lang/unfinished/de_de.json
|
||||||
4cab4140761c85fe6f2cb0a636ade5d63be422c4 assets/create/lang/unfinished/es_mx.json
|
8e486714ce38b6702fc614f4ba7cd34e003800aa assets/create/lang/unfinished/es_mx.json
|
||||||
c1436ba5bd506cd531586a1ca87f7bcc1091a2d6 assets/create/lang/unfinished/fr_fr.json
|
53f2918966bd9c045314a02ff0f5439720969087 assets/create/lang/unfinished/fr_fr.json
|
||||||
4747471601a24efbc6cb01b339bafb984b6903c6 assets/create/lang/unfinished/it_it.json
|
073ead0ceacdcf666fece6a78071a36fa9c3d356 assets/create/lang/unfinished/it_it.json
|
||||||
5b87db032d1726cc10a225bf0c4740f50169517f assets/create/lang/unfinished/ja_jp.json
|
0967bfc8888598329563ff6ee419038aef03df0a assets/create/lang/unfinished/ja_jp.json
|
||||||
acc6638d1ae47eab3c33431e3b794d85bf158f8f assets/create/lang/unfinished/ko_kr.json
|
50e210e32d4a55561ffed5a62ac10802107b719e assets/create/lang/unfinished/ko_kr.json
|
||||||
88a425173c828ce221435dfd9a29316cfe05204b assets/create/lang/unfinished/nl_nl.json
|
40784b923f0defdecbd35f73c7d7ead9c3fe9d8a assets/create/lang/unfinished/nl_nl.json
|
||||||
4672e12982db0283e4826904c2538a5465c5c1e6 assets/create/lang/unfinished/pt_br.json
|
ad719b1559c58c9e7c1b22023c5e686d4fa1ca19 assets/create/lang/unfinished/pt_br.json
|
||||||
85d5f3d8fd543c5f8d2d50e689b5ad25765c7cc2 assets/create/lang/unfinished/ru_ru.json
|
1190f9152de89c7e0b7561c3cdddae6fe2f1aa19 assets/create/lang/unfinished/ru_ru.json
|
||||||
ad1f7b8a42bc74dd416380faf2b66f2ca1302ec0 assets/create/lang/unfinished/zh_cn.json
|
bbcd8d37a18c779dfcca9aeaeb2b2d101a4b4fe2 assets/create/lang/unfinished/zh_cn.json
|
||||||
c561cc74bcfc00b664ec299fb8d6f9ee2c236d24 assets/create/lang/unfinished/zh_tw.json
|
be270f1d2bc61ebd4a9f1be5b00daa56947de2d7 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
|
||||||
|
|
|
@ -89,8 +89,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"sticky_west": "true",
|
"axis": "x",
|
||||||
"axis": "x"
|
"sticky_west": "true"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_x_sticky",
|
"model": "create:block/radial_chassis_side_x_sticky",
|
||||||
|
@ -99,8 +99,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"sticky_west": "true",
|
"axis": "y",
|
||||||
"axis": "y"
|
"sticky_west": "true"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_y_sticky",
|
"model": "create:block/radial_chassis_side_y_sticky",
|
||||||
|
@ -109,8 +109,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"sticky_west": "true",
|
"axis": "z",
|
||||||
"axis": "z"
|
"sticky_west": "true"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_z_sticky",
|
"model": "create:block/radial_chassis_side_z_sticky",
|
||||||
|
@ -119,8 +119,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"sticky_west": "false",
|
"axis": "x",
|
||||||
"axis": "x"
|
"sticky_west": "false"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_x",
|
"model": "create:block/radial_chassis_side_x",
|
||||||
|
@ -129,8 +129,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"sticky_west": "false",
|
"axis": "y",
|
||||||
"axis": "y"
|
"sticky_west": "false"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_y",
|
"model": "create:block/radial_chassis_side_y",
|
||||||
|
@ -139,8 +139,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"sticky_west": "false",
|
"axis": "z",
|
||||||
"axis": "z"
|
"sticky_west": "false"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_z",
|
"model": "create:block/radial_chassis_side_z",
|
||||||
|
@ -149,8 +149,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"sticky_north": "true",
|
"axis": "x",
|
||||||
"axis": "x"
|
"sticky_north": "true"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_x_sticky"
|
"model": "create:block/radial_chassis_side_x_sticky"
|
||||||
|
@ -158,8 +158,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"sticky_north": "true",
|
"axis": "y",
|
||||||
"axis": "y"
|
"sticky_north": "true"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_y_sticky",
|
"model": "create:block/radial_chassis_side_y_sticky",
|
||||||
|
@ -168,8 +168,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"sticky_north": "true",
|
"axis": "z",
|
||||||
"axis": "z"
|
"sticky_north": "true"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_x_sticky",
|
"model": "create:block/radial_chassis_side_x_sticky",
|
||||||
|
@ -178,8 +178,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"sticky_north": "false",
|
"axis": "x",
|
||||||
"axis": "x"
|
"sticky_north": "false"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_x"
|
"model": "create:block/radial_chassis_side_x"
|
||||||
|
@ -187,8 +187,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"sticky_north": "false",
|
"axis": "y",
|
||||||
"axis": "y"
|
"sticky_north": "false"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_y",
|
"model": "create:block/radial_chassis_side_y",
|
||||||
|
@ -197,8 +197,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"sticky_north": "false",
|
"axis": "z",
|
||||||
"axis": "z"
|
"sticky_north": "false"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_x",
|
"model": "create:block/radial_chassis_side_x",
|
||||||
|
@ -207,8 +207,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"sticky_east": "true",
|
"axis": "x",
|
||||||
"axis": "x"
|
"sticky_east": "true"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_x_sticky",
|
"model": "create:block/radial_chassis_side_x_sticky",
|
||||||
|
@ -217,8 +217,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"sticky_east": "true",
|
"axis": "y",
|
||||||
"axis": "y"
|
"sticky_east": "true"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_y_sticky",
|
"model": "create:block/radial_chassis_side_y_sticky",
|
||||||
|
@ -227,8 +227,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"sticky_east": "true",
|
"axis": "z",
|
||||||
"axis": "z"
|
"sticky_east": "true"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_z_sticky"
|
"model": "create:block/radial_chassis_side_z_sticky"
|
||||||
|
@ -236,8 +236,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"sticky_east": "false",
|
"axis": "x",
|
||||||
"axis": "x"
|
"sticky_east": "false"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_x",
|
"model": "create:block/radial_chassis_side_x",
|
||||||
|
@ -246,8 +246,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"sticky_east": "false",
|
"axis": "y",
|
||||||
"axis": "y"
|
"sticky_east": "false"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_y",
|
"model": "create:block/radial_chassis_side_y",
|
||||||
|
@ -256,8 +256,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"sticky_east": "false",
|
"axis": "z",
|
||||||
"axis": "z"
|
"sticky_east": "false"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_z"
|
"model": "create:block/radial_chassis_side_z"
|
||||||
|
|
|
@ -1789,18 +1789,30 @@
|
||||||
|
|
||||||
"_": "->------------------------] MetaDoc Text [------------------------<-",
|
"_": "->------------------------] MetaDoc Text [------------------------<-",
|
||||||
|
|
||||||
"create.metadoc.shared.more_shared": "This is Shared stuff",
|
"create.ponder.hold_to_ponder": "Hold [%1$s] to Ponder",
|
||||||
"create.metadoc.shared.when_wrenched": "When Wrenched",
|
"create.ponder.pondering": "Pondering about...",
|
||||||
"create.metadoc.cogwheel.scene_0.test_text": "Test text for scene 1",
|
"create.ponder.shared.more_shared": "This is Shared stuff",
|
||||||
"create.metadoc.cogwheel.scene_0.title": "My First Metadoc Story, Part 1",
|
"create.ponder.shared.when_wrenched": "When Wrenched",
|
||||||
"create.metadoc.cogwheel.scene_1.test_text": "Test text for scene 2",
|
"create.ponder.cogwheel.scene_0.title": "My First Ponder Story, Parrots",
|
||||||
"create.metadoc.cogwheel.scene_1.title": "My First Metadoc Story, Part 2",
|
"create.ponder.cogwheel.scene_1.title": "My First Ponder Story, Parrots",
|
||||||
"create.metadoc.cogwheel.scene_2.test_text": "Test text for scene 3",
|
"create.ponder.cogwheel.scene_2.title": "My First Ponder Story, Parrots",
|
||||||
"create.metadoc.cogwheel.scene_2.title": "My First Metadoc Story, Part 3",
|
"create.ponder.shaft.scene_0.shaft_relay": "Shafts seem to relay rotation in a straight line.",
|
||||||
"create.metadoc.cogwheel.scene_3.test_text": "Test text for scene 4",
|
"create.ponder.shaft.scene_0.title": "Relaying rotational force using Shafts",
|
||||||
"create.metadoc.cogwheel.scene_3.title": "My First Metadoc Story, Part 4",
|
"create.ponder.shaft.scene_1.shaft_can_be_encased": "I could use Brass or Andesite Casing to hide them.",
|
||||||
"create.metadoc.cogwheel.scene_4.test_text": "Test text for scene 5",
|
"create.ponder.shaft.scene_1.title": "Encasing Shafts",
|
||||||
"create.metadoc.cogwheel.scene_4.title": "My First Metadoc Story, Part 5",
|
"create.ponder.brass_hand.scene_0.x": "Das X axis",
|
||||||
|
"create.ponder.brass_hand.scene_0.y": "Das Y axis",
|
||||||
|
"create.ponder.brass_hand.scene_0.z": "Das Z axis",
|
||||||
|
"create.ponder.brass_hand.scene_0.title": "Debug Scene 1: Coordinate Space",
|
||||||
|
"create.ponder.brass_hand.scene_1.change_blocks": "Blocks can be modified",
|
||||||
|
"create.ponder.brass_hand.scene_1.title": "Debug Scene 2: Changing Blocks",
|
||||||
|
"create.ponder.brass_hand.scene_2.title": "Debug Scene 3: Showing Fluids",
|
||||||
|
"create.ponder.brass_hand.scene_2.fluids": "Fluid rendering test.",
|
||||||
|
"create.ponder.brass_hand.scene_3.outofbounds2": "Blocks outside of the base plate \n\nIgnored by scaling, thanks to configureBasePlate()",
|
||||||
|
"create.ponder.brass_hand.scene_3.outofbounds": "Blocks outside of the base plate",
|
||||||
|
"create.ponder.brass_hand.scene_3.title": "Debug Scene 4: Out of bounds / configureBasePlate",
|
||||||
|
"create.ponder.brass_hand.scene_4.incoming": "Incoming...",
|
||||||
|
"create.ponder.brass_hand.scene_4.title": "Debug Scene 5: Emitting particles",
|
||||||
|
|
||||||
"_": "Thank you for translating Create!"
|
"_": "Thank you for translating Create!"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 1107",
|
"_": "Missing Localizations: 1119",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -1790,18 +1790,30 @@
|
||||||
|
|
||||||
"_": "->------------------------] MetaDoc Text [------------------------<-",
|
"_": "->------------------------] MetaDoc Text [------------------------<-",
|
||||||
|
|
||||||
"create.metadoc.shared.more_shared": "UNLOCALIZED: This is Shared stuff",
|
"create.ponder.hold_to_ponder": "UNLOCALIZED: Hold [%1$s] to Ponder",
|
||||||
"create.metadoc.shared.when_wrenched": "UNLOCALIZED: When Wrenched",
|
"create.ponder.pondering": "UNLOCALIZED: Pondering about...",
|
||||||
"create.metadoc.cogwheel.scene_0.test_text": "UNLOCALIZED: Test text for scene 1",
|
"create.ponder.shared.more_shared": "UNLOCALIZED: This is Shared stuff",
|
||||||
"create.metadoc.cogwheel.scene_0.title": "UNLOCALIZED: My First Metadoc Story, Part 1",
|
"create.ponder.shared.when_wrenched": "UNLOCALIZED: When Wrenched",
|
||||||
"create.metadoc.cogwheel.scene_1.test_text": "UNLOCALIZED: Test text for scene 2",
|
"create.ponder.cogwheel.scene_0.title": "UNLOCALIZED: My First Ponder Story, Parrots",
|
||||||
"create.metadoc.cogwheel.scene_1.title": "UNLOCALIZED: My First Metadoc Story, Part 2",
|
"create.ponder.cogwheel.scene_1.title": "UNLOCALIZED: My First Ponder Story, Parrots",
|
||||||
"create.metadoc.cogwheel.scene_2.test_text": "UNLOCALIZED: Test text for scene 3",
|
"create.ponder.cogwheel.scene_2.title": "UNLOCALIZED: My First Ponder Story, Parrots",
|
||||||
"create.metadoc.cogwheel.scene_2.title": "UNLOCALIZED: My First Metadoc Story, Part 3",
|
"create.ponder.shaft.scene_0.shaft_relay": "UNLOCALIZED: Shafts seem to relay rotation in a straight line.",
|
||||||
"create.metadoc.cogwheel.scene_3.test_text": "UNLOCALIZED: Test text for scene 4",
|
"create.ponder.shaft.scene_0.title": "UNLOCALIZED: Relaying rotational force using Shafts",
|
||||||
"create.metadoc.cogwheel.scene_3.title": "UNLOCALIZED: My First Metadoc Story, Part 4",
|
"create.ponder.shaft.scene_1.shaft_can_be_encased": "UNLOCALIZED: I could use Brass or Andesite Casing to hide them.",
|
||||||
"create.metadoc.cogwheel.scene_4.test_text": "UNLOCALIZED: Test text for scene 5",
|
"create.ponder.shaft.scene_1.title": "UNLOCALIZED: Encasing Shafts",
|
||||||
"create.metadoc.cogwheel.scene_4.title": "UNLOCALIZED: My First Metadoc Story, Part 5",
|
"create.ponder.brass_hand.scene_0.x": "UNLOCALIZED: Das X axis",
|
||||||
|
"create.ponder.brass_hand.scene_0.y": "UNLOCALIZED: Das Y axis",
|
||||||
|
"create.ponder.brass_hand.scene_0.z": "UNLOCALIZED: Das Z axis",
|
||||||
|
"create.ponder.brass_hand.scene_0.title": "UNLOCALIZED: Debug Scene 1: Coordinate Space",
|
||||||
|
"create.ponder.brass_hand.scene_1.change_blocks": "UNLOCALIZED: Blocks can be modified",
|
||||||
|
"create.ponder.brass_hand.scene_1.title": "UNLOCALIZED: Debug Scene 2: Changing Blocks",
|
||||||
|
"create.ponder.brass_hand.scene_2.title": "UNLOCALIZED: Debug Scene 3: Showing Fluids",
|
||||||
|
"create.ponder.brass_hand.scene_2.fluids": "UNLOCALIZED: Fluid rendering test.",
|
||||||
|
"create.ponder.brass_hand.scene_3.outofbounds2": "UNLOCALIZED: Blocks outside of the base plate \n\nIgnored by scaling, thanks to configureBasePlate()",
|
||||||
|
"create.ponder.brass_hand.scene_3.outofbounds": "UNLOCALIZED: Blocks outside of the base plate",
|
||||||
|
"create.ponder.brass_hand.scene_3.title": "UNLOCALIZED: Debug Scene 4: Out of bounds / configureBasePlate",
|
||||||
|
"create.ponder.brass_hand.scene_4.incoming": "UNLOCALIZED: Incoming...",
|
||||||
|
"create.ponder.brass_hand.scene_4.title": "UNLOCALIZED: Debug Scene 5: Emitting particles",
|
||||||
|
|
||||||
"_": "Thank you for translating Create!"
|
"_": "Thank you for translating Create!"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 898",
|
"_": "Missing Localizations: 910",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -1790,18 +1790,30 @@
|
||||||
|
|
||||||
"_": "->------------------------] MetaDoc Text [------------------------<-",
|
"_": "->------------------------] MetaDoc Text [------------------------<-",
|
||||||
|
|
||||||
"create.metadoc.shared.more_shared": "UNLOCALIZED: This is Shared stuff",
|
"create.ponder.hold_to_ponder": "UNLOCALIZED: Hold [%1$s] to Ponder",
|
||||||
"create.metadoc.shared.when_wrenched": "UNLOCALIZED: When Wrenched",
|
"create.ponder.pondering": "UNLOCALIZED: Pondering about...",
|
||||||
"create.metadoc.cogwheel.scene_0.test_text": "UNLOCALIZED: Test text for scene 1",
|
"create.ponder.shared.more_shared": "UNLOCALIZED: This is Shared stuff",
|
||||||
"create.metadoc.cogwheel.scene_0.title": "UNLOCALIZED: My First Metadoc Story, Part 1",
|
"create.ponder.shared.when_wrenched": "UNLOCALIZED: When Wrenched",
|
||||||
"create.metadoc.cogwheel.scene_1.test_text": "UNLOCALIZED: Test text for scene 2",
|
"create.ponder.cogwheel.scene_0.title": "UNLOCALIZED: My First Ponder Story, Parrots",
|
||||||
"create.metadoc.cogwheel.scene_1.title": "UNLOCALIZED: My First Metadoc Story, Part 2",
|
"create.ponder.cogwheel.scene_1.title": "UNLOCALIZED: My First Ponder Story, Parrots",
|
||||||
"create.metadoc.cogwheel.scene_2.test_text": "UNLOCALIZED: Test text for scene 3",
|
"create.ponder.cogwheel.scene_2.title": "UNLOCALIZED: My First Ponder Story, Parrots",
|
||||||
"create.metadoc.cogwheel.scene_2.title": "UNLOCALIZED: My First Metadoc Story, Part 3",
|
"create.ponder.shaft.scene_0.shaft_relay": "UNLOCALIZED: Shafts seem to relay rotation in a straight line.",
|
||||||
"create.metadoc.cogwheel.scene_3.test_text": "UNLOCALIZED: Test text for scene 4",
|
"create.ponder.shaft.scene_0.title": "UNLOCALIZED: Relaying rotational force using Shafts",
|
||||||
"create.metadoc.cogwheel.scene_3.title": "UNLOCALIZED: My First Metadoc Story, Part 4",
|
"create.ponder.shaft.scene_1.shaft_can_be_encased": "UNLOCALIZED: I could use Brass or Andesite Casing to hide them.",
|
||||||
"create.metadoc.cogwheel.scene_4.test_text": "UNLOCALIZED: Test text for scene 5",
|
"create.ponder.shaft.scene_1.title": "UNLOCALIZED: Encasing Shafts",
|
||||||
"create.metadoc.cogwheel.scene_4.title": "UNLOCALIZED: My First Metadoc Story, Part 5",
|
"create.ponder.brass_hand.scene_0.x": "UNLOCALIZED: Das X axis",
|
||||||
|
"create.ponder.brass_hand.scene_0.y": "UNLOCALIZED: Das Y axis",
|
||||||
|
"create.ponder.brass_hand.scene_0.z": "UNLOCALIZED: Das Z axis",
|
||||||
|
"create.ponder.brass_hand.scene_0.title": "UNLOCALIZED: Debug Scene 1: Coordinate Space",
|
||||||
|
"create.ponder.brass_hand.scene_1.change_blocks": "UNLOCALIZED: Blocks can be modified",
|
||||||
|
"create.ponder.brass_hand.scene_1.title": "UNLOCALIZED: Debug Scene 2: Changing Blocks",
|
||||||
|
"create.ponder.brass_hand.scene_2.title": "UNLOCALIZED: Debug Scene 3: Showing Fluids",
|
||||||
|
"create.ponder.brass_hand.scene_2.fluids": "UNLOCALIZED: Fluid rendering test.",
|
||||||
|
"create.ponder.brass_hand.scene_3.outofbounds2": "UNLOCALIZED: Blocks outside of the base plate \n\nIgnored by scaling, thanks to configureBasePlate()",
|
||||||
|
"create.ponder.brass_hand.scene_3.outofbounds": "UNLOCALIZED: Blocks outside of the base plate",
|
||||||
|
"create.ponder.brass_hand.scene_3.title": "UNLOCALIZED: Debug Scene 4: Out of bounds / configureBasePlate",
|
||||||
|
"create.ponder.brass_hand.scene_4.incoming": "UNLOCALIZED: Incoming...",
|
||||||
|
"create.ponder.brass_hand.scene_4.title": "UNLOCALIZED: Debug Scene 5: Emitting particles",
|
||||||
|
|
||||||
"_": "Thank you for translating Create!"
|
"_": "Thank you for translating Create!"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 678",
|
"_": "Missing Localizations: 690",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -1790,18 +1790,30 @@
|
||||||
|
|
||||||
"_": "->------------------------] MetaDoc Text [------------------------<-",
|
"_": "->------------------------] MetaDoc Text [------------------------<-",
|
||||||
|
|
||||||
"create.metadoc.shared.more_shared": "UNLOCALIZED: This is Shared stuff",
|
"create.ponder.hold_to_ponder": "UNLOCALIZED: Hold [%1$s] to Ponder",
|
||||||
"create.metadoc.shared.when_wrenched": "UNLOCALIZED: When Wrenched",
|
"create.ponder.pondering": "UNLOCALIZED: Pondering about...",
|
||||||
"create.metadoc.cogwheel.scene_0.test_text": "UNLOCALIZED: Test text for scene 1",
|
"create.ponder.shared.more_shared": "UNLOCALIZED: This is Shared stuff",
|
||||||
"create.metadoc.cogwheel.scene_0.title": "UNLOCALIZED: My First Metadoc Story, Part 1",
|
"create.ponder.shared.when_wrenched": "UNLOCALIZED: When Wrenched",
|
||||||
"create.metadoc.cogwheel.scene_1.test_text": "UNLOCALIZED: Test text for scene 2",
|
"create.ponder.cogwheel.scene_0.title": "UNLOCALIZED: My First Ponder Story, Parrots",
|
||||||
"create.metadoc.cogwheel.scene_1.title": "UNLOCALIZED: My First Metadoc Story, Part 2",
|
"create.ponder.cogwheel.scene_1.title": "UNLOCALIZED: My First Ponder Story, Parrots",
|
||||||
"create.metadoc.cogwheel.scene_2.test_text": "UNLOCALIZED: Test text for scene 3",
|
"create.ponder.cogwheel.scene_2.title": "UNLOCALIZED: My First Ponder Story, Parrots",
|
||||||
"create.metadoc.cogwheel.scene_2.title": "UNLOCALIZED: My First Metadoc Story, Part 3",
|
"create.ponder.shaft.scene_0.shaft_relay": "UNLOCALIZED: Shafts seem to relay rotation in a straight line.",
|
||||||
"create.metadoc.cogwheel.scene_3.test_text": "UNLOCALIZED: Test text for scene 4",
|
"create.ponder.shaft.scene_0.title": "UNLOCALIZED: Relaying rotational force using Shafts",
|
||||||
"create.metadoc.cogwheel.scene_3.title": "UNLOCALIZED: My First Metadoc Story, Part 4",
|
"create.ponder.shaft.scene_1.shaft_can_be_encased": "UNLOCALIZED: I could use Brass or Andesite Casing to hide them.",
|
||||||
"create.metadoc.cogwheel.scene_4.test_text": "UNLOCALIZED: Test text for scene 5",
|
"create.ponder.shaft.scene_1.title": "UNLOCALIZED: Encasing Shafts",
|
||||||
"create.metadoc.cogwheel.scene_4.title": "UNLOCALIZED: My First Metadoc Story, Part 5",
|
"create.ponder.brass_hand.scene_0.x": "UNLOCALIZED: Das X axis",
|
||||||
|
"create.ponder.brass_hand.scene_0.y": "UNLOCALIZED: Das Y axis",
|
||||||
|
"create.ponder.brass_hand.scene_0.z": "UNLOCALIZED: Das Z axis",
|
||||||
|
"create.ponder.brass_hand.scene_0.title": "UNLOCALIZED: Debug Scene 1: Coordinate Space",
|
||||||
|
"create.ponder.brass_hand.scene_1.change_blocks": "UNLOCALIZED: Blocks can be modified",
|
||||||
|
"create.ponder.brass_hand.scene_1.title": "UNLOCALIZED: Debug Scene 2: Changing Blocks",
|
||||||
|
"create.ponder.brass_hand.scene_2.title": "UNLOCALIZED: Debug Scene 3: Showing Fluids",
|
||||||
|
"create.ponder.brass_hand.scene_2.fluids": "UNLOCALIZED: Fluid rendering test.",
|
||||||
|
"create.ponder.brass_hand.scene_3.outofbounds2": "UNLOCALIZED: Blocks outside of the base plate \n\nIgnored by scaling, thanks to configureBasePlate()",
|
||||||
|
"create.ponder.brass_hand.scene_3.outofbounds": "UNLOCALIZED: Blocks outside of the base plate",
|
||||||
|
"create.ponder.brass_hand.scene_3.title": "UNLOCALIZED: Debug Scene 4: Out of bounds / configureBasePlate",
|
||||||
|
"create.ponder.brass_hand.scene_4.incoming": "UNLOCALIZED: Incoming...",
|
||||||
|
"create.ponder.brass_hand.scene_4.title": "UNLOCALIZED: Debug Scene 5: Emitting particles",
|
||||||
|
|
||||||
"_": "Thank you for translating Create!"
|
"_": "Thank you for translating Create!"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 15",
|
"_": "Missing Localizations: 27",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -1790,18 +1790,30 @@
|
||||||
|
|
||||||
"_": "->------------------------] MetaDoc Text [------------------------<-",
|
"_": "->------------------------] MetaDoc Text [------------------------<-",
|
||||||
|
|
||||||
"create.metadoc.shared.more_shared": "UNLOCALIZED: This is Shared stuff",
|
"create.ponder.hold_to_ponder": "UNLOCALIZED: Hold [%1$s] to Ponder",
|
||||||
"create.metadoc.shared.when_wrenched": "UNLOCALIZED: When Wrenched",
|
"create.ponder.pondering": "UNLOCALIZED: Pondering about...",
|
||||||
"create.metadoc.cogwheel.scene_0.test_text": "UNLOCALIZED: Test text for scene 1",
|
"create.ponder.shared.more_shared": "UNLOCALIZED: This is Shared stuff",
|
||||||
"create.metadoc.cogwheel.scene_0.title": "UNLOCALIZED: My First Metadoc Story, Part 1",
|
"create.ponder.shared.when_wrenched": "UNLOCALIZED: When Wrenched",
|
||||||
"create.metadoc.cogwheel.scene_1.test_text": "UNLOCALIZED: Test text for scene 2",
|
"create.ponder.cogwheel.scene_0.title": "UNLOCALIZED: My First Ponder Story, Parrots",
|
||||||
"create.metadoc.cogwheel.scene_1.title": "UNLOCALIZED: My First Metadoc Story, Part 2",
|
"create.ponder.cogwheel.scene_1.title": "UNLOCALIZED: My First Ponder Story, Parrots",
|
||||||
"create.metadoc.cogwheel.scene_2.test_text": "UNLOCALIZED: Test text for scene 3",
|
"create.ponder.cogwheel.scene_2.title": "UNLOCALIZED: My First Ponder Story, Parrots",
|
||||||
"create.metadoc.cogwheel.scene_2.title": "UNLOCALIZED: My First Metadoc Story, Part 3",
|
"create.ponder.shaft.scene_0.shaft_relay": "UNLOCALIZED: Shafts seem to relay rotation in a straight line.",
|
||||||
"create.metadoc.cogwheel.scene_3.test_text": "UNLOCALIZED: Test text for scene 4",
|
"create.ponder.shaft.scene_0.title": "UNLOCALIZED: Relaying rotational force using Shafts",
|
||||||
"create.metadoc.cogwheel.scene_3.title": "UNLOCALIZED: My First Metadoc Story, Part 4",
|
"create.ponder.shaft.scene_1.shaft_can_be_encased": "UNLOCALIZED: I could use Brass or Andesite Casing to hide them.",
|
||||||
"create.metadoc.cogwheel.scene_4.test_text": "UNLOCALIZED: Test text for scene 5",
|
"create.ponder.shaft.scene_1.title": "UNLOCALIZED: Encasing Shafts",
|
||||||
"create.metadoc.cogwheel.scene_4.title": "UNLOCALIZED: My First Metadoc Story, Part 5",
|
"create.ponder.brass_hand.scene_0.x": "UNLOCALIZED: Das X axis",
|
||||||
|
"create.ponder.brass_hand.scene_0.y": "UNLOCALIZED: Das Y axis",
|
||||||
|
"create.ponder.brass_hand.scene_0.z": "UNLOCALIZED: Das Z axis",
|
||||||
|
"create.ponder.brass_hand.scene_0.title": "UNLOCALIZED: Debug Scene 1: Coordinate Space",
|
||||||
|
"create.ponder.brass_hand.scene_1.change_blocks": "UNLOCALIZED: Blocks can be modified",
|
||||||
|
"create.ponder.brass_hand.scene_1.title": "UNLOCALIZED: Debug Scene 2: Changing Blocks",
|
||||||
|
"create.ponder.brass_hand.scene_2.title": "UNLOCALIZED: Debug Scene 3: Showing Fluids",
|
||||||
|
"create.ponder.brass_hand.scene_2.fluids": "UNLOCALIZED: Fluid rendering test.",
|
||||||
|
"create.ponder.brass_hand.scene_3.outofbounds2": "UNLOCALIZED: Blocks outside of the base plate \n\nIgnored by scaling, thanks to configureBasePlate()",
|
||||||
|
"create.ponder.brass_hand.scene_3.outofbounds": "UNLOCALIZED: Blocks outside of the base plate",
|
||||||
|
"create.ponder.brass_hand.scene_3.title": "UNLOCALIZED: Debug Scene 4: Out of bounds / configureBasePlate",
|
||||||
|
"create.ponder.brass_hand.scene_4.incoming": "UNLOCALIZED: Incoming...",
|
||||||
|
"create.ponder.brass_hand.scene_4.title": "UNLOCALIZED: Debug Scene 5: Emitting particles",
|
||||||
|
|
||||||
"_": "Thank you for translating Create!"
|
"_": "Thank you for translating Create!"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 24",
|
"_": "Missing Localizations: 36",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -1790,18 +1790,30 @@
|
||||||
|
|
||||||
"_": "->------------------------] MetaDoc Text [------------------------<-",
|
"_": "->------------------------] MetaDoc Text [------------------------<-",
|
||||||
|
|
||||||
"create.metadoc.shared.more_shared": "UNLOCALIZED: This is Shared stuff",
|
"create.ponder.hold_to_ponder": "UNLOCALIZED: Hold [%1$s] to Ponder",
|
||||||
"create.metadoc.shared.when_wrenched": "UNLOCALIZED: When Wrenched",
|
"create.ponder.pondering": "UNLOCALIZED: Pondering about...",
|
||||||
"create.metadoc.cogwheel.scene_0.test_text": "UNLOCALIZED: Test text for scene 1",
|
"create.ponder.shared.more_shared": "UNLOCALIZED: This is Shared stuff",
|
||||||
"create.metadoc.cogwheel.scene_0.title": "UNLOCALIZED: My First Metadoc Story, Part 1",
|
"create.ponder.shared.when_wrenched": "UNLOCALIZED: When Wrenched",
|
||||||
"create.metadoc.cogwheel.scene_1.test_text": "UNLOCALIZED: Test text for scene 2",
|
"create.ponder.cogwheel.scene_0.title": "UNLOCALIZED: My First Ponder Story, Parrots",
|
||||||
"create.metadoc.cogwheel.scene_1.title": "UNLOCALIZED: My First Metadoc Story, Part 2",
|
"create.ponder.cogwheel.scene_1.title": "UNLOCALIZED: My First Ponder Story, Parrots",
|
||||||
"create.metadoc.cogwheel.scene_2.test_text": "UNLOCALIZED: Test text for scene 3",
|
"create.ponder.cogwheel.scene_2.title": "UNLOCALIZED: My First Ponder Story, Parrots",
|
||||||
"create.metadoc.cogwheel.scene_2.title": "UNLOCALIZED: My First Metadoc Story, Part 3",
|
"create.ponder.shaft.scene_0.shaft_relay": "UNLOCALIZED: Shafts seem to relay rotation in a straight line.",
|
||||||
"create.metadoc.cogwheel.scene_3.test_text": "UNLOCALIZED: Test text for scene 4",
|
"create.ponder.shaft.scene_0.title": "UNLOCALIZED: Relaying rotational force using Shafts",
|
||||||
"create.metadoc.cogwheel.scene_3.title": "UNLOCALIZED: My First Metadoc Story, Part 4",
|
"create.ponder.shaft.scene_1.shaft_can_be_encased": "UNLOCALIZED: I could use Brass or Andesite Casing to hide them.",
|
||||||
"create.metadoc.cogwheel.scene_4.test_text": "UNLOCALIZED: Test text for scene 5",
|
"create.ponder.shaft.scene_1.title": "UNLOCALIZED: Encasing Shafts",
|
||||||
"create.metadoc.cogwheel.scene_4.title": "UNLOCALIZED: My First Metadoc Story, Part 5",
|
"create.ponder.brass_hand.scene_0.x": "UNLOCALIZED: Das X axis",
|
||||||
|
"create.ponder.brass_hand.scene_0.y": "UNLOCALIZED: Das Y axis",
|
||||||
|
"create.ponder.brass_hand.scene_0.z": "UNLOCALIZED: Das Z axis",
|
||||||
|
"create.ponder.brass_hand.scene_0.title": "UNLOCALIZED: Debug Scene 1: Coordinate Space",
|
||||||
|
"create.ponder.brass_hand.scene_1.change_blocks": "UNLOCALIZED: Blocks can be modified",
|
||||||
|
"create.ponder.brass_hand.scene_1.title": "UNLOCALIZED: Debug Scene 2: Changing Blocks",
|
||||||
|
"create.ponder.brass_hand.scene_2.title": "UNLOCALIZED: Debug Scene 3: Showing Fluids",
|
||||||
|
"create.ponder.brass_hand.scene_2.fluids": "UNLOCALIZED: Fluid rendering test.",
|
||||||
|
"create.ponder.brass_hand.scene_3.outofbounds2": "UNLOCALIZED: Blocks outside of the base plate \n\nIgnored by scaling, thanks to configureBasePlate()",
|
||||||
|
"create.ponder.brass_hand.scene_3.outofbounds": "UNLOCALIZED: Blocks outside of the base plate",
|
||||||
|
"create.ponder.brass_hand.scene_3.title": "UNLOCALIZED: Debug Scene 4: Out of bounds / configureBasePlate",
|
||||||
|
"create.ponder.brass_hand.scene_4.incoming": "UNLOCALIZED: Incoming...",
|
||||||
|
"create.ponder.brass_hand.scene_4.title": "UNLOCALIZED: Debug Scene 5: Emitting particles",
|
||||||
|
|
||||||
"_": "Thank you for translating Create!"
|
"_": "Thank you for translating Create!"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 67",
|
"_": "Missing Localizations: 79",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -1790,18 +1790,30 @@
|
||||||
|
|
||||||
"_": "->------------------------] MetaDoc Text [------------------------<-",
|
"_": "->------------------------] MetaDoc Text [------------------------<-",
|
||||||
|
|
||||||
"create.metadoc.shared.more_shared": "UNLOCALIZED: This is Shared stuff",
|
"create.ponder.hold_to_ponder": "UNLOCALIZED: Hold [%1$s] to Ponder",
|
||||||
"create.metadoc.shared.when_wrenched": "UNLOCALIZED: When Wrenched",
|
"create.ponder.pondering": "UNLOCALIZED: Pondering about...",
|
||||||
"create.metadoc.cogwheel.scene_0.test_text": "UNLOCALIZED: Test text for scene 1",
|
"create.ponder.shared.more_shared": "UNLOCALIZED: This is Shared stuff",
|
||||||
"create.metadoc.cogwheel.scene_0.title": "UNLOCALIZED: My First Metadoc Story, Part 1",
|
"create.ponder.shared.when_wrenched": "UNLOCALIZED: When Wrenched",
|
||||||
"create.metadoc.cogwheel.scene_1.test_text": "UNLOCALIZED: Test text for scene 2",
|
"create.ponder.cogwheel.scene_0.title": "UNLOCALIZED: My First Ponder Story, Parrots",
|
||||||
"create.metadoc.cogwheel.scene_1.title": "UNLOCALIZED: My First Metadoc Story, Part 2",
|
"create.ponder.cogwheel.scene_1.title": "UNLOCALIZED: My First Ponder Story, Parrots",
|
||||||
"create.metadoc.cogwheel.scene_2.test_text": "UNLOCALIZED: Test text for scene 3",
|
"create.ponder.cogwheel.scene_2.title": "UNLOCALIZED: My First Ponder Story, Parrots",
|
||||||
"create.metadoc.cogwheel.scene_2.title": "UNLOCALIZED: My First Metadoc Story, Part 3",
|
"create.ponder.shaft.scene_0.shaft_relay": "UNLOCALIZED: Shafts seem to relay rotation in a straight line.",
|
||||||
"create.metadoc.cogwheel.scene_3.test_text": "UNLOCALIZED: Test text for scene 4",
|
"create.ponder.shaft.scene_0.title": "UNLOCALIZED: Relaying rotational force using Shafts",
|
||||||
"create.metadoc.cogwheel.scene_3.title": "UNLOCALIZED: My First Metadoc Story, Part 4",
|
"create.ponder.shaft.scene_1.shaft_can_be_encased": "UNLOCALIZED: I could use Brass or Andesite Casing to hide them.",
|
||||||
"create.metadoc.cogwheel.scene_4.test_text": "UNLOCALIZED: Test text for scene 5",
|
"create.ponder.shaft.scene_1.title": "UNLOCALIZED: Encasing Shafts",
|
||||||
"create.metadoc.cogwheel.scene_4.title": "UNLOCALIZED: My First Metadoc Story, Part 5",
|
"create.ponder.brass_hand.scene_0.x": "UNLOCALIZED: Das X axis",
|
||||||
|
"create.ponder.brass_hand.scene_0.y": "UNLOCALIZED: Das Y axis",
|
||||||
|
"create.ponder.brass_hand.scene_0.z": "UNLOCALIZED: Das Z axis",
|
||||||
|
"create.ponder.brass_hand.scene_0.title": "UNLOCALIZED: Debug Scene 1: Coordinate Space",
|
||||||
|
"create.ponder.brass_hand.scene_1.change_blocks": "UNLOCALIZED: Blocks can be modified",
|
||||||
|
"create.ponder.brass_hand.scene_1.title": "UNLOCALIZED: Debug Scene 2: Changing Blocks",
|
||||||
|
"create.ponder.brass_hand.scene_2.title": "UNLOCALIZED: Debug Scene 3: Showing Fluids",
|
||||||
|
"create.ponder.brass_hand.scene_2.fluids": "UNLOCALIZED: Fluid rendering test.",
|
||||||
|
"create.ponder.brass_hand.scene_3.outofbounds2": "UNLOCALIZED: Blocks outside of the base plate \n\nIgnored by scaling, thanks to configureBasePlate()",
|
||||||
|
"create.ponder.brass_hand.scene_3.outofbounds": "UNLOCALIZED: Blocks outside of the base plate",
|
||||||
|
"create.ponder.brass_hand.scene_3.title": "UNLOCALIZED: Debug Scene 4: Out of bounds / configureBasePlate",
|
||||||
|
"create.ponder.brass_hand.scene_4.incoming": "UNLOCALIZED: Incoming...",
|
||||||
|
"create.ponder.brass_hand.scene_4.title": "UNLOCALIZED: Debug Scene 5: Emitting particles",
|
||||||
|
|
||||||
"_": "Thank you for translating Create!"
|
"_": "Thank you for translating Create!"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 1167",
|
"_": "Missing Localizations: 1179",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -1790,18 +1790,30 @@
|
||||||
|
|
||||||
"_": "->------------------------] MetaDoc Text [------------------------<-",
|
"_": "->------------------------] MetaDoc Text [------------------------<-",
|
||||||
|
|
||||||
"create.metadoc.shared.more_shared": "UNLOCALIZED: This is Shared stuff",
|
"create.ponder.hold_to_ponder": "UNLOCALIZED: Hold [%1$s] to Ponder",
|
||||||
"create.metadoc.shared.when_wrenched": "UNLOCALIZED: When Wrenched",
|
"create.ponder.pondering": "UNLOCALIZED: Pondering about...",
|
||||||
"create.metadoc.cogwheel.scene_0.test_text": "UNLOCALIZED: Test text for scene 1",
|
"create.ponder.shared.more_shared": "UNLOCALIZED: This is Shared stuff",
|
||||||
"create.metadoc.cogwheel.scene_0.title": "UNLOCALIZED: My First Metadoc Story, Part 1",
|
"create.ponder.shared.when_wrenched": "UNLOCALIZED: When Wrenched",
|
||||||
"create.metadoc.cogwheel.scene_1.test_text": "UNLOCALIZED: Test text for scene 2",
|
"create.ponder.cogwheel.scene_0.title": "UNLOCALIZED: My First Ponder Story, Parrots",
|
||||||
"create.metadoc.cogwheel.scene_1.title": "UNLOCALIZED: My First Metadoc Story, Part 2",
|
"create.ponder.cogwheel.scene_1.title": "UNLOCALIZED: My First Ponder Story, Parrots",
|
||||||
"create.metadoc.cogwheel.scene_2.test_text": "UNLOCALIZED: Test text for scene 3",
|
"create.ponder.cogwheel.scene_2.title": "UNLOCALIZED: My First Ponder Story, Parrots",
|
||||||
"create.metadoc.cogwheel.scene_2.title": "UNLOCALIZED: My First Metadoc Story, Part 3",
|
"create.ponder.shaft.scene_0.shaft_relay": "UNLOCALIZED: Shafts seem to relay rotation in a straight line.",
|
||||||
"create.metadoc.cogwheel.scene_3.test_text": "UNLOCALIZED: Test text for scene 4",
|
"create.ponder.shaft.scene_0.title": "UNLOCALIZED: Relaying rotational force using Shafts",
|
||||||
"create.metadoc.cogwheel.scene_3.title": "UNLOCALIZED: My First Metadoc Story, Part 4",
|
"create.ponder.shaft.scene_1.shaft_can_be_encased": "UNLOCALIZED: I could use Brass or Andesite Casing to hide them.",
|
||||||
"create.metadoc.cogwheel.scene_4.test_text": "UNLOCALIZED: Test text for scene 5",
|
"create.ponder.shaft.scene_1.title": "UNLOCALIZED: Encasing Shafts",
|
||||||
"create.metadoc.cogwheel.scene_4.title": "UNLOCALIZED: My First Metadoc Story, Part 5",
|
"create.ponder.brass_hand.scene_0.x": "UNLOCALIZED: Das X axis",
|
||||||
|
"create.ponder.brass_hand.scene_0.y": "UNLOCALIZED: Das Y axis",
|
||||||
|
"create.ponder.brass_hand.scene_0.z": "UNLOCALIZED: Das Z axis",
|
||||||
|
"create.ponder.brass_hand.scene_0.title": "UNLOCALIZED: Debug Scene 1: Coordinate Space",
|
||||||
|
"create.ponder.brass_hand.scene_1.change_blocks": "UNLOCALIZED: Blocks can be modified",
|
||||||
|
"create.ponder.brass_hand.scene_1.title": "UNLOCALIZED: Debug Scene 2: Changing Blocks",
|
||||||
|
"create.ponder.brass_hand.scene_2.title": "UNLOCALIZED: Debug Scene 3: Showing Fluids",
|
||||||
|
"create.ponder.brass_hand.scene_2.fluids": "UNLOCALIZED: Fluid rendering test.",
|
||||||
|
"create.ponder.brass_hand.scene_3.outofbounds2": "UNLOCALIZED: Blocks outside of the base plate \n\nIgnored by scaling, thanks to configureBasePlate()",
|
||||||
|
"create.ponder.brass_hand.scene_3.outofbounds": "UNLOCALIZED: Blocks outside of the base plate",
|
||||||
|
"create.ponder.brass_hand.scene_3.title": "UNLOCALIZED: Debug Scene 4: Out of bounds / configureBasePlate",
|
||||||
|
"create.ponder.brass_hand.scene_4.incoming": "UNLOCALIZED: Incoming...",
|
||||||
|
"create.ponder.brass_hand.scene_4.title": "UNLOCALIZED: Debug Scene 5: Emitting particles",
|
||||||
|
|
||||||
"_": "Thank you for translating Create!"
|
"_": "Thank you for translating Create!"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 1233",
|
"_": "Missing Localizations: 1245",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -1790,18 +1790,30 @@
|
||||||
|
|
||||||
"_": "->------------------------] MetaDoc Text [------------------------<-",
|
"_": "->------------------------] MetaDoc Text [------------------------<-",
|
||||||
|
|
||||||
"create.metadoc.shared.more_shared": "UNLOCALIZED: This is Shared stuff",
|
"create.ponder.hold_to_ponder": "UNLOCALIZED: Hold [%1$s] to Ponder",
|
||||||
"create.metadoc.shared.when_wrenched": "UNLOCALIZED: When Wrenched",
|
"create.ponder.pondering": "UNLOCALIZED: Pondering about...",
|
||||||
"create.metadoc.cogwheel.scene_0.test_text": "UNLOCALIZED: Test text for scene 1",
|
"create.ponder.shared.more_shared": "UNLOCALIZED: This is Shared stuff",
|
||||||
"create.metadoc.cogwheel.scene_0.title": "UNLOCALIZED: My First Metadoc Story, Part 1",
|
"create.ponder.shared.when_wrenched": "UNLOCALIZED: When Wrenched",
|
||||||
"create.metadoc.cogwheel.scene_1.test_text": "UNLOCALIZED: Test text for scene 2",
|
"create.ponder.cogwheel.scene_0.title": "UNLOCALIZED: My First Ponder Story, Parrots",
|
||||||
"create.metadoc.cogwheel.scene_1.title": "UNLOCALIZED: My First Metadoc Story, Part 2",
|
"create.ponder.cogwheel.scene_1.title": "UNLOCALIZED: My First Ponder Story, Parrots",
|
||||||
"create.metadoc.cogwheel.scene_2.test_text": "UNLOCALIZED: Test text for scene 3",
|
"create.ponder.cogwheel.scene_2.title": "UNLOCALIZED: My First Ponder Story, Parrots",
|
||||||
"create.metadoc.cogwheel.scene_2.title": "UNLOCALIZED: My First Metadoc Story, Part 3",
|
"create.ponder.shaft.scene_0.shaft_relay": "UNLOCALIZED: Shafts seem to relay rotation in a straight line.",
|
||||||
"create.metadoc.cogwheel.scene_3.test_text": "UNLOCALIZED: Test text for scene 4",
|
"create.ponder.shaft.scene_0.title": "UNLOCALIZED: Relaying rotational force using Shafts",
|
||||||
"create.metadoc.cogwheel.scene_3.title": "UNLOCALIZED: My First Metadoc Story, Part 4",
|
"create.ponder.shaft.scene_1.shaft_can_be_encased": "UNLOCALIZED: I could use Brass or Andesite Casing to hide them.",
|
||||||
"create.metadoc.cogwheel.scene_4.test_text": "UNLOCALIZED: Test text for scene 5",
|
"create.ponder.shaft.scene_1.title": "UNLOCALIZED: Encasing Shafts",
|
||||||
"create.metadoc.cogwheel.scene_4.title": "UNLOCALIZED: My First Metadoc Story, Part 5",
|
"create.ponder.brass_hand.scene_0.x": "UNLOCALIZED: Das X axis",
|
||||||
|
"create.ponder.brass_hand.scene_0.y": "UNLOCALIZED: Das Y axis",
|
||||||
|
"create.ponder.brass_hand.scene_0.z": "UNLOCALIZED: Das Z axis",
|
||||||
|
"create.ponder.brass_hand.scene_0.title": "UNLOCALIZED: Debug Scene 1: Coordinate Space",
|
||||||
|
"create.ponder.brass_hand.scene_1.change_blocks": "UNLOCALIZED: Blocks can be modified",
|
||||||
|
"create.ponder.brass_hand.scene_1.title": "UNLOCALIZED: Debug Scene 2: Changing Blocks",
|
||||||
|
"create.ponder.brass_hand.scene_2.title": "UNLOCALIZED: Debug Scene 3: Showing Fluids",
|
||||||
|
"create.ponder.brass_hand.scene_2.fluids": "UNLOCALIZED: Fluid rendering test.",
|
||||||
|
"create.ponder.brass_hand.scene_3.outofbounds2": "UNLOCALIZED: Blocks outside of the base plate \n\nIgnored by scaling, thanks to configureBasePlate()",
|
||||||
|
"create.ponder.brass_hand.scene_3.outofbounds": "UNLOCALIZED: Blocks outside of the base plate",
|
||||||
|
"create.ponder.brass_hand.scene_3.title": "UNLOCALIZED: Debug Scene 4: Out of bounds / configureBasePlate",
|
||||||
|
"create.ponder.brass_hand.scene_4.incoming": "UNLOCALIZED: Incoming...",
|
||||||
|
"create.ponder.brass_hand.scene_4.title": "UNLOCALIZED: Debug Scene 5: Emitting particles",
|
||||||
|
|
||||||
"_": "Thank you for translating Create!"
|
"_": "Thank you for translating Create!"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 17",
|
"_": "Missing Localizations: 29",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -1790,18 +1790,30 @@
|
||||||
|
|
||||||
"_": "->------------------------] MetaDoc Text [------------------------<-",
|
"_": "->------------------------] MetaDoc Text [------------------------<-",
|
||||||
|
|
||||||
"create.metadoc.shared.more_shared": "UNLOCALIZED: This is Shared stuff",
|
"create.ponder.hold_to_ponder": "UNLOCALIZED: Hold [%1$s] to Ponder",
|
||||||
"create.metadoc.shared.when_wrenched": "UNLOCALIZED: When Wrenched",
|
"create.ponder.pondering": "UNLOCALIZED: Pondering about...",
|
||||||
"create.metadoc.cogwheel.scene_0.test_text": "UNLOCALIZED: Test text for scene 1",
|
"create.ponder.shared.more_shared": "UNLOCALIZED: This is Shared stuff",
|
||||||
"create.metadoc.cogwheel.scene_0.title": "UNLOCALIZED: My First Metadoc Story, Part 1",
|
"create.ponder.shared.when_wrenched": "UNLOCALIZED: When Wrenched",
|
||||||
"create.metadoc.cogwheel.scene_1.test_text": "UNLOCALIZED: Test text for scene 2",
|
"create.ponder.cogwheel.scene_0.title": "UNLOCALIZED: My First Ponder Story, Parrots",
|
||||||
"create.metadoc.cogwheel.scene_1.title": "UNLOCALIZED: My First Metadoc Story, Part 2",
|
"create.ponder.cogwheel.scene_1.title": "UNLOCALIZED: My First Ponder Story, Parrots",
|
||||||
"create.metadoc.cogwheel.scene_2.test_text": "UNLOCALIZED: Test text for scene 3",
|
"create.ponder.cogwheel.scene_2.title": "UNLOCALIZED: My First Ponder Story, Parrots",
|
||||||
"create.metadoc.cogwheel.scene_2.title": "UNLOCALIZED: My First Metadoc Story, Part 3",
|
"create.ponder.shaft.scene_0.shaft_relay": "UNLOCALIZED: Shafts seem to relay rotation in a straight line.",
|
||||||
"create.metadoc.cogwheel.scene_3.test_text": "UNLOCALIZED: Test text for scene 4",
|
"create.ponder.shaft.scene_0.title": "UNLOCALIZED: Relaying rotational force using Shafts",
|
||||||
"create.metadoc.cogwheel.scene_3.title": "UNLOCALIZED: My First Metadoc Story, Part 4",
|
"create.ponder.shaft.scene_1.shaft_can_be_encased": "UNLOCALIZED: I could use Brass or Andesite Casing to hide them.",
|
||||||
"create.metadoc.cogwheel.scene_4.test_text": "UNLOCALIZED: Test text for scene 5",
|
"create.ponder.shaft.scene_1.title": "UNLOCALIZED: Encasing Shafts",
|
||||||
"create.metadoc.cogwheel.scene_4.title": "UNLOCALIZED: My First Metadoc Story, Part 5",
|
"create.ponder.brass_hand.scene_0.x": "UNLOCALIZED: Das X axis",
|
||||||
|
"create.ponder.brass_hand.scene_0.y": "UNLOCALIZED: Das Y axis",
|
||||||
|
"create.ponder.brass_hand.scene_0.z": "UNLOCALIZED: Das Z axis",
|
||||||
|
"create.ponder.brass_hand.scene_0.title": "UNLOCALIZED: Debug Scene 1: Coordinate Space",
|
||||||
|
"create.ponder.brass_hand.scene_1.change_blocks": "UNLOCALIZED: Blocks can be modified",
|
||||||
|
"create.ponder.brass_hand.scene_1.title": "UNLOCALIZED: Debug Scene 2: Changing Blocks",
|
||||||
|
"create.ponder.brass_hand.scene_2.title": "UNLOCALIZED: Debug Scene 3: Showing Fluids",
|
||||||
|
"create.ponder.brass_hand.scene_2.fluids": "UNLOCALIZED: Fluid rendering test.",
|
||||||
|
"create.ponder.brass_hand.scene_3.outofbounds2": "UNLOCALIZED: Blocks outside of the base plate \n\nIgnored by scaling, thanks to configureBasePlate()",
|
||||||
|
"create.ponder.brass_hand.scene_3.outofbounds": "UNLOCALIZED: Blocks outside of the base plate",
|
||||||
|
"create.ponder.brass_hand.scene_3.title": "UNLOCALIZED: Debug Scene 4: Out of bounds / configureBasePlate",
|
||||||
|
"create.ponder.brass_hand.scene_4.incoming": "UNLOCALIZED: Incoming...",
|
||||||
|
"create.ponder.brass_hand.scene_4.title": "UNLOCALIZED: Debug Scene 5: Emitting particles",
|
||||||
|
|
||||||
"_": "Thank you for translating Create!"
|
"_": "Thank you for translating Create!"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 15",
|
"_": "Missing Localizations: 27",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -1790,18 +1790,30 @@
|
||||||
|
|
||||||
"_": "->------------------------] MetaDoc Text [------------------------<-",
|
"_": "->------------------------] MetaDoc Text [------------------------<-",
|
||||||
|
|
||||||
"create.metadoc.shared.more_shared": "UNLOCALIZED: This is Shared stuff",
|
"create.ponder.hold_to_ponder": "UNLOCALIZED: Hold [%1$s] to Ponder",
|
||||||
"create.metadoc.shared.when_wrenched": "UNLOCALIZED: When Wrenched",
|
"create.ponder.pondering": "UNLOCALIZED: Pondering about...",
|
||||||
"create.metadoc.cogwheel.scene_0.test_text": "UNLOCALIZED: Test text for scene 1",
|
"create.ponder.shared.more_shared": "UNLOCALIZED: This is Shared stuff",
|
||||||
"create.metadoc.cogwheel.scene_0.title": "UNLOCALIZED: My First Metadoc Story, Part 1",
|
"create.ponder.shared.when_wrenched": "UNLOCALIZED: When Wrenched",
|
||||||
"create.metadoc.cogwheel.scene_1.test_text": "UNLOCALIZED: Test text for scene 2",
|
"create.ponder.cogwheel.scene_0.title": "UNLOCALIZED: My First Ponder Story, Parrots",
|
||||||
"create.metadoc.cogwheel.scene_1.title": "UNLOCALIZED: My First Metadoc Story, Part 2",
|
"create.ponder.cogwheel.scene_1.title": "UNLOCALIZED: My First Ponder Story, Parrots",
|
||||||
"create.metadoc.cogwheel.scene_2.test_text": "UNLOCALIZED: Test text for scene 3",
|
"create.ponder.cogwheel.scene_2.title": "UNLOCALIZED: My First Ponder Story, Parrots",
|
||||||
"create.metadoc.cogwheel.scene_2.title": "UNLOCALIZED: My First Metadoc Story, Part 3",
|
"create.ponder.shaft.scene_0.shaft_relay": "UNLOCALIZED: Shafts seem to relay rotation in a straight line.",
|
||||||
"create.metadoc.cogwheel.scene_3.test_text": "UNLOCALIZED: Test text for scene 4",
|
"create.ponder.shaft.scene_0.title": "UNLOCALIZED: Relaying rotational force using Shafts",
|
||||||
"create.metadoc.cogwheel.scene_3.title": "UNLOCALIZED: My First Metadoc Story, Part 4",
|
"create.ponder.shaft.scene_1.shaft_can_be_encased": "UNLOCALIZED: I could use Brass or Andesite Casing to hide them.",
|
||||||
"create.metadoc.cogwheel.scene_4.test_text": "UNLOCALIZED: Test text for scene 5",
|
"create.ponder.shaft.scene_1.title": "UNLOCALIZED: Encasing Shafts",
|
||||||
"create.metadoc.cogwheel.scene_4.title": "UNLOCALIZED: My First Metadoc Story, Part 5",
|
"create.ponder.brass_hand.scene_0.x": "UNLOCALIZED: Das X axis",
|
||||||
|
"create.ponder.brass_hand.scene_0.y": "UNLOCALIZED: Das Y axis",
|
||||||
|
"create.ponder.brass_hand.scene_0.z": "UNLOCALIZED: Das Z axis",
|
||||||
|
"create.ponder.brass_hand.scene_0.title": "UNLOCALIZED: Debug Scene 1: Coordinate Space",
|
||||||
|
"create.ponder.brass_hand.scene_1.change_blocks": "UNLOCALIZED: Blocks can be modified",
|
||||||
|
"create.ponder.brass_hand.scene_1.title": "UNLOCALIZED: Debug Scene 2: Changing Blocks",
|
||||||
|
"create.ponder.brass_hand.scene_2.title": "UNLOCALIZED: Debug Scene 3: Showing Fluids",
|
||||||
|
"create.ponder.brass_hand.scene_2.fluids": "UNLOCALIZED: Fluid rendering test.",
|
||||||
|
"create.ponder.brass_hand.scene_3.outofbounds2": "UNLOCALIZED: Blocks outside of the base plate \n\nIgnored by scaling, thanks to configureBasePlate()",
|
||||||
|
"create.ponder.brass_hand.scene_3.outofbounds": "UNLOCALIZED: Blocks outside of the base plate",
|
||||||
|
"create.ponder.brass_hand.scene_3.title": "UNLOCALIZED: Debug Scene 4: Out of bounds / configureBasePlate",
|
||||||
|
"create.ponder.brass_hand.scene_4.incoming": "UNLOCALIZED: Incoming...",
|
||||||
|
"create.ponder.brass_hand.scene_4.title": "UNLOCALIZED: Debug Scene 5: Emitting particles",
|
||||||
|
|
||||||
"_": "Thank you for translating Create!"
|
"_": "Thank you for translating Create!"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 20",
|
"_": "Missing Localizations: 32",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -1790,18 +1790,30 @@
|
||||||
|
|
||||||
"_": "->------------------------] MetaDoc Text [------------------------<-",
|
"_": "->------------------------] MetaDoc Text [------------------------<-",
|
||||||
|
|
||||||
"create.metadoc.shared.more_shared": "UNLOCALIZED: This is Shared stuff",
|
"create.ponder.hold_to_ponder": "UNLOCALIZED: Hold [%1$s] to Ponder",
|
||||||
"create.metadoc.shared.when_wrenched": "UNLOCALIZED: When Wrenched",
|
"create.ponder.pondering": "UNLOCALIZED: Pondering about...",
|
||||||
"create.metadoc.cogwheel.scene_0.test_text": "UNLOCALIZED: Test text for scene 1",
|
"create.ponder.shared.more_shared": "UNLOCALIZED: This is Shared stuff",
|
||||||
"create.metadoc.cogwheel.scene_0.title": "UNLOCALIZED: My First Metadoc Story, Part 1",
|
"create.ponder.shared.when_wrenched": "UNLOCALIZED: When Wrenched",
|
||||||
"create.metadoc.cogwheel.scene_1.test_text": "UNLOCALIZED: Test text for scene 2",
|
"create.ponder.cogwheel.scene_0.title": "UNLOCALIZED: My First Ponder Story, Parrots",
|
||||||
"create.metadoc.cogwheel.scene_1.title": "UNLOCALIZED: My First Metadoc Story, Part 2",
|
"create.ponder.cogwheel.scene_1.title": "UNLOCALIZED: My First Ponder Story, Parrots",
|
||||||
"create.metadoc.cogwheel.scene_2.test_text": "UNLOCALIZED: Test text for scene 3",
|
"create.ponder.cogwheel.scene_2.title": "UNLOCALIZED: My First Ponder Story, Parrots",
|
||||||
"create.metadoc.cogwheel.scene_2.title": "UNLOCALIZED: My First Metadoc Story, Part 3",
|
"create.ponder.shaft.scene_0.shaft_relay": "UNLOCALIZED: Shafts seem to relay rotation in a straight line.",
|
||||||
"create.metadoc.cogwheel.scene_3.test_text": "UNLOCALIZED: Test text for scene 4",
|
"create.ponder.shaft.scene_0.title": "UNLOCALIZED: Relaying rotational force using Shafts",
|
||||||
"create.metadoc.cogwheel.scene_3.title": "UNLOCALIZED: My First Metadoc Story, Part 4",
|
"create.ponder.shaft.scene_1.shaft_can_be_encased": "UNLOCALIZED: I could use Brass or Andesite Casing to hide them.",
|
||||||
"create.metadoc.cogwheel.scene_4.test_text": "UNLOCALIZED: Test text for scene 5",
|
"create.ponder.shaft.scene_1.title": "UNLOCALIZED: Encasing Shafts",
|
||||||
"create.metadoc.cogwheel.scene_4.title": "UNLOCALIZED: My First Metadoc Story, Part 5",
|
"create.ponder.brass_hand.scene_0.x": "UNLOCALIZED: Das X axis",
|
||||||
|
"create.ponder.brass_hand.scene_0.y": "UNLOCALIZED: Das Y axis",
|
||||||
|
"create.ponder.brass_hand.scene_0.z": "UNLOCALIZED: Das Z axis",
|
||||||
|
"create.ponder.brass_hand.scene_0.title": "UNLOCALIZED: Debug Scene 1: Coordinate Space",
|
||||||
|
"create.ponder.brass_hand.scene_1.change_blocks": "UNLOCALIZED: Blocks can be modified",
|
||||||
|
"create.ponder.brass_hand.scene_1.title": "UNLOCALIZED: Debug Scene 2: Changing Blocks",
|
||||||
|
"create.ponder.brass_hand.scene_2.title": "UNLOCALIZED: Debug Scene 3: Showing Fluids",
|
||||||
|
"create.ponder.brass_hand.scene_2.fluids": "UNLOCALIZED: Fluid rendering test.",
|
||||||
|
"create.ponder.brass_hand.scene_3.outofbounds2": "UNLOCALIZED: Blocks outside of the base plate \n\nIgnored by scaling, thanks to configureBasePlate()",
|
||||||
|
"create.ponder.brass_hand.scene_3.outofbounds": "UNLOCALIZED: Blocks outside of the base plate",
|
||||||
|
"create.ponder.brass_hand.scene_3.title": "UNLOCALIZED: Debug Scene 4: Out of bounds / configureBasePlate",
|
||||||
|
"create.ponder.brass_hand.scene_4.incoming": "UNLOCALIZED: Incoming...",
|
||||||
|
"create.ponder.brass_hand.scene_4.title": "UNLOCALIZED: Debug Scene 5: Emitting particles",
|
||||||
|
|
||||||
"_": "Thank you for translating Create!"
|
"_": "Thank you for translating Create!"
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,8 @@ import com.simibubi.create.foundation.block.render.CustomBlockModels;
|
||||||
import com.simibubi.create.foundation.block.render.SpriteShifter;
|
import com.simibubi.create.foundation.block.render.SpriteShifter;
|
||||||
import com.simibubi.create.foundation.item.CustomItemModels;
|
import com.simibubi.create.foundation.item.CustomItemModels;
|
||||||
import com.simibubi.create.foundation.item.CustomRenderedItems;
|
import com.simibubi.create.foundation.item.CustomRenderedItems;
|
||||||
import com.simibubi.create.foundation.metadoc.content.MetaDocIndex;
|
import com.simibubi.create.foundation.ponder.content.PonderIndex;
|
||||||
import com.simibubi.create.foundation.metadoc.elements.WorldSectionElement;
|
import com.simibubi.create.foundation.ponder.elements.WorldSectionElement;
|
||||||
import com.simibubi.create.foundation.utility.SuperByteBufferCache;
|
import com.simibubi.create.foundation.utility.SuperByteBufferCache;
|
||||||
import com.simibubi.create.foundation.utility.outliner.Outliner;
|
import com.simibubi.create.foundation.utility.outliner.Outliner;
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ public class CreateClient {
|
||||||
AllEntityTypes.registerRenderers();
|
AllEntityTypes.registerRenderers();
|
||||||
getColorHandler().init();
|
getColorHandler().init();
|
||||||
AllFluids.assignRenderLayers();
|
AllFluids.assignRenderLayers();
|
||||||
MetaDocIndex.register();
|
PonderIndex.register();
|
||||||
|
|
||||||
IResourceManager resourceManager = Minecraft.getInstance()
|
IResourceManager resourceManager = Minecraft.getInstance()
|
||||||
.getResourceManager();
|
.getResourceManager();
|
||||||
|
|
|
@ -84,8 +84,9 @@ public class RotationIndicatorParticle extends SimpleAnimatedParticle {
|
||||||
|
|
||||||
public Particle makeParticle(RotationIndicatorParticleData data, World worldIn, double x, double y, double z,
|
public Particle makeParticle(RotationIndicatorParticleData data, World worldIn, double x, double y, double z,
|
||||||
double xSpeed, double ySpeed, double zSpeed) {
|
double xSpeed, double ySpeed, double zSpeed) {
|
||||||
ClientPlayerEntity player = Minecraft.getInstance().player;
|
Minecraft mc = Minecraft.getInstance();
|
||||||
boolean visible = player != null && GogglesItem.canSeeParticles(player);
|
ClientPlayerEntity player = mc.player;
|
||||||
|
boolean visible = worldIn != mc.world || player != null && GogglesItem.canSeeParticles(player);
|
||||||
return new RotationIndicatorParticle(worldIn, x, y, z, data.color, data.radius1, data.radius2, data.speed,
|
return new RotationIndicatorParticle(worldIn, x, y, z, data.color, data.radius1, data.radius2, data.speed,
|
||||||
data.getAxis(), data.lifeSpan, visible, this.spriteSet);
|
data.getAxis(), data.lifeSpan, visible, this.spriteSet);
|
||||||
}
|
}
|
||||||
|
|
|
@ -187,6 +187,11 @@ public class SchematicWorld extends WrappedWorld {
|
||||||
renderedTileEntities.remove(tileEntity);
|
renderedTileEntities.remove(tileEntity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TileEntity tileEntity = getTileEntity(pos);
|
||||||
|
if (tileEntity != null)
|
||||||
|
tileEntities.put(pos, tileEntity);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,9 +26,9 @@ import com.simibubi.create.content.logistics.block.mechanicalArm.ArmInteractionP
|
||||||
import com.simibubi.create.foundation.config.AllConfigs;
|
import com.simibubi.create.foundation.config.AllConfigs;
|
||||||
import com.simibubi.create.foundation.gui.ScreenOpener;
|
import com.simibubi.create.foundation.gui.ScreenOpener;
|
||||||
import com.simibubi.create.foundation.item.TooltipHelper;
|
import com.simibubi.create.foundation.item.TooltipHelper;
|
||||||
import com.simibubi.create.foundation.metadoc.MetaDocTooltipHandler;
|
|
||||||
import com.simibubi.create.foundation.networking.AllPackets;
|
import com.simibubi.create.foundation.networking.AllPackets;
|
||||||
import com.simibubi.create.foundation.networking.LeftClickPacket;
|
import com.simibubi.create.foundation.networking.LeftClickPacket;
|
||||||
|
import com.simibubi.create.foundation.ponder.PonderTooltipHandler;
|
||||||
import com.simibubi.create.foundation.renderState.SuperRenderTypeBuffer;
|
import com.simibubi.create.foundation.renderState.SuperRenderTypeBuffer;
|
||||||
import com.simibubi.create.foundation.tileEntity.behaviour.edgeInteraction.EdgeInteractionRenderer;
|
import com.simibubi.create.foundation.tileEntity.behaviour.edgeInteraction.EdgeInteractionRenderer;
|
||||||
import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringRenderer;
|
import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringRenderer;
|
||||||
|
@ -88,7 +88,7 @@ public class ClientEvents {
|
||||||
CapabilityMinecartController.tick(world);
|
CapabilityMinecartController.tick(world);
|
||||||
CouplingPhysics.tick(world);
|
CouplingPhysics.tick(world);
|
||||||
|
|
||||||
MetaDocTooltipHandler.tick();
|
PonderTooltipHandler.tick();
|
||||||
ScreenOpener.tick();
|
ScreenOpener.tick();
|
||||||
ServerSpeedProvider.clientTick();
|
ServerSpeedProvider.clientTick();
|
||||||
BeltConnectorHandler.tick();
|
BeltConnectorHandler.tick();
|
||||||
|
@ -150,7 +150,7 @@ public class ClientEvents {
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public static void getItemTooltipColor(RenderTooltipEvent.Color event) {
|
public static void getItemTooltipColor(RenderTooltipEvent.Color event) {
|
||||||
MetaDocTooltipHandler.handleTooltipColor(event);
|
PonderTooltipHandler.handleTooltipColor(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
|
@ -175,7 +175,7 @@ public class ClientEvents {
|
||||||
itemTooltip.addAll(0, toolTip);
|
itemTooltip.addAll(0, toolTip);
|
||||||
}
|
}
|
||||||
|
|
||||||
MetaDocTooltipHandler.addToTooltip(event.getToolTip(), stack);
|
PonderTooltipHandler.addToTooltip(event.getToolTip(), stack);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
|
|
|
@ -3,7 +3,7 @@ package com.simibubi.create.foundation.data;
|
||||||
import com.google.common.base.Supplier;
|
import com.google.common.base.Supplier;
|
||||||
import com.google.gson.JsonElement;
|
import com.google.gson.JsonElement;
|
||||||
import com.simibubi.create.Create;
|
import com.simibubi.create.Create;
|
||||||
import com.simibubi.create.foundation.metadoc.MetaDocs;
|
import com.simibubi.create.foundation.ponder.PonderRegistry;
|
||||||
import com.simibubi.create.foundation.utility.FilesHelper;
|
import com.simibubi.create.foundation.utility.FilesHelper;
|
||||||
import com.simibubi.create.foundation.utility.Lang;
|
import com.simibubi.create.foundation.utility.Lang;
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ public enum AllLangPartials {
|
||||||
ADVANCEMENTS("Advancements"),
|
ADVANCEMENTS("Advancements"),
|
||||||
MESSAGES("UI & Messages"),
|
MESSAGES("UI & Messages"),
|
||||||
TOOLTIPS("Item Descriptions"),
|
TOOLTIPS("Item Descriptions"),
|
||||||
METADOC("MetaDoc Text", MetaDocs::provideLangEntries),
|
METADOC("MetaDoc Text", PonderRegistry::provideLangEntries),
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
|
@ -115,7 +115,11 @@ public class AllIcons {
|
||||||
I_FOLLOW_DIAGONAL = next(),
|
I_FOLLOW_DIAGONAL = next(),
|
||||||
I_FOLLOW_MATERIAL = next(),
|
I_FOLLOW_MATERIAL = next(),
|
||||||
|
|
||||||
I_SCHEMATIC = newRow();
|
I_SCHEMATIC = newRow(),
|
||||||
|
|
||||||
|
I_MTD_LEFT = newRow(),
|
||||||
|
I_MTD_CLOSE = next(),
|
||||||
|
I_MTD_RIGHT = next();
|
||||||
|
|
||||||
public AllIcons(int x, int y) {
|
public AllIcons(int x, int y) {
|
||||||
iconX = x * 16;
|
iconX = x * 16;
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
package com.simibubi.create.foundation.metadoc;
|
|
||||||
|
|
||||||
public abstract class MetaDocInstruction {
|
|
||||||
|
|
||||||
public boolean isBlocking() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void reset(MetaDocScene scene) {}
|
|
||||||
|
|
||||||
public abstract boolean isComplete();
|
|
||||||
|
|
||||||
public abstract void tick(MetaDocScene scene);
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,330 +0,0 @@
|
||||||
package com.simibubi.create.foundation.metadoc;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.function.Consumer;
|
|
||||||
import java.util.function.Supplier;
|
|
||||||
import java.util.function.UnaryOperator;
|
|
||||||
|
|
||||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
|
||||||
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
|
||||||
import com.simibubi.create.content.logistics.block.funnel.FunnelTileEntity;
|
|
||||||
import com.simibubi.create.foundation.metadoc.elements.MetaDocOverlayElement;
|
|
||||||
import com.simibubi.create.foundation.metadoc.elements.MetaDocSceneElement;
|
|
||||||
import com.simibubi.create.foundation.metadoc.elements.ParrotElement;
|
|
||||||
import com.simibubi.create.foundation.metadoc.elements.WorldSectionElement;
|
|
||||||
import com.simibubi.create.foundation.metadoc.instructions.CreateParrotInstruction;
|
|
||||||
import com.simibubi.create.foundation.metadoc.instructions.DelayInstruction;
|
|
||||||
import com.simibubi.create.foundation.metadoc.instructions.DisplayWorldSectionInstruction;
|
|
||||||
import com.simibubi.create.foundation.metadoc.instructions.HideAllInstruction;
|
|
||||||
import com.simibubi.create.foundation.metadoc.instructions.ReplaceBlocksInstruction;
|
|
||||||
import com.simibubi.create.foundation.metadoc.instructions.RotateSceneInstruction;
|
|
||||||
import com.simibubi.create.foundation.metadoc.instructions.ShowCompleteSchematicInstruction;
|
|
||||||
import com.simibubi.create.foundation.metadoc.instructions.TextWindowInstruction;
|
|
||||||
import com.simibubi.create.foundation.metadoc.instructions.TileEntityDataInstruction;
|
|
||||||
import com.simibubi.create.foundation.utility.LerpedFloat;
|
|
||||||
import com.simibubi.create.foundation.utility.MatrixStacker;
|
|
||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
|
||||||
import net.minecraft.client.Minecraft;
|
|
||||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
|
||||||
import net.minecraft.client.renderer.Matrix4f;
|
|
||||||
import net.minecraft.client.renderer.Vector4f;
|
|
||||||
import net.minecraft.util.Direction;
|
|
||||||
import net.minecraft.util.ResourceLocation;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
|
||||||
import net.minecraft.util.math.MutableBoundingBox;
|
|
||||||
import net.minecraft.util.math.Vec2f;
|
|
||||||
import net.minecraft.util.math.Vec3d;
|
|
||||||
import net.minecraft.util.math.Vec3i;
|
|
||||||
|
|
||||||
public class MetaDocScene {
|
|
||||||
|
|
||||||
List<MetaDocInstruction> schedule, activeSchedule;
|
|
||||||
Set<MetaDocElement> elements;
|
|
||||||
MetaDocWorld world;
|
|
||||||
ResourceLocation component;
|
|
||||||
int sceneIndex;
|
|
||||||
SceneTransform transform;
|
|
||||||
|
|
||||||
public MetaDocScene(MetaDocWorld world, ResourceLocation component, int sceneIndex) {
|
|
||||||
this.world = world;
|
|
||||||
this.component = component;
|
|
||||||
this.sceneIndex = sceneIndex;
|
|
||||||
elements = new HashSet<>();
|
|
||||||
schedule = new ArrayList<>();
|
|
||||||
activeSchedule = new ArrayList<>();
|
|
||||||
transform = new SceneTransform();
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTitle() {
|
|
||||||
return getString("title");
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getString(String key) {
|
|
||||||
return MetaDocLocalization.getSpecific(component, sceneIndex, key);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void reset() {
|
|
||||||
activeSchedule.clear();
|
|
||||||
schedule.forEach(mdi -> mdi.reset(this));
|
|
||||||
}
|
|
||||||
|
|
||||||
public void begin() {
|
|
||||||
reset();
|
|
||||||
world.restore();
|
|
||||||
transform = new SceneTransform();
|
|
||||||
forEach(WorldSectionElement.class, wse -> wse.queueRedraw(world));
|
|
||||||
elements.clear();
|
|
||||||
activeSchedule.addAll(schedule);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void fadeOut() {
|
|
||||||
reset();
|
|
||||||
activeSchedule.add(new HideAllInstruction(10, null));
|
|
||||||
}
|
|
||||||
|
|
||||||
public void renderScene(IRenderTypeBuffer buffer, MatrixStack ms) {
|
|
||||||
ms.push();
|
|
||||||
forEach(MetaDocSceneElement.class, e -> {
|
|
||||||
if (e.isVisible())
|
|
||||||
e.render(world, buffer, ms);
|
|
||||||
});
|
|
||||||
ms.pop();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void renderOverlay(MetaDocScreen screen, MatrixStack ms, float partialTicks) {
|
|
||||||
ms.push();
|
|
||||||
forEach(MetaDocOverlayElement.class, e -> {
|
|
||||||
if (e.isVisible())
|
|
||||||
e.render(this, screen, ms, partialTicks);
|
|
||||||
});
|
|
||||||
ms.pop();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void tick() {
|
|
||||||
transform.tick();
|
|
||||||
forEach(MetaDocElement::tick);
|
|
||||||
for (Iterator<MetaDocInstruction> iterator = activeSchedule.iterator(); iterator.hasNext();) {
|
|
||||||
MetaDocInstruction metaDocInstruction = iterator.next();
|
|
||||||
metaDocInstruction.tick(this);
|
|
||||||
if (metaDocInstruction.isComplete()) {
|
|
||||||
iterator.remove();
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (metaDocInstruction.isBlocking())
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void addElement(MetaDocElement e) {
|
|
||||||
elements.add(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
public MetaDocWorld getWorld() {
|
|
||||||
return world;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Set<MetaDocElement> getElements() {
|
|
||||||
return elements;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void forEach(Consumer<? super MetaDocElement> function) {
|
|
||||||
for (MetaDocElement metaDocElement : elements)
|
|
||||||
function.accept(metaDocElement);
|
|
||||||
}
|
|
||||||
|
|
||||||
public <T extends MetaDocElement> void forEach(Class<T> type, Consumer<T> function) {
|
|
||||||
for (MetaDocElement metaDocElement : elements)
|
|
||||||
if (type.isInstance(metaDocElement))
|
|
||||||
function.accept(type.cast(metaDocElement));
|
|
||||||
}
|
|
||||||
|
|
||||||
public MutableBoundingBox getBounds() {
|
|
||||||
return world == null ? new MutableBoundingBox() : world.getBounds();
|
|
||||||
}
|
|
||||||
|
|
||||||
public SceneBuilder builder() {
|
|
||||||
return new SceneBuilder();
|
|
||||||
}
|
|
||||||
|
|
||||||
private Supplier<String> textGetter(String key) {
|
|
||||||
return () -> MetaDocLocalization.getSpecific(component, sceneIndex, key);
|
|
||||||
}
|
|
||||||
|
|
||||||
public SceneTransform getTransform() {
|
|
||||||
return transform;
|
|
||||||
}
|
|
||||||
|
|
||||||
public class SceneTransform {
|
|
||||||
|
|
||||||
public LerpedFloat xRotation, yRotation;
|
|
||||||
|
|
||||||
// Screen params
|
|
||||||
int width, height;
|
|
||||||
double offset;
|
|
||||||
Matrix4f cachedMat;
|
|
||||||
|
|
||||||
public SceneTransform() {
|
|
||||||
xRotation = LerpedFloat.angular()
|
|
||||||
.startWithValue(-35);
|
|
||||||
yRotation = LerpedFloat.angular()
|
|
||||||
.startWithValue(55);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void tick() {
|
|
||||||
xRotation.tickChaser();
|
|
||||||
yRotation.tickChaser();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void updateScreenParams(int width, int height, double offset) {
|
|
||||||
this.width = width;
|
|
||||||
this.height = height;
|
|
||||||
this.offset = offset;
|
|
||||||
cachedMat = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MatrixStack apply(MatrixStack ms) {
|
|
||||||
float pt = Minecraft.getInstance()
|
|
||||||
.getRenderPartialTicks();
|
|
||||||
ms.translate(width / 2, height / 2, 200);
|
|
||||||
|
|
||||||
MatrixStacker.of(ms)
|
|
||||||
.rotateX(-35)
|
|
||||||
.rotateY(55);
|
|
||||||
ms.translate(offset, 0, 0);
|
|
||||||
MatrixStacker.of(ms)
|
|
||||||
.rotateY(-55)
|
|
||||||
.rotateX(35);
|
|
||||||
|
|
||||||
MatrixStacker.of(ms)
|
|
||||||
.rotateX(xRotation.getValue(pt))
|
|
||||||
.rotateY(yRotation.getValue(pt));
|
|
||||||
ms.scale(30, -30, 30);
|
|
||||||
|
|
||||||
MutableBoundingBox bounds = getBounds();
|
|
||||||
ms.translate(bounds.getXSize() / -2f, -.5f, bounds.getZSize() / -2f);
|
|
||||||
|
|
||||||
return ms;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Vec3d screenToScene(float x, float y) {
|
|
||||||
refreshMatrix();
|
|
||||||
Vector4f vec = new Vector4f(x, y, 0, 1);
|
|
||||||
cachedMat.invert();
|
|
||||||
vec.transform(cachedMat);
|
|
||||||
cachedMat.invert();
|
|
||||||
MutableBoundingBox bounds = getBounds();
|
|
||||||
return new Vec3d(vec.getX() + bounds.getXSize() / -2f, vec.getY(), vec.getZ() + bounds.getZSize() / -2f);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Vec2f sceneToScreen(Vec3d vec) {
|
|
||||||
refreshMatrix();
|
|
||||||
Vector4f vec4 = new Vector4f((float) vec.x, (float) vec.y, (float) vec.z, 1);
|
|
||||||
vec4.transform(cachedMat);
|
|
||||||
return new Vec2f(vec4.getX(), vec4.getY());
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void refreshMatrix() {
|
|
||||||
if (cachedMat != null)
|
|
||||||
return;
|
|
||||||
MatrixStack ms = apply(new MatrixStack());
|
|
||||||
// MatrixStacker.of(ms)
|
|
||||||
// .rotateY(180);
|
|
||||||
cachedMat = ms.peek()
|
|
||||||
.getModel();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public class SceneBuilder {
|
|
||||||
|
|
||||||
public SceneBuilder showBasePlate() {
|
|
||||||
Vec3i length = getBounds().getLength();
|
|
||||||
return showSection(Select.cuboid(BlockPos.ZERO, new Vec3i(length.getX(), 0, length.getZ())), Direction.UP);
|
|
||||||
}
|
|
||||||
|
|
||||||
public SceneBuilder showText(Vec3d position, String key, String defaultText, int fadeTime, int duration) {
|
|
||||||
MetaDocLocalization.registerSpecific(component, sceneIndex, key, defaultText);
|
|
||||||
return addInstruction(new TextWindowInstruction(textGetter(key), fadeTime, duration, position));
|
|
||||||
}
|
|
||||||
|
|
||||||
public SceneBuilder showSection(Select selection, Direction fadeInDirection) {
|
|
||||||
return addInstruction(
|
|
||||||
new DisplayWorldSectionInstruction(15, fadeInDirection, new WorldSectionElement(selection)));
|
|
||||||
}
|
|
||||||
|
|
||||||
public SceneBuilder debugSchematic() {
|
|
||||||
return addInstruction(new ShowCompleteSchematicInstruction());
|
|
||||||
}
|
|
||||||
|
|
||||||
public SceneBuilder idle(int ticks) {
|
|
||||||
return addInstruction(new DelayInstruction(ticks));
|
|
||||||
}
|
|
||||||
|
|
||||||
public SceneBuilder idleSeconds(int seconds) {
|
|
||||||
return idle(seconds * 20);
|
|
||||||
}
|
|
||||||
|
|
||||||
public SceneBuilder rotateCameraY(float degrees) {
|
|
||||||
return addInstruction(new RotateSceneInstruction(0, degrees, true));
|
|
||||||
}
|
|
||||||
|
|
||||||
public SceneBuilder setBlocks(Select selection, BlockState state) {
|
|
||||||
return addInstruction(new ReplaceBlocksInstruction(selection, state, true));
|
|
||||||
}
|
|
||||||
|
|
||||||
public SceneBuilder replaceBlocks(Select selection, BlockState state) {
|
|
||||||
return addInstruction(new ReplaceBlocksInstruction(selection, state, false));
|
|
||||||
}
|
|
||||||
|
|
||||||
public SceneBuilder setKineticSpeed(Select selection, float speed) {
|
|
||||||
return modifyKineticSpeed(selection, f -> speed);
|
|
||||||
}
|
|
||||||
|
|
||||||
public SceneBuilder multiplyKineticSpeed(Select selection, float modifier) {
|
|
||||||
return modifyKineticSpeed(selection, f -> f * modifier);
|
|
||||||
}
|
|
||||||
|
|
||||||
public SceneBuilder modifyKineticSpeed(Select selection, UnaryOperator<Float> speedFunc) {
|
|
||||||
return addInstruction(new TileEntityDataInstruction(selection, KineticTileEntity.class, nbt -> {
|
|
||||||
if (!nbt.contains("Speed"))
|
|
||||||
return nbt;
|
|
||||||
nbt.putFloat("Speed", speedFunc.apply(nbt.getFloat("Speed")));
|
|
||||||
return nbt;
|
|
||||||
}, false));
|
|
||||||
}
|
|
||||||
|
|
||||||
public SceneBuilder flapFunnels(Select selection, boolean outward) {
|
|
||||||
return addInstruction(new TileEntityDataInstruction(selection, FunnelTileEntity.class, nbt -> {
|
|
||||||
nbt.putInt("Flap", outward ? -1 : 1);
|
|
||||||
return nbt;
|
|
||||||
}, false));
|
|
||||||
}
|
|
||||||
|
|
||||||
public SceneBuilder createParrotOn(BlockPos pos, Direction fadeInDirection) {
|
|
||||||
return addInstruction(
|
|
||||||
new CreateParrotInstruction(15, fadeInDirection, new ParrotElement(new Vec3d(pos).add(.5, 0, .5))));
|
|
||||||
}
|
|
||||||
|
|
||||||
public SceneBuilder createParrot(Vec3d location, Direction fadeInDirection) {
|
|
||||||
return addInstruction(new CreateParrotInstruction(15, fadeInDirection, new ParrotElement(location)));
|
|
||||||
}
|
|
||||||
|
|
||||||
public SceneBuilder addInstruction(MetaDocInstruction instruction) {
|
|
||||||
schedule.add(instruction);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
|
|
||||||
public Select everywhere() {
|
|
||||||
return Select.cuboid(BlockPos.ZERO, getBounds().getLength());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,15 +0,0 @@
|
||||||
package com.simibubi.create.foundation.metadoc;
|
|
||||||
|
|
||||||
import com.simibubi.create.foundation.metadoc.MetaDocScene.SceneBuilder;
|
|
||||||
|
|
||||||
import net.minecraft.util.math.Vec3i;
|
|
||||||
|
|
||||||
public abstract class MetaDocStoryBoard {
|
|
||||||
|
|
||||||
public abstract String getSchematicName();
|
|
||||||
|
|
||||||
public abstract String getStoryTitle();
|
|
||||||
|
|
||||||
public abstract void program(SceneBuilder scene, Vec3i worldSize);
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,78 +0,0 @@
|
||||||
package com.simibubi.create.foundation.metadoc;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import com.simibubi.create.content.schematics.SchematicWorld;
|
|
||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
|
||||||
import net.minecraft.block.Blocks;
|
|
||||||
import net.minecraft.nbt.CompoundNBT;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
|
||||||
import net.minecraft.world.LightType;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
public class MetaDocWorld extends SchematicWorld {
|
|
||||||
|
|
||||||
protected Map<BlockPos, BlockState> originalBlocks;
|
|
||||||
protected Map<BlockPos, TileEntity> originalTileEntities;
|
|
||||||
|
|
||||||
int overrideLight;
|
|
||||||
Select mask;
|
|
||||||
|
|
||||||
public MetaDocWorld(BlockPos anchor, World original) {
|
|
||||||
super(anchor, original);
|
|
||||||
originalBlocks = new HashMap<>();
|
|
||||||
originalTileEntities = new HashMap<>();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void createBackup() {
|
|
||||||
originalBlocks.clear();
|
|
||||||
originalTileEntities.clear();
|
|
||||||
blocks.forEach((k, v) -> originalBlocks.put(k, v));
|
|
||||||
tileEntities.forEach((k, v) -> originalTileEntities.put(k, TileEntity.create(v.write(new CompoundNBT()))));
|
|
||||||
}
|
|
||||||
|
|
||||||
public void restore() {
|
|
||||||
blocks.clear();
|
|
||||||
tileEntities.clear();
|
|
||||||
renderedTileEntities.clear();
|
|
||||||
originalBlocks.forEach((k, v) -> blocks.put(k, v));
|
|
||||||
originalTileEntities.forEach((k, v) -> {
|
|
||||||
TileEntity te = TileEntity.create(v.write(new CompoundNBT()));
|
|
||||||
te.setLocation(this, te.getPos());
|
|
||||||
tileEntities.put(k, te);
|
|
||||||
renderedTileEntities.add(te);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public void pushFakeLight(int light) {
|
|
||||||
this.overrideLight = light;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void popLight() {
|
|
||||||
this.overrideLight = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getLightLevel(LightType p_226658_1_, BlockPos p_226658_2_) {
|
|
||||||
return overrideLight == -1 ? 15 : overrideLight;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMask(Select mask) {
|
|
||||||
this.mask = mask;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void clearMask() {
|
|
||||||
this.mask = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BlockState getBlockState(BlockPos globalPos) {
|
|
||||||
if (mask != null && !mask.test(globalPos.subtract(anchor)))
|
|
||||||
return Blocks.AIR.getDefaultState();
|
|
||||||
return super.getBlockState(globalPos);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,69 +0,0 @@
|
||||||
package com.simibubi.create.foundation.metadoc;
|
|
||||||
|
|
||||||
import java.util.function.Predicate;
|
|
||||||
import java.util.stream.Stream;
|
|
||||||
|
|
||||||
import com.simibubi.create.foundation.metadoc.elements.WorldSectionElement;
|
|
||||||
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
|
||||||
import net.minecraft.util.math.MutableBoundingBox;
|
|
||||||
import net.minecraft.util.math.Vec3i;
|
|
||||||
|
|
||||||
public abstract class Select implements Predicate<BlockPos> {
|
|
||||||
|
|
||||||
public static Select cuboid(BlockPos origin, Vec3i size) {
|
|
||||||
return new Cuboid(origin, size);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Select pos(int x, int y, int z) {
|
|
||||||
return new Cuboid(new BlockPos(x, y, z), BlockPos.ZERO);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Select everything(MetaDocScene scene) {
|
|
||||||
MutableBoundingBox bounds = scene.getBounds();
|
|
||||||
return cuboid(BlockPos.ZERO, bounds.getLength());
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
|
|
||||||
public WorldSectionElement asElement() {
|
|
||||||
return new WorldSectionElement(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public abstract int hashCode();
|
|
||||||
|
|
||||||
public abstract Stream<BlockPos> all();
|
|
||||||
|
|
||||||
private static class Cuboid extends Select {
|
|
||||||
|
|
||||||
MutableBoundingBox bb;
|
|
||||||
Vec3i origin;
|
|
||||||
Vec3i size;
|
|
||||||
|
|
||||||
public Cuboid(BlockPos origin, Vec3i size) {
|
|
||||||
bb = new MutableBoundingBox(origin, origin.add(size));
|
|
||||||
this.origin = origin;
|
|
||||||
this.size = size;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean test(BlockPos t) {
|
|
||||||
return bb.isVecInside(t);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Stream<BlockPos> all() {
|
|
||||||
return BlockPos.func_229383_a_(bb);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int hashCode() {
|
|
||||||
return origin.hashCode() ^ size.hashCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,51 +0,0 @@
|
||||||
package com.simibubi.create.foundation.metadoc.content;
|
|
||||||
|
|
||||||
import com.simibubi.create.foundation.metadoc.MetaDocScene.SceneBuilder;
|
|
||||||
import com.simibubi.create.foundation.metadoc.MetaDocStoryBoard;
|
|
||||||
import com.simibubi.create.foundation.metadoc.Select;
|
|
||||||
|
|
||||||
import net.minecraft.util.Direction;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
|
||||||
import net.minecraft.util.math.Vec3d;
|
|
||||||
import net.minecraft.util.math.Vec3i;
|
|
||||||
|
|
||||||
public class CogwheelStory extends MetaDocStoryBoard {
|
|
||||||
|
|
||||||
private int index;
|
|
||||||
|
|
||||||
public CogwheelStory(int index) {
|
|
||||||
this.index = index;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getSchematicName() {
|
|
||||||
return "cogwheel/s" + index;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getStoryTitle() {
|
|
||||||
return "My First Metadoc Story, Part " + index;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void program(SceneBuilder scene, Vec3i worldSize) {
|
|
||||||
scene.showBasePlate();
|
|
||||||
scene.idle(10);
|
|
||||||
|
|
||||||
scene.showSection(Select.cuboid(BlockPos.ZERO.up(), worldSize), Direction.DOWN);
|
|
||||||
scene.multiplyKineticSpeed(scene.everywhere(), 2);
|
|
||||||
scene.rotateCameraY(90);
|
|
||||||
scene.createParrotOn(new BlockPos(0.5, 2.5, 1.5), Direction.DOWN);
|
|
||||||
// scene.idle(10);
|
|
||||||
// scene.createParrotOn(new BlockPos(5, 1, 5), Direction.DOWN);
|
|
||||||
// scene.idle(10);
|
|
||||||
// scene.createParrotOn(new BlockPos(0, 1, 5), Direction.DOWN);
|
|
||||||
|
|
||||||
scene.idle(40);
|
|
||||||
scene.showText(new Vec3d(0.5, 2, 1.5), "swinging_text", "there's a parrot", 10, 50);
|
|
||||||
scene.idle(10);
|
|
||||||
scene.rotateCameraY(180);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,22 +0,0 @@
|
||||||
package com.simibubi.create.foundation.metadoc.content;
|
|
||||||
|
|
||||||
import com.simibubi.create.AllBlocks;
|
|
||||||
import com.simibubi.create.foundation.metadoc.MetaDocs;
|
|
||||||
|
|
||||||
public class MetaDocIndex {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* When true, lang files are bypassed and any text in metadoc can be hot-swapped
|
|
||||||
* without the need of runData
|
|
||||||
*/
|
|
||||||
public static final boolean EDITOR_MODE = true;
|
|
||||||
|
|
||||||
public static void register() {
|
|
||||||
// Register storyboards here (Requires re-launch)
|
|
||||||
|
|
||||||
for (int i = 1; i < 6; i++)
|
|
||||||
MetaDocs.addStoryBoard(AllBlocks.COGWHEEL, new CogwheelStory(i));
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,23 +0,0 @@
|
||||||
package com.simibubi.create.foundation.metadoc.content;
|
|
||||||
|
|
||||||
import com.simibubi.create.foundation.metadoc.MetaDocLocalization;
|
|
||||||
|
|
||||||
public class SharedText {
|
|
||||||
|
|
||||||
public static void gatherText() {
|
|
||||||
// Add entries used across several metadoc stories (Safe for hotswap)
|
|
||||||
|
|
||||||
add("when_wrenched", "When Wrenched");
|
|
||||||
add("more_shared", "This is Shared stuff");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String get(String key) {
|
|
||||||
return MetaDocLocalization.getShared(key);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void add(String k, String v) {
|
|
||||||
MetaDocLocalization.registerShared(k, v);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,29 +0,0 @@
|
||||||
package com.simibubi.create.foundation.metadoc.elements;
|
|
||||||
|
|
||||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
|
||||||
import com.simibubi.create.foundation.metadoc.MetaDocScene;
|
|
||||||
import com.simibubi.create.foundation.metadoc.MetaDocScreen;
|
|
||||||
import com.simibubi.create.foundation.utility.LerpedFloat;
|
|
||||||
|
|
||||||
public abstract class AnimatedOverlayElement extends MetaDocOverlayElement {
|
|
||||||
|
|
||||||
protected LerpedFloat fade;
|
|
||||||
|
|
||||||
public AnimatedOverlayElement() {
|
|
||||||
fade = LerpedFloat.linear()
|
|
||||||
.startWithValue(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFade(float fade) {
|
|
||||||
this.fade.setValue(fade);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public final void render(MetaDocScene scene, MetaDocScreen screen, MatrixStack ms, float partialTicks) {
|
|
||||||
float currentFade = fade.getValue(partialTicks);
|
|
||||||
render(scene, screen, ms, partialTicks, currentFade);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected abstract void render(MetaDocScene scene, MetaDocScreen screen, MatrixStack ms, float partialTicks, float fade);
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,53 +0,0 @@
|
||||||
package com.simibubi.create.foundation.metadoc.elements;
|
|
||||||
|
|
||||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
|
||||||
import com.simibubi.create.foundation.metadoc.MetaDocWorld;
|
|
||||||
import com.simibubi.create.foundation.utility.LerpedFloat;
|
|
||||||
import com.simibubi.create.foundation.utility.MatrixStacker;
|
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
|
||||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
|
||||||
import net.minecraft.util.math.Vec3d;
|
|
||||||
|
|
||||||
public abstract class AnimatedSceneElement extends MetaDocSceneElement {
|
|
||||||
|
|
||||||
protected Vec3d fadeVec;
|
|
||||||
protected LerpedFloat fade;
|
|
||||||
|
|
||||||
public AnimatedSceneElement() {
|
|
||||||
fade = LerpedFloat.linear()
|
|
||||||
.startWithValue(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFade(float fade) {
|
|
||||||
this.fade.setValue(fade);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFadeVec(Vec3d fadeVec) {
|
|
||||||
this.fadeVec = fadeVec;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public final void render(MetaDocWorld world, IRenderTypeBuffer buffer, MatrixStack ms) {
|
|
||||||
ms.push();
|
|
||||||
float currentFade = fade.getValue(Minecraft.getInstance()
|
|
||||||
.getRenderPartialTicks());
|
|
||||||
if (fadeVec != null)
|
|
||||||
MatrixStacker.of(ms)
|
|
||||||
.translate(fadeVec.scale(-1 + currentFade));
|
|
||||||
render(world, buffer, ms, currentFade);
|
|
||||||
ms.pop();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected abstract void render(MetaDocWorld world, IRenderTypeBuffer buffer, MatrixStack ms, float fade);
|
|
||||||
|
|
||||||
protected int lightCoordsFromFade(float fade) {
|
|
||||||
int light = 0xF000F0;
|
|
||||||
if (fade != 1) {
|
|
||||||
light = (int) (0xF * fade);
|
|
||||||
light = light << 4 | light << 20;
|
|
||||||
}
|
|
||||||
return light;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,14 +0,0 @@
|
||||||
package com.simibubi.create.foundation.metadoc.elements;
|
|
||||||
|
|
||||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
|
||||||
import com.simibubi.create.foundation.metadoc.MetaDocElement;
|
|
||||||
import com.simibubi.create.foundation.metadoc.MetaDocScene;
|
|
||||||
import com.simibubi.create.foundation.metadoc.MetaDocScreen;
|
|
||||||
|
|
||||||
public abstract class MetaDocOverlayElement extends MetaDocElement {
|
|
||||||
|
|
||||||
public void tick() {}
|
|
||||||
|
|
||||||
public abstract void render(MetaDocScene scene, MetaDocScreen screen, MatrixStack ms, float partialTicks);
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,13 +0,0 @@
|
||||||
package com.simibubi.create.foundation.metadoc.elements;
|
|
||||||
|
|
||||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
|
||||||
import com.simibubi.create.foundation.metadoc.MetaDocElement;
|
|
||||||
import com.simibubi.create.foundation.metadoc.MetaDocWorld;
|
|
||||||
|
|
||||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
|
||||||
|
|
||||||
public abstract class MetaDocSceneElement extends MetaDocElement {
|
|
||||||
|
|
||||||
public abstract void render(MetaDocWorld world, IRenderTypeBuffer buffer, MatrixStack ms);
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,72 +0,0 @@
|
||||||
package com.simibubi.create.foundation.metadoc.elements;
|
|
||||||
|
|
||||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
|
||||||
import com.mojang.blaze3d.systems.RenderSystem;
|
|
||||||
import com.simibubi.create.Create;
|
|
||||||
import com.simibubi.create.foundation.metadoc.MetaDocWorld;
|
|
||||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
|
||||||
import com.simibubi.create.foundation.utility.MatrixStacker;
|
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
|
||||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
|
||||||
import net.minecraft.client.renderer.RenderHelper;
|
|
||||||
import net.minecraft.client.renderer.entity.EntityRendererManager;
|
|
||||||
import net.minecraft.entity.EntityType;
|
|
||||||
import net.minecraft.entity.passive.ParrotEntity;
|
|
||||||
import net.minecraft.util.math.MathHelper;
|
|
||||||
import net.minecraft.util.math.Vec3d;
|
|
||||||
|
|
||||||
public class ParrotElement extends AnimatedSceneElement {
|
|
||||||
|
|
||||||
private Vec3d location;
|
|
||||||
private ParrotEntity entity;
|
|
||||||
|
|
||||||
public ParrotElement(Vec3d location) {
|
|
||||||
this.location = location;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void tick() {
|
|
||||||
super.tick();
|
|
||||||
if (entity == null)
|
|
||||||
return;
|
|
||||||
entity.ticksExisted++;
|
|
||||||
|
|
||||||
// entity.prevRotationYawHead = entity.rotationYawHead;
|
|
||||||
entity.oFlapSpeed = entity.flapSpeed;
|
|
||||||
entity.oFlap = entity.flap;
|
|
||||||
entity.onGround = true;
|
|
||||||
|
|
||||||
// entity.rotationYawHead++;
|
|
||||||
entity.flapSpeed = .5f;
|
|
||||||
entity.flap = 1;
|
|
||||||
// entity.flap += entity.flapSpeed;
|
|
||||||
// entity.flap += .5f + Create.random.nextFloat();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void render(MetaDocWorld world, IRenderTypeBuffer buffer, MatrixStack ms, float fade) {
|
|
||||||
EntityRendererManager entityrenderermanager = Minecraft.getInstance()
|
|
||||||
.getRenderManager();
|
|
||||||
float pt = Minecraft.getInstance()
|
|
||||||
.getRenderPartialTicks();
|
|
||||||
|
|
||||||
if (entity == null) {
|
|
||||||
entity = new ParrotEntity(EntityType.PARROT, world);
|
|
||||||
entity.setVariant(Create.random.nextInt(5));
|
|
||||||
// entity.setPartying(BlockPos.ZERO, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
ms.push();
|
|
||||||
ms.translate(location.x, location.y, location.z);
|
|
||||||
|
|
||||||
MatrixStacker.of(ms)
|
|
||||||
.rotateY(AnimationTickHolder.getRenderTick() * 15)
|
|
||||||
.rotateZ(30);
|
|
||||||
ms.translate(-.25f, 0, 0);
|
|
||||||
|
|
||||||
entityrenderermanager.render(entity, 0, 0, 0, 0, pt, ms, buffer, lightCoordsFromFade(fade));
|
|
||||||
ms.pop();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,69 +0,0 @@
|
||||||
package com.simibubi.create.foundation.metadoc.elements;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.function.Supplier;
|
|
||||||
|
|
||||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
|
||||||
import com.mojang.blaze3d.systems.RenderSystem;
|
|
||||||
import com.simibubi.create.foundation.metadoc.MetaDocScene;
|
|
||||||
import com.simibubi.create.foundation.metadoc.MetaDocScreen;
|
|
||||||
import com.simibubi.create.foundation.utility.ColorHelper;
|
|
||||||
|
|
||||||
import net.minecraft.util.math.Vec2f;
|
|
||||||
import net.minecraft.util.math.Vec3d;
|
|
||||||
import net.minecraftforge.fml.client.gui.GuiUtils;
|
|
||||||
|
|
||||||
public class TextWindowElement extends AnimatedOverlayElement {
|
|
||||||
|
|
||||||
Supplier<String> textGetter;
|
|
||||||
String bakedText;
|
|
||||||
Vec3d vec;
|
|
||||||
|
|
||||||
public TextWindowElement(Supplier<String> textGetter) {
|
|
||||||
this.textGetter = textGetter;
|
|
||||||
}
|
|
||||||
|
|
||||||
public TextWindowElement moveTo(Vec3d vec) {
|
|
||||||
this.vec = vec;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void render(MetaDocScene scene, MetaDocScreen screen, MatrixStack ms, float partialTicks, float fade) {
|
|
||||||
if (bakedText == null)
|
|
||||||
bakedText = textGetter.get();
|
|
||||||
if (fade < 1 / 16f)
|
|
||||||
return;
|
|
||||||
Vec2f sceneToScreen = scene.getTransform()
|
|
||||||
.sceneToScreen(vec);
|
|
||||||
int targetX = screen.width * 6 / 8;
|
|
||||||
int textWidth = screen.width - targetX;
|
|
||||||
|
|
||||||
List<String> list = screen.getFontRenderer()
|
|
||||||
.listFormattedStringToWidth(bakedText, textWidth);
|
|
||||||
int boxWidth = 0;
|
|
||||||
for (String string : list)
|
|
||||||
boxWidth = Math.max(boxWidth, screen.getFontRenderer()
|
|
||||||
.getStringWidth(string));
|
|
||||||
int boxHeight = screen.getFontRenderer()
|
|
||||||
.getWordWrappedHeight(bakedText, textWidth);
|
|
||||||
|
|
||||||
RenderSystem.pushMatrix();
|
|
||||||
RenderSystem.translatef(0, sceneToScreen.y, 400);
|
|
||||||
|
|
||||||
screen.renderBox(targetX - 10, 3, boxWidth, boxHeight -1 , 0x55000000, 0x30eebb00, 0x10eebb00);
|
|
||||||
|
|
||||||
RenderSystem.pushMatrix();
|
|
||||||
RenderSystem.translatef(sceneToScreen.x, 0, 0);
|
|
||||||
double lineTarget = (targetX - sceneToScreen.x) * fade;
|
|
||||||
RenderSystem.scaled(lineTarget, 1, 1);
|
|
||||||
GuiUtils.drawGradientRect(-100, 0, 0, 1, 1, 0xFFFFFFFF, 0xFFFFFFFF);
|
|
||||||
GuiUtils.drawGradientRect(-100, 0, 1, 1, 2, 0xFF494949, 0xFF393939);
|
|
||||||
RenderSystem.popMatrix();
|
|
||||||
|
|
||||||
screen.getFontRenderer()
|
|
||||||
.drawSplitString(bakedText, targetX - 10, 3, textWidth, ColorHelper.applyAlpha(0xeeeeee, fade));
|
|
||||||
RenderSystem.popMatrix();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,20 +0,0 @@
|
||||||
package com.simibubi.create.foundation.metadoc.instructions;
|
|
||||||
|
|
||||||
import com.simibubi.create.foundation.metadoc.MetaDocInstruction;
|
|
||||||
import com.simibubi.create.foundation.metadoc.MetaDocScene;
|
|
||||||
import com.simibubi.create.foundation.metadoc.Select;
|
|
||||||
|
|
||||||
public class ShowCompleteSchematicInstruction extends MetaDocInstruction {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void tick(MetaDocScene scene) {
|
|
||||||
scene.addElement(Select.everything(scene)
|
|
||||||
.asElement());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isComplete() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,52 +0,0 @@
|
||||||
package com.simibubi.create.foundation.metadoc.instructions;
|
|
||||||
|
|
||||||
import java.util.function.Supplier;
|
|
||||||
|
|
||||||
import com.simibubi.create.foundation.metadoc.MetaDocScene;
|
|
||||||
import com.simibubi.create.foundation.metadoc.elements.TextWindowElement;
|
|
||||||
|
|
||||||
import net.minecraft.util.math.Vec3d;
|
|
||||||
|
|
||||||
public class TextWindowInstruction extends TickingInstruction {
|
|
||||||
|
|
||||||
private TextWindowElement element;
|
|
||||||
private int fadeTime;
|
|
||||||
|
|
||||||
public TextWindowInstruction(Supplier<String> text, int fadeTime, int duration, Vec3d position) {
|
|
||||||
super(false, duration + 2 * fadeTime);
|
|
||||||
this.fadeTime = fadeTime;
|
|
||||||
element = new TextWindowElement(text).moveTo(position);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void firstTick(MetaDocScene scene) {
|
|
||||||
super.firstTick(scene);
|
|
||||||
scene.addElement(element);
|
|
||||||
element.setVisible(true);
|
|
||||||
element.setFade(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void tick(MetaDocScene scene) {
|
|
||||||
super.tick(scene);
|
|
||||||
int elapsed = totalTicks - remainingTicks;
|
|
||||||
|
|
||||||
if (elapsed < fadeTime) {
|
|
||||||
float fade = (elapsed / (float) fadeTime);
|
|
||||||
element.setFade(fade * fade);
|
|
||||||
|
|
||||||
} else if (remainingTicks < fadeTime) {
|
|
||||||
float fade = (remainingTicks / (float) fadeTime);
|
|
||||||
element.setFade(fade * fade);
|
|
||||||
|
|
||||||
} else
|
|
||||||
element.setFade(1);
|
|
||||||
|
|
||||||
if (remainingTicks == 0) {
|
|
||||||
element.setFade(0);
|
|
||||||
element.setFade(0);
|
|
||||||
element.setVisible(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,32 +0,0 @@
|
||||||
package com.simibubi.create.foundation.metadoc.instructions;
|
|
||||||
|
|
||||||
import com.simibubi.create.foundation.metadoc.MetaDocInstruction;
|
|
||||||
import com.simibubi.create.foundation.metadoc.MetaDocScene;
|
|
||||||
import com.simibubi.create.foundation.metadoc.Select;
|
|
||||||
import com.simibubi.create.foundation.metadoc.elements.WorldSectionElement;
|
|
||||||
|
|
||||||
public abstract class WorldModifyInstruction extends MetaDocInstruction {
|
|
||||||
|
|
||||||
private Select selection;
|
|
||||||
|
|
||||||
public WorldModifyInstruction(Select selection) {
|
|
||||||
this.selection = selection;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isComplete() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void tick(MetaDocScene scene) {
|
|
||||||
runModification(selection, scene);
|
|
||||||
if (needsRedraw())
|
|
||||||
scene.forEach(WorldSectionElement.class, wse -> wse.queueRedraw(scene.getWorld()));
|
|
||||||
}
|
|
||||||
|
|
||||||
protected abstract void runModification(Select selection, MetaDocScene scene);
|
|
||||||
|
|
||||||
protected abstract boolean needsRedraw();
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,10 +1,10 @@
|
||||||
package com.simibubi.create.foundation.metadoc;
|
package com.simibubi.create.foundation.ponder;
|
||||||
|
|
||||||
public class MetaDocElement {
|
public class PonderElement {
|
||||||
|
|
||||||
boolean visible = true;
|
boolean visible = true;
|
||||||
|
|
||||||
public void tick() {}
|
public void tick(PonderScene scene) {}
|
||||||
|
|
||||||
public boolean isVisible() {
|
public boolean isVisible() {
|
||||||
return visible;
|
return visible;
|
|
@ -0,0 +1,15 @@
|
||||||
|
package com.simibubi.create.foundation.ponder;
|
||||||
|
|
||||||
|
public abstract class PonderInstruction {
|
||||||
|
|
||||||
|
public boolean isBlocking() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void reset(PonderScene scene) {}
|
||||||
|
|
||||||
|
public abstract boolean isComplete();
|
||||||
|
|
||||||
|
public abstract void tick(PonderScene scene);
|
||||||
|
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package com.simibubi.create.foundation.metadoc;
|
package com.simibubi.create.foundation.ponder;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -6,12 +6,12 @@ import java.util.Map;
|
||||||
import com.google.gson.JsonElement;
|
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.metadoc.content.MetaDocIndex;
|
import com.simibubi.create.foundation.ponder.content.PonderIndex;
|
||||||
import com.simibubi.create.foundation.utility.Lang;
|
import com.simibubi.create.foundation.utility.Lang;
|
||||||
|
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
public class MetaDocLocalization {
|
public class PonderLocalization {
|
||||||
|
|
||||||
static Map<String, String> shared = new HashMap<>();
|
static Map<String, String> shared = new HashMap<>();
|
||||||
static Map<ResourceLocation, Map<Integer, Map<String, String>>> specific = new HashMap<>();
|
static Map<ResourceLocation, Map<Integer, Map<String, String>>> specific = new HashMap<>();
|
||||||
|
@ -31,13 +31,13 @@ public class MetaDocLocalization {
|
||||||
//
|
//
|
||||||
|
|
||||||
public static String getShared(String key) {
|
public static String getShared(String key) {
|
||||||
if (MetaDocIndex.EDITOR_MODE)
|
if (PonderIndex.EDITOR_MODE)
|
||||||
return shared.get(key);
|
return shared.get(key);
|
||||||
return Lang.translate(langKeyForShared(key));
|
return Lang.translate(langKeyForShared(key));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getSpecific(ResourceLocation component, int scene, String k) {
|
public static String getSpecific(ResourceLocation component, int scene, String k) {
|
||||||
if (MetaDocIndex.EDITOR_MODE)
|
if (PonderIndex.EDITOR_MODE)
|
||||||
return specific.get(component)
|
return specific.get(component)
|
||||||
.get(scene)
|
.get(scene)
|
||||||
.get(k);
|
.get(k);
|
||||||
|
@ -46,10 +46,14 @@ public class MetaDocLocalization {
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
||||||
static final String LANG_PREFIX = "metadoc.";
|
static final String LANG_PREFIX = "ponder.";
|
||||||
|
|
||||||
public static JsonElement record() {
|
public static JsonElement record() {
|
||||||
JsonObject object = new JsonObject();
|
JsonObject object = new JsonObject();
|
||||||
|
|
||||||
|
addGeneral(object, PonderTooltipHandler.HOLD_TO_PONDER, "Hold [%1$s] to Ponder");
|
||||||
|
addGeneral(object, PonderUI.PONDERING, "Pondering about...");
|
||||||
|
|
||||||
shared.forEach((k, v) -> object.addProperty(Create.ID + "." + langKeyForShared(k), v));
|
shared.forEach((k, v) -> object.addProperty(Create.ID + "." + langKeyForShared(k), v));
|
||||||
specific.forEach((rl, map) -> {
|
specific.forEach((rl, map) -> {
|
||||||
String component = rl.getPath();
|
String component = rl.getPath();
|
||||||
|
@ -63,6 +67,10 @@ public class MetaDocLocalization {
|
||||||
return object;
|
return object;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void addGeneral(JsonObject json, String key, String enUS) {
|
||||||
|
json.addProperty(Create.ID + "." + key, enUS);
|
||||||
|
}
|
||||||
|
|
||||||
protected static String langKeyForSpecific(String component, int scene, String k) {
|
protected static String langKeyForSpecific(String component, int scene, String k) {
|
||||||
return LANG_PREFIX + component + ".scene_" + scene + "." + k;
|
return LANG_PREFIX + component + ".scene_" + scene + "." + k;
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package com.simibubi.create.foundation.metadoc;
|
package com.simibubi.create.foundation.ponder;
|
||||||
|
|
||||||
import java.io.BufferedInputStream;
|
import java.io.BufferedInputStream;
|
||||||
import java.io.DataInputStream;
|
import java.io.DataInputStream;
|
||||||
|
@ -12,8 +12,9 @@ import java.util.zip.GZIPInputStream;
|
||||||
|
|
||||||
import com.google.gson.JsonElement;
|
import com.google.gson.JsonElement;
|
||||||
import com.simibubi.create.Create;
|
import com.simibubi.create.Create;
|
||||||
import com.simibubi.create.foundation.metadoc.content.MetaDocIndex;
|
import com.simibubi.create.foundation.ponder.PonderScene.SceneBuilder;
|
||||||
import com.simibubi.create.foundation.metadoc.content.SharedText;
|
import com.simibubi.create.foundation.ponder.content.PonderIndex;
|
||||||
|
import com.simibubi.create.foundation.ponder.content.SharedText;
|
||||||
import com.tterrag.registrate.util.entry.ItemProviderEntry;
|
import com.tterrag.registrate.util.entry.ItemProviderEntry;
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
|
@ -26,38 +27,38 @@ import net.minecraft.util.math.Vec3i;
|
||||||
import net.minecraft.world.gen.feature.template.PlacementSettings;
|
import net.minecraft.world.gen.feature.template.PlacementSettings;
|
||||||
import net.minecraft.world.gen.feature.template.Template;
|
import net.minecraft.world.gen.feature.template.Template;
|
||||||
|
|
||||||
public class MetaDocs {
|
public class PonderRegistry {
|
||||||
|
|
||||||
static Map<ResourceLocation, List<MetaDocStoryBoard>> all = new HashMap<>();
|
static Map<ResourceLocation, List<PonderStoryBoard>> all = new HashMap<>();
|
||||||
|
|
||||||
public static void addStoryBoard(ItemProviderEntry<?> component, MetaDocStoryBoard storyBoard) {
|
public static void addStoryBoard(ItemProviderEntry<?> component, PonderStoryBoard storyBoard) {
|
||||||
ResourceLocation id = component.getId();
|
ResourceLocation id = component.getId();
|
||||||
all.computeIfAbsent(id, $ -> new ArrayList<>())
|
all.computeIfAbsent(id, $ -> new ArrayList<>())
|
||||||
.add(storyBoard);
|
.add(storyBoard);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<MetaDocScene> compile(ResourceLocation id) {
|
public static List<PonderScene> compile(ResourceLocation id) {
|
||||||
|
|
||||||
if (MetaDocIndex.EDITOR_MODE) {
|
if (PonderIndex.EDITOR_MODE) {
|
||||||
MetaDocLocalization.shared.clear();
|
PonderLocalization.shared.clear();
|
||||||
MetaDocLocalization.specific.clear();
|
PonderLocalization.specific.clear();
|
||||||
SharedText.gatherText();
|
SharedText.gatherText();
|
||||||
}
|
}
|
||||||
|
|
||||||
List<MetaDocStoryBoard> list = all.get(id);
|
List<PonderStoryBoard> list = all.get(id);
|
||||||
List<MetaDocScene> scenes = new ArrayList<>();
|
List<PonderScene> scenes = new ArrayList<>();
|
||||||
for (int i = 0; i < list.size(); i++) {
|
for (int i = 0; i < list.size(); i++) {
|
||||||
|
|
||||||
MetaDocStoryBoard sb = list.get(i);
|
PonderStoryBoard sb = list.get(i);
|
||||||
Template activeTemplate = loadSchematic(sb.getSchematicName());
|
Template activeTemplate = loadSchematic(sb.getSchematicName());
|
||||||
MetaDocWorld world = new MetaDocWorld(BlockPos.ZERO, Minecraft.getInstance().world);
|
PonderWorld world = new PonderWorld(BlockPos.ZERO, Minecraft.getInstance().world);
|
||||||
activeTemplate.addBlocksToWorld(world, BlockPos.ZERO, new PlacementSettings());
|
activeTemplate.addBlocksToWorld(world, BlockPos.ZERO, new PlacementSettings());
|
||||||
world.createBackup();
|
world.createBackup();
|
||||||
|
|
||||||
MetaDocScene scene = new MetaDocScene(world, id, i);
|
PonderScene scene = new PonderScene(world, id, i);
|
||||||
MetaDocLocalization.registerSpecific(id, i, "title", sb.getStoryTitle());
|
PonderLocalization.registerSpecific(id, i, "title", sb.getStoryTitle());
|
||||||
sb.program(scene.builder(), world.getBounds()
|
SceneBuilder builder = scene.builder();
|
||||||
.getLength());
|
sb.program(builder, builder.getSceneBuildingUtil());
|
||||||
scene.begin();
|
scene.begin();
|
||||||
scenes.add(scene);
|
scenes.add(scene);
|
||||||
|
|
||||||
|
@ -68,33 +69,34 @@ public class MetaDocs {
|
||||||
|
|
||||||
public static Template loadSchematic(String path) {
|
public static Template loadSchematic(String path) {
|
||||||
Template t = new Template();
|
Template t = new Template();
|
||||||
String filepath = "doc/" + path + ".nbt";
|
String filepath = "ponder/" + path + ".nbt";
|
||||||
InputStream resourceAsStream = Create.class.getClassLoader()
|
InputStream resourceAsStream = Create.class.getClassLoader()
|
||||||
.getResourceAsStream(filepath);
|
.getResourceAsStream(filepath);
|
||||||
if (resourceAsStream == null)
|
if (resourceAsStream == null)
|
||||||
throw new IllegalStateException("Could not find metadoc schematic: " + filepath);
|
throw new IllegalStateException("Could not find ponder schematic: " + filepath);
|
||||||
try (DataInputStream stream =
|
try (DataInputStream stream =
|
||||||
new DataInputStream(new BufferedInputStream(new GZIPInputStream(resourceAsStream)))) {
|
new DataInputStream(new BufferedInputStream(new GZIPInputStream(resourceAsStream)))) {
|
||||||
CompoundNBT nbt = CompressedStreamTools.read(stream, new NBTSizeTracker(0x20000000L));
|
CompoundNBT nbt = CompressedStreamTools.read(stream, new NBTSizeTracker(0x20000000L));
|
||||||
t.read(nbt);
|
t.read(nbt);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Create.logger.warn("Failed to read metadoc schematic", e);
|
Create.logger.warn("Failed to read ponder schematic", e);
|
||||||
}
|
}
|
||||||
return t;
|
return t;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static JsonElement provideLangEntries() {
|
public static JsonElement provideLangEntries() {
|
||||||
MetaDocIndex.register();
|
PonderIndex.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++) {
|
||||||
MetaDocStoryBoard sb = list.get(i);
|
PonderStoryBoard sb = list.get(i);
|
||||||
MetaDocScene scene = new MetaDocScene(null, id, i);
|
PonderScene scene = new PonderScene(null, id, i);
|
||||||
MetaDocLocalization.registerSpecific(id, i, "title", sb.getStoryTitle());
|
PonderLocalization.registerSpecific(id, i, "title", sb.getStoryTitle());
|
||||||
sb.program(scene.builder(), Vec3i.NULL_VECTOR);
|
SceneBuilder builder = scene.builder();
|
||||||
|
sb.program(builder, builder.getSceneBuildingUtil());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return MetaDocLocalization.record();
|
return PonderLocalization.record();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -0,0 +1,462 @@
|
||||||
|
package com.simibubi.create.foundation.ponder;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.function.Consumer;
|
||||||
|
import java.util.function.Supplier;
|
||||||
|
import java.util.function.UnaryOperator;
|
||||||
|
|
||||||
|
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||||
|
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||||
|
import com.simibubi.create.content.contraptions.relays.gauge.SpeedGaugeTileEntity;
|
||||||
|
import com.simibubi.create.content.logistics.block.funnel.FunnelTileEntity;
|
||||||
|
import com.simibubi.create.foundation.ponder.content.PonderPalette;
|
||||||
|
import com.simibubi.create.foundation.ponder.elements.ParrotElement;
|
||||||
|
import com.simibubi.create.foundation.ponder.elements.PonderOverlayElement;
|
||||||
|
import com.simibubi.create.foundation.ponder.elements.PonderSceneElement;
|
||||||
|
import com.simibubi.create.foundation.ponder.elements.WorldSectionElement;
|
||||||
|
import com.simibubi.create.foundation.ponder.instructions.CreateParrotInstruction;
|
||||||
|
import com.simibubi.create.foundation.ponder.instructions.DelayInstruction;
|
||||||
|
import com.simibubi.create.foundation.ponder.instructions.DisplayWorldSectionInstruction;
|
||||||
|
import com.simibubi.create.foundation.ponder.instructions.HideAllInstruction;
|
||||||
|
import com.simibubi.create.foundation.ponder.instructions.MarkAsFinishedInstruction;
|
||||||
|
import com.simibubi.create.foundation.ponder.instructions.MovePoiInstruction;
|
||||||
|
import com.simibubi.create.foundation.ponder.instructions.ReplaceBlocksInstruction;
|
||||||
|
import com.simibubi.create.foundation.ponder.instructions.RotateSceneInstruction;
|
||||||
|
import com.simibubi.create.foundation.ponder.instructions.ShowCompleteSchematicInstruction;
|
||||||
|
import com.simibubi.create.foundation.ponder.instructions.TextInstruction;
|
||||||
|
import com.simibubi.create.foundation.ponder.instructions.TileEntityDataInstruction;
|
||||||
|
import com.simibubi.create.foundation.renderState.SuperRenderTypeBuffer;
|
||||||
|
import com.simibubi.create.foundation.utility.LerpedFloat;
|
||||||
|
import com.simibubi.create.foundation.utility.MatrixStacker;
|
||||||
|
import com.simibubi.create.foundation.utility.VecHelper;
|
||||||
|
import com.simibubi.create.foundation.utility.outliner.Outliner;
|
||||||
|
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.client.renderer.ActiveRenderInfo;
|
||||||
|
import net.minecraft.client.renderer.Matrix4f;
|
||||||
|
import net.minecraft.client.renderer.RenderType;
|
||||||
|
import net.minecraft.client.renderer.Vector4f;
|
||||||
|
import net.minecraft.util.Direction;
|
||||||
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.util.math.MutableBoundingBox;
|
||||||
|
import net.minecraft.util.math.Vec2f;
|
||||||
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
import net.minecraft.util.math.Vec3i;
|
||||||
|
|
||||||
|
public class PonderScene {
|
||||||
|
|
||||||
|
List<PonderInstruction> schedule, activeSchedule;
|
||||||
|
Set<PonderElement> elements;
|
||||||
|
PonderWorld world;
|
||||||
|
ResourceLocation component;
|
||||||
|
int sceneIndex;
|
||||||
|
SceneTransform transform;
|
||||||
|
public boolean finished;
|
||||||
|
SceneRenderInfo info;
|
||||||
|
Outliner outliner;
|
||||||
|
|
||||||
|
Vec3d pointOfInterest;
|
||||||
|
Vec3d chasingPointOfInterest;
|
||||||
|
|
||||||
|
private int offsetX;
|
||||||
|
private int offsetZ;
|
||||||
|
private int size;
|
||||||
|
|
||||||
|
public PonderScene(PonderWorld world, ResourceLocation component, int sceneIndex) {
|
||||||
|
pointOfInterest = Vec3d.ZERO;
|
||||||
|
|
||||||
|
this.world = world;
|
||||||
|
this.component = component;
|
||||||
|
this.sceneIndex = sceneIndex;
|
||||||
|
|
||||||
|
outliner = new Outliner();
|
||||||
|
elements = new HashSet<>();
|
||||||
|
schedule = new ArrayList<>();
|
||||||
|
activeSchedule = new ArrayList<>();
|
||||||
|
transform = new SceneTransform();
|
||||||
|
size = getBounds().getXSize();
|
||||||
|
info = new SceneRenderInfo();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return getString("title");
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getString(String key) {
|
||||||
|
return PonderLocalization.getSpecific(component, sceneIndex, key);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void reset() {
|
||||||
|
activeSchedule.clear();
|
||||||
|
schedule.forEach(mdi -> mdi.reset(this));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void begin() {
|
||||||
|
reset();
|
||||||
|
world.restore();
|
||||||
|
transform = new SceneTransform();
|
||||||
|
finished = false;
|
||||||
|
forEach(WorldSectionElement.class, wse -> wse.queueRedraw(world));
|
||||||
|
elements.clear();
|
||||||
|
activeSchedule.addAll(schedule);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void fadeOut() {
|
||||||
|
reset();
|
||||||
|
activeSchedule.add(new HideAllInstruction(10, null));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void renderScene(SuperRenderTypeBuffer buffer, MatrixStack ms) {
|
||||||
|
float pt = Minecraft.getInstance()
|
||||||
|
.getRenderPartialTicks();
|
||||||
|
|
||||||
|
ms.push();
|
||||||
|
forEachVisible(PonderSceneElement.class, e -> e.renderFirst(world, buffer, ms));
|
||||||
|
for (RenderType type : RenderType.getBlockLayers())
|
||||||
|
forEachVisible(PonderSceneElement.class, e -> e.renderLayer(world, buffer, type, ms));
|
||||||
|
forEachVisible(PonderSceneElement.class, e -> e.renderLast(world, buffer, ms));
|
||||||
|
info.set(transform.xRotation.getValue(pt), transform.yRotation.getValue(pt));
|
||||||
|
world.renderParticles(ms, buffer, info);
|
||||||
|
outliner.renderOutlines(ms, buffer);
|
||||||
|
ms.pop();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void renderOverlay(PonderUI screen, MatrixStack ms, float partialTicks) {
|
||||||
|
ms.push();
|
||||||
|
forEachVisible(PonderOverlayElement.class, e -> e.render(this, screen, ms, partialTicks));
|
||||||
|
ms.pop();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPointOfInterest(Vec3d poi) {
|
||||||
|
if (chasingPointOfInterest == null)
|
||||||
|
pointOfInterest = poi;
|
||||||
|
chasingPointOfInterest = poi;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Vec3d getPointOfInterest() {
|
||||||
|
return pointOfInterest;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void tick() {
|
||||||
|
if (chasingPointOfInterest != null)
|
||||||
|
pointOfInterest = VecHelper.lerp(.25f, pointOfInterest, chasingPointOfInterest);
|
||||||
|
|
||||||
|
outliner.tickOutlines();
|
||||||
|
world.tickParticles();
|
||||||
|
transform.tick();
|
||||||
|
forEach(e -> e.tick(this));
|
||||||
|
|
||||||
|
for (Iterator<PonderInstruction> iterator = activeSchedule.iterator(); iterator.hasNext();) {
|
||||||
|
PonderInstruction instruction = iterator.next();
|
||||||
|
instruction.tick(this);
|
||||||
|
if (instruction.isComplete()) {
|
||||||
|
iterator.remove();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (instruction.isBlocking())
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (activeSchedule.isEmpty())
|
||||||
|
finished = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addElement(PonderElement e) {
|
||||||
|
elements.add(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
public PonderWorld getWorld() {
|
||||||
|
return world;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Set<PonderElement> getElements() {
|
||||||
|
return elements;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void forEach(Consumer<? super PonderElement> function) {
|
||||||
|
for (PonderElement elemtent : elements)
|
||||||
|
function.accept(elemtent);
|
||||||
|
}
|
||||||
|
|
||||||
|
public <T extends PonderElement> void forEach(Class<T> type, Consumer<T> function) {
|
||||||
|
for (PonderElement element : elements)
|
||||||
|
if (type.isInstance(element))
|
||||||
|
function.accept(type.cast(element));
|
||||||
|
}
|
||||||
|
|
||||||
|
public <T extends PonderElement> void forEachVisible(Class<T> type, Consumer<T> function) {
|
||||||
|
for (PonderElement element : elements)
|
||||||
|
if (type.isInstance(element) && element.isVisible())
|
||||||
|
function.accept(type.cast(element));
|
||||||
|
}
|
||||||
|
|
||||||
|
public MutableBoundingBox getBounds() {
|
||||||
|
return world == null ? new MutableBoundingBox() : world.getBounds();
|
||||||
|
}
|
||||||
|
|
||||||
|
public SceneBuilder builder() {
|
||||||
|
return new SceneBuilder();
|
||||||
|
}
|
||||||
|
|
||||||
|
private Supplier<String> textGetter(String key) {
|
||||||
|
return () -> PonderLocalization.getSpecific(component, sceneIndex, key);
|
||||||
|
}
|
||||||
|
|
||||||
|
public SceneTransform getTransform() {
|
||||||
|
return transform;
|
||||||
|
}
|
||||||
|
|
||||||
|
public class SceneTransform {
|
||||||
|
|
||||||
|
public LerpedFloat xRotation, yRotation;
|
||||||
|
|
||||||
|
// Screen params
|
||||||
|
int width, height;
|
||||||
|
double offset;
|
||||||
|
Matrix4f cachedMat;
|
||||||
|
|
||||||
|
public SceneTransform() {
|
||||||
|
xRotation = LerpedFloat.angular()
|
||||||
|
.startWithValue(-35);
|
||||||
|
yRotation = LerpedFloat.angular()
|
||||||
|
.startWithValue(55 + 90);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void tick() {
|
||||||
|
xRotation.tickChaser();
|
||||||
|
yRotation.tickChaser();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateScreenParams(int width, int height, double offset) {
|
||||||
|
this.width = width;
|
||||||
|
this.height = height;
|
||||||
|
this.offset = offset;
|
||||||
|
cachedMat = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MatrixStack apply(MatrixStack ms) {
|
||||||
|
float pt = Minecraft.getInstance()
|
||||||
|
.getRenderPartialTicks();
|
||||||
|
ms.translate(width / 2, height / 2, 200);
|
||||||
|
|
||||||
|
MatrixStacker.of(ms)
|
||||||
|
.rotateX(-35)
|
||||||
|
.rotateY(55);
|
||||||
|
ms.translate(offset, 0, 0);
|
||||||
|
MatrixStacker.of(ms)
|
||||||
|
.rotateY(-55)
|
||||||
|
.rotateX(35);
|
||||||
|
|
||||||
|
MatrixStacker.of(ms)
|
||||||
|
.rotateX(xRotation.getValue(pt))
|
||||||
|
.rotateY(yRotation.getValue(pt));
|
||||||
|
ms.scale(30, -30, 30);
|
||||||
|
ms.translate((size + offsetX) / -2f, -.5f, (size + offsetZ) / -2f);
|
||||||
|
|
||||||
|
return ms;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Vec3d screenToScene(float x, float y) {
|
||||||
|
refreshMatrix();
|
||||||
|
Vector4f vec = new Vector4f(x, y, 0, 1);
|
||||||
|
cachedMat.invert();
|
||||||
|
vec.transform(cachedMat);
|
||||||
|
cachedMat.invert();
|
||||||
|
MutableBoundingBox bounds = getBounds();
|
||||||
|
return new Vec3d(vec.getX() + bounds.getXSize() / -2f, vec.getY(), vec.getZ() + bounds.getZSize() / -2f);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Vec2f sceneToScreen(Vec3d vec) {
|
||||||
|
refreshMatrix();
|
||||||
|
Vector4f vec4 = new Vector4f((float) vec.x, (float) vec.y, (float) vec.z, 1);
|
||||||
|
vec4.transform(cachedMat);
|
||||||
|
return new Vec2f(vec4.getX(), vec4.getY());
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void refreshMatrix() {
|
||||||
|
if (cachedMat != null)
|
||||||
|
return;
|
||||||
|
cachedMat = apply(new MatrixStack()).peek()
|
||||||
|
.getModel();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class SceneRenderInfo extends ActiveRenderInfo {
|
||||||
|
|
||||||
|
public void set(float xRotation, float yRotation) {
|
||||||
|
setDirection(yRotation, xRotation);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class SceneBuilder {
|
||||||
|
|
||||||
|
private SceneBuildingUtil sceneBuildingUtil;
|
||||||
|
|
||||||
|
public SceneBuilder() {
|
||||||
|
sceneBuildingUtil = new SceneBuildingUtil();
|
||||||
|
}
|
||||||
|
|
||||||
|
public SceneBuildingUtil getSceneBuildingUtil() {
|
||||||
|
return sceneBuildingUtil;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SceneBuilder showBasePlate() {
|
||||||
|
return showSection(Select.cuboid(new BlockPos(offsetX, 0, offsetZ), new Vec3i(size, 0, size)),
|
||||||
|
Direction.UP);
|
||||||
|
}
|
||||||
|
|
||||||
|
public SceneBuilder showTargetedText(PonderPalette color, Vec3d position, String key, String defaultText,
|
||||||
|
int duration) {
|
||||||
|
PonderLocalization.registerSpecific(component, sceneIndex, key, defaultText);
|
||||||
|
return addInstruction(new TextInstruction(color.getColor(), textGetter(key), duration, position));
|
||||||
|
}
|
||||||
|
|
||||||
|
public SceneBuilder showSelectionWithText(PonderPalette color, Select selection, String key, String defaultText,
|
||||||
|
int duration) {
|
||||||
|
PonderLocalization.registerSpecific(component, sceneIndex, key, defaultText);
|
||||||
|
return addInstruction(new TextInstruction(color.getColor(), textGetter(key), duration, selection));
|
||||||
|
}
|
||||||
|
|
||||||
|
public SceneBuilder showText(PonderPalette color, int y, String key, String defaultText, int duration) {
|
||||||
|
PonderLocalization.registerSpecific(component, sceneIndex, key, defaultText);
|
||||||
|
return addInstruction(new TextInstruction(color.getColor(), textGetter(key), duration, y));
|
||||||
|
}
|
||||||
|
|
||||||
|
public SceneBuilder showSection(Select selection, Direction fadeInDirection) {
|
||||||
|
return addInstruction(
|
||||||
|
new DisplayWorldSectionInstruction(15, fadeInDirection, new WorldSectionElement(selection)));
|
||||||
|
}
|
||||||
|
|
||||||
|
public SceneBuilder debugSchematic() {
|
||||||
|
return addInstruction(new ShowCompleteSchematicInstruction());
|
||||||
|
}
|
||||||
|
|
||||||
|
public SceneBuilder idle(int ticks) {
|
||||||
|
return addInstruction(new DelayInstruction(ticks));
|
||||||
|
}
|
||||||
|
|
||||||
|
public SceneBuilder idleSeconds(int seconds) {
|
||||||
|
return idle(seconds * 20);
|
||||||
|
}
|
||||||
|
|
||||||
|
public SceneBuilder markAsFinished() {
|
||||||
|
return addInstruction(new MarkAsFinishedInstruction());
|
||||||
|
}
|
||||||
|
|
||||||
|
public SceneBuilder rotateCameraY(float degrees) {
|
||||||
|
return addInstruction(new RotateSceneInstruction(0, degrees, true));
|
||||||
|
}
|
||||||
|
|
||||||
|
public SceneBuilder setBlocks(Select selection, BlockState state) {
|
||||||
|
return addInstruction(new ReplaceBlocksInstruction(selection, state, true));
|
||||||
|
}
|
||||||
|
|
||||||
|
public SceneBuilder replaceBlocks(Select selection, BlockState state) {
|
||||||
|
return addInstruction(new ReplaceBlocksInstruction(selection, state, false));
|
||||||
|
}
|
||||||
|
|
||||||
|
public SceneBuilder setKineticSpeed(Select selection, float speed) {
|
||||||
|
return modifyKineticSpeed(selection, f -> speed);
|
||||||
|
}
|
||||||
|
|
||||||
|
public SceneBuilder multiplyKineticSpeed(Select selection, float modifier) {
|
||||||
|
return modifyKineticSpeed(selection, f -> f * modifier);
|
||||||
|
}
|
||||||
|
|
||||||
|
public SceneBuilder modifyKineticSpeed(Select selection, UnaryOperator<Float> speedFunc) {
|
||||||
|
addInstruction(new TileEntityDataInstruction(selection, SpeedGaugeTileEntity.class, nbt -> {
|
||||||
|
if (!nbt.contains("Speed"))
|
||||||
|
return nbt;
|
||||||
|
float newSpeed = speedFunc.apply(nbt.getFloat("Speed"));
|
||||||
|
// TODO speed gauge consistency
|
||||||
|
nbt.putFloat("Value", Math.abs(newSpeed) / 256f);
|
||||||
|
return nbt;
|
||||||
|
}, false));
|
||||||
|
|
||||||
|
return addInstruction(new TileEntityDataInstruction(selection, KineticTileEntity.class, nbt -> {
|
||||||
|
if (!nbt.contains("Speed"))
|
||||||
|
return nbt;
|
||||||
|
nbt.putFloat("Speed", speedFunc.apply(nbt.getFloat("Speed")));
|
||||||
|
return nbt;
|
||||||
|
}, false));
|
||||||
|
}
|
||||||
|
|
||||||
|
public SceneBuilder flapFunnels(Select selection, boolean outward) {
|
||||||
|
return addInstruction(new TileEntityDataInstruction(selection, FunnelTileEntity.class, nbt -> {
|
||||||
|
nbt.putInt("Flap", outward ? -1 : 1);
|
||||||
|
return nbt;
|
||||||
|
}, false));
|
||||||
|
}
|
||||||
|
|
||||||
|
public SceneBuilder createParrotSpinningOn(BlockPos pos, Direction fadeInDirection) {
|
||||||
|
return addInstruction(new CreateParrotInstruction(15, fadeInDirection,
|
||||||
|
ParrotElement.spinOnComponent(new Vec3d(pos).add(.5, 0, .5), pos.down())));
|
||||||
|
}
|
||||||
|
|
||||||
|
public SceneBuilder createParrotLookingAtPOI(Vec3d location, Direction fadeInDirection) {
|
||||||
|
return addInstruction(new CreateParrotInstruction(15, fadeInDirection, ParrotElement.lookAtPOI(location)));
|
||||||
|
}
|
||||||
|
|
||||||
|
public SceneBuilder movePOI(Vec3d location) {
|
||||||
|
return addInstruction(new MovePoiInstruction(location));
|
||||||
|
}
|
||||||
|
|
||||||
|
public SceneBuilder addInstruction(PonderInstruction instruction) {
|
||||||
|
schedule.add(instruction);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public class SceneBuildingUtil {
|
||||||
|
|
||||||
|
public Vec3d centerOf(int x, int y, int z) {
|
||||||
|
return VecHelper.getCenterOf(new BlockPos(x, y, z));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Vec3d vector(double x, double y, double z) {
|
||||||
|
return new Vec3d(x, y, z);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Select everywhere() {
|
||||||
|
return Select.everything(getBounds());
|
||||||
|
}
|
||||||
|
|
||||||
|
public Select column(int x, int z) {
|
||||||
|
return Select.column(getBounds(), x, z);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Select layer(int y) {
|
||||||
|
return layers(y, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Select layers(int y, int height) {
|
||||||
|
return Select.layer(getBounds(), y, height);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Select layersFrom(int y) {
|
||||||
|
return Select.layer(getBounds(), y, getBounds().getYSize());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public SceneBuilder configureBasePlate(int xOffset, int zOffset, int basePlateSize) {
|
||||||
|
offsetX = xOffset;
|
||||||
|
offsetZ = zOffset;
|
||||||
|
size = basePlateSize;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public Outliner getOutliner() {
|
||||||
|
return outliner;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
package com.simibubi.create.foundation.ponder;
|
||||||
|
|
||||||
|
import com.simibubi.create.foundation.ponder.PonderScene.SceneBuilder;
|
||||||
|
import com.simibubi.create.foundation.ponder.PonderScene.SceneBuilder.SceneBuildingUtil;
|
||||||
|
|
||||||
|
public abstract class PonderStoryBoard {
|
||||||
|
|
||||||
|
public abstract String getSchematicName();
|
||||||
|
|
||||||
|
public abstract String getStoryTitle();
|
||||||
|
|
||||||
|
public abstract void program(SceneBuilder scene, SceneBuildingUtil util);
|
||||||
|
|
||||||
|
}
|
|
@ -1,15 +1,18 @@
|
||||||
package com.simibubi.create.foundation.metadoc;
|
package com.simibubi.create.foundation.ponder;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.google.common.base.Strings;
|
import com.google.common.base.Strings;
|
||||||
import com.simibubi.create.foundation.gui.ScreenOpener;
|
import com.simibubi.create.foundation.gui.ScreenOpener;
|
||||||
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.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.screen.Screen;
|
import net.minecraft.client.gui.screen.Screen;
|
||||||
import net.minecraft.client.gui.screen.inventory.ContainerScreen;
|
import net.minecraft.client.gui.screen.inventory.ContainerScreen;
|
||||||
|
import net.minecraft.client.settings.KeyBinding;
|
||||||
import net.minecraft.client.util.InputMappings;
|
import net.minecraft.client.util.InputMappings;
|
||||||
import net.minecraft.inventory.container.Slot;
|
import net.minecraft.inventory.container.Slot;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
@ -18,11 +21,12 @@ 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;
|
||||||
|
|
||||||
public class MetaDocTooltipHandler {
|
public class PonderTooltipHandler {
|
||||||
|
|
||||||
static LerpedFloat holdWProgress = LerpedFloat.linear()
|
static LerpedFloat holdWProgress = LerpedFloat.linear()
|
||||||
.startWithValue(0);
|
.startWithValue(0);
|
||||||
static ItemStack lastHoveredStack = null;
|
static ItemStack lastHoveredStack = null;
|
||||||
|
public static final String HOLD_TO_PONDER = PonderLocalization.LANG_PREFIX + "hold_to_ponder";
|
||||||
|
|
||||||
public static void tick() {
|
public static void tick() {
|
||||||
Minecraft instance = Minecraft.getInstance();
|
Minecraft instance = Minecraft.getInstance();
|
||||||
|
@ -39,7 +43,7 @@ public class MetaDocTooltipHandler {
|
||||||
|
|
||||||
ItemStack stack = slotUnderMouse.getStack();
|
ItemStack stack = slotUnderMouse.getStack();
|
||||||
|
|
||||||
if (!MetaDocs.all.containsKey(stack.getItem()
|
if (!PonderRegistry.all.containsKey(stack.getItem()
|
||||||
.getRegistryName()))
|
.getRegistryName()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -47,14 +51,14 @@ public class MetaDocTooltipHandler {
|
||||||
holdWProgress.startWithValue(0);
|
holdWProgress.startWithValue(0);
|
||||||
|
|
||||||
float value = holdWProgress.getValue();
|
float value = holdWProgress.getValue();
|
||||||
int keyCode = instance.gameSettings.keyBindForward.getKey()
|
int keyCode = ponderKeybind().getKey()
|
||||||
.getKeyCode();
|
.getKeyCode();
|
||||||
long window = instance.getWindow()
|
long window = instance.getWindow()
|
||||||
.getHandle();
|
.getHandle();
|
||||||
|
|
||||||
if (InputMappings.isKeyDown(window, keyCode)) {
|
if (InputMappings.isKeyDown(window, keyCode)) {
|
||||||
if (value >= 1)
|
if (value >= 1)
|
||||||
ScreenOpener.open(new MetaDocScreen(MetaDocs.compile(stack.getItem()
|
ScreenOpener.open(new PonderUI(PonderRegistry.compile(stack.getItem()
|
||||||
.getRegistryName())));
|
.getRegistryName())));
|
||||||
holdWProgress.setValue(Math.min(1, value + Math.max(.25f, value) * .25f));
|
holdWProgress.setValue(Math.min(1, value + Math.max(.25f, value) * .25f));
|
||||||
} else
|
} else
|
||||||
|
@ -68,7 +72,7 @@ public class MetaDocTooltipHandler {
|
||||||
return;
|
return;
|
||||||
float renderPartialTicks = Minecraft.getInstance()
|
float renderPartialTicks = Minecraft.getInstance()
|
||||||
.getRenderPartialTicks();
|
.getRenderPartialTicks();
|
||||||
toolTip.add(makeProgressBar(Math.min(1, holdWProgress.getValue(renderPartialTicks) * 8 / 7f)));
|
toolTip.set(1, makeProgressBar(Math.min(1, holdWProgress.getValue(renderPartialTicks) * 8 / 7f)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void handleTooltipColor(RenderTooltipEvent.Color event) {
|
public static void handleTooltipColor(RenderTooltipEvent.Color event) {
|
||||||
|
@ -92,29 +96,36 @@ public class MetaDocTooltipHandler {
|
||||||
private static int getSmoothColorForProgress(float progress) {
|
private static int getSmoothColorForProgress(float progress) {
|
||||||
if (progress < .5f)
|
if (progress < .5f)
|
||||||
return ColorHelper.mixColors(0x5000FF, 5592575, progress * 2);
|
return ColorHelper.mixColors(0x5000FF, 5592575, progress * 2);
|
||||||
// if (progress < .75f)
|
|
||||||
// return ColorHelper.mixColors(16733695, 5636095, (progress - .5f) * 4);
|
|
||||||
return ColorHelper.mixColors(5592575, 0xffffff, (progress - .5f) * 2);
|
return ColorHelper.mixColors(5592575, 0xffffff, (progress - .5f) * 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ITextComponent makeProgressBar(float progress) {
|
private static ITextComponent makeProgressBar(float progress) {
|
||||||
String bar = "";
|
String holdW = Lang
|
||||||
int filledLength = (int) (12 * progress);
|
.createTranslationTextComponent(HOLD_TO_PONDER, new StringTextComponent(ponderKeybind().getKeyBinding()
|
||||||
bar += Strings.repeat("\u2588", filledLength);
|
.getLocalizedName()).applyTextStyle(TextFormatting.WHITE))
|
||||||
if (progress < 1)
|
.applyTextStyle(TextFormatting.GRAY)
|
||||||
bar += Strings.repeat("\u2592", 12 - filledLength);
|
.getFormattedText();
|
||||||
|
|
||||||
TextFormatting color = TextFormatting.DARK_GRAY;
|
FontRenderer fontRenderer = Minecraft.getInstance().fontRenderer;
|
||||||
if (progress > 0)
|
float charWidth = fontRenderer.getStringWidth("|");
|
||||||
color = TextFormatting.GRAY;
|
float tipWidth = fontRenderer.getStringWidth(holdW);
|
||||||
if (progress == 1f)
|
|
||||||
color = TextFormatting.WHITE;
|
|
||||||
|
|
||||||
ITextComponent leftBr = new StringTextComponent("").applyTextStyle(TextFormatting.WHITE);
|
int total = (int) (tipWidth / charWidth);
|
||||||
ITextComponent rightBr = new StringTextComponent("").applyTextStyle(TextFormatting.WHITE);
|
int current = (int) (progress * total);
|
||||||
ITextComponent barComponent = new StringTextComponent(bar).applyTextStyle(color);
|
|
||||||
return leftBr.appendSibling(barComponent)
|
if (progress > 0) {
|
||||||
.appendSibling(rightBr);
|
String bars = "";
|
||||||
|
bars += TextFormatting.WHITE + Strings.repeat("|", current);
|
||||||
|
if (progress < 1)
|
||||||
|
bars += TextFormatting.GRAY + Strings.repeat("|", total - current);
|
||||||
|
return new StringTextComponent(bars);
|
||||||
|
}
|
||||||
|
|
||||||
|
return new StringTextComponent(holdW);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected static KeyBinding ponderKeybind() {
|
||||||
|
return Minecraft.getInstance().gameSettings.keyBindForward;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,32 +1,45 @@
|
||||||
package com.simibubi.create.foundation.metadoc;
|
package com.simibubi.create.foundation.ponder;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.mutable.MutableBoolean;
|
||||||
|
|
||||||
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.AbstractSimiScreen;
|
import com.simibubi.create.foundation.gui.AbstractSimiScreen;
|
||||||
import com.simibubi.create.foundation.gui.AllIcons;
|
import com.simibubi.create.foundation.gui.AllIcons;
|
||||||
import com.simibubi.create.foundation.metadoc.content.MetaDocIndex;
|
import com.simibubi.create.foundation.ponder.content.PonderIndex;
|
||||||
|
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.ColorHelper;
|
import com.simibubi.create.foundation.utility.ColorHelper;
|
||||||
|
import com.simibubi.create.foundation.utility.Lang;
|
||||||
import com.simibubi.create.foundation.utility.LerpedFloat;
|
import com.simibubi.create.foundation.utility.LerpedFloat;
|
||||||
import com.simibubi.create.foundation.utility.LerpedFloat.Chaser;
|
import com.simibubi.create.foundation.utility.LerpedFloat.Chaser;
|
||||||
|
|
||||||
import net.minecraft.client.GameSettings;
|
import net.minecraft.client.GameSettings;
|
||||||
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.settings.KeyBinding;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.util.math.MathHelper;
|
import net.minecraft.util.math.MathHelper;
|
||||||
|
import net.minecraft.util.math.MutableBoundingBox;
|
||||||
import net.minecraftforge.fml.client.gui.GuiUtils;
|
import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||||
|
import net.minecraftforge.registries.ForgeRegistries;
|
||||||
|
|
||||||
public class MetaDocScreen extends AbstractSimiScreen {
|
public class PonderUI extends AbstractSimiScreen {
|
||||||
|
|
||||||
private List<MetaDocScene> scenes;
|
public static final String PONDERING = PonderLocalization.LANG_PREFIX + "pondering";
|
||||||
|
private List<PonderScene> scenes;
|
||||||
private LerpedFloat fadeIn;
|
private LerpedFloat fadeIn;
|
||||||
|
ItemStack stack;
|
||||||
|
|
||||||
private LerpedFloat lazyIndex;
|
private LerpedFloat lazyIndex;
|
||||||
private int index = 0;
|
private int index = 0;
|
||||||
|
|
||||||
public MetaDocScreen(List<MetaDocScene> scenes) {
|
private PonderButton left, right, icon;
|
||||||
|
|
||||||
|
public PonderUI(List<PonderScene> scenes) {
|
||||||
this.scenes = scenes;
|
this.scenes = scenes;
|
||||||
lazyIndex = LerpedFloat.linear()
|
lazyIndex = LerpedFloat.linear()
|
||||||
.startWithValue(index);
|
.startWithValue(index);
|
||||||
|
@ -35,6 +48,39 @@ public class MetaDocScreen extends AbstractSimiScreen {
|
||||||
.chase(1, .1f, Chaser.EXP);
|
.chase(1, .1f, Chaser.EXP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void init() {
|
||||||
|
super.init();
|
||||||
|
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));
|
||||||
|
|
||||||
|
int bY = height - 20 - 31;
|
||||||
|
widgets.add(icon = new PonderButton(31, 31, () -> {
|
||||||
|
}).showing(stack)
|
||||||
|
.fade(0, -1));
|
||||||
|
|
||||||
|
int spacing = 8;
|
||||||
|
int bX = (width - 20) / 2 - (20 + spacing);
|
||||||
|
GameSettings bindings = minecraft.gameSettings;
|
||||||
|
widgets.add(left = new PonderButton(bX, bY, () -> this.scroll(false)).showing(AllIcons.I_MTD_LEFT)
|
||||||
|
.shortcut(bindings.keyBindLeft)
|
||||||
|
.fade(0, -1));
|
||||||
|
bX += 20 + spacing;
|
||||||
|
widgets.add(new PonderButton(bX, bY, this::onClose).showing(AllIcons.I_MTD_CLOSE)
|
||||||
|
.shortcut(bindings.keyBindInventory)
|
||||||
|
.fade(0, -1));
|
||||||
|
bX += 20 + spacing;
|
||||||
|
widgets.add(right = new PonderButton(bX, bY, () -> this.scroll(true)).showing(AllIcons.I_MTD_RIGHT)
|
||||||
|
.shortcut(bindings.keyBindRight)
|
||||||
|
.fade(0, -1));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void tick() {
|
public void tick() {
|
||||||
lazyIndex.tickChaser();
|
lazyIndex.tickChaser();
|
||||||
|
@ -73,30 +119,65 @@ public class MetaDocScreen extends AbstractSimiScreen {
|
||||||
@Override
|
@Override
|
||||||
protected void renderWindow(int mouseX, int mouseY, float partialTicks) {
|
protected void renderWindow(int mouseX, int mouseY, float partialTicks) {
|
||||||
RenderSystem.enableBlend();
|
RenderSystem.enableBlend();
|
||||||
renderStories(partialTicks);
|
renderVisibleScenes(partialTicks);
|
||||||
renderWidgets(mouseX, mouseY, partialTicks);
|
renderWidgets(mouseX, mouseY, partialTicks);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void renderStories(float partialTicks) {
|
protected void renderVisibleScenes(float partialTicks) {
|
||||||
renderStory(index, partialTicks);
|
renderScene(index, partialTicks);
|
||||||
float lazyIndexValue = lazyIndex.getValue(partialTicks);
|
float lazyIndexValue = lazyIndex.getValue(partialTicks);
|
||||||
if (Math.abs(lazyIndexValue - index) > 1 / 512f)
|
if (Math.abs(lazyIndexValue - index) > 1 / 512f)
|
||||||
renderStory(lazyIndexValue < index ? index - 1 : index + 1, partialTicks);
|
renderScene(lazyIndexValue < index ? index - 1 : index + 1, partialTicks);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void renderStory(int i, float partialTicks) {
|
protected void renderScene(int i, float partialTicks) {
|
||||||
SuperRenderTypeBuffer buffer = SuperRenderTypeBuffer.getInstance();
|
SuperRenderTypeBuffer buffer = SuperRenderTypeBuffer.getInstance();
|
||||||
MetaDocScene story = scenes.get(i);
|
PonderScene story = scenes.get(i);
|
||||||
MatrixStack ms = new MatrixStack();
|
MatrixStack ms = new MatrixStack();
|
||||||
double value = lazyIndex.getValue(partialTicks);
|
double value = lazyIndex.getValue(partialTicks);
|
||||||
double diff = i - value;
|
double diff = i - value;
|
||||||
double slide = MathHelper.lerp(diff * diff, 200, 600) * diff;
|
double slide = MathHelper.lerp(diff * diff, 200, 600) * diff;
|
||||||
|
|
||||||
|
RenderSystem.enableAlphaTest();
|
||||||
|
RenderSystem.enableBlend();
|
||||||
|
RenderSystem.enableDepthTest();
|
||||||
|
|
||||||
ms.push();
|
ms.push();
|
||||||
story.transform.updateScreenParams(width, height, slide);
|
story.transform.updateScreenParams(width, height, slide);
|
||||||
story.transform.apply(ms);
|
story.transform.apply(ms);
|
||||||
story.renderScene(buffer, ms);
|
story.renderScene(buffer, ms);
|
||||||
buffer.draw();
|
buffer.draw();
|
||||||
|
|
||||||
|
// coords for debug
|
||||||
|
if (PonderIndex.EDITOR_MODE) {
|
||||||
|
MutableBoundingBox bounds = story.getBounds();
|
||||||
|
|
||||||
|
RenderSystem.pushMatrix();
|
||||||
|
RenderSystem.multMatrix(ms.peek().getModel());
|
||||||
|
RenderSystem.scaled(-1/16d, -1/16d, 1/16d);
|
||||||
|
RenderSystem.translated(1, -8, -1/64f);
|
||||||
|
|
||||||
|
RenderSystem.pushMatrix();
|
||||||
|
for (int x = 0; x <= bounds.getXSize(); x++) {
|
||||||
|
RenderSystem.translated(-16, 0, 0);
|
||||||
|
font.drawString(x == bounds.getXSize() ? "x" : "" + x, 0, 0, 0xFFFFFFFF);
|
||||||
|
}
|
||||||
|
RenderSystem.popMatrix();
|
||||||
|
|
||||||
|
RenderSystem.pushMatrix();
|
||||||
|
RenderSystem.scaled(-1, 1, 1);
|
||||||
|
RenderSystem.rotatef(-90, 0, 1, 0);
|
||||||
|
RenderSystem.translated(-8, -2, 2/64f);
|
||||||
|
for (int z = 0; z <= bounds.getZSize(); z++) {
|
||||||
|
RenderSystem.translated(16, 0, 0);
|
||||||
|
font.drawString(z == bounds.getZSize() ? "z" : "" + z, 0, 0, 0xFFFFFFFF);
|
||||||
|
}
|
||||||
|
RenderSystem.popMatrix();
|
||||||
|
|
||||||
|
buffer.draw();
|
||||||
|
RenderSystem.popMatrix();
|
||||||
|
}
|
||||||
|
|
||||||
ms.pop();
|
ms.pop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -107,41 +188,68 @@ public class MetaDocScreen extends AbstractSimiScreen {
|
||||||
int textColor = 0xeeeeee;
|
int textColor = 0xeeeeee;
|
||||||
|
|
||||||
{
|
{
|
||||||
int y = 34;
|
// Chapter title
|
||||||
drawString(font, "MetaDoc Experimental 0", 50, y, textColor);
|
RenderSystem.pushMatrix();
|
||||||
y += 10;
|
RenderSystem.translated(0, 0, 800);
|
||||||
drawString(font, "> " + scenes.get(index)
|
int x = icon.x + icon.getWidth() + 8;
|
||||||
.getTitle(), 50, y, ColorHelper.applyAlpha(textColor, 1 - indexDiff));
|
int y = icon.y;
|
||||||
y += 10;
|
drawString(font, Lang.translate(PONDERING), x, y, 0xffa3a3a3);
|
||||||
if (MetaDocIndex.EDITOR_MODE)
|
y += 12;
|
||||||
drawString(font, "Mouse: " + mouseX + ", " + mouseY, 50, y, 0x8d8d8d);
|
x += 0;
|
||||||
|
RenderSystem.translated(0, 3 * (indexDiff), 0);
|
||||||
|
font.drawSplitString(scenes.get(index)
|
||||||
|
.getTitle(), x, y, left.x - x, ColorHelper.applyAlpha(textColor, 1 - indexDiff));
|
||||||
|
RenderSystem.popMatrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Scene overlay
|
{
|
||||||
RenderSystem.pushMatrix();
|
// Scene overlay
|
||||||
RenderSystem.translated(0, 0, 100);
|
RenderSystem.pushMatrix();
|
||||||
renderOverlay(index, partialTicks);
|
RenderSystem.translated(0, 0, 100);
|
||||||
if (indexDiff > 1 / 512f)
|
renderOverlay(index, partialTicks);
|
||||||
renderOverlay(lazyIndexValue < index ? index - 1 : index + 1, partialTicks);
|
if (indexDiff > 1 / 512f)
|
||||||
RenderSystem.popMatrix();
|
renderOverlay(lazyIndexValue < index ? index - 1 : index + 1, partialTicks);
|
||||||
|
RenderSystem.popMatrix();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Widgets
|
||||||
|
widgets.forEach(w -> {
|
||||||
|
if (w instanceof PonderButton) {
|
||||||
|
PonderButton mtdButton = (PonderButton) w;
|
||||||
|
mtdButton.fade(fade);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (index == 0 || index == 1 && lazyIndexValue < index)
|
||||||
|
left.fade(lazyIndexValue);
|
||||||
|
if (index == scenes.size() - 1 || index == scenes.size() - 2 && lazyIndexValue > index)
|
||||||
|
right.fade(scenes.size() - lazyIndexValue - 1);
|
||||||
|
|
||||||
|
if (scenes.get(index).finished)
|
||||||
|
right.flash();
|
||||||
|
else
|
||||||
|
right.dim();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void lowerButtonGroup(int index, int mouseX, int mouseY, float fade, AllIcons icon, KeyBinding key) {
|
||||||
|
int bWidth = 20;
|
||||||
|
int bHeight = 20;
|
||||||
|
int bX = (width - bWidth) / 2 + (index - 1) * (bWidth + 8);
|
||||||
|
int bY = height - bHeight - 31;
|
||||||
|
|
||||||
// Close button
|
|
||||||
RenderSystem.pushMatrix();
|
RenderSystem.pushMatrix();
|
||||||
if (fade < fadeIn.getChaseTarget())
|
if (fade < fadeIn.getChaseTarget())
|
||||||
RenderSystem.translated(0, (1 - fade) * 5, 0);
|
RenderSystem.translated(0, (1 - fade) * 5, 0);
|
||||||
int closeWidth = 24;
|
boolean hovered = isMouseOver(mouseX, mouseY, bX, bY, bWidth, bHeight);
|
||||||
int closeHeight = 24;
|
renderBox(bX, bY, bWidth, bHeight, hovered);
|
||||||
int closeX = (width - closeWidth) / 2;
|
icon.draw(bX + 2, bY + 2);
|
||||||
int closeY = height - closeHeight - 31;
|
drawCenteredString(font, key.getLocalizedName(), bX + bWidth / 2 + 8, bY + bHeight - 6, 0xff606060);
|
||||||
boolean hovered = isMouseOver(mouseX, mouseY, closeX, closeY, closeWidth, closeHeight);
|
|
||||||
renderBox(closeX, closeY, closeWidth, closeHeight, hovered);
|
|
||||||
AllIcons.I_CONFIRM.draw(closeX + 4, closeY + 4);
|
|
||||||
RenderSystem.popMatrix();
|
RenderSystem.popMatrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void renderOverlay(int i, float partialTicks) {
|
private void renderOverlay(int i, float partialTicks) {
|
||||||
RenderSystem.pushMatrix();
|
RenderSystem.pushMatrix();
|
||||||
MetaDocScene story = scenes.get(i);
|
PonderScene story = scenes.get(i);
|
||||||
MatrixStack ms = new MatrixStack();
|
MatrixStack ms = new MatrixStack();
|
||||||
story.renderOverlay(this, ms, partialTicks);
|
story.renderOverlay(this, ms, partialTicks);
|
||||||
RenderSystem.popMatrix();
|
RenderSystem.popMatrix();
|
||||||
|
@ -149,14 +257,22 @@ public class MetaDocScreen extends AbstractSimiScreen {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean mouseClicked(double x, double y, int button) {
|
public boolean mouseClicked(double x, double y, int button) {
|
||||||
int closeWidth = 24;
|
MutableBoolean handled = new MutableBoolean(false);
|
||||||
int closeHeight = 24;
|
widgets.forEach(w -> {
|
||||||
int closeX = (width - closeWidth) / 2;
|
if (handled.booleanValue())
|
||||||
int closeY = height - closeHeight - 31;
|
return;
|
||||||
if (isMouseOver(x, y, closeX, closeY, closeWidth, closeHeight)) {
|
if (!w.isMouseOver(x, y))
|
||||||
onClose();
|
return;
|
||||||
|
if (w instanceof PonderButton) {
|
||||||
|
PonderButton mtdButton = (PonderButton) w;
|
||||||
|
mtdButton.runCallback();
|
||||||
|
handled.setTrue();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (handled.booleanValue())
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
|
|
||||||
return super.mouseClicked(x, y, button);
|
return super.mouseClicked(x, y, button);
|
||||||
}
|
}
|
||||||
|
@ -203,11 +319,12 @@ public class MetaDocScreen extends AbstractSimiScreen {
|
||||||
drawString(font, s, x, y, color);
|
drawString(font, s, x, y, color);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void renderBox(int x, int y, int w, int h, boolean highlighted) {
|
public static void renderBox(int x, int y, int w, int h, boolean highlighted) {
|
||||||
renderBox(x, y, w, h, 0xdd000000, highlighted ? 0x70ffffff : 0x30eebb00, highlighted ? 0x30ffffff : 0x10eebb00);
|
renderBox(x, y, w, h, 0xdd000000, highlighted ? 0x70ffffff : 0x30eebb00, highlighted ? 0x30ffffff : 0x10eebb00);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void renderBox(int x, int y, int w, int h, int backgroundColor, int borderColorStart, int borderColorEnd) {
|
public static void renderBox(int x, int y, int w, int h, int backgroundColor, int borderColorStart,
|
||||||
|
int borderColorEnd) {
|
||||||
int zLevel = 100;
|
int zLevel = 100;
|
||||||
GuiUtils.drawGradientRect(zLevel, x - 3, y - 4, x + w + 3, y - 3, backgroundColor, backgroundColor);
|
GuiUtils.drawGradientRect(zLevel, x - 3, y - 4, x + w + 3, y - 3, backgroundColor, backgroundColor);
|
||||||
GuiUtils.drawGradientRect(zLevel, x - 3, y + h + 3, x + w + 3, y + h + 4, backgroundColor, backgroundColor);
|
GuiUtils.drawGradientRect(zLevel, x - 3, y + h + 3, x + w + 3, y + h + 4, backgroundColor, backgroundColor);
|
|
@ -0,0 +1,158 @@
|
||||||
|
package com.simibubi.create.foundation.ponder;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
|
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||||
|
import com.simibubi.create.content.schematics.SchematicWorld;
|
||||||
|
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.block.Blocks;
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.client.particle.IParticleFactory;
|
||||||
|
import net.minecraft.client.particle.Particle;
|
||||||
|
import net.minecraft.client.particle.ParticleManager;
|
||||||
|
import net.minecraft.client.renderer.ActiveRenderInfo;
|
||||||
|
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||||
|
import net.minecraft.nbt.CompoundNBT;
|
||||||
|
import net.minecraft.particles.BlockParticleData;
|
||||||
|
import net.minecraft.particles.IParticleData;
|
||||||
|
import net.minecraft.particles.ParticleTypes;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
import net.minecraft.util.math.AxisAlignedBB;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.util.math.MathHelper;
|
||||||
|
import net.minecraft.util.math.shapes.VoxelShape;
|
||||||
|
import net.minecraft.world.IBlockReader;
|
||||||
|
import net.minecraft.world.LightType;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.registries.ForgeRegistries;
|
||||||
|
|
||||||
|
public class PonderWorld extends SchematicWorld {
|
||||||
|
|
||||||
|
protected Map<BlockPos, BlockState> originalBlocks;
|
||||||
|
protected Map<BlockPos, TileEntity> originalTileEntities;
|
||||||
|
protected PonderWorldParticles particles;
|
||||||
|
|
||||||
|
int overrideLight;
|
||||||
|
Select mask;
|
||||||
|
|
||||||
|
public PonderWorld(BlockPos anchor, World original) {
|
||||||
|
super(anchor, original);
|
||||||
|
originalBlocks = new HashMap<>();
|
||||||
|
originalTileEntities = new HashMap<>();
|
||||||
|
particles = new PonderWorldParticles(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void createBackup() {
|
||||||
|
originalBlocks.clear();
|
||||||
|
originalTileEntities.clear();
|
||||||
|
blocks.forEach((k, v) -> originalBlocks.put(k, v));
|
||||||
|
tileEntities.forEach((k, v) -> originalTileEntities.put(k, TileEntity.create(v.write(new CompoundNBT()))));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void restore() {
|
||||||
|
blocks.clear();
|
||||||
|
tileEntities.clear();
|
||||||
|
renderedTileEntities.clear();
|
||||||
|
originalBlocks.forEach((k, v) -> blocks.put(k, v));
|
||||||
|
originalTileEntities.forEach((k, v) -> {
|
||||||
|
TileEntity te = TileEntity.create(v.write(new CompoundNBT()));
|
||||||
|
te.setLocation(this, te.getPos());
|
||||||
|
tileEntities.put(k, te);
|
||||||
|
renderedTileEntities.add(te);
|
||||||
|
});
|
||||||
|
particles.clearEffects();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void pushFakeLight(int light) {
|
||||||
|
this.overrideLight = light;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void popLight() {
|
||||||
|
this.overrideLight = -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getLightLevel(LightType p_226658_1_, BlockPos p_226658_2_) {
|
||||||
|
return overrideLight == -1 ? 15 : overrideLight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMask(Select mask) {
|
||||||
|
this.mask = mask;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void clearMask() {
|
||||||
|
this.mask = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BlockState getBlockState(BlockPos globalPos) {
|
||||||
|
if (mask != null && !mask.test(globalPos.subtract(anchor)))
|
||||||
|
return Blocks.AIR.getDefaultState();
|
||||||
|
return super.getBlockState(globalPos);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override // For particle collision
|
||||||
|
public IBlockReader getExistingChunk(int p_225522_1_, int p_225522_2_) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void renderParticles(MatrixStack ms, IRenderTypeBuffer buffer, ActiveRenderInfo ari) {
|
||||||
|
particles.renderParticles(ms, buffer, ari);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void tickParticles() {
|
||||||
|
particles.tick();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addParticle(IParticleData data, double x, double y, double z, double mx, double my, double mz) {
|
||||||
|
addParticle(makeParticle(data, x, y, z, mx, my, mz));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
private <T extends IParticleData> Particle makeParticle(T data, double x, double y, double z, double mx, double my,
|
||||||
|
double mz) {
|
||||||
|
ParticleManager particleManager = Minecraft.getInstance().particles;
|
||||||
|
ResourceLocation key = ForgeRegistries.PARTICLE_TYPES.getKey(data.getType());
|
||||||
|
IParticleFactory<T> iparticlefactory = (IParticleFactory<T>) particleManager.factories.get(key);
|
||||||
|
return iparticlefactory == null ? null : iparticlefactory.makeParticle(data, this, x, y, z, mx, my, mz);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addParticle(Particle p) {
|
||||||
|
if (p != null)
|
||||||
|
particles.addParticle(p);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addBlockDestroyEffects(BlockPos pos, BlockState state) {
|
||||||
|
VoxelShape voxelshape = state.getShape(this, pos);
|
||||||
|
AxisAlignedBB bb = voxelshape.getBoundingBox();
|
||||||
|
double d1 = Math.min(1.0D, bb.maxX - bb.minX);
|
||||||
|
double d2 = Math.min(1.0D, bb.maxY - bb.minY);
|
||||||
|
double d3 = Math.min(1.0D, bb.maxZ - bb.minZ);
|
||||||
|
int i = Math.max(2, MathHelper.ceil(d1 / 0.25D));
|
||||||
|
int j = Math.max(2, MathHelper.ceil(d2 / 0.25D));
|
||||||
|
int k = Math.max(2, MathHelper.ceil(d3 / 0.25D));
|
||||||
|
|
||||||
|
for (int l = 0; l < i; ++l) {
|
||||||
|
for (int i1 = 0; i1 < j; ++i1) {
|
||||||
|
for (int j1 = 0; j1 < k; ++j1) {
|
||||||
|
double d4 = (l + 0.5D) / i;
|
||||||
|
double d5 = (i1 + 0.5D) / j;
|
||||||
|
double d6 = (j1 + 0.5D) / k;
|
||||||
|
double d7 = d4 * d1 + bb.minX;
|
||||||
|
double d8 = d5 * d2 + bb.minY;
|
||||||
|
double d9 = d6 * d3 + bb.minZ;
|
||||||
|
addParticle(new BlockParticleData(ParticleTypes.BLOCK, state), pos.getX() + d7, pos.getY() + d8,
|
||||||
|
pos.getZ() + d9, d4 - 0.5D, d5 - 0.5D, d6 - 0.5D);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,109 @@
|
||||||
|
package com.simibubi.create.foundation.ponder;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Queue;
|
||||||
|
|
||||||
|
import com.google.common.collect.EvictingQueue;
|
||||||
|
import com.google.common.collect.Maps;
|
||||||
|
import com.google.common.collect.Queues;
|
||||||
|
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||||
|
import com.mojang.blaze3d.systems.RenderSystem;
|
||||||
|
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.client.particle.IParticleRenderType;
|
||||||
|
import net.minecraft.client.particle.Particle;
|
||||||
|
import net.minecraft.client.renderer.ActiveRenderInfo;
|
||||||
|
import net.minecraft.client.renderer.BufferBuilder;
|
||||||
|
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||||
|
import net.minecraft.client.renderer.LightTexture;
|
||||||
|
import net.minecraft.client.renderer.Tessellator;
|
||||||
|
|
||||||
|
public class PonderWorldParticles {
|
||||||
|
|
||||||
|
private final Map<IParticleRenderType, Queue<Particle>> byType = Maps.newIdentityHashMap();
|
||||||
|
private final Queue<Particle> queue = Queues.newArrayDeque();
|
||||||
|
|
||||||
|
PonderWorld world;
|
||||||
|
|
||||||
|
public PonderWorldParticles(PonderWorld world) {
|
||||||
|
this.world = world;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addParticle(Particle p) {
|
||||||
|
this.queue.add(p);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void tick() {
|
||||||
|
this.byType.forEach((p_228347_1_, p_228347_2_) -> this.tickParticleList(p_228347_2_));
|
||||||
|
|
||||||
|
Particle particle;
|
||||||
|
if (queue.isEmpty())
|
||||||
|
return;
|
||||||
|
while ((particle = this.queue.poll()) != null)
|
||||||
|
this.byType.computeIfAbsent(particle.getRenderType(), $ -> EvictingQueue.create(16384))
|
||||||
|
.add(particle);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void tickParticleList(Collection<Particle> p_187240_1_) {
|
||||||
|
if (p_187240_1_.isEmpty())
|
||||||
|
return;
|
||||||
|
|
||||||
|
Iterator<Particle> iterator = p_187240_1_.iterator();
|
||||||
|
while (iterator.hasNext()) {
|
||||||
|
Particle particle = iterator.next();
|
||||||
|
particle.tick();
|
||||||
|
if (!particle.isAlive())
|
||||||
|
iterator.remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void renderParticles(MatrixStack ms, IRenderTypeBuffer buffer, ActiveRenderInfo p_228345_4_) {
|
||||||
|
Minecraft mc = Minecraft.getInstance();
|
||||||
|
LightTexture p_228345_3_ = mc.gameRenderer.getLightmapTextureManager();
|
||||||
|
float p_228345_5_ = mc.getRenderPartialTicks();
|
||||||
|
|
||||||
|
p_228345_3_.enableLightmap();
|
||||||
|
Runnable enable = () -> {
|
||||||
|
RenderSystem.enableAlphaTest();
|
||||||
|
RenderSystem.defaultAlphaFunc();
|
||||||
|
RenderSystem.enableDepthTest();
|
||||||
|
RenderSystem.enableFog();
|
||||||
|
};
|
||||||
|
RenderSystem.pushMatrix();
|
||||||
|
RenderSystem.multMatrix(ms.peek()
|
||||||
|
.getModel());
|
||||||
|
|
||||||
|
for (IParticleRenderType iparticlerendertype : this.byType.keySet()) { // Forge: allow custom
|
||||||
|
// IParticleRenderType's
|
||||||
|
if (iparticlerendertype == IParticleRenderType.NO_RENDER)
|
||||||
|
continue;
|
||||||
|
enable.run(); // Forge: MC-168672 Make sure all render types have the correct GL state.
|
||||||
|
Iterable<Particle> iterable = this.byType.get(iparticlerendertype);
|
||||||
|
if (iterable != null) {
|
||||||
|
RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
|
Tessellator tessellator = Tessellator.getInstance();
|
||||||
|
BufferBuilder bufferbuilder = tessellator.getBuffer();
|
||||||
|
iparticlerendertype.beginRender(bufferbuilder, mc.textureManager);
|
||||||
|
|
||||||
|
for (Particle particle : iterable)
|
||||||
|
particle.buildGeometry(bufferbuilder, p_228345_4_, p_228345_5_);
|
||||||
|
|
||||||
|
iparticlerendertype.finishRender(tessellator);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RenderSystem.popMatrix();
|
||||||
|
RenderSystem.depthMask(true);
|
||||||
|
RenderSystem.disableBlend();
|
||||||
|
RenderSystem.defaultAlphaFunc();
|
||||||
|
p_228345_3_.disableLightmap();
|
||||||
|
RenderSystem.disableFog();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void clearEffects() {
|
||||||
|
this.byType.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
167
src/main/java/com/simibubi/create/foundation/ponder/Select.java
Normal file
167
src/main/java/com/simibubi/create/foundation/ponder/Select.java
Normal file
|
@ -0,0 +1,167 @@
|
||||||
|
package com.simibubi.create.foundation.ponder;
|
||||||
|
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.function.Predicate;
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
|
import com.simibubi.create.foundation.ponder.elements.WorldSectionElement;
|
||||||
|
import com.simibubi.create.foundation.utility.outliner.Outline.OutlineParams;
|
||||||
|
import com.simibubi.create.foundation.utility.outliner.Outliner;
|
||||||
|
|
||||||
|
import net.minecraft.util.math.AxisAlignedBB;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.util.math.MutableBoundingBox;
|
||||||
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
import net.minecraft.util.math.Vec3i;
|
||||||
|
|
||||||
|
public abstract class Select implements Predicate<BlockPos> {
|
||||||
|
|
||||||
|
public static Select cuboid(BlockPos origin, Vec3i size) {
|
||||||
|
return new Cuboid(origin, size);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Select pos(int x, int y, int z) {
|
||||||
|
return new Cuboid(new BlockPos(x, y, z), BlockPos.ZERO);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Select fromTo(int x, int y, int z, int x2, int y2, int z2) {
|
||||||
|
return new Cuboid(new BlockPos(x, y, z), new BlockPos(x2 - x, y2 - y, z2 - z));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Select everything(MutableBoundingBox bounds) {
|
||||||
|
return cuboid(BlockPos.ZERO, bounds.getLength());
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Select compound(Select... other) {
|
||||||
|
return new Compound(other);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Select column(MutableBoundingBox bounds, int x, int z) {
|
||||||
|
return cuboid(new BlockPos(x, 1, z), new Vec3i(0, bounds.getYSize(), 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Select layer(MutableBoundingBox bounds, int y, int height) {
|
||||||
|
return cuboid(new BlockPos(0, y, 0),
|
||||||
|
new Vec3i(bounds.getXSize(), Math.min(bounds.getYSize() - y, height) - 1, bounds.getZSize()));
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
|
||||||
|
public WorldSectionElement asElement() {
|
||||||
|
return new WorldSectionElement(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public abstract int hashCode();
|
||||||
|
|
||||||
|
public abstract Stream<BlockPos> all();
|
||||||
|
|
||||||
|
public abstract Vec3d getCenter();
|
||||||
|
|
||||||
|
public abstract OutlineParams makeOutline(Outliner outliner);
|
||||||
|
|
||||||
|
private static class Compound extends Select {
|
||||||
|
|
||||||
|
private Select[] parts;
|
||||||
|
private int hash;
|
||||||
|
private Vec3d center;
|
||||||
|
private Set<BlockPos> cluster;
|
||||||
|
|
||||||
|
public Compound(Select... parts) {
|
||||||
|
this.parts = parts;
|
||||||
|
if (parts.length == 0)
|
||||||
|
throw new IllegalArgumentException("Cannot instantiate Compound Select with zero parts");
|
||||||
|
|
||||||
|
cluster = new HashSet<>();
|
||||||
|
parts[0].all()
|
||||||
|
.map(BlockPos::toImmutable)
|
||||||
|
.forEach(cluster::add);
|
||||||
|
hash = parts[0].hashCode();
|
||||||
|
center = parts[0].getCenter()
|
||||||
|
.scale(1f / parts.length);
|
||||||
|
for (int i = 1; i < parts.length; i++) {
|
||||||
|
Select select = parts[i];
|
||||||
|
select.all()
|
||||||
|
.map(BlockPos::toImmutable)
|
||||||
|
.forEach(cluster::add);
|
||||||
|
hash = hash ^ select.hashCode();
|
||||||
|
center = center.add(select.getCenter()
|
||||||
|
.scale(1f / parts.length));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean test(BlockPos t) {
|
||||||
|
for (Select select : parts)
|
||||||
|
if (select.test(t))
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Stream<BlockPos> all() {
|
||||||
|
return cluster.stream();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Vec3d getCenter() {
|
||||||
|
return center;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public OutlineParams makeOutline(Outliner outliner) {
|
||||||
|
return outliner.showCluster(this, cluster);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private static class Cuboid extends Select {
|
||||||
|
|
||||||
|
MutableBoundingBox bb;
|
||||||
|
Vec3i origin;
|
||||||
|
Vec3i size;
|
||||||
|
|
||||||
|
public Cuboid(BlockPos origin, Vec3i size) {
|
||||||
|
bb = new MutableBoundingBox(origin, origin.add(size));
|
||||||
|
this.origin = origin;
|
||||||
|
this.size = size;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean test(BlockPos t) {
|
||||||
|
return bb.isVecInside(t);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Stream<BlockPos> all() {
|
||||||
|
return BlockPos.func_229383_a_(bb);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return origin.hashCode() ^ size.hashCode();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Vec3d getCenter() {
|
||||||
|
return new AxisAlignedBB(new BlockPos(origin), new BlockPos(origin).add(size)
|
||||||
|
.add(1, 1, 1)).getCenter();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public OutlineParams makeOutline(Outliner outliner) {
|
||||||
|
return outliner.showAABB(this, new AxisAlignedBB(new BlockPos(origin), new BlockPos(origin).add(size)
|
||||||
|
.add(1, 1, 1)));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,42 @@
|
||||||
|
package com.simibubi.create.foundation.ponder.content;
|
||||||
|
|
||||||
|
import com.simibubi.create.foundation.ponder.PonderStoryBoard;
|
||||||
|
import com.simibubi.create.foundation.ponder.Select;
|
||||||
|
import com.simibubi.create.foundation.ponder.PonderScene.SceneBuilder;
|
||||||
|
import com.simibubi.create.foundation.ponder.PonderScene.SceneBuilder.SceneBuildingUtil;
|
||||||
|
|
||||||
|
import net.minecraft.util.Direction;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
|
||||||
|
public class CogwheelStory extends PonderStoryBoard {
|
||||||
|
|
||||||
|
public CogwheelStory() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getSchematicName() {
|
||||||
|
return "cogwheel/first";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getStoryTitle() {
|
||||||
|
return "My First Ponder Story, Parrots";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void program(SceneBuilder scene, SceneBuildingUtil util) {
|
||||||
|
|
||||||
|
scene.movePOI(new Vec3d(3.5, 4, 4.5));
|
||||||
|
scene.showBasePlate();
|
||||||
|
scene.idle(10);
|
||||||
|
|
||||||
|
scene.createParrotSpinningOn(new BlockPos(1, 4, 2), Direction.DOWN);
|
||||||
|
scene.showSection(util.layersFrom(1), Direction.DOWN);
|
||||||
|
|
||||||
|
scene.idle(10);
|
||||||
|
scene.rotateCameraY(180);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,198 @@
|
||||||
|
package com.simibubi.create.foundation.ponder.content;
|
||||||
|
|
||||||
|
import static com.simibubi.create.foundation.ponder.content.PonderPalette.WHITE;
|
||||||
|
|
||||||
|
import com.simibubi.create.AllBlocks;
|
||||||
|
import com.simibubi.create.AllItems;
|
||||||
|
import com.simibubi.create.content.contraptions.base.IRotate.SpeedLevel;
|
||||||
|
import com.simibubi.create.content.contraptions.particle.RotationIndicatorParticleData;
|
||||||
|
import com.simibubi.create.foundation.ponder.PonderRegistry;
|
||||||
|
import com.simibubi.create.foundation.ponder.PonderScene.SceneBuilder;
|
||||||
|
import com.simibubi.create.foundation.ponder.PonderScene.SceneBuilder.SceneBuildingUtil;
|
||||||
|
import com.simibubi.create.foundation.ponder.PonderStoryBoard;
|
||||||
|
import com.simibubi.create.foundation.ponder.Select;
|
||||||
|
import com.simibubi.create.foundation.ponder.instructions.EmitParticlesInstruction;
|
||||||
|
import com.simibubi.create.foundation.ponder.instructions.EmitParticlesInstruction.Emitter;
|
||||||
|
import com.tterrag.registrate.util.entry.ItemEntry;
|
||||||
|
|
||||||
|
import net.minecraft.block.Blocks;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.particles.ParticleTypes;
|
||||||
|
import net.minecraft.util.Direction;
|
||||||
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
|
||||||
|
public abstract class DebugScenes extends PonderStoryBoard {
|
||||||
|
|
||||||
|
private int index;
|
||||||
|
|
||||||
|
public static void registerAll() {
|
||||||
|
ItemEntry<Item> item = AllItems.BRASS_HAND;
|
||||||
|
int i = 0;
|
||||||
|
PonderRegistry.addStoryBoard(item, new CoordinateScene(++i));
|
||||||
|
PonderRegistry.addStoryBoard(item, new BlocksScene(++i));
|
||||||
|
PonderRegistry.addStoryBoard(item, new FluidsScene(++i));
|
||||||
|
PonderRegistry.addStoryBoard(item, new OffScreenScene(++i));
|
||||||
|
PonderRegistry.addStoryBoard(item, new ParticlesScene(++i));
|
||||||
|
}
|
||||||
|
|
||||||
|
public DebugScenes(int index) {
|
||||||
|
this.index = index;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final String getSchematicName() {
|
||||||
|
return "debug/scene_" + index;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getStoryTitle() {
|
||||||
|
return "Debug Scene " + index + (getTitle().isEmpty() ? "" : ": " + getTitle());
|
||||||
|
}
|
||||||
|
|
||||||
|
protected String getTitle() {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
static class CoordinateScene extends DebugScenes {
|
||||||
|
|
||||||
|
public CoordinateScene(int index) {
|
||||||
|
super(index);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void program(SceneBuilder scene, SceneBuildingUtil util) {
|
||||||
|
scene.showBasePlate();
|
||||||
|
scene.idle(10);
|
||||||
|
scene.showSection(util.layersFrom(1), Direction.DOWN);
|
||||||
|
// scene.showTargetedText(WHITE, new Vec3d(1.5, 1.5, 1.5), "coordinate", "Schematic orientation: ", 40);
|
||||||
|
|
||||||
|
scene.idle(10);
|
||||||
|
scene.showSelectionWithText(PonderPalette.RED, Select.fromTo(2, 1, 1, 4, 1, 1), "x", "Das X axis", 20);
|
||||||
|
scene.idle(20);
|
||||||
|
scene.showSelectionWithText(PonderPalette.GREEN, Select.fromTo(1, 2, 1, 1, 4, 1), "y", "Das Y axis", 20);
|
||||||
|
scene.idle(20);
|
||||||
|
scene.showSelectionWithText(PonderPalette.BLUE, Select.fromTo(1, 1, 2, 1, 1, 4), "z", "Das Z axis", 20);
|
||||||
|
scene.idle(10);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String getTitle() {
|
||||||
|
return "Coordinate Space";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static class BlocksScene extends DebugScenes {
|
||||||
|
|
||||||
|
public BlocksScene(int index) {
|
||||||
|
super(index);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void program(SceneBuilder scene, SceneBuildingUtil util) {
|
||||||
|
scene.showBasePlate();
|
||||||
|
scene.idle(10);
|
||||||
|
scene.showSection(util.layersFrom(1), Direction.DOWN);
|
||||||
|
scene.idle(10);
|
||||||
|
scene.showText(WHITE, 10, "change_blocks", "Blocks can be modified", 1000);
|
||||||
|
scene.idle(20);
|
||||||
|
scene.replaceBlocks(Select.fromTo(1, 1, 2, 2, 2, 4), AllBlocks.REFINED_RADIANCE_CASING.getDefaultState());
|
||||||
|
scene.idle(10);
|
||||||
|
scene.replaceBlocks(Select.pos(3, 1, 1), Blocks.GOLD_BLOCK.getDefaultState());
|
||||||
|
scene.markAsFinished();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String getTitle() {
|
||||||
|
return "Changing Blocks";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static class FluidsScene extends DebugScenes {
|
||||||
|
|
||||||
|
public FluidsScene(int index) {
|
||||||
|
super(index);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void program(SceneBuilder scene, SceneBuildingUtil util) {
|
||||||
|
scene.showBasePlate();
|
||||||
|
scene.idle(10);
|
||||||
|
scene.showSection(util.layersFrom(1), Direction.DOWN);
|
||||||
|
scene.showTargetedText(WHITE, new Vec3d(1, 2.5, 4.5), "fluids", "Fluid rendering test.", 1000);
|
||||||
|
scene.markAsFinished();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String getTitle() {
|
||||||
|
return "Showing Fluids";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static class ParticlesScene extends DebugScenes {
|
||||||
|
|
||||||
|
public ParticlesScene(int index) {
|
||||||
|
super(index);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void program(SceneBuilder scene, SceneBuildingUtil util) {
|
||||||
|
scene.showBasePlate();
|
||||||
|
scene.idle(10);
|
||||||
|
scene.showSection(util.layersFrom(1), Direction.DOWN);
|
||||||
|
scene.idle(10);
|
||||||
|
|
||||||
|
Vec3d emitterPos = util.vector(2.5, 2.25, 2.5);
|
||||||
|
Emitter emitter = Emitter.simple(ParticleTypes.LAVA, util.vector(0, .1, 0));
|
||||||
|
Emitter rotation =
|
||||||
|
Emitter.simple(new RotationIndicatorParticleData(SpeedLevel.MEDIUM.getColor(), 12, 1, 1, 20, 'Y'),
|
||||||
|
util.vector(0, .1, 0));
|
||||||
|
|
||||||
|
scene.showTargetedText(WHITE, emitterPos, "incoming", "Incoming...", 20);
|
||||||
|
scene.idle(30);
|
||||||
|
scene.addInstruction(new EmitParticlesInstruction(emitterPos, emitter, 1, 60));
|
||||||
|
scene.addInstruction(new EmitParticlesInstruction(emitterPos, rotation, 20, 1));
|
||||||
|
scene.idle(30);
|
||||||
|
scene.rotateCameraY(180);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String getTitle() {
|
||||||
|
return "Emitting particles";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static class OffScreenScene extends DebugScenes {
|
||||||
|
|
||||||
|
public OffScreenScene(int index) {
|
||||||
|
super(index);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void program(SceneBuilder scene, SceneBuildingUtil util) {
|
||||||
|
scene.configureBasePlate(1, 0, 6);
|
||||||
|
scene.showBasePlate();
|
||||||
|
Select out1 = Select.fromTo(7, 0, 0, 8, 0, 5);
|
||||||
|
Select out2 = Select.fromTo(0, 0, 0, 0, 0, 5);
|
||||||
|
scene.idle(10);
|
||||||
|
scene.showSection(Select.compound(util.layersFrom(1), out1, out2), Direction.DOWN);
|
||||||
|
scene.idle(10);
|
||||||
|
|
||||||
|
scene.showSelectionWithText(PonderPalette.BLACK, out1, "outofbounds",
|
||||||
|
"Blocks outside of the base plate do not affect scaling", 100);
|
||||||
|
scene.showSelectionWithText(PonderPalette.BLACK, out2, "thanks_to_configureBasePlate",
|
||||||
|
"configureBasePlate() makes sure of that.", 100);
|
||||||
|
scene.markAsFinished();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String getTitle() {
|
||||||
|
return "Out of bounds / configureBasePlate";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,27 @@
|
||||||
|
package com.simibubi.create.foundation.ponder.content;
|
||||||
|
|
||||||
|
import com.simibubi.create.AllBlocks;
|
||||||
|
import com.simibubi.create.foundation.ponder.PonderRegistry;
|
||||||
|
|
||||||
|
public class PonderIndex {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When true, lang files are bypassed and any text in ponder can be hot-swapped
|
||||||
|
* without the need of runData
|
||||||
|
*/
|
||||||
|
public static final boolean EDITOR_MODE = true;
|
||||||
|
|
||||||
|
public static void register() {
|
||||||
|
// Register storyboards here (Requires re-launch)
|
||||||
|
|
||||||
|
PonderRegistry.addStoryBoard(AllBlocks.COGWHEEL, new CogwheelStory());
|
||||||
|
PonderRegistry.addStoryBoard(AllBlocks.COGWHEEL, new CogwheelStory());
|
||||||
|
PonderRegistry.addStoryBoard(AllBlocks.COGWHEEL, new CogwheelStory());
|
||||||
|
|
||||||
|
PonderRegistry.addStoryBoard(AllBlocks.SHAFT, new ShaftAsRelay());
|
||||||
|
PonderRegistry.addStoryBoard(AllBlocks.SHAFT, new ShaftsCanBeEncased());
|
||||||
|
|
||||||
|
DebugScenes.registerAll();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,27 @@
|
||||||
|
package com.simibubi.create.foundation.ponder.content;
|
||||||
|
|
||||||
|
public enum PonderPalette {
|
||||||
|
|
||||||
|
WHITE(0xFF_eeeeee),
|
||||||
|
BLACK(0xFF_221111),
|
||||||
|
|
||||||
|
RED(0xFF_ff5d6c),
|
||||||
|
GREEN(0xFF_8cba51),
|
||||||
|
BLUE(0xFF_5f6caf),
|
||||||
|
|
||||||
|
SLOW(0xFF_22ff22),
|
||||||
|
MEDIUM(0xFF_0084ff),
|
||||||
|
FAST(0xFF_ff55ff),
|
||||||
|
|
||||||
|
;
|
||||||
|
|
||||||
|
private int color;
|
||||||
|
|
||||||
|
private PonderPalette(int color) {
|
||||||
|
this.color = color;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getColor() {
|
||||||
|
return color;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,54 @@
|
||||||
|
package com.simibubi.create.foundation.ponder.content;
|
||||||
|
|
||||||
|
import static com.simibubi.create.foundation.ponder.content.PonderPalette.WHITE;
|
||||||
|
|
||||||
|
import com.simibubi.create.foundation.ponder.PonderScene.SceneBuilder;
|
||||||
|
import com.simibubi.create.foundation.ponder.PonderScene.SceneBuilder.SceneBuildingUtil;
|
||||||
|
import com.simibubi.create.foundation.ponder.PonderStoryBoard;
|
||||||
|
import com.simibubi.create.foundation.ponder.Select;
|
||||||
|
|
||||||
|
import net.minecraft.util.Direction;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
import net.minecraft.util.math.Vec3i;
|
||||||
|
|
||||||
|
class ShaftAsRelay extends PonderStoryBoard {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getSchematicName() {
|
||||||
|
return "shaft/shaft";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getStoryTitle() {
|
||||||
|
return "Relaying rotational force using Shafts";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void program(SceneBuilder scene, SceneBuildingUtil util) {
|
||||||
|
scene.showBasePlate();
|
||||||
|
|
||||||
|
Select encased = util.column(4, 2);
|
||||||
|
Select gauge = util.column(0, 2);
|
||||||
|
Select shafts = Select.cuboid(new BlockPos(1, 1, 2), new Vec3i(2, 0, 0));
|
||||||
|
|
||||||
|
scene.idle(10);
|
||||||
|
scene.showSection(encased, Direction.DOWN);
|
||||||
|
scene.idle(10);
|
||||||
|
scene.showSection(gauge, Direction.DOWN);
|
||||||
|
scene.setKineticSpeed(gauge, 0);
|
||||||
|
|
||||||
|
scene.idle(20);
|
||||||
|
scene.showSection(shafts, Direction.DOWN);
|
||||||
|
scene.setKineticSpeed(gauge, -112);
|
||||||
|
|
||||||
|
scene.idle(10);
|
||||||
|
scene.showTargetedText(WHITE, new Vec3d(3, 1.5, 2.5), "shaft_relay",
|
||||||
|
"Shafts seem to relay rotation in a straight line.", 1000);
|
||||||
|
|
||||||
|
scene.idle(20);
|
||||||
|
scene.markAsFinished();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,55 @@
|
||||||
|
package com.simibubi.create.foundation.ponder.content;
|
||||||
|
|
||||||
|
import static com.simibubi.create.foundation.ponder.content.PonderPalette.WHITE;
|
||||||
|
|
||||||
|
import com.simibubi.create.AllBlocks;
|
||||||
|
import com.simibubi.create.content.contraptions.relays.encased.EncasedShaftBlock;
|
||||||
|
import com.simibubi.create.foundation.ponder.PonderScene.SceneBuilder;
|
||||||
|
import com.simibubi.create.foundation.ponder.PonderScene.SceneBuilder.SceneBuildingUtil;
|
||||||
|
import com.simibubi.create.foundation.ponder.PonderStoryBoard;
|
||||||
|
import com.simibubi.create.foundation.ponder.Select;
|
||||||
|
|
||||||
|
import net.minecraft.util.Direction;
|
||||||
|
import net.minecraft.util.Direction.Axis;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
import net.minecraft.util.math.Vec3i;
|
||||||
|
|
||||||
|
class ShaftsCanBeEncased extends PonderStoryBoard {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getSchematicName() {
|
||||||
|
return "shaft/encasing_shafts";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getStoryTitle() {
|
||||||
|
return "Encasing Shafts";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void program(SceneBuilder scene, SceneBuildingUtil util) {
|
||||||
|
scene.showBasePlate();
|
||||||
|
|
||||||
|
Select shaft = Select.cuboid(new BlockPos(0, 1, 2), new Vec3i(4, 0, 2));
|
||||||
|
Select andesite = Select.pos(3, 1, 2);
|
||||||
|
Select brass = Select.pos(1, 1, 2);
|
||||||
|
|
||||||
|
scene.showSection(shaft, Direction.DOWN);
|
||||||
|
scene.idle(20);
|
||||||
|
|
||||||
|
scene.setBlocks(andesite, AllBlocks.ANDESITE_ENCASED_SHAFT.getDefaultState()
|
||||||
|
.with(EncasedShaftBlock.AXIS, Axis.X));
|
||||||
|
scene.setKineticSpeed(shaft, -112);
|
||||||
|
scene.idle(10);
|
||||||
|
|
||||||
|
scene.setBlocks(brass, AllBlocks.BRASS_ENCASED_SHAFT.getDefaultState()
|
||||||
|
.with(EncasedShaftBlock.AXIS, Axis.X));
|
||||||
|
scene.setKineticSpeed(shaft, -112);
|
||||||
|
|
||||||
|
scene.idle(10);
|
||||||
|
scene.showTargetedText(WHITE, new Vec3d(1.5, 2, 2.5), "shaft_can_be_encased",
|
||||||
|
"I could use Brass or Andesite Casing to hide them.", 1000);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
package com.simibubi.create.foundation.ponder.content;
|
||||||
|
|
||||||
|
import com.simibubi.create.foundation.ponder.PonderLocalization;
|
||||||
|
|
||||||
|
public class SharedText {
|
||||||
|
|
||||||
|
public static void gatherText() {
|
||||||
|
// Add entries used across several ponder scenes (Safe for hotswap)
|
||||||
|
|
||||||
|
add("when_wrenched", "When Wrenched");
|
||||||
|
add("more_shared", "This is Shared stuff");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String get(String key) {
|
||||||
|
return PonderLocalization.getShared(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void add(String k, String v) {
|
||||||
|
PonderLocalization.registerShared(k, v);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,29 @@
|
||||||
|
package com.simibubi.create.foundation.ponder.elements;
|
||||||
|
|
||||||
|
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||||
|
import com.simibubi.create.foundation.ponder.PonderScene;
|
||||||
|
import com.simibubi.create.foundation.ponder.PonderUI;
|
||||||
|
import com.simibubi.create.foundation.utility.LerpedFloat;
|
||||||
|
|
||||||
|
public abstract class AnimatedOverlayElement extends PonderOverlayElement {
|
||||||
|
|
||||||
|
protected LerpedFloat fade;
|
||||||
|
|
||||||
|
public AnimatedOverlayElement() {
|
||||||
|
fade = LerpedFloat.linear()
|
||||||
|
.startWithValue(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFade(float fade) {
|
||||||
|
this.fade.setValue(fade);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final void render(PonderScene scene, PonderUI screen, MatrixStack ms, float partialTicks) {
|
||||||
|
float currentFade = fade.getValue(partialTicks);
|
||||||
|
render(scene, screen, ms, partialTicks, currentFade);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected abstract void render(PonderScene scene, PonderUI screen, MatrixStack ms, float partialTicks, float fade);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,80 @@
|
||||||
|
package com.simibubi.create.foundation.ponder.elements;
|
||||||
|
|
||||||
|
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||||
|
import com.simibubi.create.foundation.ponder.PonderWorld;
|
||||||
|
import com.simibubi.create.foundation.utility.LerpedFloat;
|
||||||
|
import com.simibubi.create.foundation.utility.MatrixStacker;
|
||||||
|
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||||
|
import net.minecraft.client.renderer.RenderType;
|
||||||
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
|
||||||
|
public abstract class AnimatedSceneElement extends PonderSceneElement {
|
||||||
|
|
||||||
|
protected Vec3d fadeVec;
|
||||||
|
protected LerpedFloat fade;
|
||||||
|
|
||||||
|
public AnimatedSceneElement() {
|
||||||
|
fade = LerpedFloat.linear()
|
||||||
|
.startWithValue(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFade(float fade) {
|
||||||
|
this.fade.setValue(fade);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFadeVec(Vec3d fadeVec) {
|
||||||
|
this.fadeVec = fadeVec;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final void renderFirst(PonderWorld world, IRenderTypeBuffer buffer, MatrixStack ms) {
|
||||||
|
ms.push();
|
||||||
|
float currentFade = applyFade(ms);
|
||||||
|
renderFirst(world, buffer, ms, currentFade);
|
||||||
|
ms.pop();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final void renderLayer(PonderWorld world, IRenderTypeBuffer buffer, RenderType type, MatrixStack ms) {
|
||||||
|
ms.push();
|
||||||
|
float currentFade = applyFade(ms);
|
||||||
|
renderLayer(world, buffer, type, ms, currentFade);
|
||||||
|
ms.pop();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final void renderLast(PonderWorld world, IRenderTypeBuffer buffer, MatrixStack ms) {
|
||||||
|
ms.push();
|
||||||
|
float currentFade = applyFade(ms);
|
||||||
|
renderLast(world, buffer, ms, currentFade);
|
||||||
|
ms.pop();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected float applyFade(MatrixStack ms) {
|
||||||
|
float currentFade = fade.getValue(Minecraft.getInstance()
|
||||||
|
.getRenderPartialTicks());
|
||||||
|
if (fadeVec != null)
|
||||||
|
MatrixStacker.of(ms)
|
||||||
|
.translate(fadeVec.scale(-1 + currentFade));
|
||||||
|
return currentFade;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void renderLayer(PonderWorld world, IRenderTypeBuffer buffer, RenderType type, MatrixStack ms,
|
||||||
|
float fade) {}
|
||||||
|
|
||||||
|
protected void renderFirst(PonderWorld world, IRenderTypeBuffer buffer, MatrixStack ms, float fade) {}
|
||||||
|
|
||||||
|
protected void renderLast(PonderWorld world, IRenderTypeBuffer buffer, MatrixStack ms, float fade) {}
|
||||||
|
|
||||||
|
protected int lightCoordsFromFade(float fade) {
|
||||||
|
int light = 0xF000F0;
|
||||||
|
if (fade != 1) {
|
||||||
|
light = (int) (0xF * fade);
|
||||||
|
light = light << 4 | light << 20;
|
||||||
|
}
|
||||||
|
return light;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,26 @@
|
||||||
|
package com.simibubi.create.foundation.ponder.elements;
|
||||||
|
|
||||||
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
|
import com.simibubi.create.foundation.ponder.PonderScene;
|
||||||
|
import com.simibubi.create.foundation.utility.outliner.Outliner;
|
||||||
|
|
||||||
|
public class OutlinerElement extends AnimatedSceneElement {
|
||||||
|
|
||||||
|
private Consumer<Outliner> outlinerCall;
|
||||||
|
|
||||||
|
public OutlinerElement(Consumer<Outliner> outlinerCall) {
|
||||||
|
this.outlinerCall = outlinerCall;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void tick(PonderScene scene) {
|
||||||
|
super.tick(scene);
|
||||||
|
if (fade.getValue() < 1/16f)
|
||||||
|
return;
|
||||||
|
if (fade.getValue(0) > fade.getValue(1))
|
||||||
|
return;
|
||||||
|
outlinerCall.accept(scene.getOutliner());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,119 @@
|
||||||
|
package com.simibubi.create.foundation.ponder.elements;
|
||||||
|
|
||||||
|
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||||
|
import com.simibubi.create.Create;
|
||||||
|
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||||
|
import com.simibubi.create.foundation.ponder.PonderScene;
|
||||||
|
import com.simibubi.create.foundation.ponder.PonderWorld;
|
||||||
|
import com.simibubi.create.foundation.utility.MatrixStacker;
|
||||||
|
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||||
|
import net.minecraft.client.renderer.entity.EntityRendererManager;
|
||||||
|
import net.minecraft.command.arguments.EntityAnchorArgument;
|
||||||
|
import net.minecraft.entity.EntityType;
|
||||||
|
import net.minecraft.entity.passive.ParrotEntity;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.util.math.MathHelper;
|
||||||
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
|
||||||
|
public class ParrotElement extends AnimatedSceneElement {
|
||||||
|
|
||||||
|
private Vec3d location;
|
||||||
|
private ParrotEntity entity;
|
||||||
|
private ParrotPose pose;
|
||||||
|
|
||||||
|
public static ParrotElement lookAtPOI(Vec3d location) {
|
||||||
|
ParrotElement parrotElement = new ParrotElement(location);
|
||||||
|
parrotElement.pose = parrotElement.new FacePointOfInterestPose();
|
||||||
|
return parrotElement;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ParrotElement spinOnComponent(Vec3d location, BlockPos componentPos) {
|
||||||
|
ParrotElement parrotElement = new ParrotElement(location);
|
||||||
|
parrotElement.pose = parrotElement.new SpinOnComponentPose(componentPos);
|
||||||
|
return parrotElement;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected ParrotElement(Vec3d location) {
|
||||||
|
this.location = location;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void tick(PonderScene scene) {
|
||||||
|
super.tick(scene);
|
||||||
|
if (entity == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
entity.ticksExisted++;
|
||||||
|
entity.prevRotationYawHead = entity.rotationYawHead;
|
||||||
|
entity.oFlapSpeed = entity.flapSpeed;
|
||||||
|
entity.oFlap = entity.flap;
|
||||||
|
entity.onGround = true;
|
||||||
|
|
||||||
|
pose.tick(scene);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void renderLast(PonderWorld world, IRenderTypeBuffer buffer, MatrixStack ms, float fade) {
|
||||||
|
EntityRendererManager entityrenderermanager = Minecraft.getInstance()
|
||||||
|
.getRenderManager();
|
||||||
|
float pt = Minecraft.getInstance()
|
||||||
|
.getRenderPartialTicks();
|
||||||
|
|
||||||
|
if (entity == null)
|
||||||
|
pose.create(world);
|
||||||
|
|
||||||
|
ms.push();
|
||||||
|
ms.translate(location.x, location.y, location.z);
|
||||||
|
|
||||||
|
MatrixStacker.of(ms)
|
||||||
|
.rotateY(MathHelper.lerp(pt, entity.prevRotationYaw, entity.rotationYaw));
|
||||||
|
|
||||||
|
entityrenderermanager.render(entity, 0, 0, 0, 0, pt, ms, buffer, lightCoordsFromFade(fade));
|
||||||
|
ms.pop();
|
||||||
|
}
|
||||||
|
|
||||||
|
abstract class ParrotPose {
|
||||||
|
|
||||||
|
abstract void tick(PonderScene scene);
|
||||||
|
|
||||||
|
void create(PonderWorld world) {
|
||||||
|
entity = new ParrotEntity(EntityType.PARROT, world);
|
||||||
|
entity.setVariant(Create.random.nextInt(5));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
class SpinOnComponentPose extends ParrotPose {
|
||||||
|
|
||||||
|
private BlockPos componentPos;
|
||||||
|
|
||||||
|
public SpinOnComponentPose(BlockPos componentPos) {
|
||||||
|
this.componentPos = componentPos;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void tick(PonderScene scene) {
|
||||||
|
TileEntity tileEntity = scene.getWorld()
|
||||||
|
.getTileEntity(componentPos);
|
||||||
|
if (!(tileEntity instanceof KineticTileEntity))
|
||||||
|
return;
|
||||||
|
float rpm = ((KineticTileEntity) tileEntity).getSpeed();
|
||||||
|
entity.prevRotationYaw = entity.rotationYaw;
|
||||||
|
entity.rotationYaw += (rpm * .3f);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
class FacePointOfInterestPose extends ParrotPose {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void tick(PonderScene scene) {
|
||||||
|
entity.lookAt(EntityAnchorArgument.Type.EYES, scene.getPointOfInterest());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
package com.simibubi.create.foundation.ponder.elements;
|
||||||
|
|
||||||
|
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||||
|
import com.simibubi.create.foundation.ponder.PonderElement;
|
||||||
|
import com.simibubi.create.foundation.ponder.PonderScene;
|
||||||
|
import com.simibubi.create.foundation.ponder.PonderUI;
|
||||||
|
|
||||||
|
public abstract class PonderOverlayElement extends PonderElement {
|
||||||
|
|
||||||
|
public void tick(PonderScene scene) {}
|
||||||
|
|
||||||
|
public abstract void render(PonderScene scene, PonderUI screen, MatrixStack ms, float partialTicks);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.simibubi.create.foundation.ponder.elements;
|
||||||
|
|
||||||
|
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||||
|
import com.simibubi.create.foundation.ponder.PonderElement;
|
||||||
|
import com.simibubi.create.foundation.ponder.PonderWorld;
|
||||||
|
|
||||||
|
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||||
|
import net.minecraft.client.renderer.RenderType;
|
||||||
|
|
||||||
|
public abstract class PonderSceneElement extends PonderElement {
|
||||||
|
|
||||||
|
public abstract void renderFirst(PonderWorld world, IRenderTypeBuffer buffer, MatrixStack ms);
|
||||||
|
|
||||||
|
public abstract void renderLayer(PonderWorld world, IRenderTypeBuffer buffer, RenderType type, MatrixStack ms);
|
||||||
|
|
||||||
|
public abstract void renderLast(PonderWorld world, IRenderTypeBuffer buffer, MatrixStack ms);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,89 @@
|
||||||
|
package com.simibubi.create.foundation.ponder.elements;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
|
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||||
|
import com.mojang.blaze3d.systems.RenderSystem;
|
||||||
|
import com.simibubi.create.foundation.ponder.PonderScene;
|
||||||
|
import com.simibubi.create.foundation.ponder.PonderUI;
|
||||||
|
import com.simibubi.create.foundation.utility.ColorHelper;
|
||||||
|
|
||||||
|
import net.minecraft.util.math.MathHelper;
|
||||||
|
import net.minecraft.util.math.Vec2f;
|
||||||
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||||
|
|
||||||
|
public class TextWindowElement extends AnimatedOverlayElement {
|
||||||
|
|
||||||
|
Supplier<String> textGetter;
|
||||||
|
String bakedText;
|
||||||
|
|
||||||
|
// from 0 to 200
|
||||||
|
int y;
|
||||||
|
|
||||||
|
Vec3d vec;
|
||||||
|
int color;
|
||||||
|
|
||||||
|
public TextWindowElement(Supplier<String> textGetter) {
|
||||||
|
this.textGetter = textGetter;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void colored(int color) {
|
||||||
|
this.color = color;
|
||||||
|
}
|
||||||
|
|
||||||
|
public TextWindowElement pointAt(Vec3d vec) {
|
||||||
|
this.vec = vec;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public TextWindowElement setY(int y) {
|
||||||
|
this.y = y;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void render(PonderScene scene, PonderUI screen, MatrixStack ms, float partialTicks, float fade) {
|
||||||
|
if (bakedText == null)
|
||||||
|
bakedText = textGetter.get();
|
||||||
|
if (fade < 1 / 16f)
|
||||||
|
return;
|
||||||
|
Vec2f sceneToScreen = vec != null ? scene.getTransform()
|
||||||
|
.sceneToScreen(vec) : new Vec2f(0, (screen.height - 200) / 2 + y - 8);
|
||||||
|
|
||||||
|
float yDiff = (screen.height / 2 - sceneToScreen.y - 10) / 100f;
|
||||||
|
int targetX = (int) (screen.width * MathHelper.lerp(yDiff * yDiff, 6f / 8, 5f / 8));
|
||||||
|
int textWidth = screen.width - targetX;
|
||||||
|
|
||||||
|
List<String> list = screen.getFontRenderer()
|
||||||
|
.listFormattedStringToWidth(bakedText, textWidth);
|
||||||
|
int boxWidth = 0;
|
||||||
|
for (String string : list)
|
||||||
|
boxWidth = Math.max(boxWidth, screen.getFontRenderer()
|
||||||
|
.getStringWidth(string));
|
||||||
|
int boxHeight = screen.getFontRenderer()
|
||||||
|
.getWordWrappedHeight(bakedText, textWidth);
|
||||||
|
|
||||||
|
RenderSystem.pushMatrix();
|
||||||
|
RenderSystem.translatef(0, sceneToScreen.y, 400);
|
||||||
|
|
||||||
|
PonderUI.renderBox(targetX - 10, 3, boxWidth, boxHeight - 1, 0xaa000000, 0x30eebb00, 0x10eebb00);
|
||||||
|
|
||||||
|
int brighterColor = ColorHelper.mixAlphaColors(color, 0xFFffffdd, 1 / 2f);
|
||||||
|
if (vec != null) {
|
||||||
|
RenderSystem.pushMatrix();
|
||||||
|
RenderSystem.translatef(sceneToScreen.x, 0, 0);
|
||||||
|
double lineTarget = (targetX - sceneToScreen.x) * fade;
|
||||||
|
RenderSystem.scaled(lineTarget, 1, 1);
|
||||||
|
GuiUtils.drawGradientRect(-100, 0, 0, 1, 1, brighterColor, brighterColor);
|
||||||
|
GuiUtils.drawGradientRect(-100, 0, 1, 1, 2, 0xFF494949, 0xFF393939);
|
||||||
|
RenderSystem.popMatrix();
|
||||||
|
}
|
||||||
|
|
||||||
|
screen.getFontRenderer()
|
||||||
|
.drawSplitString(bakedText, targetX - 10, 3, textWidth, ColorHelper.applyAlpha(brighterColor, fade));
|
||||||
|
RenderSystem.popMatrix();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package com.simibubi.create.foundation.metadoc.elements;
|
package com.simibubi.create.foundation.ponder.elements;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -10,8 +10,9 @@ import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||||
import com.simibubi.create.CreateClient;
|
import com.simibubi.create.CreateClient;
|
||||||
import com.simibubi.create.foundation.metadoc.MetaDocWorld;
|
import com.simibubi.create.foundation.ponder.PonderScene;
|
||||||
import com.simibubi.create.foundation.metadoc.Select;
|
import com.simibubi.create.foundation.ponder.PonderWorld;
|
||||||
|
import com.simibubi.create.foundation.ponder.Select;
|
||||||
import com.simibubi.create.foundation.utility.SuperByteBuffer;
|
import com.simibubi.create.foundation.utility.SuperByteBuffer;
|
||||||
import com.simibubi.create.foundation.utility.SuperByteBufferCache;
|
import com.simibubi.create.foundation.utility.SuperByteBufferCache;
|
||||||
import com.simibubi.create.foundation.utility.SuperByteBufferCache.Compartment;
|
import com.simibubi.create.foundation.utility.SuperByteBufferCache.Compartment;
|
||||||
|
@ -19,6 +20,7 @@ import com.simibubi.create.foundation.utility.TileEntityRenderHelper;
|
||||||
|
|
||||||
import net.minecraft.block.BlockRenderType;
|
import net.minecraft.block.BlockRenderType;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.block.Blocks;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.renderer.BlockModelRenderer;
|
import net.minecraft.client.renderer.BlockModelRenderer;
|
||||||
import net.minecraft.client.renderer.BlockRendererDispatcher;
|
import net.minecraft.client.renderer.BlockRendererDispatcher;
|
||||||
|
@ -26,9 +28,9 @@ import net.minecraft.client.renderer.BufferBuilder;
|
||||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||||
import net.minecraft.client.renderer.RenderType;
|
import net.minecraft.client.renderer.RenderType;
|
||||||
import net.minecraft.client.renderer.RenderTypeLookup;
|
import net.minecraft.client.renderer.RenderTypeLookup;
|
||||||
import net.minecraft.client.renderer.model.IBakedModel;
|
|
||||||
import net.minecraft.client.renderer.texture.OverlayTexture;
|
import net.minecraft.client.renderer.texture.OverlayTexture;
|
||||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||||
|
import net.minecraft.fluid.IFluidState;
|
||||||
import net.minecraft.tileentity.ITickableTileEntity;
|
import net.minecraft.tileentity.ITickableTileEntity;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.math.MathHelper;
|
import net.minecraft.util.math.MathHelper;
|
||||||
|
@ -47,11 +49,11 @@ public class WorldSectionElement extends AnimatedSceneElement {
|
||||||
this.section = section;
|
this.section = section;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void queueRedraw(MetaDocWorld world) {
|
public void queueRedraw(PonderWorld world) {
|
||||||
redraw = true;
|
redraw = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void tick() {
|
public void tick(PonderScene scene) {
|
||||||
if (renderedTileEntities == null)
|
if (renderedTileEntities == null)
|
||||||
return;
|
return;
|
||||||
renderedTileEntities.forEach(te -> {
|
renderedTileEntities.forEach(te -> {
|
||||||
|
@ -61,7 +63,13 @@ public class WorldSectionElement extends AnimatedSceneElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void render(MetaDocWorld world, IRenderTypeBuffer buffer, MatrixStack ms, float fade) {
|
protected void renderLayer(PonderWorld world, IRenderTypeBuffer buffer, RenderType type, MatrixStack ms,
|
||||||
|
float fade) {
|
||||||
|
renderStructure(world, ms, buffer, type, fade);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void renderFirst(PonderWorld world, IRenderTypeBuffer buffer, MatrixStack ms, float fade) {
|
||||||
int light = -1;
|
int light = -1;
|
||||||
if (fade != 1)
|
if (fade != 1)
|
||||||
light = (int) (MathHelper.lerp(fade, 5, 14));
|
light = (int) (MathHelper.lerp(fade, 5, 14));
|
||||||
|
@ -71,36 +79,33 @@ public class WorldSectionElement extends AnimatedSceneElement {
|
||||||
world.pushFakeLight(light);
|
world.pushFakeLight(light);
|
||||||
renderTileEntities(world, ms, buffer);
|
renderTileEntities(world, ms, buffer);
|
||||||
world.popLight();
|
world.popLight();
|
||||||
|
}
|
||||||
|
|
||||||
if (buffer instanceof IRenderTypeBuffer.Impl)
|
protected void renderStructure(PonderWorld world, MatrixStack ms, IRenderTypeBuffer buffer, RenderType type,
|
||||||
((IRenderTypeBuffer.Impl) buffer).draw();
|
float fade) {
|
||||||
renderStructure(world, ms, buffer, fade);
|
SuperByteBufferCache bufferCache = CreateClient.bufferCache;
|
||||||
|
int code = hashCode() ^ world.hashCode();
|
||||||
|
|
||||||
|
Pair<Integer, Integer> key = Pair.of(code, RenderType.getBlockLayers()
|
||||||
|
.indexOf(type));
|
||||||
|
if (redraw)
|
||||||
|
bufferCache.invalidate(DOC_WORLD_SECTION, key);
|
||||||
|
SuperByteBuffer contraptionBuffer =
|
||||||
|
bufferCache.get(DOC_WORLD_SECTION, key, () -> buildStructureBuffer(world, type));
|
||||||
|
if (contraptionBuffer.isEmpty())
|
||||||
|
return;
|
||||||
|
|
||||||
|
int light = lightCoordsFromFade(fade);
|
||||||
|
contraptionBuffer.light(light)
|
||||||
|
.renderInto(ms, buffer.getBuffer(type));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void renderLast(PonderWorld world, IRenderTypeBuffer buffer, MatrixStack ms, float fade) {
|
||||||
redraw = false;
|
redraw = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void renderStructure(MetaDocWorld world, MatrixStack ms, IRenderTypeBuffer buffer, float fade) {
|
private void renderTileEntities(PonderWorld world, MatrixStack ms, IRenderTypeBuffer buffer) {
|
||||||
SuperByteBufferCache bufferCache = CreateClient.bufferCache;
|
|
||||||
List<RenderType> blockLayers = RenderType.getBlockLayers();
|
|
||||||
int code = hashCode() ^ world.hashCode();
|
|
||||||
|
|
||||||
buffer.getBuffer(RenderType.getSolid());
|
|
||||||
for (int i = 0; i < blockLayers.size(); i++) {
|
|
||||||
RenderType layer = blockLayers.get(i);
|
|
||||||
Pair<Integer, Integer> key = Pair.of(code, i);
|
|
||||||
if (redraw)
|
|
||||||
bufferCache.invalidate(DOC_WORLD_SECTION, key);
|
|
||||||
SuperByteBuffer contraptionBuffer =
|
|
||||||
bufferCache.get(DOC_WORLD_SECTION, key, () -> buildStructureBuffer(world, layer));
|
|
||||||
if (contraptionBuffer.isEmpty())
|
|
||||||
continue;
|
|
||||||
|
|
||||||
int light = lightCoordsFromFade(fade);
|
|
||||||
contraptionBuffer.light(light)
|
|
||||||
.renderInto(ms, buffer.getBuffer(layer));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void renderTileEntities(MetaDocWorld world, MatrixStack ms, IRenderTypeBuffer buffer) {
|
|
||||||
if (renderedTileEntities == null) {
|
if (renderedTileEntities == null) {
|
||||||
renderedTileEntities = new ArrayList<>();
|
renderedTileEntities = new ArrayList<>();
|
||||||
section.all()
|
section.all()
|
||||||
|
@ -113,7 +118,7 @@ public class WorldSectionElement extends AnimatedSceneElement {
|
||||||
TileEntityRenderHelper.renderTileEntities(world, renderedTileEntities, ms, new MatrixStack(), buffer);
|
TileEntityRenderHelper.renderTileEntities(world, renderedTileEntities, ms, new MatrixStack(), buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
private SuperByteBuffer buildStructureBuffer(MetaDocWorld world, RenderType layer) {
|
private SuperByteBuffer buildStructureBuffer(PonderWorld world, RenderType layer) {
|
||||||
ForgeHooksClient.setRenderLayer(layer);
|
ForgeHooksClient.setRenderLayer(layer);
|
||||||
MatrixStack ms = new MatrixStack();
|
MatrixStack ms = new MatrixStack();
|
||||||
BlockRendererDispatcher dispatcher = Minecraft.getInstance()
|
BlockRendererDispatcher dispatcher = Minecraft.getInstance()
|
||||||
|
@ -127,16 +132,19 @@ public class WorldSectionElement extends AnimatedSceneElement {
|
||||||
section.all()
|
section.all()
|
||||||
.forEach(pos -> {
|
.forEach(pos -> {
|
||||||
BlockState state = world.getBlockState(pos);
|
BlockState state = world.getBlockState(pos);
|
||||||
if (state.getRenderType() == BlockRenderType.ENTITYBLOCK_ANIMATED)
|
IFluidState ifluidstate = world.getFluidState(pos);
|
||||||
return;
|
|
||||||
if (!RenderTypeLookup.canRenderInLayer(state, layer))
|
|
||||||
return;
|
|
||||||
|
|
||||||
IBakedModel originalModel = dispatcher.getModelForState(state);
|
|
||||||
ms.push();
|
ms.push();
|
||||||
ms.translate(pos.getX(), pos.getY(), pos.getZ());
|
ms.translate(pos.getX(), pos.getY(), pos.getZ());
|
||||||
blockRenderer.renderModel(world, originalModel, state, pos, ms, builder, true, random, 42,
|
|
||||||
OverlayTexture.DEFAULT_UV, EmptyModelData.INSTANCE);
|
if (state.getRenderType() != BlockRenderType.ENTITYBLOCK_ANIMATED && state.getBlock() != Blocks.AIR
|
||||||
|
&& RenderTypeLookup.canRenderInLayer(state, layer))
|
||||||
|
blockRenderer.renderModel(world, dispatcher.getModelForState(state), state, pos, ms, builder, true,
|
||||||
|
random, 42, OverlayTexture.DEFAULT_UV, EmptyModelData.INSTANCE);
|
||||||
|
|
||||||
|
if (!ifluidstate.isEmpty() && RenderTypeLookup.canRenderInLayer(ifluidstate, layer))
|
||||||
|
dispatcher.renderFluid(pos, world, builder, ifluidstate);
|
||||||
|
|
||||||
ms.pop();
|
ms.pop();
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package com.simibubi.create.foundation.metadoc.instructions;
|
package com.simibubi.create.foundation.ponder.instructions;
|
||||||
|
|
||||||
import com.simibubi.create.foundation.metadoc.elements.ParrotElement;
|
import com.simibubi.create.foundation.ponder.elements.ParrotElement;
|
||||||
|
|
||||||
import net.minecraft.util.Direction;
|
import net.minecraft.util.Direction;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package com.simibubi.create.foundation.metadoc.instructions;
|
package com.simibubi.create.foundation.ponder.instructions;
|
||||||
|
|
||||||
public class DelayInstruction extends TickingInstruction {
|
public class DelayInstruction extends TickingInstruction {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package com.simibubi.create.foundation.metadoc.instructions;
|
package com.simibubi.create.foundation.ponder.instructions;
|
||||||
|
|
||||||
import com.simibubi.create.foundation.metadoc.elements.WorldSectionElement;
|
import com.simibubi.create.foundation.ponder.elements.WorldSectionElement;
|
||||||
|
|
||||||
import net.minecraft.util.Direction;
|
import net.minecraft.util.Direction;
|
||||||
|
|
|
@ -0,0 +1,50 @@
|
||||||
|
package com.simibubi.create.foundation.ponder.instructions;
|
||||||
|
|
||||||
|
import com.simibubi.create.Create;
|
||||||
|
import com.simibubi.create.foundation.ponder.PonderScene;
|
||||||
|
import com.simibubi.create.foundation.ponder.PonderWorld;
|
||||||
|
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.client.particle.ParticleManager;
|
||||||
|
import net.minecraft.particles.IParticleData;
|
||||||
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
|
||||||
|
public class EmitParticlesInstruction extends TickingInstruction {
|
||||||
|
|
||||||
|
private Vec3d anchor;
|
||||||
|
private Emitter emitter;
|
||||||
|
private float runsPerTick;
|
||||||
|
|
||||||
|
@FunctionalInterface
|
||||||
|
public static interface Emitter {
|
||||||
|
|
||||||
|
public static <T extends IParticleData> Emitter simple(T data, Vec3d motion) {
|
||||||
|
return (w, x, y, z) -> w.addParticle(data, x, y, z, motion.x, motion.y, motion.z);
|
||||||
|
}
|
||||||
|
|
||||||
|
static ParticleManager paticleManager() {
|
||||||
|
return Minecraft.getInstance().particles;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void create(PonderWorld world, double x, double y, double z);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public EmitParticlesInstruction(Vec3d anchor, Emitter emitter, float runsPerTick, int ticks) {
|
||||||
|
super(false, ticks);
|
||||||
|
this.anchor = anchor;
|
||||||
|
this.emitter = emitter;
|
||||||
|
this.runsPerTick = runsPerTick;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void tick(PonderScene scene) {
|
||||||
|
super.tick(scene);
|
||||||
|
int runs = (int) runsPerTick;
|
||||||
|
if (Create.random.nextFloat() < (runsPerTick - runs))
|
||||||
|
runs++;
|
||||||
|
for (int i = 0; i < runs; i++)
|
||||||
|
emitter.create(scene.getWorld(), anchor.x, anchor.y, anchor.z);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
package com.simibubi.create.foundation.metadoc.instructions;
|
package com.simibubi.create.foundation.ponder.instructions;
|
||||||
|
|
||||||
import com.simibubi.create.foundation.metadoc.MetaDocScene;
|
import com.simibubi.create.foundation.ponder.PonderScene;
|
||||||
import com.simibubi.create.foundation.metadoc.elements.AnimatedSceneElement;
|
import com.simibubi.create.foundation.ponder.elements.AnimatedSceneElement;
|
||||||
|
|
||||||
import net.minecraft.util.Direction;
|
import net.minecraft.util.Direction;
|
||||||
import net.minecraft.util.math.Vec3d;
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
@ -18,7 +18,7 @@ public class FadeIntoSceneInstruction<T extends AnimatedSceneElement> extends Ti
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void firstTick(MetaDocScene scene) {
|
protected void firstTick(PonderScene scene) {
|
||||||
super.firstTick(scene);
|
super.firstTick(scene);
|
||||||
scene.addElement(element);
|
scene.addElement(element);
|
||||||
element.setFade(0);
|
element.setFade(0);
|
||||||
|
@ -26,7 +26,7 @@ public class FadeIntoSceneInstruction<T extends AnimatedSceneElement> extends Ti
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void tick(MetaDocScene scene) {
|
public void tick(PonderScene scene) {
|
||||||
super.tick(scene);
|
super.tick(scene);
|
||||||
float fade = (remainingTicks / (float) totalTicks);
|
float fade = (remainingTicks / (float) totalTicks);
|
||||||
element.setFade(1 - fade * fade);
|
element.setFade(1 - fade * fade);
|
|
@ -1,8 +1,8 @@
|
||||||
package com.simibubi.create.foundation.metadoc.instructions;
|
package com.simibubi.create.foundation.ponder.instructions;
|
||||||
|
|
||||||
import com.simibubi.create.foundation.metadoc.MetaDocScene;
|
import com.simibubi.create.foundation.ponder.PonderScene;
|
||||||
import com.simibubi.create.foundation.metadoc.elements.AnimatedOverlayElement;
|
import com.simibubi.create.foundation.ponder.elements.AnimatedOverlayElement;
|
||||||
import com.simibubi.create.foundation.metadoc.elements.AnimatedSceneElement;
|
import com.simibubi.create.foundation.ponder.elements.AnimatedSceneElement;
|
||||||
|
|
||||||
import net.minecraft.util.Direction;
|
import net.minecraft.util.Direction;
|
||||||
import net.minecraft.util.math.Vec3d;
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
@ -17,7 +17,7 @@ public class HideAllInstruction extends TickingInstruction {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void firstTick(MetaDocScene scene) {
|
protected void firstTick(PonderScene scene) {
|
||||||
super.firstTick(scene);
|
super.firstTick(scene);
|
||||||
scene.getElements()
|
scene.getElements()
|
||||||
.forEach(element -> {
|
.forEach(element -> {
|
||||||
|
@ -35,7 +35,7 @@ public class HideAllInstruction extends TickingInstruction {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void tick(MetaDocScene scene) {
|
public void tick(PonderScene scene) {
|
||||||
super.tick(scene);
|
super.tick(scene);
|
||||||
float fade = (remainingTicks / (float) totalTicks);
|
float fade = (remainingTicks / (float) totalTicks);
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.simibubi.create.foundation.ponder.instructions;
|
||||||
|
|
||||||
|
import com.simibubi.create.foundation.ponder.PonderInstruction;
|
||||||
|
import com.simibubi.create.foundation.ponder.PonderScene;
|
||||||
|
|
||||||
|
public class MarkAsFinishedInstruction extends PonderInstruction {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isComplete() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void tick(PonderScene scene) {
|
||||||
|
scene.finished = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,26 @@
|
||||||
|
package com.simibubi.create.foundation.ponder.instructions;
|
||||||
|
|
||||||
|
import com.simibubi.create.foundation.ponder.PonderInstruction;
|
||||||
|
import com.simibubi.create.foundation.ponder.PonderScene;
|
||||||
|
|
||||||
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
|
||||||
|
public class MovePoiInstruction extends PonderInstruction {
|
||||||
|
|
||||||
|
private Vec3d poi;
|
||||||
|
|
||||||
|
public MovePoiInstruction(Vec3d poi) {
|
||||||
|
this.poi = poi;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isComplete() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void tick(PonderScene scene) {
|
||||||
|
scene.setPointOfInterest(poi);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,8 +1,8 @@
|
||||||
package com.simibubi.create.foundation.metadoc.instructions;
|
package com.simibubi.create.foundation.ponder.instructions;
|
||||||
|
|
||||||
import com.simibubi.create.foundation.metadoc.MetaDocScene;
|
import com.simibubi.create.foundation.ponder.PonderScene;
|
||||||
import com.simibubi.create.foundation.metadoc.MetaDocWorld;
|
import com.simibubi.create.foundation.ponder.PonderWorld;
|
||||||
import com.simibubi.create.foundation.metadoc.Select;
|
import com.simibubi.create.foundation.ponder.Select;
|
||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.Blocks;
|
import net.minecraft.block.Blocks;
|
||||||
|
@ -19,15 +19,17 @@ public class ReplaceBlocksInstruction extends WorldModifyInstruction {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void runModification(Select selection, MetaDocScene scene) {
|
protected void runModification(Select selection, PonderScene scene) {
|
||||||
MetaDocWorld world = scene.getWorld();
|
PonderWorld world = scene.getWorld();
|
||||||
selection.all()
|
selection.all()
|
||||||
.forEach(pos -> {
|
.forEach(pos -> {
|
||||||
if (!world.getBounds()
|
if (!world.getBounds()
|
||||||
.isVecInside(pos))
|
.isVecInside(pos))
|
||||||
return;
|
return;
|
||||||
if (!replaceAir && world.getBlockState(pos) == Blocks.AIR.getDefaultState())
|
BlockState prevState = world.getBlockState(pos);
|
||||||
|
if (!replaceAir && prevState == Blocks.AIR.getDefaultState())
|
||||||
return;
|
return;
|
||||||
|
world.addBlockDestroyEffects(pos, prevState);
|
||||||
world.setBlockState(pos, stateToUse);
|
world.setBlockState(pos, stateToUse);
|
||||||
});
|
});
|
||||||
}
|
}
|
|
@ -1,11 +1,11 @@
|
||||||
package com.simibubi.create.foundation.metadoc.instructions;
|
package com.simibubi.create.foundation.ponder.instructions;
|
||||||
|
|
||||||
import com.simibubi.create.foundation.metadoc.MetaDocInstruction;
|
import com.simibubi.create.foundation.ponder.PonderInstruction;
|
||||||
import com.simibubi.create.foundation.metadoc.MetaDocScene;
|
import com.simibubi.create.foundation.ponder.PonderScene;
|
||||||
import com.simibubi.create.foundation.metadoc.MetaDocScene.SceneTransform;
|
import com.simibubi.create.foundation.ponder.PonderScene.SceneTransform;
|
||||||
import com.simibubi.create.foundation.utility.LerpedFloat.Chaser;
|
import com.simibubi.create.foundation.utility.LerpedFloat.Chaser;
|
||||||
|
|
||||||
public class RotateSceneInstruction extends MetaDocInstruction {
|
public class RotateSceneInstruction extends PonderInstruction {
|
||||||
|
|
||||||
private float xRot;
|
private float xRot;
|
||||||
private float yRot;
|
private float yRot;
|
||||||
|
@ -23,7 +23,7 @@ public class RotateSceneInstruction extends MetaDocInstruction {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void tick(MetaDocScene scene) {
|
public void tick(PonderScene scene) {
|
||||||
SceneTransform transform = scene.getTransform();
|
SceneTransform transform = scene.getTransform();
|
||||||
float targetX = relative ? transform.xRotation.getChaseTarget() + xRot : xRot;
|
float targetX = relative ? transform.xRotation.getChaseTarget() + xRot : xRot;
|
||||||
float targetY = relative ? transform.yRotation.getChaseTarget() + yRot : yRot;
|
float targetY = relative ? transform.yRotation.getChaseTarget() + yRot : yRot;
|
|
@ -0,0 +1,20 @@
|
||||||
|
package com.simibubi.create.foundation.ponder.instructions;
|
||||||
|
|
||||||
|
import com.simibubi.create.foundation.ponder.PonderInstruction;
|
||||||
|
import com.simibubi.create.foundation.ponder.PonderScene;
|
||||||
|
import com.simibubi.create.foundation.ponder.Select;
|
||||||
|
|
||||||
|
public class ShowCompleteSchematicInstruction extends PonderInstruction {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void tick(PonderScene scene) {
|
||||||
|
scene.addElement(Select.everything(scene.getBounds())
|
||||||
|
.asElement());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isComplete() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,84 @@
|
||||||
|
package com.simibubi.create.foundation.ponder.instructions;
|
||||||
|
|
||||||
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
|
import com.simibubi.create.foundation.ponder.PonderScene;
|
||||||
|
import com.simibubi.create.foundation.ponder.Select;
|
||||||
|
import com.simibubi.create.foundation.ponder.elements.OutlinerElement;
|
||||||
|
import com.simibubi.create.foundation.ponder.elements.TextWindowElement;
|
||||||
|
|
||||||
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
|
||||||
|
public class TextInstruction extends TickingInstruction {
|
||||||
|
|
||||||
|
private TextWindowElement element;
|
||||||
|
private OutlinerElement outline;
|
||||||
|
private static final int fadeTime = 5;
|
||||||
|
|
||||||
|
protected TextInstruction(int color, Supplier<String> text, int duration) {
|
||||||
|
super(false, duration + 2 * fadeTime);
|
||||||
|
}
|
||||||
|
|
||||||
|
public TextInstruction(int color, Supplier<String> text, int duration, Select selection) {
|
||||||
|
this(color, text, duration);
|
||||||
|
element = new TextWindowElement(text).pointAt(selection.getCenter());
|
||||||
|
element.colored(color);
|
||||||
|
outline = new OutlinerElement(o -> selection.makeOutline(o)
|
||||||
|
.lineWidth(1 / 16f)
|
||||||
|
.colored(color));
|
||||||
|
}
|
||||||
|
|
||||||
|
public TextInstruction(int color, Supplier<String> text, int duration, Vec3d position) {
|
||||||
|
this(color, text, duration);
|
||||||
|
element = new TextWindowElement(text).pointAt(position);
|
||||||
|
element.colored(color);
|
||||||
|
}
|
||||||
|
|
||||||
|
public TextInstruction(int color, Supplier<String> text, int duration, int y) {
|
||||||
|
this(color, text, duration);
|
||||||
|
element = new TextWindowElement(text).setY(y);
|
||||||
|
element.colored(color);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void firstTick(PonderScene scene) {
|
||||||
|
super.firstTick(scene);
|
||||||
|
scene.addElement(element);
|
||||||
|
element.setVisible(true);
|
||||||
|
element.setFade(0);
|
||||||
|
if (outline != null) {
|
||||||
|
scene.addElement(outline);
|
||||||
|
outline.setFade(1);
|
||||||
|
outline.setVisible(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void tick(PonderScene scene) {
|
||||||
|
super.tick(scene);
|
||||||
|
int elapsed = totalTicks - remainingTicks;
|
||||||
|
|
||||||
|
if (elapsed < fadeTime) {
|
||||||
|
float fade = (elapsed / (float) fadeTime);
|
||||||
|
element.setFade(fade * fade);
|
||||||
|
|
||||||
|
} else if (remainingTicks < fadeTime) {
|
||||||
|
float fade = (remainingTicks / (float) fadeTime);
|
||||||
|
element.setFade(fade * fade);
|
||||||
|
|
||||||
|
} else
|
||||||
|
element.setFade(1);
|
||||||
|
|
||||||
|
if (remainingTicks == 0) {
|
||||||
|
element.setFade(0);
|
||||||
|
element.setFade(0);
|
||||||
|
element.setVisible(false);
|
||||||
|
if (outline != null) {
|
||||||
|
outline.setFade(0);
|
||||||
|
outline.setVisible(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,9 +1,9 @@
|
||||||
package com.simibubi.create.foundation.metadoc.instructions;
|
package com.simibubi.create.foundation.ponder.instructions;
|
||||||
|
|
||||||
import com.simibubi.create.foundation.metadoc.MetaDocInstruction;
|
import com.simibubi.create.foundation.ponder.PonderInstruction;
|
||||||
import com.simibubi.create.foundation.metadoc.MetaDocScene;
|
import com.simibubi.create.foundation.ponder.PonderScene;
|
||||||
|
|
||||||
public abstract class TickingInstruction extends MetaDocInstruction {
|
public abstract class TickingInstruction extends PonderInstruction {
|
||||||
|
|
||||||
private boolean blocking;
|
private boolean blocking;
|
||||||
protected int totalTicks;
|
protected int totalTicks;
|
||||||
|
@ -15,15 +15,15 @@ public abstract class TickingInstruction extends MetaDocInstruction {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void reset(MetaDocScene scene) {
|
public void reset(PonderScene scene) {
|
||||||
super.reset(scene);
|
super.reset(scene);
|
||||||
remainingTicks = totalTicks;
|
remainingTicks = totalTicks;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void firstTick(MetaDocScene scene) {}
|
protected void firstTick(PonderScene scene) {}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void tick(MetaDocScene scene) {
|
public void tick(PonderScene scene) {
|
||||||
if (remainingTicks == totalTicks)
|
if (remainingTicks == totalTicks)
|
||||||
firstTick(scene);
|
firstTick(scene);
|
||||||
if (remainingTicks > 0)
|
if (remainingTicks > 0)
|
|
@ -1,10 +1,10 @@
|
||||||
package com.simibubi.create.foundation.metadoc.instructions;
|
package com.simibubi.create.foundation.ponder.instructions;
|
||||||
|
|
||||||
import java.util.function.UnaryOperator;
|
import java.util.function.UnaryOperator;
|
||||||
|
|
||||||
import com.simibubi.create.foundation.metadoc.MetaDocScene;
|
import com.simibubi.create.foundation.ponder.PonderScene;
|
||||||
import com.simibubi.create.foundation.metadoc.MetaDocWorld;
|
import com.simibubi.create.foundation.ponder.PonderWorld;
|
||||||
import com.simibubi.create.foundation.metadoc.Select;
|
import com.simibubi.create.foundation.ponder.Select;
|
||||||
import com.simibubi.create.foundation.tileEntity.SyncedTileEntity;
|
import com.simibubi.create.foundation.tileEntity.SyncedTileEntity;
|
||||||
|
|
||||||
import net.minecraft.nbt.CompoundNBT;
|
import net.minecraft.nbt.CompoundNBT;
|
||||||
|
@ -25,8 +25,8 @@ public class TileEntityDataInstruction extends WorldModifyInstruction {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void runModification(Select selection, MetaDocScene scene) {
|
protected void runModification(Select selection, PonderScene scene) {
|
||||||
MetaDocWorld world = scene.getWorld();
|
PonderWorld world = scene.getWorld();
|
||||||
selection.all()
|
selection.all()
|
||||||
.forEach(pos -> {
|
.forEach(pos -> {
|
||||||
if (!world.getBounds()
|
if (!world.getBounds()
|
|
@ -0,0 +1,32 @@
|
||||||
|
package com.simibubi.create.foundation.ponder.instructions;
|
||||||
|
|
||||||
|
import com.simibubi.create.foundation.ponder.PonderInstruction;
|
||||||
|
import com.simibubi.create.foundation.ponder.PonderScene;
|
||||||
|
import com.simibubi.create.foundation.ponder.Select;
|
||||||
|
import com.simibubi.create.foundation.ponder.elements.WorldSectionElement;
|
||||||
|
|
||||||
|
public abstract class WorldModifyInstruction extends PonderInstruction {
|
||||||
|
|
||||||
|
private Select selection;
|
||||||
|
|
||||||
|
public WorldModifyInstruction(Select selection) {
|
||||||
|
this.selection = selection;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isComplete() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void tick(PonderScene scene) {
|
||||||
|
runModification(selection, scene);
|
||||||
|
if (needsRedraw())
|
||||||
|
scene.forEach(WorldSectionElement.class, wse -> wse.queueRedraw(scene.getWorld()));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected abstract void runModification(Select selection, PonderScene scene);
|
||||||
|
|
||||||
|
protected abstract boolean needsRedraw();
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,136 @@
|
||||||
|
package com.simibubi.create.foundation.ponder.ui;
|
||||||
|
|
||||||
|
import com.mojang.blaze3d.systems.RenderSystem;
|
||||||
|
import com.simibubi.create.foundation.gui.AllIcons;
|
||||||
|
import com.simibubi.create.foundation.gui.GuiGameElement;
|
||||||
|
import com.simibubi.create.foundation.gui.widgets.AbstractSimiWidget;
|
||||||
|
import com.simibubi.create.foundation.ponder.PonderUI;
|
||||||
|
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||||
|
import com.simibubi.create.foundation.utility.ColorHelper;
|
||||||
|
import com.simibubi.create.foundation.utility.LerpedFloat;
|
||||||
|
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.client.settings.KeyBinding;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
|
public class PonderButton extends AbstractSimiWidget {
|
||||||
|
|
||||||
|
private AllIcons icon;
|
||||||
|
private ItemStack item;
|
||||||
|
protected boolean pressed;
|
||||||
|
private Runnable onClick;
|
||||||
|
private int xFadeModifier;
|
||||||
|
private int yFadeModifier;
|
||||||
|
private float fade;
|
||||||
|
private KeyBinding shortcut;
|
||||||
|
private LerpedFloat flash;
|
||||||
|
|
||||||
|
public static final int SIZE = 20;
|
||||||
|
|
||||||
|
public PonderButton(int x, int y, Runnable onClick) {
|
||||||
|
super(x, y, SIZE, SIZE);
|
||||||
|
this.onClick = onClick;
|
||||||
|
flash = LerpedFloat.linear()
|
||||||
|
.startWithValue(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public PonderButton showing(AllIcons icon) {
|
||||||
|
this.icon = icon;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PonderButton showing(ItemStack item) {
|
||||||
|
this.item = item;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PonderButton shortcut(KeyBinding key) {
|
||||||
|
this.shortcut = key;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PonderButton fade(int xModifier, int yModifier) {
|
||||||
|
this.xFadeModifier = xModifier;
|
||||||
|
this.yFadeModifier = yModifier;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void fade(float fade) {
|
||||||
|
this.fade = fade;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void flash() {
|
||||||
|
float value = flash.getValue();
|
||||||
|
flash.setValue(value + (1 - value) * .2f);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void dim() {
|
||||||
|
float value = flash.getValue();
|
||||||
|
flash.setValue(value * .5f);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void renderButton(int mouseX, int mouseY, float partialTicks) {
|
||||||
|
if (!visible)
|
||||||
|
return;
|
||||||
|
if (fade < .1f)
|
||||||
|
return;
|
||||||
|
|
||||||
|
isHovered = mouseX >= x && mouseY >= y && mouseX < x + width && mouseY < y + height && fade > .75f;
|
||||||
|
|
||||||
|
RenderSystem.pushMatrix();
|
||||||
|
RenderSystem.disableDepthTest();
|
||||||
|
if (fade < 1)
|
||||||
|
RenderSystem.translated((1 - fade) * -5 * xFadeModifier, (1 - fade) * -5 * yFadeModifier, 0);
|
||||||
|
|
||||||
|
float flashValue = flash.getValue(partialTicks);
|
||||||
|
if (flashValue > .1f)
|
||||||
|
fade *= 3 * flashValue + (Math.sin(AnimationTickHolder.getRenderTick() / 6)) / 1f;
|
||||||
|
|
||||||
|
int backgroundColor = ColorHelper.applyAlpha(0xdd000000, fade);
|
||||||
|
int borderColorStart = ColorHelper.applyAlpha(isHovered ? 0x70ffffff : 0x40aa9999, fade);
|
||||||
|
int borderColorEnd = ColorHelper.applyAlpha(isHovered ? 0x30ffffff : 0x20aa9999, fade);
|
||||||
|
|
||||||
|
PonderUI.renderBox(x, y, width, height, backgroundColor, borderColorStart, borderColorEnd);
|
||||||
|
RenderSystem.translated(0, 0, 800);
|
||||||
|
|
||||||
|
if (icon != null) {
|
||||||
|
RenderSystem.enableBlend();
|
||||||
|
RenderSystem.color4f(1, 1, 1, fade);
|
||||||
|
icon.draw(this, x + 2, y + 2);
|
||||||
|
}
|
||||||
|
if (item != null) {
|
||||||
|
GuiGameElement.of(item)
|
||||||
|
.at(x - 2, y - 2)
|
||||||
|
.scale(1.5f)
|
||||||
|
.render();
|
||||||
|
}
|
||||||
|
if (shortcut != null)
|
||||||
|
drawCenteredString(Minecraft.getInstance().fontRenderer, shortcut.getLocalizedName(), x + SIZE / 2 + 8,
|
||||||
|
y + SIZE - 6, ColorHelper.applyAlpha(0xff606060, fade));
|
||||||
|
|
||||||
|
RenderSystem.popMatrix();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void runCallback() {
|
||||||
|
onClick.run();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(double p_onClick_1_, double p_onClick_3_) {
|
||||||
|
super.onClick(p_onClick_1_, p_onClick_3_);
|
||||||
|
this.pressed = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onRelease(double p_onRelease_1_, double p_onRelease_3_) {
|
||||||
|
super.onRelease(p_onRelease_1_, p_onRelease_3_);
|
||||||
|
this.pressed = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setToolTip(String text) {
|
||||||
|
toolTip.clear();
|
||||||
|
toolTip.add(text);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -32,6 +32,9 @@ public class ColorHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int applyAlpha(int color, float alpha) {
|
public static int applyAlpha(int color, float alpha) {
|
||||||
|
int prevAlphaChannel = (color >> 24) & 0xFF;
|
||||||
|
if (prevAlphaChannel > 0)
|
||||||
|
alpha *= prevAlphaChannel / 256f;
|
||||||
int alphaChannel = (int) (0xFF * MathHelper.clamp(alpha, 0, 1));
|
int alphaChannel = (int) (0xFF * MathHelper.clamp(alpha, 0, 1));
|
||||||
return (color & 0xFFFFFF) | alphaChannel << 24;
|
return (color & 0xFFFFFF) | alphaChannel << 24;
|
||||||
}
|
}
|
||||||
|
@ -49,9 +52,25 @@ public class ColorHelper {
|
||||||
return color;
|
return color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static int mixAlphaColors(int color1, int color2, float w) {
|
||||||
|
int a1 = (color1 >> 24);
|
||||||
|
int r1 = (color1 >> 16) & 0xFF;
|
||||||
|
int g1 = (color1 >> 8) & 0xFF;
|
||||||
|
int b1 = color1 & 0xFF;
|
||||||
|
int a2 = (color2 >> 24);
|
||||||
|
int r2 = (color2 >> 16) & 0xFF;
|
||||||
|
int g2 = (color2 >> 8) & 0xFF;
|
||||||
|
int b2 = color2 & 0xFF;
|
||||||
|
|
||||||
|
int color = ((int) (a1 + (a2 - a1) * w) << 24) + ((int) (r1 + (r2 - r1) * w) << 16)
|
||||||
|
+ ((int) (g1 + (g2 - g1) * w) << 8) + (int) (b1 + (b2 - b1) * w);
|
||||||
|
|
||||||
|
return color;
|
||||||
|
}
|
||||||
|
|
||||||
public static void glColor(int color) {
|
public static void glColor(int color) {
|
||||||
color = mixColors(color, 0xFFFFFF, .5f);
|
color = mixColors(color, 0xFFFFFF, .5f);
|
||||||
int r = (color >> 16);
|
int r = (color >> 16) & 0xFF;
|
||||||
int g = (color >> 8) & 0xFF;
|
int g = (color >> 8) & 0xFF;
|
||||||
int b = color & 0xFF;
|
int b = color & 0xFF;
|
||||||
|
|
||||||
|
@ -63,7 +82,7 @@ public class ColorHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Vec3d getRGB(int color) {
|
public static Vec3d getRGB(int color) {
|
||||||
int r = (color >> 16);
|
int r = (color >> 16) & 0xFF;
|
||||||
int g = (color >> 8) & 0xFF;
|
int g = (color >> 8) & 0xFF;
|
||||||
int b = color & 0xFF;
|
int b = color & 0xFF;
|
||||||
return new Vec3d(r, g, b).scale(1 / 256d);
|
return new Vec3d(r, g, b).scale(1 / 256d);
|
||||||
|
|
|
@ -118,6 +118,11 @@ public class VecHelper {
|
||||||
.scale(maxLength) : vec;
|
.scale(maxLength) : vec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Vec3d lerp(float p, Vec3d from, Vec3d to) {
|
||||||
|
return from.add(from.subtract(to)
|
||||||
|
.scale(p));
|
||||||
|
}
|
||||||
|
|
||||||
public static Vec3d clampComponentWise(Vec3d vec, float maxLength) {
|
public static Vec3d clampComponentWise(Vec3d vec, float maxLength) {
|
||||||
return new Vec3d(MathHelper.clamp(vec.x, -maxLength, maxLength), MathHelper.clamp(vec.y, -maxLength, maxLength),
|
return new Vec3d(MathHelper.clamp(vec.x, -maxLength, maxLength), MathHelper.clamp(vec.y, -maxLength, maxLength),
|
||||||
MathHelper.clamp(vec.z, -maxLength, maxLength));
|
MathHelper.clamp(vec.z, -maxLength, maxLength));
|
||||||
|
|
|
@ -24,3 +24,6 @@ public net.minecraft.tileentity.BeaconTileEntity field_174909_f # beamSegments
|
||||||
# Server Tick List (For stopping placed fluids from spilling)
|
# Server Tick List (For stopping placed fluids from spilling)
|
||||||
public net.minecraft.world.server.ServerTickList field_205374_d # pendingTickListEntriesHashSet
|
public net.minecraft.world.server.ServerTickList field_205374_d # pendingTickListEntriesHashSet
|
||||||
public net.minecraft.world.server.ServerTickList field_205375_e # pendingTickListEntriesTreeSet
|
public net.minecraft.world.server.ServerTickList field_205375_e # pendingTickListEntriesTreeSet
|
||||||
|
|
||||||
|
# Particle Manager
|
||||||
|
public net.minecraft.client.particle.ParticleManager field_178932_g # factories
|
Binary file not shown.
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 2.5 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
src/main/resources/ponder/cogwheel/first.nbt
Normal file
BIN
src/main/resources/ponder/cogwheel/first.nbt
Normal file
Binary file not shown.
BIN
src/main/resources/ponder/debug/scene_1.nbt
Normal file
BIN
src/main/resources/ponder/debug/scene_1.nbt
Normal file
Binary file not shown.
BIN
src/main/resources/ponder/debug/scene_2.nbt
Normal file
BIN
src/main/resources/ponder/debug/scene_2.nbt
Normal file
Binary file not shown.
BIN
src/main/resources/ponder/debug/scene_3.nbt
Normal file
BIN
src/main/resources/ponder/debug/scene_3.nbt
Normal file
Binary file not shown.
BIN
src/main/resources/ponder/debug/scene_4.nbt
Normal file
BIN
src/main/resources/ponder/debug/scene_4.nbt
Normal file
Binary file not shown.
BIN
src/main/resources/ponder/debug/scene_5.nbt
Normal file
BIN
src/main/resources/ponder/debug/scene_5.nbt
Normal file
Binary file not shown.
BIN
src/main/resources/ponder/shaft/encasing_shafts.nbt
Normal file
BIN
src/main/resources/ponder/shaft/encasing_shafts.nbt
Normal file
Binary file not shown.
BIN
src/main/resources/ponder/shaft/shaft.nbt
Normal file
BIN
src/main/resources/ponder/shaft/shaft.nbt
Normal file
Binary file not shown.
Loading…
Reference in a new issue