mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-29 08:27:03 +01:00
Merge branch 'mc1.15/dev' of https://github.com/Creators-of-Create/Create into mc1.15/dev
This commit is contained in:
commit
7de922f239
45 changed files with 398 additions and 379 deletions
|
@ -403,19 +403,19 @@ a3a11524cd3515fc01d905767b4b7ea782adaf03 assets/create/blockstates/yellow_seat.j
|
||||||
7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json
|
7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json
|
||||||
b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json
|
b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json
|
||||||
ce0e5405da381a86625b908c569c5dbe347abdba assets/create/lang/en_ud.json
|
ce0e5405da381a86625b908c569c5dbe347abdba assets/create/lang/en_ud.json
|
||||||
442123de75c67a2b562194981d62c6a6de053593 assets/create/lang/en_us.json
|
e847bb88a7cf6bfa81f03f87f106a85c7e351da8 assets/create/lang/en_us.json
|
||||||
1a5739ce1ab4a923dcf5a7ed12f16af394aed719 assets/create/lang/unfinished/de_de.json
|
950f435754c82bb46d0f0bbd7fb0ea5c2a6db2be assets/create/lang/unfinished/de_de.json
|
||||||
4f21f855b45e8b44aedcae94e5a41c797d05af45 assets/create/lang/unfinished/es_es.json
|
953669a0880eb087bff8c6a0f31ab593826410ac assets/create/lang/unfinished/es_es.json
|
||||||
e971082462cd5a92a08c3a1481e8e7c6e1afcea1 assets/create/lang/unfinished/es_mx.json
|
49dcba9e9e74421dc74e24a27f6876a9f9e4bafa assets/create/lang/unfinished/es_mx.json
|
||||||
64a39634a36da998fd11553340cd1fc652129ce9 assets/create/lang/unfinished/fr_fr.json
|
db5fa9ea3a940cc378657db43d7de6f71abb8da3 assets/create/lang/unfinished/fr_fr.json
|
||||||
afb72ad7e2713819b3cda0110a41dcdbbcc0bb0b assets/create/lang/unfinished/it_it.json
|
144bbca783790c63c1671388227a00780c23e5ba assets/create/lang/unfinished/it_it.json
|
||||||
583b4bddc044614efb1b08f9bfb36a49e0a67e4f assets/create/lang/unfinished/ja_jp.json
|
8ebf781c5e3d8dd78eed9c1445d39a643dd1e2b1 assets/create/lang/unfinished/ja_jp.json
|
||||||
9baa3052e1a9440e1cb6d46950d2227f2be3435e assets/create/lang/unfinished/ko_kr.json
|
46f41cb9e6870bbb8aa4d58525f7ab07f5e911ff assets/create/lang/unfinished/ko_kr.json
|
||||||
7701f3b29b3e92a9943c15000beb9df02143fe90 assets/create/lang/unfinished/nl_nl.json
|
eb16433d9ba6c3f9748074f48c22368c81cc52b3 assets/create/lang/unfinished/nl_nl.json
|
||||||
9f935fe569d793f6ee581ebc24bff5740c91fbab assets/create/lang/unfinished/pt_br.json
|
a4aa6902f68a6e4c2c0ce38dee6623e80a6cc65e assets/create/lang/unfinished/pt_br.json
|
||||||
9ede4dc1051fea0bcabc30da1d133c0048d29641 assets/create/lang/unfinished/ru_ru.json
|
8f889340f518084c90eba259ddbe822601462c4a assets/create/lang/unfinished/ru_ru.json
|
||||||
2442b5fe4ed2d92ab3081e7422bfecdf1ac06610 assets/create/lang/unfinished/zh_cn.json
|
737e73147690f40aaae5ed51d24e3016fa9d778c assets/create/lang/unfinished/zh_cn.json
|
||||||
56268c452b57cf072f35839ebfa130213a966730 assets/create/lang/unfinished/zh_tw.json
|
34826633b870307b430c64ec62695852b27cb872 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
|
||||||
|
@ -2914,7 +2914,7 @@ fc75c87159569cb6ee978e6d51b0c3b0f504b5de data/create/recipes/crafting/logistics/
|
||||||
a32ac53848862837f3044ff9c81ed62c1134fe4f data/create/recipes/crafting/logistics/powered_latch.json
|
a32ac53848862837f3044ff9c81ed62c1134fe4f data/create/recipes/crafting/logistics/powered_latch.json
|
||||||
660eb73bcc66c1528cbd4d4204ad6b771f4bd721 data/create/recipes/crafting/logistics/powered_toggle_latch.json
|
660eb73bcc66c1528cbd4d4204ad6b771f4bd721 data/create/recipes/crafting/logistics/powered_toggle_latch.json
|
||||||
74b8a38d252cce564cc63db2ade41ed2d656d025 data/create/recipes/crafting/logistics/pulse_repeater.json
|
74b8a38d252cce564cc63db2ade41ed2d656d025 data/create/recipes/crafting/logistics/pulse_repeater.json
|
||||||
bb73dac60392f4811df033c3d1d3256df5e022af data/create/recipes/crafting/logistics/redstone_contact.json
|
739f0d8b7f98a5639ed37f7fb8ce474d5e6ba0c6 data/create/recipes/crafting/logistics/redstone_contact.json
|
||||||
bc511f7c225750743ae3e985502fa65beb1e7b8d data/create/recipes/crafting/logistics/redstone_link.json
|
bc511f7c225750743ae3e985502fa65beb1e7b8d data/create/recipes/crafting/logistics/redstone_link.json
|
||||||
10b16358664f2bb8a11589ef8ba3d69ee8d3b9fc data/create/recipes/crafting/logistics/stockpile_switch.json
|
10b16358664f2bb8a11589ef8ba3d69ee8d3b9fc data/create/recipes/crafting/logistics/stockpile_switch.json
|
||||||
0dc99b8a8c68d6a9250c3a1167ffb565be9622ec data/create/recipes/crafting/materials/andesite_alloy.json
|
0dc99b8a8c68d6a9250c3a1167ffb565be9622ec data/create/recipes/crafting/materials/andesite_alloy.json
|
||||||
|
|
|
@ -1829,6 +1829,7 @@
|
||||||
"create.ponder.previous": "Previous Scene",
|
"create.ponder.previous": "Previous Scene",
|
||||||
"create.ponder.replay": "Replay",
|
"create.ponder.replay": "Replay",
|
||||||
"create.ponder.think_back": "Think Back",
|
"create.ponder.think_back": "Think Back",
|
||||||
|
"create.ponder.slow_text": "Comfy Reading",
|
||||||
"create.ponder.shared.movement_anchors": "With the help of Chassis or Super Glue, larger structures can be moved.",
|
"create.ponder.shared.movement_anchors": "With the help of Chassis or Super Glue, larger structures can be moved.",
|
||||||
"create.ponder.shared.rpm32": "32 RPM",
|
"create.ponder.shared.rpm32": "32 RPM",
|
||||||
"create.ponder.shared.sneak_and": "Sneak +",
|
"create.ponder.shared.sneak_and": "Sneak +",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 1506",
|
"_": "Missing Localizations: 1507",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -1830,6 +1830,7 @@
|
||||||
"create.ponder.previous": "UNLOCALIZED: Previous Scene",
|
"create.ponder.previous": "UNLOCALIZED: Previous Scene",
|
||||||
"create.ponder.replay": "UNLOCALIZED: Replay",
|
"create.ponder.replay": "UNLOCALIZED: Replay",
|
||||||
"create.ponder.think_back": "UNLOCALIZED: Think Back",
|
"create.ponder.think_back": "UNLOCALIZED: Think Back",
|
||||||
|
"create.ponder.slow_text": "UNLOCALIZED: Comfy Reading",
|
||||||
"create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.",
|
"create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.",
|
||||||
"create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM",
|
"create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM",
|
||||||
"create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +",
|
"create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 541",
|
"_": "Missing Localizations: 542",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -1830,6 +1830,7 @@
|
||||||
"create.ponder.previous": "UNLOCALIZED: Previous Scene",
|
"create.ponder.previous": "UNLOCALIZED: Previous Scene",
|
||||||
"create.ponder.replay": "UNLOCALIZED: Replay",
|
"create.ponder.replay": "UNLOCALIZED: Replay",
|
||||||
"create.ponder.think_back": "UNLOCALIZED: Think Back",
|
"create.ponder.think_back": "UNLOCALIZED: Think Back",
|
||||||
|
"create.ponder.slow_text": "UNLOCALIZED: Comfy Reading",
|
||||||
"create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.",
|
"create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.",
|
||||||
"create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM",
|
"create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM",
|
||||||
"create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +",
|
"create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 1436",
|
"_": "Missing Localizations: 1437",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -1830,6 +1830,7 @@
|
||||||
"create.ponder.previous": "UNLOCALIZED: Previous Scene",
|
"create.ponder.previous": "UNLOCALIZED: Previous Scene",
|
||||||
"create.ponder.replay": "UNLOCALIZED: Replay",
|
"create.ponder.replay": "UNLOCALIZED: Replay",
|
||||||
"create.ponder.think_back": "UNLOCALIZED: Think Back",
|
"create.ponder.think_back": "UNLOCALIZED: Think Back",
|
||||||
|
"create.ponder.slow_text": "UNLOCALIZED: Comfy Reading",
|
||||||
"create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.",
|
"create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.",
|
||||||
"create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM",
|
"create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM",
|
||||||
"create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +",
|
"create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 1218",
|
"_": "Missing Localizations: 1219",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -1830,6 +1830,7 @@
|
||||||
"create.ponder.previous": "UNLOCALIZED: Previous Scene",
|
"create.ponder.previous": "UNLOCALIZED: Previous Scene",
|
||||||
"create.ponder.replay": "UNLOCALIZED: Replay",
|
"create.ponder.replay": "UNLOCALIZED: Replay",
|
||||||
"create.ponder.think_back": "UNLOCALIZED: Think Back",
|
"create.ponder.think_back": "UNLOCALIZED: Think Back",
|
||||||
|
"create.ponder.slow_text": "UNLOCALIZED: Comfy Reading",
|
||||||
"create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.",
|
"create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.",
|
||||||
"create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM",
|
"create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM",
|
||||||
"create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +",
|
"create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 558",
|
"_": "Missing Localizations: 559",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -1830,6 +1830,7 @@
|
||||||
"create.ponder.previous": "UNLOCALIZED: Previous Scene",
|
"create.ponder.previous": "UNLOCALIZED: Previous Scene",
|
||||||
"create.ponder.replay": "UNLOCALIZED: Replay",
|
"create.ponder.replay": "UNLOCALIZED: Replay",
|
||||||
"create.ponder.think_back": "UNLOCALIZED: Think Back",
|
"create.ponder.think_back": "UNLOCALIZED: Think Back",
|
||||||
|
"create.ponder.slow_text": "UNLOCALIZED: Comfy Reading",
|
||||||
"create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.",
|
"create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.",
|
||||||
"create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM",
|
"create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM",
|
||||||
"create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +",
|
"create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 565",
|
"_": "Missing Localizations: 566",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -1830,6 +1830,7 @@
|
||||||
"create.ponder.previous": "UNLOCALIZED: Previous Scene",
|
"create.ponder.previous": "UNLOCALIZED: Previous Scene",
|
||||||
"create.ponder.replay": "UNLOCALIZED: Replay",
|
"create.ponder.replay": "UNLOCALIZED: Replay",
|
||||||
"create.ponder.think_back": "UNLOCALIZED: Think Back",
|
"create.ponder.think_back": "UNLOCALIZED: Think Back",
|
||||||
|
"create.ponder.slow_text": "UNLOCALIZED: Comfy Reading",
|
||||||
"create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.",
|
"create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.",
|
||||||
"create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM",
|
"create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM",
|
||||||
"create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +",
|
"create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 611",
|
"_": "Missing Localizations: 612",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -1830,6 +1830,7 @@
|
||||||
"create.ponder.previous": "UNLOCALIZED: Previous Scene",
|
"create.ponder.previous": "UNLOCALIZED: Previous Scene",
|
||||||
"create.ponder.replay": "UNLOCALIZED: Replay",
|
"create.ponder.replay": "UNLOCALIZED: Replay",
|
||||||
"create.ponder.think_back": "UNLOCALIZED: Think Back",
|
"create.ponder.think_back": "UNLOCALIZED: Think Back",
|
||||||
|
"create.ponder.slow_text": "UNLOCALIZED: Comfy Reading",
|
||||||
"create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.",
|
"create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.",
|
||||||
"create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM",
|
"create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM",
|
||||||
"create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +",
|
"create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 1705",
|
"_": "Missing Localizations: 1706",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -1830,6 +1830,7 @@
|
||||||
"create.ponder.previous": "UNLOCALIZED: Previous Scene",
|
"create.ponder.previous": "UNLOCALIZED: Previous Scene",
|
||||||
"create.ponder.replay": "UNLOCALIZED: Replay",
|
"create.ponder.replay": "UNLOCALIZED: Replay",
|
||||||
"create.ponder.think_back": "UNLOCALIZED: Think Back",
|
"create.ponder.think_back": "UNLOCALIZED: Think Back",
|
||||||
|
"create.ponder.slow_text": "UNLOCALIZED: Comfy Reading",
|
||||||
"create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.",
|
"create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.",
|
||||||
"create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM",
|
"create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM",
|
||||||
"create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +",
|
"create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 1771",
|
"_": "Missing Localizations: 1772",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -1830,6 +1830,7 @@
|
||||||
"create.ponder.previous": "UNLOCALIZED: Previous Scene",
|
"create.ponder.previous": "UNLOCALIZED: Previous Scene",
|
||||||
"create.ponder.replay": "UNLOCALIZED: Replay",
|
"create.ponder.replay": "UNLOCALIZED: Replay",
|
||||||
"create.ponder.think_back": "UNLOCALIZED: Think Back",
|
"create.ponder.think_back": "UNLOCALIZED: Think Back",
|
||||||
|
"create.ponder.slow_text": "UNLOCALIZED: Comfy Reading",
|
||||||
"create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.",
|
"create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.",
|
||||||
"create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM",
|
"create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM",
|
||||||
"create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +",
|
"create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 561",
|
"_": "Missing Localizations: 562",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -1830,6 +1830,7 @@
|
||||||
"create.ponder.previous": "UNLOCALIZED: Previous Scene",
|
"create.ponder.previous": "UNLOCALIZED: Previous Scene",
|
||||||
"create.ponder.replay": "UNLOCALIZED: Replay",
|
"create.ponder.replay": "UNLOCALIZED: Replay",
|
||||||
"create.ponder.think_back": "UNLOCALIZED: Think Back",
|
"create.ponder.think_back": "UNLOCALIZED: Think Back",
|
||||||
|
"create.ponder.slow_text": "UNLOCALIZED: Comfy Reading",
|
||||||
"create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.",
|
"create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.",
|
||||||
"create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM",
|
"create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM",
|
||||||
"create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +",
|
"create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 559",
|
"_": "Missing Localizations: 560",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -1830,6 +1830,7 @@
|
||||||
"create.ponder.previous": "UNLOCALIZED: Previous Scene",
|
"create.ponder.previous": "UNLOCALIZED: Previous Scene",
|
||||||
"create.ponder.replay": "UNLOCALIZED: Replay",
|
"create.ponder.replay": "UNLOCALIZED: Replay",
|
||||||
"create.ponder.think_back": "UNLOCALIZED: Think Back",
|
"create.ponder.think_back": "UNLOCALIZED: Think Back",
|
||||||
|
"create.ponder.slow_text": "UNLOCALIZED: Comfy Reading",
|
||||||
"create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.",
|
"create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.",
|
||||||
"create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM",
|
"create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM",
|
||||||
"create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +",
|
"create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 564",
|
"_": "Missing Localizations: 565",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -1830,6 +1830,7 @@
|
||||||
"create.ponder.previous": "UNLOCALIZED: Previous Scene",
|
"create.ponder.previous": "UNLOCALIZED: Previous Scene",
|
||||||
"create.ponder.replay": "UNLOCALIZED: Replay",
|
"create.ponder.replay": "UNLOCALIZED: Replay",
|
||||||
"create.ponder.think_back": "UNLOCALIZED: Think Back",
|
"create.ponder.think_back": "UNLOCALIZED: Think Back",
|
||||||
|
"create.ponder.slow_text": "UNLOCALIZED: Comfy Reading",
|
||||||
"create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.",
|
"create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.",
|
||||||
"create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM",
|
"create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM",
|
||||||
"create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +",
|
"create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +",
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
{
|
{
|
||||||
"type": "minecraft:crafting_shaped",
|
"type": "minecraft:crafting_shaped",
|
||||||
"pattern": [
|
"pattern": [
|
||||||
"WDW",
|
|
||||||
" S ",
|
" S ",
|
||||||
"WDW"
|
"CWC",
|
||||||
|
"CCC"
|
||||||
],
|
],
|
||||||
"key": {
|
"key": {
|
||||||
"W": {
|
"W": {
|
||||||
"tag": "forge:dusts/redstone"
|
"tag": "forge:dusts/redstone"
|
||||||
},
|
},
|
||||||
"D": {
|
"C": {
|
||||||
"item": "create:brass_casing"
|
"item": "minecraft:cobblestone"
|
||||||
},
|
},
|
||||||
"S": {
|
"S": {
|
||||||
"tag": "forge:ingots/iron"
|
"tag": "forge:plates/iron"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"result": {
|
"result": {
|
||||||
|
|
|
@ -481,7 +481,8 @@ public class AllBlocks {
|
||||||
.transform(customItemModel("_", "block"))
|
.transform(customItemModel("_", "block"))
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
public static final BlockEntry<EjectorBlock> WEIGHTED_EJECTOR = REGISTRATE.block("weighted_ejector", EjectorBlock::new)
|
public static final BlockEntry<EjectorBlock> WEIGHTED_EJECTOR =
|
||||||
|
REGISTRATE.block("weighted_ejector", EjectorBlock::new)
|
||||||
.initialProperties(SharedProperties::stone)
|
.initialProperties(SharedProperties::stone)
|
||||||
.properties(Block.Properties::nonOpaque)
|
.properties(Block.Properties::nonOpaque)
|
||||||
.blockstate((c, p) -> p.horizontalBlock(c.getEntry(), AssetLookup.partialBaseModel(c, p), 180))
|
.blockstate((c, p) -> p.horizontalBlock(c.getEntry(), AssetLookup.partialBaseModel(c, p), 180))
|
||||||
|
@ -906,6 +907,15 @@ public class AllBlocks {
|
||||||
.transform(customItemModel())
|
.transform(customItemModel())
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
|
public static final BlockEntry<RedstoneContactBlock> REDSTONE_CONTACT =
|
||||||
|
REGISTRATE.block("redstone_contact", RedstoneContactBlock::new)
|
||||||
|
.initialProperties(SharedProperties::stone)
|
||||||
|
.onRegister(addMovementBehaviour(new ContactMovementBehaviour()))
|
||||||
|
.blockstate((c, p) -> p.directionalBlock(c.get(), AssetLookup.forPowered(c, p)))
|
||||||
|
.item()
|
||||||
|
.transform(customItemModel("_", "block"))
|
||||||
|
.register();
|
||||||
|
|
||||||
public static final BlockEntry<HarvesterBlock> MECHANICAL_HARVESTER =
|
public static final BlockEntry<HarvesterBlock> MECHANICAL_HARVESTER =
|
||||||
REGISTRATE.block("mechanical_harvester", HarvesterBlock::new)
|
REGISTRATE.block("mechanical_harvester", HarvesterBlock::new)
|
||||||
.initialProperties(SharedProperties::stone)
|
.initialProperties(SharedProperties::stone)
|
||||||
|
@ -1150,15 +1160,6 @@ public class AllBlocks {
|
||||||
.onRegister(connectedTextures(new BrassTunnelCTBehaviour()))
|
.onRegister(connectedTextures(new BrassTunnelCTBehaviour()))
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
public static final BlockEntry<RedstoneContactBlock> REDSTONE_CONTACT =
|
|
||||||
REGISTRATE.block("redstone_contact", RedstoneContactBlock::new)
|
|
||||||
.initialProperties(SharedProperties::stone)
|
|
||||||
.onRegister(addMovementBehaviour(new ContactMovementBehaviour()))
|
|
||||||
.blockstate((c, p) -> p.directionalBlock(c.get(), AssetLookup.forPowered(c, p)))
|
|
||||||
.item()
|
|
||||||
.transform(customItemModel("_", "block"))
|
|
||||||
.register();
|
|
||||||
|
|
||||||
public static final BlockEntry<ContentObserverBlock> CONTENT_OBSERVER =
|
public static final BlockEntry<ContentObserverBlock> CONTENT_OBSERVER =
|
||||||
REGISTRATE.block("content_observer", ContentObserverBlock::new)
|
REGISTRATE.block("content_observer", ContentObserverBlock::new)
|
||||||
.initialProperties(SharedProperties::stone)
|
.initialProperties(SharedProperties::stone)
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package com.simibubi.create.content.contraptions;
|
package com.simibubi.create.content.contraptions;
|
||||||
|
|
||||||
import static com.simibubi.create.content.contraptions.relays.elementary.CogWheelBlock.isLargeCog;
|
|
||||||
import static net.minecraft.state.properties.BlockStateProperties.AXIS;
|
import static net.minecraft.state.properties.BlockStateProperties.AXIS;
|
||||||
|
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
|
@ -12,6 +11,7 @@ import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.relays.advanced.SpeedControllerBlock;
|
import com.simibubi.create.content.contraptions.relays.advanced.SpeedControllerBlock;
|
||||||
import com.simibubi.create.content.contraptions.relays.advanced.SpeedControllerTileEntity;
|
import com.simibubi.create.content.contraptions.relays.advanced.SpeedControllerTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.relays.elementary.CogWheelBlock;
|
import com.simibubi.create.content.contraptions.relays.elementary.CogWheelBlock;
|
||||||
|
import com.simibubi.create.content.contraptions.relays.elementary.ICogWheel;
|
||||||
import com.simibubi.create.content.contraptions.relays.encased.DirectionalShaftHalvesTileEntity;
|
import com.simibubi.create.content.contraptions.relays.encased.DirectionalShaftHalvesTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.relays.encased.EncasedBeltBlock;
|
import com.simibubi.create.content.contraptions.relays.encased.EncasedBeltBlock;
|
||||||
import com.simibubi.create.content.contraptions.relays.encased.SplitShaftTileEntity;
|
import com.simibubi.create.content.contraptions.relays.encased.SplitShaftTileEntity;
|
||||||
|
@ -66,8 +66,8 @@ public class RotationPropagator {
|
||||||
alignedAxes && definitionFrom.hasShaftTowards(world, from.getPos(), stateFrom, direction)
|
alignedAxes && definitionFrom.hasShaftTowards(world, from.getPos(), stateFrom, direction)
|
||||||
&& definitionTo.hasShaftTowards(world, to.getPos(), stateTo, direction.getOpposite());
|
&& definitionTo.hasShaftTowards(world, to.getPos(), stateTo, direction.getOpposite());
|
||||||
|
|
||||||
boolean connectedByGears = definitionFrom.hasIntegratedCogwheel(world, from.getPos(), stateFrom)
|
boolean connectedByGears = ICogWheel.isSmallCog(stateFrom)
|
||||||
&& definitionTo.hasIntegratedCogwheel(world, to.getPos(), stateTo);
|
&& ICogWheel.isSmallCog(stateTo);
|
||||||
|
|
||||||
float custom = from.propagateRotationTo(to, stateFrom, stateTo, diff, connectedByAxis, connectedByGears);
|
float custom = from.propagateRotationTo(to, stateFrom, stateTo, diff, connectedByAxis, connectedByGears);
|
||||||
if (custom != 0)
|
if (custom != 0)
|
||||||
|
@ -98,10 +98,10 @@ public class RotationPropagator {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Gear <-> Large Gear
|
// Gear <-> Large Gear
|
||||||
if (isLargeCog(stateFrom) && definitionTo.hasIntegratedCogwheel(world, to.getPos(), stateTo))
|
if (ICogWheel.isLargeCog(stateFrom) && ICogWheel.isSmallCog(stateTo))
|
||||||
if (isLargeToSmallCog(stateFrom, stateTo, definitionTo, diff))
|
if (isLargeToSmallCog(stateFrom, stateTo, definitionTo, diff))
|
||||||
return -2f;
|
return -2f;
|
||||||
if (isLargeCog(stateTo) && definitionFrom.hasIntegratedCogwheel(world, from.getPos(), stateFrom))
|
if (ICogWheel.isLargeCog(stateTo) && ICogWheel.isSmallCog(stateFrom))
|
||||||
if (isLargeToSmallCog(stateTo, stateFrom, definitionFrom, diff))
|
if (isLargeToSmallCog(stateTo, stateFrom, definitionFrom, diff))
|
||||||
return -.5f;
|
return -.5f;
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ public class RotationPropagator {
|
||||||
if (connectedByGears) {
|
if (connectedByGears) {
|
||||||
if (diff.manhattanDistance(BlockPos.ZERO) != 1)
|
if (diff.manhattanDistance(BlockPos.ZERO) != 1)
|
||||||
return 0;
|
return 0;
|
||||||
if (isLargeCog(stateTo))
|
if (ICogWheel.isLargeCog(stateTo))
|
||||||
return 0;
|
return 0;
|
||||||
if (direction.getAxis() == definitionFrom.getRotationAxis(stateFrom))
|
if (direction.getAxis() == definitionFrom.getRotationAxis(stateFrom))
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -137,7 +137,7 @@ public class RotationPropagator {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean isLargeToLargeGear(BlockState from, BlockState to, BlockPos diff) {
|
private static boolean isLargeToLargeGear(BlockState from, BlockState to, BlockPos diff) {
|
||||||
if (!isLargeCog(from) || !isLargeCog(to))
|
if (!ICogWheel.isLargeCog(from) || !ICogWheel.isLargeCog(to))
|
||||||
return false;
|
return false;
|
||||||
Axis fromAxis = from.get(AXIS);
|
Axis fromAxis = from.get(AXIS);
|
||||||
Axis toAxis = to.get(AXIS);
|
Axis toAxis = to.get(AXIS);
|
||||||
|
@ -186,7 +186,7 @@ public class RotationPropagator {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean isLargeCogToSpeedController(BlockState from, BlockState to, BlockPos diff) {
|
private static boolean isLargeCogToSpeedController(BlockState from, BlockState to, BlockPos diff) {
|
||||||
if (!isLargeCog(from) || !AllBlocks.ROTATION_SPEED_CONTROLLER.has(to))
|
if (!ICogWheel.isLargeCog(from) || !AllBlocks.ROTATION_SPEED_CONTROLLER.has(to))
|
||||||
return false;
|
return false;
|
||||||
if (!diff.equals(BlockPos.ZERO.down()))
|
if (!diff.equals(BlockPos.ZERO.down()))
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -119,8 +119,6 @@ public interface IRotate extends IWrenchable {
|
||||||
|
|
||||||
public boolean hasShaftTowards(IWorldReader world, BlockPos pos, BlockState state, Direction face);
|
public boolean hasShaftTowards(IWorldReader world, BlockPos pos, BlockState state, Direction face);
|
||||||
|
|
||||||
public boolean hasIntegratedCogwheel(IWorldReader world, BlockPos pos, BlockState state);
|
|
||||||
|
|
||||||
public Axis getRotationAxis(BlockState state);
|
public Axis getRotationAxis(BlockState state);
|
||||||
|
|
||||||
public default SpeedLevel getMinimumRequiredSpeedLevel() {
|
public default SpeedLevel getMinimumRequiredSpeedLevel() {
|
||||||
|
|
|
@ -72,11 +72,6 @@ public abstract class KineticBlock extends Block implements IRotate {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean hasIntegratedCogwheel(IWorldReader world, BlockPos pos, BlockState state) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasTileEntity(BlockState state) {
|
public boolean hasTileEntity(BlockState state) {
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -28,12 +28,6 @@ public class KineticData extends BasicData {
|
||||||
return setPosition(pos.getX(), pos.getY(), pos.getZ());
|
return setPosition(pos.getX(), pos.getY(), pos.getZ());
|
||||||
}
|
}
|
||||||
|
|
||||||
public KineticData setPosition(int x, int y, int z) {
|
|
||||||
return setPosition((float) (x),
|
|
||||||
(float) (y),
|
|
||||||
(float) (z));
|
|
||||||
}
|
|
||||||
|
|
||||||
public KineticData setPosition(float x, float y, float z) {
|
public KineticData setPosition(float x, float y, float z) {
|
||||||
this.x = x;
|
this.x = x;
|
||||||
this.y = y;
|
this.y = y;
|
||||||
|
|
|
@ -14,6 +14,7 @@ import com.simibubi.create.content.contraptions.base.IRotate.SpeedLevel;
|
||||||
import com.simibubi.create.content.contraptions.base.IRotate.StressImpact;
|
import com.simibubi.create.content.contraptions.base.IRotate.StressImpact;
|
||||||
import com.simibubi.create.content.contraptions.goggles.IHaveGoggleInformation;
|
import com.simibubi.create.content.contraptions.goggles.IHaveGoggleInformation;
|
||||||
import com.simibubi.create.content.contraptions.goggles.IHaveHoveringInformation;
|
import com.simibubi.create.content.contraptions.goggles.IHaveHoveringInformation;
|
||||||
|
import com.simibubi.create.content.contraptions.relays.elementary.ICogWheel;
|
||||||
import com.simibubi.create.foundation.config.AllConfigs;
|
import com.simibubi.create.foundation.config.AllConfigs;
|
||||||
import com.simibubi.create.foundation.item.TooltipHelper;
|
import com.simibubi.create.foundation.item.TooltipHelper;
|
||||||
import com.simibubi.create.foundation.render.backend.FastRenderDispatcher;
|
import com.simibubi.create.foundation.render.backend.FastRenderDispatcher;
|
||||||
|
@ -529,7 +530,7 @@ public abstract class KineticTileEntity extends SmartTileEntity
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean canPropagateDiagonally(IRotate block, BlockState state) {
|
protected boolean canPropagateDiagonally(IRotate block, BlockState state) {
|
||||||
return block.hasIntegratedCogwheel(world, pos, state);
|
return ICogWheel.isSmallCog(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -6,6 +6,7 @@ import com.simibubi.create.AllBlocks;
|
||||||
import com.simibubi.create.CreateClient;
|
import com.simibubi.create.CreateClient;
|
||||||
import com.simibubi.create.content.contraptions.KineticDebugger;
|
import com.simibubi.create.content.contraptions.KineticDebugger;
|
||||||
import com.simibubi.create.content.contraptions.relays.elementary.CogWheelBlock;
|
import com.simibubi.create.content.contraptions.relays.elementary.CogWheelBlock;
|
||||||
|
import com.simibubi.create.content.contraptions.relays.elementary.ICogWheel;
|
||||||
import com.simibubi.create.foundation.render.Compartment;
|
import com.simibubi.create.foundation.render.Compartment;
|
||||||
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||||
import com.simibubi.create.foundation.render.backend.FastRenderDispatcher;
|
import com.simibubi.create.foundation.render.backend.FastRenderDispatcher;
|
||||||
|
@ -96,7 +97,7 @@ public class KineticTileEntityRenderer extends SafeTileEntityRenderer<KineticTil
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static float getRotationOffsetForPosition(KineticTileEntity te, final BlockPos pos, final Axis axis) {
|
protected static float getRotationOffsetForPosition(KineticTileEntity te, final BlockPos pos, final Axis axis) {
|
||||||
float offset = CogWheelBlock.isLargeCog(te.getBlockState()) ? 11.25f : 0;
|
float offset = ICogWheel.isLargeCog(te.getBlockState()) ? 11.25f : 0;
|
||||||
double d = (((axis == Axis.X) ? 0 : pos.getX()) + ((axis == Axis.Y) ? 0 : pos.getY())
|
double d = (((axis == Axis.X) ? 0 : pos.getX()) + ((axis == Axis.Y) ? 0 : pos.getY())
|
||||||
+ ((axis == Axis.Z) ? 0 : pos.getZ())) % 2;
|
+ ((axis == Axis.Z) ? 0 : pos.getZ())) % 2;
|
||||||
if (d == 0) {
|
if (d == 0) {
|
||||||
|
|
|
@ -2,6 +2,7 @@ package com.simibubi.create.content.contraptions.base;
|
||||||
|
|
||||||
import com.simibubi.create.AllBlocks;
|
import com.simibubi.create.AllBlocks;
|
||||||
import com.simibubi.create.content.contraptions.relays.elementary.CogWheelBlock;
|
import com.simibubi.create.content.contraptions.relays.elementary.CogWheelBlock;
|
||||||
|
import com.simibubi.create.content.contraptions.relays.elementary.ICogWheel;
|
||||||
import com.simibubi.create.content.contraptions.relays.elementary.ShaftBlock;
|
import com.simibubi.create.content.contraptions.relays.elementary.ShaftBlock;
|
||||||
import com.simibubi.create.foundation.render.backend.instancing.*;
|
import com.simibubi.create.foundation.render.backend.instancing.*;
|
||||||
import com.simibubi.create.foundation.render.backend.instancing.InstancedModel;
|
import com.simibubi.create.foundation.render.backend.instancing.InstancedModel;
|
||||||
|
@ -62,7 +63,7 @@ public abstract class KineticTileInstance<T extends KineticTileEntity> extends T
|
||||||
}
|
}
|
||||||
|
|
||||||
protected float getRotationOffset(final Direction.Axis axis) {
|
protected float getRotationOffset(final Direction.Axis axis) {
|
||||||
float offset = CogWheelBlock.isLargeCog(blockState) ? 11.25f : 0;
|
float offset = ICogWheel.isLargeCog(blockState) ? 11.25f : 0;
|
||||||
double d = (((axis == Direction.Axis.X) ? 0 : pos.getX()) + ((axis == Direction.Axis.Y) ? 0 : pos.getY())
|
double d = (((axis == Direction.Axis.X) ? 0 : pos.getX()) + ((axis == Direction.Axis.Y) ? 0 : pos.getY())
|
||||||
+ ((axis == Direction.Axis.Z) ? 0 : pos.getZ())) % 2;
|
+ ((axis == Direction.Axis.Z) ? 0 : pos.getZ())) % 2;
|
||||||
if (d == 0) {
|
if (d == 0) {
|
||||||
|
|
|
@ -7,6 +7,7 @@ import com.simibubi.create.content.contraptions.base.HorizontalKineticBlock;
|
||||||
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.components.crafter.ConnectedInputHandler.ConnectedInput;
|
import com.simibubi.create.content.contraptions.components.crafter.ConnectedInputHandler.ConnectedInput;
|
||||||
import com.simibubi.create.content.contraptions.components.crafter.MechanicalCrafterTileEntity.Phase;
|
import com.simibubi.create.content.contraptions.components.crafter.MechanicalCrafterTileEntity.Phase;
|
||||||
|
import com.simibubi.create.content.contraptions.relays.elementary.ICogWheel;
|
||||||
import com.simibubi.create.foundation.block.ITE;
|
import com.simibubi.create.foundation.block.ITE;
|
||||||
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
||||||
import com.simibubi.create.foundation.tileEntity.behaviour.inventory.InvManipulationBehaviour;
|
import com.simibubi.create.foundation.tileEntity.behaviour.inventory.InvManipulationBehaviour;
|
||||||
|
@ -41,7 +42,7 @@ import net.minecraftforge.items.IItemHandler;
|
||||||
import net.minecraftforge.items.ItemHandlerHelper;
|
import net.minecraftforge.items.ItemHandlerHelper;
|
||||||
import net.minecraftforge.items.ItemStackHandler;
|
import net.minecraftforge.items.ItemStackHandler;
|
||||||
|
|
||||||
public class MechanicalCrafterBlock extends HorizontalKineticBlock implements ITE<MechanicalCrafterTileEntity> {
|
public class MechanicalCrafterBlock extends HorizontalKineticBlock implements ITE<MechanicalCrafterTileEntity>, ICogWheel {
|
||||||
|
|
||||||
public static final EnumProperty<Pointing> POINTING = EnumProperty.create("pointing", Pointing.class);
|
public static final EnumProperty<Pointing> POINTING = EnumProperty.create("pointing", Pointing.class);
|
||||||
|
|
||||||
|
@ -60,11 +61,6 @@ public class MechanicalCrafterBlock extends HorizontalKineticBlock implements IT
|
||||||
return AllTileEntities.MECHANICAL_CRAFTER.create();
|
return AllTileEntities.MECHANICAL_CRAFTER.create();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean hasIntegratedCogwheel(IWorldReader world, BlockPos pos, BlockState state) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Axis getRotationAxis(BlockState state) {
|
public Axis getRotationAxis(BlockState state) {
|
||||||
return state.get(HORIZONTAL_FACING)
|
return state.get(HORIZONTAL_FACING)
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.simibubi.create.content.contraptions.components.millstone;
|
||||||
import com.simibubi.create.AllShapes;
|
import com.simibubi.create.AllShapes;
|
||||||
import com.simibubi.create.AllTileEntities;
|
import com.simibubi.create.AllTileEntities;
|
||||||
import com.simibubi.create.content.contraptions.base.KineticBlock;
|
import com.simibubi.create.content.contraptions.base.KineticBlock;
|
||||||
|
import com.simibubi.create.content.contraptions.relays.elementary.ICogWheel;
|
||||||
import com.simibubi.create.foundation.block.ITE;
|
import com.simibubi.create.foundation.block.ITE;
|
||||||
import com.simibubi.create.foundation.item.ItemHelper;
|
import com.simibubi.create.foundation.item.ItemHelper;
|
||||||
import com.simibubi.create.foundation.utility.Iterate;
|
import com.simibubi.create.foundation.utility.Iterate;
|
||||||
|
@ -30,7 +31,7 @@ import net.minecraftforge.items.IItemHandler;
|
||||||
import net.minecraftforge.items.IItemHandlerModifiable;
|
import net.minecraftforge.items.IItemHandlerModifiable;
|
||||||
import net.minecraftforge.items.ItemStackHandler;
|
import net.minecraftforge.items.ItemStackHandler;
|
||||||
|
|
||||||
public class MillstoneBlock extends KineticBlock implements ITE<MillstoneTileEntity> {
|
public class MillstoneBlock extends KineticBlock implements ITE<MillstoneTileEntity>, ICogWheel {
|
||||||
|
|
||||||
public MillstoneBlock(Properties properties) {
|
public MillstoneBlock(Properties properties) {
|
||||||
super(properties);
|
super(properties);
|
||||||
|
@ -131,11 +132,6 @@ public class MillstoneBlock extends KineticBlock implements ITE<MillstoneTileEnt
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean hasIntegratedCogwheel(IWorldReader world, BlockPos pos, BlockState state) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Axis getRotationAxis(BlockState state) {
|
public Axis getRotationAxis(BlockState state) {
|
||||||
return Axis.Y;
|
return Axis.Y;
|
||||||
|
|
|
@ -4,6 +4,7 @@ import com.simibubi.create.AllBlocks;
|
||||||
import com.simibubi.create.AllShapes;
|
import com.simibubi.create.AllShapes;
|
||||||
import com.simibubi.create.AllTileEntities;
|
import com.simibubi.create.AllTileEntities;
|
||||||
import com.simibubi.create.content.contraptions.base.KineticBlock;
|
import com.simibubi.create.content.contraptions.base.KineticBlock;
|
||||||
|
import com.simibubi.create.content.contraptions.relays.elementary.ICogWheel;
|
||||||
import com.simibubi.create.foundation.block.ITE;
|
import com.simibubi.create.foundation.block.ITE;
|
||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
|
@ -17,7 +18,7 @@ import net.minecraft.util.math.shapes.VoxelShape;
|
||||||
import net.minecraft.world.IBlockReader;
|
import net.minecraft.world.IBlockReader;
|
||||||
import net.minecraft.world.IWorldReader;
|
import net.minecraft.world.IWorldReader;
|
||||||
|
|
||||||
public class MechanicalMixerBlock extends KineticBlock implements ITE<MechanicalMixerTileEntity> {
|
public class MechanicalMixerBlock extends KineticBlock implements ITE<MechanicalMixerTileEntity>, ICogWheel {
|
||||||
|
|
||||||
public MechanicalMixerBlock(Properties properties) {
|
public MechanicalMixerBlock(Properties properties) {
|
||||||
super(properties);
|
super(properties);
|
||||||
|
@ -51,11 +52,6 @@ public class MechanicalMixerBlock extends KineticBlock implements ITE<Mechanical
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean hasIntegratedCogwheel(IWorldReader world, BlockPos pos, BlockState state) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float getParticleTargetRadius() {
|
public float getParticleTargetRadius() {
|
||||||
return .85f;
|
return .85f;
|
||||||
|
|
|
@ -1,23 +1,23 @@
|
||||||
package com.simibubi.create.content.contraptions.components.mixer;
|
package com.simibubi.create.content.contraptions.components.mixer;
|
||||||
|
|
||||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
|
||||||
import com.simibubi.create.AllBlockPartials;
|
import com.simibubi.create.AllBlockPartials;
|
||||||
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
|
||||||
import com.simibubi.create.content.contraptions.base.RotatingData;
|
import com.simibubi.create.content.contraptions.base.RotatingData;
|
||||||
import com.simibubi.create.content.contraptions.base.ShaftlessCogInstance;
|
import com.simibubi.create.content.contraptions.base.ShaftlessCogInstance;
|
||||||
import com.simibubi.create.foundation.render.backend.instancing.*;
|
import com.simibubi.create.foundation.render.backend.instancing.*;
|
||||||
import com.simibubi.create.foundation.render.backend.instancing.impl.ModelData;
|
import com.simibubi.create.foundation.render.backend.instancing.impl.OrientedData;
|
||||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||||
import com.simibubi.create.foundation.utility.MatrixStacker;
|
|
||||||
import net.minecraft.util.Direction;
|
import net.minecraft.util.Direction;
|
||||||
|
|
||||||
public class MixerInstance extends ShaftlessCogInstance implements IDynamicInstance {
|
public class MixerInstance extends ShaftlessCogInstance implements IDynamicInstance {
|
||||||
|
|
||||||
private final InstanceKey<RotatingData> mixerHead;
|
private final InstanceKey<RotatingData> mixerHead;
|
||||||
private final InstanceKey<ModelData> mixerPole;
|
private final InstanceKey<OrientedData> mixerPole;
|
||||||
|
private final MechanicalMixerTileEntity mixer;
|
||||||
|
|
||||||
public MixerInstance(InstancedTileRenderer<?> dispatcher, KineticTileEntity tile) {
|
public MixerInstance(InstancedTileRenderer<?> dispatcher, MechanicalMixerTileEntity tile) {
|
||||||
super(dispatcher, tile);
|
super(dispatcher, tile);
|
||||||
|
this.mixer = tile;
|
||||||
|
|
||||||
mixerHead = getRotatingMaterial().getModel(AllBlockPartials.MECHANICAL_MIXER_HEAD, blockState)
|
mixerHead = getRotatingMaterial().getModel(AllBlockPartials.MECHANICAL_MIXER_HEAD, blockState)
|
||||||
.createInstance();
|
.createInstance();
|
||||||
|
@ -25,32 +25,27 @@ public class MixerInstance extends ShaftlessCogInstance implements IDynamicInsta
|
||||||
mixerHead.getInstance()
|
mixerHead.getInstance()
|
||||||
.setRotationAxis(Direction.Axis.Y);
|
.setRotationAxis(Direction.Axis.Y);
|
||||||
|
|
||||||
mixerPole = getTransformMaterial()
|
mixerPole = getOrientedMaterial()
|
||||||
.getModel(AllBlockPartials.MECHANICAL_MIXER_POLE, blockState)
|
.getModel(AllBlockPartials.MECHANICAL_MIXER_POLE, blockState)
|
||||||
.createInstance();
|
.createInstance();
|
||||||
|
|
||||||
|
|
||||||
MechanicalMixerTileEntity mixer = (MechanicalMixerTileEntity) tile;
|
float renderedHeadOffset = getRenderedHeadOffset();
|
||||||
float renderedHeadOffset = getRenderedHeadOffset(mixer);
|
|
||||||
|
|
||||||
transformPole(renderedHeadOffset);
|
transformPole(renderedHeadOffset);
|
||||||
transformHead(mixer, renderedHeadOffset);
|
transformHead(renderedHeadOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void beginFrame() {
|
public void beginFrame() {
|
||||||
MechanicalMixerTileEntity mixer = (MechanicalMixerTileEntity) tile;
|
|
||||||
|
|
||||||
float renderedHeadOffset = getRenderedHeadOffset(mixer);
|
float renderedHeadOffset = getRenderedHeadOffset();
|
||||||
|
|
||||||
if (mixer.running) {
|
|
||||||
transformPole(renderedHeadOffset);
|
transformPole(renderedHeadOffset);
|
||||||
|
transformHead(renderedHeadOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
transformHead(mixer, renderedHeadOffset);
|
private void transformHead(float renderedHeadOffset) {
|
||||||
}
|
|
||||||
|
|
||||||
private void transformHead(MechanicalMixerTileEntity mixer, float renderedHeadOffset) {
|
|
||||||
float speed = mixer.getRenderedHeadRotationSpeed(AnimationTickHolder.getPartialTicks());
|
float speed = mixer.getRenderedHeadRotationSpeed(AnimationTickHolder.getPartialTicks());
|
||||||
|
|
||||||
mixerHead.getInstance()
|
mixerHead.getInstance()
|
||||||
|
@ -60,16 +55,12 @@ public class MixerInstance extends ShaftlessCogInstance implements IDynamicInsta
|
||||||
}
|
}
|
||||||
|
|
||||||
private void transformPole(float renderedHeadOffset) {
|
private void transformPole(float renderedHeadOffset) {
|
||||||
MatrixStack ms = new MatrixStack();
|
mixerPole.getInstance()
|
||||||
|
.setPosition(getInstancePosition())
|
||||||
MatrixStacker msr = MatrixStacker.of(ms);
|
.nudge(0, -renderedHeadOffset, 0);
|
||||||
msr.translate(getInstancePosition());
|
|
||||||
msr.translate(0, -renderedHeadOffset, 0);
|
|
||||||
|
|
||||||
mixerPole.getInstance().setTransform(ms);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private float getRenderedHeadOffset(MechanicalMixerTileEntity mixer) {
|
private float getRenderedHeadOffset() {
|
||||||
return mixer.getRenderedHeadOffset(AnimationTickHolder.getPartialTicks());
|
return mixer.getRenderedHeadOffset(AnimationTickHolder.getPartialTicks());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,7 +69,6 @@ public class MixerInstance extends ShaftlessCogInstance implements IDynamicInsta
|
||||||
super.updateLight();
|
super.updateLight();
|
||||||
|
|
||||||
relight(pos.down(), mixerHead.getInstance());
|
relight(pos.down(), mixerHead.getInstance());
|
||||||
|
|
||||||
relight(pos, mixerPole.getInstance());
|
relight(pos, mixerPole.getInstance());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
package com.simibubi.create.content.contraptions.components.press;
|
package com.simibubi.create.content.contraptions.components.press;
|
||||||
|
|
||||||
|
import net.minecraft.client.renderer.Quaternion;
|
||||||
|
import net.minecraft.client.renderer.Vector3f;
|
||||||
|
|
||||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||||
import com.simibubi.create.AllBlockPartials;
|
import com.simibubi.create.AllBlockPartials;
|
||||||
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||||
|
@ -8,19 +11,28 @@ import com.simibubi.create.foundation.render.backend.instancing.IDynamicInstance
|
||||||
import com.simibubi.create.foundation.render.backend.instancing.InstanceKey;
|
import com.simibubi.create.foundation.render.backend.instancing.InstanceKey;
|
||||||
import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer;
|
import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer;
|
||||||
import com.simibubi.create.foundation.render.backend.instancing.impl.ModelData;
|
import com.simibubi.create.foundation.render.backend.instancing.impl.ModelData;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.impl.OrientedData;
|
||||||
|
import com.simibubi.create.foundation.utility.AngleHelper;
|
||||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||||
import com.simibubi.create.foundation.utility.MatrixStacker;
|
import com.simibubi.create.foundation.utility.MatrixStacker;
|
||||||
|
|
||||||
public class PressInstance extends ShaftInstance implements IDynamicInstance {
|
public class PressInstance extends ShaftInstance implements IDynamicInstance {
|
||||||
|
|
||||||
private final InstanceKey<ModelData> pressHead;
|
private final InstanceKey<OrientedData> pressHead;
|
||||||
private final MechanicalPressTileEntity press;
|
private final MechanicalPressTileEntity press;
|
||||||
|
|
||||||
public PressInstance(InstancedTileRenderer<?> dispatcher, MechanicalPressTileEntity tile) {
|
public PressInstance(InstancedTileRenderer<?> dispatcher, MechanicalPressTileEntity tile) {
|
||||||
super(dispatcher, tile);
|
super(dispatcher, tile);
|
||||||
press = tile;
|
press = tile;
|
||||||
|
|
||||||
pressHead = AllBlockPartials.MECHANICAL_PRESS_HEAD.renderOnHorizontalModel(dispatcher, blockState).createInstance();
|
pressHead = dispatcher.getOrientedMaterial()
|
||||||
|
.getModel(AllBlockPartials.MECHANICAL_PRESS_HEAD, blockState)
|
||||||
|
.createInstance();
|
||||||
|
|
||||||
|
Quaternion q = Vector3f.POSITIVE_Y.getDegreesQuaternion(AngleHelper.horizontalAngle(blockState.get(MechanicalPressBlock.HORIZONTAL_FACING)));
|
||||||
|
|
||||||
|
pressHead.getInstance().setRotation(q);
|
||||||
|
|
||||||
transformModels();
|
transformModels();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,14 +47,9 @@ public class PressInstance extends ShaftInstance implements IDynamicInstance {
|
||||||
private void transformModels() {
|
private void transformModels() {
|
||||||
float renderedHeadOffset = getRenderedHeadOffset(press);
|
float renderedHeadOffset = getRenderedHeadOffset(press);
|
||||||
|
|
||||||
MatrixStack ms = new MatrixStack();
|
|
||||||
|
|
||||||
MatrixStacker msr = MatrixStacker.of(ms);
|
|
||||||
msr.translate(getInstancePosition());
|
|
||||||
msr.translate(0, -renderedHeadOffset, 0);
|
|
||||||
|
|
||||||
pressHead.getInstance()
|
pressHead.getInstance()
|
||||||
.setTransform(ms);
|
.setPosition(getInstancePosition())
|
||||||
|
.nudge(0, -renderedHeadOffset, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
private float getRenderedHeadOffset(MechanicalPressTileEntity press) {
|
private float getRenderedHeadOffset(MechanicalPressTileEntity press) {
|
||||||
|
|
|
@ -2,6 +2,7 @@ package com.simibubi.create.content.contraptions.fluids;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
|
import com.simibubi.create.content.contraptions.relays.elementary.ICogWheel;
|
||||||
import org.apache.commons.lang3.mutable.MutableBoolean;
|
import org.apache.commons.lang3.mutable.MutableBoolean;
|
||||||
|
|
||||||
import com.simibubi.create.AllShapes;
|
import com.simibubi.create.AllShapes;
|
||||||
|
@ -31,7 +32,7 @@ import net.minecraft.world.TickPriority;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.server.ServerWorld;
|
import net.minecraft.world.server.ServerWorld;
|
||||||
|
|
||||||
public class PumpBlock extends DirectionalKineticBlock implements IWaterLoggable {
|
public class PumpBlock extends DirectionalKineticBlock implements IWaterLoggable, ICogWheel {
|
||||||
|
|
||||||
public PumpBlock(Properties p_i48415_1_) {
|
public PumpBlock(Properties p_i48415_1_) {
|
||||||
super(p_i48415_1_);
|
super(p_i48415_1_);
|
||||||
|
@ -82,11 +83,6 @@ public class PumpBlock extends DirectionalKineticBlock implements IWaterLoggable
|
||||||
return AllShapes.PUMP.get(state.get(FACING));
|
return AllShapes.PUMP.get(state.get(FACING));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean hasIntegratedCogwheel(IWorldReader world, BlockPos pos, BlockState state) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void neighborChanged(BlockState state, World world, BlockPos pos, Block otherBlock, BlockPos neighborPos,
|
public void neighborChanged(BlockState state, World world, BlockPos pos, Block otherBlock, BlockPos neighborPos,
|
||||||
boolean isMoving) {
|
boolean isMoving) {
|
||||||
|
|
|
@ -1,5 +1,16 @@
|
||||||
package com.simibubi.create.content.contraptions.relays.advanced;
|
package com.simibubi.create.content.contraptions.relays.advanced;
|
||||||
|
|
||||||
|
import com.simibubi.create.AllBlocks;
|
||||||
|
import com.simibubi.create.AllShapes;
|
||||||
|
import com.simibubi.create.AllTileEntities;
|
||||||
|
import com.simibubi.create.content.contraptions.base.HorizontalAxisKineticBlock;
|
||||||
|
import com.simibubi.create.content.contraptions.relays.elementary.CogWheelBlock;
|
||||||
|
import com.simibubi.create.content.contraptions.relays.elementary.CogwheelBlockItem;
|
||||||
|
import com.simibubi.create.content.contraptions.relays.elementary.ICogWheel;
|
||||||
|
import com.simibubi.create.foundation.block.ITE;
|
||||||
|
import com.simibubi.create.foundation.utility.placement.IPlacementHelper;
|
||||||
|
import com.simibubi.create.foundation.utility.placement.PlacementHelpers;
|
||||||
|
import com.simibubi.create.foundation.utility.placement.PlacementOffset;
|
||||||
import mcp.MethodsReturnNonnullByDefault;
|
import mcp.MethodsReturnNonnullByDefault;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
|
@ -18,18 +29,11 @@ import net.minecraft.util.math.shapes.VoxelShape;
|
||||||
import net.minecraft.world.IBlockReader;
|
import net.minecraft.world.IBlockReader;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
import javax.annotation.ParametersAreNonnullByDefault;
|
||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
import com.simibubi.create.AllBlocks;
|
|
||||||
import com.simibubi.create.AllShapes;
|
|
||||||
import com.simibubi.create.AllTileEntities;
|
|
||||||
import com.simibubi.create.content.contraptions.base.HorizontalAxisKineticBlock;
|
|
||||||
import com.simibubi.create.content.contraptions.relays.elementary.CogWheelBlock;
|
|
||||||
import com.simibubi.create.content.contraptions.relays.elementary.CogwheelBlockItem;
|
|
||||||
import com.simibubi.create.foundation.block.ITE;
|
|
||||||
import com.simibubi.create.foundation.utility.placement.IPlacementHelper;
|
|
||||||
import com.simibubi.create.foundation.utility.placement.PlacementHelpers;
|
|
||||||
import com.simibubi.create.foundation.utility.placement.PlacementOffset;
|
|
||||||
|
|
||||||
|
@ParametersAreNonnullByDefault
|
||||||
|
@MethodsReturnNonnullByDefault
|
||||||
public class SpeedControllerBlock extends HorizontalAxisKineticBlock implements ITE<SpeedControllerTileEntity> {
|
public class SpeedControllerBlock extends HorizontalAxisKineticBlock implements ITE<SpeedControllerTileEntity> {
|
||||||
|
|
||||||
private static final int placementHelperId = PlacementHelpers.register(new PlacementHelper());
|
private static final int placementHelperId = PlacementHelpers.register(new PlacementHelper());
|
||||||
|
@ -48,7 +52,7 @@ public class SpeedControllerBlock extends HorizontalAxisKineticBlock implements
|
||||||
BlockState above = context.getWorld()
|
BlockState above = context.getWorld()
|
||||||
.getBlockState(context.getPos()
|
.getBlockState(context.getPos()
|
||||||
.up());
|
.up());
|
||||||
if (CogWheelBlock.isLargeCog(above) && above.get(CogWheelBlock.AXIS)
|
if (ICogWheel.isLargeCog(above) && above.get(CogWheelBlock.AXIS)
|
||||||
.isHorizontal())
|
.isHorizontal())
|
||||||
return getDefaultState().with(HORIZONTAL_AXIS, above.get(CogWheelBlock.AXIS) == Axis.X ? Axis.Z : Axis.X);
|
return getDefaultState().with(HORIZONTAL_AXIS, above.get(CogWheelBlock.AXIS) == Axis.X ? Axis.Z : Axis.X);
|
||||||
return super.getStateForPlacement(context);
|
return super.getStateForPlacement(context);
|
||||||
|
@ -82,7 +86,7 @@ public class SpeedControllerBlock extends HorizontalAxisKineticBlock implements
|
||||||
private static class PlacementHelper implements IPlacementHelper {
|
private static class PlacementHelper implements IPlacementHelper {
|
||||||
@Override
|
@Override
|
||||||
public Predicate<ItemStack> getItemPredicate() {
|
public Predicate<ItemStack> getItemPredicate() {
|
||||||
return AllBlocks.LARGE_COGWHEEL::isIn;
|
return ((Predicate<ItemStack>) ICogWheel::isLargeCogItem).and(ICogWheel::isDedicatedCogItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -100,8 +104,7 @@ public class SpeedControllerBlock extends HorizontalAxisKineticBlock implements
|
||||||
|
|
||||||
Axis newAxis = state.get(HORIZONTAL_AXIS) == Axis.X ? Axis.Z : Axis.X;
|
Axis newAxis = state.get(HORIZONTAL_AXIS) == Axis.X ? Axis.Z : Axis.X;
|
||||||
|
|
||||||
if (CogwheelBlockItem.hasLargeCogwheelNeighbor(world, newPos, newAxis)
|
if (!CogWheelBlock.isValidCogwheelPosition(true, world, newPos, newAxis))
|
||||||
|| CogwheelBlockItem.hasSmallCogwheelNeighbor(world, newPos, newAxis))
|
|
||||||
return PlacementOffset.fail();
|
return PlacementOffset.fail();
|
||||||
|
|
||||||
return PlacementOffset.success(newPos, s -> s.with(CogWheelBlock.AXIS, newAxis));
|
return PlacementOffset.success(newPos, s -> s.with(CogWheelBlock.AXIS, newAxis));
|
||||||
|
|
|
@ -7,6 +7,7 @@ import com.simibubi.create.content.contraptions.RotationPropagator;
|
||||||
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.components.motor.CreativeMotorTileEntity;
|
import com.simibubi.create.content.contraptions.components.motor.CreativeMotorTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.relays.elementary.CogWheelBlock;
|
import com.simibubi.create.content.contraptions.relays.elementary.CogWheelBlock;
|
||||||
|
import com.simibubi.create.content.contraptions.relays.elementary.ICogWheel;
|
||||||
import com.simibubi.create.foundation.config.AllConfigs;
|
import com.simibubi.create.foundation.config.AllConfigs;
|
||||||
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
||||||
import com.simibubi.create.foundation.tileEntity.behaviour.ValueBoxTransform;
|
import com.simibubi.create.foundation.tileEntity.behaviour.ValueBoxTransform;
|
||||||
|
@ -118,8 +119,8 @@ public class SpeedControllerTileEntity extends KineticTileEntity {
|
||||||
if (world == null || !world.isRemote)
|
if (world == null || !world.isRemote)
|
||||||
return;
|
return;
|
||||||
BlockState stateAbove = world.getBlockState(pos.up());
|
BlockState stateAbove = world.getBlockState(pos.up());
|
||||||
hasBracket = AllBlocks.LARGE_COGWHEEL.has(stateAbove) && stateAbove.get(CogWheelBlock.AXIS)
|
hasBracket = ICogWheel.isDedicatedCogWheel(stateAbove.getBlock()) && ICogWheel.isLargeCog(stateAbove)
|
||||||
.isHorizontal();
|
&& stateAbove.get(CogWheelBlock.AXIS).isHorizontal();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -5,18 +5,14 @@ import com.simibubi.create.AllShapes;
|
||||||
import com.simibubi.create.content.contraptions.base.IRotate;
|
import com.simibubi.create.content.contraptions.base.IRotate;
|
||||||
import com.simibubi.create.content.contraptions.relays.advanced.SpeedControllerBlock;
|
import com.simibubi.create.content.contraptions.relays.advanced.SpeedControllerBlock;
|
||||||
import com.simibubi.create.foundation.utility.Iterate;
|
import com.simibubi.create.foundation.utility.Iterate;
|
||||||
|
import mcp.MethodsReturnNonnullByDefault;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.fluid.Fluids;
|
import net.minecraft.fluid.Fluids;
|
||||||
import net.minecraft.fluid.IFluidState;
|
|
||||||
import net.minecraft.item.BlockItemUseContext;
|
import net.minecraft.item.BlockItemUseContext;
|
||||||
import net.minecraft.item.ItemGroup;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.state.properties.BlockStateProperties;
|
import net.minecraft.state.properties.BlockStateProperties;
|
||||||
import net.minecraft.util.Direction;
|
import net.minecraft.util.Direction;
|
||||||
import net.minecraft.util.Direction.Axis;
|
import net.minecraft.util.Direction.Axis;
|
||||||
import net.minecraft.util.NonNullList;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.math.shapes.ISelectionContext;
|
import net.minecraft.util.math.shapes.ISelectionContext;
|
||||||
import net.minecraft.util.math.shapes.VoxelShape;
|
import net.minecraft.util.math.shapes.VoxelShape;
|
||||||
|
@ -24,11 +20,16 @@ import net.minecraft.world.IBlockReader;
|
||||||
import net.minecraft.world.IWorldReader;
|
import net.minecraft.world.IWorldReader;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
public class CogWheelBlock extends AbstractShaftBlock {
|
import javax.annotation.ParametersAreNonnullByDefault;
|
||||||
|
|
||||||
|
@ParametersAreNonnullByDefault
|
||||||
|
@MethodsReturnNonnullByDefault
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
|
public class CogWheelBlock extends AbstractShaftBlock implements ICogWheel {
|
||||||
|
|
||||||
boolean isLarge;
|
boolean isLarge;
|
||||||
|
|
||||||
private CogWheelBlock(boolean large, Properties properties) {
|
protected CogWheelBlock(boolean large, Properties properties) {
|
||||||
super(properties);
|
super(properties);
|
||||||
isLarge = large;
|
isLarge = large;
|
||||||
}
|
}
|
||||||
|
@ -41,12 +42,14 @@ public class CogWheelBlock extends AbstractShaftBlock {
|
||||||
return new CogWheelBlock(true, properties);
|
return new CogWheelBlock(true, properties);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isSmallCog(BlockState state) {
|
@Override
|
||||||
return AllBlocks.COGWHEEL.has(state);
|
public boolean isLargeCog() {
|
||||||
|
return isLarge;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isLargeCog(BlockState state) {
|
@Override
|
||||||
return AllBlocks.LARGE_COGWHEEL.has(state);
|
public boolean isSmallCog() {
|
||||||
|
return !isLarge;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -56,8 +59,12 @@ public class CogWheelBlock extends AbstractShaftBlock {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isValidPosition(BlockState state, IWorldReader worldIn, BlockPos pos) {
|
public boolean isValidPosition(BlockState state, IWorldReader worldIn, BlockPos pos) {
|
||||||
|
return isValidCogwheelPosition(ICogWheel.isLargeCog(state), worldIn, pos, state.get(AXIS));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean isValidCogwheelPosition(boolean large, IWorldReader worldIn, BlockPos pos, Axis cogAxis) {
|
||||||
for (Direction facing : Iterate.directions) {
|
for (Direction facing : Iterate.directions) {
|
||||||
if (facing.getAxis() == state.get(AXIS))
|
if (facing.getAxis() == cogAxis)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
BlockPos offsetPos = pos.offset(facing);
|
BlockPos offsetPos = pos.offset(facing);
|
||||||
|
@ -65,75 +72,53 @@ public class CogWheelBlock extends AbstractShaftBlock {
|
||||||
if (blockState.has(AXIS) && facing.getAxis() == blockState.get(AXIS))
|
if (blockState.has(AXIS) && facing.getAxis() == blockState.get(AXIS))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
boolean smallCog = isSmallCog(blockState);
|
if (ICogWheel.isLargeCog(blockState) || large && ICogWheel.isSmallCog(blockState))
|
||||||
if (!smallCog && blockState.getBlock() instanceof IRotate)
|
|
||||||
smallCog = ((IRotate) blockState.getBlock()).hasIntegratedCogwheel(worldIn, offsetPos, blockState);
|
|
||||||
|
|
||||||
if (isLargeCog(blockState) || isLarge && smallCog)
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected Axis getAxisForPlacement(BlockItemUseContext context) {
|
||||||
|
if (context.getPlayer() != null && context.getPlayer().isSneaking())
|
||||||
|
return context.getFace().getAxis();
|
||||||
|
|
||||||
|
World world = context.getWorld();
|
||||||
|
BlockState stateBelow = world.getBlockState(context.getPos().down());
|
||||||
|
|
||||||
|
if (AllBlocks.ROTATION_SPEED_CONTROLLER.has(stateBelow) && isLargeCog())
|
||||||
|
return stateBelow.get(SpeedControllerBlock.HORIZONTAL_AXIS) == Axis.X ? Axis.Z : Axis.X;
|
||||||
|
|
||||||
|
BlockPos placedOnPos = context.getPos().offset(context.getFace().getOpposite());
|
||||||
|
BlockState placedAgainst = world.getBlockState(placedOnPos);
|
||||||
|
|
||||||
|
Block block = placedAgainst.getBlock();
|
||||||
|
if (ICogWheel.isSmallCog(placedAgainst))
|
||||||
|
return ((IRotate) block).getRotationAxis(placedAgainst);
|
||||||
|
|
||||||
|
Axis preferredAxis = getPreferredAxis(context);
|
||||||
|
return preferredAxis != null ? preferredAxis : context.getFace().getAxis();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BlockState getStateForPlacement(BlockItemUseContext context) {
|
public BlockState getStateForPlacement(BlockItemUseContext context) {
|
||||||
BlockPos placedOnPos = context.getPos()
|
boolean shouldWaterlog = context.getWorld().getFluidState(context.getPos()).getFluid() == Fluids.WATER;
|
||||||
.offset(context.getFace()
|
|
||||||
.getOpposite());
|
|
||||||
World world = context.getWorld();
|
|
||||||
BlockState placedAgainst = world.getBlockState(placedOnPos);
|
|
||||||
Block block = placedAgainst.getBlock();
|
|
||||||
|
|
||||||
if (context.getPlayer() != null && context.getPlayer()
|
|
||||||
.isSneaking())
|
|
||||||
return this.getDefaultState()
|
return this.getDefaultState()
|
||||||
.with(AXIS, context.getFace()
|
.with(AXIS, getAxisForPlacement(context))
|
||||||
.getAxis());
|
.with(BlockStateProperties.WATERLOGGED, shouldWaterlog);
|
||||||
|
|
||||||
BlockState stateBelow = world.getBlockState(context.getPos()
|
|
||||||
.down());
|
|
||||||
IFluidState ifluidstate = context.getWorld()
|
|
||||||
.getFluidState(context.getPos());
|
|
||||||
if (AllBlocks.ROTATION_SPEED_CONTROLLER.has(stateBelow) && isLarge) {
|
|
||||||
return this.getDefaultState()
|
|
||||||
.with(BlockStateProperties.WATERLOGGED, ifluidstate.getFluid() == Fluids.WATER)
|
|
||||||
.with(AXIS, stateBelow.get(SpeedControllerBlock.HORIZONTAL_AXIS) == Axis.X ? Axis.Z : Axis.X);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(block instanceof IRotate)
|
|
||||||
|| !(((IRotate) block).hasIntegratedCogwheel(world, placedOnPos, placedAgainst))) {
|
|
||||||
Axis preferredAxis = getPreferredAxis(context);
|
|
||||||
if (preferredAxis != null)
|
|
||||||
return this.getDefaultState()
|
|
||||||
.with(AXIS, preferredAxis)
|
|
||||||
.with(BlockStateProperties.WATERLOGGED, ifluidstate.getFluid() == Fluids.WATER);
|
|
||||||
return this.getDefaultState()
|
|
||||||
.with(AXIS, context.getFace()
|
|
||||||
.getAxis())
|
|
||||||
.with(BlockStateProperties.WATERLOGGED, ifluidstate.getFluid() == Fluids.WATER);
|
|
||||||
}
|
|
||||||
|
|
||||||
return getDefaultState().with(AXIS, ((IRotate) block).getRotationAxis(placedAgainst));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float getParticleTargetRadius() {
|
public float getParticleTargetRadius() {
|
||||||
return isLarge ? 1.125f : .65f;
|
return isLargeCog() ? 1.125f : .65f;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float getParticleInitialRadius() {
|
public float getParticleInitialRadius() {
|
||||||
return isLarge ? 1f : .75f;
|
return isLargeCog() ? 1f : .75f;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void fillItemGroup(ItemGroup group, NonNullList<ItemStack> items) {
|
|
||||||
items.add(new ItemStack(this));
|
|
||||||
}
|
|
||||||
|
|
||||||
// IRotate
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasIntegratedCogwheel(IWorldReader world, BlockPos pos, BlockState state) {
|
public boolean isDedicatedCogWheel() {
|
||||||
return !isLarge;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,11 +17,9 @@ import net.minecraft.world.World;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
import com.simibubi.create.AllBlocks;
|
|
||||||
import com.simibubi.create.AllShapes;
|
import com.simibubi.create.AllShapes;
|
||||||
import com.simibubi.create.content.contraptions.base.DirectionalKineticBlock;
|
import com.simibubi.create.content.contraptions.base.DirectionalKineticBlock;
|
||||||
import com.simibubi.create.content.contraptions.base.HorizontalKineticBlock;
|
import com.simibubi.create.content.contraptions.base.HorizontalKineticBlock;
|
||||||
import com.simibubi.create.content.contraptions.base.IRotate;
|
|
||||||
import com.simibubi.create.foundation.advancement.AllTriggers;
|
import com.simibubi.create.foundation.advancement.AllTriggers;
|
||||||
import com.simibubi.create.foundation.utility.Iterate;
|
import com.simibubi.create.foundation.utility.Iterate;
|
||||||
import com.simibubi.create.foundation.utility.placement.IPlacementHelper;
|
import com.simibubi.create.foundation.utility.placement.IPlacementHelper;
|
||||||
|
@ -100,7 +98,7 @@ public class CogwheelBlockItem extends BlockItem {
|
||||||
continue;
|
continue;
|
||||||
if (blockState.get(CogWheelBlock.AXIS) != axis)
|
if (blockState.get(CogWheelBlock.AXIS) != axis)
|
||||||
continue;
|
continue;
|
||||||
if (AllBlocks.LARGE_COGWHEEL.has(blockState) == large)
|
if (ICogWheel.isLargeCog(blockState) == large)
|
||||||
continue;
|
continue;
|
||||||
AllTriggers.triggerFor(AllTriggers.SHIFTING_GEARS, player);
|
AllTriggers.triggerFor(AllTriggers.SHIFTING_GEARS, player);
|
||||||
}
|
}
|
||||||
|
@ -114,7 +112,7 @@ public class CogwheelBlockItem extends BlockItem {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Predicate<ItemStack> getItemPredicate() {
|
public Predicate<ItemStack> getItemPredicate() {
|
||||||
return AllBlocks.COGWHEEL::isIn;
|
return ((Predicate<ItemStack>) ICogWheel::isSmallCogItem).and(ICogWheel::isDedicatedCogItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -129,7 +127,7 @@ public class CogwheelBlockItem extends BlockItem {
|
||||||
for (Direction dir : directions) {
|
for (Direction dir : directions) {
|
||||||
BlockPos newPos = pos.offset(dir);
|
BlockPos newPos = pos.offset(dir);
|
||||||
|
|
||||||
if (hasLargeCogwheelNeighbor(world, newPos, state.get(AXIS)))
|
if (!CogWheelBlock.isValidCogwheelPosition(false, world, newPos, state.get(AXIS)))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!world.getBlockState(newPos)
|
if (!world.getBlockState(newPos)
|
||||||
|
@ -153,7 +151,7 @@ public class CogwheelBlockItem extends BlockItem {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Predicate<ItemStack> getItemPredicate() {
|
public Predicate<ItemStack> getItemPredicate() {
|
||||||
return AllBlocks.LARGE_COGWHEEL::isIn;
|
return ((Predicate<ItemStack>) ICogWheel::isLargeCogItem).and(ICogWheel::isDedicatedCogItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -170,7 +168,7 @@ public class CogwheelBlockItem extends BlockItem {
|
||||||
BlockPos newPos = pos.offset(dir)
|
BlockPos newPos = pos.offset(dir)
|
||||||
.offset(side);
|
.offset(side);
|
||||||
|
|
||||||
if (hasLargeCogwheelNeighbor(world, newPos, dir.getAxis()) || hasSmallCogwheelNeighbor(world, newPos, dir.getAxis()))
|
if (!CogWheelBlock.isValidCogwheelPosition(true, world, newPos, dir.getAxis()))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!world.getBlockState(newPos)
|
if (!world.getBlockState(newPos)
|
||||||
|
@ -212,7 +210,7 @@ public class CogwheelBlockItem extends BlockItem {
|
||||||
.isReplaceable())
|
.isReplaceable())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (AllBlocks.COGWHEEL.has(state) && hasSmallCogwheelNeighbor(world, newPos, state.get(AXIS)))
|
if (!CogWheelBlock.isValidCogwheelPosition(ICogWheel.isLargeCog(state), world, newPos, state.get(AXIS)))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
return PlacementOffset.success(newPos, s -> s.with(AXIS, state.get(AXIS)));
|
return PlacementOffset.success(newPos, s -> s.with(AXIS, state.get(AXIS)));
|
||||||
|
@ -236,13 +234,12 @@ public class CogwheelBlockItem extends BlockItem {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Predicate<ItemStack> getItemPredicate() {
|
public Predicate<ItemStack> getItemPredicate() {
|
||||||
return AllBlocks.LARGE_COGWHEEL::isIn;
|
return ((Predicate<ItemStack>) ICogWheel::isLargeCogItem).and(ICogWheel::isDedicatedCogItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Predicate<BlockState> getStatePredicate() {
|
public Predicate<BlockState> getStatePredicate() {
|
||||||
return s -> !AllBlocks.COGWHEEL.has(s) && s.getBlock() instanceof IRotate
|
return s -> !ICogWheel.isDedicatedCogWheel(s.getBlock()) && ICogWheel.isSmallCog(s);
|
||||||
&& ((IRotate) s.getBlock()).hasIntegratedCogwheel(null, null, null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -274,8 +271,7 @@ public class CogwheelBlockItem extends BlockItem {
|
||||||
.isReplaceable())
|
.isReplaceable())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (hasLargeCogwheelNeighbor(world, newPos, newAxis)
|
if (!CogWheelBlock.isValidCogwheelPosition(false, world, newPos, newAxis))
|
||||||
|| hasSmallCogwheelNeighbor(world, newPos, newAxis))
|
|
||||||
return PlacementOffset.fail();
|
return PlacementOffset.fail();
|
||||||
|
|
||||||
return PlacementOffset.success(newPos, s -> s.with(CogWheelBlock.AXIS, newAxis));
|
return PlacementOffset.success(newPos, s -> s.with(CogWheelBlock.AXIS, newAxis));
|
||||||
|
@ -285,27 +281,4 @@ public class CogwheelBlockItem extends BlockItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
static public boolean hasLargeCogwheelNeighbor(World world, BlockPos pos, Axis axis) {
|
|
||||||
for (Direction dir : Iterate.directions) {
|
|
||||||
if (dir.getAxis() == axis)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (AllBlocks.LARGE_COGWHEEL.has(world.getBlockState(pos.offset(dir))))
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
static public boolean hasSmallCogwheelNeighbor(World world, BlockPos pos, Axis axis) {
|
|
||||||
for (Direction dir : Iterate.directions) {
|
|
||||||
if (dir.getAxis() == axis)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (AllBlocks.COGWHEEL.has(world.getBlockState(pos.offset(dir))))
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,64 @@
|
||||||
|
package com.simibubi.create.content.contraptions.relays.elementary;
|
||||||
|
|
||||||
|
import com.simibubi.create.content.contraptions.base.IRotate;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.item.BlockItem;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
|
public interface ICogWheel extends IRotate {
|
||||||
|
|
||||||
|
static boolean isSmallCog(BlockState state) {
|
||||||
|
return isSmallCog(state.getBlock());
|
||||||
|
}
|
||||||
|
|
||||||
|
static boolean isLargeCog(BlockState state) {
|
||||||
|
return isLargeCog(state.getBlock());
|
||||||
|
}
|
||||||
|
|
||||||
|
static boolean isSmallCog(Block block) {
|
||||||
|
return block instanceof ICogWheel && ((ICogWheel) block).isSmallCog();
|
||||||
|
}
|
||||||
|
|
||||||
|
static boolean isLargeCog(Block block) {
|
||||||
|
return block instanceof ICogWheel && ((ICogWheel) block).isLargeCog();
|
||||||
|
}
|
||||||
|
|
||||||
|
static boolean isDedicatedCogWheel(Block block) {
|
||||||
|
return block instanceof ICogWheel && ((ICogWheel) block).isDedicatedCogWheel();
|
||||||
|
}
|
||||||
|
|
||||||
|
static boolean isDedicatedCogItem(ItemStack test) {
|
||||||
|
Item item = test.getItem();
|
||||||
|
if (!(item instanceof BlockItem))
|
||||||
|
return false;
|
||||||
|
return isDedicatedCogWheel(((BlockItem) item).getBlock());
|
||||||
|
}
|
||||||
|
|
||||||
|
static boolean isSmallCogItem(ItemStack test) {
|
||||||
|
Item item = test.getItem();
|
||||||
|
if (!(item instanceof BlockItem))
|
||||||
|
return false;
|
||||||
|
return isSmallCog(((BlockItem) item).getBlock());
|
||||||
|
}
|
||||||
|
|
||||||
|
static boolean isLargeCogItem(ItemStack test) {
|
||||||
|
Item item = test.getItem();
|
||||||
|
if (!(item instanceof BlockItem))
|
||||||
|
return false;
|
||||||
|
return isLargeCog(((BlockItem) item).getBlock());
|
||||||
|
}
|
||||||
|
|
||||||
|
default boolean isLargeCog() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
default boolean isSmallCog() {
|
||||||
|
return !isLargeCog();
|
||||||
|
}
|
||||||
|
|
||||||
|
default boolean isDedicatedCogWheel() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
|
@ -2,7 +2,6 @@ package com.simibubi.create.content.contraptions.relays.elementary;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.simibubi.create.AllBlocks;
|
|
||||||
import com.simibubi.create.content.contraptions.base.IRotate;
|
import com.simibubi.create.content.contraptions.base.IRotate;
|
||||||
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||||
import com.simibubi.create.foundation.advancement.AllTriggers;
|
import com.simibubi.create.foundation.advancement.AllTriggers;
|
||||||
|
@ -34,7 +33,7 @@ public class SimpleKineticTileEntity extends KineticTileEntity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<BlockPos> addPropagationLocations(IRotate block, BlockState state, List<BlockPos> neighbours) {
|
public List<BlockPos> addPropagationLocations(IRotate block, BlockState state, List<BlockPos> neighbours) {
|
||||||
if (!AllBlocks.LARGE_COGWHEEL.has(state))
|
if (!ICogWheel.isLargeCog(state))
|
||||||
return super.addPropagationLocations(block, state, neighbours);
|
return super.addPropagationLocations(block, state, neighbours);
|
||||||
|
|
||||||
BlockPos.getAllInBox(new BlockPos(-1, -1, -1), new BlockPos(1, 1, 1))
|
BlockPos.getAllInBox(new BlockPos(-1, -1, -1), new BlockPos(1, 1, 1))
|
||||||
|
|
|
@ -302,6 +302,10 @@ public class EjectorTileEntity extends KineticTileEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state == State.RETRACTING) {
|
if (state == State.RETRACTING) {
|
||||||
|
if (lidProgress.getChaseTarget() == 1 && !lidProgress.settled()) {
|
||||||
|
lidProgress.tickChaser();
|
||||||
|
} else {
|
||||||
|
lidProgress.updateChaseTarget(0);
|
||||||
lidProgress.updateChaseSpeed(0);
|
lidProgress.updateChaseSpeed(0);
|
||||||
if (lidProgress.getValue() == 0 && doLogic) {
|
if (lidProgress.getValue() == 0 && doLogic) {
|
||||||
state = State.CHARGED;
|
state = State.CHARGED;
|
||||||
|
@ -319,6 +323,7 @@ public class EjectorTileEntity extends KineticTileEntity {
|
||||||
world.playSound(null, pos, SoundEvents.BLOCK_WOODEN_BUTTON_CLICK_OFF, SoundCategory.BLOCKS, volume,
|
world.playSound(null, pos, SoundEvents.BLOCK_WOODEN_BUTTON_CLICK_OFF, SoundCategory.BLOCKS, volume,
|
||||||
pitch);
|
pitch);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (state != prevState)
|
if (state != prevState)
|
||||||
notifyUpdate();
|
notifyUpdate();
|
||||||
|
@ -509,10 +514,6 @@ public class EjectorTileEntity extends KineticTileEntity {
|
||||||
|
|
||||||
public void setTarget(int horizontalDistance, int verticalDistance) {
|
public void setTarget(int horizontalDistance, int verticalDistance) {
|
||||||
launcher.set(Math.max(1, horizontalDistance), verticalDistance);
|
launcher.set(Math.max(1, horizontalDistance), verticalDistance);
|
||||||
if (horizontalDistance == 0 && verticalDistance == 0) {
|
|
||||||
state = State.CHARGED;
|
|
||||||
lidProgress.startWithValue(0);
|
|
||||||
}
|
|
||||||
sendData();
|
sendData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ public class EntityLauncher {
|
||||||
public void applyMotion(Entity entity, Direction facing) {
|
public void applyMotion(Entity entity, Direction facing) {
|
||||||
Vec3d motionVec = new Vec3d(0, yMotion, xMotion);
|
Vec3d motionVec = new Vec3d(0, yMotion, xMotion);
|
||||||
motionVec = VecHelper.rotate(motionVec, AngleHelper.horizontalAngle(facing), Axis.Y);
|
motionVec = VecHelper.rotate(motionVec, AngleHelper.horizontalAngle(facing), Axis.Y);
|
||||||
entity.setMotion(motionVec.x, motionVec.y, motionVec.z);
|
entity.setMotion(motionVec.x * .91, motionVec.y * .98, motionVec.z * .91);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getHorizontalDistance() {
|
public int getHorizontalDistance() {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.simibubi.create.content.logistics.block.mechanicalArm;
|
package com.simibubi.create.content.logistics.block.mechanicalArm;
|
||||||
|
|
||||||
|
import com.simibubi.create.content.contraptions.relays.elementary.ICogWheel;
|
||||||
import org.apache.commons.lang3.mutable.MutableBoolean;
|
import org.apache.commons.lang3.mutable.MutableBoolean;
|
||||||
|
|
||||||
import com.simibubi.create.AllShapes;
|
import com.simibubi.create.AllShapes;
|
||||||
|
@ -29,7 +30,7 @@ import net.minecraft.world.IBlockReader;
|
||||||
import net.minecraft.world.IWorldReader;
|
import net.minecraft.world.IWorldReader;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
public class ArmBlock extends KineticBlock implements ITE<ArmTileEntity> {
|
public class ArmBlock extends KineticBlock implements ITE<ArmTileEntity>, ICogWheel {
|
||||||
|
|
||||||
public static final BooleanProperty CEILING = BooleanProperty.create("ceiling");
|
public static final BooleanProperty CEILING = BooleanProperty.create("ceiling");
|
||||||
|
|
||||||
|
@ -48,11 +49,6 @@ public class ArmBlock extends KineticBlock implements ITE<ArmTileEntity> {
|
||||||
return getDefaultState().with(CEILING, ctx.getFace() == Direction.DOWN);
|
return getDefaultState().with(CEILING, ctx.getFace() == Direction.DOWN);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean hasIntegratedCogwheel(IWorldReader world, BlockPos pos, BlockState state) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public VoxelShape getShape(BlockState state, IBlockReader p_220053_2_, BlockPos p_220053_3_,
|
public VoxelShape getShape(BlockState state, IBlockReader p_220053_2_, BlockPos p_220053_3_,
|
||||||
ISelectionContext p_220053_4_) {
|
ISelectionContext p_220053_4_) {
|
||||||
|
|
|
@ -790,11 +790,11 @@ public class StandardRecipeGen extends CreateRecipeProvider {
|
||||||
REDSTONE_CONTACT = create(AllBlocks.REDSTONE_CONTACT).returns(2)
|
REDSTONE_CONTACT = create(AllBlocks.REDSTONE_CONTACT).returns(2)
|
||||||
.unlockedBy(I::brassCasing)
|
.unlockedBy(I::brassCasing)
|
||||||
.viaShaped(b -> b.key('W', I.redstone())
|
.viaShaped(b -> b.key('W', I.redstone())
|
||||||
.key('D', I.brassCasing())
|
.key('C', Blocks.COBBLESTONE)
|
||||||
.key('S', I.iron())
|
.key('S', I.ironSheet())
|
||||||
.patternLine("WDW")
|
|
||||||
.patternLine(" S ")
|
.patternLine(" S ")
|
||||||
.patternLine("WDW")),
|
.patternLine("CWC")
|
||||||
|
.patternLine("CCC")),
|
||||||
|
|
||||||
ANDESITE_FUNNEL = create(AllBlocks.ANDESITE_FUNNEL).returns(2)
|
ANDESITE_FUNNEL = create(AllBlocks.ANDESITE_FUNNEL).returns(2)
|
||||||
.unlockedBy(I::andesite)
|
.unlockedBy(I::andesite)
|
||||||
|
|
|
@ -123,7 +123,8 @@ public class AllIcons implements IScreenRenderable {
|
||||||
I_MTD_RIGHT = next(),
|
I_MTD_RIGHT = next(),
|
||||||
I_MTD_SCAN = next(),
|
I_MTD_SCAN = next(),
|
||||||
I_MTD_REPLAY = next(),
|
I_MTD_REPLAY = next(),
|
||||||
I_MTD_USER_MODE = next();
|
I_MTD_USER_MODE = next(),
|
||||||
|
I_MTD_SLOW_MODE = next();
|
||||||
|
|
||||||
public AllIcons(int x, int y) {
|
public AllIcons(int x, int y) {
|
||||||
iconX = x * 16;
|
iconX = x * 16;
|
||||||
|
|
|
@ -80,6 +80,7 @@ public class PonderLocalization {
|
||||||
addGeneral(object, PonderUI.PREVIOUS, "Previous Scene");
|
addGeneral(object, PonderUI.PREVIOUS, "Previous Scene");
|
||||||
addGeneral(object, PonderUI.REPLAY, "Replay");
|
addGeneral(object, PonderUI.REPLAY, "Replay");
|
||||||
addGeneral(object, PonderUI.THINK_BACK, "Think Back");
|
addGeneral(object, PonderUI.THINK_BACK, "Think Back");
|
||||||
|
addGeneral(object, PonderUI.SLOW_TEXT, "Comfy Reading");
|
||||||
|
|
||||||
shared.forEach((k, v) -> object.addProperty(Create.ID + "." + langKeyForShared(k), v));
|
shared.forEach((k, v) -> object.addProperty(Create.ID + "." + langKeyForShared(k), v));
|
||||||
tag.forEach((k, v) -> {
|
tag.forEach((k, v) -> {
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package com.simibubi.create.foundation.ponder;
|
package com.simibubi.create.foundation.ponder;
|
||||||
|
|
||||||
|
import static com.simibubi.create.foundation.ponder.PonderLocalization.LANG_PREFIX;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -21,6 +23,7 @@ import com.simibubi.create.foundation.ponder.content.PonderChapter;
|
||||||
import com.simibubi.create.foundation.ponder.content.PonderIndex;
|
import com.simibubi.create.foundation.ponder.content.PonderIndex;
|
||||||
import com.simibubi.create.foundation.ponder.content.PonderTag;
|
import com.simibubi.create.foundation.ponder.content.PonderTag;
|
||||||
import com.simibubi.create.foundation.ponder.content.PonderTagScreen;
|
import com.simibubi.create.foundation.ponder.content.PonderTagScreen;
|
||||||
|
import com.simibubi.create.foundation.ponder.elements.TextWindowElement;
|
||||||
import com.simibubi.create.foundation.ponder.ui.PonderButton;
|
import com.simibubi.create.foundation.ponder.ui.PonderButton;
|
||||||
import com.simibubi.create.foundation.renderState.SuperRenderTypeBuffer;
|
import com.simibubi.create.foundation.renderState.SuperRenderTypeBuffer;
|
||||||
import com.simibubi.create.foundation.utility.ColorHelper;
|
import com.simibubi.create.foundation.utility.ColorHelper;
|
||||||
|
@ -58,14 +61,15 @@ public class PonderUI extends NavigatableSimiScreen {
|
||||||
public static int ponderTicks;
|
public static int ponderTicks;
|
||||||
public static float ponderPartialTicksPaused;
|
public static float ponderPartialTicksPaused;
|
||||||
|
|
||||||
public static final String PONDERING = PonderLocalization.LANG_PREFIX + "pondering";
|
public static final String PONDERING = LANG_PREFIX + "pondering";
|
||||||
public static final String IDENTIFY_MODE = PonderLocalization.LANG_PREFIX + "identify_mode";
|
public static final String IDENTIFY_MODE = LANG_PREFIX + "identify_mode";
|
||||||
public static final String IN_CHAPTER = PonderLocalization.LANG_PREFIX + "in_chapter";
|
public static final String IN_CHAPTER = LANG_PREFIX + "in_chapter";
|
||||||
public static final String IDENTIFY = PonderLocalization.LANG_PREFIX + "identify";
|
public static final String IDENTIFY = LANG_PREFIX + "identify";
|
||||||
public static final String PREVIOUS = PonderLocalization.LANG_PREFIX + "previous";
|
public static final String PREVIOUS = LANG_PREFIX + "previous";
|
||||||
public static final String CLOSE = PonderLocalization.LANG_PREFIX + "close";
|
public static final String CLOSE = LANG_PREFIX + "close";
|
||||||
public static final String NEXT = PonderLocalization.LANG_PREFIX + "next";
|
public static final String NEXT = LANG_PREFIX + "next";
|
||||||
public static final String REPLAY = PonderLocalization.LANG_PREFIX + "replay";
|
public static final String REPLAY = LANG_PREFIX + "replay";
|
||||||
|
public static final String SLOW_TEXT = LANG_PREFIX + "slow_text";
|
||||||
|
|
||||||
private List<PonderScene> scenes;
|
private List<PonderScene> scenes;
|
||||||
private List<PonderTag> tags;
|
private List<PonderTag> tags;
|
||||||
|
@ -76,6 +80,7 @@ public class PonderUI extends NavigatableSimiScreen {
|
||||||
PonderChapter chapter = null;
|
PonderChapter chapter = null;
|
||||||
|
|
||||||
private boolean userViewMode;
|
private boolean userViewMode;
|
||||||
|
private boolean slowTextMode;
|
||||||
private boolean identifyMode;
|
private boolean identifyMode;
|
||||||
private ItemStack hoveredTooltipItem;
|
private ItemStack hoveredTooltipItem;
|
||||||
private BlockPos hoveredBlockPos;
|
private BlockPos hoveredBlockPos;
|
||||||
|
@ -90,10 +95,13 @@ public class PonderUI extends NavigatableSimiScreen {
|
||||||
private int index = 0;
|
private int index = 0;
|
||||||
private PonderTag referredToByTag;
|
private PonderTag referredToByTag;
|
||||||
|
|
||||||
private PonderButton left, right, scan, chap, userMode, close, replay;
|
private PonderButton left, right, scan, chap, userMode, close, replay, slowMode;
|
||||||
private PonderProgressBar progressBar;
|
private PonderProgressBar progressBar;
|
||||||
private int skipCooling = 0;
|
private int skipCooling = 0;
|
||||||
|
|
||||||
|
private int extendedTickLength = 0;
|
||||||
|
private int extendedTickTimer = 0;
|
||||||
|
|
||||||
public static PonderUI of(ResourceLocation id) {
|
public static PonderUI of(ResourceLocation id) {
|
||||||
return new PonderUI(PonderRegistry.compile(id));
|
return new PonderUI(PonderRegistry.compile(id));
|
||||||
}
|
}
|
||||||
|
@ -196,8 +204,13 @@ public class PonderUI extends NavigatableSimiScreen {
|
||||||
.shortcut(bindings.keyBindDrop)
|
.shortcut(bindings.keyBindDrop)
|
||||||
.fade(0, -1));
|
.fade(0, -1));
|
||||||
|
|
||||||
|
widgets.add(slowMode = new PonderButton(width - 20 - 31, bY, () -> {
|
||||||
|
slowTextMode = !slowTextMode;
|
||||||
|
}).showing(AllIcons.I_MTD_SLOW_MODE)
|
||||||
|
.fade(0, -1));
|
||||||
|
|
||||||
if (PonderIndex.EDITOR_MODE) {
|
if (PonderIndex.EDITOR_MODE) {
|
||||||
widgets.add(userMode = new PonderButton(width - 20 - 31, bY, () -> {
|
widgets.add(userMode = new PonderButton(width - 50 - 31, bY, () -> {
|
||||||
userViewMode = !userViewMode;
|
userViewMode = !userViewMode;
|
||||||
}).showing(AllIcons.I_MTD_USER_MODE)
|
}).showing(AllIcons.I_MTD_USER_MODE)
|
||||||
.fade(0, -1));
|
.fade(0, -1));
|
||||||
|
@ -250,16 +263,32 @@ public class PonderUI extends NavigatableSimiScreen {
|
||||||
referredToByTag = null;
|
referredToByTag = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lazyIndex.tickChaser();
|
||||||
|
fadeIn.tickChaser();
|
||||||
|
finishingFlash.tickChaser();
|
||||||
PonderScene activeScene = scenes.get(index);
|
PonderScene activeScene = scenes.get(index);
|
||||||
|
|
||||||
|
extendedTickLength = 0;
|
||||||
|
if (slowTextMode)
|
||||||
|
activeScene.forEachVisible(TextWindowElement.class, twe -> extendedTickLength = 2);
|
||||||
|
|
||||||
|
if (extendedTickTimer == 0) {
|
||||||
if (!identifyMode) {
|
if (!identifyMode) {
|
||||||
ponderTicks++;
|
ponderTicks++;
|
||||||
if (skipCooling == 0)
|
if (skipCooling == 0)
|
||||||
activeScene.tick();
|
activeScene.tick();
|
||||||
}
|
}
|
||||||
|
|
||||||
lazyIndex.tickChaser();
|
if (!identifyMode) {
|
||||||
fadeIn.tickChaser();
|
float lazyIndexValue = lazyIndex.getValue();
|
||||||
finishingFlash.tickChaser();
|
if (Math.abs(lazyIndexValue - index) > 1 / 512f)
|
||||||
|
scenes.get(lazyIndexValue < index ? index - 1 : index + 1)
|
||||||
|
.tick();
|
||||||
|
}
|
||||||
|
extendedTickTimer = extendedTickLength;
|
||||||
|
} else
|
||||||
|
extendedTickTimer--;
|
||||||
|
|
||||||
progressBar.tick();
|
progressBar.tick();
|
||||||
|
|
||||||
if (activeScene.currentTime == activeScene.totalTime - 1)
|
if (activeScene.currentTime == activeScene.totalTime - 1)
|
||||||
|
@ -272,13 +301,6 @@ public class PonderUI extends NavigatableSimiScreen {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!identifyMode) {
|
|
||||||
float lazyIndexValue = lazyIndex.getValue();
|
|
||||||
if (Math.abs(lazyIndexValue - index) > 1 / 512f)
|
|
||||||
scenes.get(lazyIndexValue < index ? index - 1 : index + 1)
|
|
||||||
.tick();
|
|
||||||
}
|
|
||||||
|
|
||||||
updateIdentifiedItem(activeScene);
|
updateIdentifiedItem(activeScene);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -357,6 +379,7 @@ public class PonderUI extends NavigatableSimiScreen {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void renderWindow(int mouseX, int mouseY, float partialTicks) {
|
protected void renderWindow(int mouseX, int mouseY, float partialTicks) {
|
||||||
|
partialTicks = getPartialTicks();
|
||||||
RenderSystem.enableBlend();
|
RenderSystem.enableBlend();
|
||||||
renderVisibleScenes(mouseX, mouseY,
|
renderVisibleScenes(mouseX, mouseY,
|
||||||
skipCooling > 0 ? 0 : identifyMode ? ponderPartialTicksPaused : partialTicks);
|
skipCooling > 0 ? 0 : identifyMode ? ponderPartialTicksPaused : partialTicks);
|
||||||
|
@ -369,7 +392,6 @@ public class PonderUI extends NavigatableSimiScreen {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void renderVisibleScenes(int mouseX, int mouseY, float partialTicks) {
|
protected void renderVisibleScenes(int mouseX, int mouseY, float partialTicks) {
|
||||||
SuperRenderTypeBuffer.vertexSortingOrigin = new BlockPos(0, 0, 800);
|
|
||||||
renderScene(mouseX, mouseY, index, partialTicks);
|
renderScene(mouseX, mouseY, 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)
|
||||||
|
@ -388,7 +410,13 @@ public class PonderUI extends NavigatableSimiScreen {
|
||||||
RenderSystem.enableBlend();
|
RenderSystem.enableBlend();
|
||||||
RenderSystem.enableDepthTest();
|
RenderSystem.enableDepthTest();
|
||||||
|
|
||||||
|
RenderSystem.pushMatrix();
|
||||||
|
|
||||||
|
// has to be outside of MS transforms, important for vertex sorting
|
||||||
|
RenderSystem.translated(0, 0, 800);
|
||||||
|
|
||||||
ms.push();
|
ms.push();
|
||||||
|
ms.translate(0, 0, -800);
|
||||||
story.transform.updateScreenParams(width, height, slide);
|
story.transform.updateScreenParams(width, height, slide);
|
||||||
story.transform.apply(ms, partialTicks, false);
|
story.transform.apply(ms, partialTicks, false);
|
||||||
story.transform.updateSceneRVE(partialTicks);
|
story.transform.updateSceneRVE(partialTicks);
|
||||||
|
@ -485,8 +513,8 @@ public class PonderUI extends NavigatableSimiScreen {
|
||||||
}
|
}
|
||||||
|
|
||||||
RenderSystem.popMatrix();
|
RenderSystem.popMatrix();
|
||||||
|
|
||||||
ms.pop();
|
ms.pop();
|
||||||
|
RenderSystem.popMatrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void renderWidgets(int mouseX, int mouseY, float partialTicks) {
|
protected void renderWidgets(int mouseX, int mouseY, float partialTicks) {
|
||||||
|
@ -540,7 +568,7 @@ public class PonderUI extends NavigatableSimiScreen {
|
||||||
|
|
||||||
drawRightAlignedString(font, Lang.translate(IN_CHAPTER), 0, 0, tooltipColor);
|
drawRightAlignedString(font, Lang.translate(IN_CHAPTER), 0, 0, tooltipColor);
|
||||||
drawRightAlignedString(font,
|
drawRightAlignedString(font,
|
||||||
Lang.translate(PonderLocalization.LANG_PREFIX + "chapter." + chapter.getId()), 0, 12, 0xffeeeeee);
|
Lang.translate(LANG_PREFIX + "chapter." + chapter.getId()), 0, 12, 0xffeeeeee);
|
||||||
|
|
||||||
RenderSystem.popMatrix();
|
RenderSystem.popMatrix();
|
||||||
}
|
}
|
||||||
|
@ -588,6 +616,11 @@ public class PonderUI extends NavigatableSimiScreen {
|
||||||
userMode.dim();
|
userMode.dim();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (slowTextMode)
|
||||||
|
slowMode.flash();
|
||||||
|
else
|
||||||
|
slowMode.dim();
|
||||||
|
|
||||||
{
|
{
|
||||||
// Scene overlay
|
// Scene overlay
|
||||||
float scenePT = skipCooling > 0 ? 0 : partialTicks;
|
float scenePT = skipCooling > 0 ? 0 : partialTicks;
|
||||||
|
@ -673,6 +706,10 @@ public class PonderUI extends NavigatableSimiScreen {
|
||||||
drawCenteredString(font, Lang.translate(NEXT), right.x + 10, tooltipY, tooltipColor);
|
drawCenteredString(font, Lang.translate(NEXT), right.x + 10, tooltipY, tooltipColor);
|
||||||
if (replay.isHovered())
|
if (replay.isHovered())
|
||||||
drawCenteredString(font, Lang.translate(REPLAY), replay.x + 10, tooltipY, tooltipColor);
|
drawCenteredString(font, Lang.translate(REPLAY), replay.x + 10, tooltipY, tooltipColor);
|
||||||
|
if (slowMode.isHovered())
|
||||||
|
drawCenteredString(font, Lang.translate(SLOW_TEXT), slowMode.x + 5, tooltipY, tooltipColor);
|
||||||
|
if (PonderIndex.EDITOR_MODE && userMode.isHovered())
|
||||||
|
drawCenteredString(font, "Editor View", userMode.x + 10, tooltipY, tooltipColor);
|
||||||
RenderSystem.popMatrix();
|
RenderSystem.popMatrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -787,7 +824,7 @@ public class PonderUI extends NavigatableSimiScreen {
|
||||||
@Override
|
@Override
|
||||||
protected String getBreadcrumbTitle() {
|
protected String getBreadcrumbTitle() {
|
||||||
if (chapter != null)
|
if (chapter != null)
|
||||||
return Lang.translate(PonderLocalization.LANG_PREFIX + "chapter." + chapter.getId());
|
return Lang.translate(LANG_PREFIX + "chapter." + chapter.getId());
|
||||||
|
|
||||||
return stack.getItem()
|
return stack.getItem()
|
||||||
.getName()
|
.getName()
|
||||||
|
@ -915,13 +952,18 @@ public class PonderUI extends NavigatableSimiScreen {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static float getPartialTicks() {
|
public static float getPartialTicks() {
|
||||||
|
float renderPartialTicks = Minecraft.getInstance()
|
||||||
|
.getRenderPartialTicks();
|
||||||
|
|
||||||
if (Minecraft.getInstance().currentScreen instanceof PonderUI) {
|
if (Minecraft.getInstance().currentScreen instanceof PonderUI) {
|
||||||
PonderUI ui = (PonderUI) Minecraft.getInstance().currentScreen;
|
PonderUI ui = (PonderUI) Minecraft.getInstance().currentScreen;
|
||||||
if (ui.identifyMode)
|
if (ui.identifyMode)
|
||||||
return ponderPartialTicksPaused;
|
return ponderPartialTicksPaused;
|
||||||
|
|
||||||
|
return (renderPartialTicks + (ui.extendedTickLength - ui.extendedTickTimer)) / (ui.extendedTickLength + 1);
|
||||||
}
|
}
|
||||||
return Minecraft.getInstance()
|
|
||||||
.getRenderPartialTicks();
|
return renderPartialTicks;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -933,10 +975,4 @@ public class PonderUI extends NavigatableSimiScreen {
|
||||||
skipCooling = 15;
|
skipCooling = 15;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void removed() {
|
|
||||||
super.removed();
|
|
||||||
SuperRenderTypeBuffer.vertexSortingOrigin = BlockPos.ZERO;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,14 +35,6 @@ public class OrientedData extends BasicData {
|
||||||
return setPosition(pos.getX(), pos.getY(), pos.getZ());
|
return setPosition(pos.getX(), pos.getY(), pos.getZ());
|
||||||
}
|
}
|
||||||
|
|
||||||
public OrientedData setPosition(int x, int y, int z) {
|
|
||||||
BlockPos origin = owner.renderer.getOriginCoordinate();
|
|
||||||
|
|
||||||
return setPosition((float) (x - origin.getX()),
|
|
||||||
(float) (y - origin.getY()),
|
|
||||||
(float) (z - origin.getZ()));
|
|
||||||
}
|
|
||||||
|
|
||||||
public OrientedData setPosition(float x, float y, float z) {
|
public OrientedData setPosition(float x, float y, float z) {
|
||||||
this.posX = x;
|
this.posX = x;
|
||||||
this.posY = y;
|
this.posY = y;
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package com.simibubi.create.foundation.renderState;
|
package com.simibubi.create.foundation.renderState;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.Optional;
|
|
||||||
import java.util.SortedMap;
|
import java.util.SortedMap;
|
||||||
|
|
||||||
import com.mojang.blaze3d.systems.RenderSystem;
|
import com.mojang.blaze3d.systems.RenderSystem;
|
||||||
|
@ -15,11 +13,9 @@ import net.minecraft.client.renderer.RegionRenderCacheBuilder;
|
||||||
import net.minecraft.client.renderer.RenderType;
|
import net.minecraft.client.renderer.RenderType;
|
||||||
import net.minecraft.client.renderer.model.ModelBakery;
|
import net.minecraft.client.renderer.model.ModelBakery;
|
||||||
import net.minecraft.util.Util;
|
import net.minecraft.util.Util;
|
||||||
import net.minecraft.util.math.BlockPos;
|
|
||||||
|
|
||||||
public class SuperRenderTypeBuffer implements IRenderTypeBuffer {
|
public class SuperRenderTypeBuffer implements IRenderTypeBuffer {
|
||||||
|
|
||||||
public static BlockPos vertexSortingOrigin = BlockPos.ZERO;
|
|
||||||
static SuperRenderTypeBuffer instance;
|
static SuperRenderTypeBuffer instance;
|
||||||
|
|
||||||
public static SuperRenderTypeBuffer getInstance() {
|
public static SuperRenderTypeBuffer getInstance() {
|
||||||
|
@ -100,20 +96,6 @@ public class SuperRenderTypeBuffer implements IRenderTypeBuffer {
|
||||||
super(new BufferBuilder(256), createEntityBuilders());
|
super(new BufferBuilder(256), createEntityBuilders());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void draw(RenderType p_228462_1_) {
|
|
||||||
BlockPos v = vertexSortingOrigin;
|
|
||||||
BufferBuilder bufferbuilder = layerBuffers.getOrDefault(p_228462_1_, this.fallbackBuffer);
|
|
||||||
boolean flag = Objects.equals(this.currentLayer, p_228462_1_.asOptional());
|
|
||||||
if (flag || bufferbuilder != this.fallbackBuffer) {
|
|
||||||
if (this.activeConsumers.remove(bufferbuilder)) {
|
|
||||||
p_228462_1_.draw(bufferbuilder, v.getX(), v.getY(), v.getZ());
|
|
||||||
if (flag) {
|
|
||||||
this.currentLayer = Optional.empty();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.9 KiB |
Loading…
Reference in a new issue