mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-16 11:53:42 +01:00
Merge branch 'mc1.15/dev' into mc1.16/dev
This commit is contained in:
commit
0a98171384
110 changed files with 3780 additions and 623 deletions
|
@ -225,6 +225,7 @@ debef0f5dde74103aaf4422de4bc90e4099b0c47 assets/create/blockstates/mechanical_pl
|
||||||
92269fe66d7b83095a2e04e121af0be792f55dd6 assets/create/blockstates/mechanical_press.json
|
92269fe66d7b83095a2e04e121af0be792f55dd6 assets/create/blockstates/mechanical_press.json
|
||||||
b7c4a0ff0c6f16e14d71fc0fb7fc66d032b65cf3 assets/create/blockstates/mechanical_pump.json
|
b7c4a0ff0c6f16e14d71fc0fb7fc66d032b65cf3 assets/create/blockstates/mechanical_pump.json
|
||||||
264d72320ee0f1e014319f7d99dcc1fa953a4ad4 assets/create/blockstates/mechanical_saw.json
|
264d72320ee0f1e014319f7d99dcc1fa953a4ad4 assets/create/blockstates/mechanical_saw.json
|
||||||
|
94bbcb7e622471dbf418d78f9200ad321c7168de assets/create/blockstates/metal_bracket.json
|
||||||
4e48ad0936647065c2322390e7c0fe115c853a98 assets/create/blockstates/millstone.json
|
4e48ad0936647065c2322390e7c0fe115c853a98 assets/create/blockstates/millstone.json
|
||||||
468202df0802e17c75fcad0993daf1bc5300ca91 assets/create/blockstates/minecart_anchor.json
|
468202df0802e17c75fcad0993daf1bc5300ca91 assets/create/blockstates/minecart_anchor.json
|
||||||
6a42f86aaff8ced70aaa6adb9460614ab40c21e5 assets/create/blockstates/mossy_andesite.json
|
6a42f86aaff8ced70aaa6adb9460614ab40c21e5 assets/create/blockstates/mossy_andesite.json
|
||||||
|
@ -384,22 +385,23 @@ c77b46d8b459e5c7cc495393546f3fcca8a1fa1d assets/create/blockstates/weathered_lim
|
||||||
4647010162eb4c350fad236d860317eaa1884c77 assets/create/blockstates/white_seat.json
|
4647010162eb4c350fad236d860317eaa1884c77 assets/create/blockstates/white_seat.json
|
||||||
89000903d0ab8139e919abea7aa0361b34c24e55 assets/create/blockstates/white_valve_handle.json
|
89000903d0ab8139e919abea7aa0361b34c24e55 assets/create/blockstates/white_valve_handle.json
|
||||||
c4cd1131113667da0180898b5db3ebad609db8ba assets/create/blockstates/windmill_bearing.json
|
c4cd1131113667da0180898b5db3ebad609db8ba assets/create/blockstates/windmill_bearing.json
|
||||||
|
d4f804f2818376950ef28fc8d6250419f4e12218 assets/create/blockstates/wooden_bracket.json
|
||||||
e03c48512967845fce09d84b955d3bc7b480fedc assets/create/blockstates/yellow_sail.json
|
e03c48512967845fce09d84b955d3bc7b480fedc assets/create/blockstates/yellow_sail.json
|
||||||
a3a11524cd3515fc01d905767b4b7ea782adaf03 assets/create/blockstates/yellow_seat.json
|
a3a11524cd3515fc01d905767b4b7ea782adaf03 assets/create/blockstates/yellow_seat.json
|
||||||
6801fa1f466f172700e573e5b8ee8ee5f9ca4583 assets/create/blockstates/yellow_valve_handle.json
|
6801fa1f466f172700e573e5b8ee8ee5f9ca4583 assets/create/blockstates/yellow_valve_handle.json
|
||||||
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
|
||||||
6fe6c50ae75a9c89c90d3423bc74f3e628bc213a assets/create/lang/en_ud.json
|
be82e2e68c74c572e72979a6d4a5ec5e571931e2 assets/create/lang/en_ud.json
|
||||||
b054eb6cf72ac04fbb2512569effa84768adef74 assets/create/lang/en_us.json
|
b953a264ec3044b955431fb988c0bafcb9b57388 assets/create/lang/en_us.json
|
||||||
cf432c7dcf9b91769a570242a59c12ecca79a091 assets/create/lang/unfinished/de_de.json
|
97fe71d544f1bc7552e6c9d1f328ae02cb1a1947 assets/create/lang/unfinished/de_de.json
|
||||||
5a2e2499696f45b1f95feeaa702119b8e1b371eb assets/create/lang/unfinished/fr_fr.json
|
052819c4d2177bfc5cee9675300866d724f4b63f assets/create/lang/unfinished/fr_fr.json
|
||||||
12ac01a6f21c536aa09599c36139f593cbbf7d1f assets/create/lang/unfinished/it_it.json
|
67d67f305c83e021e2ae37e03b9bf4aa2661bc87 assets/create/lang/unfinished/it_it.json
|
||||||
3e65e163c658e4f34124807716b009e1907187cc assets/create/lang/unfinished/ja_jp.json
|
b0e3fc5a71b5127b832e38daece78ca9db9ce303 assets/create/lang/unfinished/ja_jp.json
|
||||||
4dfeba1d56d8ad688442d2ca026dfa16147178ef assets/create/lang/unfinished/ko_kr.json
|
610f399864dfa9d7fd258570853f7d577c5aee31 assets/create/lang/unfinished/ko_kr.json
|
||||||
3d114a874d1c198ecf0978fd13b98249536cc684 assets/create/lang/unfinished/nl_nl.json
|
12215221adcb015c5c74dbfe5affa920cd570580 assets/create/lang/unfinished/nl_nl.json
|
||||||
3434f2d429bdf64dcbc915c0365e20250b64d819 assets/create/lang/unfinished/pt_br.json
|
ead7216188692e96fb060b35213f1ef6b0682e87 assets/create/lang/unfinished/pt_br.json
|
||||||
0bfd9476411fc565a3011ffc43eecaca3f0e53ff assets/create/lang/unfinished/ru_ru.json
|
e9d95034f9b33eb8e41792740ed2d8c488af6676 assets/create/lang/unfinished/ru_ru.json
|
||||||
d7150e9c65d74f41e2dc65daadf003dc200e512c assets/create/lang/unfinished/zh_cn.json
|
32a2c4af9a5247f3bc7a5c2f502376e1e580d8bc assets/create/lang/unfinished/zh_cn.json
|
||||||
487a511a01b2a4531fb672f917922312db78f958 assets/create/models/block/acacia_window.json
|
487a511a01b2a4531fb672f917922312db78f958 assets/create/models/block/acacia_window.json
|
||||||
b48060cba1a382f373a05bf0039054053eccf076 assets/create/models/block/acacia_window_pane_noside.json
|
b48060cba1a382f373a05bf0039054053eccf076 assets/create/models/block/acacia_window_pane_noside.json
|
||||||
3066db1bf03cffa1a9c7fbacf47ae586632f4eb3 assets/create/models/block/acacia_window_pane_noside_alt.json
|
3066db1bf03cffa1a9c7fbacf47ae586632f4eb3 assets/create/models/block/acacia_window_pane_noside_alt.json
|
||||||
|
@ -469,6 +471,18 @@ dbfd2a996820d885d9741a3f168aa36c3538cfbd assets/create/models/block/birch_window
|
||||||
d876627b6e519c6f3f59c7c27cc7b0f903206f7c assets/create/models/block/blue_sail.json
|
d876627b6e519c6f3f59c7c27cc7b0f903206f7c assets/create/models/block/blue_sail.json
|
||||||
e58b00a7222152d7facbe0e82f00933b974df747 assets/create/models/block/blue_seat.json
|
e58b00a7222152d7facbe0e82f00933b974df747 assets/create/models/block/blue_seat.json
|
||||||
c7f91468b196fbda137e6b31764870b3bbfda6b6 assets/create/models/block/blue_valve_handle.json
|
c7f91468b196fbda137e6b31764870b3bbfda6b6 assets/create/models/block/blue_valve_handle.json
|
||||||
|
213e99062a7f2a5e7464082d7975066bc6fc45e0 assets/create/models/block/bracket/cog/ground_metal.json
|
||||||
|
16e824026066d930187d812e77e2e582c0d3c1cc assets/create/models/block/bracket/cog/ground_wooden.json
|
||||||
|
8c22623c9565c66346600c0ccf9648c77c4a5870 assets/create/models/block/bracket/cog/wall_metal.json
|
||||||
|
3a9fc3d3f30af61b2db0cfdf365ec8d01f78f9b4 assets/create/models/block/bracket/cog/wall_wooden.json
|
||||||
|
f545a7631bce14e75c0a7df0baef00f9163c91d6 assets/create/models/block/bracket/pipe/ground_metal.json
|
||||||
|
ef4f1a0f5499674d5b3de8e584f380074c1ecb24 assets/create/models/block/bracket/pipe/ground_wooden.json
|
||||||
|
1de8d82b6355ab0028e7259ada0cc7a28bb0509b assets/create/models/block/bracket/pipe/wall_metal.json
|
||||||
|
6b8e7f992f6be00c22bda0dbeb71c3979c6ae903 assets/create/models/block/bracket/pipe/wall_wooden.json
|
||||||
|
c86a455b8e85ef190261718726b344cf15ba1e4f assets/create/models/block/bracket/shaft/ground_metal.json
|
||||||
|
8fa9ce896412af894d7c431a50104445d91b1d4d assets/create/models/block/bracket/shaft/ground_wooden.json
|
||||||
|
3956168840aca9425d3bf240650406c1dbc8ea66 assets/create/models/block/bracket/shaft/wall_metal.json
|
||||||
|
7aaa2fbdb618e8aab7e0da19a5393e1eaa608623 assets/create/models/block/bracket/shaft/wall_wooden.json
|
||||||
24dff9a8d22c9a88286d2b7d08384ac9f281a512 assets/create/models/block/brass_belt_funnel_pull_extended.json
|
24dff9a8d22c9a88286d2b7d08384ac9f281a512 assets/create/models/block/brass_belt_funnel_pull_extended.json
|
||||||
c9c5f53c9d4f6cf6f509452e91cab1ba5b57f807 assets/create/models/block/brass_belt_funnel_pull_powered_extended.json
|
c9c5f53c9d4f6cf6f509452e91cab1ba5b57f807 assets/create/models/block/brass_belt_funnel_pull_powered_extended.json
|
||||||
addcf821a2348c0985bf9a72229355cfab818069 assets/create/models/block/brass_belt_funnel_pull_powered_retracted.json
|
addcf821a2348c0985bf9a72229355cfab818069 assets/create/models/block/brass_belt_funnel_pull_powered_retracted.json
|
||||||
|
@ -1368,6 +1382,7 @@ f8d0d4b2a890ea7a69ab0c390947b48fe0478d3f assets/create/models/item/mechanical_pi
|
||||||
6c2acb80e53256fbb85f76851f335f9248ace6da assets/create/models/item/mechanical_press.json
|
6c2acb80e53256fbb85f76851f335f9248ace6da assets/create/models/item/mechanical_press.json
|
||||||
4e363477e3e8059dd7b2bad04046521b31923d1b assets/create/models/item/mechanical_pump.json
|
4e363477e3e8059dd7b2bad04046521b31923d1b assets/create/models/item/mechanical_pump.json
|
||||||
3fc1fcb2016d2782c3667c21575423122b66705a assets/create/models/item/mechanical_saw.json
|
3fc1fcb2016d2782c3667c21575423122b66705a assets/create/models/item/mechanical_saw.json
|
||||||
|
3afa723a8ba4160a4bd8778a56e1880e7ff53ed9 assets/create/models/item/metal_bracket.json
|
||||||
0eb5726c8c0de462f432411c210d6132b2c446a4 assets/create/models/item/millstone.json
|
0eb5726c8c0de462f432411c210d6132b2c446a4 assets/create/models/item/millstone.json
|
||||||
363c5a2b8ac945b676c838cdf7b0494c3ab13599 assets/create/models/item/minecart_contraption.json
|
363c5a2b8ac945b676c838cdf7b0494c3ab13599 assets/create/models/item/minecart_contraption.json
|
||||||
01e3fda31e549a3b6a1e5e615b59478e8f06f16a assets/create/models/item/minecart_coupling.json
|
01e3fda31e549a3b6a1e5e615b59478e8f06f16a assets/create/models/item/minecart_coupling.json
|
||||||
|
@ -1538,6 +1553,7 @@ c6253e0f8db3c3992d3f78fe5045e276d39d5b22 assets/create/models/item/white_sail.js
|
||||||
69328eb4f91c4407fbcad5e3c4b88363f1a9572c assets/create/models/item/white_seat.json
|
69328eb4f91c4407fbcad5e3c4b88363f1a9572c assets/create/models/item/white_seat.json
|
||||||
be7a2d59d43083d7f2427193dcb9d68004224dd3 assets/create/models/item/white_valve_handle.json
|
be7a2d59d43083d7f2427193dcb9d68004224dd3 assets/create/models/item/white_valve_handle.json
|
||||||
d080b1b25e5bc8baf5aee68691b08c7f12ece3b0 assets/create/models/item/windmill_bearing.json
|
d080b1b25e5bc8baf5aee68691b08c7f12ece3b0 assets/create/models/item/windmill_bearing.json
|
||||||
|
500abf752654a904d78a967f6c6d29a75a4821ab assets/create/models/item/wooden_bracket.json
|
||||||
2527b52413965a3e84b4718e08a9b8bb30a741ea assets/create/models/item/wrench.json
|
2527b52413965a3e84b4718e08a9b8bb30a741ea assets/create/models/item/wrench.json
|
||||||
4b49bc2418410cded5f0b7da3430f1a22e049f18 assets/create/models/item/yellow_seat.json
|
4b49bc2418410cded5f0b7da3430f1a22e049f18 assets/create/models/item/yellow_seat.json
|
||||||
790daf016f980801e7587b548a325082c65f6f03 assets/create/models/item/yellow_valve_handle.json
|
790daf016f980801e7587b548a325082c65f6f03 assets/create/models/item/yellow_valve_handle.json
|
||||||
|
@ -1665,6 +1681,7 @@ b2845089f6356957e048df29ea75c9f5e64d5a44 data/create/advancements/recipes/create
|
||||||
02cfc8c25c2977292dba992542c83666d9123e95 data/create/advancements/recipes/create.base/crafting/kinetics/mechanical_press.json
|
02cfc8c25c2977292dba992542c83666d9123e95 data/create/advancements/recipes/create.base/crafting/kinetics/mechanical_press.json
|
||||||
750d93013709081b7eaca5a5b9122ab51ab31d02 data/create/advancements/recipes/create.base/crafting/kinetics/mechanical_pump.json
|
750d93013709081b7eaca5a5b9122ab51ab31d02 data/create/advancements/recipes/create.base/crafting/kinetics/mechanical_pump.json
|
||||||
f5ea782327d2353dd0e484b15536b7c19987a32b data/create/advancements/recipes/create.base/crafting/kinetics/mechanical_saw.json
|
f5ea782327d2353dd0e484b15536b7c19987a32b data/create/advancements/recipes/create.base/crafting/kinetics/mechanical_saw.json
|
||||||
|
8fd1bd08e678262d95ac97ba2f18d631c2fd3796 data/create/advancements/recipes/create.base/crafting/kinetics/metal_bracket.json
|
||||||
5a107ee1772727b66414c8d143b77833f3a92f0f data/create/advancements/recipes/create.base/crafting/kinetics/millstone.json
|
5a107ee1772727b66414c8d143b77833f3a92f0f data/create/advancements/recipes/create.base/crafting/kinetics/millstone.json
|
||||||
d38e8ff9dd33558227678d69393b57a360caa28e data/create/advancements/recipes/create.base/crafting/kinetics/mysterious_cuckoo_clock.json
|
d38e8ff9dd33558227678d69393b57a360caa28e data/create/advancements/recipes/create.base/crafting/kinetics/mysterious_cuckoo_clock.json
|
||||||
afeb2a152697b68bc953986d6886cbe527c6d2b5 data/create/advancements/recipes/create.base/crafting/kinetics/nozzle.json
|
afeb2a152697b68bc953986d6886cbe527c6d2b5 data/create/advancements/recipes/create.base/crafting/kinetics/nozzle.json
|
||||||
|
@ -1706,6 +1723,7 @@ f876dcbd2877c921613a4af481c89d66664c1ea8 data/create/advancements/recipes/create
|
||||||
856760c4b120f7b29a94dd22fe04d62df061d409 data/create/advancements/recipes/create.base/crafting/kinetics/white_seat_from_other_seat.json
|
856760c4b120f7b29a94dd22fe04d62df061d409 data/create/advancements/recipes/create.base/crafting/kinetics/white_seat_from_other_seat.json
|
||||||
b73e6f8b89e6ef94167b6fa3d0837a27222edb01 data/create/advancements/recipes/create.base/crafting/kinetics/white_valve_handle_from_other_valve_handle.json
|
b73e6f8b89e6ef94167b6fa3d0837a27222edb01 data/create/advancements/recipes/create.base/crafting/kinetics/white_valve_handle_from_other_valve_handle.json
|
||||||
6b783787a32446a39bb553359a7db58f71492a42 data/create/advancements/recipes/create.base/crafting/kinetics/windmill_bearing.json
|
6b783787a32446a39bb553359a7db58f71492a42 data/create/advancements/recipes/create.base/crafting/kinetics/windmill_bearing.json
|
||||||
|
d3874ab405cc09b75f5e4ff2994e9ddd9b5e77f6 data/create/advancements/recipes/create.base/crafting/kinetics/wooden_bracket.json
|
||||||
ddbe7ae23f48dcaee3ad44a0e597c24380b51682 data/create/advancements/recipes/create.base/crafting/kinetics/wrench.json
|
ddbe7ae23f48dcaee3ad44a0e597c24380b51682 data/create/advancements/recipes/create.base/crafting/kinetics/wrench.json
|
||||||
14c1cac4545f544a78bfd80cf7dd6355794c6679 data/create/advancements/recipes/create.base/crafting/kinetics/yellow_seat.json
|
14c1cac4545f544a78bfd80cf7dd6355794c6679 data/create/advancements/recipes/create.base/crafting/kinetics/yellow_seat.json
|
||||||
e8c2001863d9819d2a2c1fddeda41a4f126a5c09 data/create/advancements/recipes/create.base/crafting/kinetics/yellow_seat_from_other_seat.json
|
e8c2001863d9819d2a2c1fddeda41a4f126a5c09 data/create/advancements/recipes/create.base/crafting/kinetics/yellow_seat_from_other_seat.json
|
||||||
|
@ -2390,6 +2408,7 @@ d9e217fcc668a04ee495968f8ccf9966271b6cea data/create/loot_tables/blocks/mechanic
|
||||||
0e0742d066bda87ba5cc835a4028efb99e70b2f2 data/create/loot_tables/blocks/mechanical_press.json
|
0e0742d066bda87ba5cc835a4028efb99e70b2f2 data/create/loot_tables/blocks/mechanical_press.json
|
||||||
e94a78187bcf7f235244b2c656732ba9a5821dd0 data/create/loot_tables/blocks/mechanical_pump.json
|
e94a78187bcf7f235244b2c656732ba9a5821dd0 data/create/loot_tables/blocks/mechanical_pump.json
|
||||||
321daee16d6fad25ecc84da1b2830556d67e2a19 data/create/loot_tables/blocks/mechanical_saw.json
|
321daee16d6fad25ecc84da1b2830556d67e2a19 data/create/loot_tables/blocks/mechanical_saw.json
|
||||||
|
b13066b9e627db6954a30b115908602f1298576b data/create/loot_tables/blocks/metal_bracket.json
|
||||||
efbd4689e7d6740b80357203d1e02196f0752efa data/create/loot_tables/blocks/millstone.json
|
efbd4689e7d6740b80357203d1e02196f0752efa data/create/loot_tables/blocks/millstone.json
|
||||||
205f5899101262f31f5c1a88bb7d954918d08d04 data/create/loot_tables/blocks/minecart_anchor.json
|
205f5899101262f31f5c1a88bb7d954918d08d04 data/create/loot_tables/blocks/minecart_anchor.json
|
||||||
53215ac772bee2f88052266b82213aaf668660e9 data/create/loot_tables/blocks/mossy_andesite.json
|
53215ac772bee2f88052266b82213aaf668660e9 data/create/loot_tables/blocks/mossy_andesite.json
|
||||||
|
@ -2549,6 +2568,7 @@ e8f3af61d9a2fd1ff5b32c9bb474ed005e6d70c4 data/create/loot_tables/blocks/weathere
|
||||||
969eda31556feb5a68e350762848d17453275fee data/create/loot_tables/blocks/white_seat.json
|
969eda31556feb5a68e350762848d17453275fee data/create/loot_tables/blocks/white_seat.json
|
||||||
79fe374f8e677088f928a3a49ff5eeed6128d165 data/create/loot_tables/blocks/white_valve_handle.json
|
79fe374f8e677088f928a3a49ff5eeed6128d165 data/create/loot_tables/blocks/white_valve_handle.json
|
||||||
941ea78ea7c0f0061c3d3569ecea333ae6a16bf1 data/create/loot_tables/blocks/windmill_bearing.json
|
941ea78ea7c0f0061c3d3569ecea333ae6a16bf1 data/create/loot_tables/blocks/windmill_bearing.json
|
||||||
|
728c8719e653825c030913df94ce845fdc6d79b7 data/create/loot_tables/blocks/wooden_bracket.json
|
||||||
28ae0ee8a0b1fb6becae6264de687fe17940708e data/create/loot_tables/blocks/yellow_sail.json
|
28ae0ee8a0b1fb6becae6264de687fe17940708e data/create/loot_tables/blocks/yellow_sail.json
|
||||||
37ead431a278928a09b260ae06a448e2c791a73e data/create/loot_tables/blocks/yellow_seat.json
|
37ead431a278928a09b260ae06a448e2c791a73e data/create/loot_tables/blocks/yellow_seat.json
|
||||||
899bb208908a2f9bec5e544ff47526f3e24db720 data/create/loot_tables/blocks/yellow_valve_handle.json
|
899bb208908a2f9bec5e544ff47526f3e24db720 data/create/loot_tables/blocks/yellow_valve_handle.json
|
||||||
|
@ -2671,6 +2691,7 @@ ac9003ad3320fe2009c1793a3c6e86bdf20ca832 data/create/recipes/crafting/kinetics/m
|
||||||
ce8e269907aae5549cea04141bd231f4a20e6453 data/create/recipes/crafting/kinetics/mechanical_press.json
|
ce8e269907aae5549cea04141bd231f4a20e6453 data/create/recipes/crafting/kinetics/mechanical_press.json
|
||||||
5a685078d3c9d7dbe68080b7b6f2a44fc41582c5 data/create/recipes/crafting/kinetics/mechanical_pump.json
|
5a685078d3c9d7dbe68080b7b6f2a44fc41582c5 data/create/recipes/crafting/kinetics/mechanical_pump.json
|
||||||
ce28bcb47a379976d4a1bdfcfd1cdd0bae0bcdae data/create/recipes/crafting/kinetics/mechanical_saw.json
|
ce28bcb47a379976d4a1bdfcfd1cdd0bae0bcdae data/create/recipes/crafting/kinetics/mechanical_saw.json
|
||||||
|
353146e9501096b4cd9632ad5500b0a2406c6f5d data/create/recipes/crafting/kinetics/metal_bracket.json
|
||||||
58d9046e61eae40958181388186a35dc07cc9a59 data/create/recipes/crafting/kinetics/millstone.json
|
58d9046e61eae40958181388186a35dc07cc9a59 data/create/recipes/crafting/kinetics/millstone.json
|
||||||
13fa2887d3c988973c9222ce5e2e3dd0d9bd8374 data/create/recipes/crafting/kinetics/minecart_from_contraption_cart.json
|
13fa2887d3c988973c9222ce5e2e3dd0d9bd8374 data/create/recipes/crafting/kinetics/minecart_from_contraption_cart.json
|
||||||
be4c7fdb0ba1e9ee6d3dcf200dc2718ad83ec8fb data/create/recipes/crafting/kinetics/mysterious_cuckoo_clock.json
|
be4c7fdb0ba1e9ee6d3dcf200dc2718ad83ec8fb data/create/recipes/crafting/kinetics/mysterious_cuckoo_clock.json
|
||||||
|
@ -2713,6 +2734,7 @@ f4d88aa2edea548d29cf2678a111d8bb5db7720a data/create/recipes/crafting/kinetics/w
|
||||||
7e0d276cd56f04f35d02c25810bffdf8fc297fcd data/create/recipes/crafting/kinetics/white_seat_from_other_seat.json
|
7e0d276cd56f04f35d02c25810bffdf8fc297fcd data/create/recipes/crafting/kinetics/white_seat_from_other_seat.json
|
||||||
4d3890621caa0bdbb752a395c1f5761dbbc1121e data/create/recipes/crafting/kinetics/white_valve_handle_from_other_valve_handle.json
|
4d3890621caa0bdbb752a395c1f5761dbbc1121e data/create/recipes/crafting/kinetics/white_valve_handle_from_other_valve_handle.json
|
||||||
8508255518d3718a0d8c2f536f69ffe9ed48a855 data/create/recipes/crafting/kinetics/windmill_bearing.json
|
8508255518d3718a0d8c2f536f69ffe9ed48a855 data/create/recipes/crafting/kinetics/windmill_bearing.json
|
||||||
|
d11eee4005372b1d0fad283b28c8016d823b5e37 data/create/recipes/crafting/kinetics/wooden_bracket.json
|
||||||
3ec8bb5660656f1c676035d8ba5460462c1d1865 data/create/recipes/crafting/kinetics/wrench.json
|
3ec8bb5660656f1c676035d8ba5460462c1d1865 data/create/recipes/crafting/kinetics/wrench.json
|
||||||
5579e58473474c4e59efd1ee39ddf0140d66b618 data/create/recipes/crafting/kinetics/yellow_seat.json
|
5579e58473474c4e59efd1ee39ddf0140d66b618 data/create/recipes/crafting/kinetics/yellow_seat.json
|
||||||
f055d233ac7ee9eac840a658afa01bedd793ff38 data/create/recipes/crafting/kinetics/yellow_seat_from_other_seat.json
|
f055d233ac7ee9eac840a658afa01bedd793ff38 data/create/recipes/crafting/kinetics/yellow_seat_from_other_seat.json
|
||||||
|
|
|
@ -0,0 +1,154 @@
|
||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"axis_along_first=false,facing=down,type=pipe": {
|
||||||
|
"model": "create:block/bracket/pipe/ground_metal",
|
||||||
|
"x": 180
|
||||||
|
},
|
||||||
|
"axis_along_first=true,facing=down,type=pipe": {
|
||||||
|
"model": "create:block/bracket/pipe/ground_metal",
|
||||||
|
"x": 180,
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"axis_along_first=false,facing=up,type=pipe": {
|
||||||
|
"model": "create:block/bracket/pipe/ground_metal"
|
||||||
|
},
|
||||||
|
"axis_along_first=true,facing=up,type=pipe": {
|
||||||
|
"model": "create:block/bracket/pipe/ground_metal",
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"axis_along_first=false,facing=north,type=pipe": {
|
||||||
|
"model": "create:block/bracket/pipe/wall_metal",
|
||||||
|
"x": 90,
|
||||||
|
"y": 270
|
||||||
|
},
|
||||||
|
"axis_along_first=true,facing=north,type=pipe": {
|
||||||
|
"model": "create:block/bracket/pipe/wall_metal",
|
||||||
|
"y": 270
|
||||||
|
},
|
||||||
|
"axis_along_first=false,facing=south,type=pipe": {
|
||||||
|
"model": "create:block/bracket/pipe/wall_metal",
|
||||||
|
"x": 90,
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"axis_along_first=true,facing=south,type=pipe": {
|
||||||
|
"model": "create:block/bracket/pipe/wall_metal",
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"axis_along_first=false,facing=west,type=pipe": {
|
||||||
|
"model": "create:block/bracket/pipe/wall_metal",
|
||||||
|
"y": 180
|
||||||
|
},
|
||||||
|
"axis_along_first=true,facing=west,type=pipe": {
|
||||||
|
"model": "create:block/bracket/pipe/wall_metal",
|
||||||
|
"x": 90,
|
||||||
|
"y": 180
|
||||||
|
},
|
||||||
|
"axis_along_first=false,facing=east,type=pipe": {
|
||||||
|
"model": "create:block/bracket/pipe/wall_metal"
|
||||||
|
},
|
||||||
|
"axis_along_first=true,facing=east,type=pipe": {
|
||||||
|
"model": "create:block/bracket/pipe/wall_metal",
|
||||||
|
"x": 90
|
||||||
|
},
|
||||||
|
"axis_along_first=false,facing=down,type=cog": {
|
||||||
|
"model": "create:block/bracket/cog/ground_metal",
|
||||||
|
"x": 180
|
||||||
|
},
|
||||||
|
"axis_along_first=true,facing=down,type=cog": {
|
||||||
|
"model": "create:block/bracket/cog/ground_metal",
|
||||||
|
"x": 180,
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"axis_along_first=false,facing=up,type=cog": {
|
||||||
|
"model": "create:block/bracket/cog/ground_metal"
|
||||||
|
},
|
||||||
|
"axis_along_first=true,facing=up,type=cog": {
|
||||||
|
"model": "create:block/bracket/cog/ground_metal",
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"axis_along_first=false,facing=north,type=cog": {
|
||||||
|
"model": "create:block/bracket/cog/wall_metal",
|
||||||
|
"x": 90,
|
||||||
|
"y": 270
|
||||||
|
},
|
||||||
|
"axis_along_first=true,facing=north,type=cog": {
|
||||||
|
"model": "create:block/bracket/cog/wall_metal",
|
||||||
|
"y": 270
|
||||||
|
},
|
||||||
|
"axis_along_first=false,facing=south,type=cog": {
|
||||||
|
"model": "create:block/bracket/cog/wall_metal",
|
||||||
|
"x": 90,
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"axis_along_first=true,facing=south,type=cog": {
|
||||||
|
"model": "create:block/bracket/cog/wall_metal",
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"axis_along_first=false,facing=west,type=cog": {
|
||||||
|
"model": "create:block/bracket/cog/wall_metal",
|
||||||
|
"y": 180
|
||||||
|
},
|
||||||
|
"axis_along_first=true,facing=west,type=cog": {
|
||||||
|
"model": "create:block/bracket/cog/wall_metal",
|
||||||
|
"x": 90,
|
||||||
|
"y": 180
|
||||||
|
},
|
||||||
|
"axis_along_first=false,facing=east,type=cog": {
|
||||||
|
"model": "create:block/bracket/cog/wall_metal"
|
||||||
|
},
|
||||||
|
"axis_along_first=true,facing=east,type=cog": {
|
||||||
|
"model": "create:block/bracket/cog/wall_metal",
|
||||||
|
"x": 90
|
||||||
|
},
|
||||||
|
"axis_along_first=false,facing=down,type=shaft": {
|
||||||
|
"model": "create:block/bracket/shaft/ground_metal",
|
||||||
|
"x": 180
|
||||||
|
},
|
||||||
|
"axis_along_first=true,facing=down,type=shaft": {
|
||||||
|
"model": "create:block/bracket/shaft/ground_metal",
|
||||||
|
"x": 180,
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"axis_along_first=false,facing=up,type=shaft": {
|
||||||
|
"model": "create:block/bracket/shaft/ground_metal"
|
||||||
|
},
|
||||||
|
"axis_along_first=true,facing=up,type=shaft": {
|
||||||
|
"model": "create:block/bracket/shaft/ground_metal",
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"axis_along_first=false,facing=north,type=shaft": {
|
||||||
|
"model": "create:block/bracket/shaft/wall_metal",
|
||||||
|
"x": 90,
|
||||||
|
"y": 270
|
||||||
|
},
|
||||||
|
"axis_along_first=true,facing=north,type=shaft": {
|
||||||
|
"model": "create:block/bracket/shaft/wall_metal",
|
||||||
|
"y": 270
|
||||||
|
},
|
||||||
|
"axis_along_first=false,facing=south,type=shaft": {
|
||||||
|
"model": "create:block/bracket/shaft/wall_metal",
|
||||||
|
"x": 90,
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"axis_along_first=true,facing=south,type=shaft": {
|
||||||
|
"model": "create:block/bracket/shaft/wall_metal",
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"axis_along_first=false,facing=west,type=shaft": {
|
||||||
|
"model": "create:block/bracket/shaft/wall_metal",
|
||||||
|
"y": 180
|
||||||
|
},
|
||||||
|
"axis_along_first=true,facing=west,type=shaft": {
|
||||||
|
"model": "create:block/bracket/shaft/wall_metal",
|
||||||
|
"x": 90,
|
||||||
|
"y": 180
|
||||||
|
},
|
||||||
|
"axis_along_first=false,facing=east,type=shaft": {
|
||||||
|
"model": "create:block/bracket/shaft/wall_metal"
|
||||||
|
},
|
||||||
|
"axis_along_first=true,facing=east,type=shaft": {
|
||||||
|
"model": "create:block/bracket/shaft/wall_metal",
|
||||||
|
"x": 90
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,154 @@
|
||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"axis_along_first=false,facing=down,type=pipe": {
|
||||||
|
"model": "create:block/bracket/pipe/ground_wooden",
|
||||||
|
"x": 180
|
||||||
|
},
|
||||||
|
"axis_along_first=true,facing=down,type=pipe": {
|
||||||
|
"model": "create:block/bracket/pipe/ground_wooden",
|
||||||
|
"x": 180,
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"axis_along_first=false,facing=up,type=pipe": {
|
||||||
|
"model": "create:block/bracket/pipe/ground_wooden"
|
||||||
|
},
|
||||||
|
"axis_along_first=true,facing=up,type=pipe": {
|
||||||
|
"model": "create:block/bracket/pipe/ground_wooden",
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"axis_along_first=false,facing=north,type=pipe": {
|
||||||
|
"model": "create:block/bracket/pipe/wall_wooden",
|
||||||
|
"x": 90,
|
||||||
|
"y": 270
|
||||||
|
},
|
||||||
|
"axis_along_first=true,facing=north,type=pipe": {
|
||||||
|
"model": "create:block/bracket/pipe/wall_wooden",
|
||||||
|
"y": 270
|
||||||
|
},
|
||||||
|
"axis_along_first=false,facing=south,type=pipe": {
|
||||||
|
"model": "create:block/bracket/pipe/wall_wooden",
|
||||||
|
"x": 90,
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"axis_along_first=true,facing=south,type=pipe": {
|
||||||
|
"model": "create:block/bracket/pipe/wall_wooden",
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"axis_along_first=false,facing=west,type=pipe": {
|
||||||
|
"model": "create:block/bracket/pipe/wall_wooden",
|
||||||
|
"y": 180
|
||||||
|
},
|
||||||
|
"axis_along_first=true,facing=west,type=pipe": {
|
||||||
|
"model": "create:block/bracket/pipe/wall_wooden",
|
||||||
|
"x": 90,
|
||||||
|
"y": 180
|
||||||
|
},
|
||||||
|
"axis_along_first=false,facing=east,type=pipe": {
|
||||||
|
"model": "create:block/bracket/pipe/wall_wooden"
|
||||||
|
},
|
||||||
|
"axis_along_first=true,facing=east,type=pipe": {
|
||||||
|
"model": "create:block/bracket/pipe/wall_wooden",
|
||||||
|
"x": 90
|
||||||
|
},
|
||||||
|
"axis_along_first=false,facing=down,type=cog": {
|
||||||
|
"model": "create:block/bracket/cog/ground_wooden",
|
||||||
|
"x": 180
|
||||||
|
},
|
||||||
|
"axis_along_first=true,facing=down,type=cog": {
|
||||||
|
"model": "create:block/bracket/cog/ground_wooden",
|
||||||
|
"x": 180,
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"axis_along_first=false,facing=up,type=cog": {
|
||||||
|
"model": "create:block/bracket/cog/ground_wooden"
|
||||||
|
},
|
||||||
|
"axis_along_first=true,facing=up,type=cog": {
|
||||||
|
"model": "create:block/bracket/cog/ground_wooden",
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"axis_along_first=false,facing=north,type=cog": {
|
||||||
|
"model": "create:block/bracket/cog/wall_wooden",
|
||||||
|
"x": 90,
|
||||||
|
"y": 270
|
||||||
|
},
|
||||||
|
"axis_along_first=true,facing=north,type=cog": {
|
||||||
|
"model": "create:block/bracket/cog/wall_wooden",
|
||||||
|
"y": 270
|
||||||
|
},
|
||||||
|
"axis_along_first=false,facing=south,type=cog": {
|
||||||
|
"model": "create:block/bracket/cog/wall_wooden",
|
||||||
|
"x": 90,
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"axis_along_first=true,facing=south,type=cog": {
|
||||||
|
"model": "create:block/bracket/cog/wall_wooden",
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"axis_along_first=false,facing=west,type=cog": {
|
||||||
|
"model": "create:block/bracket/cog/wall_wooden",
|
||||||
|
"y": 180
|
||||||
|
},
|
||||||
|
"axis_along_first=true,facing=west,type=cog": {
|
||||||
|
"model": "create:block/bracket/cog/wall_wooden",
|
||||||
|
"x": 90,
|
||||||
|
"y": 180
|
||||||
|
},
|
||||||
|
"axis_along_first=false,facing=east,type=cog": {
|
||||||
|
"model": "create:block/bracket/cog/wall_wooden"
|
||||||
|
},
|
||||||
|
"axis_along_first=true,facing=east,type=cog": {
|
||||||
|
"model": "create:block/bracket/cog/wall_wooden",
|
||||||
|
"x": 90
|
||||||
|
},
|
||||||
|
"axis_along_first=false,facing=down,type=shaft": {
|
||||||
|
"model": "create:block/bracket/shaft/ground_wooden",
|
||||||
|
"x": 180
|
||||||
|
},
|
||||||
|
"axis_along_first=true,facing=down,type=shaft": {
|
||||||
|
"model": "create:block/bracket/shaft/ground_wooden",
|
||||||
|
"x": 180,
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"axis_along_first=false,facing=up,type=shaft": {
|
||||||
|
"model": "create:block/bracket/shaft/ground_wooden"
|
||||||
|
},
|
||||||
|
"axis_along_first=true,facing=up,type=shaft": {
|
||||||
|
"model": "create:block/bracket/shaft/ground_wooden",
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"axis_along_first=false,facing=north,type=shaft": {
|
||||||
|
"model": "create:block/bracket/shaft/wall_wooden",
|
||||||
|
"x": 90,
|
||||||
|
"y": 270
|
||||||
|
},
|
||||||
|
"axis_along_first=true,facing=north,type=shaft": {
|
||||||
|
"model": "create:block/bracket/shaft/wall_wooden",
|
||||||
|
"y": 270
|
||||||
|
},
|
||||||
|
"axis_along_first=false,facing=south,type=shaft": {
|
||||||
|
"model": "create:block/bracket/shaft/wall_wooden",
|
||||||
|
"x": 90,
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"axis_along_first=true,facing=south,type=shaft": {
|
||||||
|
"model": "create:block/bracket/shaft/wall_wooden",
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"axis_along_first=false,facing=west,type=shaft": {
|
||||||
|
"model": "create:block/bracket/shaft/wall_wooden",
|
||||||
|
"y": 180
|
||||||
|
},
|
||||||
|
"axis_along_first=true,facing=west,type=shaft": {
|
||||||
|
"model": "create:block/bracket/shaft/wall_wooden",
|
||||||
|
"x": 90,
|
||||||
|
"y": 180
|
||||||
|
},
|
||||||
|
"axis_along_first=false,facing=east,type=shaft": {
|
||||||
|
"model": "create:block/bracket/shaft/wall_wooden"
|
||||||
|
},
|
||||||
|
"axis_along_first=true,facing=east,type=shaft": {
|
||||||
|
"model": "create:block/bracket/shaft/wall_wooden",
|
||||||
|
"x": 90
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -226,6 +226,7 @@
|
||||||
"block.create.mechanical_press": "ss\u01DD\u0279\u0500 \u05DF\u0250\u0254\u0131u\u0250\u0265\u0254\u01DDW",
|
"block.create.mechanical_press": "ss\u01DD\u0279\u0500 \u05DF\u0250\u0254\u0131u\u0250\u0265\u0254\u01DDW",
|
||||||
"block.create.mechanical_pump": "d\u026Fn\u0500 \u05DF\u0250\u0254\u0131u\u0250\u0265\u0254\u01DDW",
|
"block.create.mechanical_pump": "d\u026Fn\u0500 \u05DF\u0250\u0254\u0131u\u0250\u0265\u0254\u01DDW",
|
||||||
"block.create.mechanical_saw": "\u028D\u0250S \u05DF\u0250\u0254\u0131u\u0250\u0265\u0254\u01DDW",
|
"block.create.mechanical_saw": "\u028D\u0250S \u05DF\u0250\u0254\u0131u\u0250\u0265\u0254\u01DDW",
|
||||||
|
"block.create.metal_bracket": "\u0287\u01DD\u029E\u0254\u0250\u0279\u15FA \u05DF\u0250\u0287\u01DDW",
|
||||||
"block.create.millstone": "\u01DDuo\u0287s\u05DF\u05DF\u0131W",
|
"block.create.millstone": "\u01DDuo\u0287s\u05DF\u05DF\u0131W",
|
||||||
"block.create.minecart_anchor": "\u0279o\u0265\u0254u\u2C6F \u0287\u0279\u0250\u0254\u01DDu\u0131W",
|
"block.create.minecart_anchor": "\u0279o\u0265\u0254u\u2C6F \u0287\u0279\u0250\u0254\u01DDu\u0131W",
|
||||||
"block.create.mossy_andesite": "\u01DD\u0287\u0131s\u01DDpu\u2C6F \u028EssoW",
|
"block.create.mossy_andesite": "\u01DD\u0287\u0131s\u01DDpu\u2C6F \u028EssoW",
|
||||||
|
@ -385,6 +386,7 @@
|
||||||
"block.create.white_seat": "\u0287\u0250\u01DDS \u01DD\u0287\u0131\u0265M",
|
"block.create.white_seat": "\u0287\u0250\u01DDS \u01DD\u0287\u0131\u0265M",
|
||||||
"block.create.white_valve_handle": "\u01DD\u05DFpu\u0250H \u01DD\u028C\u05DF\u0250\u039B \u01DD\u0287\u0131\u0265M",
|
"block.create.white_valve_handle": "\u01DD\u05DFpu\u0250H \u01DD\u028C\u05DF\u0250\u039B \u01DD\u0287\u0131\u0265M",
|
||||||
"block.create.windmill_bearing": "bu\u0131\u0279\u0250\u01DD\u15FA \u05DF\u05DF\u0131\u026Fpu\u0131M",
|
"block.create.windmill_bearing": "bu\u0131\u0279\u0250\u01DD\u15FA \u05DF\u05DF\u0131\u026Fpu\u0131M",
|
||||||
|
"block.create.wooden_bracket": "\u0287\u01DD\u029E\u0254\u0250\u0279\u15FA u\u01DDpooM",
|
||||||
"block.create.yellow_sail": "\u05DF\u0131\u0250S \u028Do\u05DF\u05DF\u01DD\u028E",
|
"block.create.yellow_sail": "\u05DF\u0131\u0250S \u028Do\u05DF\u05DF\u01DD\u028E",
|
||||||
"block.create.yellow_seat": "\u0287\u0250\u01DDS \u028Do\u05DF\u05DF\u01DD\u028E",
|
"block.create.yellow_seat": "\u0287\u0250\u01DDS \u028Do\u05DF\u05DF\u01DD\u028E",
|
||||||
"block.create.yellow_valve_handle": "\u01DD\u05DFpu\u0250H \u01DD\u028C\u05DF\u0250\u039B \u028Do\u05DF\u05DF\u01DD\u028E",
|
"block.create.yellow_valve_handle": "\u01DD\u05DFpu\u0250H \u01DD\u028C\u05DF\u0250\u039B \u028Do\u05DF\u05DF\u01DD\u028E",
|
||||||
|
|
|
@ -229,6 +229,7 @@
|
||||||
"block.create.mechanical_press": "Mechanical Press",
|
"block.create.mechanical_press": "Mechanical Press",
|
||||||
"block.create.mechanical_pump": "Mechanical Pump",
|
"block.create.mechanical_pump": "Mechanical Pump",
|
||||||
"block.create.mechanical_saw": "Mechanical Saw",
|
"block.create.mechanical_saw": "Mechanical Saw",
|
||||||
|
"block.create.metal_bracket": "Metal Bracket",
|
||||||
"block.create.millstone": "Millstone",
|
"block.create.millstone": "Millstone",
|
||||||
"block.create.minecart_anchor": "Minecart Anchor",
|
"block.create.minecart_anchor": "Minecart Anchor",
|
||||||
"block.create.mossy_andesite": "Mossy Andesite",
|
"block.create.mossy_andesite": "Mossy Andesite",
|
||||||
|
@ -388,6 +389,7 @@
|
||||||
"block.create.white_seat": "White Seat",
|
"block.create.white_seat": "White Seat",
|
||||||
"block.create.white_valve_handle": "White Valve Handle",
|
"block.create.white_valve_handle": "White Valve Handle",
|
||||||
"block.create.windmill_bearing": "Windmill Bearing",
|
"block.create.windmill_bearing": "Windmill Bearing",
|
||||||
|
"block.create.wooden_bracket": "Wooden Bracket",
|
||||||
"block.create.yellow_sail": "Yellow Sail",
|
"block.create.yellow_sail": "Yellow Sail",
|
||||||
"block.create.yellow_seat": "Yellow Seat",
|
"block.create.yellow_seat": "Yellow Seat",
|
||||||
"block.create.yellow_valve_handle": "Yellow Valve Handle",
|
"block.create.yellow_valve_handle": "Yellow Valve Handle",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 1024",
|
"_": "Missing Localizations: 1026",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -230,6 +230,7 @@
|
||||||
"block.create.mechanical_press": "Mechanische Presse",
|
"block.create.mechanical_press": "Mechanische Presse",
|
||||||
"block.create.mechanical_pump": "UNLOCALIZED: Mechanical Pump",
|
"block.create.mechanical_pump": "UNLOCALIZED: Mechanical Pump",
|
||||||
"block.create.mechanical_saw": "UNLOCALIZED: Mechanical Saw",
|
"block.create.mechanical_saw": "UNLOCALIZED: Mechanical Saw",
|
||||||
|
"block.create.metal_bracket": "UNLOCALIZED: Metal Bracket",
|
||||||
"block.create.millstone": "UNLOCALIZED: Millstone",
|
"block.create.millstone": "UNLOCALIZED: Millstone",
|
||||||
"block.create.minecart_anchor": "UNLOCALIZED: Minecart Anchor",
|
"block.create.minecart_anchor": "UNLOCALIZED: Minecart Anchor",
|
||||||
"block.create.mossy_andesite": "UNLOCALIZED: Mossy Andesite",
|
"block.create.mossy_andesite": "UNLOCALIZED: Mossy Andesite",
|
||||||
|
@ -389,6 +390,7 @@
|
||||||
"block.create.white_seat": "UNLOCALIZED: White Seat",
|
"block.create.white_seat": "UNLOCALIZED: White Seat",
|
||||||
"block.create.white_valve_handle": "UNLOCALIZED: White Valve Handle",
|
"block.create.white_valve_handle": "UNLOCALIZED: White Valve Handle",
|
||||||
"block.create.windmill_bearing": "UNLOCALIZED: Windmill Bearing",
|
"block.create.windmill_bearing": "UNLOCALIZED: Windmill Bearing",
|
||||||
|
"block.create.wooden_bracket": "UNLOCALIZED: Wooden Bracket",
|
||||||
"block.create.yellow_sail": "UNLOCALIZED: Yellow Sail",
|
"block.create.yellow_sail": "UNLOCALIZED: Yellow Sail",
|
||||||
"block.create.yellow_seat": "UNLOCALIZED: Yellow Seat",
|
"block.create.yellow_seat": "UNLOCALIZED: Yellow Seat",
|
||||||
"block.create.yellow_valve_handle": "UNLOCALIZED: Yellow Valve Handle",
|
"block.create.yellow_valve_handle": "UNLOCALIZED: Yellow Valve Handle",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 653",
|
"_": "Missing Localizations: 655",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -230,6 +230,7 @@
|
||||||
"block.create.mechanical_press": "Presse mécanique",
|
"block.create.mechanical_press": "Presse mécanique",
|
||||||
"block.create.mechanical_pump": "UNLOCALIZED: Mechanical Pump",
|
"block.create.mechanical_pump": "UNLOCALIZED: Mechanical Pump",
|
||||||
"block.create.mechanical_saw": "Scie mécanique",
|
"block.create.mechanical_saw": "Scie mécanique",
|
||||||
|
"block.create.metal_bracket": "UNLOCALIZED: Metal Bracket",
|
||||||
"block.create.millstone": "UNLOCALIZED: Millstone",
|
"block.create.millstone": "UNLOCALIZED: Millstone",
|
||||||
"block.create.minecart_anchor": "UNLOCALIZED: Minecart Anchor",
|
"block.create.minecart_anchor": "UNLOCALIZED: Minecart Anchor",
|
||||||
"block.create.mossy_andesite": "UNLOCALIZED: Mossy Andesite",
|
"block.create.mossy_andesite": "UNLOCALIZED: Mossy Andesite",
|
||||||
|
@ -389,6 +390,7 @@
|
||||||
"block.create.white_seat": "UNLOCALIZED: White Seat",
|
"block.create.white_seat": "UNLOCALIZED: White Seat",
|
||||||
"block.create.white_valve_handle": "UNLOCALIZED: White Valve Handle",
|
"block.create.white_valve_handle": "UNLOCALIZED: White Valve Handle",
|
||||||
"block.create.windmill_bearing": "UNLOCALIZED: Windmill Bearing",
|
"block.create.windmill_bearing": "UNLOCALIZED: Windmill Bearing",
|
||||||
|
"block.create.wooden_bracket": "UNLOCALIZED: Wooden Bracket",
|
||||||
"block.create.yellow_sail": "UNLOCALIZED: Yellow Sail",
|
"block.create.yellow_sail": "UNLOCALIZED: Yellow Sail",
|
||||||
"block.create.yellow_seat": "UNLOCALIZED: Yellow Seat",
|
"block.create.yellow_seat": "UNLOCALIZED: Yellow Seat",
|
||||||
"block.create.yellow_valve_handle": "UNLOCALIZED: Yellow Valve Handle",
|
"block.create.yellow_valve_handle": "UNLOCALIZED: Yellow Valve Handle",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 637",
|
"_": "Missing Localizations: 639",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -230,6 +230,7 @@
|
||||||
"block.create.mechanical_press": "Pressa Meccanica",
|
"block.create.mechanical_press": "Pressa Meccanica",
|
||||||
"block.create.mechanical_pump": "UNLOCALIZED: Mechanical Pump",
|
"block.create.mechanical_pump": "UNLOCALIZED: Mechanical Pump",
|
||||||
"block.create.mechanical_saw": "Sega Meccanica",
|
"block.create.mechanical_saw": "Sega Meccanica",
|
||||||
|
"block.create.metal_bracket": "UNLOCALIZED: Metal Bracket",
|
||||||
"block.create.millstone": "Macina",
|
"block.create.millstone": "Macina",
|
||||||
"block.create.minecart_anchor": "UNLOCALIZED: Minecart Anchor",
|
"block.create.minecart_anchor": "UNLOCALIZED: Minecart Anchor",
|
||||||
"block.create.mossy_andesite": "UNLOCALIZED: Mossy Andesite",
|
"block.create.mossy_andesite": "UNLOCALIZED: Mossy Andesite",
|
||||||
|
@ -389,6 +390,7 @@
|
||||||
"block.create.white_seat": "UNLOCALIZED: White Seat",
|
"block.create.white_seat": "UNLOCALIZED: White Seat",
|
||||||
"block.create.white_valve_handle": "UNLOCALIZED: White Valve Handle",
|
"block.create.white_valve_handle": "UNLOCALIZED: White Valve Handle",
|
||||||
"block.create.windmill_bearing": "UNLOCALIZED: Windmill Bearing",
|
"block.create.windmill_bearing": "UNLOCALIZED: Windmill Bearing",
|
||||||
|
"block.create.wooden_bracket": "UNLOCALIZED: Wooden Bracket",
|
||||||
"block.create.yellow_sail": "UNLOCALIZED: Yellow Sail",
|
"block.create.yellow_sail": "UNLOCALIZED: Yellow Sail",
|
||||||
"block.create.yellow_seat": "UNLOCALIZED: Yellow Seat",
|
"block.create.yellow_seat": "UNLOCALIZED: Yellow Seat",
|
||||||
"block.create.yellow_valve_handle": "UNLOCALIZED: Yellow Valve Handle",
|
"block.create.yellow_valve_handle": "UNLOCALIZED: Yellow Valve Handle",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 636",
|
"_": "Missing Localizations: 638",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -230,6 +230,7 @@
|
||||||
"block.create.mechanical_press": "メカニカルプレス",
|
"block.create.mechanical_press": "メカニカルプレス",
|
||||||
"block.create.mechanical_pump": "UNLOCALIZED: Mechanical Pump",
|
"block.create.mechanical_pump": "UNLOCALIZED: Mechanical Pump",
|
||||||
"block.create.mechanical_saw": "メカニカル鋸",
|
"block.create.mechanical_saw": "メカニカル鋸",
|
||||||
|
"block.create.metal_bracket": "UNLOCALIZED: Metal Bracket",
|
||||||
"block.create.millstone": "石臼",
|
"block.create.millstone": "石臼",
|
||||||
"block.create.minecart_anchor": "UNLOCALIZED: Minecart Anchor",
|
"block.create.minecart_anchor": "UNLOCALIZED: Minecart Anchor",
|
||||||
"block.create.mossy_andesite": "UNLOCALIZED: Mossy Andesite",
|
"block.create.mossy_andesite": "UNLOCALIZED: Mossy Andesite",
|
||||||
|
@ -389,6 +390,7 @@
|
||||||
"block.create.white_seat": "UNLOCALIZED: White Seat",
|
"block.create.white_seat": "UNLOCALIZED: White Seat",
|
||||||
"block.create.white_valve_handle": "UNLOCALIZED: White Valve Handle",
|
"block.create.white_valve_handle": "UNLOCALIZED: White Valve Handle",
|
||||||
"block.create.windmill_bearing": "UNLOCALIZED: Windmill Bearing",
|
"block.create.windmill_bearing": "UNLOCALIZED: Windmill Bearing",
|
||||||
|
"block.create.wooden_bracket": "UNLOCALIZED: Wooden Bracket",
|
||||||
"block.create.yellow_sail": "UNLOCALIZED: Yellow Sail",
|
"block.create.yellow_sail": "UNLOCALIZED: Yellow Sail",
|
||||||
"block.create.yellow_seat": "UNLOCALIZED: Yellow Seat",
|
"block.create.yellow_seat": "UNLOCALIZED: Yellow Seat",
|
||||||
"block.create.yellow_valve_handle": "UNLOCALIZED: Yellow Valve Handle",
|
"block.create.yellow_valve_handle": "UNLOCALIZED: Yellow Valve Handle",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 637",
|
"_": "Missing Localizations: 639",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -230,6 +230,7 @@
|
||||||
"block.create.mechanical_press": "압착기",
|
"block.create.mechanical_press": "압착기",
|
||||||
"block.create.mechanical_pump": "UNLOCALIZED: Mechanical Pump",
|
"block.create.mechanical_pump": "UNLOCALIZED: Mechanical Pump",
|
||||||
"block.create.mechanical_saw": "톱",
|
"block.create.mechanical_saw": "톱",
|
||||||
|
"block.create.metal_bracket": "UNLOCALIZED: Metal Bracket",
|
||||||
"block.create.millstone": "맷돌",
|
"block.create.millstone": "맷돌",
|
||||||
"block.create.minecart_anchor": "UNLOCALIZED: Minecart Anchor",
|
"block.create.minecart_anchor": "UNLOCALIZED: Minecart Anchor",
|
||||||
"block.create.mossy_andesite": "UNLOCALIZED: Mossy Andesite",
|
"block.create.mossy_andesite": "UNLOCALIZED: Mossy Andesite",
|
||||||
|
@ -389,6 +390,7 @@
|
||||||
"block.create.white_seat": "UNLOCALIZED: White Seat",
|
"block.create.white_seat": "UNLOCALIZED: White Seat",
|
||||||
"block.create.white_valve_handle": "UNLOCALIZED: White Valve Handle",
|
"block.create.white_valve_handle": "UNLOCALIZED: White Valve Handle",
|
||||||
"block.create.windmill_bearing": "UNLOCALIZED: Windmill Bearing",
|
"block.create.windmill_bearing": "UNLOCALIZED: Windmill Bearing",
|
||||||
|
"block.create.wooden_bracket": "UNLOCALIZED: Wooden Bracket",
|
||||||
"block.create.yellow_sail": "UNLOCALIZED: Yellow Sail",
|
"block.create.yellow_sail": "UNLOCALIZED: Yellow Sail",
|
||||||
"block.create.yellow_seat": "UNLOCALIZED: Yellow Seat",
|
"block.create.yellow_seat": "UNLOCALIZED: Yellow Seat",
|
||||||
"block.create.yellow_valve_handle": "UNLOCALIZED: Yellow Valve Handle",
|
"block.create.yellow_valve_handle": "UNLOCALIZED: Yellow Valve Handle",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 965",
|
"_": "Missing Localizations: 967",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -230,6 +230,7 @@
|
||||||
"block.create.mechanical_press": "Mechanische Pers",
|
"block.create.mechanical_press": "Mechanische Pers",
|
||||||
"block.create.mechanical_pump": "UNLOCALIZED: Mechanical Pump",
|
"block.create.mechanical_pump": "UNLOCALIZED: Mechanical Pump",
|
||||||
"block.create.mechanical_saw": "Mechanische Zaag",
|
"block.create.mechanical_saw": "Mechanische Zaag",
|
||||||
|
"block.create.metal_bracket": "UNLOCALIZED: Metal Bracket",
|
||||||
"block.create.millstone": "UNLOCALIZED: Millstone",
|
"block.create.millstone": "UNLOCALIZED: Millstone",
|
||||||
"block.create.minecart_anchor": "UNLOCALIZED: Minecart Anchor",
|
"block.create.minecart_anchor": "UNLOCALIZED: Minecart Anchor",
|
||||||
"block.create.mossy_andesite": "UNLOCALIZED: Mossy Andesite",
|
"block.create.mossy_andesite": "UNLOCALIZED: Mossy Andesite",
|
||||||
|
@ -389,6 +390,7 @@
|
||||||
"block.create.white_seat": "UNLOCALIZED: White Seat",
|
"block.create.white_seat": "UNLOCALIZED: White Seat",
|
||||||
"block.create.white_valve_handle": "UNLOCALIZED: White Valve Handle",
|
"block.create.white_valve_handle": "UNLOCALIZED: White Valve Handle",
|
||||||
"block.create.windmill_bearing": "UNLOCALIZED: Windmill Bearing",
|
"block.create.windmill_bearing": "UNLOCALIZED: Windmill Bearing",
|
||||||
|
"block.create.wooden_bracket": "UNLOCALIZED: Wooden Bracket",
|
||||||
"block.create.yellow_sail": "UNLOCALIZED: Yellow Sail",
|
"block.create.yellow_sail": "UNLOCALIZED: Yellow Sail",
|
||||||
"block.create.yellow_seat": "UNLOCALIZED: Yellow Seat",
|
"block.create.yellow_seat": "UNLOCALIZED: Yellow Seat",
|
||||||
"block.create.yellow_valve_handle": "UNLOCALIZED: Yellow Valve Handle",
|
"block.create.yellow_valve_handle": "UNLOCALIZED: Yellow Valve Handle",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 1031",
|
"_": "Missing Localizations: 1033",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -230,6 +230,7 @@
|
||||||
"block.create.mechanical_press": "Prensa Mecânico",
|
"block.create.mechanical_press": "Prensa Mecânico",
|
||||||
"block.create.mechanical_pump": "UNLOCALIZED: Mechanical Pump",
|
"block.create.mechanical_pump": "UNLOCALIZED: Mechanical Pump",
|
||||||
"block.create.mechanical_saw": "UNLOCALIZED: Mechanical Saw",
|
"block.create.mechanical_saw": "UNLOCALIZED: Mechanical Saw",
|
||||||
|
"block.create.metal_bracket": "UNLOCALIZED: Metal Bracket",
|
||||||
"block.create.millstone": "UNLOCALIZED: Millstone",
|
"block.create.millstone": "UNLOCALIZED: Millstone",
|
||||||
"block.create.minecart_anchor": "UNLOCALIZED: Minecart Anchor",
|
"block.create.minecart_anchor": "UNLOCALIZED: Minecart Anchor",
|
||||||
"block.create.mossy_andesite": "UNLOCALIZED: Mossy Andesite",
|
"block.create.mossy_andesite": "UNLOCALIZED: Mossy Andesite",
|
||||||
|
@ -389,6 +390,7 @@
|
||||||
"block.create.white_seat": "UNLOCALIZED: White Seat",
|
"block.create.white_seat": "UNLOCALIZED: White Seat",
|
||||||
"block.create.white_valve_handle": "UNLOCALIZED: White Valve Handle",
|
"block.create.white_valve_handle": "UNLOCALIZED: White Valve Handle",
|
||||||
"block.create.windmill_bearing": "UNLOCALIZED: Windmill Bearing",
|
"block.create.windmill_bearing": "UNLOCALIZED: Windmill Bearing",
|
||||||
|
"block.create.wooden_bracket": "UNLOCALIZED: Wooden Bracket",
|
||||||
"block.create.yellow_sail": "UNLOCALIZED: Yellow Sail",
|
"block.create.yellow_sail": "UNLOCALIZED: Yellow Sail",
|
||||||
"block.create.yellow_seat": "UNLOCALIZED: Yellow Seat",
|
"block.create.yellow_seat": "UNLOCALIZED: Yellow Seat",
|
||||||
"block.create.yellow_valve_handle": "UNLOCALIZED: Yellow Valve Handle",
|
"block.create.yellow_valve_handle": "UNLOCALIZED: Yellow Valve Handle",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 306",
|
"_": "Missing Localizations: 308",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -230,6 +230,7 @@
|
||||||
"block.create.mechanical_press": "Механический пресс",
|
"block.create.mechanical_press": "Механический пресс",
|
||||||
"block.create.mechanical_pump": "UNLOCALIZED: Mechanical Pump",
|
"block.create.mechanical_pump": "UNLOCALIZED: Mechanical Pump",
|
||||||
"block.create.mechanical_saw": "Механическая пила",
|
"block.create.mechanical_saw": "Механическая пила",
|
||||||
|
"block.create.metal_bracket": "UNLOCALIZED: Metal Bracket",
|
||||||
"block.create.millstone": "Жернов",
|
"block.create.millstone": "Жернов",
|
||||||
"block.create.minecart_anchor": "Вагонеточный якорь",
|
"block.create.minecart_anchor": "Вагонеточный якорь",
|
||||||
"block.create.mossy_andesite": "Замшелый андезит",
|
"block.create.mossy_andesite": "Замшелый андезит",
|
||||||
|
@ -389,6 +390,7 @@
|
||||||
"block.create.white_seat": "UNLOCALIZED: White Seat",
|
"block.create.white_seat": "UNLOCALIZED: White Seat",
|
||||||
"block.create.white_valve_handle": "UNLOCALIZED: White Valve Handle",
|
"block.create.white_valve_handle": "UNLOCALIZED: White Valve Handle",
|
||||||
"block.create.windmill_bearing": "UNLOCALIZED: Windmill Bearing",
|
"block.create.windmill_bearing": "UNLOCALIZED: Windmill Bearing",
|
||||||
|
"block.create.wooden_bracket": "UNLOCALIZED: Wooden Bracket",
|
||||||
"block.create.yellow_sail": "UNLOCALIZED: Yellow Sail",
|
"block.create.yellow_sail": "UNLOCALIZED: Yellow Sail",
|
||||||
"block.create.yellow_seat": "UNLOCALIZED: Yellow Seat",
|
"block.create.yellow_seat": "UNLOCALIZED: Yellow Seat",
|
||||||
"block.create.yellow_valve_handle": "UNLOCALIZED: Yellow Valve Handle",
|
"block.create.yellow_valve_handle": "UNLOCALIZED: Yellow Valve Handle",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 319",
|
"_": "Missing Localizations: 321",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -230,6 +230,7 @@
|
||||||
"block.create.mechanical_press": "动力辊压机",
|
"block.create.mechanical_press": "动力辊压机",
|
||||||
"block.create.mechanical_pump": "UNLOCALIZED: Mechanical Pump",
|
"block.create.mechanical_pump": "UNLOCALIZED: Mechanical Pump",
|
||||||
"block.create.mechanical_saw": "动力切割机",
|
"block.create.mechanical_saw": "动力切割机",
|
||||||
|
"block.create.metal_bracket": "UNLOCALIZED: Metal Bracket",
|
||||||
"block.create.millstone": "石磨",
|
"block.create.millstone": "石磨",
|
||||||
"block.create.minecart_anchor": "矿车锚",
|
"block.create.minecart_anchor": "矿车锚",
|
||||||
"block.create.mossy_andesite": "生苔安山岩",
|
"block.create.mossy_andesite": "生苔安山岩",
|
||||||
|
@ -389,6 +390,7 @@
|
||||||
"block.create.white_seat": "UNLOCALIZED: White Seat",
|
"block.create.white_seat": "UNLOCALIZED: White Seat",
|
||||||
"block.create.white_valve_handle": "UNLOCALIZED: White Valve Handle",
|
"block.create.white_valve_handle": "UNLOCALIZED: White Valve Handle",
|
||||||
"block.create.windmill_bearing": "UNLOCALIZED: Windmill Bearing",
|
"block.create.windmill_bearing": "UNLOCALIZED: Windmill Bearing",
|
||||||
|
"block.create.wooden_bracket": "UNLOCALIZED: Wooden Bracket",
|
||||||
"block.create.yellow_sail": "UNLOCALIZED: Yellow Sail",
|
"block.create.yellow_sail": "UNLOCALIZED: Yellow Sail",
|
||||||
"block.create.yellow_seat": "UNLOCALIZED: Yellow Seat",
|
"block.create.yellow_seat": "UNLOCALIZED: Yellow Seat",
|
||||||
"block.create.yellow_valve_handle": "UNLOCALIZED: Yellow Valve Handle",
|
"block.create.yellow_valve_handle": "UNLOCALIZED: Yellow Valve Handle",
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"parent": "create:block/bracket/cog/ground",
|
||||||
|
"textures": {
|
||||||
|
"bracket": "create:block/bracket_metal",
|
||||||
|
"plate": "create:block/bracket_plate_metal"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"parent": "create:block/bracket/cog/ground",
|
||||||
|
"textures": {
|
||||||
|
"bracket": "create:block/bracket_wooden",
|
||||||
|
"plate": "create:block/bracket_plate_wooden"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"parent": "create:block/bracket/cog/wall",
|
||||||
|
"textures": {
|
||||||
|
"bracket": "create:block/bracket_metal",
|
||||||
|
"plate": "create:block/bracket_plate_metal"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"parent": "create:block/bracket/cog/wall",
|
||||||
|
"textures": {
|
||||||
|
"bracket": "create:block/bracket_wooden",
|
||||||
|
"plate": "create:block/bracket_plate_wooden"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"parent": "create:block/bracket/pipe/ground",
|
||||||
|
"textures": {
|
||||||
|
"bracket": "create:block/bracket_metal",
|
||||||
|
"plate": "create:block/bracket_plate_metal"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"parent": "create:block/bracket/pipe/ground",
|
||||||
|
"textures": {
|
||||||
|
"bracket": "create:block/bracket_wooden",
|
||||||
|
"plate": "create:block/bracket_plate_wooden"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"parent": "create:block/bracket/pipe/wall",
|
||||||
|
"textures": {
|
||||||
|
"bracket": "create:block/bracket_metal",
|
||||||
|
"plate": "create:block/bracket_plate_metal"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"parent": "create:block/bracket/pipe/wall",
|
||||||
|
"textures": {
|
||||||
|
"bracket": "create:block/bracket_wooden",
|
||||||
|
"plate": "create:block/bracket_plate_wooden"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"parent": "create:block/bracket/shaft/ground",
|
||||||
|
"textures": {
|
||||||
|
"bracket": "create:block/bracket_metal",
|
||||||
|
"plate": "create:block/bracket_plate_metal"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"parent": "create:block/bracket/shaft/ground",
|
||||||
|
"textures": {
|
||||||
|
"bracket": "create:block/bracket_wooden",
|
||||||
|
"plate": "create:block/bracket_plate_wooden"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"parent": "create:block/bracket/shaft/wall",
|
||||||
|
"textures": {
|
||||||
|
"bracket": "create:block/bracket_metal",
|
||||||
|
"plate": "create:block/bracket_plate_metal"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"parent": "create:block/bracket/shaft/wall",
|
||||||
|
"textures": {
|
||||||
|
"bracket": "create:block/bracket_wooden",
|
||||||
|
"plate": "create:block/bracket_plate_wooden"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"parent": "create:block/bracket/item",
|
||||||
|
"textures": {
|
||||||
|
"bracket": "create:block/bracket_metal",
|
||||||
|
"plate": "create:block/bracket_plate_metal"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"parent": "create:block/bracket/item",
|
||||||
|
"textures": {
|
||||||
|
"bracket": "create:block/bracket_wooden",
|
||||||
|
"plate": "create:block/bracket_plate_wooden"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,32 @@
|
||||||
|
{
|
||||||
|
"parent": "minecraft:recipes/root",
|
||||||
|
"rewards": {
|
||||||
|
"recipes": [
|
||||||
|
"create:crafting/kinetics/metal_bracket"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"criteria": {
|
||||||
|
"has_item": {
|
||||||
|
"trigger": "minecraft:inventory_changed",
|
||||||
|
"conditions": {
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"item": "create:andesite_alloy"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"has_the_recipe": {
|
||||||
|
"trigger": "minecraft:recipe_unlocked",
|
||||||
|
"conditions": {
|
||||||
|
"recipe": "create:crafting/kinetics/metal_bracket"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"requirements": [
|
||||||
|
[
|
||||||
|
"has_item",
|
||||||
|
"has_the_recipe"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,32 @@
|
||||||
|
{
|
||||||
|
"parent": "minecraft:recipes/root",
|
||||||
|
"rewards": {
|
||||||
|
"recipes": [
|
||||||
|
"create:crafting/kinetics/wooden_bracket"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"criteria": {
|
||||||
|
"has_item": {
|
||||||
|
"trigger": "minecraft:inventory_changed",
|
||||||
|
"conditions": {
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"item": "create:andesite_alloy"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"has_the_recipe": {
|
||||||
|
"trigger": "minecraft:recipe_unlocked",
|
||||||
|
"conditions": {
|
||||||
|
"recipe": "create:crafting/kinetics/wooden_bracket"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"requirements": [
|
||||||
|
[
|
||||||
|
"has_item",
|
||||||
|
"has_the_recipe"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
"type": "minecraft:block",
|
||||||
|
"pools": [
|
||||||
|
{
|
||||||
|
"rolls": 1,
|
||||||
|
"entries": [
|
||||||
|
{
|
||||||
|
"type": "minecraft:item",
|
||||||
|
"name": "create:metal_bracket"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"conditions": [
|
||||||
|
{
|
||||||
|
"condition": "minecraft:survives_explosion"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
"type": "minecraft:block",
|
||||||
|
"pools": [
|
||||||
|
{
|
||||||
|
"rolls": 1,
|
||||||
|
"entries": [
|
||||||
|
{
|
||||||
|
"type": "minecraft:item",
|
||||||
|
"name": "create:wooden_bracket"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"conditions": [
|
||||||
|
{
|
||||||
|
"condition": "minecraft:survives_explosion"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"pattern": [
|
||||||
|
"SSS",
|
||||||
|
"PCP"
|
||||||
|
],
|
||||||
|
"key": {
|
||||||
|
"S": {
|
||||||
|
"tag": "forge:nuggets/iron"
|
||||||
|
},
|
||||||
|
"P": {
|
||||||
|
"tag": "forge:ingots/iron"
|
||||||
|
},
|
||||||
|
"C": {
|
||||||
|
"item": "create:andesite_alloy"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"item": "create:metal_bracket",
|
||||||
|
"count": 4
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"pattern": [
|
||||||
|
"SSS",
|
||||||
|
"PCP"
|
||||||
|
],
|
||||||
|
"key": {
|
||||||
|
"S": {
|
||||||
|
"tag": "forge:rods/wooden"
|
||||||
|
},
|
||||||
|
"P": {
|
||||||
|
"tag": "minecraft:planks"
|
||||||
|
},
|
||||||
|
"C": {
|
||||||
|
"item": "create:andesite_alloy"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"item": "create:wooden_bracket",
|
||||||
|
"count": 4
|
||||||
|
}
|
||||||
|
}
|
|
@ -68,6 +68,9 @@ import com.simibubi.create.content.contraptions.fluids.PumpBlock;
|
||||||
import com.simibubi.create.content.contraptions.fluids.actors.HosePulleyBlock;
|
import com.simibubi.create.content.contraptions.fluids.actors.HosePulleyBlock;
|
||||||
import com.simibubi.create.content.contraptions.fluids.actors.ItemDrainBlock;
|
import com.simibubi.create.content.contraptions.fluids.actors.ItemDrainBlock;
|
||||||
import com.simibubi.create.content.contraptions.fluids.actors.SpoutBlock;
|
import com.simibubi.create.content.contraptions.fluids.actors.SpoutBlock;
|
||||||
|
import com.simibubi.create.content.contraptions.fluids.pipes.BracketBlock;
|
||||||
|
import com.simibubi.create.content.contraptions.fluids.pipes.BracketBlockItem;
|
||||||
|
import com.simibubi.create.content.contraptions.fluids.pipes.BracketGenerator;
|
||||||
import com.simibubi.create.content.contraptions.fluids.pipes.EncasedPipeBlock;
|
import com.simibubi.create.content.contraptions.fluids.pipes.EncasedPipeBlock;
|
||||||
import com.simibubi.create.content.contraptions.fluids.pipes.FluidPipeBlock;
|
import com.simibubi.create.content.contraptions.fluids.pipes.FluidPipeBlock;
|
||||||
import com.simibubi.create.content.contraptions.fluids.pipes.FluidValveBlock;
|
import com.simibubi.create.content.contraptions.fluids.pipes.FluidValveBlock;
|
||||||
|
@ -90,6 +93,7 @@ import com.simibubi.create.content.contraptions.relays.belt.BeltBlock;
|
||||||
import com.simibubi.create.content.contraptions.relays.belt.BeltColor;
|
import com.simibubi.create.content.contraptions.relays.belt.BeltColor;
|
||||||
import com.simibubi.create.content.contraptions.relays.belt.BeltGenerator;
|
import com.simibubi.create.content.contraptions.relays.belt.BeltGenerator;
|
||||||
import com.simibubi.create.content.contraptions.relays.belt.BeltModel;
|
import com.simibubi.create.content.contraptions.relays.belt.BeltModel;
|
||||||
|
import com.simibubi.create.content.contraptions.relays.elementary.BracketedKineticBlockModel;
|
||||||
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.CogwheelBlockItem;
|
import com.simibubi.create.content.contraptions.relays.elementary.CogwheelBlockItem;
|
||||||
import com.simibubi.create.content.contraptions.relays.elementary.ShaftBlock;
|
import com.simibubi.create.content.contraptions.relays.elementary.ShaftBlock;
|
||||||
|
@ -206,6 +210,7 @@ public class AllBlocks {
|
||||||
.initialProperties(SharedProperties::stone)
|
.initialProperties(SharedProperties::stone)
|
||||||
.transform(StressConfigDefaults.setNoImpact())
|
.transform(StressConfigDefaults.setNoImpact())
|
||||||
.blockstate(BlockStateGen.axisBlockProvider(false))
|
.blockstate(BlockStateGen.axisBlockProvider(false))
|
||||||
|
.onRegister(CreateRegistrate.blockModel(() -> BracketedKineticBlockModel::new))
|
||||||
.simpleItem()
|
.simpleItem()
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
|
@ -214,6 +219,7 @@ public class AllBlocks {
|
||||||
.transform(StressConfigDefaults.setNoImpact())
|
.transform(StressConfigDefaults.setNoImpact())
|
||||||
.properties(p -> p.sound(SoundType.WOOD))
|
.properties(p -> p.sound(SoundType.WOOD))
|
||||||
.blockstate(BlockStateGen.axisBlockProvider(false))
|
.blockstate(BlockStateGen.axisBlockProvider(false))
|
||||||
|
.onRegister(CreateRegistrate.blockModel(() -> BracketedKineticBlockModel::new))
|
||||||
.item(CogwheelBlockItem::new)
|
.item(CogwheelBlockItem::new)
|
||||||
.build()
|
.build()
|
||||||
.register();
|
.register();
|
||||||
|
@ -224,6 +230,7 @@ public class AllBlocks {
|
||||||
.properties(p -> p.sound(SoundType.WOOD))
|
.properties(p -> p.sound(SoundType.WOOD))
|
||||||
.transform(StressConfigDefaults.setNoImpact())
|
.transform(StressConfigDefaults.setNoImpact())
|
||||||
.blockstate(BlockStateGen.axisBlockProvider(false))
|
.blockstate(BlockStateGen.axisBlockProvider(false))
|
||||||
|
.onRegister(CreateRegistrate.blockModel(() -> BracketedKineticBlockModel::new))
|
||||||
.item(CogwheelBlockItem::new)
|
.item(CogwheelBlockItem::new)
|
||||||
.build()
|
.build()
|
||||||
.register();
|
.register();
|
||||||
|
@ -470,6 +477,18 @@ public class AllBlocks {
|
||||||
.transform(ModelGen.customItemModel("gauge", "_", "item"))
|
.transform(ModelGen.customItemModel("gauge", "_", "item"))
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
|
public static final BlockEntry<BracketBlock> WOODEN_BRACKET = REGISTRATE.block("wooden_bracket", BracketBlock::new)
|
||||||
|
.blockstate(new BracketGenerator("wooden")::generate)
|
||||||
|
.item(BracketBlockItem::new)
|
||||||
|
.transform(BracketGenerator.itemModel("wooden"))
|
||||||
|
.register();
|
||||||
|
|
||||||
|
public static final BlockEntry<BracketBlock> METAL_BRACKET = REGISTRATE.block("metal_bracket", BracketBlock::new)
|
||||||
|
.blockstate(new BracketGenerator("metal")::generate)
|
||||||
|
.item(BracketBlockItem::new)
|
||||||
|
.transform(BracketGenerator.itemModel("metal"))
|
||||||
|
.register();
|
||||||
|
|
||||||
// Fluids
|
// Fluids
|
||||||
|
|
||||||
public static final BlockEntry<FluidPipeBlock> FLUID_PIPE = REGISTRATE.block("fluid_pipe", FluidPipeBlock::new)
|
public static final BlockEntry<FluidPipeBlock> FLUID_PIPE = REGISTRATE.block("fluid_pipe", FluidPipeBlock::new)
|
||||||
|
|
|
@ -2,17 +2,16 @@ package com.simibubi.create;
|
||||||
|
|
||||||
import java.util.function.Supplier;
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
|
import com.simibubi.create.content.contraptions.fluids.particle.FluidParticleData;
|
||||||
import com.simibubi.create.content.contraptions.particle.AirFlowParticleData;
|
import com.simibubi.create.content.contraptions.particle.AirFlowParticleData;
|
||||||
import com.simibubi.create.content.contraptions.particle.AirParticleData;
|
import com.simibubi.create.content.contraptions.particle.AirParticleData;
|
||||||
import com.simibubi.create.content.contraptions.particle.CubeParticle;
|
|
||||||
import com.simibubi.create.content.contraptions.particle.CubeParticleData;
|
import com.simibubi.create.content.contraptions.particle.CubeParticleData;
|
||||||
import com.simibubi.create.content.contraptions.particle.HeaterParticleData;
|
import com.simibubi.create.content.contraptions.particle.HeaterParticleData;
|
||||||
import com.simibubi.create.content.contraptions.particle.ICustomParticle;
|
import com.simibubi.create.content.contraptions.particle.ICustomParticleData;
|
||||||
import com.simibubi.create.content.contraptions.particle.RotationIndicatorParticleData;
|
import com.simibubi.create.content.contraptions.particle.RotationIndicatorParticleData;
|
||||||
import com.simibubi.create.foundation.utility.Lang;
|
import com.simibubi.create.foundation.utility.Lang;
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.particle.IParticleFactory;
|
|
||||||
import net.minecraft.client.particle.ParticleManager;
|
import net.minecraft.client.particle.ParticleManager;
|
||||||
import net.minecraft.particles.IParticleData;
|
import net.minecraft.particles.IParticleData;
|
||||||
import net.minecraft.particles.ParticleType;
|
import net.minecraft.particles.ParticleType;
|
||||||
|
@ -29,23 +28,20 @@ public enum AllParticleTypes {
|
||||||
AIR_FLOW(AirFlowParticleData::new),
|
AIR_FLOW(AirFlowParticleData::new),
|
||||||
AIR(AirParticleData::new),
|
AIR(AirParticleData::new),
|
||||||
HEATER_PARTICLE(HeaterParticleData::new),
|
HEATER_PARTICLE(HeaterParticleData::new),
|
||||||
CUBE(CubeParticleData::dummy, () -> CubeParticle.Factory::new)
|
CUBE(CubeParticleData::new),
|
||||||
|
FLUID_PARTICLE(FluidParticleData::new),
|
||||||
|
BASIN_FLUID(FluidParticleData::new),
|
||||||
|
FLUID_DRIP(FluidParticleData::new)
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
private ParticleEntry<?> entry;
|
private ParticleEntry<?> entry;
|
||||||
|
|
||||||
<D extends IParticleData> AllParticleTypes(Supplier<? extends ICustomParticle<D>> typeFactory) {
|
<D extends IParticleData> AllParticleTypes(Supplier<? extends ICustomParticleData<D>> typeFactory) {
|
||||||
String asId = Lang.asId(this.name());
|
String asId = Lang.asId(this.name());
|
||||||
entry = new ParticleEntry<>(new ResourceLocation(Create.ID, asId), typeFactory);
|
entry = new ParticleEntry<>(new ResourceLocation(Create.ID, asId), typeFactory);
|
||||||
}
|
}
|
||||||
|
|
||||||
<D extends IParticleData> AllParticleTypes(Supplier<? extends ICustomParticle<D>> typeFactory,
|
|
||||||
Supplier<Supplier<IParticleFactory<D>>> particleMetaFactory) {
|
|
||||||
String asId = Lang.asId(this.name());
|
|
||||||
entry = new ParticleEntry<>(new ResourceLocation(Create.ID, asId), typeFactory, particleMetaFactory);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void register(RegistryEvent.Register<ParticleType<?>> event) {
|
public static void register(RegistryEvent.Register<ParticleType<?>> event) {
|
||||||
for (AllParticleTypes particle : values())
|
for (AllParticleTypes particle : values())
|
||||||
particle.entry.register(event.getRegistry());
|
particle.entry.register(event.getRegistry());
|
||||||
|
@ -59,7 +55,7 @@ public enum AllParticleTypes {
|
||||||
}
|
}
|
||||||
|
|
||||||
public ParticleType<?> get() {
|
public ParticleType<?> get() {
|
||||||
return entry.getType();
|
return entry.getOrCreateType();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String parameter() {
|
public String parameter() {
|
||||||
|
@ -67,48 +63,32 @@ public enum AllParticleTypes {
|
||||||
}
|
}
|
||||||
|
|
||||||
private class ParticleEntry<D extends IParticleData> {
|
private class ParticleEntry<D extends IParticleData> {
|
||||||
Supplier<? extends ICustomParticle<D>> typeFactory;
|
Supplier<? extends ICustomParticleData<D>> typeFactory;
|
||||||
Supplier<Supplier<IParticleFactory<D>>> particleMetaFactory;
|
|
||||||
ParticleType<D> type;
|
ParticleType<D> type;
|
||||||
ResourceLocation id;
|
ResourceLocation id;
|
||||||
|
|
||||||
public ParticleEntry(ResourceLocation id, Supplier<? extends ICustomParticle<D>> typeFactory,
|
public ParticleEntry(ResourceLocation id, Supplier<? extends ICustomParticleData<D>> typeFactory) {
|
||||||
Supplier<Supplier<IParticleFactory<D>>> particleMetaFactory) {
|
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.typeFactory = typeFactory;
|
this.typeFactory = typeFactory;
|
||||||
this.particleMetaFactory = particleMetaFactory;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ParticleEntry(ResourceLocation id, Supplier<? extends ICustomParticle<D>> typeFactory) {
|
|
||||||
this(id, typeFactory, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
ParticleType<?> getType() {
|
|
||||||
makeType();
|
|
||||||
return type;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void register(IForgeRegistry<ParticleType<?>> registry) {
|
void register(IForgeRegistry<ParticleType<?>> registry) {
|
||||||
makeType();
|
registry.register(getOrCreateType());
|
||||||
registry.register(type);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void makeType() {
|
ParticleType<D> getOrCreateType() {
|
||||||
if (type == null) {
|
if (type != null)
|
||||||
|
return type;
|
||||||
type = typeFactory.get()
|
type = typeFactory.get()
|
||||||
.createType();
|
.createType();
|
||||||
type.setRegistryName(id);
|
type.setRegistryName(id);
|
||||||
}
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
@OnlyIn(Dist.CLIENT)
|
@OnlyIn(Dist.CLIENT)
|
||||||
void registerFactory(ParticleManager particles) {
|
void registerFactory(ParticleManager particles) {
|
||||||
makeType();
|
typeFactory.get()
|
||||||
if (particleMetaFactory == null)
|
.register(getOrCreateType(), particles);
|
||||||
particles.registerFactory(type, typeFactory.get()
|
|
||||||
.getFactory());
|
|
||||||
else
|
|
||||||
particles.registerFactory(type, particleMetaFactory.get().get());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@ public class MixingCategory extends BasinCategory {
|
||||||
|
|
||||||
private final AnimatedMixer mixer = new AnimatedMixer();
|
private final AnimatedMixer mixer = new AnimatedMixer();
|
||||||
private final AnimatedBlazeBurner heater = new AnimatedBlazeBurner();
|
private final AnimatedBlazeBurner heater = new AnimatedBlazeBurner();
|
||||||
private MixingType type;
|
MixingType type;
|
||||||
|
|
||||||
enum MixingType {
|
enum MixingType {
|
||||||
AUTO_SHAPELESS, MIXING, AUTO_BREWING;
|
AUTO_SHAPELESS, MIXING, AUTO_BREWING;
|
||||||
|
|
|
@ -5,6 +5,7 @@ import java.util.Optional;
|
||||||
|
|
||||||
import com.simibubi.create.AllRecipeTypes;
|
import com.simibubi.create.AllRecipeTypes;
|
||||||
import com.simibubi.create.content.contraptions.components.press.MechanicalPressTileEntity;
|
import com.simibubi.create.content.contraptions.components.press.MechanicalPressTileEntity;
|
||||||
|
import com.simibubi.create.content.contraptions.fluids.FluidFX;
|
||||||
import com.simibubi.create.content.contraptions.fluids.potion.PotionMixingRecipeManager;
|
import com.simibubi.create.content.contraptions.fluids.potion.PotionMixingRecipeManager;
|
||||||
import com.simibubi.create.content.contraptions.processing.BasinOperatingTileEntity;
|
import com.simibubi.create.content.contraptions.processing.BasinOperatingTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.processing.BasinTileEntity;
|
import com.simibubi.create.content.contraptions.processing.BasinTileEntity;
|
||||||
|
@ -12,6 +13,8 @@ import com.simibubi.create.foundation.advancement.AllTriggers;
|
||||||
import com.simibubi.create.foundation.advancement.ITriggerable;
|
import com.simibubi.create.foundation.advancement.ITriggerable;
|
||||||
import com.simibubi.create.foundation.config.AllConfigs;
|
import com.simibubi.create.foundation.config.AllConfigs;
|
||||||
import com.simibubi.create.foundation.item.SmartInventory;
|
import com.simibubi.create.foundation.item.SmartInventory;
|
||||||
|
import com.simibubi.create.foundation.tileEntity.behaviour.fluid.SmartFluidTankBehaviour;
|
||||||
|
import com.simibubi.create.foundation.tileEntity.behaviour.fluid.SmartFluidTankBehaviour.TankSegment;
|
||||||
import com.simibubi.create.foundation.utility.VecHelper;
|
import com.simibubi.create.foundation.utility.VecHelper;
|
||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
|
@ -20,6 +23,7 @@ import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.crafting.IRecipe;
|
import net.minecraft.item.crafting.IRecipe;
|
||||||
import net.minecraft.item.crafting.IRecipeSerializer;
|
import net.minecraft.item.crafting.IRecipeSerializer;
|
||||||
import net.minecraft.nbt.CompoundNBT;
|
import net.minecraft.nbt.CompoundNBT;
|
||||||
|
import net.minecraft.particles.IParticleData;
|
||||||
import net.minecraft.particles.ItemParticleData;
|
import net.minecraft.particles.ItemParticleData;
|
||||||
import net.minecraft.particles.ParticleTypes;
|
import net.minecraft.particles.ParticleTypes;
|
||||||
import net.minecraft.tileentity.TileEntityType;
|
import net.minecraft.tileentity.TileEntityType;
|
||||||
|
@ -87,6 +91,9 @@ public class MechanicalMixerTileEntity extends BasinOperatingTileEntity {
|
||||||
running = compound.getBoolean("Running");
|
running = compound.getBoolean("Running");
|
||||||
runningTicks = compound.getInt("Ticks");
|
runningTicks = compound.getInt("Ticks");
|
||||||
super.fromTag(state, compound, clientPacket);
|
super.fromTag(state, compound, clientPacket);
|
||||||
|
|
||||||
|
if (clientPacket && hasWorld())
|
||||||
|
getBasin().ifPresent(bte -> bte.setAreFluidsMoving(running && runningTicks <= 20));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -128,7 +135,6 @@ public class MechanicalMixerTileEntity extends BasinOperatingTileEntity {
|
||||||
if (runningTicks != 20)
|
if (runningTicks != 20)
|
||||||
runningTicks++;
|
runningTicks++;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void renderParticles() {
|
public void renderParticles() {
|
||||||
|
@ -136,24 +142,38 @@ public class MechanicalMixerTileEntity extends BasinOperatingTileEntity {
|
||||||
if (!basin.isPresent() || world == null)
|
if (!basin.isPresent() || world == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
SmartInventory inputs = basin.get()
|
for (SmartInventory inv : basin.get()
|
||||||
.getInputInventory();
|
.getInvs()) {
|
||||||
for (int slot = 0; slot < inputs.getSlots(); slot++) {
|
for (int slot = 0; slot < inv.getSlots(); slot++) {
|
||||||
ItemStack stackInSlot = inputs.getStackInSlot(slot);
|
ItemStack stackInSlot = inv.getStackInSlot(slot);
|
||||||
if (stackInSlot.isEmpty())
|
if (stackInSlot.isEmpty())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
ItemParticleData data = new ItemParticleData(ParticleTypes.ITEM, stackInSlot);
|
ItemParticleData data = new ItemParticleData(ParticleTypes.ITEM, stackInSlot);
|
||||||
|
spillParticle(data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (SmartFluidTankBehaviour behaviour : basin.get()
|
||||||
|
.getTanks()) {
|
||||||
|
if (behaviour == null)
|
||||||
|
continue;
|
||||||
|
for (TankSegment tankSegment : behaviour.getTanks()) {
|
||||||
|
if (tankSegment.isEmpty(0))
|
||||||
|
continue;
|
||||||
|
spillParticle(FluidFX.getFluidParticle(tankSegment.getRenderedFluid()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void spillParticle(IParticleData data) {
|
||||||
float angle = world.rand.nextFloat() * 360;
|
float angle = world.rand.nextFloat() * 360;
|
||||||
Vector3d offset = new Vector3d(0, 0, 0.25f);
|
Vector3d offset = new Vector3d(0, 0, 0.25f);
|
||||||
offset = VecHelper.rotate(offset, angle, Axis.Y);
|
offset = VecHelper.rotate(offset, angle, Axis.Y);
|
||||||
Vector3d target = VecHelper.rotate(offset, getSpeed() > 0 ? 25 : -25, Axis.Y)
|
Vector3d target = VecHelper.rotate(offset, getSpeed() > 0 ? 25 : -25, Axis.Y)
|
||||||
.add(0, .25f, 0);
|
.add(0, .25f, 0);
|
||||||
|
|
||||||
Vector3d center = offset.add(VecHelper.getCenterOf(pos));
|
Vector3d center = offset.add(VecHelper.getCenterOf(pos));
|
||||||
target = VecHelper.offsetRandomly(target.subtract(offset), world.rand, 1 / 128f);
|
target = VecHelper.offsetRandomly(target.subtract(offset), world.rand, 1 / 128f);
|
||||||
world.addParticle(data, center.x, center.y - 2, center.z, target.x, target.y, target.z);
|
world.addParticle(data, center.x, center.y - 1.75f, center.z, target.x, target.y, target.z);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -2,6 +2,9 @@ package com.simibubi.create.content.contraptions.fluids;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
|
import com.simibubi.create.AllParticleTypes;
|
||||||
|
import com.simibubi.create.content.contraptions.fluids.particle.FluidParticleData;
|
||||||
|
import com.simibubi.create.foundation.fluid.FluidHelper;
|
||||||
import com.simibubi.create.foundation.utility.VecHelper;
|
import com.simibubi.create.foundation.utility.VecHelper;
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
|
@ -11,6 +14,7 @@ import net.minecraft.fluid.Fluids;
|
||||||
import net.minecraft.particles.BlockParticleData;
|
import net.minecraft.particles.BlockParticleData;
|
||||||
import net.minecraft.particles.IParticleData;
|
import net.minecraft.particles.IParticleData;
|
||||||
import net.minecraft.particles.ParticleTypes;
|
import net.minecraft.particles.ParticleTypes;
|
||||||
|
import net.minecraft.util.Direction;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.math.vector.Vector3d;
|
import net.minecraft.util.math.vector.Vector3d;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
@ -40,6 +44,56 @@ public class FluidFX {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static IParticleData getFluidParticle(FluidStack fluid) {
|
||||||
|
return new FluidParticleData(AllParticleTypes.FLUID_PARTICLE.get(), fluid);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IParticleData getDrippingParticle(FluidStack fluid) {
|
||||||
|
IParticleData particle = null;
|
||||||
|
if (FluidHelper.isWater(fluid.getFluid()))
|
||||||
|
particle = ParticleTypes.DRIPPING_WATER;
|
||||||
|
if (FluidHelper.isLava(fluid.getFluid()))
|
||||||
|
particle = ParticleTypes.DRIPPING_LAVA;
|
||||||
|
if (particle == null)
|
||||||
|
particle = new FluidParticleData(AllParticleTypes.FLUID_DRIP.get(), fluid);
|
||||||
|
return particle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void spawnRimParticles(World world, BlockPos pos, Direction side, int amount, IParticleData particle,
|
||||||
|
float rimRadius) {
|
||||||
|
Vector3d directionVec = Vector3d.of(side.getDirectionVec());
|
||||||
|
for (int i = 0; i < amount; i++) {
|
||||||
|
Vector3d vec = VecHelper.offsetRandomly(Vector3d.ZERO, r, 1)
|
||||||
|
.normalize();
|
||||||
|
vec = VecHelper.clampComponentWise(vec, rimRadius)
|
||||||
|
.mul(VecHelper.axisAlingedPlaneOf(directionVec))
|
||||||
|
.add(directionVec.scale(.45 + r.nextFloat() / 16f));
|
||||||
|
Vector3d m = vec;
|
||||||
|
vec = vec.add(VecHelper.getCenterOf(pos));
|
||||||
|
|
||||||
|
world.addOptionalParticle(particle, vec.x, vec.y - 1 / 16f, vec.z, m.x, m.y, m.z);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void spawnPouringLiquid(World world, BlockPos pos, int amount, IParticleData particle,
|
||||||
|
float rimRadius, Vector3d directionVec, boolean inbound) {
|
||||||
|
for (int i = 0; i < amount; i++) {
|
||||||
|
Vector3d vec = VecHelper.offsetRandomly(Vector3d.ZERO, r, rimRadius * .75f);
|
||||||
|
vec = vec.mul(VecHelper.axisAlingedPlaneOf(directionVec))
|
||||||
|
.add(directionVec.scale(.5 + r.nextFloat() / 4f));
|
||||||
|
Vector3d m = vec.scale(1 / 4f);
|
||||||
|
Vector3d centerOf = VecHelper.getCenterOf(pos);
|
||||||
|
vec = vec.add(centerOf);
|
||||||
|
if (inbound) {
|
||||||
|
vec = vec.add(m);
|
||||||
|
m = centerOf.add(directionVec.scale(.5))
|
||||||
|
.subtract(vec)
|
||||||
|
.scale(1 / 16f);
|
||||||
|
}
|
||||||
|
world.addOptionalParticle(particle, vec.x, vec.y - 1 / 16f, vec.z, m.x, m.y, m.z);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static void particle(IParticleData data, Vector3d pos, Vector3d motion) {
|
private static void particle(IParticleData data, Vector3d pos, Vector3d motion) {
|
||||||
world().addParticle(data, pos.x, pos.y, pos.z, motion.x, motion.y, motion.z);
|
world().addParticle(data, pos.x, pos.y, pos.z, motion.x, motion.y, motion.z);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
package com.simibubi.create.content.contraptions.fluids;
|
package com.simibubi.create.content.contraptions.fluids;
|
||||||
|
|
||||||
import com.simibubi.create.AllBlocks;
|
import com.simibubi.create.AllBlocks;
|
||||||
|
import com.simibubi.create.content.contraptions.fluids.pipes.EncasedPipeBlock;
|
||||||
|
import com.simibubi.create.content.contraptions.relays.elementary.BracketedTileEntityBehaviour;
|
||||||
import com.simibubi.create.foundation.tileEntity.SmartTileEntity;
|
import com.simibubi.create.foundation.tileEntity.SmartTileEntity;
|
||||||
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
|
||||||
import com.simibubi.create.foundation.tileEntity.behaviour.BehaviourType;
|
import com.simibubi.create.foundation.tileEntity.behaviour.BehaviourType;
|
||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
|
@ -10,7 +11,7 @@ import net.minecraft.util.Direction;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.IBlockDisplayReader;
|
import net.minecraft.world.IBlockDisplayReader;
|
||||||
|
|
||||||
public class FluidPipeAttachmentBehaviour extends TileEntityBehaviour {
|
public class FluidPipeAttachmentBehaviour extends BracketedTileEntityBehaviour {
|
||||||
|
|
||||||
public static BehaviourType<FluidPipeAttachmentBehaviour> TYPE = new BehaviourType<>();
|
public static BehaviourType<FluidPipeAttachmentBehaviour> TYPE = new BehaviourType<>();
|
||||||
|
|
||||||
|
@ -36,6 +37,9 @@ public class FluidPipeAttachmentBehaviour extends TileEntityBehaviour {
|
||||||
FluidPipeBehaviour fluidPipeBehaviour = tileEntity.getBehaviour(FluidPipeBehaviour.TYPE);
|
FluidPipeBehaviour fluidPipeBehaviour = tileEntity.getBehaviour(FluidPipeBehaviour.TYPE);
|
||||||
if (fluidPipeBehaviour == null)
|
if (fluidPipeBehaviour == null)
|
||||||
return false;
|
return false;
|
||||||
|
// BlockState bracket = getBracket();
|
||||||
|
// if (bracket != Blocks.AIR.getDefaultState() && bracket.get(BracketBlock.FACING) == direction)
|
||||||
|
// return false;
|
||||||
return fluidPipeBehaviour.isConnectedTo(state, direction);
|
return fluidPipeBehaviour.isConnectedTo(state, direction);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,4 +60,14 @@ public class FluidPipeAttachmentBehaviour extends TileEntityBehaviour {
|
||||||
return TYPE;
|
return TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canHaveBracket() {
|
||||||
|
BlockState blockState = tileEntity.getBlockState();
|
||||||
|
if (blockState.getBlock() instanceof PumpBlock)
|
||||||
|
return false;
|
||||||
|
if (blockState.getBlock() instanceof EncasedPipeBlock)
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,6 @@ import javax.annotation.Nullable;
|
||||||
import com.simibubi.create.AllSpecialTextures;
|
import com.simibubi.create.AllSpecialTextures;
|
||||||
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.foundation.fluid.FluidHelper;
|
|
||||||
import com.simibubi.create.foundation.tileEntity.SmartTileEntity;
|
import com.simibubi.create.foundation.tileEntity.SmartTileEntity;
|
||||||
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
||||||
import com.simibubi.create.foundation.tileEntity.behaviour.BehaviourType;
|
import com.simibubi.create.foundation.tileEntity.behaviour.BehaviourType;
|
||||||
|
@ -31,9 +30,7 @@ import net.minecraft.fluid.Fluid;
|
||||||
import net.minecraft.fluid.Fluids;
|
import net.minecraft.fluid.Fluids;
|
||||||
import net.minecraft.nbt.CompoundNBT;
|
import net.minecraft.nbt.CompoundNBT;
|
||||||
import net.minecraft.nbt.ListNBT;
|
import net.minecraft.nbt.ListNBT;
|
||||||
import net.minecraft.particles.BlockParticleData;
|
|
||||||
import net.minecraft.particles.IParticleData;
|
import net.minecraft.particles.IParticleData;
|
||||||
import net.minecraft.particles.ParticleTypes;
|
|
||||||
import net.minecraft.util.Direction;
|
import net.minecraft.util.Direction;
|
||||||
import net.minecraft.util.math.AxisAlignedBB;
|
import net.minecraft.util.math.AxisAlignedBB;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
@ -48,6 +45,10 @@ import net.minecraftforge.fml.DistExecutor;
|
||||||
public abstract class FluidPipeBehaviour extends TileEntityBehaviour {
|
public abstract class FluidPipeBehaviour extends TileEntityBehaviour {
|
||||||
|
|
||||||
public static BehaviourType<FluidPipeBehaviour> TYPE = new BehaviourType<>();
|
public static BehaviourType<FluidPipeBehaviour> TYPE = new BehaviourType<>();
|
||||||
|
public static final int MAX_PARTICLE_RENDER_DISTANCE = 20;
|
||||||
|
public static final int SPLASH_PARTICLE_AMOUNT = 1;
|
||||||
|
public static final float IDLE_PARTICLE_SPAWN_CHANCE = 1 / 800f;
|
||||||
|
public static final Random r = new Random();
|
||||||
|
|
||||||
// Direction -> (inboundflows{}, outwardflows{})
|
// Direction -> (inboundflows{}, outwardflows{})
|
||||||
Map<Direction, Couple<PipeFlows>> allFlows;
|
Map<Direction, Couple<PipeFlows>> allFlows;
|
||||||
|
@ -228,22 +229,17 @@ public abstract class FluidPipeBehaviour extends TileEntityBehaviour {
|
||||||
contentsChanged();
|
contentsChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void spawnParticles() {
|
|
||||||
DistExecutor.runWhenOn(Dist.CLIENT, () -> this::spawnParticlesInner);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void spawnSplashOnRim(Direction face) {
|
public void spawnSplashOnRim(Direction face) {
|
||||||
DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> spawnSplashOnRimInner(face));
|
DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> spawnSplashOnRimInner(face));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final int MAX_PARTICLE_RENDER_DISTANCE = 20;
|
public void spawnParticles() {
|
||||||
public static final int SPLASH_PARTICLE_AMOUNT = 1;
|
DistExecutor.runWhenOn(Dist.CLIENT, () -> this::spawnParticlesInner);
|
||||||
public static final float IDLE_PARTICLE_SPAWN_CHANCE = 1 / 800f;
|
}
|
||||||
public static final Random r = new Random();
|
|
||||||
|
|
||||||
@OnlyIn(Dist.CLIENT)
|
@OnlyIn(Dist.CLIENT)
|
||||||
private void spawnParticlesInner() {
|
private void spawnParticlesInner() {
|
||||||
if (!isRenderEntityWithinDistance())
|
if (!isRenderEntityWithinDistance(tileEntity.getPos()))
|
||||||
return;
|
return;
|
||||||
if (fluid.isEmpty())
|
if (fluid.isEmpty())
|
||||||
return;
|
return;
|
||||||
|
@ -267,7 +263,7 @@ public abstract class FluidPipeBehaviour extends TileEntityBehaviour {
|
||||||
|
|
||||||
@OnlyIn(Dist.CLIENT)
|
@OnlyIn(Dist.CLIENT)
|
||||||
private void spawnSplashOnRimInner(Direction face) {
|
private void spawnSplashOnRimInner(Direction face) {
|
||||||
if (!isRenderEntityWithinDistance())
|
if (!isRenderEntityWithinDistance(tileEntity.getPos()))
|
||||||
return;
|
return;
|
||||||
if (fluid.isEmpty())
|
if (fluid.isEmpty())
|
||||||
return;
|
return;
|
||||||
|
@ -285,72 +281,36 @@ public abstract class FluidPipeBehaviour extends TileEntityBehaviour {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
IParticleData particle = null;
|
IParticleData particle = FluidFX.getDrippingParticle(fluid);
|
||||||
if (FluidHelper.isWater(fluid.getFluid()))
|
|
||||||
particle = ParticleTypes.DRIPPING_WATER;
|
|
||||||
if (FluidHelper.isLava(fluid.getFluid()))
|
|
||||||
particle = ParticleTypes.DRIPPING_LAVA;
|
|
||||||
// TODO: Generic drip particle type for forge fluids
|
|
||||||
|
|
||||||
if (particle == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
float rimRadius = getRimRadius(state, side);
|
float rimRadius = getRimRadius(state, side);
|
||||||
Vector3d directionVec = Vector3d.of(side.getDirectionVec());
|
FluidFX.spawnRimParticles(world, pos, side, amount, particle, rimRadius);
|
||||||
|
|
||||||
for (int i = 0; i < amount; i++) {
|
|
||||||
Vector3d vec = VecHelper.offsetRandomly(Vector3d.ZERO, r, 1)
|
|
||||||
.normalize();
|
|
||||||
vec = VecHelper.clampComponentWise(vec, rimRadius)
|
|
||||||
.mul(VecHelper.axisAlingedPlaneOf(directionVec))
|
|
||||||
.add(directionVec.scale(.45 + r.nextFloat() / 16f));
|
|
||||||
Vector3d m = vec;
|
|
||||||
vec = vec.add(VecHelper.getCenterOf(pos));
|
|
||||||
|
|
||||||
world.addOptionalParticle(particle, vec.x, vec.y - 1 / 16f, vec.z, m.x, m.y, m.z);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@OnlyIn(Dist.CLIENT)
|
@OnlyIn(Dist.CLIENT)
|
||||||
private void spawnPouringLiquid(World world, BlockState state, FluidStack fluid, Direction side, int amount) {
|
private void spawnPouringLiquid(World world, BlockState state, FluidStack fluid, Direction side, int amount) {
|
||||||
IParticleData particle = new BlockParticleData(ParticleTypes.BLOCK, fluid.getFluid()
|
IParticleData particle = FluidFX.getFluidParticle(fluid);
|
||||||
.getDefaultState()
|
|
||||||
.getBlockState());
|
|
||||||
float rimRadius = getRimRadius(state, side);
|
float rimRadius = getRimRadius(state, side);
|
||||||
Vector3d directionVec = Vector3d.of(side.getDirectionVec());
|
Vector3d directionVec = Vector3d.of(side.getDirectionVec());
|
||||||
|
BlockPos pos = tileEntity.getPos();
|
||||||
|
|
||||||
Couple<PipeFlows> couple = allFlows.get(side);
|
Couple<PipeFlows> couple = allFlows.get(side);
|
||||||
if (couple == null)
|
if (couple == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
couple.forEachWithContext((flow, inbound) -> {
|
couple.forEachWithContext((flow, inbound) -> {
|
||||||
if (flow.progress == null)
|
if (flow.progress == null)
|
||||||
return;
|
return;
|
||||||
for (int i = 0; i < amount; i++) {
|
FluidFX.spawnPouringLiquid(world, pos, amount, particle, rimRadius, directionVec, inbound);
|
||||||
Vector3d vec = VecHelper.offsetRandomly(Vector3d.ZERO, r, rimRadius);
|
|
||||||
vec = vec.mul(VecHelper.axisAlingedPlaneOf(directionVec))
|
|
||||||
.add(directionVec.scale(.5 + r.nextFloat() / 4f));
|
|
||||||
Vector3d m = vec;
|
|
||||||
Vector3d centerOf = VecHelper.getCenterOf(tileEntity.getPos());
|
|
||||||
vec = vec.add(centerOf);
|
|
||||||
if (inbound) {
|
|
||||||
vec = vec.add(m);
|
|
||||||
m = centerOf.add(directionVec.scale(.5))
|
|
||||||
.subtract(vec)
|
|
||||||
.scale(3);
|
|
||||||
}
|
|
||||||
world.addOptionalParticle(particle, vec.x, vec.y - 1 / 16f, vec.z, m.x, m.y, m.z);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@OnlyIn(Dist.CLIENT)
|
@OnlyIn(Dist.CLIENT)
|
||||||
private boolean isRenderEntityWithinDistance() {
|
public static boolean isRenderEntityWithinDistance(BlockPos pos) {
|
||||||
Entity renderViewEntity = Minecraft.getInstance()
|
Entity renderViewEntity = Minecraft.getInstance()
|
||||||
.getRenderViewEntity();
|
.getRenderViewEntity();
|
||||||
if (renderViewEntity == null)
|
if (renderViewEntity == null)
|
||||||
return false;
|
return false;
|
||||||
Vector3d center = VecHelper.getCenterOf(tileEntity.getPos());
|
Vector3d center = VecHelper.getCenterOf(pos);
|
||||||
if (renderViewEntity.getPositionVec()
|
if (renderViewEntity.getPositionVec()
|
||||||
.distanceTo(center) > MAX_PARTICLE_RENDER_DISTANCE)
|
.distanceTo(center) > MAX_PARTICLE_RENDER_DISTANCE)
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -5,6 +5,8 @@ import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
import org.apache.commons.lang3.mutable.MutableObject;
|
import org.apache.commons.lang3.mutable.MutableObject;
|
||||||
|
|
||||||
import com.simibubi.create.AllBlocks;
|
import com.simibubi.create.AllBlocks;
|
||||||
|
@ -46,7 +48,7 @@ public class FluidPropagator {
|
||||||
return null;
|
return null;
|
||||||
if (otherBlock instanceof FlowingFluidBlock)
|
if (otherBlock instanceof FlowingFluidBlock)
|
||||||
return null;
|
return null;
|
||||||
if (!isStraightPipe(state))
|
if (getStraightPipeAxis(state) == null)
|
||||||
return null;
|
return null;
|
||||||
for (Direction d : Iterate.directions) {
|
for (Direction d : Iterate.directions) {
|
||||||
if (!pos.offset(d)
|
if (!pos.offset(d)
|
||||||
|
@ -162,12 +164,13 @@ public class FluidPropagator {
|
||||||
.isPresent();
|
.isPresent();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isStraightPipe(BlockState state) {
|
@Nullable
|
||||||
|
public static Axis getStraightPipeAxis(BlockState state) {
|
||||||
if (state.getBlock() instanceof AxisPipeBlock)
|
if (state.getBlock() instanceof AxisPipeBlock)
|
||||||
return true;
|
return state.get(AxisPipeBlock.AXIS);
|
||||||
if (!FluidPipeBlock.isPipe(state))
|
if (!FluidPipeBlock.isPipe(state))
|
||||||
return false;
|
return null;
|
||||||
boolean axisFound = false;
|
Axis axisFound = null;
|
||||||
int connections = 0;
|
int connections = 0;
|
||||||
for (Axis axis : Iterate.axes) {
|
for (Axis axis : Iterate.axes) {
|
||||||
Direction d1 = Direction.getFacingFromAxis(AxisDirection.NEGATIVE, axis);
|
Direction d1 = Direction.getFacingFromAxis(AxisDirection.NEGATIVE, axis);
|
||||||
|
@ -179,12 +182,12 @@ public class FluidPropagator {
|
||||||
if (openAt2)
|
if (openAt2)
|
||||||
connections++;
|
connections++;
|
||||||
if (openAt1 && openAt2)
|
if (openAt1 && openAt2)
|
||||||
if (axisFound)
|
if (axisFound != null)
|
||||||
return false;
|
return null;
|
||||||
else
|
else
|
||||||
axisFound = true;
|
axisFound = axis;
|
||||||
}
|
}
|
||||||
return axisFound && connections == 2;
|
return connections == 2 ? axisFound : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,37 +1,64 @@
|
||||||
package com.simibubi.create.content.contraptions.fluids;
|
package com.simibubi.create.content.contraptions.fluids;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
|
import com.simibubi.create.AllFluids;
|
||||||
|
import com.simibubi.create.content.contraptions.fluids.potion.PotionFluidHandler;
|
||||||
|
import com.simibubi.create.foundation.fluid.FluidHelper;
|
||||||
import com.simibubi.create.foundation.utility.BlockFace;
|
import com.simibubi.create.foundation.utility.BlockFace;
|
||||||
import com.simibubi.create.foundation.utility.BlockHelper;
|
import com.simibubi.create.foundation.utility.BlockHelper;
|
||||||
import com.simibubi.create.foundation.utility.Iterate;
|
import com.simibubi.create.foundation.utility.Iterate;
|
||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.FlowingFluidBlock;
|
import net.minecraft.block.FlowingFluidBlock;
|
||||||
|
import net.minecraft.entity.LivingEntity;
|
||||||
import net.minecraft.fluid.Fluid;
|
import net.minecraft.fluid.Fluid;
|
||||||
import net.minecraft.fluid.FluidState;
|
import net.minecraft.fluid.FluidState;
|
||||||
import net.minecraft.fluid.Fluids;
|
import net.minecraft.fluid.Fluids;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.item.Items;
|
||||||
import net.minecraft.nbt.CompoundNBT;
|
import net.minecraft.nbt.CompoundNBT;
|
||||||
|
import net.minecraft.potion.Effect;
|
||||||
|
import net.minecraft.potion.EffectInstance;
|
||||||
|
import net.minecraft.potion.PotionUtils;
|
||||||
import net.minecraft.state.properties.BlockStateProperties;
|
import net.minecraft.state.properties.BlockStateProperties;
|
||||||
|
import net.minecraft.tags.FluidTags;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.Direction;
|
||||||
|
import net.minecraft.util.SoundCategory;
|
||||||
|
import net.minecraft.util.SoundEvents;
|
||||||
|
import net.minecraft.util.math.AxisAlignedBB;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.util.LazyOptional;
|
import net.minecraftforge.common.util.LazyOptional;
|
||||||
import net.minecraftforge.fluids.FluidStack;
|
import net.minecraftforge.fluids.FluidStack;
|
||||||
import net.minecraftforge.fluids.capability.IFluidHandler;
|
import net.minecraftforge.fluids.capability.IFluidHandler;
|
||||||
|
import net.minecraftforge.fluids.capability.IFluidHandler.FluidAction;
|
||||||
import net.minecraftforge.fluids.capability.templates.FluidTank;
|
import net.minecraftforge.fluids.capability.templates.FluidTank;
|
||||||
|
|
||||||
public class OpenEndedPipe {
|
public class OpenEndedPipe {
|
||||||
|
|
||||||
World world;
|
World world;
|
||||||
|
BlockPos pos;
|
||||||
|
AxisAlignedBB aoe;
|
||||||
|
|
||||||
private OpenEndFluidHandler fluidHandler;
|
private OpenEndFluidHandler fluidHandler;
|
||||||
private BlockPos outputPos;
|
private BlockPos outputPos;
|
||||||
private boolean wasPulling;
|
private boolean wasPulling;
|
||||||
private boolean stale;
|
private boolean stale;
|
||||||
|
|
||||||
|
private FluidStack cachedFluid;
|
||||||
|
private List<EffectInstance> cachedEffects;
|
||||||
|
|
||||||
public OpenEndedPipe(BlockFace face) {
|
public OpenEndedPipe(BlockFace face) {
|
||||||
fluidHandler = new OpenEndFluidHandler();
|
fluidHandler = new OpenEndFluidHandler();
|
||||||
outputPos = face.getConnectedPos();
|
outputPos = face.getConnectedPos();
|
||||||
|
pos = face.getPos();
|
||||||
|
aoe = new AxisAlignedBB(outputPos).expand(0, -1, 0);
|
||||||
|
if (face.getFace() == Direction.DOWN)
|
||||||
|
aoe = aoe.expand(0, -1, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void tick(World world, boolean pulling) {
|
public void tick(World world, boolean pulling) {
|
||||||
|
@ -59,7 +86,8 @@ public class OpenEndedPipe {
|
||||||
return;
|
return;
|
||||||
if (waterlog) {
|
if (waterlog) {
|
||||||
world.setBlockState(outputPos, state.with(BlockStateProperties.WATERLOGGED, false), 3);
|
world.setBlockState(outputPos, state.with(BlockStateProperties.WATERLOGGED, false), 3);
|
||||||
world.getPendingFluidTicks().scheduleTick(outputPos, Fluids.WATER, 1);
|
world.getPendingFluidTicks()
|
||||||
|
.scheduleTick(outputPos, Fluids.WATER, 1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
world.setBlockState(outputPos, fluidState.getBlockState()
|
world.setBlockState(outputPos, fluidState.getBlockState()
|
||||||
|
@ -67,6 +95,20 @@ public class OpenEndedPipe {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FluidStack fluid = fluidHandler.getFluid();
|
||||||
|
if (fluid.isEmpty())
|
||||||
|
return;
|
||||||
|
if (!FluidHelper.hasBlockState(fluid.getFluid())) {
|
||||||
|
fluidHandler.drain(fluid.getAmount() > 1 ? fluid.getAmount() - 1 : 1, FluidAction.EXECUTE);
|
||||||
|
if (fluidHandler.isEmpty())
|
||||||
|
updatePumpIfNecessary();
|
||||||
|
if (!fluid.getFluid()
|
||||||
|
.isEquivalentTo(AllFluids.POTION.get()))
|
||||||
|
return;
|
||||||
|
applyPotionEffects(world, fluid);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Fluid providedFluid = fluidHandler.tryProvidingFluid();
|
Fluid providedFluid = fluidHandler.tryProvidingFluid();
|
||||||
if (providedFluid == null)
|
if (providedFluid == null)
|
||||||
return;
|
return;
|
||||||
|
@ -76,17 +118,55 @@ public class OpenEndedPipe {
|
||||||
}
|
}
|
||||||
if (fluidState.isSource())
|
if (fluidState.isSource())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (world.getDimension().isUltrawarm() && providedFluid.getFluid()
|
||||||
|
.isIn(FluidTags.WATER)) {
|
||||||
|
int i = outputPos.getX();
|
||||||
|
int j = outputPos.getY();
|
||||||
|
int k = outputPos.getZ();
|
||||||
|
world.playSound(null, i, j, k, SoundEvents.BLOCK_FIRE_EXTINGUISH, SoundCategory.BLOCKS, 0.5F,
|
||||||
|
2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (waterlog) {
|
if (waterlog) {
|
||||||
if (providedFluid.getFluid() != Fluids.WATER)
|
if (providedFluid.getFluid() != Fluids.WATER)
|
||||||
return;
|
return;
|
||||||
world.setBlockState(outputPos, state.with(BlockStateProperties.WATERLOGGED, true), 3);
|
world.setBlockState(outputPos, state.with(BlockStateProperties.WATERLOGGED, true), 3);
|
||||||
world.getPendingFluidTicks().scheduleTick(outputPos, Fluids.WATER, 1);
|
world.getPendingFluidTicks()
|
||||||
|
.scheduleTick(outputPos, Fluids.WATER, 1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
world.setBlockState(outputPos, providedFluid.getDefaultState()
|
world.setBlockState(outputPos, providedFluid.getDefaultState()
|
||||||
.getBlockState(), 3);
|
.getBlockState(), 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void applyPotionEffects(World world, FluidStack fluid) {
|
||||||
|
if (cachedFluid == null || cachedEffects == null || !fluid.isFluidEqual(cachedFluid)) {
|
||||||
|
FluidStack copy = fluid.copy();
|
||||||
|
copy.setAmount(250);
|
||||||
|
ItemStack bottle = PotionFluidHandler.fillBottle(new ItemStack(Items.GLASS_BOTTLE), fluid);
|
||||||
|
cachedEffects = PotionUtils.getEffectsFromStack(bottle);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cachedEffects.isEmpty())
|
||||||
|
return;
|
||||||
|
|
||||||
|
List<LivingEntity> list =
|
||||||
|
this.world.getEntitiesWithinAABB(LivingEntity.class, aoe, LivingEntity::canBeHitWithPotion);
|
||||||
|
for (LivingEntity livingentity : list) {
|
||||||
|
for (EffectInstance effectinstance : cachedEffects) {
|
||||||
|
Effect effect = effectinstance.getPotion();
|
||||||
|
if (effect.isInstant()) {
|
||||||
|
effect.affectEntity(null, null, livingentity, effectinstance.getAmplifier(), 0.5D);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
livingentity.addPotionEffect(new EffectInstance(effectinstance));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public LazyOptional<IFluidHandler> getCapability() {
|
public LazyOptional<IFluidHandler> getCapability() {
|
||||||
return LazyOptional.of(() -> fluidHandler);
|
return LazyOptional.of(() -> fluidHandler);
|
||||||
}
|
}
|
||||||
|
@ -114,6 +194,16 @@ public class OpenEndedPipe {
|
||||||
return stale;
|
return stale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void updatePumpIfNecessary() {
|
||||||
|
if (world == null)
|
||||||
|
return;
|
||||||
|
if (!PumpBlock.isPump(world.getBlockState(pos)))
|
||||||
|
return;
|
||||||
|
TileEntity tileEntity = world.getTileEntity(pos);
|
||||||
|
if (tileEntity instanceof PumpTileEntity)
|
||||||
|
((PumpTileEntity) tileEntity).sendData();
|
||||||
|
}
|
||||||
|
|
||||||
private class OpenEndFluidHandler extends FluidTank {
|
private class OpenEndFluidHandler extends FluidTank {
|
||||||
|
|
||||||
public OpenEndFluidHandler() {
|
public OpenEndFluidHandler() {
|
||||||
|
@ -129,6 +219,8 @@ public class OpenEndedPipe {
|
||||||
return 0;
|
return 0;
|
||||||
if (resource.isEmpty())
|
if (resource.isEmpty())
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
FluidStack prevFluid = getFluid();
|
||||||
BlockState state = world.getBlockState(outputPos);
|
BlockState state = world.getBlockState(outputPos);
|
||||||
FluidState fluidState = state.getFluidState();
|
FluidState fluidState = state.getFluidState();
|
||||||
if (!fluidState.isEmpty() && fluidState.getFluid() != resource.getFluid()) {
|
if (!fluidState.isEmpty() && fluidState.getFluid() != resource.getFluid()) {
|
||||||
|
@ -145,7 +237,30 @@ public class OpenEndedPipe {
|
||||||
// Never allow being filled above 1000
|
// Never allow being filled above 1000
|
||||||
FluidStack insertable = resource.copy();
|
FluidStack insertable = resource.copy();
|
||||||
insertable.setAmount(Math.min(insertable.getAmount(), Math.max(1000 - getFluidAmount(), 0)));
|
insertable.setAmount(Math.min(insertable.getAmount(), Math.max(1000 - getFluidAmount(), 0)));
|
||||||
return super.fill(insertable, action);
|
int fill = super.fill(insertable, action);
|
||||||
|
|
||||||
|
if (!getFluid().isFluidEqual(prevFluid))
|
||||||
|
updatePumpIfNecessary();
|
||||||
|
|
||||||
|
return fill;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FluidStack drain(FluidStack resource, FluidAction action) {
|
||||||
|
boolean wasEmpty = isEmpty();
|
||||||
|
FluidStack drain = super.drain(resource, action);
|
||||||
|
if (action.execute() && !wasEmpty && isEmpty())
|
||||||
|
updatePumpIfNecessary();
|
||||||
|
return drain;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FluidStack drain(int maxDrain, FluidAction action) {
|
||||||
|
boolean wasEmpty = isEmpty();
|
||||||
|
FluidStack drain = super.drain(maxDrain, action);
|
||||||
|
if (action.execute() && !wasEmpty && isEmpty())
|
||||||
|
updatePumpIfNecessary();
|
||||||
|
return drain;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean tryCollectFluid(Fluid fluid) {
|
public boolean tryCollectFluid(Fluid fluid) {
|
||||||
|
@ -153,6 +268,7 @@ public class OpenEndedPipe {
|
||||||
if (super.fill(new FluidStack(fluid, 1000),
|
if (super.fill(new FluidStack(fluid, 1000),
|
||||||
simulate ? FluidAction.SIMULATE : FluidAction.EXECUTE) != 1000)
|
simulate ? FluidAction.SIMULATE : FluidAction.EXECUTE) != 1000)
|
||||||
return false;
|
return false;
|
||||||
|
updatePumpIfNecessary();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -162,11 +278,15 @@ public class OpenEndedPipe {
|
||||||
for (boolean simulate : Iterate.trueAndFalse)
|
for (boolean simulate : Iterate.trueAndFalse)
|
||||||
if (drain(1000, simulate ? FluidAction.SIMULATE : FluidAction.EXECUTE).getAmount() != 1000)
|
if (drain(1000, simulate ? FluidAction.SIMULATE : FluidAction.EXECUTE).getAmount() != 1000)
|
||||||
return null;
|
return null;
|
||||||
|
updatePumpIfNecessary();
|
||||||
return fluid;
|
return fluid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void clear() {
|
public void clear() {
|
||||||
|
boolean wasEmpty = isEmpty();
|
||||||
setFluid(FluidStack.EMPTY);
|
setFluid(FluidStack.EMPTY);
|
||||||
|
if (!wasEmpty)
|
||||||
|
updatePumpIfNecessary();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,7 @@ import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
||||||
import com.simibubi.create.foundation.utility.Iterate;
|
import com.simibubi.create.foundation.utility.Iterate;
|
||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.renderer.model.BakedQuad;
|
import net.minecraft.client.renderer.model.BakedQuad;
|
||||||
import net.minecraft.client.renderer.model.IBakedModel;
|
import net.minecraft.client.renderer.model.IBakedModel;
|
||||||
import net.minecraft.util.Direction;
|
import net.minecraft.util.Direction;
|
||||||
|
@ -35,10 +36,14 @@ public class PipeAttachmentModel extends WrappedBakedModel {
|
||||||
PipeModelData data = new PipeModelData();
|
PipeModelData data = new PipeModelData();
|
||||||
FluidPipeAttachmentBehaviour attachmentBehaviour =
|
FluidPipeAttachmentBehaviour attachmentBehaviour =
|
||||||
TileEntityBehaviour.get(world, pos, FluidPipeAttachmentBehaviour.TYPE);
|
TileEntityBehaviour.get(world, pos, FluidPipeAttachmentBehaviour.TYPE);
|
||||||
if (attachmentBehaviour != null)
|
|
||||||
|
if (attachmentBehaviour != null) {
|
||||||
for (Direction d : Iterate.directions)
|
for (Direction d : Iterate.directions)
|
||||||
data.putRim(d, attachmentBehaviour.getAttachment(world, pos, state, d));
|
data.putRim(d, attachmentBehaviour.getAttachment(world, pos, state, d));
|
||||||
|
data.putBracket(attachmentBehaviour.getBracket());
|
||||||
|
}
|
||||||
data.setEncased(FluidPipeBlock.shouldDrawCasing(world, pos, state));
|
data.setEncased(FluidPipeBlock.shouldDrawCasing(world, pos, state));
|
||||||
|
|
||||||
return new ModelDataMap.Builder().withInitial(PIPE_PROPERTY, data)
|
return new ModelDataMap.Builder().withInitial(PIPE_PROPERTY, data)
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
@ -67,17 +72,31 @@ public class PipeAttachmentModel extends WrappedBakedModel {
|
||||||
if (pipeData.isEncased())
|
if (pipeData.isEncased())
|
||||||
quads.addAll(AllBlockPartials.FLUID_PIPE_CASING.get()
|
quads.addAll(AllBlockPartials.FLUID_PIPE_CASING.get()
|
||||||
.getQuads(state, side, rand, data));
|
.getQuads(state, side, rand, data));
|
||||||
|
IBakedModel bracket = pipeData.getBracket();
|
||||||
|
if (bracket != null)
|
||||||
|
quads.addAll(bracket.getQuads(state, side, rand, data));
|
||||||
}
|
}
|
||||||
|
|
||||||
private class PipeModelData {
|
private class PipeModelData {
|
||||||
AttachmentTypes[] rims;
|
AttachmentTypes[] rims;
|
||||||
boolean encased;
|
boolean encased;
|
||||||
|
IBakedModel bracket;
|
||||||
|
|
||||||
public PipeModelData() {
|
public PipeModelData() {
|
||||||
rims = new AttachmentTypes[6];
|
rims = new AttachmentTypes[6];
|
||||||
Arrays.fill(rims, AttachmentTypes.NONE);
|
Arrays.fill(rims, AttachmentTypes.NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void putBracket(BlockState state) {
|
||||||
|
this.bracket = Minecraft.getInstance()
|
||||||
|
.getBlockRendererDispatcher()
|
||||||
|
.getModelForState(state);
|
||||||
|
}
|
||||||
|
|
||||||
|
public IBakedModel getBracket() {
|
||||||
|
return bracket;
|
||||||
|
}
|
||||||
|
|
||||||
public void putRim(Direction face, AttachmentTypes rim) {
|
public void putRim(Direction face, AttachmentTypes rim) {
|
||||||
rims[face.getIndex()] = rim;
|
rims[face.getIndex()] = rim;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,8 @@ import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
import org.apache.commons.lang3.mutable.MutableBoolean;
|
import org.apache.commons.lang3.mutable.MutableBoolean;
|
||||||
|
|
||||||
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||||
|
@ -22,14 +24,19 @@ import com.simibubi.create.foundation.utility.NBTHelper;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.nbt.CompoundNBT;
|
import net.minecraft.nbt.CompoundNBT;
|
||||||
import net.minecraft.nbt.ListNBT;
|
import net.minecraft.nbt.ListNBT;
|
||||||
|
import net.minecraft.particles.IParticleData;
|
||||||
import net.minecraft.tileentity.TileEntityType;
|
import net.minecraft.tileentity.TileEntityType;
|
||||||
import net.minecraft.util.Direction;
|
import net.minecraft.util.Direction;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.util.math.vector.Vector3d;
|
||||||
import net.minecraft.world.IBlockDisplayReader;
|
import net.minecraft.world.IBlockDisplayReader;
|
||||||
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
|
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||||
import net.minecraftforge.common.util.Constants.NBT;
|
import net.minecraftforge.common.util.Constants.NBT;
|
||||||
import net.minecraftforge.fluids.FluidStack;
|
import net.minecraftforge.fluids.FluidStack;
|
||||||
import net.minecraftforge.fluids.capability.IFluidHandler;
|
import net.minecraftforge.fluids.capability.IFluidHandler;
|
||||||
import net.minecraftforge.fluids.capability.IFluidHandler.FluidAction;
|
import net.minecraftforge.fluids.capability.IFluidHandler.FluidAction;
|
||||||
|
import net.minecraftforge.fml.DistExecutor;
|
||||||
|
|
||||||
public class PumpTileEntity extends KineticTileEntity {
|
public class PumpTileEntity extends KineticTileEntity {
|
||||||
|
|
||||||
|
@ -70,6 +77,7 @@ public class PumpTileEntity extends KineticTileEntity {
|
||||||
if (world.isRemote) {
|
if (world.isRemote) {
|
||||||
if (speed == 0)
|
if (speed == 0)
|
||||||
return;
|
return;
|
||||||
|
spawnParticles();
|
||||||
arrowDirection.chase(speed >= 0 ? 1 : -1, .5f, Chaser.EXP);
|
arrowDirection.chase(speed >= 0 ? 1 : -1, .5f, Chaser.EXP);
|
||||||
arrowDirection.tickChaser();
|
arrowDirection.tickChaser();
|
||||||
return;
|
return;
|
||||||
|
@ -279,6 +287,14 @@ public class PumpTileEntity extends KineticTileEntity {
|
||||||
return isFront;
|
return isFront;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
protected Direction getFront() {
|
||||||
|
BlockState blockState = getBlockState();
|
||||||
|
if (!(blockState.getBlock() instanceof PumpBlock))
|
||||||
|
return null;
|
||||||
|
return blockState.get(PumpBlock.FACING);
|
||||||
|
}
|
||||||
|
|
||||||
protected void updatePipeNetwork(boolean front) {
|
protected void updatePipeNetwork(boolean front) {
|
||||||
if (networks != null)
|
if (networks != null)
|
||||||
networks.get(front)
|
networks.get(front)
|
||||||
|
@ -301,6 +317,44 @@ public class PumpTileEntity extends KineticTileEntity {
|
||||||
return front == reversed;
|
return front == reversed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void spawnParticles() {
|
||||||
|
DistExecutor.runWhenOn(Dist.CLIENT, () -> this::spawnParticlesInner);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OnlyIn(Dist.CLIENT)
|
||||||
|
private void spawnParticlesInner() {
|
||||||
|
if (!FluidPipeBehaviour.isRenderEntityWithinDistance(pos))
|
||||||
|
return;
|
||||||
|
for (boolean front : Iterate.trueAndFalse) {
|
||||||
|
Direction side = getFront();
|
||||||
|
if (side == null)
|
||||||
|
return;
|
||||||
|
if (!front)
|
||||||
|
side = side.getOpposite();
|
||||||
|
if (!FluidPropagator.isOpenEnd(world, pos, side))
|
||||||
|
continue;
|
||||||
|
BlockFace key = new BlockFace(pos, side);
|
||||||
|
Map<BlockFace, OpenEndedPipe> map = openEnds.get(front);
|
||||||
|
if (map.containsKey(key)) {
|
||||||
|
FluidStack fluidStack = map.get(key)
|
||||||
|
.getCapability()
|
||||||
|
.map(fh -> fh.getFluidInTank(0))
|
||||||
|
.orElse(FluidStack.EMPTY);
|
||||||
|
if (!fluidStack.isEmpty())
|
||||||
|
spawnPouringLiquid(fluidStack, side, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@OnlyIn(Dist.CLIENT)
|
||||||
|
private void spawnPouringLiquid(FluidStack fluid, Direction side, int amount) {
|
||||||
|
IParticleData particle = FluidFX.getFluidParticle(fluid);
|
||||||
|
float rimRadius = 1 / 4f + 1 / 64f;
|
||||||
|
boolean inbound = isPullingOnSide(getFront() == side);
|
||||||
|
Vector3d directionVec = Vector3d.of(side.getDirectionVec());
|
||||||
|
FluidFX.spawnPouringLiquid(world, pos, amount, particle, rimRadius, directionVec, inbound);
|
||||||
|
}
|
||||||
|
|
||||||
public Map<BlockFace, OpenEndedPipe> getOpenEnds(Direction side) {
|
public Map<BlockFace, OpenEndedPipe> getOpenEnds(Direction side) {
|
||||||
return openEnds.get(isFront(side));
|
return openEnds.get(isFront(side));
|
||||||
}
|
}
|
||||||
|
|
|
@ -249,7 +249,7 @@ public class FluidDrainingBehaviour extends FluidManipulationBehaviour {
|
||||||
|
|
||||||
World world = getWorld();
|
World world = getWorld();
|
||||||
int maxBlocks = maxBlocks();
|
int maxBlocks = maxBlocks();
|
||||||
if (visited.size() > maxBlocks) {
|
if (visited.size() > maxBlocks && maxBlocks != -1) {
|
||||||
infinite = true;
|
infinite = true;
|
||||||
// Find first block with valid fluid
|
// Find first block with valid fluid
|
||||||
while (true) {
|
while (true) {
|
||||||
|
@ -280,10 +280,9 @@ public class FluidDrainingBehaviour extends FluidManipulationBehaviour {
|
||||||
search(fluid, validationFrontier, validationVisited, (e, d) -> newValidationSet.add(e), false);
|
search(fluid, validationFrontier, validationVisited, (e, d) -> newValidationSet.add(e), false);
|
||||||
|
|
||||||
int maxBlocks = maxBlocks();
|
int maxBlocks = maxBlocks();
|
||||||
if (validationVisited.size() > maxBlocks) {
|
if (validationVisited.size() > maxBlocks && maxBlocks != -1) {
|
||||||
if (!infinite) {
|
if (!infinite)
|
||||||
reset();
|
reset();
|
||||||
}
|
|
||||||
validationFrontier.clear();
|
validationFrontier.clear();
|
||||||
setLongValidationTimer();
|
setLongValidationTimer();
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -12,16 +12,26 @@ import com.simibubi.create.foundation.utility.Iterate;
|
||||||
|
|
||||||
import it.unimi.dsi.fastutil.PriorityQueue;
|
import it.unimi.dsi.fastutil.PriorityQueue;
|
||||||
import it.unimi.dsi.fastutil.objects.ObjectHeapPriorityQueue;
|
import it.unimi.dsi.fastutil.objects.ObjectHeapPriorityQueue;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.block.Blocks;
|
||||||
|
import net.minecraft.block.DoorBlock;
|
||||||
import net.minecraft.block.FlowingFluidBlock;
|
import net.minecraft.block.FlowingFluidBlock;
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.fluid.Fluid;
|
import net.minecraft.fluid.Fluid;
|
||||||
import net.minecraft.fluid.FluidState;
|
import net.minecraft.fluid.FluidState;
|
||||||
import net.minecraft.fluid.Fluids;
|
import net.minecraft.fluid.Fluids;
|
||||||
import net.minecraft.state.properties.BlockStateProperties;
|
import net.minecraft.state.properties.BlockStateProperties;
|
||||||
|
import net.minecraft.tags.BlockTags;
|
||||||
|
import net.minecraft.tags.FluidTags;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.Direction;
|
import net.minecraft.util.Direction;
|
||||||
|
import net.minecraft.util.SoundCategory;
|
||||||
|
import net.minecraft.util.SoundEvents;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.math.MutableBoundingBox;
|
import net.minecraft.util.math.MutableBoundingBox;
|
||||||
import net.minecraft.util.math.shapes.ISelectionContext;
|
import net.minecraft.util.math.shapes.ISelectionContext;
|
||||||
|
import net.minecraft.world.IBlockReader;
|
||||||
import net.minecraft.world.ITickList;
|
import net.minecraft.world.ITickList;
|
||||||
import net.minecraft.world.NextTickListEntry;
|
import net.minecraft.world.NextTickListEntry;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
@ -60,7 +70,7 @@ public class FluidFillingBehaviour extends FluidManipulationBehaviour {
|
||||||
(p, d) -> infinityCheckFrontier.add(new BlockPosEntry(p, d)), true);
|
(p, d) -> infinityCheckFrontier.add(new BlockPosEntry(p, d)), true);
|
||||||
int maxBlocks = maxBlocks();
|
int maxBlocks = maxBlocks();
|
||||||
|
|
||||||
if (infinityCheckVisited.size() > maxBlocks) {
|
if (infinityCheckVisited.size() > maxBlocks && maxBlocks != -1) {
|
||||||
if (!infinite) {
|
if (!infinite) {
|
||||||
reset();
|
reset();
|
||||||
infinite = true;
|
infinite = true;
|
||||||
|
@ -111,16 +121,25 @@ public class FluidFillingBehaviour extends FluidManipulationBehaviour {
|
||||||
int maxRange = maxRange();
|
int maxRange = maxRange();
|
||||||
int maxRangeSq = maxRange * maxRange;
|
int maxRangeSq = maxRange * maxRange;
|
||||||
int maxBlocks = maxBlocks();
|
int maxBlocks = maxBlocks();
|
||||||
|
boolean evaporate = world.getDimension()
|
||||||
|
.isUltrawarm() && fluid.isIn(FluidTags.WATER);
|
||||||
|
|
||||||
if (infinite) {
|
if (infinite || evaporate) {
|
||||||
FluidState fluidState = world.getFluidState(rootPos);
|
FluidState fluidState = world.getFluidState(rootPos);
|
||||||
boolean equivalentTo = fluidState.getFluid()
|
boolean equivalentTo = fluidState.getFluid()
|
||||||
.isEquivalentTo(fluid);
|
.isEquivalentTo(fluid);
|
||||||
if (!equivalentTo)
|
if (!equivalentTo && !evaporate)
|
||||||
return false;
|
return false;
|
||||||
if (simulate)
|
if (simulate)
|
||||||
return true;
|
return true;
|
||||||
playEffect(world, BlockPos.ZERO, fluid, false);
|
playEffect(world, null, fluid, false);
|
||||||
|
if (evaporate) {
|
||||||
|
int i = root.getX();
|
||||||
|
int j = root.getY();
|
||||||
|
int k = root.getZ();
|
||||||
|
world.playSound(null, i, j, k, SoundEvents.BLOCK_FIRE_EXTINGUISH, SoundCategory.BLOCKS, 0.5F,
|
||||||
|
2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -137,7 +156,7 @@ public class FluidFillingBehaviour extends FluidManipulationBehaviour {
|
||||||
if (!simulate)
|
if (!simulate)
|
||||||
visited.add(currentPos);
|
visited.add(currentPos);
|
||||||
|
|
||||||
if (visited.size() >= maxBlocks) {
|
if (visited.size() >= maxBlocks && maxBlocks != -1) {
|
||||||
infinite = true;
|
infinite = true;
|
||||||
visited.clear();
|
visited.clear();
|
||||||
queue.clear();
|
queue.clear();
|
||||||
|
@ -154,9 +173,10 @@ public class FluidFillingBehaviour extends FluidManipulationBehaviour {
|
||||||
|
|
||||||
BlockState blockState = world.getBlockState(currentPos);
|
BlockState blockState = world.getBlockState(currentPos);
|
||||||
if (blockState.contains(BlockStateProperties.WATERLOGGED) && fluid.isEquivalentTo(Fluids.WATER)) {
|
if (blockState.contains(BlockStateProperties.WATERLOGGED) && fluid.isEquivalentTo(Fluids.WATER)) {
|
||||||
world.setBlockState(currentPos, blockState.with(BlockStateProperties.WATERLOGGED, true),
|
world.setBlockState(currentPos,
|
||||||
2 | 16);
|
updatePostWaterlogging(blockState.with(BlockStateProperties.WATERLOGGED, true)), 2 | 16);
|
||||||
} else {
|
} else {
|
||||||
|
replaceBlock(world, currentPos, blockState);
|
||||||
world.setBlockState(currentPos, fluid.getDefaultState()
|
world.setBlockState(currentPos, fluid.getDefaultState()
|
||||||
.getBlockState(), 2 | 16);
|
.getBlockState(), 2 | 16);
|
||||||
}
|
}
|
||||||
|
@ -237,8 +257,36 @@ public class FluidFillingBehaviour extends FluidManipulationBehaviour {
|
||||||
.isEmpty())
|
.isEmpty())
|
||||||
return toFill.isEquivalentTo(fluidState.getFluid()) ? SpaceType.FILLED : SpaceType.BLOCKING;
|
return toFill.isEquivalentTo(fluidState.getFluid()) ? SpaceType.FILLED : SpaceType.BLOCKING;
|
||||||
|
|
||||||
return blockState.getMaterial()
|
return canBeReplacedByFluid(world, pos, blockState) ? SpaceType.FILLABLE : SpaceType.BLOCKING;
|
||||||
.isReplaceable() ? SpaceType.FILLABLE : SpaceType.BLOCKING;
|
}
|
||||||
|
|
||||||
|
protected void replaceBlock(World world, BlockPos pos, BlockState state) {
|
||||||
|
TileEntity tileentity = state.getBlock()
|
||||||
|
.hasTileEntity(state) ? world.getTileEntity(pos) : null;
|
||||||
|
Block.spawnDrops(state, world, pos, tileentity);
|
||||||
|
}
|
||||||
|
|
||||||
|
// From FlowingFluidBlock#isBlocked
|
||||||
|
protected boolean canBeReplacedByFluid(IBlockReader world, BlockPos pos, BlockState state) {
|
||||||
|
Block block = state.getBlock();
|
||||||
|
if (!(block instanceof DoorBlock) && !block.isIn(BlockTags.SIGNS) && block != Blocks.LADDER
|
||||||
|
&& block != Blocks.SUGAR_CANE && block != Blocks.BUBBLE_COLUMN) {
|
||||||
|
Material material = state.getMaterial();
|
||||||
|
if (material != Material.PORTAL && material != Material.STRUCTURE_VOID && material != Material.OCEAN_PLANT
|
||||||
|
&& material != Material.SEA_GRASS) {
|
||||||
|
return !material.blocksMovement();
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected BlockState updatePostWaterlogging(BlockState state) {
|
||||||
|
if (state.contains(BlockStateProperties.LIT))
|
||||||
|
state = state.with(BlockStateProperties.LIT, false);
|
||||||
|
return state;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -6,6 +6,7 @@ import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.function.BiConsumer;
|
import java.util.function.BiConsumer;
|
||||||
|
|
||||||
|
import com.simibubi.create.foundation.config.AllConfigs;
|
||||||
import com.simibubi.create.foundation.fluid.FluidHelper;
|
import com.simibubi.create.foundation.fluid.FluidHelper;
|
||||||
import com.simibubi.create.foundation.networking.AllPackets;
|
import com.simibubi.create.foundation.networking.AllPackets;
|
||||||
import com.simibubi.create.foundation.tileEntity.SmartTileEntity;
|
import com.simibubi.create.foundation.tileEntity.SmartTileEntity;
|
||||||
|
@ -76,11 +77,11 @@ public abstract class FluidManipulationBehaviour extends TileEntityBehaviour {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected int maxRange() {
|
protected int maxRange() {
|
||||||
return 128;
|
return AllConfigs.SERVER.fluids.hosePulleyRange.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected int maxBlocks() {
|
protected int maxBlocks() {
|
||||||
return 10000;
|
return AllConfigs.SERVER.fluids.hosePulleyBlockThreshold.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void reset() {
|
public void reset() {
|
||||||
|
@ -135,7 +136,8 @@ public abstract class FluidManipulationBehaviour extends TileEntityBehaviour {
|
||||||
int maxRangeSq = maxRange * maxRange;
|
int maxRangeSq = maxRange * maxRange;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < searchedPerTick && !frontier.isEmpty() && visited.size() <= maxBlocks; i++) {
|
for (i = 0; i < searchedPerTick && !frontier.isEmpty()
|
||||||
|
&& (visited.size() <= maxBlocks || maxBlocks == -1); i++) {
|
||||||
BlockPosEntry entry = frontier.remove(0);
|
BlockPosEntry entry = frontier.remove(0);
|
||||||
BlockPos currentPos = entry.pos;
|
BlockPos currentPos = entry.pos;
|
||||||
if (visited.contains(currentPos))
|
if (visited.contains(currentPos))
|
||||||
|
@ -178,7 +180,7 @@ public abstract class FluidManipulationBehaviour extends TileEntityBehaviour {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void playEffect(World world, BlockPos pos, Fluid fluid, boolean fillSound) {
|
protected void playEffect(World world, BlockPos pos, Fluid fluid, boolean fillSound) {
|
||||||
BlockPos splooshPos = infinite ? tileEntity.getPos() : pos;
|
BlockPos splooshPos = pos == null ? tileEntity.getPos() : pos;
|
||||||
|
|
||||||
SoundEvent soundevent = fillSound ? fluid.getAttributes()
|
SoundEvent soundevent = fillSound ? fluid.getAttributes()
|
||||||
.getFillSound()
|
.getFillSound()
|
||||||
|
|
|
@ -4,6 +4,7 @@ import java.util.function.Supplier;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
|
import com.simibubi.create.foundation.fluid.FluidHelper;
|
||||||
import com.simibubi.create.foundation.fluid.SmartFluidTank;
|
import com.simibubi.create.foundation.fluid.SmartFluidTank;
|
||||||
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
@ -18,6 +19,8 @@ public class HosePulleyFluidHandler implements IFluidHandler {
|
||||||
public int fill(FluidStack resource, FluidAction action) {
|
public int fill(FluidStack resource, FluidAction action) {
|
||||||
if (!internalTank.isEmpty() && !resource.isFluidEqual(internalTank.getFluid()))
|
if (!internalTank.isEmpty() && !resource.isFluidEqual(internalTank.getFluid()))
|
||||||
return 0;
|
return 0;
|
||||||
|
if (resource.isEmpty() || !FluidHelper.hasBlockState(resource.getFluid()))
|
||||||
|
return 0;
|
||||||
|
|
||||||
int diff = resource.getAmount();
|
int diff = resource.getAmount();
|
||||||
int totalAmountAfterFill = diff + internalTank.getFluidAmount();
|
int totalAmountAfterFill = diff + internalTank.getFluidAmount();
|
||||||
|
|
|
@ -2,6 +2,7 @@ package com.simibubi.create.content.contraptions.fluids.actors;
|
||||||
|
|
||||||
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.wrench.IWrenchable;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
|
@ -11,7 +12,7 @@ import net.minecraft.util.math.shapes.ISelectionContext;
|
||||||
import net.minecraft.util.math.shapes.VoxelShape;
|
import net.minecraft.util.math.shapes.VoxelShape;
|
||||||
import net.minecraft.world.IBlockReader;
|
import net.minecraft.world.IBlockReader;
|
||||||
|
|
||||||
public class SpoutBlock extends Block {
|
public class SpoutBlock extends Block implements IWrenchable {
|
||||||
|
|
||||||
public SpoutBlock(Properties p_i48440_1_) {
|
public SpoutBlock(Properties p_i48440_1_) {
|
||||||
super(p_i48440_1_);
|
super(p_i48440_1_);
|
||||||
|
|
|
@ -0,0 +1,100 @@
|
||||||
|
package com.simibubi.create.content.contraptions.fluids.particle;
|
||||||
|
|
||||||
|
import com.mojang.blaze3d.vertex.IVertexBuilder;
|
||||||
|
import com.simibubi.create.AllBlocks;
|
||||||
|
import com.simibubi.create.content.contraptions.processing.BasinTileEntity;
|
||||||
|
import com.simibubi.create.foundation.utility.VecHelper;
|
||||||
|
|
||||||
|
import net.minecraft.client.renderer.ActiveRenderInfo;
|
||||||
|
import net.minecraft.client.renderer.Quaternion;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.util.math.MathHelper;
|
||||||
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.fluids.FluidStack;
|
||||||
|
|
||||||
|
public class BasinFluidParticle extends FluidStackParticle {
|
||||||
|
|
||||||
|
BlockPos basinPos;
|
||||||
|
Vec3d targetPos;
|
||||||
|
Vec3d centerOfBasin;
|
||||||
|
float yOffset;
|
||||||
|
|
||||||
|
public BasinFluidParticle(World world, FluidStack fluid, double x, double y, double z, double vx, double vy,
|
||||||
|
double vz) {
|
||||||
|
super(world, fluid, x, y, z, vx, vy, vz);
|
||||||
|
particleGravity = 0;
|
||||||
|
motionX = 0;
|
||||||
|
motionY = 0;
|
||||||
|
motionZ = 0;
|
||||||
|
yOffset = world.rand.nextFloat() * 1 / 32f;
|
||||||
|
posY += yOffset;
|
||||||
|
particleScale = 0;
|
||||||
|
maxAge = 60;
|
||||||
|
Vec3d currentPos = new Vec3d(posX, posY, posZ);
|
||||||
|
basinPos = new BlockPos(currentPos);
|
||||||
|
centerOfBasin = VecHelper.getCenterOf(basinPos);
|
||||||
|
|
||||||
|
if (vx != 0) {
|
||||||
|
maxAge = 20;
|
||||||
|
Vec3d centerOf = VecHelper.getCenterOf(basinPos);
|
||||||
|
Vec3d diff = currentPos.subtract(centerOf)
|
||||||
|
.mul(1, 0, 1)
|
||||||
|
.normalize()
|
||||||
|
.scale(.375);
|
||||||
|
targetPos = centerOf.add(diff);
|
||||||
|
prevPosX = posX = centerOfBasin.x;
|
||||||
|
prevPosZ = posZ = centerOfBasin.z;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void tick() {
|
||||||
|
super.tick();
|
||||||
|
particleScale = targetPos != null ? Math.max(1 / 32f, ((1f * age) / maxAge) / 8)
|
||||||
|
: 1 / 8f * (1 - ((Math.abs(age - (maxAge / 2)) / (1f * maxAge))));
|
||||||
|
|
||||||
|
if (age % 2 == 0) {
|
||||||
|
if (!AllBlocks.BASIN.has(world.getBlockState(basinPos))) {
|
||||||
|
setExpired();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
TileEntity tileEntity = world.getTileEntity(basinPos);
|
||||||
|
if (tileEntity instanceof BasinTileEntity) {
|
||||||
|
float totalUnits = ((BasinTileEntity) tileEntity).getTotalFluidUnits();
|
||||||
|
if (totalUnits < 1)
|
||||||
|
totalUnits = 0;
|
||||||
|
float fluidLevel = MathHelper.clamp(totalUnits / 2000, 0, 1);
|
||||||
|
posY = 2 / 16f + basinPos.getY() + 12 / 16f * fluidLevel + yOffset;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (targetPos != null) {
|
||||||
|
float progess = (1f * age) / maxAge;
|
||||||
|
Vec3d currentPos = centerOfBasin.add(targetPos.subtract(centerOfBasin)
|
||||||
|
.scale(progess));
|
||||||
|
posX = currentPos.x;
|
||||||
|
posZ = currentPos.z;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void buildGeometry(IVertexBuilder vb, ActiveRenderInfo info, float pt) {
|
||||||
|
Quaternion rotation = info.getRotation();
|
||||||
|
Quaternion prevRotation = new Quaternion(rotation);
|
||||||
|
rotation.set(1, 0, 0, 1);
|
||||||
|
rotation.normalize();
|
||||||
|
super.buildGeometry(vb, info, pt);
|
||||||
|
rotation.set(0, 0, 0, 1);
|
||||||
|
rotation.multiply(prevRotation);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean canEvaporate() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,72 @@
|
||||||
|
package com.simibubi.create.content.contraptions.fluids.particle;
|
||||||
|
|
||||||
|
import com.mojang.brigadier.StringReader;
|
||||||
|
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||||
|
import com.simibubi.create.content.contraptions.particle.ICustomParticleData;
|
||||||
|
|
||||||
|
import net.minecraft.client.particle.IParticleFactory;
|
||||||
|
import net.minecraft.fluid.Fluids;
|
||||||
|
import net.minecraft.network.PacketBuffer;
|
||||||
|
import net.minecraft.particles.IParticleData;
|
||||||
|
import net.minecraft.particles.ParticleType;
|
||||||
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
|
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||||
|
import net.minecraftforge.fluids.FluidStack;
|
||||||
|
import net.minecraftforge.registries.ForgeRegistries;
|
||||||
|
|
||||||
|
public class FluidParticleData implements IParticleData, ICustomParticleData<FluidParticleData> {
|
||||||
|
|
||||||
|
private ParticleType<FluidParticleData> type;
|
||||||
|
private FluidStack fluid;
|
||||||
|
|
||||||
|
public FluidParticleData() {}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public FluidParticleData(ParticleType<?> type, FluidStack fluid) {
|
||||||
|
this.type = (ParticleType<FluidParticleData>) type;
|
||||||
|
this.fluid = fluid;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@OnlyIn(Dist.CLIENT)
|
||||||
|
public IParticleFactory<FluidParticleData> getFactory() {
|
||||||
|
return (data, world, x, y, z, vx, vy, vz) -> FluidStackParticle.create(data.type, world, data.fluid, x, y, z,
|
||||||
|
vx, vy, vz);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ParticleType<?> getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void write(PacketBuffer buffer) {
|
||||||
|
buffer.writeFluidStack(fluid);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getParameters() {
|
||||||
|
return ForgeRegistries.PARTICLE_TYPES.getKey(type) + " " + fluid.getFluid()
|
||||||
|
.getRegistryName();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final IParticleData.IDeserializer<FluidParticleData> DESERIALIZER =
|
||||||
|
new IParticleData.IDeserializer<FluidParticleData>() {
|
||||||
|
|
||||||
|
// TODO Fluid particles on command
|
||||||
|
public FluidParticleData deserialize(ParticleType<FluidParticleData> particleTypeIn, StringReader reader)
|
||||||
|
throws CommandSyntaxException {
|
||||||
|
return new FluidParticleData(particleTypeIn, new FluidStack(Fluids.WATER, 1));
|
||||||
|
}
|
||||||
|
|
||||||
|
public FluidParticleData read(ParticleType<FluidParticleData> particleTypeIn, PacketBuffer buffer) {
|
||||||
|
return new FluidParticleData(particleTypeIn, buffer.readFluidStack());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IDeserializer<FluidParticleData> getDeserializer() {
|
||||||
|
return DESERIALIZER;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,116 @@
|
||||||
|
package com.simibubi.create.content.contraptions.fluids.particle;
|
||||||
|
|
||||||
|
import com.simibubi.create.AllParticleTypes;
|
||||||
|
import com.simibubi.create.content.contraptions.fluids.potion.PotionFluid;
|
||||||
|
import com.simibubi.create.foundation.utility.ColorHelper;
|
||||||
|
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.client.particle.IParticleRenderType;
|
||||||
|
import net.minecraft.client.particle.SpriteTexturedParticle;
|
||||||
|
import net.minecraft.inventory.container.PlayerContainer;
|
||||||
|
import net.minecraft.particles.ParticleType;
|
||||||
|
import net.minecraft.particles.ParticleTypes;
|
||||||
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.fluids.FluidStack;
|
||||||
|
|
||||||
|
public class FluidStackParticle extends SpriteTexturedParticle {
|
||||||
|
private final float field_217587_G;
|
||||||
|
private final float field_217588_H;
|
||||||
|
private FluidStack fluid;
|
||||||
|
|
||||||
|
public static FluidStackParticle create(ParticleType<FluidParticleData> type, World world, FluidStack fluid, double x,
|
||||||
|
double y, double z, double vx, double vy, double vz) {
|
||||||
|
if (type == AllParticleTypes.BASIN_FLUID.get())
|
||||||
|
return new BasinFluidParticle(world, fluid, x, y, z, vx, vy, vz);
|
||||||
|
return new FluidStackParticle(world, fluid, x, y, z, vx, vy, vz);
|
||||||
|
}
|
||||||
|
|
||||||
|
public FluidStackParticle(World world, FluidStack fluid, double x, double y, double z, double vx, double vy,
|
||||||
|
double vz) {
|
||||||
|
super(world, x, y, z, vx, vy, vz);
|
||||||
|
this.fluid = fluid;
|
||||||
|
this.setSprite(Minecraft.getInstance()
|
||||||
|
.getSpriteAtlas(PlayerContainer.BLOCK_ATLAS_TEXTURE)
|
||||||
|
.apply(fluid.getFluid()
|
||||||
|
.getAttributes()
|
||||||
|
.getStillTexture()));
|
||||||
|
|
||||||
|
this.particleGravity = 1.0F;
|
||||||
|
this.particleRed = 0.8F;
|
||||||
|
this.particleGreen = 0.8F;
|
||||||
|
this.particleBlue = 0.8F;
|
||||||
|
this.multiplyColor(fluid.getFluid()
|
||||||
|
.getAttributes()
|
||||||
|
.getColor(fluid));
|
||||||
|
|
||||||
|
this.motionX = vx;
|
||||||
|
this.motionY = vy;
|
||||||
|
this.motionZ = vz;
|
||||||
|
|
||||||
|
this.particleScale /= 2.0F;
|
||||||
|
this.field_217587_G = this.rand.nextFloat() * 3.0F;
|
||||||
|
this.field_217588_H = this.rand.nextFloat() * 3.0F;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getBrightnessForRender(float p_189214_1_) {
|
||||||
|
int brightnessForRender = super.getBrightnessForRender(p_189214_1_);
|
||||||
|
int skyLight = brightnessForRender >> 20;
|
||||||
|
int blockLight = (brightnessForRender >> 4) & 0xf;
|
||||||
|
blockLight = Math.max(blockLight, fluid.getFluid()
|
||||||
|
.getAttributes()
|
||||||
|
.getLuminosity(fluid));
|
||||||
|
return (skyLight << 20) | (blockLight << 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void multiplyColor(int color) {
|
||||||
|
this.particleRed *= (float) (color >> 16 & 255) / 255.0F;
|
||||||
|
this.particleGreen *= (float) (color >> 8 & 255) / 255.0F;
|
||||||
|
this.particleBlue *= (float) (color & 255) / 255.0F;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected float getMinU() {
|
||||||
|
return this.sprite.getInterpolatedU((double) ((this.field_217587_G + 1.0F) / 4.0F * 16.0F));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected float getMaxU() {
|
||||||
|
return this.sprite.getInterpolatedU((double) (this.field_217587_G / 4.0F * 16.0F));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected float getMinV() {
|
||||||
|
return this.sprite.getInterpolatedV((double) (this.field_217588_H / 4.0F * 16.0F));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected float getMaxV() {
|
||||||
|
return this.sprite.getInterpolatedV((double) ((this.field_217588_H + 1.0F) / 4.0F * 16.0F));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void tick() {
|
||||||
|
super.tick();
|
||||||
|
if (!canEvaporate())
|
||||||
|
return;
|
||||||
|
if (onGround)
|
||||||
|
setExpired();
|
||||||
|
if (!isExpired)
|
||||||
|
return;
|
||||||
|
if (!onGround && world.rand.nextFloat() < 1 / 8f)
|
||||||
|
return;
|
||||||
|
|
||||||
|
Vec3d rgb = ColorHelper.getRGB(fluid.getFluid()
|
||||||
|
.getAttributes()
|
||||||
|
.getColor(fluid));
|
||||||
|
world.addParticle(ParticleTypes.ENTITY_EFFECT, posX, posY, posZ, rgb.x, rgb.y, rgb.z);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected boolean canEvaporate() {
|
||||||
|
return fluid.getFluid() instanceof PotionFluid;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IParticleRenderType getRenderType() {
|
||||||
|
return IParticleRenderType.TERRAIN_SHEET;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,15 +1,19 @@
|
||||||
package com.simibubi.create.content.contraptions.fluids.pipes;
|
package com.simibubi.create.content.contraptions.fluids.pipes;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Optional;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import com.simibubi.create.AllBlocks;
|
import com.simibubi.create.AllBlocks;
|
||||||
import com.simibubi.create.AllShapes;
|
import com.simibubi.create.AllShapes;
|
||||||
|
import com.simibubi.create.content.contraptions.fluids.FluidPipeAttachmentBehaviour;
|
||||||
import com.simibubi.create.content.contraptions.fluids.FluidPropagator;
|
import com.simibubi.create.content.contraptions.fluids.FluidPropagator;
|
||||||
import com.simibubi.create.content.contraptions.wrench.IWrenchable;
|
import com.simibubi.create.content.contraptions.wrench.IWrenchableWithBracket;
|
||||||
|
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.block.Blocks;
|
||||||
import net.minecraft.block.RotatedPillarBlock;
|
import net.minecraft.block.RotatedPillarBlock;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
@ -28,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 AxisPipeBlock extends RotatedPillarBlock implements IWrenchable, IAxisPipe {
|
public class AxisPipeBlock extends RotatedPillarBlock implements IWrenchableWithBracket, IAxisPipe {
|
||||||
|
|
||||||
public AxisPipeBlock(Properties p_i48339_1_) {
|
public AxisPipeBlock(Properties p_i48339_1_) {
|
||||||
super(p_i48339_1_);
|
super(p_i48339_1_);
|
||||||
|
@ -39,6 +43,8 @@ public class AxisPipeBlock extends RotatedPillarBlock implements IWrenchable, IA
|
||||||
boolean blockTypeChanged = state.getBlock() != newState.getBlock();
|
boolean blockTypeChanged = state.getBlock() != newState.getBlock();
|
||||||
if (blockTypeChanged && !world.isRemote)
|
if (blockTypeChanged && !world.isRemote)
|
||||||
FluidPropagator.propagateChangedPipe(world, pos, state);
|
FluidPropagator.propagateChangedPipe(world, pos, state);
|
||||||
|
if (state != newState && !isMoving)
|
||||||
|
removeBracket(world, pos).ifPresent(stack -> Block.spawnAsEntity(world, pos, stack));
|
||||||
if (state.hasTileEntity() && (blockTypeChanged || !newState.hasTileEntity()))
|
if (state.hasTileEntity() && (blockTypeChanged || !newState.hasTileEntity()))
|
||||||
world.removeTileEntity(pos);
|
world.removeTileEntity(pos);
|
||||||
}
|
}
|
||||||
|
@ -100,4 +106,16 @@ public class AxisPipeBlock extends RotatedPillarBlock implements IWrenchable, IA
|
||||||
return state.get(AXIS);
|
return state.get(AXIS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Optional<ItemStack> removeBracket(IBlockReader world, BlockPos pos) {
|
||||||
|
FluidPipeAttachmentBehaviour behaviour = TileEntityBehaviour.get(world, pos, FluidPipeAttachmentBehaviour.TYPE);
|
||||||
|
if (behaviour == null)
|
||||||
|
return Optional.empty();
|
||||||
|
BlockState bracket = behaviour.getBracket();
|
||||||
|
behaviour.removeBracket();
|
||||||
|
if (bracket == Blocks.AIR.getDefaultState())
|
||||||
|
return Optional.empty();
|
||||||
|
return Optional.of(new ItemStack(bracket.getBlock()));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,66 @@
|
||||||
|
package com.simibubi.create.content.contraptions.fluids.pipes;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
import com.simibubi.create.content.contraptions.base.DirectionalAxisKineticBlock;
|
||||||
|
import com.simibubi.create.content.contraptions.base.RotatedPillarKineticBlock;
|
||||||
|
import com.simibubi.create.content.contraptions.fluids.FluidPropagator;
|
||||||
|
import com.simibubi.create.content.contraptions.relays.elementary.CogWheelBlock;
|
||||||
|
import com.simibubi.create.content.contraptions.relays.elementary.ShaftBlock;
|
||||||
|
import com.simibubi.create.foundation.block.ProperDirectionalBlock;
|
||||||
|
import com.simibubi.create.foundation.utility.Lang;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.state.BooleanProperty;
|
||||||
|
import net.minecraft.state.EnumProperty;
|
||||||
|
import net.minecraft.state.StateContainer.Builder;
|
||||||
|
import net.minecraft.util.Direction;
|
||||||
|
import net.minecraft.util.Direction.Axis;
|
||||||
|
import net.minecraft.util.IStringSerializable;
|
||||||
|
|
||||||
|
public class BracketBlock extends ProperDirectionalBlock {
|
||||||
|
|
||||||
|
public static final BooleanProperty AXIS_ALONG_FIRST_COORDINATE =
|
||||||
|
DirectionalAxisKineticBlock.AXIS_ALONG_FIRST_COORDINATE;
|
||||||
|
public static final EnumProperty<BracketType> TYPE = EnumProperty.create("type", BracketType.class);
|
||||||
|
|
||||||
|
public static enum BracketType implements IStringSerializable {
|
||||||
|
PIPE, COG, SHAFT;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return Lang.asId(name());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void fillStateContainer(Builder<Block, BlockState> builder) {
|
||||||
|
super.fillStateContainer(builder.add(AXIS_ALONG_FIRST_COORDINATE)
|
||||||
|
.add(TYPE));
|
||||||
|
}
|
||||||
|
|
||||||
|
public BracketBlock(Properties p_i48415_1_) {
|
||||||
|
super(p_i48415_1_);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Optional<BlockState> getSuitableBracket(BlockState blockState, Direction direction) {
|
||||||
|
if (blockState.getBlock() instanceof ShaftBlock)
|
||||||
|
return getSuitableBracket(blockState.get(RotatedPillarKineticBlock.AXIS), direction,
|
||||||
|
blockState.getBlock() instanceof CogWheelBlock ? BracketType.COG : BracketType.SHAFT);
|
||||||
|
return getSuitableBracket(FluidPropagator.getStraightPipeAxis(blockState), direction, BracketType.PIPE);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Optional<BlockState> getSuitableBracket(Axis targetBlockAxis, Direction direction, BracketType type) {
|
||||||
|
Axis axis = direction.getAxis();
|
||||||
|
if (targetBlockAxis == null || targetBlockAxis == axis)
|
||||||
|
return Optional.empty();
|
||||||
|
|
||||||
|
boolean alongFirst = axis != Axis.Z ? targetBlockAxis == Axis.Z : targetBlockAxis == Axis.Y;
|
||||||
|
return Optional.of(getDefaultState().with(TYPE, type)
|
||||||
|
.with(FACING, direction)
|
||||||
|
.with(AXIS_ALONG_FIRST_COORDINATE, !alongFirst));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,73 @@
|
||||||
|
package com.simibubi.create.content.contraptions.fluids.pipes;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
import com.simibubi.create.content.contraptions.fluids.FluidPipeAttachmentBehaviour;
|
||||||
|
import com.simibubi.create.content.contraptions.relays.elementary.BracketedTileEntityBehaviour;
|
||||||
|
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.block.Blocks;
|
||||||
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
import net.minecraft.item.BlockItem;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.item.ItemUseContext;
|
||||||
|
import net.minecraft.util.ActionResultType;
|
||||||
|
import net.minecraft.util.Direction;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class BracketBlockItem extends BlockItem {
|
||||||
|
|
||||||
|
public BracketBlockItem(Block p_i48527_1_, Properties p_i48527_2_) {
|
||||||
|
super(p_i48527_1_, p_i48527_2_);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ActionResultType onItemUse(ItemUseContext context) {
|
||||||
|
World world = context.getWorld();
|
||||||
|
BlockPos pos = context.getPos();
|
||||||
|
BlockState state = world.getBlockState(pos);
|
||||||
|
BracketBlock bracketBlock = getBracketBlock();
|
||||||
|
PlayerEntity player = context.getPlayer();
|
||||||
|
|
||||||
|
BracketedTileEntityBehaviour behaviour = TileEntityBehaviour.get(world, pos, FluidPipeAttachmentBehaviour.TYPE);
|
||||||
|
if (behaviour == null)
|
||||||
|
behaviour = TileEntityBehaviour.get(world, pos, BracketedTileEntityBehaviour.TYPE);
|
||||||
|
|
||||||
|
if (behaviour != null && behaviour.canHaveBracket()) {
|
||||||
|
if (world.isRemote)
|
||||||
|
return ActionResultType.SUCCESS;
|
||||||
|
|
||||||
|
Optional<BlockState> suitableBracket = bracketBlock.getSuitableBracket(state, context.getFace());
|
||||||
|
if (!suitableBracket.isPresent() && player != null)
|
||||||
|
suitableBracket =
|
||||||
|
bracketBlock.getSuitableBracket(state, Direction.getFacingDirections(player)[0].getOpposite());
|
||||||
|
if (!suitableBracket.isPresent())
|
||||||
|
return ActionResultType.SUCCESS;
|
||||||
|
|
||||||
|
BlockState bracket = behaviour.getBracket();
|
||||||
|
behaviour.applyBracket(suitableBracket.get());
|
||||||
|
if (player == null || !player.isCreative()) {
|
||||||
|
context.getItem()
|
||||||
|
.shrink(1);
|
||||||
|
if (bracket != Blocks.AIR.getDefaultState()) {
|
||||||
|
ItemStack returnedStack = new ItemStack(bracket.getBlock());
|
||||||
|
if (player == null)
|
||||||
|
Block.spawnAsEntity(world, pos, returnedStack);
|
||||||
|
else
|
||||||
|
player.inventory.placeItemBackInInventory(world, returnedStack);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ActionResultType.SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ActionResultType.FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
private BracketBlock getBracketBlock() {
|
||||||
|
return (BracketBlock) getBlock();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,52 @@
|
||||||
|
package com.simibubi.create.content.contraptions.fluids.pipes;
|
||||||
|
|
||||||
|
import com.simibubi.create.foundation.data.DirectionalAxisBlockStateGen;
|
||||||
|
import com.tterrag.registrate.builders.ItemBuilder;
|
||||||
|
import com.tterrag.registrate.providers.DataGenContext;
|
||||||
|
import com.tterrag.registrate.providers.RegistrateBlockstateProvider;
|
||||||
|
import com.tterrag.registrate.util.nullness.NonNullFunction;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.item.BlockItem;
|
||||||
|
import net.minecraftforge.client.model.generators.ModelFile;
|
||||||
|
|
||||||
|
public class BracketGenerator extends DirectionalAxisBlockStateGen {
|
||||||
|
|
||||||
|
private String material;
|
||||||
|
|
||||||
|
public BracketGenerator(String material) {
|
||||||
|
this.material = material;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <T extends Block> String getModelPrefix(DataGenContext<Block, T> ctx, RegistrateBlockstateProvider prov,
|
||||||
|
BlockState state) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <T extends Block> ModelFile getModel(DataGenContext<Block, T> ctx, RegistrateBlockstateProvider prov,
|
||||||
|
BlockState state) {
|
||||||
|
String type = state.get(BracketBlock.TYPE)
|
||||||
|
.getName();
|
||||||
|
boolean vertical = state.get(BracketBlock.FACING)
|
||||||
|
.getAxis()
|
||||||
|
.isVertical();
|
||||||
|
|
||||||
|
String path = "block/bracket/" + type + "/" + (vertical ? "ground" : "wall");
|
||||||
|
|
||||||
|
return prov.models()
|
||||||
|
.withExistingParent(path + "_" + material, prov.modLoc(path))
|
||||||
|
.texture("bracket", prov.modLoc("block/bracket_" + material))
|
||||||
|
.texture("plate", prov.modLoc("block/bracket_plate_" + material));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static <I extends BlockItem, P> NonNullFunction<ItemBuilder<I, P>, P> itemModel(String material) {
|
||||||
|
return b -> b.model((c, p) -> p.withExistingParent(c.getName(), p.modLoc("block/bracket/item"))
|
||||||
|
.texture("bracket", p.modLoc("block/bracket_" + material))
|
||||||
|
.texture("plate", p.modLoc("block/bracket_plate_" + material)))
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,5 +1,6 @@
|
||||||
package com.simibubi.create.content.contraptions.fluids.pipes;
|
package com.simibubi.create.content.contraptions.fluids.pipes;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
@ -8,18 +9,20 @@ import com.simibubi.create.AllBlocks;
|
||||||
import com.simibubi.create.AllTileEntities;
|
import com.simibubi.create.AllTileEntities;
|
||||||
import com.simibubi.create.content.contraptions.fluids.FluidPipeAttachmentBehaviour;
|
import com.simibubi.create.content.contraptions.fluids.FluidPipeAttachmentBehaviour;
|
||||||
import com.simibubi.create.content.contraptions.fluids.FluidPropagator;
|
import com.simibubi.create.content.contraptions.fluids.FluidPropagator;
|
||||||
import com.simibubi.create.content.contraptions.wrench.IWrenchable;
|
import com.simibubi.create.content.contraptions.wrench.IWrenchableWithBracket;
|
||||||
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
||||||
import com.simibubi.create.foundation.utility.Iterate;
|
import com.simibubi.create.foundation.utility.Iterate;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.block.Blocks;
|
||||||
import net.minecraft.block.IWaterLoggable;
|
import net.minecraft.block.IWaterLoggable;
|
||||||
import net.minecraft.block.SixWayBlock;
|
import net.minecraft.block.SixWayBlock;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.fluid.FluidState;
|
import net.minecraft.fluid.FluidState;
|
||||||
import net.minecraft.fluid.Fluids;
|
import net.minecraft.fluid.Fluids;
|
||||||
import net.minecraft.item.BlockItemUseContext;
|
import net.minecraft.item.BlockItemUseContext;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.ItemUseContext;
|
import net.minecraft.item.ItemUseContext;
|
||||||
import net.minecraft.network.DebugPacketSender;
|
import net.minecraft.network.DebugPacketSender;
|
||||||
import net.minecraft.state.StateContainer.Builder;
|
import net.minecraft.state.StateContainer.Builder;
|
||||||
|
@ -39,7 +42,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 FluidPipeBlock extends SixWayBlock implements IWaterLoggable, IWrenchable {
|
public class FluidPipeBlock extends SixWayBlock implements IWaterLoggable, IWrenchableWithBracket {
|
||||||
|
|
||||||
public FluidPipeBlock(Properties properties) {
|
public FluidPipeBlock(Properties properties) {
|
||||||
super(4 / 16f, properties);
|
super(4 / 16f, properties);
|
||||||
|
@ -48,6 +51,9 @@ public class FluidPipeBlock extends SixWayBlock implements IWaterLoggable, IWren
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ActionResultType onWrenched(BlockState state, ItemUseContext context) {
|
public ActionResultType onWrenched(BlockState state, ItemUseContext context) {
|
||||||
|
if (tryRemoveBracket(context))
|
||||||
|
return ActionResultType.SUCCESS;
|
||||||
|
|
||||||
World world = context.getWorld();
|
World world = context.getWorld();
|
||||||
BlockPos pos = context.getPos();
|
BlockPos pos = context.getPos();
|
||||||
Axis axis = getAxis(world, pos, state);
|
Axis axis = getAxis(world, pos, state);
|
||||||
|
@ -78,16 +84,7 @@ public class FluidPipeBlock extends SixWayBlock implements IWaterLoggable, IWren
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
private Axis getAxis(IBlockReader world, BlockPos pos, BlockState state) {
|
private Axis getAxis(IBlockReader world, BlockPos pos, BlockState state) {
|
||||||
if (!FluidPropagator.isStraightPipe(state))
|
return FluidPropagator.getStraightPipeAxis(state);
|
||||||
return null;
|
|
||||||
Axis axis = null;
|
|
||||||
for (Direction d : Iterate.directions) {
|
|
||||||
if (isOpenAt(state, d)) {
|
|
||||||
axis = d.getAxis();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return axis;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -105,6 +102,8 @@ public class FluidPipeBlock extends SixWayBlock implements IWaterLoggable, IWren
|
||||||
boolean blockTypeChanged = state.getBlock() != newState.getBlock();
|
boolean blockTypeChanged = state.getBlock() != newState.getBlock();
|
||||||
if (blockTypeChanged && !world.isRemote)
|
if (blockTypeChanged && !world.isRemote)
|
||||||
FluidPropagator.propagateChangedPipe(world, pos, state);
|
FluidPropagator.propagateChangedPipe(world, pos, state);
|
||||||
|
if (state != newState && !isMoving)
|
||||||
|
removeBracket(world, pos).ifPresent(stack -> Block.spawnAsEntity(world, pos, stack));
|
||||||
if (state.hasTileEntity() && (blockTypeChanged || !newState.hasTileEntity()))
|
if (state.hasTileEntity() && (blockTypeChanged || !newState.hasTileEntity()))
|
||||||
world.removeTileEntity(pos);
|
world.removeTileEntity(pos);
|
||||||
}
|
}
|
||||||
|
@ -140,24 +139,31 @@ public class FluidPipeBlock extends SixWayBlock implements IWaterLoggable, IWren
|
||||||
return state.getBlock() instanceof FluidPipeBlock;
|
return state.getBlock() instanceof FluidPipeBlock;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean canConnectTo(IBlockDisplayReader world, BlockPos pos, BlockState neighbour, Direction blockFace) {
|
public static boolean canConnectTo(IBlockDisplayReader world, BlockPos pos, BlockState neighbour,
|
||||||
if (isPipe(neighbour) || FluidPropagator.hasFluidCapability(neighbour, world, pos, blockFace))
|
Direction blockFace) {
|
||||||
|
if (FluidPropagator.hasFluidCapability(neighbour, world, pos, blockFace))
|
||||||
return true;
|
return true;
|
||||||
FluidPipeAttachmentBehaviour attachmentBehaviour =
|
FluidPipeAttachmentBehaviour attachmentBehaviour =
|
||||||
TileEntityBehaviour.get(world, pos, FluidPipeAttachmentBehaviour.TYPE);
|
TileEntityBehaviour.get(world, pos, FluidPipeAttachmentBehaviour.TYPE);
|
||||||
|
if (isPipe(neighbour))
|
||||||
|
return attachmentBehaviour == null || attachmentBehaviour.getBracket() == Blocks.AIR.getDefaultState()
|
||||||
|
|| FluidPropagator.getStraightPipeAxis(neighbour) == blockFace.getAxis();
|
||||||
if (attachmentBehaviour == null)
|
if (attachmentBehaviour == null)
|
||||||
return false;
|
return false;
|
||||||
return attachmentBehaviour.isPipeConnectedTowards(neighbour, blockFace);
|
return attachmentBehaviour.isPipeConnectedTowards(neighbour, blockFace);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean shouldDrawRim(IBlockDisplayReader world, BlockPos pos, BlockState state, Direction direction) {
|
public static boolean shouldDrawRim(IBlockDisplayReader world, BlockPos pos, BlockState state,
|
||||||
|
Direction direction) {
|
||||||
BlockPos offsetPos = pos.offset(direction);
|
BlockPos offsetPos = pos.offset(direction);
|
||||||
BlockState facingState = world.getBlockState(offsetPos);
|
BlockState facingState = world.getBlockState(offsetPos);
|
||||||
if (!isPipe(facingState))
|
if (!isPipe(facingState))
|
||||||
return true;
|
return true;
|
||||||
|
if (!canConnectTo(world, offsetPos, facingState, direction))
|
||||||
|
return true;
|
||||||
if (!isCornerOrEndPipe(world, pos, state))
|
if (!isCornerOrEndPipe(world, pos, state))
|
||||||
return false;
|
return false;
|
||||||
if (FluidPropagator.isStraightPipe(facingState))
|
if (FluidPropagator.getStraightPipeAxis(facingState) != null)
|
||||||
return true;
|
return true;
|
||||||
if (!shouldDrawCasing(world, pos, state) && shouldDrawCasing(world, offsetPos, facingState))
|
if (!shouldDrawCasing(world, pos, state) && shouldDrawCasing(world, offsetPos, facingState))
|
||||||
return true;
|
return true;
|
||||||
|
@ -171,7 +177,8 @@ public class FluidPipeBlock extends SixWayBlock implements IWaterLoggable, IWren
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isCornerOrEndPipe(IBlockDisplayReader world, BlockPos pos, BlockState state) {
|
public static boolean isCornerOrEndPipe(IBlockDisplayReader world, BlockPos pos, BlockState state) {
|
||||||
return isPipe(state) && !FluidPropagator.isStraightPipe(state) && !shouldDrawCasing(world, pos, state);
|
return isPipe(state) && FluidPropagator.getStraightPipeAxis(state) == null
|
||||||
|
&& !shouldDrawCasing(world, pos, state);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean shouldDrawCasing(IBlockDisplayReader world, BlockPos pos, BlockState state) {
|
public static boolean shouldDrawCasing(IBlockDisplayReader world, BlockPos pos, BlockState state) {
|
||||||
|
@ -206,20 +213,28 @@ public class FluidPipeBlock extends SixWayBlock implements IWaterLoggable, IWren
|
||||||
@Override
|
@Override
|
||||||
public BlockState updatePostPlacement(BlockState state, Direction direction, BlockState neighbourState,
|
public BlockState updatePostPlacement(BlockState state, Direction direction, BlockState neighbourState,
|
||||||
IWorld world, BlockPos pos, BlockPos neighbourPos) {
|
IWorld world, BlockPos pos, BlockPos neighbourPos) {
|
||||||
if (state.get(BlockStateProperties.WATERLOGGED)) {
|
if (state.get(BlockStateProperties.WATERLOGGED))
|
||||||
world.getPendingFluidTicks()
|
world.getPendingFluidTicks()
|
||||||
.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickRate(world));
|
.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickRate(world));
|
||||||
}
|
if (isOpenAt(state, direction) && neighbourState.contains(BlockStateProperties.WATERLOGGED))
|
||||||
|
world.getPendingBlockTicks()
|
||||||
|
.scheduleTick(pos, this, 1, TickPriority.HIGH);
|
||||||
return updateBlockState(state, direction, direction.getOpposite(), world, pos);
|
return updateBlockState(state, direction, direction.getOpposite(), world, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
public BlockState updateBlockState(BlockState state, Direction preferredDirection, @Nullable Direction ignore,
|
public BlockState updateBlockState(BlockState state, Direction preferredDirection, @Nullable Direction ignore,
|
||||||
IBlockDisplayReader world, BlockPos pos) {
|
IBlockDisplayReader world, BlockPos pos) {
|
||||||
|
|
||||||
|
FluidPipeAttachmentBehaviour behaviour = TileEntityBehaviour.get(world, pos, FluidPipeAttachmentBehaviour.TYPE);
|
||||||
|
if (behaviour != null && behaviour.getBracket() != Blocks.AIR.getDefaultState())
|
||||||
|
return state;
|
||||||
|
|
||||||
// Update sides that are not ignored
|
// Update sides that are not ignored
|
||||||
for (Direction d : Iterate.directions)
|
for (Direction d : Iterate.directions)
|
||||||
if (d != ignore)
|
if (d != ignore) {
|
||||||
state = state.with(FACING_TO_PROPERTY_MAP.get(d),
|
boolean shouldConnect = canConnectTo(world, pos.offset(d), world.getBlockState(pos.offset(d)), d);
|
||||||
canConnectTo(world, pos.offset(d), world.getBlockState(pos.offset(d)), d));
|
state = state.with(FACING_TO_PROPERTY_MAP.get(d), shouldConnect);
|
||||||
|
}
|
||||||
|
|
||||||
// See if it has enough connections
|
// See if it has enough connections
|
||||||
Direction connectedDirection = null;
|
Direction connectedDirection = null;
|
||||||
|
@ -245,4 +260,16 @@ public class FluidPipeBlock extends SixWayBlock implements IWaterLoggable, IWren
|
||||||
return state.get(BlockStateProperties.WATERLOGGED) ? Fluids.WATER.getStillFluidState(false)
|
return state.get(BlockStateProperties.WATERLOGGED) ? Fluids.WATER.getStillFluidState(false)
|
||||||
: Fluids.EMPTY.getDefaultState();
|
: Fluids.EMPTY.getDefaultState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Optional<ItemStack> removeBracket(IBlockReader world, BlockPos pos) {
|
||||||
|
FluidPipeAttachmentBehaviour behaviour = TileEntityBehaviour.get(world, pos, FluidPipeAttachmentBehaviour.TYPE);
|
||||||
|
if (behaviour == null)
|
||||||
|
return Optional.empty();
|
||||||
|
BlockState bracket = behaviour.getBracket();
|
||||||
|
behaviour.removeBracket();
|
||||||
|
if (bracket == Blocks.AIR.getDefaultState())
|
||||||
|
return Optional.empty();
|
||||||
|
return Optional.of(new ItemStack(bracket.getBlock()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,12 +39,11 @@ public class GlassFluidPipeBlock extends AxisPipeBlock {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ActionResultType onWrenched(BlockState state, ItemUseContext context) {
|
public ActionResultType onWrenched(BlockState state, ItemUseContext context) {
|
||||||
|
if (tryRemoveBracket(context))
|
||||||
|
return ActionResultType.SUCCESS;
|
||||||
BlockState newState = state;
|
BlockState newState = state;
|
||||||
World world = context.getWorld();
|
World world = context.getWorld();
|
||||||
BlockPos pos = context.getPos();
|
BlockPos pos = context.getPos();
|
||||||
// if (!state.get(ALT))
|
|
||||||
// newState = state.with(ALT, true);
|
|
||||||
// else
|
|
||||||
newState = toRegularPipe(world, pos, state);
|
newState = toRegularPipe(world, pos, state);
|
||||||
world.setBlockState(pos, newState, 3);
|
world.setBlockState(pos, newState, 3);
|
||||||
return ActionResultType.SUCCESS;
|
return ActionResultType.SUCCESS;
|
||||||
|
|
|
@ -16,7 +16,7 @@ import net.minecraft.util.math.vector.Vector3i;
|
||||||
import net.minecraftforge.api.distmarker.Dist;
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||||
|
|
||||||
public class AirFlowParticleData implements IParticleData, ICustomParticle<AirFlowParticleData> {
|
public class AirFlowParticleData implements IParticleData, ICustomParticleDataWithSprite<AirFlowParticleData> {
|
||||||
|
|
||||||
public static final Codec<AirFlowParticleData> CODEC = RecordCodecBuilder.create(i ->
|
public static final Codec<AirFlowParticleData> CODEC = RecordCodecBuilder.create(i ->
|
||||||
i.group(
|
i.group(
|
||||||
|
@ -83,13 +83,13 @@ public class AirFlowParticleData implements IParticleData, ICustomParticle<AirFl
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Codec<AirFlowParticleData> getCodec() {
|
public Codec<AirFlowParticleData> getCodec(ParticleType<AirFlowParticleData> type) {
|
||||||
return CODEC;
|
return CODEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@OnlyIn(Dist.CLIENT)
|
@OnlyIn(Dist.CLIENT)
|
||||||
public IParticleMetaFactory<AirFlowParticleData> getFactory() {
|
public IParticleMetaFactory<AirFlowParticleData> getMetaFactory() {
|
||||||
return AirFlowParticle.Factory::new;
|
return AirFlowParticle.Factory::new;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ import net.minecraft.particles.ParticleType;
|
||||||
import net.minecraftforge.api.distmarker.Dist;
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||||
|
|
||||||
public class AirParticleData implements IParticleData, ICustomParticle<AirParticleData> {
|
public class AirParticleData implements IParticleData, ICustomParticleDataWithSprite<AirParticleData> {
|
||||||
|
|
||||||
public static final Codec<AirParticleData> CODEC = RecordCodecBuilder.create(i ->
|
public static final Codec<AirParticleData> CODEC = RecordCodecBuilder.create(i ->
|
||||||
i.group(
|
i.group(
|
||||||
|
@ -79,7 +79,7 @@ public class AirParticleData implements IParticleData, ICustomParticle<AirPartic
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@OnlyIn(Dist.CLIENT)
|
@OnlyIn(Dist.CLIENT)
|
||||||
public IParticleMetaFactory<AirParticleData> getFactory() {
|
public IParticleMetaFactory<AirParticleData> getMetaFactory() {
|
||||||
return AirParticle.Factory::new;
|
return AirParticle.Factory::new;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,14 +8,14 @@ import com.mojang.serialization.Codec;
|
||||||
import com.mojang.serialization.codecs.RecordCodecBuilder;
|
import com.mojang.serialization.codecs.RecordCodecBuilder;
|
||||||
import com.simibubi.create.AllParticleTypes;
|
import com.simibubi.create.AllParticleTypes;
|
||||||
|
|
||||||
import net.minecraft.client.particle.ParticleManager;
|
import net.minecraft.client.particle.IParticleFactory;
|
||||||
import net.minecraft.network.PacketBuffer;
|
import net.minecraft.network.PacketBuffer;
|
||||||
import net.minecraft.particles.IParticleData;
|
import net.minecraft.particles.IParticleData;
|
||||||
import net.minecraft.particles.ParticleType;
|
import net.minecraft.particles.ParticleType;
|
||||||
import net.minecraftforge.api.distmarker.Dist;
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||||
|
|
||||||
public class CubeParticleData implements IParticleData, ICustomParticle<CubeParticleData> {
|
public class CubeParticleData implements IParticleData, ICustomParticleData<CubeParticleData> {
|
||||||
|
|
||||||
public static final Codec<CubeParticleData> CODEC = RecordCodecBuilder.create(i ->
|
public static final Codec<CubeParticleData> CODEC = RecordCodecBuilder.create(i ->
|
||||||
i.group(
|
i.group(
|
||||||
|
@ -67,8 +67,8 @@ public class CubeParticleData implements IParticleData, ICustomParticle<CubePart
|
||||||
this.hot = hot;
|
this.hot = hot;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static CubeParticleData dummy() {
|
public CubeParticleData() {
|
||||||
return new CubeParticleData(0, 0, 0, 0, 0, false);
|
this(0, 0, 0, 0, 0, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -83,8 +83,8 @@ public class CubeParticleData implements IParticleData, ICustomParticle<CubePart
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@OnlyIn(Dist.CLIENT)
|
@OnlyIn(Dist.CLIENT)
|
||||||
public ParticleManager.IParticleMetaFactory<CubeParticleData> getFactory() {
|
public IParticleFactory<CubeParticleData> getFactory() {
|
||||||
return null;
|
return new CubeParticle.Factory();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -20,7 +20,7 @@ import net.minecraftforge.api.distmarker.OnlyIn;
|
||||||
|
|
||||||
@ParametersAreNonnullByDefault
|
@ParametersAreNonnullByDefault
|
||||||
@MethodsReturnNonnullByDefault
|
@MethodsReturnNonnullByDefault
|
||||||
public class HeaterParticleData implements IParticleData, ICustomParticle<HeaterParticleData> {
|
public class HeaterParticleData implements IParticleData, ICustomParticleDataWithSprite<HeaterParticleData> {
|
||||||
|
|
||||||
public static final Codec<HeaterParticleData> CODEC = RecordCodecBuilder.create(i ->
|
public static final Codec<HeaterParticleData> CODEC = RecordCodecBuilder.create(i ->
|
||||||
i.group(
|
i.group(
|
||||||
|
@ -75,7 +75,7 @@ public class HeaterParticleData implements IParticleData, ICustomParticle<Heater
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@OnlyIn(Dist.CLIENT)
|
@OnlyIn(Dist.CLIENT)
|
||||||
public IParticleMetaFactory<HeaterParticleData> getFactory() {
|
public IParticleMetaFactory<HeaterParticleData> getMetaFactory() {
|
||||||
return HeaterParticle.Factory::new;
|
return HeaterParticle.Factory::new;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,30 +2,36 @@ package com.simibubi.create.content.contraptions.particle;
|
||||||
|
|
||||||
import com.mojang.serialization.Codec;
|
import com.mojang.serialization.Codec;
|
||||||
|
|
||||||
import net.minecraft.client.particle.ParticleManager.IParticleMetaFactory;
|
import net.minecraft.client.particle.IParticleFactory;
|
||||||
|
import net.minecraft.client.particle.ParticleManager;
|
||||||
import net.minecraft.particles.IParticleData;
|
import net.minecraft.particles.IParticleData;
|
||||||
import net.minecraft.particles.IParticleData.IDeserializer;
|
import net.minecraft.particles.IParticleData.IDeserializer;
|
||||||
import net.minecraft.particles.ParticleType;
|
import net.minecraft.particles.ParticleType;
|
||||||
import net.minecraftforge.api.distmarker.Dist;
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||||
|
|
||||||
public interface ICustomParticle<T extends IParticleData> {
|
public interface ICustomParticleData<T extends IParticleData> {
|
||||||
|
|
||||||
IDeserializer<T> getDeserializer();
|
IDeserializer<T> getDeserializer();
|
||||||
|
|
||||||
Codec<T> getCodec();
|
Codec<T> getCodec(ParticleType<T> type);
|
||||||
|
|
||||||
public default ParticleType<T> createType() {
|
public default ParticleType<T> createType() {
|
||||||
return new ParticleType<T>(false, getDeserializer()) {
|
return new ParticleType<T>(false, getDeserializer()) {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Codec<T> getCodec() {
|
public Codec<T> getCodec() {
|
||||||
return ICustomParticle.this.getCodec();
|
return ICustomParticleData.this.getCodec(this);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@OnlyIn(Dist.CLIENT)
|
@OnlyIn(Dist.CLIENT)
|
||||||
public IParticleMetaFactory<T> getFactory();
|
public IParticleFactory<T> getFactory();
|
||||||
|
|
||||||
|
@OnlyIn(Dist.CLIENT)
|
||||||
|
public default void register(ParticleType<T> type, ParticleManager particles) {
|
||||||
|
particles.registerFactory(type, getFactory());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -0,0 +1,34 @@
|
||||||
|
package com.simibubi.create.content.contraptions.particle;
|
||||||
|
|
||||||
|
import net.minecraft.client.particle.IParticleFactory;
|
||||||
|
import net.minecraft.client.particle.ParticleManager;
|
||||||
|
import net.minecraft.client.particle.ParticleManager.IParticleMetaFactory;
|
||||||
|
import net.minecraft.particles.IParticleData;
|
||||||
|
import net.minecraft.particles.IParticleData.IDeserializer;
|
||||||
|
import net.minecraft.particles.ParticleType;
|
||||||
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
|
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||||
|
|
||||||
|
public interface ICustomParticleDataWithSprite<T extends IParticleData> extends ICustomParticleData<T> {
|
||||||
|
|
||||||
|
public IDeserializer<T> getDeserializer();
|
||||||
|
|
||||||
|
public default ParticleType<T> createType() {
|
||||||
|
return new ParticleType<T>(false, getDeserializer());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
default IParticleFactory<T> getFactory() {
|
||||||
|
throw new IllegalAccessError("This particle type uses a metaFactory!");
|
||||||
|
}
|
||||||
|
|
||||||
|
@OnlyIn(Dist.CLIENT)
|
||||||
|
public IParticleMetaFactory<T> getMetaFactory();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@OnlyIn(Dist.CLIENT)
|
||||||
|
public default void register(ParticleType<T> type, ParticleManager particles) {
|
||||||
|
particles.registerFactory(type, getMetaFactory());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -19,14 +19,14 @@ import net.minecraft.util.Direction.Axis;
|
||||||
import net.minecraftforge.api.distmarker.Dist;
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||||
|
|
||||||
public class RotationIndicatorParticleData implements IParticleData, ICustomParticle<RotationIndicatorParticleData> {
|
public class RotationIndicatorParticleData
|
||||||
|
implements IParticleData, ICustomParticleDataWithSprite<RotationIndicatorParticleData> {
|
||||||
|
|
||||||
// TODO 1.16 make this unnecessary
|
// TODO 1.16 make this unnecessary
|
||||||
public static final PrimitiveCodec<Character> CHAR = new PrimitiveCodec<Character>() {
|
public static final PrimitiveCodec<Character> CHAR = new PrimitiveCodec<Character>() {
|
||||||
@Override
|
@Override
|
||||||
public <T> DataResult<Character> read(final DynamicOps<T> ops, final T input) {
|
public <T> DataResult<Character> read(final DynamicOps<T> ops, final T input) {
|
||||||
return ops
|
return ops.getNumberValue(input)
|
||||||
.getNumberValue(input)
|
|
||||||
.map(n -> (char) n.shortValue());
|
.map(n -> (char) n.shortValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,17 +41,23 @@ public class RotationIndicatorParticleData implements IParticleData, ICustomPart
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
public static final Codec<RotationIndicatorParticleData> CODEC = RecordCodecBuilder.create(i ->
|
public static final Codec<RotationIndicatorParticleData> CODEC = RecordCodecBuilder.create(i -> i
|
||||||
i.group(
|
.group(Codec.INT.fieldOf("color")
|
||||||
Codec.INT.fieldOf("color").forGetter(p -> p.color),
|
.forGetter(p -> p.color),
|
||||||
Codec.FLOAT.fieldOf("speed").forGetter(p -> p.speed),
|
Codec.FLOAT.fieldOf("speed")
|
||||||
Codec.FLOAT.fieldOf("radius1").forGetter(p -> p.radius1),
|
.forGetter(p -> p.speed),
|
||||||
Codec.FLOAT.fieldOf("radius2").forGetter(p -> p.radius2),
|
Codec.FLOAT.fieldOf("radius1")
|
||||||
Codec.INT.fieldOf("lifeSpan").forGetter(p -> p.lifeSpan),
|
.forGetter(p -> p.radius1),
|
||||||
CHAR.fieldOf("axis").forGetter(p -> p.axis))
|
Codec.FLOAT.fieldOf("radius2")
|
||||||
|
.forGetter(p -> p.radius2),
|
||||||
|
Codec.INT.fieldOf("lifeSpan")
|
||||||
|
.forGetter(p -> p.lifeSpan),
|
||||||
|
CHAR.fieldOf("axis")
|
||||||
|
.forGetter(p -> p.axis))
|
||||||
.apply(i, RotationIndicatorParticleData::new));
|
.apply(i, RotationIndicatorParticleData::new));
|
||||||
|
|
||||||
public static final IParticleData.IDeserializer<RotationIndicatorParticleData> DESERIALIZER = new IParticleData.IDeserializer<RotationIndicatorParticleData>() {
|
public static final IParticleData.IDeserializer<RotationIndicatorParticleData> DESERIALIZER =
|
||||||
|
new IParticleData.IDeserializer<RotationIndicatorParticleData>() {
|
||||||
public RotationIndicatorParticleData deserialize(ParticleType<RotationIndicatorParticleData> particleTypeIn,
|
public RotationIndicatorParticleData deserialize(ParticleType<RotationIndicatorParticleData> particleTypeIn,
|
||||||
StringReader reader) throws CommandSyntaxException {
|
StringReader reader) throws CommandSyntaxException {
|
||||||
reader.expect(' ');
|
reader.expect(' ');
|
||||||
|
@ -128,13 +134,13 @@ public class RotationIndicatorParticleData implements IParticleData, ICustomPart
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Codec<RotationIndicatorParticleData> getCodec() {
|
public Codec<RotationIndicatorParticleData> getCodec(ParticleType<RotationIndicatorParticleData> type) {
|
||||||
return CODEC;
|
return CODEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@OnlyIn(Dist.CLIENT)
|
@OnlyIn(Dist.CLIENT)
|
||||||
public IParticleMetaFactory<RotationIndicatorParticleData> getFactory() {
|
public IParticleMetaFactory<RotationIndicatorParticleData> getMetaFactory() {
|
||||||
return RotationIndicatorParticle.Factory::new;
|
return RotationIndicatorParticle.Factory::new;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,17 +7,23 @@ import com.simibubi.create.foundation.fluid.FluidRenderer;
|
||||||
import com.simibubi.create.foundation.tileEntity.behaviour.fluid.SmartFluidTankBehaviour;
|
import com.simibubi.create.foundation.tileEntity.behaviour.fluid.SmartFluidTankBehaviour;
|
||||||
import com.simibubi.create.foundation.tileEntity.behaviour.fluid.SmartFluidTankBehaviour.TankSegment;
|
import com.simibubi.create.foundation.tileEntity.behaviour.fluid.SmartFluidTankBehaviour.TankSegment;
|
||||||
import com.simibubi.create.foundation.tileEntity.renderer.SmartTileEntityRenderer;
|
import com.simibubi.create.foundation.tileEntity.renderer.SmartTileEntityRenderer;
|
||||||
|
import com.simibubi.create.foundation.utility.AngleHelper;
|
||||||
|
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||||
|
import com.simibubi.create.foundation.utility.IntAttached;
|
||||||
|
import com.simibubi.create.foundation.utility.MatrixStacker;
|
||||||
import com.simibubi.create.foundation.utility.VecHelper;
|
import com.simibubi.create.foundation.utility.VecHelper;
|
||||||
|
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||||
import net.minecraft.client.renderer.model.ItemCameraTransforms.TransformType;
|
import net.minecraft.client.renderer.model.ItemCameraTransforms.TransformType;
|
||||||
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.util.Direction;
|
||||||
|
import net.minecraft.util.Direction.Axis;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.math.MathHelper;
|
import net.minecraft.util.math.MathHelper;
|
||||||
import net.minecraft.util.math.vector.Vector3d;
|
import net.minecraft.util.math.vector.Vector3d;
|
||||||
import net.minecraft.util.math.vector.Vector3f;
|
|
||||||
import net.minecraftforge.fluids.FluidStack;
|
import net.minecraftforge.fluids.FluidStack;
|
||||||
import net.minecraftforge.items.IItemHandlerModifiable;
|
import net.minecraftforge.items.IItemHandlerModifiable;
|
||||||
import net.minecraftforge.items.ItemStackHandler;
|
import net.minecraftforge.items.ItemStackHandler;
|
||||||
|
@ -33,35 +39,94 @@ public class BasinRenderer extends SmartTileEntityRenderer<BasinTileEntity> {
|
||||||
int light, int overlay) {
|
int light, int overlay) {
|
||||||
super.renderSafe(basin, partialTicks, ms, buffer, light, overlay);
|
super.renderSafe(basin, partialTicks, ms, buffer, light, overlay);
|
||||||
|
|
||||||
renderFluids(basin, partialTicks, ms, buffer, light, overlay);
|
float fluidLevel = renderFluids(basin, partialTicks, ms, buffer, light, overlay);
|
||||||
|
float level = MathHelper.clamp(fluidLevel - .3f, .125f, .6f);
|
||||||
|
|
||||||
ms.push();
|
ms.push();
|
||||||
|
|
||||||
BlockPos pos = basin.getPos();
|
BlockPos pos = basin.getPos();
|
||||||
ms.translate(.5, .2f, .5);
|
ms.translate(.5, .2f, .5);
|
||||||
|
MatrixStacker.of(ms)
|
||||||
|
.rotateY(basin.ingredientRotation.getValue(partialTicks));
|
||||||
|
|
||||||
Random r = new Random(pos.hashCode());
|
Random r = new Random(pos.hashCode());
|
||||||
|
Vector3d baseVector = new Vector3d(.125, level, 0);
|
||||||
|
|
||||||
IItemHandlerModifiable inv = basin.itemCapability.orElse(new ItemStackHandler());
|
IItemHandlerModifiable inv = basin.itemCapability.orElse(new ItemStackHandler());
|
||||||
|
int itemCount = 0;
|
||||||
|
for (int slot = 0; slot < inv.getSlots(); slot++)
|
||||||
|
if (!inv.getStackInSlot(slot)
|
||||||
|
.isEmpty())
|
||||||
|
itemCount++;
|
||||||
|
|
||||||
|
if (itemCount == 1)
|
||||||
|
baseVector = new Vector3d(0, level, 0);
|
||||||
|
|
||||||
|
float anglePartition = 360f / itemCount;
|
||||||
for (int slot = 0; slot < inv.getSlots(); slot++) {
|
for (int slot = 0; slot < inv.getSlots(); slot++) {
|
||||||
ItemStack stack = inv.getStackInSlot(slot);
|
ItemStack stack = inv.getStackInSlot(slot);
|
||||||
if (stack.isEmpty())
|
if (stack.isEmpty())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
ms.push();
|
||||||
|
|
||||||
|
if (fluidLevel > 0) {
|
||||||
|
ms.translate(0,
|
||||||
|
(MathHelper.sin(AnimationTickHolder.getRenderTick() / 12f + anglePartition * itemCount) + 1.5f) * 1
|
||||||
|
/ 32f,
|
||||||
|
0);
|
||||||
|
}
|
||||||
|
|
||||||
|
Vector3d itemPosition = VecHelper.rotate(baseVector, anglePartition * itemCount, Axis.Y);
|
||||||
|
ms.translate(itemPosition.x, itemPosition.y, itemPosition.z);
|
||||||
|
MatrixStacker.of(ms)
|
||||||
|
.rotateY(anglePartition * itemCount + 35)
|
||||||
|
.rotateX(65);
|
||||||
|
|
||||||
for (int i = 0; i <= stack.getCount() / 8; i++) {
|
for (int i = 0; i <= stack.getCount() / 8; i++) {
|
||||||
ms.push();
|
ms.push();
|
||||||
Vector3d vec = VecHelper.offsetRandomly(Vector3d.ZERO, r, .25f);
|
|
||||||
Vector3d vec2 = VecHelper.offsetRandomly(Vector3d.ZERO, r, .5f);
|
|
||||||
ms.translate(vec.x, vec.y, vec.z);
|
|
||||||
ms.multiply(new Vector3f((float) vec2.z, (float) vec2.y, 0).getDegreesQuaternion((float) vec2.x * 180));
|
|
||||||
|
|
||||||
|
Vector3d vec = VecHelper.offsetRandomly(Vector3d.ZERO, r, 1 / 16f);
|
||||||
|
|
||||||
|
ms.translate(vec.x, vec.y, vec.z);
|
||||||
|
renderItem(ms, buffer, light, overlay, stack);
|
||||||
|
ms.pop();
|
||||||
|
}
|
||||||
|
ms.pop();
|
||||||
|
|
||||||
|
itemCount--;
|
||||||
|
}
|
||||||
|
ms.pop();
|
||||||
|
|
||||||
|
BlockState blockState = basin.getBlockState();
|
||||||
|
if (!(blockState.getBlock() instanceof BasinBlock))
|
||||||
|
return;
|
||||||
|
Direction direction = blockState.get(BasinBlock.FACING);
|
||||||
|
if (direction == Direction.DOWN)
|
||||||
|
return;
|
||||||
|
Vector3d directionVec = Vector3d.of(direction.getDirectionVec());
|
||||||
|
Vector3d outVec = VecHelper.getCenterOf(BlockPos.ZERO)
|
||||||
|
.add(directionVec.scale(.55)
|
||||||
|
.subtract(0, 1 / 2f, 0));
|
||||||
|
|
||||||
|
for (IntAttached<ItemStack> intAttached : basin.visualizedOutputItems) {
|
||||||
|
float progress = 1 - (intAttached.getFirst() - partialTicks) / BasinTileEntity.OUTPUT_ANIMATION_TIME;
|
||||||
|
ms.push();
|
||||||
|
MatrixStacker.of(ms)
|
||||||
|
.translate(outVec)
|
||||||
|
.translate(new Vector3d(0, Math.max(-.55f, -(progress * progress * 2)), 0))
|
||||||
|
.translate(directionVec.scale(progress * .5f))
|
||||||
|
.rotateY(AngleHelper.horizontalAngle(direction))
|
||||||
|
.rotateX(progress * 180);
|
||||||
|
renderItem(ms, buffer, light, overlay, intAttached.getValue());
|
||||||
|
ms.pop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void renderItem(MatrixStack ms, IRenderTypeBuffer buffer, int light, int overlay, ItemStack stack) {
|
||||||
Minecraft.getInstance()
|
Minecraft.getInstance()
|
||||||
.getItemRenderer()
|
.getItemRenderer()
|
||||||
.renderItem(stack, TransformType.GROUND, light, overlay, ms, buffer);
|
.renderItem(stack, TransformType.GROUND, light, overlay, ms, buffer);
|
||||||
ms.pop();
|
|
||||||
}
|
|
||||||
ms.translate(0, 1 / 64f, 0);
|
|
||||||
}
|
|
||||||
ms.pop();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected float renderFluids(BasinTileEntity basin, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer,
|
protected float renderFluids(BasinTileEntity basin, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer,
|
||||||
|
@ -69,26 +134,7 @@ public class BasinRenderer extends SmartTileEntityRenderer<BasinTileEntity> {
|
||||||
SmartFluidTankBehaviour inputFluids = basin.getBehaviour(SmartFluidTankBehaviour.INPUT);
|
SmartFluidTankBehaviour inputFluids = basin.getBehaviour(SmartFluidTankBehaviour.INPUT);
|
||||||
SmartFluidTankBehaviour outputFluids = basin.getBehaviour(SmartFluidTankBehaviour.OUTPUT);
|
SmartFluidTankBehaviour outputFluids = basin.getBehaviour(SmartFluidTankBehaviour.OUTPUT);
|
||||||
SmartFluidTankBehaviour[] tanks = { inputFluids, outputFluids };
|
SmartFluidTankBehaviour[] tanks = { inputFluids, outputFluids };
|
||||||
int renderedFluids = 0;
|
float totalUnits = basin.getTotalFluidUnits();
|
||||||
float totalUnits = 0;
|
|
||||||
|
|
||||||
for (SmartFluidTankBehaviour behaviour : tanks) {
|
|
||||||
if (behaviour == null)
|
|
||||||
continue;
|
|
||||||
for (TankSegment tankSegment : behaviour.getTanks()) {
|
|
||||||
if (tankSegment.getRenderedFluid()
|
|
||||||
.isEmpty())
|
|
||||||
continue;
|
|
||||||
float units = tankSegment.getTotalUnits(partialTicks);
|
|
||||||
if (units < 1)
|
|
||||||
continue;
|
|
||||||
totalUnits += units;
|
|
||||||
renderedFluids++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (renderedFluids == 0)
|
|
||||||
return 0;
|
|
||||||
if (totalUnits < 1)
|
if (totalUnits < 1)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -112,7 +158,7 @@ public class BasinRenderer extends SmartTileEntityRenderer<BasinTileEntity> {
|
||||||
if (units < 1)
|
if (units < 1)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
float partial = units / totalUnits;
|
float partial = MathHelper.clamp(units / totalUnits, 0, 1);
|
||||||
xMax += partial * 12 / 16f;
|
xMax += partial * 12 / 16f;
|
||||||
FluidRenderer.renderTiledFluidBB(renderedFluid, xMin, yMin, zMin, xMax, yMax, zMax, buffer, ms, light,
|
FluidRenderer.renderTiledFluidBB(renderedFluid, xMin, yMin, zMin, xMax, yMax, zMax, buffer, ms, light,
|
||||||
false);
|
false);
|
||||||
|
@ -121,7 +167,7 @@ public class BasinRenderer extends SmartTileEntityRenderer<BasinTileEntity> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return fluidLevel;
|
return yMax;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,18 @@
|
||||||
package com.simibubi.create.content.contraptions.processing;
|
package com.simibubi.create.content.contraptions.processing;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
|
import com.simibubi.create.AllParticleTypes;
|
||||||
import com.simibubi.create.AllTags;
|
import com.simibubi.create.AllTags;
|
||||||
|
import com.simibubi.create.content.contraptions.components.mixer.MechanicalMixerTileEntity;
|
||||||
|
import com.simibubi.create.content.contraptions.fluids.FluidFX;
|
||||||
|
import com.simibubi.create.content.contraptions.fluids.particle.FluidParticleData;
|
||||||
import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlock;
|
import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlock;
|
||||||
import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlock.HeatLevel;
|
import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlock.HeatLevel;
|
||||||
import com.simibubi.create.foundation.fluid.CombinedTankWrapper;
|
import com.simibubi.create.foundation.fluid.CombinedTankWrapper;
|
||||||
|
@ -16,22 +23,33 @@ import com.simibubi.create.foundation.tileEntity.behaviour.ValueBoxTransform;
|
||||||
import com.simibubi.create.foundation.tileEntity.behaviour.belt.DirectBeltInputBehaviour;
|
import com.simibubi.create.foundation.tileEntity.behaviour.belt.DirectBeltInputBehaviour;
|
||||||
import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringBehaviour;
|
import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringBehaviour;
|
||||||
import com.simibubi.create.foundation.tileEntity.behaviour.fluid.SmartFluidTankBehaviour;
|
import com.simibubi.create.foundation.tileEntity.behaviour.fluid.SmartFluidTankBehaviour;
|
||||||
|
import com.simibubi.create.foundation.tileEntity.behaviour.fluid.SmartFluidTankBehaviour.TankSegment;
|
||||||
|
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||||
import com.simibubi.create.foundation.utility.BlockHelper;
|
import com.simibubi.create.foundation.utility.BlockHelper;
|
||||||
|
import com.simibubi.create.foundation.utility.Couple;
|
||||||
|
import com.simibubi.create.foundation.utility.IntAttached;
|
||||||
import com.simibubi.create.foundation.utility.Iterate;
|
import com.simibubi.create.foundation.utility.Iterate;
|
||||||
|
import com.simibubi.create.foundation.utility.LerpedFloat;
|
||||||
|
import com.simibubi.create.foundation.utility.LerpedFloat.Chaser;
|
||||||
|
import com.simibubi.create.foundation.utility.NBTHelper;
|
||||||
import com.simibubi.create.foundation.utility.VecHelper;
|
import com.simibubi.create.foundation.utility.VecHelper;
|
||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.CompoundNBT;
|
import net.minecraft.nbt.CompoundNBT;
|
||||||
|
import net.minecraft.particles.IParticleData;
|
||||||
import net.minecraft.tileentity.ITickableTileEntity;
|
import net.minecraft.tileentity.ITickableTileEntity;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.tileentity.TileEntityType;
|
import net.minecraft.tileentity.TileEntityType;
|
||||||
import net.minecraft.util.Direction;
|
import net.minecraft.util.Direction;
|
||||||
|
import net.minecraft.util.Direction.Axis;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.util.math.MathHelper;
|
||||||
import net.minecraft.util.math.vector.Vector3d;
|
import net.minecraft.util.math.vector.Vector3d;
|
||||||
import net.minecraftforge.api.distmarker.Dist;
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||||
import net.minecraftforge.common.capabilities.Capability;
|
import net.minecraftforge.common.capabilities.Capability;
|
||||||
|
import net.minecraftforge.common.util.Constants.NBT;
|
||||||
import net.minecraftforge.common.util.LazyOptional;
|
import net.minecraftforge.common.util.LazyOptional;
|
||||||
import net.minecraftforge.fluids.FluidStack;
|
import net.minecraftforge.fluids.FluidStack;
|
||||||
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
|
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
|
||||||
|
@ -45,25 +63,44 @@ import net.minecraftforge.items.wrapper.CombinedInvWrapper;
|
||||||
|
|
||||||
public class BasinTileEntity extends SmartTileEntity implements ITickableTileEntity {
|
public class BasinTileEntity extends SmartTileEntity implements ITickableTileEntity {
|
||||||
|
|
||||||
|
private boolean areFluidsMoving;
|
||||||
|
LerpedFloat ingredientRotationSpeed;
|
||||||
|
LerpedFloat ingredientRotation;
|
||||||
|
|
||||||
public BasinInventory inputInventory;
|
public BasinInventory inputInventory;
|
||||||
public SmartFluidTankBehaviour inputTank;
|
public SmartFluidTankBehaviour inputTank;
|
||||||
protected SmartInventory outputInventory;
|
protected SmartInventory outputInventory;
|
||||||
protected SmartFluidTankBehaviour outputTank;
|
protected SmartFluidTankBehaviour outputTank;
|
||||||
|
private FilteringBehaviour filtering;
|
||||||
|
private boolean contentsChanged;
|
||||||
|
|
||||||
|
private Couple<SmartInventory> invs;
|
||||||
|
private Couple<SmartFluidTankBehaviour> tanks;
|
||||||
|
|
||||||
protected LazyOptional<IItemHandlerModifiable> itemCapability;
|
protected LazyOptional<IItemHandlerModifiable> itemCapability;
|
||||||
protected LazyOptional<IFluidHandler> fluidCapability;
|
protected LazyOptional<IFluidHandler> fluidCapability;
|
||||||
|
|
||||||
private FilteringBehaviour filtering;
|
public static final int OUTPUT_ANIMATION_TIME = 10;
|
||||||
private boolean contentsChanged;
|
List<IntAttached<ItemStack>> visualizedOutputItems;
|
||||||
|
List<IntAttached<FluidStack>> visualizedOutputFluids;
|
||||||
|
|
||||||
public BasinTileEntity(TileEntityType<? extends BasinTileEntity> type) {
|
public BasinTileEntity(TileEntityType<? extends BasinTileEntity> type) {
|
||||||
super(type);
|
super(type);
|
||||||
inputInventory = new BasinInventory(9, this);
|
inputInventory = new BasinInventory(9, this);
|
||||||
inputInventory.whenContentsChanged($ -> contentsChanged = true);
|
inputInventory.whenContentsChanged($ -> contentsChanged = true);
|
||||||
outputInventory = new BasinInventory(9, this).forbidInsertion();
|
outputInventory = new BasinInventory(9, this).forbidInsertion();
|
||||||
|
areFluidsMoving = false;
|
||||||
itemCapability = LazyOptional.of(() -> new CombinedInvWrapper(inputInventory, outputInventory));
|
itemCapability = LazyOptional.of(() -> new CombinedInvWrapper(inputInventory, outputInventory));
|
||||||
contentsChanged = true;
|
contentsChanged = true;
|
||||||
|
ingredientRotation = LerpedFloat.angular()
|
||||||
|
.startWithValue(0);
|
||||||
|
ingredientRotationSpeed = LerpedFloat.linear()
|
||||||
|
.startWithValue(0);
|
||||||
|
|
||||||
|
invs = Couple.create(inputInventory, outputInventory);
|
||||||
|
tanks = Couple.create(inputTank, outputTank);
|
||||||
|
visualizedOutputItems = Collections.synchronizedList(new ArrayList<>());
|
||||||
|
visualizedOutputFluids = Collections.synchronizedList(new ArrayList<>());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -79,6 +116,7 @@ public class BasinTileEntity extends SmartTileEntity implements ITickableTileEnt
|
||||||
outputTank = new SmartFluidTankBehaviour(SmartFluidTankBehaviour.OUTPUT, this, 2, 1000, true).forbidInsertion();
|
outputTank = new SmartFluidTankBehaviour(SmartFluidTankBehaviour.OUTPUT, this, 2, 1000, true).forbidInsertion();
|
||||||
behaviours.add(inputTank);
|
behaviours.add(inputTank);
|
||||||
behaviours.add(outputTank);
|
behaviours.add(outputTank);
|
||||||
|
|
||||||
fluidCapability = LazyOptional.of(() -> {
|
fluidCapability = LazyOptional.of(() -> {
|
||||||
LazyOptional<? extends IFluidHandler> inputCap = inputTank.getCapability();
|
LazyOptional<? extends IFluidHandler> inputCap = inputTank.getCapability();
|
||||||
LazyOptional<? extends IFluidHandler> outputCap = outputTank.getCapability();
|
LazyOptional<? extends IFluidHandler> outputCap = outputTank.getCapability();
|
||||||
|
@ -91,6 +129,15 @@ public class BasinTileEntity extends SmartTileEntity implements ITickableTileEnt
|
||||||
super.fromTag(state, compound, clientPacket);
|
super.fromTag(state, compound, clientPacket);
|
||||||
inputInventory.deserializeNBT(compound.getCompound("InputItems"));
|
inputInventory.deserializeNBT(compound.getCompound("InputItems"));
|
||||||
outputInventory.deserializeNBT(compound.getCompound("OutputItems"));
|
outputInventory.deserializeNBT(compound.getCompound("OutputItems"));
|
||||||
|
|
||||||
|
if (!clientPacket)
|
||||||
|
return;
|
||||||
|
|
||||||
|
NBTHelper.iterateCompoundList(compound.getList("VisualizedItems", NBT.TAG_COMPOUND),
|
||||||
|
c -> visualizedOutputItems.add(IntAttached.with(OUTPUT_ANIMATION_TIME, ItemStack.read(c))));
|
||||||
|
NBTHelper.iterateCompoundList(compound.getList("VisualizedFluids", NBT.TAG_COMPOUND),
|
||||||
|
c -> visualizedOutputFluids
|
||||||
|
.add(IntAttached.with(OUTPUT_ANIMATION_TIME, FluidStack.loadFluidStackFromNBT(c))));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -98,6 +145,16 @@ public class BasinTileEntity extends SmartTileEntity implements ITickableTileEnt
|
||||||
super.write(compound, clientPacket);
|
super.write(compound, clientPacket);
|
||||||
compound.put("InputItems", inputInventory.serializeNBT());
|
compound.put("InputItems", inputInventory.serializeNBT());
|
||||||
compound.put("OutputItems", outputInventory.serializeNBT());
|
compound.put("OutputItems", outputInventory.serializeNBT());
|
||||||
|
|
||||||
|
if (!clientPacket)
|
||||||
|
return;
|
||||||
|
|
||||||
|
compound.put("VisualizedItems", NBTHelper.writeCompoundList(visualizedOutputItems, ia -> ia.getValue()
|
||||||
|
.serializeNBT()));
|
||||||
|
compound.put("VisualizedFluids", NBTHelper.writeCompoundList(visualizedOutputFluids, ia -> ia.getValue()
|
||||||
|
.writeToNBT(new CompoundNBT())));
|
||||||
|
visualizedOutputItems.clear();
|
||||||
|
visualizedOutputFluids.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onEmptied() {
|
public void onEmptied() {
|
||||||
|
@ -130,11 +187,26 @@ public class BasinTileEntity extends SmartTileEntity implements ITickableTileEnt
|
||||||
@Override
|
@Override
|
||||||
public void lazyTick() {
|
public void lazyTick() {
|
||||||
super.lazyTick();
|
super.lazyTick();
|
||||||
|
if (!world.isRemote)
|
||||||
|
return;
|
||||||
|
TileEntity tileEntity = world.getTileEntity(pos.up(2));
|
||||||
|
if (!(tileEntity instanceof MechanicalMixerTileEntity)) {
|
||||||
|
setAreFluidsMoving(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
MechanicalMixerTileEntity mixer = (MechanicalMixerTileEntity) tileEntity;
|
||||||
|
setAreFluidsMoving(mixer.running && mixer.runningTicks <= 20);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void tick() {
|
public void tick() {
|
||||||
super.tick();
|
super.tick();
|
||||||
|
if (world.isRemote) {
|
||||||
|
createFluidParticles();
|
||||||
|
tickVisualizedOutputs();
|
||||||
|
ingredientRotationSpeed.tickChaser();
|
||||||
|
ingredientRotation.setValue(ingredientRotation.getValue() + ingredientRotationSpeed.getValue());
|
||||||
|
}
|
||||||
if (!contentsChanged)
|
if (!contentsChanged)
|
||||||
return;
|
return;
|
||||||
contentsChanged = false;
|
contentsChanged = false;
|
||||||
|
@ -153,6 +225,32 @@ public class BasinTileEntity extends SmartTileEntity implements ITickableTileEnt
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public float getTotalFluidUnits() {
|
||||||
|
int renderedFluids = 0;
|
||||||
|
float totalUnits = 0;
|
||||||
|
|
||||||
|
for (SmartFluidTankBehaviour behaviour : getTanks()) {
|
||||||
|
if (behaviour == null)
|
||||||
|
continue;
|
||||||
|
for (TankSegment tankSegment : behaviour.getTanks()) {
|
||||||
|
if (tankSegment.getRenderedFluid()
|
||||||
|
.isEmpty())
|
||||||
|
continue;
|
||||||
|
float units = tankSegment.getTotalUnits(0);
|
||||||
|
if (units < 1)
|
||||||
|
continue;
|
||||||
|
totalUnits += units;
|
||||||
|
renderedFluids++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (renderedFluids == 0)
|
||||||
|
return 0;
|
||||||
|
if (totalUnits < 1)
|
||||||
|
return 0;
|
||||||
|
return totalUnits;
|
||||||
|
}
|
||||||
|
|
||||||
private Optional<BasinOperatingTileEntity> getOperator() {
|
private Optional<BasinOperatingTileEntity> getOperator() {
|
||||||
if (world == null)
|
if (world == null)
|
||||||
return Optional.empty();
|
return Optional.empty();
|
||||||
|
@ -226,6 +324,8 @@ public class BasinTileEntity extends SmartTileEntity implements ITickableTileEnt
|
||||||
if (!ItemHandlerHelper.insertItemStacked(targetInv, itemStack.copy(), simulate)
|
if (!ItemHandlerHelper.insertItemStacked(targetInv, itemStack.copy(), simulate)
|
||||||
.isEmpty())
|
.isEmpty())
|
||||||
return false;
|
return false;
|
||||||
|
else if (!simulate)
|
||||||
|
visualizedOutputItems.add(IntAttached.withZero(itemStack));
|
||||||
|
|
||||||
if (targetTank == null)
|
if (targetTank == null)
|
||||||
return false;
|
return false;
|
||||||
|
@ -233,10 +333,145 @@ public class BasinTileEntity extends SmartTileEntity implements ITickableTileEnt
|
||||||
if (targetTank.fill(fluidStack.copy(), simulate ? FluidAction.SIMULATE : FluidAction.EXECUTE) != fluidStack
|
if (targetTank.fill(fluidStack.copy(), simulate ? FluidAction.SIMULATE : FluidAction.EXECUTE) != fluidStack
|
||||||
.getAmount())
|
.getAmount())
|
||||||
return false;
|
return false;
|
||||||
|
else if (!simulate)
|
||||||
|
visualizedOutputFluids.add(IntAttached.withZero(fluidStack));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void readOnlyItems(CompoundNBT compound) {
|
||||||
|
inputInventory.deserializeNBT(compound.getCompound("InputItems"));
|
||||||
|
outputInventory.deserializeNBT(compound.getCompound("OutputItems"));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static HeatLevel getHeatLevelOf(BlockState state) {
|
||||||
|
if (BlockHelper.hasBlockStateProperty(state, BlazeBurnerBlock.HEAT_LEVEL))
|
||||||
|
return state.get(BlazeBurnerBlock.HEAT_LEVEL);
|
||||||
|
return AllTags.AllBlockTags.FAN_HEATERS.matches(state) ? HeatLevel.SMOULDERING : HeatLevel.NONE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Couple<SmartFluidTankBehaviour> getTanks() {
|
||||||
|
return tanks;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Couple<SmartInventory> getInvs() {
|
||||||
|
return invs;
|
||||||
|
}
|
||||||
|
|
||||||
|
// client things
|
||||||
|
|
||||||
|
private void tickVisualizedOutputs() {
|
||||||
|
visualizedOutputFluids.forEach(IntAttached::decrement);
|
||||||
|
visualizedOutputItems.forEach(IntAttached::decrement);
|
||||||
|
visualizedOutputFluids.removeIf(IntAttached::isOrBelowZero);
|
||||||
|
visualizedOutputItems.removeIf(IntAttached::isOrBelowZero);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void createFluidParticles() {
|
||||||
|
Random r = world.rand;
|
||||||
|
|
||||||
|
if (!visualizedOutputFluids.isEmpty())
|
||||||
|
createOutputFluidParticles(r);
|
||||||
|
|
||||||
|
if (!areFluidsMoving && r.nextFloat() > 1 / 8f)
|
||||||
|
return;
|
||||||
|
|
||||||
|
int segments = 0;
|
||||||
|
for (SmartFluidTankBehaviour behaviour : getTanks()) {
|
||||||
|
if (behaviour == null)
|
||||||
|
continue;
|
||||||
|
for (TankSegment tankSegment : behaviour.getTanks())
|
||||||
|
if (!tankSegment.isEmpty(0))
|
||||||
|
segments++;
|
||||||
|
}
|
||||||
|
if (segments < 2)
|
||||||
|
return;
|
||||||
|
|
||||||
|
float totalUnits = getTotalFluidUnits();
|
||||||
|
if (totalUnits == 0)
|
||||||
|
return;
|
||||||
|
float fluidLevel = MathHelper.clamp(totalUnits / 2000, 0, 1);
|
||||||
|
float rim = 2 / 16f;
|
||||||
|
float space = 12 / 16f;
|
||||||
|
float surface = pos.getY() + rim + space * fluidLevel + 1 / 32f;
|
||||||
|
|
||||||
|
if (areFluidsMoving) {
|
||||||
|
createMovingFluidParticles(surface, segments);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (SmartFluidTankBehaviour behaviour : getTanks()) {
|
||||||
|
if (behaviour == null)
|
||||||
|
continue;
|
||||||
|
for (TankSegment tankSegment : behaviour.getTanks()) {
|
||||||
|
if (tankSegment.isEmpty(0))
|
||||||
|
continue;
|
||||||
|
float x = pos.getX() + rim + space * r.nextFloat();
|
||||||
|
float z = pos.getZ() + rim + space * r.nextFloat();
|
||||||
|
world.addOptionalParticle(
|
||||||
|
new FluidParticleData(AllParticleTypes.BASIN_FLUID.get(), tankSegment.getRenderedFluid()), x,
|
||||||
|
surface, z, 0, 0, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void createOutputFluidParticles(Random r) {
|
||||||
|
BlockState blockState = getBlockState();
|
||||||
|
if (!(blockState.getBlock() instanceof BasinBlock))
|
||||||
|
return;
|
||||||
|
Direction direction = blockState.get(BasinBlock.FACING);
|
||||||
|
if (direction == Direction.DOWN)
|
||||||
|
return;
|
||||||
|
Vector3d directionVec = Vector3d.of(direction.getDirectionVec());
|
||||||
|
Vector3d outVec = VecHelper.getCenterOf(pos)
|
||||||
|
.add(directionVec.scale(.65)
|
||||||
|
.subtract(0, 1 / 4f, 0));
|
||||||
|
Vector3d outMotion = directionVec.scale(1 / 16f)
|
||||||
|
.add(0, -1 / 16f, 0);
|
||||||
|
|
||||||
|
for (int i = 0; i < 3; i++) {
|
||||||
|
visualizedOutputFluids.forEach(ia -> {
|
||||||
|
FluidStack fluidStack = ia.getValue();
|
||||||
|
IParticleData fluidParticle = FluidFX.getFluidParticle(fluidStack);
|
||||||
|
Vector3d m = VecHelper.offsetRandomly(outMotion, r, 1 / 16f);
|
||||||
|
world.addOptionalParticle(fluidParticle, outVec.x, outVec.y, outVec.z, m.x, m.y, m.z);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void createMovingFluidParticles(float surface, int segments) {
|
||||||
|
Vector3d pointer = new Vector3d(1, 0, 0).scale(1 / 16f);
|
||||||
|
float interval = 360f / segments;
|
||||||
|
Vector3d centerOf = VecHelper.getCenterOf(pos);
|
||||||
|
float intervalOffset = (AnimationTickHolder.ticks * 18) % 360;
|
||||||
|
|
||||||
|
int currentSegment = 0;
|
||||||
|
for (SmartFluidTankBehaviour behaviour : getTanks()) {
|
||||||
|
if (behaviour == null)
|
||||||
|
continue;
|
||||||
|
for (TankSegment tankSegment : behaviour.getTanks()) {
|
||||||
|
if (tankSegment.isEmpty(0))
|
||||||
|
continue;
|
||||||
|
float angle = interval * (1 + currentSegment) + intervalOffset;
|
||||||
|
Vector3d vec = centerOf.add(VecHelper.rotate(pointer, angle, Axis.Y));
|
||||||
|
world.addOptionalParticle(
|
||||||
|
new FluidParticleData(AllParticleTypes.BASIN_FLUID.get(), tankSegment.getRenderedFluid()),
|
||||||
|
vec.getX(), surface, vec.getZ(), 1, 0, 0);
|
||||||
|
currentSegment++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean areFluidsMoving() {
|
||||||
|
return areFluidsMoving;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean setAreFluidsMoving(boolean areFluidsMoving) {
|
||||||
|
this.areFluidsMoving = areFluidsMoving;
|
||||||
|
ingredientRotationSpeed.chase(areFluidsMoving ? 20 : 0, .1f, Chaser.EXP);
|
||||||
|
return areFluidsMoving;
|
||||||
|
}
|
||||||
|
|
||||||
class BasinValueBox extends ValueBoxTransform.Sided {
|
class BasinValueBox extends ValueBoxTransform.Sided {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -251,15 +486,4 @@ public class BasinTileEntity extends SmartTileEntity implements ITickableTileEnt
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void readOnlyItems(CompoundNBT compound) {
|
|
||||||
inputInventory.deserializeNBT(compound.getCompound("InputItems"));
|
|
||||||
outputInventory.deserializeNBT(compound.getCompound("OutputItems"));
|
|
||||||
}
|
|
||||||
|
|
||||||
public static HeatLevel getHeatLevelOf(BlockState state) {
|
|
||||||
if (BlockHelper.hasBlockStateProperty(state, BlazeBurnerBlock.HEAT_LEVEL))
|
|
||||||
return state.get(BlazeBurnerBlock.HEAT_LEVEL);
|
|
||||||
return AllTags.AllBlockTags.FAN_HEATERS.matches(state) ? HeatLevel.SMOULDERING : HeatLevel.NONE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,80 @@
|
||||||
|
package com.simibubi.create.content.contraptions.relays.elementary;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
|
import com.simibubi.create.foundation.block.render.WrappedBakedModel;
|
||||||
|
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
||||||
|
import com.simibubi.create.foundation.utility.VirtualEmptyModelData;
|
||||||
|
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.client.renderer.model.BakedQuad;
|
||||||
|
import net.minecraft.client.renderer.model.IBakedModel;
|
||||||
|
import net.minecraft.util.Direction;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.world.ILightReader;
|
||||||
|
import net.minecraftforge.client.model.data.IModelData;
|
||||||
|
import net.minecraftforge.client.model.data.ModelDataMap;
|
||||||
|
import net.minecraftforge.client.model.data.ModelProperty;
|
||||||
|
|
||||||
|
public class BracketedKineticBlockModel extends WrappedBakedModel {
|
||||||
|
|
||||||
|
private static ModelProperty<BracketedModelData> BRACKET_PROPERTY = new ModelProperty<>();
|
||||||
|
|
||||||
|
public BracketedKineticBlockModel(IBakedModel template) {
|
||||||
|
super(template);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IModelData getModelData(ILightReader world, BlockPos pos, BlockState state, IModelData tileData) {
|
||||||
|
if (tileData == VirtualEmptyModelData.INSTANCE)
|
||||||
|
return tileData;
|
||||||
|
BracketedModelData data = new BracketedModelData();
|
||||||
|
BracketedTileEntityBehaviour attachmentBehaviour =
|
||||||
|
TileEntityBehaviour.get(world, pos, BracketedTileEntityBehaviour.TYPE);
|
||||||
|
if (attachmentBehaviour != null)
|
||||||
|
data.putBracket(attachmentBehaviour.getBracket());
|
||||||
|
return new ModelDataMap.Builder().withInitial(BRACKET_PROPERTY, data)
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<BakedQuad> getQuads(BlockState state, Direction side, Random rand, IModelData data) {
|
||||||
|
if (data instanceof ModelDataMap) {
|
||||||
|
List<BakedQuad> quads = new ArrayList<>();
|
||||||
|
ModelDataMap modelDataMap = (ModelDataMap) data;
|
||||||
|
if (modelDataMap.hasProperty(BRACKET_PROPERTY)) {
|
||||||
|
quads = new ArrayList<>(quads);
|
||||||
|
addQuads(quads, state, side, rand, modelDataMap, modelDataMap.getData(BRACKET_PROPERTY));
|
||||||
|
}
|
||||||
|
return quads;
|
||||||
|
}
|
||||||
|
return super.getQuads(state, side, rand, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void addQuads(List<BakedQuad> quads, BlockState state, Direction side, Random rand, IModelData data,
|
||||||
|
BracketedModelData pipeData) {
|
||||||
|
IBakedModel bracket = pipeData.getBracket();
|
||||||
|
if (bracket == null)
|
||||||
|
return;
|
||||||
|
quads.addAll(bracket.getQuads(state, side, rand, data));
|
||||||
|
}
|
||||||
|
|
||||||
|
private class BracketedModelData {
|
||||||
|
IBakedModel bracket;
|
||||||
|
|
||||||
|
public void putBracket(BlockState state) {
|
||||||
|
this.bracket = Minecraft.getInstance()
|
||||||
|
.getBlockRendererDispatcher()
|
||||||
|
.getModelForState(state);
|
||||||
|
}
|
||||||
|
|
||||||
|
public IBakedModel getBracket() {
|
||||||
|
return bracket;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,75 @@
|
||||||
|
package com.simibubi.create.content.contraptions.relays.elementary;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
import com.simibubi.create.foundation.tileEntity.SmartTileEntity;
|
||||||
|
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
||||||
|
import com.simibubi.create.foundation.tileEntity.behaviour.BehaviourType;
|
||||||
|
import com.simibubi.create.foundation.utility.NBTHelper;
|
||||||
|
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.block.Blocks;
|
||||||
|
import net.minecraft.nbt.CompoundNBT;
|
||||||
|
import net.minecraft.nbt.NBTUtil;
|
||||||
|
|
||||||
|
public class BracketedTileEntityBehaviour extends TileEntityBehaviour {
|
||||||
|
|
||||||
|
public static BehaviourType<BracketedTileEntityBehaviour> TYPE = new BehaviourType<>();
|
||||||
|
|
||||||
|
private Optional<BlockState> bracket;
|
||||||
|
private boolean reRender;
|
||||||
|
|
||||||
|
public BracketedTileEntityBehaviour(SmartTileEntity te) {
|
||||||
|
super(te);
|
||||||
|
bracket = Optional.empty();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BehaviourType<?> getType() {
|
||||||
|
return TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void applyBracket(BlockState state) {
|
||||||
|
this.bracket = Optional.of(state);
|
||||||
|
reRender = true;
|
||||||
|
tileEntity.notifyUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void removeBracket() {
|
||||||
|
this.bracket = Optional.empty();
|
||||||
|
reRender = true;
|
||||||
|
tileEntity.notifyUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
public BlockState getBracket() {
|
||||||
|
return bracket.orElse(Blocks.AIR.getDefaultState());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void write(CompoundNBT nbt, boolean clientPacket) {
|
||||||
|
bracket.ifPresent(p -> nbt.put("Bracket", NBTUtil.writeBlockState(p)));
|
||||||
|
if (clientPacket && reRender) {
|
||||||
|
NBTHelper.putMarker(nbt, "Redraw");
|
||||||
|
reRender = false;
|
||||||
|
}
|
||||||
|
super.write(nbt, clientPacket);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void read(CompoundNBT nbt, boolean clientPacket) {
|
||||||
|
bracket = Optional.empty();
|
||||||
|
if (nbt.contains("Bracket"))
|
||||||
|
bracket = Optional.of(NBTUtil.readBlockState(nbt.getCompound("Bracket")));
|
||||||
|
if (clientPacket && nbt.contains("Redraw"))
|
||||||
|
getWorld().notifyBlockUpdate(getPos(), tileEntity.getBlockState(), tileEntity.getBlockState(), 16);
|
||||||
|
super.read(nbt, clientPacket);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean canHaveBracket() {
|
||||||
|
BlockState blockState = tileEntity.getBlockState();
|
||||||
|
if (blockState.getBlock() instanceof ShaftBlock)
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,15 +1,19 @@
|
||||||
package com.simibubi.create.content.contraptions.relays.elementary;
|
package com.simibubi.create.content.contraptions.relays.elementary;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
import com.simibubi.create.AllBlocks;
|
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.KineticTileEntity;
|
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.base.RotatedPillarKineticBlock;
|
import com.simibubi.create.content.contraptions.base.RotatedPillarKineticBlock;
|
||||||
import com.simibubi.create.content.contraptions.relays.encased.EncasedShaftBlock;
|
import com.simibubi.create.content.contraptions.relays.encased.EncasedShaftBlock;
|
||||||
|
import com.simibubi.create.content.contraptions.wrench.IWrenchableWithBracket;
|
||||||
|
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockRenderType;
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.block.Blocks;
|
||||||
import net.minecraft.block.IWaterLoggable;
|
import net.minecraft.block.IWaterLoggable;
|
||||||
import net.minecraft.block.material.PushReaction;
|
import net.minecraft.block.material.PushReaction;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
@ -35,7 +39,7 @@ import net.minecraft.world.IWorld;
|
||||||
import net.minecraft.world.IWorldReader;
|
import net.minecraft.world.IWorldReader;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
public class ShaftBlock extends RotatedPillarKineticBlock implements IWaterLoggable {
|
public class ShaftBlock extends RotatedPillarKineticBlock implements IWaterLoggable, IWrenchableWithBracket {
|
||||||
|
|
||||||
public ShaftBlock(Properties properties) {
|
public ShaftBlock(Properties properties) {
|
||||||
super(properties);
|
super(properties);
|
||||||
|
@ -52,13 +56,16 @@ public class ShaftBlock extends RotatedPillarKineticBlock implements IWaterLogga
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BlockRenderType getRenderType(BlockState state) {
|
public TileEntity createTileEntity(BlockState state, IBlockReader world) {
|
||||||
return BlockRenderType.ENTITYBLOCK_ANIMATED;
|
return AllTileEntities.SIMPLE_KINETIC.create();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createTileEntity(BlockState state, IBlockReader world) {
|
@SuppressWarnings("deprecation")
|
||||||
return AllTileEntities.SIMPLE_KINETIC.create();
|
public void onReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean isMoving) {
|
||||||
|
if (state != newState && !isMoving)
|
||||||
|
removeBracket(world, pos).ifPresent(stack -> Block.spawnAsEntity(world, pos, stack));
|
||||||
|
super.onReplaced(state, world, pos, newState, isMoving);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -82,18 +89,22 @@ public class ShaftBlock extends RotatedPillarKineticBlock implements IWaterLogga
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ActionResultType onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult p_225533_6_) {
|
public ActionResultType onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand,
|
||||||
|
BlockRayTraceResult p_225533_6_) {
|
||||||
if (player.isSneaking() || !player.isAllowEdit())
|
if (player.isSneaking() || !player.isAllowEdit())
|
||||||
return ActionResultType.PASS;
|
return ActionResultType.PASS;
|
||||||
|
|
||||||
ItemStack heldItem = player.getHeldItem(hand);
|
ItemStack heldItem = player.getHeldItem(hand);
|
||||||
|
|
||||||
for (EncasedShaftBlock.Casing casing : EncasedShaftBlock.Casing.values()) {
|
for (EncasedShaftBlock.Casing casing : EncasedShaftBlock.Casing.values()) {
|
||||||
if (casing.getCasingEntry().isIn(heldItem)) {
|
if (casing.getCasingEntry()
|
||||||
|
.isIn(heldItem)) {
|
||||||
if (world.isRemote)
|
if (world.isRemote)
|
||||||
return ActionResultType.SUCCESS;
|
return ActionResultType.SUCCESS;
|
||||||
|
|
||||||
KineticTileEntity.switchToBlockState(world, pos, AllBlocks.ENCASED_SHAFT.getDefaultState().with(EncasedShaftBlock.CASING, casing).with(AXIS, state.get(AXIS)));
|
KineticTileEntity.switchToBlockState(world, pos, AllBlocks.ENCASED_SHAFT.getDefaultState()
|
||||||
|
.with(EncasedShaftBlock.CASING, casing)
|
||||||
|
.with(AXIS, state.get(AXIS)));
|
||||||
return ActionResultType.SUCCESS;
|
return ActionResultType.SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -115,7 +126,8 @@ public class ShaftBlock extends RotatedPillarKineticBlock implements IWaterLogga
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public FluidState getFluidState(BlockState state) {
|
public FluidState getFluidState(BlockState state) {
|
||||||
return state.get(BlockStateProperties.WATERLOGGED) ? Fluids.WATER.getStillFluidState(false) : Fluids.EMPTY.getDefaultState();
|
return state.get(BlockStateProperties.WATERLOGGED) ? Fluids.WATER.getStillFluidState(false)
|
||||||
|
: Fluids.EMPTY.getDefaultState();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -128,14 +140,29 @@ public class ShaftBlock extends RotatedPillarKineticBlock implements IWaterLogga
|
||||||
public BlockState updatePostPlacement(BlockState state, Direction direction, BlockState neighbourState,
|
public BlockState updatePostPlacement(BlockState state, Direction direction, BlockState neighbourState,
|
||||||
IWorld world, BlockPos pos, BlockPos neighbourPos) {
|
IWorld world, BlockPos pos, BlockPos neighbourPos) {
|
||||||
if (state.get(BlockStateProperties.WATERLOGGED)) {
|
if (state.get(BlockStateProperties.WATERLOGGED)) {
|
||||||
world.getPendingFluidTicks().scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickRate(world));
|
world.getPendingFluidTicks()
|
||||||
|
.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickRate(world));
|
||||||
}
|
}
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BlockState getStateForPlacement(BlockItemUseContext context) {
|
public BlockState getStateForPlacement(BlockItemUseContext context) {
|
||||||
FluidState FluidState = context.getWorld().getFluidState(context.getPos());
|
FluidState FluidState = context.getWorld()
|
||||||
return super.getStateForPlacement(context).with(BlockStateProperties.WATERLOGGED, Boolean.valueOf(FluidState.getFluid() == Fluids.WATER));
|
.getFluidState(context.getPos());
|
||||||
|
return super.getStateForPlacement(context).with(BlockStateProperties.WATERLOGGED,
|
||||||
|
Boolean.valueOf(FluidState.getFluid() == Fluids.WATER));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Optional<ItemStack> removeBracket(IBlockReader world, BlockPos pos) {
|
||||||
|
BracketedTileEntityBehaviour behaviour = TileEntityBehaviour.get(world, pos, BracketedTileEntityBehaviour.TYPE);
|
||||||
|
if (behaviour == null)
|
||||||
|
return Optional.empty();
|
||||||
|
BlockState bracket = behaviour.getBracket();
|
||||||
|
behaviour.removeBracket();
|
||||||
|
if (bracket == Blocks.AIR.getDefaultState())
|
||||||
|
return Optional.empty();
|
||||||
|
return Optional.of(new ItemStack(bracket.getBlock()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
package com.simibubi.create.content.contraptions.relays.elementary;
|
package com.simibubi.create.content.contraptions.relays.elementary;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||||
|
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
||||||
|
|
||||||
import net.minecraft.tileentity.TileEntityType;
|
import net.minecraft.tileentity.TileEntityType;
|
||||||
import net.minecraft.util.math.AxisAlignedBB;
|
import net.minecraft.util.math.AxisAlignedBB;
|
||||||
|
@ -11,6 +14,12 @@ public class SimpleKineticTileEntity extends KineticTileEntity {
|
||||||
super(type);
|
super(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addBehaviours(List<TileEntityBehaviour> behaviours) {
|
||||||
|
behaviours.add(new BracketedTileEntityBehaviour(this));
|
||||||
|
super.addBehaviours(behaviours);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AxisAlignedBB getRenderBoundingBox() {
|
public AxisAlignedBB getRenderBoundingBox() {
|
||||||
return new AxisAlignedBB(pos).grow(1);
|
return new AxisAlignedBB(pos).grow(1);
|
||||||
|
|
|
@ -1,53 +1,18 @@
|
||||||
package com.simibubi.create.content.contraptions.relays.gauge;
|
package com.simibubi.create.content.contraptions.relays.gauge;
|
||||||
|
|
||||||
import com.simibubi.create.foundation.data.SpecialBlockStateGen;
|
import com.simibubi.create.foundation.data.DirectionalAxisBlockStateGen;
|
||||||
import com.tterrag.registrate.providers.DataGenContext;
|
import com.tterrag.registrate.providers.DataGenContext;
|
||||||
import com.tterrag.registrate.providers.RegistrateBlockstateProvider;
|
import com.tterrag.registrate.providers.RegistrateBlockstateProvider;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.util.Direction;
|
|
||||||
import net.minecraft.util.Direction.Axis;
|
|
||||||
import net.minecraftforge.client.model.generators.ModelFile;
|
|
||||||
|
|
||||||
public class GaugeGenerator extends SpecialBlockStateGen {
|
public class GaugeGenerator extends DirectionalAxisBlockStateGen {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getXRotation(BlockState state) {
|
public <T extends Block> String getModelPrefix(DataGenContext<Block, T> ctx, RegistrateBlockstateProvider prov,
|
||||||
Direction direction = state.get(GaugeBlock.FACING);
|
|
||||||
boolean alongFirst = state.get(GaugeBlock.AXIS_ALONG_FIRST_COORDINATE);
|
|
||||||
|
|
||||||
if (direction == Direction.DOWN)
|
|
||||||
return 180;
|
|
||||||
if (direction == Direction.UP)
|
|
||||||
return 0;
|
|
||||||
if ((direction.getAxis() == Axis.X) == alongFirst)
|
|
||||||
return 90;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected int getYRotation(BlockState state) {
|
|
||||||
Direction direction = state.get(GaugeBlock.FACING);
|
|
||||||
boolean alongFirst = state.get(GaugeBlock.AXIS_ALONG_FIRST_COORDINATE);
|
|
||||||
|
|
||||||
if (direction.getAxis()
|
|
||||||
.isVertical())
|
|
||||||
return alongFirst ? 90 : 0;
|
|
||||||
|
|
||||||
return horizontalAngle(direction) + 90;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T extends Block> ModelFile getModel(DataGenContext<Block, T> ctx, RegistrateBlockstateProvider prov,
|
|
||||||
BlockState state) {
|
BlockState state) {
|
||||||
boolean vertical = state.get(GaugeBlock.FACING)
|
return "block/gauge/base";
|
||||||
.getAxis()
|
|
||||||
.isVertical();
|
|
||||||
String partial = vertical ? "base" : "base_wall";
|
|
||||||
return prov.models()
|
|
||||||
.getExistingFile(prov.modLoc("block/gauge/" + partial));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,54 @@
|
||||||
|
package com.simibubi.create.content.contraptions.wrench;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
import com.simibubi.create.AllBlocks;
|
||||||
|
import com.simibubi.create.content.contraptions.fluids.FluidPropagator;
|
||||||
|
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.item.ItemUseContext;
|
||||||
|
import net.minecraft.util.ActionResultType;
|
||||||
|
import net.minecraft.util.Direction;
|
||||||
|
import net.minecraft.util.Direction.Axis;
|
||||||
|
import net.minecraft.util.Direction.AxisDirection;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.world.IBlockReader;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public interface IWrenchableWithBracket extends IWrenchable {
|
||||||
|
|
||||||
|
public Optional<ItemStack> removeBracket(IBlockReader world, BlockPos pos);
|
||||||
|
|
||||||
|
@Override
|
||||||
|
default ActionResultType onWrenched(BlockState state, ItemUseContext context) {
|
||||||
|
if (tryRemoveBracket(context))
|
||||||
|
return ActionResultType.SUCCESS;
|
||||||
|
return IWrenchable.super.onWrenched(state, context);
|
||||||
|
}
|
||||||
|
|
||||||
|
default boolean tryRemoveBracket(ItemUseContext context) {
|
||||||
|
World world = context.getWorld();
|
||||||
|
BlockPos pos = context.getPos();
|
||||||
|
Optional<ItemStack> bracket = removeBracket(world, pos);
|
||||||
|
BlockState blockState = world.getBlockState(pos);
|
||||||
|
if (bracket.isPresent()) {
|
||||||
|
PlayerEntity player = context.getPlayer();
|
||||||
|
if (!world.isRemote && !player.isCreative())
|
||||||
|
player.inventory.placeItemBackInInventory(world, bracket.get());
|
||||||
|
if (!world.isRemote && AllBlocks.FLUID_PIPE.has(blockState)) {
|
||||||
|
Axis preferred = FluidPropagator.getStraightPipeAxis(blockState);
|
||||||
|
Direction preferredDirection =
|
||||||
|
preferred == null ? Direction.UP : Direction.getFacingFromAxis(AxisDirection.POSITIVE, preferred);
|
||||||
|
BlockState updated = AllBlocks.FLUID_PIPE.get()
|
||||||
|
.updateBlockState(blockState, preferredDirection, null, world, pos);
|
||||||
|
if (updated != blockState)
|
||||||
|
world.setBlockState(pos, updated);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -75,7 +75,9 @@ public class BlockzapperItem extends ZapperItem {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillItemGroup(ItemGroup group, NonNullList<ItemStack> items) {
|
public void fillItemGroup(ItemGroup group, NonNullList<ItemStack> items) {
|
||||||
if (group == Create.baseCreativeTab) {
|
if (group != Create.baseCreativeTab && group != ItemGroup.SEARCH)
|
||||||
|
return;
|
||||||
|
|
||||||
ItemStack gunWithoutStuff = new ItemStack(this);
|
ItemStack gunWithoutStuff = new ItemStack(this);
|
||||||
items.add(gunWithoutStuff);
|
items.add(gunWithoutStuff);
|
||||||
|
|
||||||
|
@ -89,7 +91,6 @@ public class BlockzapperItem extends ZapperItem {
|
||||||
setTier(c, ComponentTier.Chromatic, gunWithPurpurStuff);
|
setTier(c, ComponentTier.Chromatic, gunWithPurpurStuff);
|
||||||
items.add(gunWithPurpurStuff);
|
items.add(gunWithPurpurStuff);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
protected boolean activate(World world, PlayerEntity player, ItemStack stack, BlockState selectedState,
|
protected boolean activate(World world, PlayerEntity player, ItemStack stack, BlockState selectedState,
|
||||||
BlockRayTraceResult raytrace) {
|
BlockRayTraceResult raytrace) {
|
||||||
|
|
|
@ -234,7 +234,7 @@ public class SchematicHandler {
|
||||||
selectionScreen.cycle((int) delta);
|
selectionScreen.cycle((int) delta);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (!AllKeys.ctrlDown())
|
if (AllKeys.ctrlDown())
|
||||||
return currentTool.getTool()
|
return currentTool.getTool()
|
||||||
.handleMouseWheel(delta);
|
.handleMouseWheel(delta);
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -12,6 +12,7 @@ public class AllCommands {
|
||||||
//general purpose
|
//general purpose
|
||||||
.then(ToggleDebugCommand.register())
|
.then(ToggleDebugCommand.register())
|
||||||
.then(OverlayConfigCommand.register())
|
.then(OverlayConfigCommand.register())
|
||||||
|
.then(FixLightingCommand.register())
|
||||||
|
|
||||||
//dev-util
|
//dev-util
|
||||||
//Comment out for release
|
//Comment out for release
|
||||||
|
|
|
@ -10,9 +10,11 @@ import com.simibubi.create.foundation.config.AllConfigs;
|
||||||
import com.simibubi.create.foundation.gui.ScreenOpener;
|
import com.simibubi.create.foundation.gui.ScreenOpener;
|
||||||
import com.simibubi.create.foundation.networking.SimplePacketBase;
|
import com.simibubi.create.foundation.networking.SimplePacketBase;
|
||||||
|
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.network.PacketBuffer;
|
import net.minecraft.network.PacketBuffer;
|
||||||
import net.minecraftforge.api.distmarker.Dist;
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||||
|
import net.minecraftforge.common.ForgeConfig;
|
||||||
import net.minecraftforge.fml.DistExecutor;
|
import net.minecraftforge.fml.DistExecutor;
|
||||||
import net.minecraftforge.fml.network.NetworkEvent;
|
import net.minecraftforge.fml.network.NetworkEvent;
|
||||||
|
|
||||||
|
@ -39,24 +41,27 @@ public class ConfigureConfigPacket extends SimplePacketBase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handle(Supplier<NetworkEvent.Context> ctx) {
|
public void handle(Supplier<NetworkEvent.Context> ctx) {
|
||||||
ctx.get().enqueueWork(() -> DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> {
|
ctx.get()
|
||||||
|
.enqueueWork(() -> DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> {
|
||||||
try {
|
try {
|
||||||
Actions.valueOf(option).performAction(value);
|
Actions.valueOf(option)
|
||||||
|
.performAction(value);
|
||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
LogManager.getLogger().warn("Received ConfigureConfigPacket with invalid Option: " + option);
|
LogManager.getLogger()
|
||||||
|
.warn("Received ConfigureConfigPacket with invalid Option: " + option);
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
ctx.get().setPacketHandled(true);
|
ctx.get()
|
||||||
|
.setPacketHandled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
enum Actions {
|
enum Actions {
|
||||||
rainbowDebug((value) -> {
|
rainbowDebug((value) -> {
|
||||||
AllConfigs.CLIENT.rainbowDebug.set(Boolean.parseBoolean(value));
|
AllConfigs.CLIENT.rainbowDebug.set(Boolean.parseBoolean(value));
|
||||||
}),
|
}),
|
||||||
overlayScreen((value) -> {
|
overlayScreen(Actions::overlayScreenAction),
|
||||||
overlayScreenAction();
|
fixLighting(Actions::experimentalLightingAction),
|
||||||
}),
|
|
||||||
overlayReset((value) -> {
|
overlayReset((value) -> {
|
||||||
AllConfigs.CLIENT.overlayOffsetX.set(0);
|
AllConfigs.CLIENT.overlayOffsetX.set(0);
|
||||||
AllConfigs.CLIENT.overlayOffsetY.set(0);
|
AllConfigs.CLIENT.overlayOffsetY.set(0);
|
||||||
|
@ -75,9 +80,14 @@ public class ConfigureConfigPacket extends SimplePacketBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@OnlyIn(Dist.CLIENT)
|
@OnlyIn(Dist.CLIENT)
|
||||||
private static void overlayScreenAction(){
|
private static void overlayScreenAction(String value) {
|
||||||
//this doesn't work if i move it into the enum constructor like the other two. if there's a proper way to do this, please let me know
|
|
||||||
ScreenOpener.open(new GoggleConfigScreen());
|
ScreenOpener.open(new GoggleConfigScreen());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OnlyIn(Dist.CLIENT)
|
||||||
|
private static void experimentalLightingAction(String value) {
|
||||||
|
ForgeConfig.CLIENT.experimentalForgeLightPipelineEnabled.set(true);
|
||||||
|
Minecraft.getInstance().worldRenderer.loadRenderers();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
package com.simibubi.create.foundation.command;
|
||||||
|
|
||||||
|
import com.mojang.brigadier.builder.ArgumentBuilder;
|
||||||
|
import com.simibubi.create.foundation.networking.AllPackets;
|
||||||
|
|
||||||
|
import net.minecraft.command.CommandSource;
|
||||||
|
import net.minecraft.command.Commands;
|
||||||
|
import net.minecraft.entity.player.ServerPlayerEntity;
|
||||||
|
import net.minecraft.util.text.StringTextComponent;
|
||||||
|
import net.minecraftforge.fml.network.PacketDistributor;
|
||||||
|
|
||||||
|
public class FixLightingCommand {
|
||||||
|
|
||||||
|
static ArgumentBuilder<CommandSource, ?> register() {
|
||||||
|
return Commands.literal("fixLighting")
|
||||||
|
.requires(cs -> cs.hasPermissionLevel(0))
|
||||||
|
.executes(ctx -> {
|
||||||
|
AllPackets.channel.send(PacketDistributor.PLAYER.with(() -> (ServerPlayerEntity) ctx.getSource()
|
||||||
|
.getEntity()),
|
||||||
|
new ConfigureConfigPacket(ConfigureConfigPacket.Actions.fixLighting.name(), String.valueOf(true)));
|
||||||
|
|
||||||
|
ctx.getSource()
|
||||||
|
.sendFeedback(
|
||||||
|
new StringTextComponent("Forge's experimental block rendering pipeline is now enabled."), true);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
|
@ -4,7 +4,12 @@ public class CFluids extends ConfigBase {
|
||||||
|
|
||||||
public ConfigInt fluidTankCapacity = i(8, 1, "fluidTankCapacity", Comments.buckets, Comments.fluidTankCapacity);
|
public ConfigInt fluidTankCapacity = i(8, 1, "fluidTankCapacity", Comments.buckets, Comments.fluidTankCapacity);
|
||||||
public ConfigInt fluidTankMaxHeight = i(32, 1, "fluidTankMaxHeight", Comments.blocks, Comments.fluidTankMaxHeight);
|
public ConfigInt fluidTankMaxHeight = i(32, 1, "fluidTankMaxHeight", Comments.blocks, Comments.fluidTankMaxHeight);
|
||||||
public ConfigInt mechanicalPumpRange = i(16, 1, "mechanicalPumpRange", Comments.blocks, Comments.mechanicalPumpRange);
|
public ConfigInt mechanicalPumpRange =
|
||||||
|
i(16, 1, "mechanicalPumpRange", Comments.blocks, Comments.mechanicalPumpRange);
|
||||||
|
|
||||||
|
public ConfigInt hosePulleyBlockThreshold = i(10000, -1, "hosePulleyBlockThreshold", Comments.blocks,
|
||||||
|
Comments.toDisable, Comments.hosePulleyBlockThreshold);
|
||||||
|
public ConfigInt hosePulleyRange = i(128, 1, "hosePulleyRange", Comments.blocks, Comments.hosePulleyRange);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
|
@ -16,7 +21,13 @@ public class CFluids extends ConfigBase {
|
||||||
static String buckets = "[in Buckets]";
|
static String buckets = "[in Buckets]";
|
||||||
static String fluidTankCapacity = "The amount of liquid a tank can hold per block.";
|
static String fluidTankCapacity = "The amount of liquid a tank can hold per block.";
|
||||||
static String fluidTankMaxHeight = "The maximum height a fluid tank can reach.";
|
static String fluidTankMaxHeight = "The maximum height a fluid tank can reach.";
|
||||||
static String mechanicalPumpRange = "The maximum distance a mechanical pump can push or pull liquids on either side.";
|
static String mechanicalPumpRange =
|
||||||
|
"The maximum distance a mechanical pump can push or pull liquids on either side.";
|
||||||
|
|
||||||
|
static String hosePulleyRange = "The maximum distance a hose pulley can draw fluid blocks from.";
|
||||||
|
static String toDisable = "[-1 to disable this behaviour]";
|
||||||
|
static String hosePulleyBlockThreshold =
|
||||||
|
"The minimum amount of fluid blocks the hose pulley needs to find before deeming it an infinite source.";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,56 @@
|
||||||
|
package com.simibubi.create.foundation.data;
|
||||||
|
|
||||||
|
import com.simibubi.create.content.contraptions.relays.gauge.GaugeBlock;
|
||||||
|
import com.tterrag.registrate.providers.DataGenContext;
|
||||||
|
import com.tterrag.registrate.providers.RegistrateBlockstateProvider;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.util.Direction;
|
||||||
|
import net.minecraft.util.Direction.Axis;
|
||||||
|
import net.minecraftforge.client.model.generators.ModelFile;
|
||||||
|
|
||||||
|
public abstract class DirectionalAxisBlockStateGen extends SpecialBlockStateGen {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getXRotation(BlockState state) {
|
||||||
|
Direction direction = state.get(GaugeBlock.FACING);
|
||||||
|
boolean alongFirst = state.get(GaugeBlock.AXIS_ALONG_FIRST_COORDINATE);
|
||||||
|
|
||||||
|
if (direction == Direction.DOWN)
|
||||||
|
return 180;
|
||||||
|
if (direction == Direction.UP)
|
||||||
|
return 0;
|
||||||
|
if ((direction.getAxis() == Axis.X) == alongFirst)
|
||||||
|
return 90;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getYRotation(BlockState state) {
|
||||||
|
Direction direction = state.get(GaugeBlock.FACING);
|
||||||
|
boolean alongFirst = state.get(GaugeBlock.AXIS_ALONG_FIRST_COORDINATE);
|
||||||
|
|
||||||
|
if (direction.getAxis()
|
||||||
|
.isVertical())
|
||||||
|
return alongFirst ? 90 : 0;
|
||||||
|
|
||||||
|
return horizontalAngle(direction) + 90;
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract <T extends Block> String getModelPrefix(DataGenContext<Block, T> ctx,
|
||||||
|
RegistrateBlockstateProvider prov, BlockState state);
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <T extends Block> ModelFile getModel(DataGenContext<Block, T> ctx, RegistrateBlockstateProvider prov,
|
||||||
|
BlockState state) {
|
||||||
|
boolean vertical = state.get(GaugeBlock.FACING)
|
||||||
|
.getAxis()
|
||||||
|
.isVertical();
|
||||||
|
String partial = vertical ? "" : "_wall";
|
||||||
|
return prov.models()
|
||||||
|
.getExistingFile(prov.modLoc(getModelPrefix(ctx, prov, state) + partial));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -14,6 +14,7 @@ import net.minecraft.data.IFinishedRecipe;
|
||||||
import net.minecraft.data.RecipeProvider;
|
import net.minecraft.data.RecipeProvider;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.tags.ITag;
|
import net.minecraft.tags.ITag;
|
||||||
|
import net.minecraft.tags.ItemTags;
|
||||||
import net.minecraft.util.IItemProvider;
|
import net.minecraft.util.IItemProvider;
|
||||||
import net.minecraftforge.common.Tags;
|
import net.minecraftforge.common.Tags;
|
||||||
|
|
||||||
|
@ -50,6 +51,10 @@ public abstract class CreateRecipeProvider extends RecipeProvider {
|
||||||
return Tags.Items.DUSTS_REDSTONE;
|
return Tags.Items.DUSTS_REDSTONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static ITag.INamedTag<Item> planks() {
|
||||||
|
return ItemTags.PLANKS;
|
||||||
|
}
|
||||||
|
|
||||||
static ITag.INamedTag<Item> gold() {
|
static ITag.INamedTag<Item> gold() {
|
||||||
return AllTags.forgeItemTag("ingots/gold");
|
return AllTags.forgeItemTag("ingots/gold");
|
||||||
}
|
}
|
||||||
|
|
|
@ -422,6 +422,22 @@ public class StandardRecipeGen extends CreateRecipeProvider {
|
||||||
.patternLine("SCS")
|
.patternLine("SCS")
|
||||||
.patternLine(" I ")),
|
.patternLine(" I ")),
|
||||||
|
|
||||||
|
WOODEN_BRACKET = create(AllBlocks.WOODEN_BRACKET).returns(4)
|
||||||
|
.unlockedBy(I::andesite)
|
||||||
|
.viaShaped(b -> b.key('S', Tags.Items.RODS_WOODEN)
|
||||||
|
.key('P', I.planks())
|
||||||
|
.key('C', I.andesite())
|
||||||
|
.patternLine("SSS")
|
||||||
|
.patternLine("PCP")),
|
||||||
|
|
||||||
|
METAL_BRACKET = create(AllBlocks.METAL_BRACKET).returns(4)
|
||||||
|
.unlockedBy(I::andesite)
|
||||||
|
.viaShaped(b -> b.key('S', Tags.Items.NUGGETS_IRON)
|
||||||
|
.key('P', I.iron())
|
||||||
|
.key('C', I.andesite())
|
||||||
|
.patternLine("SSS")
|
||||||
|
.patternLine("PCP")),
|
||||||
|
|
||||||
FLUID_PIPE = create(AllBlocks.FLUID_PIPE).returns(16)
|
FLUID_PIPE = create(AllBlocks.FLUID_PIPE).returns(16)
|
||||||
.unlockedByTag(I::copper)
|
.unlockedByTag(I::copper)
|
||||||
.viaShaped(b -> b.key('S', I.copperSheet())
|
.viaShaped(b -> b.key('S', I.copperSheet())
|
||||||
|
@ -459,8 +475,7 @@ public class StandardRecipeGen extends CreateRecipeProvider {
|
||||||
.patternLine("S")),
|
.patternLine("S")),
|
||||||
|
|
||||||
ITEM_DRAIN = create(AllBlocks.ITEM_DRAIN).unlockedBy(I::copperCasing)
|
ITEM_DRAIN = create(AllBlocks.ITEM_DRAIN).unlockedBy(I::copperCasing)
|
||||||
.viaShaped(b -> b
|
.viaShaped(b -> b.key('P', Blocks.IRON_BARS)
|
||||||
.key('P', Blocks.IRON_BARS)
|
|
||||||
.key('S', I.copperCasing())
|
.key('S', I.copperCasing())
|
||||||
.patternLine("P")
|
.patternLine("P")
|
||||||
.patternLine("S")),
|
.patternLine("S")),
|
||||||
|
@ -499,8 +514,7 @@ public class StandardRecipeGen extends CreateRecipeProvider {
|
||||||
.patternLine(" I ")),
|
.patternLine(" I ")),
|
||||||
|
|
||||||
HOSE_PULLEY = create(AllBlocks.HOSE_PULLEY).unlockedByTag(I::copper)
|
HOSE_PULLEY = create(AllBlocks.HOSE_PULLEY).unlockedByTag(I::copper)
|
||||||
.viaShaped(b -> b
|
.viaShaped(b -> b.key('S', I.shaft())
|
||||||
.key('S', I.shaft())
|
|
||||||
.key('P', AllBlocks.FLUID_PIPE.get())
|
.key('P', AllBlocks.FLUID_PIPE.get())
|
||||||
.key('B', I.copperCasing())
|
.key('B', I.copperCasing())
|
||||||
.key('C', Items.DRIED_KELP)
|
.key('C', Items.DRIED_KELP)
|
||||||
|
|
|
@ -12,6 +12,8 @@ import com.simibubi.create.content.contraptions.processing.EmptyingByBasin;
|
||||||
import com.simibubi.create.foundation.tileEntity.SmartTileEntity;
|
import com.simibubi.create.foundation.tileEntity.SmartTileEntity;
|
||||||
import com.simibubi.create.foundation.utility.Pair;
|
import com.simibubi.create.foundation.utility.Pair;
|
||||||
|
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.block.Blocks;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.fluid.Fluid;
|
import net.minecraft.fluid.Fluid;
|
||||||
import net.minecraft.fluid.Fluids;
|
import net.minecraft.fluid.Fluids;
|
||||||
|
@ -44,6 +46,11 @@ public class FluidHelper {
|
||||||
return convertToStill(fluid) == Fluids.LAVA;
|
return convertToStill(fluid) == Fluids.LAVA;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean hasBlockState(Fluid fluid) {
|
||||||
|
BlockState blockState = fluid.getDefaultState().getBlockState();
|
||||||
|
return blockState != null && blockState != Blocks.AIR.getDefaultState();
|
||||||
|
}
|
||||||
|
|
||||||
public static Fluid convertToFlowing(Fluid fluid) {
|
public static Fluid convertToFlowing(Fluid fluid) {
|
||||||
if (fluid == Fluids.WATER)
|
if (fluid == Fluids.WATER)
|
||||||
return Fluids.FLOWING_WATER;
|
return Fluids.FLOWING_WATER;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.simibubi.create.foundation.fluid;
|
package com.simibubi.create.foundation.fluid;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
@ -13,8 +14,8 @@ import com.google.gson.JsonElement;
|
||||||
import com.google.gson.JsonObject;
|
import com.google.gson.JsonObject;
|
||||||
import com.google.gson.JsonParser;
|
import com.google.gson.JsonParser;
|
||||||
import com.google.gson.JsonSyntaxException;
|
import com.google.gson.JsonSyntaxException;
|
||||||
import com.simibubi.create.foundation.data.NamedTag;
|
|
||||||
|
|
||||||
|
import net.minecraft.fluid.FlowingFluid;
|
||||||
import net.minecraft.fluid.Fluid;
|
import net.minecraft.fluid.Fluid;
|
||||||
import net.minecraft.nbt.CompoundNBT;
|
import net.minecraft.nbt.CompoundNBT;
|
||||||
import net.minecraft.network.PacketBuffer;
|
import net.minecraft.network.PacketBuffer;
|
||||||
|
@ -182,7 +183,8 @@ public abstract class FluidIngredient implements Predicate<FluidStack> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected List<FluidStack> determineMatchingFluidStacks() {
|
protected List<FluidStack> determineMatchingFluidStacks() {
|
||||||
return ImmutableList.of(new FluidStack(fluid, amountRequired, tagToMatch));
|
return ImmutableList.of(tagToMatch.isEmpty() ? new FluidStack(fluid, amountRequired)
|
||||||
|
: new FluidStack(fluid, amountRequired, tagToMatch));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -193,20 +195,30 @@ public abstract class FluidIngredient implements Predicate<FluidStack> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean testInternal(FluidStack t) {
|
protected boolean testInternal(FluidStack t) {
|
||||||
|
if (tag == null)
|
||||||
|
for (FluidStack accepted : getMatchingFluidStacks())
|
||||||
|
if (accepted.getFluid()
|
||||||
|
.isEquivalentTo(t.getFluid()))
|
||||||
|
return true;
|
||||||
return t.getFluid()
|
return t.getFluid()
|
||||||
.isIn(tag);
|
.isIn(tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void readInternal(PacketBuffer buffer) {
|
protected void readInternal(PacketBuffer buffer) {
|
||||||
ResourceLocation resourcelocation = buffer.readResourceLocation();
|
int size = buffer.readVarInt();
|
||||||
tag = new NamedTag<>(FluidTags.func_226157_a_()
|
matchingFluidStacks = new ArrayList<>(size);
|
||||||
.get(resourcelocation), resourcelocation);
|
for (int i = 0; i < size; i++)
|
||||||
|
matchingFluidStacks.add(buffer.readFluidStack());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void writeInternal(PacketBuffer buffer) {
|
protected void writeInternal(PacketBuffer buffer) {
|
||||||
buffer.writeResourceLocation(tag.getId());
|
// Tag has to be resolved on the server before sending
|
||||||
|
List<FluidStack> matchingFluidStacks = getMatchingFluidStacks();
|
||||||
|
buffer.writeVarInt(matchingFluidStacks.size());
|
||||||
|
matchingFluidStacks.stream()
|
||||||
|
.forEach(buffer::writeFluidStack);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -232,6 +244,12 @@ public abstract class FluidIngredient implements Predicate<FluidStack> {
|
||||||
protected List<FluidStack> determineMatchingFluidStacks() {
|
protected List<FluidStack> determineMatchingFluidStacks() {
|
||||||
return tag.values()
|
return tag.values()
|
||||||
.stream()
|
.stream()
|
||||||
|
.map(f -> {
|
||||||
|
if (f instanceof FlowingFluid)
|
||||||
|
return ((FlowingFluid) f).getStillFluid();
|
||||||
|
return f;
|
||||||
|
})
|
||||||
|
.distinct()
|
||||||
.map(f -> new FluidStack(f, amountRequired))
|
.map(f -> new FluidStack(f, amountRequired))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@ import com.simibubi.create.AllBlockPartials;
|
||||||
import com.simibubi.create.foundation.fluid.FluidRenderer;
|
import com.simibubi.create.foundation.fluid.FluidRenderer;
|
||||||
import com.simibubi.create.foundation.utility.ColorHelper;
|
import com.simibubi.create.foundation.utility.ColorHelper;
|
||||||
import com.simibubi.create.foundation.utility.VecHelper;
|
import com.simibubi.create.foundation.utility.VecHelper;
|
||||||
|
import com.simibubi.create.foundation.utility.VirtualEmptyModelData;
|
||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.Blocks;
|
import net.minecraft.block.Blocks;
|
||||||
|
@ -205,7 +206,7 @@ public class GuiGameElement {
|
||||||
Vector3d rgb = ColorHelper.getRGB(color);
|
Vector3d rgb = ColorHelper.getRGB(color);
|
||||||
blockRenderer.getBlockModelRenderer()
|
blockRenderer.getBlockModelRenderer()
|
||||||
.renderModel(ms.peek(), vb, blockState, blockmodel, (float) rgb.x, (float) rgb.y, (float) rgb.z,
|
.renderModel(ms.peek(), vb, blockState, blockmodel, (float) rgb.x, (float) rgb.y, (float) rgb.z,
|
||||||
0xF000F0, OverlayTexture.DEFAULT_UV, EmptyModelData.INSTANCE);
|
0xF000F0, OverlayTexture.DEFAULT_UV, VirtualEmptyModelData.INSTANCE);
|
||||||
buffer.draw();
|
buffer.draw();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -224,7 +225,7 @@ public class GuiGameElement {
|
||||||
if (blockState.getBlock() instanceof FireBlock) {
|
if (blockState.getBlock() instanceof FireBlock) {
|
||||||
RenderHelper.disableGuiDepthLighting();
|
RenderHelper.disableGuiDepthLighting();
|
||||||
blockRenderer.renderBlock(blockState, ms, buffer, 0xF000F0, OverlayTexture.DEFAULT_UV,
|
blockRenderer.renderBlock(blockState, ms, buffer, 0xF000F0, OverlayTexture.DEFAULT_UV,
|
||||||
EmptyModelData.INSTANCE);
|
VirtualEmptyModelData.INSTANCE);
|
||||||
RenderHelper.enable();
|
RenderHelper.enable();
|
||||||
buffer.draw();
|
buffer.draw();
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -268,6 +268,16 @@ public class SmartFluidTankBehaviour extends TileEntityBehaviour {
|
||||||
renderedFluid = tank.getFluid();
|
renderedFluid = tank.getFluid();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isEmpty(float partialTicks) {
|
||||||
|
FluidStack renderedFluid = getRenderedFluid();
|
||||||
|
if (renderedFluid.isEmpty())
|
||||||
|
return true;
|
||||||
|
float units = getTotalUnits(partialTicks);
|
||||||
|
if (units < 1)
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.simibubi.create.foundation.utility;
|
package com.simibubi.create.foundation.utility;
|
||||||
|
|
||||||
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.function.BiConsumer;
|
import java.util.function.BiConsumer;
|
||||||
import java.util.function.BiFunction;
|
import java.util.function.BiFunction;
|
||||||
|
@ -12,7 +13,7 @@ import com.google.common.collect.ImmutableList;
|
||||||
import net.minecraft.nbt.CompoundNBT;
|
import net.minecraft.nbt.CompoundNBT;
|
||||||
import net.minecraft.nbt.ListNBT;
|
import net.minecraft.nbt.ListNBT;
|
||||||
|
|
||||||
public class Couple<T> extends Pair<T, T> {
|
public class Couple<T> extends Pair<T, T> implements Iterable<T> {
|
||||||
|
|
||||||
private static Couple<Boolean> TRUE_AND_FALSE = Couple.create(true, false);
|
private static Couple<Boolean> TRUE_AND_FALSE = Couple.create(true, false);
|
||||||
|
|
||||||
|
@ -62,7 +63,8 @@ public class Couple<T> extends Pair<T, T> {
|
||||||
setSecond(function.apply(getSecond(), values.getSecond()));
|
setSecond(function.apply(getSecond(), values.getSecond()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void forEach(Consumer<T> consumer) {
|
@Override
|
||||||
|
public void forEach(Consumer<? super T> consumer) {
|
||||||
consumer.accept(getFirst());
|
consumer.accept(getFirst());
|
||||||
consumer.accept(getSecond());
|
consumer.accept(getSecond());
|
||||||
}
|
}
|
||||||
|
@ -89,4 +91,36 @@ public class Couple<T> extends Pair<T, T> {
|
||||||
return new Couple<>(readCompoundList.get(0), readCompoundList.get(1));
|
return new Couple<>(readCompoundList.get(0), readCompoundList.get(1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Iterator<T> iterator() {
|
||||||
|
return new Couplerator<>(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static class Couplerator<T> implements Iterator<T> {
|
||||||
|
|
||||||
|
int state;
|
||||||
|
private Couple<T> couple;
|
||||||
|
|
||||||
|
public Couplerator(Couple<T> couple) {
|
||||||
|
this.couple = couple;
|
||||||
|
state = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasNext() {
|
||||||
|
return state != 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public T next() {
|
||||||
|
state++;
|
||||||
|
if (state == 1)
|
||||||
|
return couple.first;
|
||||||
|
if (state == 2)
|
||||||
|
return couple.second;
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,37 @@
|
||||||
|
package com.simibubi.create.foundation.utility;
|
||||||
|
|
||||||
|
public class IntAttached<V> extends Pair<Integer, V> {
|
||||||
|
|
||||||
|
protected IntAttached(Integer first, V second) {
|
||||||
|
super(first, second);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static <V> IntAttached<V> with(int number, V value) {
|
||||||
|
return new IntAttached<>(number, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static <V> IntAttached<V> withZero(V value) {
|
||||||
|
return new IntAttached<>(0, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isZero() {
|
||||||
|
return first.intValue() == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isOrBelowZero() {
|
||||||
|
return first.intValue() <= 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void increment() {
|
||||||
|
first++;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void decrement() {
|
||||||
|
first--;
|
||||||
|
}
|
||||||
|
|
||||||
|
public V getValue() {
|
||||||
|
return getSecond();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -24,7 +24,6 @@ import net.minecraft.client.renderer.texture.OverlayTexture;
|
||||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||||
import net.minecraft.util.Direction;
|
import net.minecraft.util.Direction;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraftforge.client.model.data.EmptyModelData;
|
|
||||||
|
|
||||||
public class SuperByteBufferCache {
|
public class SuperByteBufferCache {
|
||||||
|
|
||||||
|
@ -116,7 +115,7 @@ public class SuperByteBufferCache {
|
||||||
|
|
||||||
builder.begin(GL11.GL_QUADS, DefaultVertexFormats.BLOCK);
|
builder.begin(GL11.GL_QUADS, DefaultVertexFormats.BLOCK);
|
||||||
blockRenderer.renderModel(mc.world, model, referenceState, BlockPos.ZERO.up(255), ms, builder, true,
|
blockRenderer.renderModel(mc.world, model, referenceState, BlockPos.ZERO.up(255), ms, builder, true,
|
||||||
mc.world.rand, 42, OverlayTexture.DEFAULT_UV, EmptyModelData.INSTANCE);
|
mc.world.rand, 42, OverlayTexture.DEFAULT_UV, VirtualEmptyModelData.INSTANCE);
|
||||||
builder.finishDrawing();
|
builder.finishDrawing();
|
||||||
|
|
||||||
return new SuperByteBuffer(builder);
|
return new SuperByteBuffer(builder);
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
package com.simibubi.create.foundation.utility;
|
||||||
|
|
||||||
|
import net.minecraftforge.client.model.data.IModelData;
|
||||||
|
import net.minecraftforge.client.model.data.ModelProperty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This model data instance is passed whenever a model is rendered without
|
||||||
|
* available in-world context. IBakedModel#getModelData can react accordingly
|
||||||
|
* and avoid looking for model data itself
|
||||||
|
**/
|
||||||
|
public enum VirtualEmptyModelData implements IModelData {
|
||||||
|
|
||||||
|
INSTANCE;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasProperty(ModelProperty<?> prop) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <T> T getData(ModelProperty<T> prop) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <T> T setData(ModelProperty<T> prop, T data) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -123,23 +123,10 @@
|
||||||
"up": {"uv": [6, 0, 8, 6], "rotation": 90, "texture": "#3"}
|
"up": {"uv": [6, 0, 8, 6], "rotation": 90, "texture": "#3"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "BackBottom",
|
|
||||||
"from": [3.9, -2, 18],
|
|
||||||
"to": [12.1, 2, 26],
|
|
||||||
"rotation": {"angle": -22.5, "axis": "x", "origin": [8, -4, 17]},
|
|
||||||
"faces": {
|
|
||||||
"east": {"uv": [12, 12, 14, 16], "rotation": 270, "texture": "#7"},
|
|
||||||
"south": {"uv": [8, 13, 12, 15], "rotation": 180, "texture": "#7"},
|
|
||||||
"west": {"uv": [12, 12, 14, 16], "rotation": 270, "texture": "#7"},
|
|
||||||
"up": {"uv": [8, 12, 12, 16], "rotation": 180, "texture": "#7"},
|
|
||||||
"down": {"uv": [8, 12, 12, 16], "rotation": 180, "texture": "#7"}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "Back",
|
"name": "Back",
|
||||||
"from": [2.1, -2.1, 14],
|
"from": [2.1, -2.1, 14],
|
||||||
"to": [13.9, 13.9, 17.9],
|
"to": [13.9, 13.95, 18.1],
|
||||||
"rotation": {"angle": 0, "axis": "y", "origin": [8, -8, 6]},
|
"rotation": {"angle": 0, "axis": "y", "origin": [8, -8, 6]},
|
||||||
"faces": {
|
"faces": {
|
||||||
"north": {"uv": [0, 4, 16, 16], "rotation": 90, "texture": "#5"},
|
"north": {"uv": [0, 4, 16, 16], "rotation": 90, "texture": "#5"},
|
||||||
|
@ -204,7 +191,7 @@
|
||||||
{
|
{
|
||||||
"name": "Base",
|
"name": "Base",
|
||||||
"origin": [9, -4, 8],
|
"origin": [9, -4, 8],
|
||||||
"children": [9, 10, 11, 12, 13]
|
"children": [9, 10, 11, 12]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,23 +108,10 @@
|
||||||
"down": {"uv": [0, 0, 1, 6], "texture": "#particle"}
|
"down": {"uv": [0, 0, 1, 6], "texture": "#particle"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "BackBottom",
|
|
||||||
"from": [3.9, -2, 18],
|
|
||||||
"to": [12.1, 2, 26],
|
|
||||||
"rotation": {"angle": -22.5, "axis": "x", "origin": [8, -4, 17]},
|
|
||||||
"faces": {
|
|
||||||
"east": {"uv": [12, 12, 14, 16], "rotation": 270, "texture": "#7"},
|
|
||||||
"south": {"uv": [8, 13, 12, 15], "rotation": 180, "texture": "#7"},
|
|
||||||
"west": {"uv": [12, 12, 14, 16], "rotation": 270, "texture": "#7"},
|
|
||||||
"up": {"uv": [8, 12, 12, 16], "rotation": 180, "texture": "#7"},
|
|
||||||
"down": {"uv": [8, 12, 12, 16], "rotation": 180, "texture": "#7"}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "Back",
|
"name": "Back",
|
||||||
"from": [2.1, -2.1, 14],
|
"from": [2.1, -2.1, 14],
|
||||||
"to": [13.9, 13.9, 17.9],
|
"to": [13.9, 13.95, 18.1],
|
||||||
"rotation": {"angle": 0, "axis": "y", "origin": [8, -8.1, 6]},
|
"rotation": {"angle": 0, "axis": "y", "origin": [8, -8.1, 6]},
|
||||||
"faces": {
|
"faces": {
|
||||||
"east": {"uv": [0, 0, 16, 4], "rotation": 90, "texture": "#5"},
|
"east": {"uv": [0, 0, 16, 4], "rotation": 90, "texture": "#5"},
|
||||||
|
@ -196,8 +183,8 @@
|
||||||
{
|
{
|
||||||
"name": "Base",
|
"name": "Base",
|
||||||
"origin": [9, -4, 8],
|
"origin": [9, -4, 8],
|
||||||
"children": [8, 9, 10, 11, 12]
|
"children": [8, 9, 10, 11]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}, 13]
|
}, 12]
|
||||||
}
|
}
|
|
@ -0,0 +1,208 @@
|
||||||
|
{
|
||||||
|
"credit": "Made with Blockbench",
|
||||||
|
"parent": "block/block",
|
||||||
|
"textures": {
|
||||||
|
"4": "#plate",
|
||||||
|
"5": "#bracket"
|
||||||
|
},
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"from": [11.9, 3, 2],
|
||||||
|
"to": [14, 6, 6],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [8, 4.5, -24]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [8, 3, 10, 6], "texture": "#5"},
|
||||||
|
"east": {"uv": [10, 3, 14, 6], "texture": "#5"},
|
||||||
|
"south": {"uv": [10, 3, 8, 6], "texture": "#5"},
|
||||||
|
"up": {"uv": [10, 1, 14, 3], "rotation": 90, "texture": "#5"},
|
||||||
|
"down": {"uv": [10, 1, 14, 3], "rotation": 90, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [4.1, 3, 2],
|
||||||
|
"to": [11.9, 13, 6],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [10, 4.5, -24]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 8, 10], "rotation": 180, "texture": "#5"},
|
||||||
|
"east": {"uv": [7, 0, 8, 10], "texture": "#5"},
|
||||||
|
"south": {"uv": [0, 0, 8, 10], "rotation": 180, "texture": "#5"},
|
||||||
|
"west": {"uv": [7, 0, 8, 10], "texture": "#5"},
|
||||||
|
"up": {"uv": [8, 6, 16, 10], "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [2, 3, 2],
|
||||||
|
"to": [4.1, 6, 6],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [3, 4.5, -24]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [10, 3, 8, 6], "texture": "#5"},
|
||||||
|
"south": {"uv": [8, 3, 10, 6], "texture": "#5"},
|
||||||
|
"west": {"uv": [10, 3, 14, 6], "texture": "#5"},
|
||||||
|
"up": {"uv": [10, 1, 14, 3], "rotation": 270, "texture": "#5"},
|
||||||
|
"down": {"uv": [10, 1, 14, 3], "rotation": 270, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [2, 10, 2],
|
||||||
|
"to": [4.1, 13, 6],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [3, 11.5, -24]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [10, 3, 8, 6], "texture": "#5"},
|
||||||
|
"south": {"uv": [8, 3, 10, 6], "texture": "#5"},
|
||||||
|
"west": {"uv": [10, 3, 14, 6], "texture": "#5"},
|
||||||
|
"up": {"uv": [10, 1, 14, 3], "rotation": 270, "texture": "#5"},
|
||||||
|
"down": {"uv": [10, 1, 14, 3], "rotation": 270, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [12.5, 6, 3.5],
|
||||||
|
"to": [13.5, 14, 4.5],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [20, 14, -16]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [15, 8, 16, 16], "texture": "#4"},
|
||||||
|
"east": {"uv": [14, 8, 15, 16], "texture": "#4"},
|
||||||
|
"south": {"uv": [15, 8, 16, 16], "texture": "#4"},
|
||||||
|
"west": {"uv": [15, 8, 16, 16], "texture": "#4"},
|
||||||
|
"up": {"uv": [14, 7, 15, 8], "texture": "#4"},
|
||||||
|
"down": {"uv": [0, 0, 0, 0], "texture": "#4"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [11.9, 10, 2],
|
||||||
|
"to": [14, 13, 6],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [18, 11.5, -24]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [8, 3, 10, 6], "texture": "#5"},
|
||||||
|
"east": {"uv": [10, 3, 14, 6], "texture": "#5"},
|
||||||
|
"south": {"uv": [10, 3, 8, 6], "texture": "#5"},
|
||||||
|
"up": {"uv": [10, 1, 14, 3], "rotation": 90, "texture": "#5"},
|
||||||
|
"down": {"uv": [10, 1, 14, 3], "rotation": 90, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [2.5, 6, 3.5],
|
||||||
|
"to": [3.5, 14, 4.5],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [10, 14, -16]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [15, 8, 16, 16], "texture": "#4"},
|
||||||
|
"east": {"uv": [14, 8, 15, 16], "texture": "#4"},
|
||||||
|
"south": {"uv": [15, 8, 16, 16], "texture": "#4"},
|
||||||
|
"west": {"uv": [15, 8, 16, 16], "texture": "#4"},
|
||||||
|
"up": {"uv": [14, 7, 15, 8], "texture": "#4"},
|
||||||
|
"down": {"uv": [0, 0, 0, 0], "texture": "#4"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [11.9, 3, 10],
|
||||||
|
"to": [14, 6, 14],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [8, 4.5, -16]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [8, 3, 10, 6], "texture": "#5"},
|
||||||
|
"east": {"uv": [10, 3, 14, 6], "texture": "#5"},
|
||||||
|
"south": {"uv": [10, 3, 8, 6], "texture": "#5"},
|
||||||
|
"up": {"uv": [10, 1, 14, 3], "rotation": 90, "texture": "#5"},
|
||||||
|
"down": {"uv": [10, 1, 14, 3], "rotation": 90, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [4.1, 3, 10],
|
||||||
|
"to": [11.9, 13, 14],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [10, 4.5, -16]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 8, 10], "rotation": 180, "texture": "#5"},
|
||||||
|
"east": {"uv": [7, 0, 8, 10], "texture": "#5"},
|
||||||
|
"south": {"uv": [0, 0, 8, 10], "rotation": 180, "texture": "#5"},
|
||||||
|
"west": {"uv": [7, 0, 8, 10], "texture": "#5"},
|
||||||
|
"up": {"uv": [8, 6, 16, 10], "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [2, 3, 10],
|
||||||
|
"to": [4.1, 6, 14],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [3, 4.5, -16]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [10, 3, 8, 6], "texture": "#5"},
|
||||||
|
"south": {"uv": [8, 3, 10, 6], "texture": "#5"},
|
||||||
|
"west": {"uv": [10, 3, 14, 6], "texture": "#5"},
|
||||||
|
"up": {"uv": [10, 1, 14, 3], "rotation": 270, "texture": "#5"},
|
||||||
|
"down": {"uv": [10, 1, 14, 3], "rotation": 270, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [2, 10, 10],
|
||||||
|
"to": [4.1, 13, 14],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [3, 11.5, -16]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [10, 3, 8, 6], "texture": "#5"},
|
||||||
|
"south": {"uv": [8, 3, 10, 6], "texture": "#5"},
|
||||||
|
"west": {"uv": [10, 3, 14, 6], "texture": "#5"},
|
||||||
|
"up": {"uv": [10, 1, 14, 3], "rotation": 270, "texture": "#5"},
|
||||||
|
"down": {"uv": [10, 1, 14, 3], "rotation": 270, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [12.5, 6, 11.5],
|
||||||
|
"to": [13.5, 14, 12.5],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [20, 14, -8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [15, 8, 16, 16], "texture": "#4"},
|
||||||
|
"east": {"uv": [14, 8, 15, 16], "texture": "#4"},
|
||||||
|
"south": {"uv": [15, 8, 16, 16], "texture": "#4"},
|
||||||
|
"west": {"uv": [15, 8, 16, 16], "texture": "#4"},
|
||||||
|
"up": {"uv": [14, 7, 15, 8], "texture": "#4"},
|
||||||
|
"down": {"uv": [0, 0, 0, 0], "texture": "#4"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [11.9, 10, 10],
|
||||||
|
"to": [14, 13, 14],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [18, 11.5, -16]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [8, 3, 10, 6], "texture": "#5"},
|
||||||
|
"east": {"uv": [10, 3, 14, 6], "texture": "#5"},
|
||||||
|
"south": {"uv": [10, 3, 8, 6], "texture": "#5"},
|
||||||
|
"up": {"uv": [10, 1, 14, 3], "rotation": 90, "texture": "#5"},
|
||||||
|
"down": {"uv": [10, 1, 14, 3], "rotation": 90, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [2.5, 6, 11.5],
|
||||||
|
"to": [3.5, 14, 12.5],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [10, 14, -8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [15, 8, 16, 16], "texture": "#4"},
|
||||||
|
"east": {"uv": [14, 8, 15, 16], "texture": "#4"},
|
||||||
|
"south": {"uv": [15, 8, 16, 16], "texture": "#4"},
|
||||||
|
"west": {"uv": [15, 8, 16, 16], "texture": "#4"},
|
||||||
|
"up": {"uv": [14, 7, 15, 8], "texture": "#4"},
|
||||||
|
"down": {"uv": [0, 0, 0, 0], "texture": "#4"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [1, 0, 1],
|
||||||
|
"to": [15, 3, 6],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [8, 1.5, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 10, 14, 13], "texture": "#5"},
|
||||||
|
"east": {"uv": [0, 13, 5, 16], "rotation": 180, "texture": "#5"},
|
||||||
|
"south": {"uv": [0, 10, 14, 13], "texture": "#5"},
|
||||||
|
"west": {"uv": [0, 13, 5, 16], "texture": "#5"},
|
||||||
|
"up": {"uv": [9, 2, 14, 16], "rotation": 90, "texture": "#4"},
|
||||||
|
"down": {"uv": [9, 2, 14, 16], "rotation": 90, "texture": "#4"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [1, 0, 10],
|
||||||
|
"to": [15, 3, 15],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [8, 1.5, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 10, 14, 13], "texture": "#5"},
|
||||||
|
"east": {"uv": [0, 13, 5, 16], "texture": "#5"},
|
||||||
|
"south": {"uv": [0, 10, 14, 13], "texture": "#5"},
|
||||||
|
"west": {"uv": [0, 13, 5, 16], "rotation": 180, "texture": "#5"},
|
||||||
|
"up": {"uv": [9, 2, 14, 16], "rotation": 270, "texture": "#4"},
|
||||||
|
"down": {"uv": [9, 2, 14, 16], "rotation": 270, "texture": "#4"}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,206 @@
|
||||||
|
{
|
||||||
|
"credit": "Made with Blockbench",
|
||||||
|
"parent": "block/block",
|
||||||
|
"texture_size": [32, 32],
|
||||||
|
"textures": {
|
||||||
|
"4": "#plate",
|
||||||
|
"5": "#bracket",
|
||||||
|
"particle": "#plate"
|
||||||
|
},
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"from": [3, 2, 2],
|
||||||
|
"to": [6, 4.1, 6],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [8, 3, 10, 6], "rotation": 270, "texture": "#5"},
|
||||||
|
"east": {"uv": [10, 1, 14, 3], "rotation": 180, "texture": "#5"},
|
||||||
|
"south": {"uv": [10, 3, 8, 6], "rotation": 90, "texture": "#5"},
|
||||||
|
"west": {"uv": [10, 1, 14, 3], "rotation": 180, "texture": "#5"},
|
||||||
|
"down": {"uv": [10, 3, 14, 6], "rotation": 90, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [3, 4.1, 2],
|
||||||
|
"to": [13, 11.9, 6],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [8, 6, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 8, 10], "rotation": 90, "texture": "#5"},
|
||||||
|
"east": {"uv": [8, 6, 16, 10], "rotation": 90, "texture": "#5"},
|
||||||
|
"south": {"uv": [0, 0, 8, 10], "rotation": 270, "texture": "#5"},
|
||||||
|
"up": {"uv": [7, 0, 8, 10], "rotation": 90, "texture": "#5"},
|
||||||
|
"down": {"uv": [7, 0, 8, 10], "rotation": 90, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [3, 11.9, 2],
|
||||||
|
"to": [6, 14, 6],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [8, 13, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [10, 3, 8, 6], "rotation": 270, "texture": "#5"},
|
||||||
|
"east": {"uv": [10, 1, 14, 3], "texture": "#5"},
|
||||||
|
"south": {"uv": [8, 3, 10, 6], "rotation": 90, "texture": "#5"},
|
||||||
|
"west": {"uv": [10, 1, 14, 3], "texture": "#5"},
|
||||||
|
"up": {"uv": [10, 3, 14, 6], "rotation": 90, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [10, 11.9, 2],
|
||||||
|
"to": [13, 14, 6],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [8, 13, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [10, 3, 8, 6], "rotation": 270, "texture": "#5"},
|
||||||
|
"east": {"uv": [10, 1, 14, 3], "texture": "#5"},
|
||||||
|
"south": {"uv": [8, 3, 10, 6], "rotation": 90, "texture": "#5"},
|
||||||
|
"west": {"uv": [10, 1, 14, 3], "texture": "#5"},
|
||||||
|
"up": {"uv": [10, 3, 14, 6], "rotation": 90, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [6, 2.5, 3.5],
|
||||||
|
"to": [14, 3.5, 4.5],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [8, -4, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [15, 8, 16, 16], "rotation": 270, "texture": "#4"},
|
||||||
|
"east": {"uv": [14, 7, 15, 8], "rotation": 90, "texture": "#4"},
|
||||||
|
"south": {"uv": [15, 8, 16, 16], "rotation": 90, "texture": "#4"},
|
||||||
|
"west": {"uv": [0, 0, 0, 0], "rotation": 90, "texture": "#4"},
|
||||||
|
"up": {"uv": [15, 8, 16, 16], "rotation": 90, "texture": "#4"},
|
||||||
|
"down": {"uv": [14, 8, 15, 16], "rotation": 90, "texture": "#4"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [10, 2, 2],
|
||||||
|
"to": [13, 4.1, 6],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [8, -2, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [8, 3, 10, 6], "rotation": 270, "texture": "#5"},
|
||||||
|
"east": {"uv": [10, 1, 14, 3], "rotation": 180, "texture": "#5"},
|
||||||
|
"south": {"uv": [10, 3, 8, 6], "rotation": 90, "texture": "#5"},
|
||||||
|
"west": {"uv": [10, 1, 14, 3], "rotation": 180, "texture": "#5"},
|
||||||
|
"down": {"uv": [10, 3, 14, 6], "rotation": 90, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [6, 12.5, 3.5],
|
||||||
|
"to": [14, 13.5, 4.5],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [8, 6, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [15, 8, 16, 16], "rotation": 270, "texture": "#4"},
|
||||||
|
"east": {"uv": [14, 7, 15, 8], "rotation": 90, "texture": "#4"},
|
||||||
|
"south": {"uv": [15, 8, 16, 16], "rotation": 90, "texture": "#4"},
|
||||||
|
"west": {"uv": [0, 0, 0, 0], "rotation": 90, "texture": "#4"},
|
||||||
|
"up": {"uv": [15, 8, 16, 16], "rotation": 90, "texture": "#4"},
|
||||||
|
"down": {"uv": [14, 8, 15, 16], "rotation": 90, "texture": "#4"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [3, 2, 10],
|
||||||
|
"to": [6, 4.1, 14],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [8, 3, 10, 6], "rotation": 270, "texture": "#5"},
|
||||||
|
"east": {"uv": [10, 1, 14, 3], "rotation": 180, "texture": "#5"},
|
||||||
|
"south": {"uv": [10, 3, 8, 6], "rotation": 90, "texture": "#5"},
|
||||||
|
"west": {"uv": [10, 1, 14, 3], "rotation": 180, "texture": "#5"},
|
||||||
|
"down": {"uv": [10, 3, 14, 6], "rotation": 90, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [3, 4.1, 10],
|
||||||
|
"to": [13, 11.9, 14],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [8, 6, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 8, 10], "rotation": 90, "texture": "#5"},
|
||||||
|
"east": {"uv": [8, 6, 16, 10], "rotation": 90, "texture": "#5"},
|
||||||
|
"south": {"uv": [0, 0, 8, 10], "rotation": 270, "texture": "#5"},
|
||||||
|
"up": {"uv": [7, 0, 8, 10], "rotation": 90, "texture": "#5"},
|
||||||
|
"down": {"uv": [7, 0, 8, 10], "rotation": 90, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [3, 11.9, 10],
|
||||||
|
"to": [6, 14, 14],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [8, 13, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [10, 3, 8, 6], "rotation": 270, "texture": "#5"},
|
||||||
|
"east": {"uv": [10, 1, 14, 3], "texture": "#5"},
|
||||||
|
"south": {"uv": [8, 3, 10, 6], "rotation": 90, "texture": "#5"},
|
||||||
|
"west": {"uv": [10, 1, 14, 3], "texture": "#5"},
|
||||||
|
"up": {"uv": [10, 3, 14, 6], "rotation": 90, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [10, 11.9, 10],
|
||||||
|
"to": [13, 14, 14],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [8, 13, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [10, 3, 8, 6], "rotation": 270, "texture": "#5"},
|
||||||
|
"east": {"uv": [10, 1, 14, 3], "texture": "#5"},
|
||||||
|
"south": {"uv": [8, 3, 10, 6], "rotation": 90, "texture": "#5"},
|
||||||
|
"west": {"uv": [10, 1, 14, 3], "texture": "#5"},
|
||||||
|
"up": {"uv": [10, 3, 14, 6], "rotation": 90, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [6, 2.5, 11.5],
|
||||||
|
"to": [14, 3.5, 12.5],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [8, -4, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [15, 8, 16, 16], "rotation": 270, "texture": "#4"},
|
||||||
|
"east": {"uv": [14, 7, 15, 8], "rotation": 90, "texture": "#4"},
|
||||||
|
"south": {"uv": [15, 8, 16, 16], "rotation": 90, "texture": "#4"},
|
||||||
|
"west": {"uv": [0, 0, 0, 0], "rotation": 90, "texture": "#4"},
|
||||||
|
"up": {"uv": [15, 8, 16, 16], "rotation": 90, "texture": "#4"},
|
||||||
|
"down": {"uv": [14, 8, 15, 16], "rotation": 90, "texture": "#4"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [10, 2, 10],
|
||||||
|
"to": [13, 4.1, 14],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [8, -2, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [8, 3, 10, 6], "rotation": 270, "texture": "#5"},
|
||||||
|
"east": {"uv": [10, 1, 14, 3], "rotation": 180, "texture": "#5"},
|
||||||
|
"south": {"uv": [10, 3, 8, 6], "rotation": 90, "texture": "#5"},
|
||||||
|
"west": {"uv": [10, 1, 14, 3], "rotation": 180, "texture": "#5"},
|
||||||
|
"down": {"uv": [10, 3, 14, 6], "rotation": 90, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [6, 12.5, 11.5],
|
||||||
|
"to": [14, 13.5, 12.5],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [8, 6, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [15, 8, 16, 16], "rotation": 270, "texture": "#4"},
|
||||||
|
"east": {"uv": [14, 7, 15, 8], "rotation": 90, "texture": "#4"},
|
||||||
|
"south": {"uv": [15, 8, 16, 16], "rotation": 90, "texture": "#4"},
|
||||||
|
"west": {"uv": [0, 0, 0, 0], "rotation": 90, "texture": "#4"},
|
||||||
|
"up": {"uv": [15, 8, 16, 16], "rotation": 90, "texture": "#4"},
|
||||||
|
"down": {"uv": [14, 8, 15, 16], "rotation": 90, "texture": "#4"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [0, 1, 1],
|
||||||
|
"to": [3, 15, 6],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 10, 14, 13], "rotation": 270, "texture": "#5"},
|
||||||
|
"east": {"uv": [9, 2, 14, 16], "rotation": 180, "texture": "#4"},
|
||||||
|
"south": {"uv": [0, 10, 14, 13], "rotation": 90, "texture": "#5"},
|
||||||
|
"west": {"uv": [9, 2, 14, 16], "rotation": 180, "texture": "#4"},
|
||||||
|
"up": {"uv": [0, 13, 5, 16], "rotation": 90, "texture": "#5"},
|
||||||
|
"down": {"uv": [0, 13, 5, 16], "rotation": 270, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [0, 1, 10],
|
||||||
|
"to": [3, 15, 15],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 10, 14, 13], "rotation": 270, "texture": "#5"},
|
||||||
|
"east": {"uv": [9, 2, 14, 16], "texture": "#4"},
|
||||||
|
"south": {"uv": [0, 10, 14, 13], "rotation": 90, "texture": "#5"},
|
||||||
|
"west": {"uv": [9, 2, 14, 16], "texture": "#4"},
|
||||||
|
"up": {"uv": [0, 13, 5, 16], "rotation": 270, "texture": "#5"},
|
||||||
|
"down": {"uv": [0, 13, 5, 16], "rotation": 90, "texture": "#5"}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
110
src/main/resources/assets/create/models/block/bracket/item.json
Normal file
110
src/main/resources/assets/create/models/block/bracket/item.json
Normal file
|
@ -0,0 +1,110 @@
|
||||||
|
{
|
||||||
|
"credit": "Made with Blockbench",
|
||||||
|
"parent": "block/block",
|
||||||
|
"textures": {
|
||||||
|
"4": "#plate",
|
||||||
|
"5": "#bracket",
|
||||||
|
"particle": "#plate"
|
||||||
|
},
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"from": [1, 0, 1],
|
||||||
|
"to": [15, 3, 15],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [1.5, 0, 1.5]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 10, 14, 13], "texture": "#5"},
|
||||||
|
"east": {"uv": [0, 13, 14, 16], "texture": "#5"},
|
||||||
|
"south": {"uv": [0, 10, 14, 13], "texture": "#5"},
|
||||||
|
"west": {"uv": [0, 13, 14, 16], "texture": "#5"},
|
||||||
|
"up": {"uv": [0, 2, 14, 16], "rotation": 90, "texture": "#4"},
|
||||||
|
"down": {"uv": [0, 2, 14, 16], "rotation": 270, "texture": "#4"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [11.9, 3, 6],
|
||||||
|
"to": [14, 6, 10],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [8, 4.5, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [8, 3, 10, 6], "texture": "#5"},
|
||||||
|
"east": {"uv": [10, 3, 14, 6], "texture": "#5"},
|
||||||
|
"south": {"uv": [10, 3, 8, 6], "texture": "#5"},
|
||||||
|
"up": {"uv": [10, 1, 14, 3], "rotation": 90, "texture": "#5"},
|
||||||
|
"down": {"uv": [10, 1, 14, 3], "rotation": 90, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [4.1, 3, 6],
|
||||||
|
"to": [11.9, 13, 10],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [10, 4.5, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 8, 10], "rotation": 180, "texture": "#5"},
|
||||||
|
"east": {"uv": [7, 0, 8, 10], "texture": "#5"},
|
||||||
|
"south": {"uv": [0, 0, 8, 10], "rotation": 180, "texture": "#5"},
|
||||||
|
"west": {"uv": [7, 0, 8, 10], "texture": "#5"},
|
||||||
|
"up": {"uv": [8, 6, 16, 10], "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [2, 3, 6],
|
||||||
|
"to": [4.1, 6, 10],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [3, 4.5, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [10, 3, 8, 6], "texture": "#5"},
|
||||||
|
"south": {"uv": [8, 3, 10, 6], "texture": "#5"},
|
||||||
|
"west": {"uv": [10, 3, 14, 6], "texture": "#5"},
|
||||||
|
"up": {"uv": [10, 1, 14, 3], "rotation": 270, "texture": "#5"},
|
||||||
|
"down": {"uv": [10, 1, 14, 3], "rotation": 270, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [2, 10, 6],
|
||||||
|
"to": [4.1, 13, 10],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [3, 11.5, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [10, 3, 8, 6], "texture": "#5"},
|
||||||
|
"south": {"uv": [8, 3, 10, 6], "texture": "#5"},
|
||||||
|
"west": {"uv": [10, 3, 14, 6], "texture": "#5"},
|
||||||
|
"up": {"uv": [10, 1, 14, 3], "rotation": 270, "texture": "#5"},
|
||||||
|
"down": {"uv": [10, 1, 14, 3], "rotation": 270, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [12.5, 6, 7.5],
|
||||||
|
"to": [13.5, 14, 8.5],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [20, 14, 16]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [15, 8, 16, 16], "texture": "#4"},
|
||||||
|
"east": {"uv": [14, 8, 15, 16], "texture": "#4"},
|
||||||
|
"south": {"uv": [15, 8, 16, 16], "texture": "#4"},
|
||||||
|
"west": {"uv": [15, 8, 16, 16], "texture": "#4"},
|
||||||
|
"up": {"uv": [14, 7, 15, 8], "texture": "#4"},
|
||||||
|
"down": {"uv": [0, 0, 0, 0], "texture": "#4"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [11.9, 10, 6],
|
||||||
|
"to": [14, 13, 10],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [18, 11.5, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [8, 3, 10, 6], "texture": "#5"},
|
||||||
|
"east": {"uv": [10, 3, 14, 6], "texture": "#5"},
|
||||||
|
"south": {"uv": [10, 3, 8, 6], "texture": "#5"},
|
||||||
|
"up": {"uv": [10, 1, 14, 3], "rotation": 90, "texture": "#5"},
|
||||||
|
"down": {"uv": [10, 1, 14, 3], "rotation": 90, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [2.5, 6, 7.5],
|
||||||
|
"to": [3.5, 14, 8.5],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [10, 14, 16]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [15, 8, 16, 16], "texture": "#4"},
|
||||||
|
"east": {"uv": [14, 8, 15, 16], "texture": "#4"},
|
||||||
|
"south": {"uv": [15, 8, 16, 16], "texture": "#4"},
|
||||||
|
"west": {"uv": [15, 8, 16, 16], "texture": "#4"},
|
||||||
|
"up": {"uv": [14, 7, 15, 8], "texture": "#4"},
|
||||||
|
"down": {"uv": [0, 0, 0, 0], "texture": "#4"}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,119 @@
|
||||||
|
{
|
||||||
|
"credit": "Made with Blockbench",
|
||||||
|
"parent": "block/block",
|
||||||
|
"textures": {
|
||||||
|
"4": "#plate",
|
||||||
|
"5": "#bracket",
|
||||||
|
"particle": "#plate"
|
||||||
|
},
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"from": [1, 0, 1],
|
||||||
|
"to": [15, 3, 15],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [1.5, 0, 1.5]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 10, 14, 13], "texture": "#5"},
|
||||||
|
"east": {"uv": [0, 13, 14, 16], "texture": "#5"},
|
||||||
|
"south": {"uv": [0, 10, 14, 13], "texture": "#5"},
|
||||||
|
"west": {"uv": [0, 13, 14, 16], "texture": "#5"},
|
||||||
|
"up": {"uv": [0, 2, 14, 16], "rotation": 90, "texture": "#4"},
|
||||||
|
"down": {"uv": [0, 2, 14, 16], "rotation": 270, "texture": "#4"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [11.9, 3, 6],
|
||||||
|
"to": [14, 6, 10],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [8, 4.5, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [8, 3, 10, 6], "texture": "#5"},
|
||||||
|
"east": {"uv": [10, 3, 14, 6], "texture": "#5"},
|
||||||
|
"south": {"uv": [10, 3, 8, 6], "texture": "#5"},
|
||||||
|
"up": {"uv": [10, 1, 14, 3], "rotation": 90, "texture": "#5"},
|
||||||
|
"down": {"uv": [10, 1, 14, 3], "rotation": 90, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [4.1, 11, 6],
|
||||||
|
"to": [11.9, 13, 10],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [10, 4.5, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [8, 8, 16, 10], "rotation": 180, "texture": "#5"},
|
||||||
|
"south": {"uv": [8, 6, 16, 8], "rotation": 180, "texture": "#5"},
|
||||||
|
"up": {"uv": [8, 6, 16, 10], "texture": "#5"},
|
||||||
|
"down": {"uv": [8, 6, 16, 10], "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [4.1, 3, 6],
|
||||||
|
"to": [11.9, 5, 10],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [10, -3.5, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [8, 8, 16, 10], "rotation": 180, "texture": "#5"},
|
||||||
|
"south": {"uv": [8, 6, 16, 8], "rotation": 180, "texture": "#5"},
|
||||||
|
"up": {"uv": [8, 6, 16, 10], "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [2, 3, 6],
|
||||||
|
"to": [4.1, 6, 10],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [3, 4.5, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [10, 3, 8, 6], "texture": "#5"},
|
||||||
|
"south": {"uv": [8, 3, 10, 6], "texture": "#5"},
|
||||||
|
"west": {"uv": [10, 3, 14, 6], "texture": "#5"},
|
||||||
|
"up": {"uv": [10, 1, 14, 3], "rotation": 270, "texture": "#5"},
|
||||||
|
"down": {"uv": [10, 1, 14, 3], "rotation": 270, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [2, 10, 6],
|
||||||
|
"to": [4.1, 13, 10],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [3, 11.5, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [10, 3, 8, 6], "texture": "#5"},
|
||||||
|
"south": {"uv": [8, 3, 10, 6], "texture": "#5"},
|
||||||
|
"west": {"uv": [10, 3, 14, 6], "texture": "#5"},
|
||||||
|
"up": {"uv": [10, 1, 14, 3], "rotation": 270, "texture": "#5"},
|
||||||
|
"down": {"uv": [10, 1, 14, 3], "rotation": 270, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [12.5, 6, 7.5],
|
||||||
|
"to": [13.5, 14, 8.5],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [20, 14, 16]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [15, 8, 16, 16], "texture": "#4"},
|
||||||
|
"east": {"uv": [14, 8, 15, 16], "texture": "#4"},
|
||||||
|
"south": {"uv": [15, 8, 16, 16], "texture": "#4"},
|
||||||
|
"west": {"uv": [15, 8, 16, 16], "texture": "#4"},
|
||||||
|
"up": {"uv": [14, 7, 15, 8], "texture": "#4"},
|
||||||
|
"down": {"uv": [0, 0, 0, 0], "texture": "#4"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [11.9, 10, 6],
|
||||||
|
"to": [14, 13, 10],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [18, 11.5, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [8, 3, 10, 6], "texture": "#5"},
|
||||||
|
"east": {"uv": [10, 3, 14, 6], "texture": "#5"},
|
||||||
|
"south": {"uv": [10, 3, 8, 6], "texture": "#5"},
|
||||||
|
"up": {"uv": [10, 1, 14, 3], "rotation": 90, "texture": "#5"},
|
||||||
|
"down": {"uv": [10, 1, 14, 3], "rotation": 90, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [2.5, 6, 7.5],
|
||||||
|
"to": [3.5, 14, 8.5],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [10, 14, 16]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [15, 8, 16, 16], "texture": "#4"},
|
||||||
|
"east": {"uv": [14, 8, 15, 16], "texture": "#4"},
|
||||||
|
"south": {"uv": [15, 8, 16, 16], "texture": "#4"},
|
||||||
|
"west": {"uv": [15, 8, 16, 16], "texture": "#4"},
|
||||||
|
"up": {"uv": [14, 7, 15, 8], "texture": "#4"},
|
||||||
|
"down": {"uv": [0, 0, 0, 0], "texture": "#4"}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,110 @@
|
||||||
|
{
|
||||||
|
"credit": "Made with Blockbench",
|
||||||
|
"parent": "block/block",
|
||||||
|
"textures": {
|
||||||
|
"4": "#plate",
|
||||||
|
"5": "#bracket",
|
||||||
|
"particle": "#plate"
|
||||||
|
},
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"from": [0, 1, 1],
|
||||||
|
"to": [3, 15, 15],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 10, 14, 13], "rotation": 270, "texture": "#5"},
|
||||||
|
"east": {"uv": [0, 2, 14, 16], "rotation": 180, "texture": "#4"},
|
||||||
|
"south": {"uv": [0, 10, 14, 13], "rotation": 90, "texture": "#5"},
|
||||||
|
"west": {"uv": [0, 2, 14, 16], "texture": "#4"},
|
||||||
|
"up": {"uv": [0, 13, 14, 16], "rotation": 90, "texture": "#5"},
|
||||||
|
"down": {"uv": [0, 13, 14, 16], "rotation": 90, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [3, 2, 6],
|
||||||
|
"to": [6, 4.1, 10],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [8, 3, 10, 6], "rotation": 270, "texture": "#5"},
|
||||||
|
"east": {"uv": [10, 1, 14, 3], "rotation": 180, "texture": "#5"},
|
||||||
|
"south": {"uv": [10, 3, 8, 6], "rotation": 90, "texture": "#5"},
|
||||||
|
"west": {"uv": [10, 1, 14, 3], "rotation": 180, "texture": "#5"},
|
||||||
|
"down": {"uv": [10, 3, 14, 6], "rotation": 90, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [11, 4.1, 6],
|
||||||
|
"to": [13, 11.9, 10],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [8, 8, 16, 10], "rotation": 90, "texture": "#5"},
|
||||||
|
"east": {"uv": [8, 6, 16, 10], "rotation": 90, "texture": "#5"},
|
||||||
|
"south": {"uv": [8, 6, 16, 8], "rotation": 270, "texture": "#5"},
|
||||||
|
"west": {"uv": [8, 6, 16, 10], "rotation": 90, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [3, 4.1, 6],
|
||||||
|
"to": [5, 11.9, 10],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [8, 8, 16, 10], "rotation": 90, "texture": "#5"},
|
||||||
|
"east": {"uv": [8, 6, 16, 10], "rotation": 90, "texture": "#5"},
|
||||||
|
"south": {"uv": [8, 6, 16, 8], "rotation": 270, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [3, 11.9, 6],
|
||||||
|
"to": [6, 14, 10],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [10, 3, 8, 6], "rotation": 270, "texture": "#5"},
|
||||||
|
"east": {"uv": [10, 1, 14, 3], "texture": "#5"},
|
||||||
|
"south": {"uv": [8, 3, 10, 6], "rotation": 90, "texture": "#5"},
|
||||||
|
"west": {"uv": [10, 1, 14, 3], "texture": "#5"},
|
||||||
|
"up": {"uv": [10, 3, 14, 6], "rotation": 90, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [10, 11.9, 6],
|
||||||
|
"to": [13, 14, 10],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [10, 3, 8, 6], "rotation": 270, "texture": "#5"},
|
||||||
|
"east": {"uv": [10, 1, 14, 3], "texture": "#5"},
|
||||||
|
"south": {"uv": [8, 3, 10, 6], "rotation": 90, "texture": "#5"},
|
||||||
|
"west": {"uv": [10, 1, 14, 3], "texture": "#5"},
|
||||||
|
"up": {"uv": [10, 3, 14, 6], "rotation": 90, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [6, 2.5, 7.5],
|
||||||
|
"to": [14, 3.5, 8.5],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [15, 8, 16, 16], "rotation": 270, "texture": "#4"},
|
||||||
|
"east": {"uv": [14, 7, 15, 8], "rotation": 90, "texture": "#4"},
|
||||||
|
"south": {"uv": [15, 8, 16, 16], "rotation": 90, "texture": "#4"},
|
||||||
|
"west": {"uv": [0, 0, 0, 0], "rotation": 90, "texture": "#4"},
|
||||||
|
"up": {"uv": [15, 8, 16, 16], "rotation": 90, "texture": "#4"},
|
||||||
|
"down": {"uv": [14, 8, 15, 16], "rotation": 90, "texture": "#4"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [10, 2, 6],
|
||||||
|
"to": [13, 4.1, 10],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [8, 3, 10, 6], "rotation": 270, "texture": "#5"},
|
||||||
|
"east": {"uv": [10, 1, 14, 3], "rotation": 180, "texture": "#5"},
|
||||||
|
"south": {"uv": [10, 3, 8, 6], "rotation": 90, "texture": "#5"},
|
||||||
|
"west": {"uv": [10, 1, 14, 3], "rotation": 180, "texture": "#5"},
|
||||||
|
"down": {"uv": [10, 3, 14, 6], "rotation": 90, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [6, 12.5, 7.5],
|
||||||
|
"to": [14, 13.5, 8.5],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [15, 8, 16, 16], "rotation": 270, "texture": "#4"},
|
||||||
|
"east": {"uv": [14, 7, 15, 8], "rotation": 90, "texture": "#4"},
|
||||||
|
"south": {"uv": [15, 8, 16, 16], "rotation": 90, "texture": "#4"},
|
||||||
|
"west": {"uv": [0, 0, 0, 0], "rotation": 90, "texture": "#4"},
|
||||||
|
"up": {"uv": [15, 8, 16, 16], "rotation": 90, "texture": "#4"},
|
||||||
|
"down": {"uv": [14, 8, 15, 16], "rotation": 90, "texture": "#4"}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,110 @@
|
||||||
|
{
|
||||||
|
"credit": "Made with Blockbench",
|
||||||
|
"parent": "block/block",
|
||||||
|
"textures": {
|
||||||
|
"4": "#plate",
|
||||||
|
"5": "#bracket",
|
||||||
|
"particle": "#plate"
|
||||||
|
},
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"from": [1, 0, 1],
|
||||||
|
"to": [15, 3, 15],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [1.5, 0, 1.5]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 10, 14, 13], "texture": "#5"},
|
||||||
|
"east": {"uv": [0, 13, 14, 16], "texture": "#5"},
|
||||||
|
"south": {"uv": [0, 10, 14, 13], "texture": "#5"},
|
||||||
|
"west": {"uv": [0, 13, 14, 16], "texture": "#5"},
|
||||||
|
"up": {"uv": [0, 2, 14, 16], "rotation": 90, "texture": "#4"},
|
||||||
|
"down": {"uv": [0, 2, 14, 16], "rotation": 270, "texture": "#4"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [11.9, 3, 6],
|
||||||
|
"to": [14, 6, 10],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [8, 4.5, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [8, 3, 10, 6], "texture": "#5"},
|
||||||
|
"east": {"uv": [10, 3, 14, 6], "texture": "#5"},
|
||||||
|
"south": {"uv": [10, 3, 8, 6], "texture": "#5"},
|
||||||
|
"up": {"uv": [10, 1, 14, 3], "rotation": 90, "texture": "#5"},
|
||||||
|
"down": {"uv": [10, 1, 14, 3], "rotation": 90, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [4.1, 3, 6],
|
||||||
|
"to": [11.9, 13, 10],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [10, 4.5, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 8, 10], "rotation": 180, "texture": "#5"},
|
||||||
|
"east": {"uv": [7, 0, 8, 10], "texture": "#5"},
|
||||||
|
"south": {"uv": [0, 0, 8, 10], "rotation": 180, "texture": "#5"},
|
||||||
|
"west": {"uv": [7, 0, 8, 10], "texture": "#5"},
|
||||||
|
"up": {"uv": [8, 6, 16, 10], "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [2, 3, 6],
|
||||||
|
"to": [4.1, 6, 10],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [3, 4.5, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [10, 3, 8, 6], "texture": "#5"},
|
||||||
|
"south": {"uv": [8, 3, 10, 6], "texture": "#5"},
|
||||||
|
"west": {"uv": [10, 3, 14, 6], "texture": "#5"},
|
||||||
|
"up": {"uv": [10, 1, 14, 3], "rotation": 270, "texture": "#5"},
|
||||||
|
"down": {"uv": [10, 1, 14, 3], "rotation": 270, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [2, 10, 6],
|
||||||
|
"to": [4.1, 13, 10],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [3, 11.5, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [10, 3, 8, 6], "texture": "#5"},
|
||||||
|
"south": {"uv": [8, 3, 10, 6], "texture": "#5"},
|
||||||
|
"west": {"uv": [10, 3, 14, 6], "texture": "#5"},
|
||||||
|
"up": {"uv": [10, 1, 14, 3], "rotation": 270, "texture": "#5"},
|
||||||
|
"down": {"uv": [10, 1, 14, 3], "rotation": 270, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [12.5, 6, 7.5],
|
||||||
|
"to": [13.5, 14, 8.5],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [20, 14, 16]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [15, 8, 16, 16], "texture": "#4"},
|
||||||
|
"east": {"uv": [14, 8, 15, 16], "texture": "#4"},
|
||||||
|
"south": {"uv": [15, 8, 16, 16], "texture": "#4"},
|
||||||
|
"west": {"uv": [15, 8, 16, 16], "texture": "#4"},
|
||||||
|
"up": {"uv": [14, 7, 15, 8], "texture": "#4"},
|
||||||
|
"down": {"uv": [0, 0, 0, 0], "texture": "#4"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [11.9, 10, 6],
|
||||||
|
"to": [14, 13, 10],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [18, 11.5, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [8, 3, 10, 6], "texture": "#5"},
|
||||||
|
"east": {"uv": [10, 3, 14, 6], "texture": "#5"},
|
||||||
|
"south": {"uv": [10, 3, 8, 6], "texture": "#5"},
|
||||||
|
"up": {"uv": [10, 1, 14, 3], "rotation": 90, "texture": "#5"},
|
||||||
|
"down": {"uv": [10, 1, 14, 3], "rotation": 90, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [2.5, 6, 7.5],
|
||||||
|
"to": [3.5, 14, 8.5],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [10, 14, 16]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [15, 8, 16, 16], "texture": "#4"},
|
||||||
|
"east": {"uv": [14, 8, 15, 16], "texture": "#4"},
|
||||||
|
"south": {"uv": [15, 8, 16, 16], "texture": "#4"},
|
||||||
|
"west": {"uv": [15, 8, 16, 16], "texture": "#4"},
|
||||||
|
"up": {"uv": [14, 7, 15, 8], "texture": "#4"},
|
||||||
|
"down": {"uv": [0, 0, 0, 0], "texture": "#4"}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,110 @@
|
||||||
|
{
|
||||||
|
"credit": "Made with Blockbench",
|
||||||
|
"parent": "block/block",
|
||||||
|
"textures": {
|
||||||
|
"4": "#plate",
|
||||||
|
"5": "#bracket",
|
||||||
|
"particle": "#plate"
|
||||||
|
},
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"from": [0, 1, 1],
|
||||||
|
"to": [3, 15, 15],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [0, 14.5, 1.5]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 10, 14, 13], "rotation": 270, "texture": "#5"},
|
||||||
|
"east": {"uv": [0, 2, 14, 16], "rotation": 180, "texture": "#4"},
|
||||||
|
"south": {"uv": [0, 10, 14, 13], "rotation": 90, "texture": "#5"},
|
||||||
|
"west": {"uv": [0, 2, 14, 16], "texture": "#4"},
|
||||||
|
"up": {"uv": [0, 13, 14, 16], "rotation": 90, "texture": "#5"},
|
||||||
|
"down": {"uv": [0, 13, 14, 16], "rotation": 90, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [3, 2, 6],
|
||||||
|
"to": [6, 4.1, 10],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [4.5, 8, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [8, 3, 10, 6], "rotation": 270, "texture": "#5"},
|
||||||
|
"east": {"uv": [10, 1, 14, 3], "rotation": 180, "texture": "#5"},
|
||||||
|
"south": {"uv": [10, 3, 8, 6], "rotation": 90, "texture": "#5"},
|
||||||
|
"west": {"uv": [10, 1, 14, 3], "rotation": 180, "texture": "#5"},
|
||||||
|
"down": {"uv": [10, 3, 14, 6], "rotation": 90, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [3, 4.1, 6],
|
||||||
|
"to": [13, 11.9, 10],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [4.5, 6, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 8, 10], "rotation": 90, "texture": "#5"},
|
||||||
|
"east": {"uv": [8, 6, 16, 10], "rotation": 90, "texture": "#5"},
|
||||||
|
"south": {"uv": [0, 0, 8, 10], "rotation": 270, "texture": "#5"},
|
||||||
|
"up": {"uv": [7, 0, 8, 10], "rotation": 90, "texture": "#5"},
|
||||||
|
"down": {"uv": [7, 0, 8, 10], "rotation": 90, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [3, 11.9, 6],
|
||||||
|
"to": [6, 14, 10],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [4.5, 13, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [10, 3, 8, 6], "rotation": 270, "texture": "#5"},
|
||||||
|
"east": {"uv": [10, 1, 14, 3], "texture": "#5"},
|
||||||
|
"south": {"uv": [8, 3, 10, 6], "rotation": 90, "texture": "#5"},
|
||||||
|
"west": {"uv": [10, 1, 14, 3], "texture": "#5"},
|
||||||
|
"up": {"uv": [10, 3, 14, 6], "rotation": 90, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [10, 11.9, 6],
|
||||||
|
"to": [13, 14, 10],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [11.5, 13, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [10, 3, 8, 6], "rotation": 270, "texture": "#5"},
|
||||||
|
"east": {"uv": [10, 1, 14, 3], "texture": "#5"},
|
||||||
|
"south": {"uv": [8, 3, 10, 6], "rotation": 90, "texture": "#5"},
|
||||||
|
"west": {"uv": [10, 1, 14, 3], "texture": "#5"},
|
||||||
|
"up": {"uv": [10, 3, 14, 6], "rotation": 90, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [6, 2.5, 7.5],
|
||||||
|
"to": [14, 3.5, 8.5],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [14, -4, 16]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [15, 8, 16, 16], "rotation": 270, "texture": "#4"},
|
||||||
|
"east": {"uv": [14, 7, 15, 8], "rotation": 90, "texture": "#4"},
|
||||||
|
"south": {"uv": [15, 8, 16, 16], "rotation": 90, "texture": "#4"},
|
||||||
|
"west": {"uv": [0, 0, 0, 0], "rotation": 90, "texture": "#4"},
|
||||||
|
"up": {"uv": [15, 8, 16, 16], "rotation": 90, "texture": "#4"},
|
||||||
|
"down": {"uv": [14, 8, 15, 16], "rotation": 90, "texture": "#4"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [10, 2, 6],
|
||||||
|
"to": [13, 4.1, 10],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [11.5, -2, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [8, 3, 10, 6], "rotation": 270, "texture": "#5"},
|
||||||
|
"east": {"uv": [10, 1, 14, 3], "rotation": 180, "texture": "#5"},
|
||||||
|
"south": {"uv": [10, 3, 8, 6], "rotation": 90, "texture": "#5"},
|
||||||
|
"west": {"uv": [10, 1, 14, 3], "rotation": 180, "texture": "#5"},
|
||||||
|
"down": {"uv": [10, 3, 14, 6], "rotation": 90, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [6, 12.5, 7.5],
|
||||||
|
"to": [14, 13.5, 8.5],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [14, 6, 16]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [15, 8, 16, 16], "rotation": 270, "texture": "#4"},
|
||||||
|
"east": {"uv": [14, 7, 15, 8], "rotation": 90, "texture": "#4"},
|
||||||
|
"south": {"uv": [15, 8, 16, 16], "rotation": 90, "texture": "#4"},
|
||||||
|
"west": {"uv": [0, 0, 0, 0], "rotation": 90, "texture": "#4"},
|
||||||
|
"up": {"uv": [15, 8, 16, 16], "rotation": 90, "texture": "#4"},
|
||||||
|
"down": {"uv": [14, 8, 15, 16], "rotation": 90, "texture": "#4"}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue