Brackets and spilled potions

- Added wooden and metal brackets
- Brackets can be applied to shafts, cogs and fluid pipes
- Brackets prevent pipes from connecting to adjacent pipes
- Fixed blockzapper not showing up in the searchable creative menu
- Added config values for hose pulleys
- Hose pulleys now extinguish lit waterloggable blocks
- Hose pulley now break blocks that cannot withstand vanilla fluid flows
- Spout is now wrenchable
- Fixed spout not activating properly
- Added fluid particles that supports fluids without a block variant
- Potion fluids now apply their effects to nearby entities when spilling from an open end
- Fixed pumps not rendering fluid particles when spilling/pulling fluids directly
- Hose Pulley no longer accepts fluids that cannot be placed
- Hose Pulleys and open pipes can no longer place water in the nether
- Some Refactors to the particle system
- Reverted reversed crtl activation for schematic tools
- Added a command to fix broken lighting in some of creates models (enables experimental forge block rendering)
- Fixed fluid ingredients in jei once again
- Fixed fluid tag ingredients being resolved on the client
This commit is contained in:
simibubi 2020-11-04 19:08:01 +01:00
parent e701569fee
commit d5f08aab76
99 changed files with 3096 additions and 417 deletions

View file

@ -225,6 +225,7 @@ debef0f5dde74103aaf4422de4bc90e4099b0c47 assets/create/blockstates/mechanical_pl
92269fe66d7b83095a2e04e121af0be792f55dd6 assets/create/blockstates/mechanical_press.json
b7c4a0ff0c6f16e14d71fc0fb7fc66d032b65cf3 assets/create/blockstates/mechanical_pump.json
264d72320ee0f1e014319f7d99dcc1fa953a4ad4 assets/create/blockstates/mechanical_saw.json
94bbcb7e622471dbf418d78f9200ad321c7168de assets/create/blockstates/metal_bracket.json
4e48ad0936647065c2322390e7c0fe115c853a98 assets/create/blockstates/millstone.json
468202df0802e17c75fcad0993daf1bc5300ca91 assets/create/blockstates/minecart_anchor.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
89000903d0ab8139e919abea7aa0361b34c24e55 assets/create/blockstates/white_valve_handle.json
c4cd1131113667da0180898b5db3ebad609db8ba assets/create/blockstates/windmill_bearing.json
d4f804f2818376950ef28fc8d6250419f4e12218 assets/create/blockstates/wooden_bracket.json
e03c48512967845fce09d84b955d3bc7b480fedc assets/create/blockstates/yellow_sail.json
a3a11524cd3515fc01d905767b4b7ea782adaf03 assets/create/blockstates/yellow_seat.json
6801fa1f466f172700e573e5b8ee8ee5f9ca4583 assets/create/blockstates/yellow_valve_handle.json
7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json
b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json
6fe6c50ae75a9c89c90d3423bc74f3e628bc213a assets/create/lang/en_ud.json
b054eb6cf72ac04fbb2512569effa84768adef74 assets/create/lang/en_us.json
cf432c7dcf9b91769a570242a59c12ecca79a091 assets/create/lang/unfinished/de_de.json
5a2e2499696f45b1f95feeaa702119b8e1b371eb assets/create/lang/unfinished/fr_fr.json
12ac01a6f21c536aa09599c36139f593cbbf7d1f assets/create/lang/unfinished/it_it.json
3e65e163c658e4f34124807716b009e1907187cc assets/create/lang/unfinished/ja_jp.json
4dfeba1d56d8ad688442d2ca026dfa16147178ef assets/create/lang/unfinished/ko_kr.json
3d114a874d1c198ecf0978fd13b98249536cc684 assets/create/lang/unfinished/nl_nl.json
3434f2d429bdf64dcbc915c0365e20250b64d819 assets/create/lang/unfinished/pt_br.json
0bfd9476411fc565a3011ffc43eecaca3f0e53ff assets/create/lang/unfinished/ru_ru.json
d7150e9c65d74f41e2dc65daadf003dc200e512c assets/create/lang/unfinished/zh_cn.json
be82e2e68c74c572e72979a6d4a5ec5e571931e2 assets/create/lang/en_ud.json
b953a264ec3044b955431fb988c0bafcb9b57388 assets/create/lang/en_us.json
97fe71d544f1bc7552e6c9d1f328ae02cb1a1947 assets/create/lang/unfinished/de_de.json
052819c4d2177bfc5cee9675300866d724f4b63f assets/create/lang/unfinished/fr_fr.json
67d67f305c83e021e2ae37e03b9bf4aa2661bc87 assets/create/lang/unfinished/it_it.json
b0e3fc5a71b5127b832e38daece78ca9db9ce303 assets/create/lang/unfinished/ja_jp.json
610f399864dfa9d7fd258570853f7d577c5aee31 assets/create/lang/unfinished/ko_kr.json
12215221adcb015c5c74dbfe5affa920cd570580 assets/create/lang/unfinished/nl_nl.json
ead7216188692e96fb060b35213f1ef6b0682e87 assets/create/lang/unfinished/pt_br.json
e9d95034f9b33eb8e41792740ed2d8c488af6676 assets/create/lang/unfinished/ru_ru.json
32a2c4af9a5247f3bc7a5c2f502376e1e580d8bc assets/create/lang/unfinished/zh_cn.json
846200eb548d3bfa2e77b41039de159b4b6cfb45 assets/create/models/block/acacia_window.json
1930fa3a3c98d53dd19e4ee7f55bc27fd47aa281 assets/create/models/block/acacia_window_pane_noside.json
1763ea2c9b981d187f5031ba608f3d5d3be3986a assets/create/models/block/acacia_window_pane_noside_alt.json
@ -467,6 +469,18 @@ e2801a0c3fe8e1c2485291485b977f581fdc8b7c assets/create/models/block/andesite_tun
d876627b6e519c6f3f59c7c27cc7b0f903206f7c assets/create/models/block/blue_sail.json
e58b00a7222152d7facbe0e82f00933b974df747 assets/create/models/block/blue_seat.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
c9c5f53c9d4f6cf6f509452e91cab1ba5b57f807 assets/create/models/block/brass_belt_funnel_pull_powered_extended.json
addcf821a2348c0985bf9a72229355cfab818069 assets/create/models/block/brass_belt_funnel_pull_powered_retracted.json
@ -1326,6 +1340,7 @@ f8d0d4b2a890ea7a69ab0c390947b48fe0478d3f assets/create/models/item/mechanical_pi
6c2acb80e53256fbb85f76851f335f9248ace6da assets/create/models/item/mechanical_press.json
4e363477e3e8059dd7b2bad04046521b31923d1b assets/create/models/item/mechanical_pump.json
3fc1fcb2016d2782c3667c21575423122b66705a assets/create/models/item/mechanical_saw.json
3afa723a8ba4160a4bd8778a56e1880e7ff53ed9 assets/create/models/item/metal_bracket.json
0eb5726c8c0de462f432411c210d6132b2c446a4 assets/create/models/item/millstone.json
1134bc8ecdfefe5d30ee4973c37aa9a349c368b4 assets/create/models/item/minecart_contraption.json
5f44acb8a784611c17913ddf64fb4098b3a8aee9 assets/create/models/item/minecart_coupling.json
@ -1496,6 +1511,7 @@ c6253e0f8db3c3992d3f78fe5045e276d39d5b22 assets/create/models/item/white_sail.js
69328eb4f91c4407fbcad5e3c4b88363f1a9572c assets/create/models/item/white_seat.json
be7a2d59d43083d7f2427193dcb9d68004224dd3 assets/create/models/item/white_valve_handle.json
d080b1b25e5bc8baf5aee68691b08c7f12ece3b0 assets/create/models/item/windmill_bearing.json
500abf752654a904d78a967f6c6d29a75a4821ab assets/create/models/item/wooden_bracket.json
2527b52413965a3e84b4718e08a9b8bb30a741ea assets/create/models/item/wrench.json
4b49bc2418410cded5f0b7da3430f1a22e049f18 assets/create/models/item/yellow_seat.json
790daf016f980801e7587b548a325082c65f6f03 assets/create/models/item/yellow_valve_handle.json
@ -1623,6 +1639,7 @@ b2845089f6356957e048df29ea75c9f5e64d5a44 data/create/advancements/recipes/create
02cfc8c25c2977292dba992542c83666d9123e95 data/create/advancements/recipes/create.base/crafting/kinetics/mechanical_press.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
8fd1bd08e678262d95ac97ba2f18d631c2fd3796 data/create/advancements/recipes/create.base/crafting/kinetics/metal_bracket.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
afeb2a152697b68bc953986d6886cbe527c6d2b5 data/create/advancements/recipes/create.base/crafting/kinetics/nozzle.json
@ -1664,6 +1681,7 @@ f876dcbd2877c921613a4af481c89d66664c1ea8 data/create/advancements/recipes/create
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
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
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
@ -2348,6 +2366,7 @@ d9e217fcc668a04ee495968f8ccf9966271b6cea data/create/loot_tables/blocks/mechanic
0e0742d066bda87ba5cc835a4028efb99e70b2f2 data/create/loot_tables/blocks/mechanical_press.json
e94a78187bcf7f235244b2c656732ba9a5821dd0 data/create/loot_tables/blocks/mechanical_pump.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
205f5899101262f31f5c1a88bb7d954918d08d04 data/create/loot_tables/blocks/minecart_anchor.json
53215ac772bee2f88052266b82213aaf668660e9 data/create/loot_tables/blocks/mossy_andesite.json
@ -2507,6 +2526,7 @@ e8f3af61d9a2fd1ff5b32c9bb474ed005e6d70c4 data/create/loot_tables/blocks/weathere
969eda31556feb5a68e350762848d17453275fee data/create/loot_tables/blocks/white_seat.json
79fe374f8e677088f928a3a49ff5eeed6128d165 data/create/loot_tables/blocks/white_valve_handle.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
37ead431a278928a09b260ae06a448e2c791a73e data/create/loot_tables/blocks/yellow_seat.json
899bb208908a2f9bec5e544ff47526f3e24db720 data/create/loot_tables/blocks/yellow_valve_handle.json
@ -2629,6 +2649,7 @@ ac9003ad3320fe2009c1793a3c6e86bdf20ca832 data/create/recipes/crafting/kinetics/m
ce8e269907aae5549cea04141bd231f4a20e6453 data/create/recipes/crafting/kinetics/mechanical_press.json
5a685078d3c9d7dbe68080b7b6f2a44fc41582c5 data/create/recipes/crafting/kinetics/mechanical_pump.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
13fa2887d3c988973c9222ce5e2e3dd0d9bd8374 data/create/recipes/crafting/kinetics/minecart_from_contraption_cart.json
be4c7fdb0ba1e9ee6d3dcf200dc2718ad83ec8fb data/create/recipes/crafting/kinetics/mysterious_cuckoo_clock.json
@ -2671,6 +2692,7 @@ f4d88aa2edea548d29cf2678a111d8bb5db7720a data/create/recipes/crafting/kinetics/w
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
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
5579e58473474c4e59efd1ee39ddf0140d66b618 data/create/recipes/crafting/kinetics/yellow_seat.json
f055d233ac7ee9eac840a658afa01bedd793ff38 data/create/recipes/crafting/kinetics/yellow_seat_from_other_seat.json

View file

@ -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
}
}
}

View file

@ -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
}
}
}

View file

@ -226,6 +226,7 @@
"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_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.minecart_anchor": "\u0279o\u0265\u0254u\u2C6F \u0287\u0279\u0250\u0254\u01DDu\u0131W",
"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_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.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_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",

View file

@ -229,6 +229,7 @@
"block.create.mechanical_press": "Mechanical Press",
"block.create.mechanical_pump": "Mechanical Pump",
"block.create.mechanical_saw": "Mechanical Saw",
"block.create.metal_bracket": "Metal Bracket",
"block.create.millstone": "Millstone",
"block.create.minecart_anchor": "Minecart Anchor",
"block.create.mossy_andesite": "Mossy Andesite",
@ -388,6 +389,7 @@
"block.create.white_seat": "White Seat",
"block.create.white_valve_handle": "White Valve Handle",
"block.create.windmill_bearing": "Windmill Bearing",
"block.create.wooden_bracket": "Wooden Bracket",
"block.create.yellow_sail": "Yellow Sail",
"block.create.yellow_seat": "Yellow Seat",
"block.create.yellow_valve_handle": "Yellow Valve Handle",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 1024",
"_": "Missing Localizations: 1026",
"_": "->------------------------] Game Elements [------------------------<-",
@ -230,6 +230,7 @@
"block.create.mechanical_press": "Mechanische Presse",
"block.create.mechanical_pump": "UNLOCALIZED: Mechanical Pump",
"block.create.mechanical_saw": "UNLOCALIZED: Mechanical Saw",
"block.create.metal_bracket": "UNLOCALIZED: Metal Bracket",
"block.create.millstone": "UNLOCALIZED: Millstone",
"block.create.minecart_anchor": "UNLOCALIZED: Minecart Anchor",
"block.create.mossy_andesite": "UNLOCALIZED: Mossy Andesite",
@ -389,6 +390,7 @@
"block.create.white_seat": "UNLOCALIZED: White Seat",
"block.create.white_valve_handle": "UNLOCALIZED: White Valve Handle",
"block.create.windmill_bearing": "UNLOCALIZED: Windmill Bearing",
"block.create.wooden_bracket": "UNLOCALIZED: Wooden Bracket",
"block.create.yellow_sail": "UNLOCALIZED: Yellow Sail",
"block.create.yellow_seat": "UNLOCALIZED: Yellow Seat",
"block.create.yellow_valve_handle": "UNLOCALIZED: Yellow Valve Handle",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 653",
"_": "Missing Localizations: 655",
"_": "->------------------------] Game Elements [------------------------<-",
@ -230,6 +230,7 @@
"block.create.mechanical_press": "Presse mécanique",
"block.create.mechanical_pump": "UNLOCALIZED: Mechanical Pump",
"block.create.mechanical_saw": "Scie mécanique",
"block.create.metal_bracket": "UNLOCALIZED: Metal Bracket",
"block.create.millstone": "UNLOCALIZED: Millstone",
"block.create.minecart_anchor": "UNLOCALIZED: Minecart Anchor",
"block.create.mossy_andesite": "UNLOCALIZED: Mossy Andesite",
@ -389,6 +390,7 @@
"block.create.white_seat": "UNLOCALIZED: White Seat",
"block.create.white_valve_handle": "UNLOCALIZED: White Valve Handle",
"block.create.windmill_bearing": "UNLOCALIZED: Windmill Bearing",
"block.create.wooden_bracket": "UNLOCALIZED: Wooden Bracket",
"block.create.yellow_sail": "UNLOCALIZED: Yellow Sail",
"block.create.yellow_seat": "UNLOCALIZED: Yellow Seat",
"block.create.yellow_valve_handle": "UNLOCALIZED: Yellow Valve Handle",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 637",
"_": "Missing Localizations: 639",
"_": "->------------------------] Game Elements [------------------------<-",
@ -230,6 +230,7 @@
"block.create.mechanical_press": "Pressa Meccanica",
"block.create.mechanical_pump": "UNLOCALIZED: Mechanical Pump",
"block.create.mechanical_saw": "Sega Meccanica",
"block.create.metal_bracket": "UNLOCALIZED: Metal Bracket",
"block.create.millstone": "Macina",
"block.create.minecart_anchor": "UNLOCALIZED: Minecart Anchor",
"block.create.mossy_andesite": "UNLOCALIZED: Mossy Andesite",
@ -389,6 +390,7 @@
"block.create.white_seat": "UNLOCALIZED: White Seat",
"block.create.white_valve_handle": "UNLOCALIZED: White Valve Handle",
"block.create.windmill_bearing": "UNLOCALIZED: Windmill Bearing",
"block.create.wooden_bracket": "UNLOCALIZED: Wooden Bracket",
"block.create.yellow_sail": "UNLOCALIZED: Yellow Sail",
"block.create.yellow_seat": "UNLOCALIZED: Yellow Seat",
"block.create.yellow_valve_handle": "UNLOCALIZED: Yellow Valve Handle",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 636",
"_": "Missing Localizations: 638",
"_": "->------------------------] Game Elements [------------------------<-",
@ -230,6 +230,7 @@
"block.create.mechanical_press": "メカニカルプレス",
"block.create.mechanical_pump": "UNLOCALIZED: Mechanical Pump",
"block.create.mechanical_saw": "メカニカル鋸",
"block.create.metal_bracket": "UNLOCALIZED: Metal Bracket",
"block.create.millstone": "石臼",
"block.create.minecart_anchor": "UNLOCALIZED: Minecart Anchor",
"block.create.mossy_andesite": "UNLOCALIZED: Mossy Andesite",
@ -389,6 +390,7 @@
"block.create.white_seat": "UNLOCALIZED: White Seat",
"block.create.white_valve_handle": "UNLOCALIZED: White Valve Handle",
"block.create.windmill_bearing": "UNLOCALIZED: Windmill Bearing",
"block.create.wooden_bracket": "UNLOCALIZED: Wooden Bracket",
"block.create.yellow_sail": "UNLOCALIZED: Yellow Sail",
"block.create.yellow_seat": "UNLOCALIZED: Yellow Seat",
"block.create.yellow_valve_handle": "UNLOCALIZED: Yellow Valve Handle",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 637",
"_": "Missing Localizations: 639",
"_": "->------------------------] Game Elements [------------------------<-",
@ -230,6 +230,7 @@
"block.create.mechanical_press": "압착기",
"block.create.mechanical_pump": "UNLOCALIZED: Mechanical Pump",
"block.create.mechanical_saw": "톱",
"block.create.metal_bracket": "UNLOCALIZED: Metal Bracket",
"block.create.millstone": "맷돌",
"block.create.minecart_anchor": "UNLOCALIZED: Minecart Anchor",
"block.create.mossy_andesite": "UNLOCALIZED: Mossy Andesite",
@ -389,6 +390,7 @@
"block.create.white_seat": "UNLOCALIZED: White Seat",
"block.create.white_valve_handle": "UNLOCALIZED: White Valve Handle",
"block.create.windmill_bearing": "UNLOCALIZED: Windmill Bearing",
"block.create.wooden_bracket": "UNLOCALIZED: Wooden Bracket",
"block.create.yellow_sail": "UNLOCALIZED: Yellow Sail",
"block.create.yellow_seat": "UNLOCALIZED: Yellow Seat",
"block.create.yellow_valve_handle": "UNLOCALIZED: Yellow Valve Handle",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 965",
"_": "Missing Localizations: 967",
"_": "->------------------------] Game Elements [------------------------<-",
@ -230,6 +230,7 @@
"block.create.mechanical_press": "Mechanische Pers",
"block.create.mechanical_pump": "UNLOCALIZED: Mechanical Pump",
"block.create.mechanical_saw": "Mechanische Zaag",
"block.create.metal_bracket": "UNLOCALIZED: Metal Bracket",
"block.create.millstone": "UNLOCALIZED: Millstone",
"block.create.minecart_anchor": "UNLOCALIZED: Minecart Anchor",
"block.create.mossy_andesite": "UNLOCALIZED: Mossy Andesite",
@ -389,6 +390,7 @@
"block.create.white_seat": "UNLOCALIZED: White Seat",
"block.create.white_valve_handle": "UNLOCALIZED: White Valve Handle",
"block.create.windmill_bearing": "UNLOCALIZED: Windmill Bearing",
"block.create.wooden_bracket": "UNLOCALIZED: Wooden Bracket",
"block.create.yellow_sail": "UNLOCALIZED: Yellow Sail",
"block.create.yellow_seat": "UNLOCALIZED: Yellow Seat",
"block.create.yellow_valve_handle": "UNLOCALIZED: Yellow Valve Handle",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 1031",
"_": "Missing Localizations: 1033",
"_": "->------------------------] Game Elements [------------------------<-",
@ -230,6 +230,7 @@
"block.create.mechanical_press": "Prensa Mecânico",
"block.create.mechanical_pump": "UNLOCALIZED: Mechanical Pump",
"block.create.mechanical_saw": "UNLOCALIZED: Mechanical Saw",
"block.create.metal_bracket": "UNLOCALIZED: Metal Bracket",
"block.create.millstone": "UNLOCALIZED: Millstone",
"block.create.minecart_anchor": "UNLOCALIZED: Minecart Anchor",
"block.create.mossy_andesite": "UNLOCALIZED: Mossy Andesite",
@ -389,6 +390,7 @@
"block.create.white_seat": "UNLOCALIZED: White Seat",
"block.create.white_valve_handle": "UNLOCALIZED: White Valve Handle",
"block.create.windmill_bearing": "UNLOCALIZED: Windmill Bearing",
"block.create.wooden_bracket": "UNLOCALIZED: Wooden Bracket",
"block.create.yellow_sail": "UNLOCALIZED: Yellow Sail",
"block.create.yellow_seat": "UNLOCALIZED: Yellow Seat",
"block.create.yellow_valve_handle": "UNLOCALIZED: Yellow Valve Handle",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 306",
"_": "Missing Localizations: 308",
"_": "->------------------------] Game Elements [------------------------<-",
@ -230,6 +230,7 @@
"block.create.mechanical_press": "Механический пресс",
"block.create.mechanical_pump": "UNLOCALIZED: Mechanical Pump",
"block.create.mechanical_saw": "Механическая пила",
"block.create.metal_bracket": "UNLOCALIZED: Metal Bracket",
"block.create.millstone": "Жернов",
"block.create.minecart_anchor": "Вагонеточный якорь",
"block.create.mossy_andesite": "Замшелый андезит",
@ -389,6 +390,7 @@
"block.create.white_seat": "UNLOCALIZED: White Seat",
"block.create.white_valve_handle": "UNLOCALIZED: White Valve Handle",
"block.create.windmill_bearing": "UNLOCALIZED: Windmill Bearing",
"block.create.wooden_bracket": "UNLOCALIZED: Wooden Bracket",
"block.create.yellow_sail": "UNLOCALIZED: Yellow Sail",
"block.create.yellow_seat": "UNLOCALIZED: Yellow Seat",
"block.create.yellow_valve_handle": "UNLOCALIZED: Yellow Valve Handle",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 319",
"_": "Missing Localizations: 321",
"_": "->------------------------] Game Elements [------------------------<-",
@ -230,6 +230,7 @@
"block.create.mechanical_press": "动力辊压机",
"block.create.mechanical_pump": "UNLOCALIZED: Mechanical Pump",
"block.create.mechanical_saw": "动力切割机",
"block.create.metal_bracket": "UNLOCALIZED: Metal Bracket",
"block.create.millstone": "石磨",
"block.create.minecart_anchor": "矿车锚",
"block.create.mossy_andesite": "生苔安山岩",
@ -389,6 +390,7 @@
"block.create.white_seat": "UNLOCALIZED: White Seat",
"block.create.white_valve_handle": "UNLOCALIZED: White Valve Handle",
"block.create.windmill_bearing": "UNLOCALIZED: Windmill Bearing",
"block.create.wooden_bracket": "UNLOCALIZED: Wooden Bracket",
"block.create.yellow_sail": "UNLOCALIZED: Yellow Sail",
"block.create.yellow_seat": "UNLOCALIZED: Yellow Seat",
"block.create.yellow_valve_handle": "UNLOCALIZED: Yellow Valve Handle",

View file

@ -0,0 +1,7 @@
{
"parent": "create:block/bracket/cog/ground",
"textures": {
"bracket": "create:block/bracket_metal",
"plate": "create:block/bracket_plate_metal"
}
}

View file

@ -0,0 +1,7 @@
{
"parent": "create:block/bracket/cog/ground",
"textures": {
"bracket": "create:block/bracket_wooden",
"plate": "create:block/bracket_plate_wooden"
}
}

View file

@ -0,0 +1,7 @@
{
"parent": "create:block/bracket/cog/wall",
"textures": {
"bracket": "create:block/bracket_metal",
"plate": "create:block/bracket_plate_metal"
}
}

View file

@ -0,0 +1,7 @@
{
"parent": "create:block/bracket/cog/wall",
"textures": {
"bracket": "create:block/bracket_wooden",
"plate": "create:block/bracket_plate_wooden"
}
}

View file

@ -0,0 +1,7 @@
{
"parent": "create:block/bracket/pipe/ground",
"textures": {
"bracket": "create:block/bracket_metal",
"plate": "create:block/bracket_plate_metal"
}
}

View file

@ -0,0 +1,7 @@
{
"parent": "create:block/bracket/pipe/ground",
"textures": {
"bracket": "create:block/bracket_wooden",
"plate": "create:block/bracket_plate_wooden"
}
}

View file

@ -0,0 +1,7 @@
{
"parent": "create:block/bracket/pipe/wall",
"textures": {
"bracket": "create:block/bracket_metal",
"plate": "create:block/bracket_plate_metal"
}
}

View file

@ -0,0 +1,7 @@
{
"parent": "create:block/bracket/pipe/wall",
"textures": {
"bracket": "create:block/bracket_wooden",
"plate": "create:block/bracket_plate_wooden"
}
}

View file

@ -0,0 +1,7 @@
{
"parent": "create:block/bracket/shaft/ground",
"textures": {
"bracket": "create:block/bracket_metal",
"plate": "create:block/bracket_plate_metal"
}
}

View file

@ -0,0 +1,7 @@
{
"parent": "create:block/bracket/shaft/ground",
"textures": {
"bracket": "create:block/bracket_wooden",
"plate": "create:block/bracket_plate_wooden"
}
}

View file

@ -0,0 +1,7 @@
{
"parent": "create:block/bracket/shaft/wall",
"textures": {
"bracket": "create:block/bracket_metal",
"plate": "create:block/bracket_plate_metal"
}
}

View file

@ -0,0 +1,7 @@
{
"parent": "create:block/bracket/shaft/wall",
"textures": {
"bracket": "create:block/bracket_wooden",
"plate": "create:block/bracket_plate_wooden"
}
}

View file

@ -0,0 +1,7 @@
{
"parent": "create:block/bracket/item",
"textures": {
"bracket": "create:block/bracket_metal",
"plate": "create:block/bracket_plate_metal"
}
}

View file

@ -0,0 +1,7 @@
{
"parent": "create:block/bracket/item",
"textures": {
"bracket": "create:block/bracket_wooden",
"plate": "create:block/bracket_plate_wooden"
}
}

View file

@ -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"
]
]
}

View file

@ -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"
]
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "create:metal_bracket"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "create:wooden_bracket"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -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
}
}

View file

@ -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
}
}

View file

@ -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.ItemDrainBlock;
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.FluidPipeBlock;
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.BeltGenerator;
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.CogwheelBlockItem;
import com.simibubi.create.content.contraptions.relays.elementary.ShaftBlock;
@ -205,6 +209,7 @@ public class AllBlocks {
.initialProperties(SharedProperties::stone)
.transform(StressConfigDefaults.setNoImpact())
.blockstate(BlockStateGen.axisBlockProvider(false))
.onRegister(CreateRegistrate.blockModel(() -> BracketedKineticBlockModel::new))
.simpleItem()
.register();
@ -213,6 +218,7 @@ public class AllBlocks {
.transform(StressConfigDefaults.setNoImpact())
.properties(p -> p.sound(SoundType.WOOD))
.blockstate(BlockStateGen.axisBlockProvider(false))
.onRegister(CreateRegistrate.blockModel(() -> BracketedKineticBlockModel::new))
.item(CogwheelBlockItem::new)
.build()
.register();
@ -223,6 +229,7 @@ public class AllBlocks {
.properties(p -> p.sound(SoundType.WOOD))
.transform(StressConfigDefaults.setNoImpact())
.blockstate(BlockStateGen.axisBlockProvider(false))
.onRegister(CreateRegistrate.blockModel(() -> BracketedKineticBlockModel::new))
.item(CogwheelBlockItem::new)
.build()
.register();
@ -469,6 +476,18 @@ public class AllBlocks {
.transform(ModelGen.customItemModel("gauge", "_", "item"))
.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
public static final BlockEntry<FluidPipeBlock> FLUID_PIPE = REGISTRATE.block("fluid_pipe", FluidPipeBlock::new)

View file

@ -2,17 +2,16 @@ package com.simibubi.create;
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.AirParticleData;
import com.simibubi.create.content.contraptions.particle.CubeParticle;
import com.simibubi.create.content.contraptions.particle.CubeParticleData;
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.foundation.utility.Lang;
import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.IParticleFactory;
import net.minecraft.client.particle.ParticleManager;
import net.minecraft.particles.IParticleData;
import net.minecraft.particles.ParticleType;
@ -29,23 +28,19 @@ public enum AllParticleTypes {
AIR_FLOW(AirFlowParticleData::new),
AIR(AirParticleData::new),
HEATER_PARTICLE(HeaterParticleData::new),
CUBE(CubeParticleData::dummy, () -> CubeParticle.Factory::new)
CUBE(CubeParticleData::new),
FLUID_PARTICLE(FluidParticleData::new),
FLUID_DRIP(FluidParticleData::new)
;
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());
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) {
for (AllParticleTypes particle : values())
particle.entry.register(event.getRegistry());
@ -59,7 +54,7 @@ public enum AllParticleTypes {
}
public ParticleType<?> get() {
return entry.getType();
return entry.getOrCreateType();
}
public String parameter() {
@ -67,48 +62,32 @@ public enum AllParticleTypes {
}
private class ParticleEntry<D extends IParticleData> {
Supplier<? extends ICustomParticle<D>> typeFactory;
Supplier<Supplier<IParticleFactory<D>>> particleMetaFactory;
Supplier<? extends ICustomParticleData<D>> typeFactory;
ParticleType<D> type;
ResourceLocation id;
public ParticleEntry(ResourceLocation id, Supplier<? extends ICustomParticle<D>> typeFactory,
Supplier<Supplier<IParticleFactory<D>>> particleMetaFactory) {
public ParticleEntry(ResourceLocation id, Supplier<? extends ICustomParticleData<D>> typeFactory) {
this.id = id;
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) {
makeType();
registry.register(type);
registry.register(getOrCreateType());
}
void makeType() {
if (type == null) {
ParticleType<D> getOrCreateType() {
if (type != null)
return type;
type = typeFactory.get()
.createType();
type.setRegistryName(id);
}
return type;
}
@OnlyIn(Dist.CLIENT)
void registerFactory(ParticleManager particles) {
makeType();
if (particleMetaFactory == null)
particles.registerFactory(type, typeFactory.get()
.getFactory());
else
particles.registerFactory(type, particleMetaFactory.get().get());
typeFactory.get()
.register(getOrCreateType(), particles);
}
}

View file

@ -14,7 +14,7 @@ public class MixingCategory extends BasinCategory {
private final AnimatedMixer mixer = new AnimatedMixer();
private final AnimatedBlazeBurner heater = new AnimatedBlazeBurner();
private MixingType type;
MixingType type;
enum MixingType {
AUTO_SHAPELESS, MIXING, AUTO_BREWING;

View file

@ -2,6 +2,9 @@ package com.simibubi.create.content.contraptions.fluids;
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 net.minecraft.client.Minecraft;
@ -11,6 +14,7 @@ import net.minecraft.fluid.IFluidState;
import net.minecraft.particles.BlockParticleData;
import net.minecraft.particles.IParticleData;
import net.minecraft.particles.ParticleTypes;
import net.minecraft.util.Direction;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.World;
@ -40,6 +44,60 @@ public class FluidFX {
}
public static IParticleData getFluidParticle(FluidStack fluid) {
if (FluidHelper.hasBlockState(fluid.getFluid()))
return new BlockParticleData(ParticleTypes.BLOCK, fluid.getFluid()
.getDefaultState()
.getBlockState());
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) {
Vec3d directionVec = new Vec3d(side.getDirectionVec());
for (int i = 0; i < amount; i++) {
Vec3d vec = VecHelper.offsetRandomly(Vec3d.ZERO, r, 1)
.normalize();
vec = VecHelper.clampComponentWise(vec, rimRadius)
.mul(VecHelper.axisAlingedPlaneOf(directionVec))
.add(directionVec.scale(.45 + r.nextFloat() / 16f));
Vec3d 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, Vec3d directionVec, boolean inbound) {
for (int i = 0; i < amount; i++) {
Vec3d vec = VecHelper.offsetRandomly(Vec3d.ZERO, r, rimRadius);
vec = vec.mul(VecHelper.axisAlingedPlaneOf(directionVec))
.add(directionVec.scale(.5 + r.nextFloat() / 4f));
Vec3d m = vec;
Vec3d centerOf = VecHelper.getCenterOf(pos);
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);
}
}
private static void particle(IParticleData data, Vec3d pos, Vec3d motion) {
world().addParticle(data, pos.x, pos.y, pos.z, motion.x, motion.y, motion.z);
}

View file

@ -1,8 +1,9 @@
package com.simibubi.create.content.contraptions.fluids;
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.TileEntityBehaviour;
import com.simibubi.create.foundation.tileEntity.behaviour.BehaviourType;
import net.minecraft.block.BlockState;
@ -10,7 +11,7 @@ import net.minecraft.util.Direction;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.ILightReader;
public class FluidPipeAttachmentBehaviour extends TileEntityBehaviour {
public class FluidPipeAttachmentBehaviour extends BracketedTileEntityBehaviour {
public static BehaviourType<FluidPipeAttachmentBehaviour> TYPE = new BehaviourType<>();
@ -36,6 +37,9 @@ public class FluidPipeAttachmentBehaviour extends TileEntityBehaviour {
FluidPipeBehaviour fluidPipeBehaviour = tileEntity.getBehaviour(FluidPipeBehaviour.TYPE);
if (fluidPipeBehaviour == null)
return false;
// BlockState bracket = getBracket();
// if (bracket != Blocks.AIR.getDefaultState() && bracket.get(BracketBlock.FACING) == direction)
// return false;
return fluidPipeBehaviour.isConnectedTo(state, direction);
}
@ -56,4 +60,14 @@ public class FluidPipeAttachmentBehaviour extends TileEntityBehaviour {
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;
}
}

View file

@ -12,7 +12,6 @@ import javax.annotation.Nullable;
import com.simibubi.create.AllSpecialTextures;
import com.simibubi.create.CreateClient;
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.TileEntityBehaviour;
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.nbt.CompoundNBT;
import net.minecraft.nbt.ListNBT;
import net.minecraft.particles.BlockParticleData;
import net.minecraft.particles.IParticleData;
import net.minecraft.particles.ParticleTypes;
import net.minecraft.util.Direction;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
@ -48,6 +45,10 @@ import net.minecraftforge.fml.DistExecutor;
public abstract class FluidPipeBehaviour extends TileEntityBehaviour {
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{})
Map<Direction, Couple<PipeFlows>> allFlows;
@ -228,22 +229,17 @@ public abstract class FluidPipeBehaviour extends TileEntityBehaviour {
contentsChanged();
}
public void spawnParticles() {
DistExecutor.runWhenOn(Dist.CLIENT, () -> this::spawnParticlesInner);
}
public void spawnSplashOnRim(Direction face) {
DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> spawnSplashOnRimInner(face));
}
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();
public void spawnParticles() {
DistExecutor.runWhenOn(Dist.CLIENT, () -> this::spawnParticlesInner);
}
@OnlyIn(Dist.CLIENT)
private void spawnParticlesInner() {
if (!isRenderEntityWithinDistance())
if (!isRenderEntityWithinDistance(tileEntity.getPos()))
return;
if (fluid.isEmpty())
return;
@ -267,7 +263,7 @@ public abstract class FluidPipeBehaviour extends TileEntityBehaviour {
@OnlyIn(Dist.CLIENT)
private void spawnSplashOnRimInner(Direction face) {
if (!isRenderEntityWithinDistance())
if (!isRenderEntityWithinDistance(tileEntity.getPos()))
return;
if (fluid.isEmpty())
return;
@ -285,72 +281,36 @@ public abstract class FluidPipeBehaviour extends TileEntityBehaviour {
return;
}
IParticleData particle = null;
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;
IParticleData particle = FluidFX.getDrippingParticle(fluid);
float rimRadius = getRimRadius(state, side);
Vec3d directionVec = new Vec3d(side.getDirectionVec());
for (int i = 0; i < amount; i++) {
Vec3d vec = VecHelper.offsetRandomly(Vec3d.ZERO, r, 1)
.normalize();
vec = VecHelper.clampComponentWise(vec, rimRadius)
.mul(VecHelper.axisAlingedPlaneOf(directionVec))
.add(directionVec.scale(.45 + r.nextFloat() / 16f));
Vec3d 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);
}
FluidFX.spawnRimParticles(world, pos, side, amount, particle, rimRadius);
}
@OnlyIn(Dist.CLIENT)
private void spawnPouringLiquid(World world, BlockState state, FluidStack fluid, Direction side, int amount) {
IParticleData particle = new BlockParticleData(ParticleTypes.BLOCK, fluid.getFluid()
.getDefaultState()
.getBlockState());
IParticleData particle = FluidFX.getFluidParticle(fluid);
float rimRadius = getRimRadius(state, side);
Vec3d directionVec = new Vec3d(side.getDirectionVec());
BlockPos pos = tileEntity.getPos();
Couple<PipeFlows> couple = allFlows.get(side);
if (couple == null)
return;
couple.forEachWithContext((flow, inbound) -> {
if (flow.progress == null)
return;
for (int i = 0; i < amount; i++) {
Vec3d vec = VecHelper.offsetRandomly(Vec3d.ZERO, r, rimRadius);
vec = vec.mul(VecHelper.axisAlingedPlaneOf(directionVec))
.add(directionVec.scale(.5 + r.nextFloat() / 4f));
Vec3d m = vec;
Vec3d 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);
}
FluidFX.spawnPouringLiquid(world, pos, amount, particle, rimRadius, directionVec, inbound);
});
}
@OnlyIn(Dist.CLIENT)
private boolean isRenderEntityWithinDistance() {
public static boolean isRenderEntityWithinDistance(BlockPos pos) {
Entity renderViewEntity = Minecraft.getInstance()
.getRenderViewEntity();
if (renderViewEntity == null)
return false;
Vec3d center = VecHelper.getCenterOf(tileEntity.getPos());
Vec3d center = VecHelper.getCenterOf(pos);
if (renderViewEntity.getPositionVec()
.distanceTo(center) > MAX_PARTICLE_RENDER_DISTANCE)
return false;

View file

@ -5,6 +5,8 @@ import java.util.HashSet;
import java.util.List;
import java.util.Set;
import javax.annotation.Nullable;
import org.apache.commons.lang3.mutable.MutableObject;
import com.simibubi.create.AllBlocks;
@ -45,7 +47,7 @@ public class FluidPropagator {
return null;
if (otherBlock instanceof FlowingFluidBlock)
return null;
if (!isStraightPipe(state))
if (getStraightPipeAxis(state) == null)
return null;
for (Direction d : Iterate.directions) {
if (!pos.offset(d)
@ -161,12 +163,13 @@ public class FluidPropagator {
.isPresent();
}
public static boolean isStraightPipe(BlockState state) {
@Nullable
public static Axis getStraightPipeAxis(BlockState state) {
if (state.getBlock() instanceof AxisPipeBlock)
return true;
return state.get(AxisPipeBlock.AXIS);
if (!FluidPipeBlock.isPipe(state))
return false;
boolean axisFound = false;
return null;
Axis axisFound = null;
int connections = 0;
for (Axis axis : Iterate.axes) {
Direction d1 = Direction.getFacingFromAxis(AxisDirection.NEGATIVE, axis);
@ -178,12 +181,12 @@ public class FluidPropagator {
if (openAt2)
connections++;
if (openAt1 && openAt2)
if (axisFound)
return false;
if (axisFound != null)
return null;
else
axisFound = true;
axisFound = axis;
}
return axisFound && connections == 2;
return connections == 2 ? axisFound : null;
}
}

View file

@ -1,36 +1,63 @@
package com.simibubi.create.content.contraptions.fluids;
import java.util.List;
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.Iterate;
import net.minecraft.block.BlockState;
import net.minecraft.block.FlowingFluidBlock;
import net.minecraft.entity.LivingEntity;
import net.minecraft.fluid.Fluid;
import net.minecraft.fluid.Fluids;
import net.minecraft.fluid.IFluidState;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
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.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.world.World;
import net.minecraftforge.common.util.LazyOptional;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.capability.IFluidHandler;
import net.minecraftforge.fluids.capability.IFluidHandler.FluidAction;
import net.minecraftforge.fluids.capability.templates.FluidTank;
public class OpenEndedPipe {
World world;
BlockPos pos;
AxisAlignedBB aoe;
private OpenEndFluidHandler fluidHandler;
private BlockPos outputPos;
private boolean wasPulling;
private boolean stale;
private FluidStack cachedFluid;
private List<EffectInstance> cachedEffects;
public OpenEndedPipe(BlockFace face) {
fluidHandler = new OpenEndFluidHandler();
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) {
@ -58,7 +85,8 @@ public class OpenEndedPipe {
return;
if (waterlog) {
world.setBlockState(outputPos, state.with(BlockStateProperties.WATERLOGGED, false), 3);
world.getPendingFluidTicks().scheduleTick(outputPos, Fluids.WATER, 1);
world.getPendingFluidTicks()
.scheduleTick(outputPos, Fluids.WATER, 1);
return;
}
world.setBlockState(outputPos, fluidState.getBlockState()
@ -66,6 +94,20 @@ public class OpenEndedPipe {
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();
if (providedFluid == null)
return;
@ -75,17 +117,55 @@ public class OpenEndedPipe {
}
if (fluidState.isSource())
return;
if (world.dimension.doesWaterVaporize() && 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 (providedFluid.getFluid() != Fluids.WATER)
return;
world.setBlockState(outputPos, state.with(BlockStateProperties.WATERLOGGED, true), 3);
world.getPendingFluidTicks().scheduleTick(outputPos, Fluids.WATER, 1);
world.getPendingFluidTicks()
.scheduleTick(outputPos, Fluids.WATER, 1);
return;
}
world.setBlockState(outputPos, providedFluid.getDefaultState()
.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() {
return LazyOptional.of(() -> fluidHandler);
}
@ -113,6 +193,16 @@ public class OpenEndedPipe {
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 {
public OpenEndFluidHandler() {
@ -128,6 +218,8 @@ public class OpenEndedPipe {
return 0;
if (resource.isEmpty())
return 0;
FluidStack prevFluid = getFluid();
BlockState state = world.getBlockState(outputPos);
IFluidState fluidState = state.getFluidState();
if (!fluidState.isEmpty() && fluidState.getFluid() != resource.getFluid()) {
@ -144,7 +236,30 @@ public class OpenEndedPipe {
// Never allow being filled above 1000
FluidStack insertable = resource.copy();
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) {
@ -152,6 +267,7 @@ public class OpenEndedPipe {
if (super.fill(new FluidStack(fluid, 1000),
simulate ? FluidAction.SIMULATE : FluidAction.EXECUTE) != 1000)
return false;
updatePumpIfNecessary();
return true;
}
@ -161,11 +277,15 @@ public class OpenEndedPipe {
for (boolean simulate : Iterate.trueAndFalse)
if (drain(1000, simulate ? FluidAction.SIMULATE : FluidAction.EXECUTE).getAmount() != 1000)
return null;
updatePumpIfNecessary();
return fluid;
}
public void clear() {
boolean wasEmpty = isEmpty();
setFluid(FluidStack.EMPTY);
if (!wasEmpty)
updatePumpIfNecessary();
}
}

View file

@ -13,6 +13,7 @@ import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
import com.simibubi.create.foundation.utility.Iterate;
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;
@ -35,10 +36,14 @@ public class PipeAttachmentModel extends WrappedBakedModel {
PipeModelData data = new PipeModelData();
FluidPipeAttachmentBehaviour attachmentBehaviour =
TileEntityBehaviour.get(world, pos, FluidPipeAttachmentBehaviour.TYPE);
if (attachmentBehaviour != null)
if (attachmentBehaviour != null) {
for (Direction d : Iterate.directions)
data.putRim(d, attachmentBehaviour.getAttachment(world, pos, state, d));
data.putBracket(attachmentBehaviour.getBracket());
}
data.setEncased(FluidPipeBlock.shouldDrawCasing(world, pos, state));
return new ModelDataMap.Builder().withInitial(PIPE_PROPERTY, data)
.build();
}
@ -67,17 +72,31 @@ public class PipeAttachmentModel extends WrappedBakedModel {
if (pipeData.isEncased())
quads.addAll(AllBlockPartials.FLUID_PIPE_CASING.get()
.getQuads(state, side, rand, data));
IBakedModel bracket = pipeData.getBracket();
if (bracket != null)
quads.addAll(bracket.getQuads(state, side, rand, data));
}
private class PipeModelData {
AttachmentTypes[] rims;
boolean encased;
IBakedModel bracket;
public PipeModelData() {
rims = new AttachmentTypes[6];
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) {
rims[face.getIndex()] = rim;
}

View file

@ -7,6 +7,8 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.annotation.Nullable;
import org.apache.commons.lang3.mutable.MutableBoolean;
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.nbt.CompoundNBT;
import net.minecraft.nbt.ListNBT;
import net.minecraft.particles.IParticleData;
import net.minecraft.tileentity.TileEntityType;
import net.minecraft.util.Direction;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.ILightReader;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.common.util.Constants.NBT;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.capability.IFluidHandler;
import net.minecraftforge.fluids.capability.IFluidHandler.FluidAction;
import net.minecraftforge.fml.DistExecutor;
public class PumpTileEntity extends KineticTileEntity {
@ -70,6 +77,7 @@ public class PumpTileEntity extends KineticTileEntity {
if (world.isRemote) {
if (speed == 0)
return;
spawnParticles();
arrowDirection.chase(speed >= 0 ? 1 : -1, .5f, Chaser.EXP);
arrowDirection.tickChaser();
return;
@ -279,6 +287,14 @@ public class PumpTileEntity extends KineticTileEntity {
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) {
if (networks != null)
networks.get(front)
@ -301,6 +317,44 @@ public class PumpTileEntity extends KineticTileEntity {
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);
Vec3d directionVec = new Vec3d(side.getDirectionVec());
FluidFX.spawnPouringLiquid(world, pos, amount, particle, rimRadius, directionVec, inbound);
}
public Map<BlockFace, OpenEndedPipe> getOpenEnds(Direction side) {
return openEnds.get(isFront(side));
}

View file

@ -249,7 +249,7 @@ public class FluidDrainingBehaviour extends FluidManipulationBehaviour {
World world = getWorld();
int maxBlocks = maxBlocks();
if (visited.size() > maxBlocks) {
if (visited.size() > maxBlocks && maxBlocks != -1) {
infinite = true;
// Find first block with valid fluid
while (true) {
@ -280,10 +280,9 @@ public class FluidDrainingBehaviour extends FluidManipulationBehaviour {
search(fluid, validationFrontier, validationVisited, (e, d) -> newValidationSet.add(e), false);
int maxBlocks = maxBlocks();
if (validationVisited.size() > maxBlocks) {
if (!infinite) {
if (validationVisited.size() > maxBlocks && maxBlocks != -1) {
if (!infinite)
reset();
}
validationFrontier.clear();
setLongValidationTimer();
return;

View file

@ -12,16 +12,26 @@ import com.simibubi.create.foundation.utility.Iterate;
import it.unimi.dsi.fastutil.PriorityQueue;
import it.unimi.dsi.fastutil.objects.ObjectHeapPriorityQueue;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.block.DoorBlock;
import net.minecraft.block.FlowingFluidBlock;
import net.minecraft.block.material.Material;
import net.minecraft.fluid.Fluid;
import net.minecraft.fluid.Fluids;
import net.minecraft.fluid.IFluidState;
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.SoundCategory;
import net.minecraft.util.SoundEvents;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MutableBoundingBox;
import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.ITickList;
import net.minecraft.world.NextTickListEntry;
import net.minecraft.world.World;
@ -60,7 +70,7 @@ public class FluidFillingBehaviour extends FluidManipulationBehaviour {
(p, d) -> infinityCheckFrontier.add(new BlockPosEntry(p, d)), true);
int maxBlocks = maxBlocks();
if (infinityCheckVisited.size() > maxBlocks) {
if (infinityCheckVisited.size() > maxBlocks && maxBlocks != -1) {
if (!infinite) {
reset();
infinite = true;
@ -111,16 +121,24 @@ public class FluidFillingBehaviour extends FluidManipulationBehaviour {
int maxRange = maxRange();
int maxRangeSq = maxRange * maxRange;
int maxBlocks = maxBlocks();
boolean evaporate = world.dimension.doesWaterVaporize() && fluid.isIn(FluidTags.WATER);
if (infinite) {
if (infinite || evaporate) {
IFluidState fluidState = world.getFluidState(rootPos);
boolean equivalentTo = fluidState.getFluid()
.isEquivalentTo(fluid);
if (!equivalentTo)
if (!equivalentTo && !evaporate)
return false;
if (simulate)
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;
}
@ -137,7 +155,7 @@ public class FluidFillingBehaviour extends FluidManipulationBehaviour {
if (!simulate)
visited.add(currentPos);
if (visited.size() >= maxBlocks) {
if (visited.size() >= maxBlocks && maxBlocks != -1) {
infinite = true;
visited.clear();
queue.clear();
@ -154,9 +172,10 @@ public class FluidFillingBehaviour extends FluidManipulationBehaviour {
BlockState blockState = world.getBlockState(currentPos);
if (blockState.has(BlockStateProperties.WATERLOGGED) && fluid.isEquivalentTo(Fluids.WATER)) {
world.setBlockState(currentPos, blockState.with(BlockStateProperties.WATERLOGGED, true),
2 | 16);
world.setBlockState(currentPos,
updatePostWaterlogging(blockState.with(BlockStateProperties.WATERLOGGED, true)), 2 | 16);
} else {
replaceBlock(world, currentPos, blockState);
world.setBlockState(currentPos, fluid.getDefaultState()
.getBlockState(), 2 | 16);
}
@ -237,8 +256,36 @@ public class FluidFillingBehaviour extends FluidManipulationBehaviour {
.isEmpty())
return toFill.isEquivalentTo(fluidState.getFluid()) ? SpaceType.FILLED : SpaceType.BLOCKING;
return blockState.getMaterial()
.isReplaceable() ? SpaceType.FILLABLE : SpaceType.BLOCKING;
return canBeReplacedByFluid(world, pos, blockState) ? 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.getWorld(), 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.has(BlockStateProperties.LIT))
state = state.with(BlockStateProperties.LIT, false);
return state;
}
@Override

View file

@ -6,6 +6,7 @@ import java.util.List;
import java.util.Set;
import java.util.function.BiConsumer;
import com.simibubi.create.foundation.config.AllConfigs;
import com.simibubi.create.foundation.fluid.FluidHelper;
import com.simibubi.create.foundation.networking.AllPackets;
import com.simibubi.create.foundation.tileEntity.SmartTileEntity;
@ -76,11 +77,11 @@ public abstract class FluidManipulationBehaviour extends TileEntityBehaviour {
}
protected int maxRange() {
return 128;
return AllConfigs.SERVER.fluids.hosePulleyRange.get();
}
protected int maxBlocks() {
return 10000;
return AllConfigs.SERVER.fluids.hosePulleyBlockThreshold.get();
}
public void reset() {
@ -137,7 +138,8 @@ public abstract class FluidManipulationBehaviour extends TileEntityBehaviour {
int maxRangeSq = maxRange * maxRange;
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);
BlockPos currentPos = entry.pos;
if (visited.contains(currentPos))
@ -180,7 +182,7 @@ public abstract class FluidManipulationBehaviour extends TileEntityBehaviour {
}
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()
.getFillSound()

View file

@ -4,6 +4,7 @@ import java.util.function.Supplier;
import javax.annotation.Nullable;
import com.simibubi.create.foundation.fluid.FluidHelper;
import com.simibubi.create.foundation.fluid.SmartFluidTank;
import net.minecraft.util.math.BlockPos;
@ -18,6 +19,8 @@ public class HosePulleyFluidHandler implements IFluidHandler {
public int fill(FluidStack resource, FluidAction action) {
if (!internalTank.isEmpty() && !resource.isFluidEqual(internalTank.getFluid()))
return 0;
if (resource.isEmpty() || !FluidHelper.hasBlockState(resource.getFluid()))
return 0;
int diff = resource.getAmount();
int totalAmountAfterFill = diff + internalTank.getFluidAmount();

View file

@ -2,6 +2,7 @@ package com.simibubi.create.content.contraptions.fluids.actors;
import com.simibubi.create.AllShapes;
import com.simibubi.create.AllTileEntities;
import com.simibubi.create.content.contraptions.wrench.IWrenchable;
import net.minecraft.block.Block;
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.world.IBlockReader;
public class SpoutBlock extends Block {
public class SpoutBlock extends Block implements IWrenchable {
public SpoutBlock(Properties p_i48440_1_) {
super(p_i48440_1_);

View file

@ -106,14 +106,16 @@ public class SpoutTileEntity extends SmartTileEntity {
handler.handleProcessingOnItem(transported, TransportedResult.convertToAndLeaveHeld(outList, held));
}
tank.getPrimaryHandler().setFluid(fluid);
tank.getPrimaryHandler()
.setFluid(fluid);
sendSplash = true;
notifyUpdate();
return PASS;
}
private FluidStack getCurrentFluidInTank() {
return tank.getPrimaryHandler().getFluid();
return tank.getPrimaryHandler()
.getFluid();
}
@Override
@ -134,23 +136,25 @@ public class SpoutTileEntity extends SmartTileEntity {
if (!clientPacket)
return;
if (compound.contains("Splash"))
spawnSplash(tank.getPrimaryTank().getRenderedFluid());
spawnSplash(tank.getPrimaryTank()
.getRenderedFluid());
}
@Override
public <T> LazyOptional<T> getCapability(Capability<T> cap, Direction side) {
if (cap == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY && side != Direction.DOWN)
return tank.getCapability().cast();
return tank.getCapability()
.cast();
return super.getCapability(cap, side);
}
public void tick() {
super.tick();
if (processingTicks >= 8 && world.isRemote)
if (processingTicks >= 0)
processingTicks--;
spawnProcessingParticles(tank.getPrimaryTank().getRenderedFluid());
if (processingTicks >= 8 && world.isRemote)
spawnProcessingParticles(tank.getPrimaryTank()
.getRenderedFluid());
}
protected void spawnProcessingParticles(FluidStack fluid) {

View file

@ -0,0 +1,71 @@
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) -> new FluidStackParticle(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;
}
}

View file

@ -0,0 +1,87 @@
package com.simibubi.create.content.contraptions.fluids.particle;
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.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 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.particleScale /= 2.0F;
this.field_217587_G = this.rand.nextFloat() * 3.0F;
this.field_217588_H = this.rand.nextFloat() * 3.0F;
}
public IParticleRenderType getRenderType() {
return IParticleRenderType.TERRAIN_SHEET;
}
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 (!(fluid.getFluid() instanceof PotionFluid))
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);
}
}

View file

@ -1,15 +1,19 @@
package com.simibubi.create.content.contraptions.fluids.pipes;
import java.util.Map;
import java.util.Optional;
import java.util.Random;
import com.simibubi.create.AllBlocks;
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.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.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.block.RotatedPillarBlock;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
@ -28,7 +32,7 @@ import net.minecraft.world.TickPriority;
import net.minecraft.world.World;
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_) {
super(p_i48339_1_);
@ -39,6 +43,8 @@ public class AxisPipeBlock extends RotatedPillarBlock implements IWrenchable, IA
boolean blockTypeChanged = state.getBlock() != newState.getBlock();
if (blockTypeChanged && !world.isRemote)
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()))
world.removeTileEntity(pos);
}
@ -100,4 +106,16 @@ public class AxisPipeBlock extends RotatedPillarBlock implements IWrenchable, IA
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()));
}
}

View file

@ -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));
}
}

View file

@ -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();
}
}

View file

@ -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();
}
}

View file

@ -1,5 +1,6 @@
package com.simibubi.create.content.contraptions.fluids.pipes;
import java.util.Optional;
import java.util.Random;
import javax.annotation.Nullable;
@ -8,18 +9,20 @@ import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllTileEntities;
import com.simibubi.create.content.contraptions.fluids.FluidPipeAttachmentBehaviour;
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.utility.Iterate;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.block.IWaterLoggable;
import net.minecraft.block.SixWayBlock;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.fluid.Fluids;
import net.minecraft.fluid.IFluidState;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemUseContext;
import net.minecraft.network.DebugPacketSender;
import net.minecraft.state.StateContainer.Builder;
@ -39,7 +42,7 @@ import net.minecraft.world.TickPriority;
import net.minecraft.world.World;
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) {
super(4 / 16f, properties);
@ -48,6 +51,9 @@ public class FluidPipeBlock extends SixWayBlock implements IWaterLoggable, IWren
@Override
public ActionResultType onWrenched(BlockState state, ItemUseContext context) {
if (tryRemoveBracket(context))
return ActionResultType.SUCCESS;
World world = context.getWorld();
BlockPos pos = context.getPos();
Axis axis = getAxis(world, pos, state);
@ -78,16 +84,7 @@ public class FluidPipeBlock extends SixWayBlock implements IWaterLoggable, IWren
@Nullable
private Axis getAxis(IBlockReader world, BlockPos pos, BlockState state) {
if (!FluidPropagator.isStraightPipe(state))
return null;
Axis axis = null;
for (Direction d : Iterate.directions) {
if (isOpenAt(state, d)) {
axis = d.getAxis();
break;
}
}
return axis;
return FluidPropagator.getStraightPipeAxis(state);
}
@Override
@ -105,6 +102,8 @@ public class FluidPipeBlock extends SixWayBlock implements IWaterLoggable, IWren
boolean blockTypeChanged = state.getBlock() != newState.getBlock();
if (blockTypeChanged && !world.isRemote)
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()))
world.removeTileEntity(pos);
}
@ -141,10 +140,13 @@ public class FluidPipeBlock extends SixWayBlock implements IWaterLoggable, IWren
}
public static boolean canConnectTo(ILightReader world, BlockPos pos, BlockState neighbour, Direction blockFace) {
if (isPipe(neighbour) || FluidPropagator.hasFluidCapability(neighbour, world, pos, blockFace))
if (FluidPropagator.hasFluidCapability(neighbour, world, pos, blockFace))
return true;
FluidPipeAttachmentBehaviour attachmentBehaviour =
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)
return false;
return attachmentBehaviour.isPipeConnectedTowards(neighbour, blockFace);
@ -155,9 +157,11 @@ public class FluidPipeBlock extends SixWayBlock implements IWaterLoggable, IWren
BlockState facingState = world.getBlockState(offsetPos);
if (!isPipe(facingState))
return true;
if (!canConnectTo(world, offsetPos, facingState, direction))
return true;
if (!isCornerOrEndPipe(world, pos, state))
return false;
if (FluidPropagator.isStraightPipe(facingState))
if (FluidPropagator.getStraightPipeAxis(facingState) != null)
return true;
if (!shouldDrawCasing(world, pos, state) && shouldDrawCasing(world, offsetPos, facingState))
return true;
@ -171,7 +175,8 @@ public class FluidPipeBlock extends SixWayBlock implements IWaterLoggable, IWren
}
public static boolean isCornerOrEndPipe(ILightReader 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(ILightReader world, BlockPos pos, BlockState state) {
@ -206,20 +211,28 @@ public class FluidPipeBlock extends SixWayBlock implements IWaterLoggable, IWren
@Override
public BlockState updatePostPlacement(BlockState state, Direction direction, BlockState neighbourState,
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));
}
if (isOpenAt(state, direction) && neighbourState.has(BlockStateProperties.WATERLOGGED))
world.getPendingBlockTicks()
.scheduleTick(pos, this, 1, TickPriority.HIGH);
return updateBlockState(state, direction, direction.getOpposite(), world, pos);
}
public BlockState updateBlockState(BlockState state, Direction preferredDirection, @Nullable Direction ignore,
ILightReader 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
for (Direction d : Iterate.directions)
if (d != ignore)
state = state.with(FACING_TO_PROPERTY_MAP.get(d),
canConnectTo(world, pos.offset(d), world.getBlockState(pos.offset(d)), d));
if (d != ignore) {
boolean shouldConnect = 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
Direction connectedDirection = null;
@ -245,4 +258,16 @@ public class FluidPipeBlock extends SixWayBlock implements IWaterLoggable, IWren
return state.get(BlockStateProperties.WATERLOGGED) ? Fluids.WATER.getStillFluidState(false)
: 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()));
}
}

View file

@ -39,12 +39,11 @@ public class GlassFluidPipeBlock extends AxisPipeBlock {
@Override
public ActionResultType onWrenched(BlockState state, ItemUseContext context) {
if (tryRemoveBracket(context))
return ActionResultType.SUCCESS;
BlockState newState = state;
World world = context.getWorld();
BlockPos pos = context.getPos();
// if (!state.get(ALT))
// newState = state.with(ALT, true);
// else
newState = toRegularPipe(world, pos, state);
world.setBlockState(pos, newState, 3);
return ActionResultType.SUCCESS;

View file

@ -14,7 +14,7 @@ import net.minecraft.util.math.Vec3i;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
public class AirFlowParticleData implements IParticleData, ICustomParticle<AirFlowParticleData> {
public class AirFlowParticleData implements IParticleData, ICustomParticleDataWithSprite<AirFlowParticleData> {
public static final IParticleData.IDeserializer<AirFlowParticleData> DESERIALIZER = new IParticleData.IDeserializer<AirFlowParticleData>() {
public AirFlowParticleData deserialize(ParticleType<AirFlowParticleData> particleTypeIn, StringReader reader)
@ -75,7 +75,7 @@ public class AirFlowParticleData implements IParticleData, ICustomParticle<AirFl
@Override
@OnlyIn(Dist.CLIENT)
public IParticleMetaFactory<AirFlowParticleData> getFactory() {
public IParticleMetaFactory<AirFlowParticleData> getMetaFactory() {
return AirFlowParticle.Factory::new;
}

View file

@ -13,7 +13,7 @@ import net.minecraft.particles.ParticleType;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
public class AirParticleData implements IParticleData, ICustomParticle<AirParticleData> {
public class AirParticleData implements IParticleData, ICustomParticleDataWithSprite<AirParticleData> {
public static final IParticleData.IDeserializer<AirParticleData> DESERIALIZER =
new IParticleData.IDeserializer<AirParticleData>() {
@ -66,7 +66,7 @@ public class AirParticleData implements IParticleData, ICustomParticle<AirPartic
@Override
@OnlyIn(Dist.CLIENT)
public IParticleMetaFactory<AirParticleData> getFactory() {
public IParticleMetaFactory<AirParticleData> getMetaFactory() {
return AirParticle.Factory::new;
}

View file

@ -6,14 +6,14 @@ import com.mojang.brigadier.StringReader;
import com.mojang.brigadier.exceptions.CommandSyntaxException;
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.particles.IParticleData;
import net.minecraft.particles.ParticleType;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
public class CubeParticleData implements IParticleData, ICustomParticle<CubeParticleData> {
public class CubeParticleData implements IParticleData, ICustomParticleData<CubeParticleData> {
public static final IParticleData.IDeserializer<CubeParticleData> DESERIALIZER = new IParticleData.IDeserializer<CubeParticleData>() {
@Override
@ -55,8 +55,8 @@ public class CubeParticleData implements IParticleData, ICustomParticle<CubePart
this.hot = hot;
}
public static CubeParticleData dummy() {
return new CubeParticleData(0, 0, 0, 0, 0, false);
public CubeParticleData() {
this(0, 0, 0, 0, 0, false);
}
@Override
@ -66,8 +66,8 @@ public class CubeParticleData implements IParticleData, ICustomParticle<CubePart
@Override
@OnlyIn(Dist.CLIENT)
public ParticleManager.IParticleMetaFactory<CubeParticleData> getFactory() {
return null;
public IParticleFactory<CubeParticleData> getFactory() {
return new CubeParticle.Factory();
}
@Override

View file

@ -18,7 +18,7 @@ import net.minecraftforge.api.distmarker.OnlyIn;
@ParametersAreNonnullByDefault
@MethodsReturnNonnullByDefault
public class HeaterParticleData implements IParticleData, ICustomParticle<HeaterParticleData> {
public class HeaterParticleData implements IParticleData, ICustomParticleDataWithSprite<HeaterParticleData> {
public static final IParticleData.IDeserializer<HeaterParticleData> DESERIALIZER =
new IParticleData.IDeserializer<HeaterParticleData>() {
@ -61,7 +61,7 @@ public class HeaterParticleData implements IParticleData, ICustomParticle<Heater
@Override
@OnlyIn(Dist.CLIENT)
public IParticleMetaFactory<HeaterParticleData> getFactory() {
public IParticleMetaFactory<HeaterParticleData> getMetaFactory() {
return HeaterParticle.Factory::new;
}

View file

@ -1,13 +1,14 @@
package com.simibubi.create.content.contraptions.particle;
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.IDeserializer;
import net.minecraft.particles.ParticleType;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
public interface ICustomParticle<T extends IParticleData> {
public interface ICustomParticleData<T extends IParticleData> {
public IDeserializer<T> getDeserializer();
@ -16,6 +17,11 @@ public interface ICustomParticle<T extends IParticleData> {
}
@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());
}
}

View file

@ -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());
}
}

View file

@ -14,9 +14,11 @@ import net.minecraft.util.Direction.Axis;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
public class RotationIndicatorParticleData implements IParticleData, ICustomParticle<RotationIndicatorParticleData> {
public class RotationIndicatorParticleData
implements IParticleData, ICustomParticleDataWithSprite<RotationIndicatorParticleData> {
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,
StringReader reader) throws CommandSyntaxException {
reader.expect(' ');
@ -94,7 +96,7 @@ public class RotationIndicatorParticleData implements IParticleData, ICustomPart
@Override
@OnlyIn(Dist.CLIENT)
public IParticleMetaFactory<RotationIndicatorParticleData> getFactory() {
public IParticleMetaFactory<RotationIndicatorParticleData> getMetaFactory() {
return RotationIndicatorParticle.Factory::new;
}

View file

@ -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;
}
}
}

View file

@ -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;
}
}

View file

@ -1,15 +1,19 @@
package com.simibubi.create.content.contraptions.relays.elementary;
import java.util.Optional;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllShapes;
import com.simibubi.create.AllTileEntities;
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
import com.simibubi.create.content.contraptions.base.RotatedPillarKineticBlock;
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.BlockRenderType;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.block.IWaterLoggable;
import net.minecraft.block.material.PushReaction;
import net.minecraft.entity.player.PlayerEntity;
@ -35,7 +39,7 @@ import net.minecraft.world.IWorld;
import net.minecraft.world.IWorldReader;
import net.minecraft.world.World;
public class ShaftBlock extends RotatedPillarKineticBlock implements IWaterLoggable {
public class ShaftBlock extends RotatedPillarKineticBlock implements IWaterLoggable, IWrenchableWithBracket {
public ShaftBlock(Properties properties) {
super(properties);
@ -52,13 +56,16 @@ public class ShaftBlock extends RotatedPillarKineticBlock implements IWaterLogga
}
@Override
public BlockRenderType getRenderType(BlockState state) {
return BlockRenderType.ENTITYBLOCK_ANIMATED;
public TileEntity createTileEntity(BlockState state, IBlockReader world) {
return AllTileEntities.SIMPLE_KINETIC.create();
}
@Override
public TileEntity createTileEntity(BlockState state, IBlockReader world) {
return AllTileEntities.SIMPLE_KINETIC.create();
@SuppressWarnings("deprecation")
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
@ -82,18 +89,22 @@ public class ShaftBlock extends RotatedPillarKineticBlock implements IWaterLogga
}
@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())
return ActionResultType.PASS;
ItemStack heldItem = player.getHeldItem(hand);
for (EncasedShaftBlock.Casing casing : EncasedShaftBlock.Casing.values()) {
if (casing.getCasingEntry().isIn(heldItem)) {
if (casing.getCasingEntry()
.isIn(heldItem)) {
if (world.isRemote)
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;
}
}
@ -115,7 +126,8 @@ public class ShaftBlock extends RotatedPillarKineticBlock implements IWaterLogga
@Override
public IFluidState 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
@ -128,14 +140,29 @@ public class ShaftBlock extends RotatedPillarKineticBlock implements IWaterLogga
public BlockState updatePostPlacement(BlockState state, Direction direction, BlockState neighbourState,
IWorld world, BlockPos pos, BlockPos neighbourPos) {
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;
}
@Override
public BlockState getStateForPlacement(BlockItemUseContext context) {
IFluidState ifluidstate = context.getWorld().getFluidState(context.getPos());
return super.getStateForPlacement(context).with(BlockStateProperties.WATERLOGGED, Boolean.valueOf(ifluidstate.getFluid() == Fluids.WATER));
IFluidState ifluidstate = context.getWorld()
.getFluidState(context.getPos());
return super.getStateForPlacement(context).with(BlockStateProperties.WATERLOGGED,
Boolean.valueOf(ifluidstate.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()));
}
}

View file

@ -1,6 +1,9 @@
package com.simibubi.create.content.contraptions.relays.elementary;
import java.util.List;
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
import net.minecraft.tileentity.TileEntityType;
import net.minecraft.util.math.AxisAlignedBB;
@ -11,6 +14,12 @@ public class SimpleKineticTileEntity extends KineticTileEntity {
super(type);
}
@Override
public void addBehaviours(List<TileEntityBehaviour> behaviours) {
behaviours.add(new BracketedTileEntityBehaviour(this));
super.addBehaviours(behaviours);
}
@Override
public AxisAlignedBB getRenderBoundingBox() {
return new AxisAlignedBB(pos).grow(1);

View file

@ -1,53 +1,18 @@
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.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 class GaugeGenerator extends SpecialBlockStateGen {
public class GaugeGenerator extends DirectionalAxisBlockStateGen {
@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;
}
@Override
public <T extends Block> ModelFile getModel(DataGenContext<Block, T> ctx, RegistrateBlockstateProvider prov,
public <T extends Block> String getModelPrefix(DataGenContext<Block, T> ctx, RegistrateBlockstateProvider prov,
BlockState state) {
boolean vertical = state.get(GaugeBlock.FACING)
.getAxis()
.isVertical();
String partial = vertical ? "base" : "base_wall";
return prov.models()
.getExistingFile(prov.modLoc("block/gauge/" + partial));
return "block/gauge/base";
}
}

View file

@ -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;
}
}

View file

@ -75,7 +75,9 @@ public class BlockzapperItem extends ZapperItem {
@Override
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);
items.add(gunWithoutStuff);
@ -89,7 +91,6 @@ public class BlockzapperItem extends ZapperItem {
setTier(c, ComponentTier.Chromatic, gunWithPurpurStuff);
items.add(gunWithPurpurStuff);
}
}
protected boolean activate(World world, PlayerEntity player, ItemStack stack, BlockState selectedState,
BlockRayTraceResult raytrace) {

View file

@ -235,7 +235,7 @@ public class SchematicHandler {
selectionScreen.cycle((int) delta);
return true;
}
if (!AllKeys.ctrlDown())
if (AllKeys.ctrlDown())
return currentTool.getTool()
.handleMouseWheel(delta);
return false;

View file

@ -12,6 +12,7 @@ public class AllCommands {
//general purpose
.then(ToggleDebugCommand.register())
.then(OverlayConfigCommand.register())
.then(FixLightingCommand.register())
//dev-util
//Comment out for release

View file

@ -10,9 +10,11 @@ import com.simibubi.create.foundation.config.AllConfigs;
import com.simibubi.create.foundation.gui.ScreenOpener;
import com.simibubi.create.foundation.networking.SimplePacketBase;
import net.minecraft.client.Minecraft;
import net.minecraft.network.PacketBuffer;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.common.ForgeConfig;
import net.minecraftforge.fml.DistExecutor;
import net.minecraftforge.fml.network.NetworkEvent;
@ -39,24 +41,27 @@ public class ConfigureConfigPacket extends SimplePacketBase {
@Override
public void handle(Supplier<NetworkEvent.Context> ctx) {
ctx.get().enqueueWork(() -> DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> {
ctx.get()
.enqueueWork(() -> DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> {
try {
Actions.valueOf(option).performAction(value);
Actions.valueOf(option)
.performAction(value);
} 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 {
rainbowDebug((value) -> {
AllConfigs.CLIENT.rainbowDebug.set(Boolean.parseBoolean(value));
}),
overlayScreen((value) -> {
overlayScreenAction();
}),
overlayScreen(Actions::overlayScreenAction),
fixLighting(Actions::experimentalLightingAction),
overlayReset((value) -> {
AllConfigs.CLIENT.overlayOffsetX.set(0);
AllConfigs.CLIENT.overlayOffsetY.set(0);
@ -70,14 +75,19 @@ public class ConfigureConfigPacket extends SimplePacketBase {
this.consumer = action;
}
void performAction(String value){
void performAction(String value) {
consumer.accept(value);
}
@OnlyIn(Dist.CLIENT)
private static void overlayScreenAction(){
//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
private static void overlayScreenAction(String value) {
ScreenOpener.open(new GoggleConfigScreen());
}
@OnlyIn(Dist.CLIENT)
private static void experimentalLightingAction(String value) {
ForgeConfig.CLIENT.experimentalForgeLightPipelineEnabled.set(true);
Minecraft.getInstance().worldRenderer.loadRenderers();
}
}
}

View file

@ -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;
});
}
}

View file

@ -4,7 +4,12 @@ public class CFluids extends ConfigBase {
public ConfigInt fluidTankCapacity = i(8, 1, "fluidTankCapacity", Comments.buckets, Comments.fluidTankCapacity);
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
public String getName() {
@ -16,7 +21,13 @@ public class CFluids extends ConfigBase {
static String buckets = "[in Buckets]";
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 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.";
}
}

View file

@ -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));
}
}

View file

@ -13,6 +13,7 @@ import net.minecraft.data.DataGenerator;
import net.minecraft.data.IFinishedRecipe;
import net.minecraft.data.RecipeProvider;
import net.minecraft.item.Item;
import net.minecraft.tags.ItemTags;
import net.minecraft.tags.Tag;
import net.minecraft.util.IItemProvider;
import net.minecraftforge.common.Tags;
@ -50,6 +51,10 @@ public abstract class CreateRecipeProvider extends RecipeProvider {
return Tags.Items.DUSTS_REDSTONE;
}
static Tag<Item> planks() {
return ItemTags.PLANKS;
}
static Tag<Item> gold() {
return AllTags.forgeItemTag("ingots/gold");
}

View file

@ -422,6 +422,22 @@ public class StandardRecipeGen extends CreateRecipeProvider {
.patternLine("SCS")
.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)
.unlockedByTag(I::copper)
.viaShaped(b -> b.key('S', I.copperSheet())
@ -459,8 +475,7 @@ public class StandardRecipeGen extends CreateRecipeProvider {
.patternLine("S")),
ITEM_DRAIN = create(AllBlocks.ITEM_DRAIN).unlockedBy(I::copperCasing)
.viaShaped(b -> b
.key('P', Blocks.IRON_BARS)
.viaShaped(b -> b.key('P', Blocks.IRON_BARS)
.key('S', I.copperCasing())
.patternLine("P")
.patternLine("S")),
@ -499,8 +514,7 @@ public class StandardRecipeGen extends CreateRecipeProvider {
.patternLine(" I ")),
HOSE_PULLEY = create(AllBlocks.HOSE_PULLEY).unlockedByTag(I::copper)
.viaShaped(b -> b
.key('S', I.shaft())
.viaShaped(b -> b.key('S', I.shaft())
.key('P', AllBlocks.FLUID_PIPE.get())
.key('B', I.copperCasing())
.key('C', Items.DRIED_KELP)

View file

@ -12,6 +12,8 @@ import com.simibubi.create.content.contraptions.processing.EmptyingByBasin;
import com.simibubi.create.foundation.tileEntity.SmartTileEntity;
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.fluid.Fluid;
import net.minecraft.fluid.Fluids;
@ -44,6 +46,11 @@ public class FluidHelper {
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) {
if (fluid == Fluids.WATER)
return Fluids.FLOWING_WATER;

View file

@ -1,5 +1,6 @@
package com.simibubi.create.foundation.fluid;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.function.Predicate;
@ -13,6 +14,7 @@ import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.google.gson.JsonSyntaxException;
import net.minecraft.fluid.FlowingFluid;
import net.minecraft.fluid.Fluid;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.network.PacketBuffer;
@ -180,7 +182,8 @@ public abstract class FluidIngredient implements Predicate<FluidStack> {
@Override
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));
}
}
@ -191,20 +194,30 @@ public abstract class FluidIngredient implements Predicate<FluidStack> {
@Override
protected boolean testInternal(FluidStack t) {
if (tag == null)
for (FluidStack accepted : getMatchingFluidStacks())
if (accepted.getFluid()
.isEquivalentTo(t.getFluid()))
return true;
return t.getFluid()
.isIn(tag);
}
@Override
protected void readInternal(PacketBuffer buffer) {
ResourceLocation resourcelocation = buffer.readResourceLocation();
tag = FluidTags.getContainer()
.get(resourcelocation);
int size = buffer.readVarInt();
matchingFluidStacks = new ArrayList<>(size);
for (int i = 0; i < size; i++)
matchingFluidStacks.add(buffer.readFluidStack());
}
@Override
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
@ -226,6 +239,12 @@ public abstract class FluidIngredient implements Predicate<FluidStack> {
protected List<FluidStack> determineMatchingFluidStacks() {
return tag.getAllElements()
.stream()
.map(f -> {
if (f instanceof FlowingFluid)
return ((FlowingFluid) f).getStillFluid();
return f;
})
.distinct()
.map(f -> new FluidStack(f, amountRequired))
.collect(Collectors.toList());
}

View file

@ -11,6 +11,7 @@ import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.foundation.fluid.FluidRenderer;
import com.simibubi.create.foundation.utility.ColorHelper;
import com.simibubi.create.foundation.utility.VecHelper;
import com.simibubi.create.foundation.utility.VirtualEmptyModelData;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
@ -175,7 +176,7 @@ public class GuiGameElement {
Vec3d rgb = ColorHelper.getRGB(color);
blockRenderer.getBlockModelRenderer()
.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();
}
}
@ -194,7 +195,7 @@ public class GuiGameElement {
if (blockState.getBlock() instanceof FireBlock) {
RenderHelper.disableGuiDepthLighting();
blockRenderer.renderBlock(blockState, ms, buffer, 0xF000F0, OverlayTexture.DEFAULT_UV,
EmptyModelData.INSTANCE);
VirtualEmptyModelData.INSTANCE);
RenderHelper.enable();
buffer.draw();
return;

View file

@ -24,7 +24,6 @@ import net.minecraft.client.renderer.texture.OverlayTexture;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.util.Direction;
import net.minecraft.util.math.BlockPos;
import net.minecraftforge.client.model.data.EmptyModelData;
public class SuperByteBufferCache {
@ -116,7 +115,7 @@ public class SuperByteBufferCache {
builder.begin(GL11.GL_QUADS, DefaultVertexFormats.BLOCK);
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();
return new SuperByteBuffer(builder);

View file

@ -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;
}
}

View file

@ -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"}
}
}
]
}

View file

@ -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"}
}
}
]
}

View 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"}
}
}
]
}

View file

@ -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"}
}
}
]
}

View file

@ -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"}
}
}
]
}

View 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"}
}
}
]
}

View file

@ -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"}
}
}
]
}

View file

@ -4,7 +4,7 @@
"textures": {
"0": "create:block/copper_casing",
"1": "create:block/fluid_tank",
"5": "create:block/fluid_tank_window_single",
"4": "create:block/fluid_tank_window_single",
"particle": "#1"
},
"elements": [
@ -69,8 +69,8 @@
"to": [12, 12, 1],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, -23]},
"faces": {
"north": {"uv": [0, 0, 8, 8], "texture": "#5", "cullface": "north"},
"south": {"uv": [0, 0, 8, 8], "texture": "#5", "cullface": "north"}
"north": {"uv": [0, 0, 8, 8], "texture": "#4", "cullface": "north"},
"south": {"uv": [0, 0, 8, 8], "texture": "#4", "cullface": "north"}
}
},
{
@ -78,8 +78,8 @@
"from": [15, 4, 4],
"to": [15, 12, 12],
"faces": {
"east": {"uv": [0, 0, 8, 8], "texture": "#5", "cullface": "east"},
"west": {"uv": [0, 0, 8, 8], "texture": "#5", "cullface": "east"}
"east": {"uv": [0, 0, 8, 8], "texture": "#4", "cullface": "east"},
"west": {"uv": [0, 0, 8, 8], "texture": "#4", "cullface": "east"}
}
},
{
@ -87,8 +87,8 @@
"from": [4, 4, 15],
"to": [12, 12, 15],
"faces": {
"north": {"uv": [0, 0, 8, 8], "texture": "#5", "cullface": "south"},
"south": {"uv": [0, 0, 8, 8], "texture": "#5", "cullface": "south"}
"north": {"uv": [0, 0, 8, 8], "texture": "#4", "cullface": "south"},
"south": {"uv": [0, 0, 8, 8], "texture": "#4", "cullface": "south"}
}
},
{
@ -96,8 +96,8 @@
"from": [1, 4, 4],
"to": [1, 12, 12],
"faces": {
"east": {"uv": [0, 0, 8, 8], "texture": "#5", "cullface": "west"},
"west": {"uv": [0, 0, 8, 8], "texture": "#5", "cullface": "west"}
"east": {"uv": [0, 0, 8, 8], "texture": "#4", "cullface": "west"},
"west": {"uv": [0, 0, 8, 8], "texture": "#4", "cullface": "west"}
}
},
{

View file

@ -0,0 +1 @@
{}

View file

@ -0,0 +1 @@
{}

Binary file not shown.

After

Width:  |  Height:  |  Size: 514 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 489 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 632 B