Destroyer of Lakes

- Added the hose pulley
- Added creative tanks
- Fixed sails not getting consumed when placed against each other
- Items can now be inserted onto belts regardless of it moving or not
- Fixed item duplication on stopped belts
- Refactored fluid block rendering in JEI
- Reworked model of the schematic table
This commit is contained in:
simibubi 2020-10-30 02:16:08 +01:00
parent c63d0980ed
commit 5abfc15e9e
114 changed files with 3509 additions and 367 deletions

View file

@ -56,6 +56,7 @@ dc76bca1fdd41c8e6ada27fd59a2b73d7adc9596 assets/create/blockstates/copper_shingl
ecf4a72411870bfdbf8a59469b114cd77621c343 assets/create/blockstates/copper_tiles.json ecf4a72411870bfdbf8a59469b114cd77621c343 assets/create/blockstates/copper_tiles.json
890be245b914c1a9f29f48a8c5d325640b5be160 assets/create/blockstates/copper_valve_handle.json 890be245b914c1a9f29f48a8c5d325640b5be160 assets/create/blockstates/copper_valve_handle.json
3df0d5d5170a2f6cbab0f8a9bc8f2d64229589af assets/create/blockstates/creative_crate.json 3df0d5d5170a2f6cbab0f8a9bc8f2d64229589af assets/create/blockstates/creative_crate.json
da3f1203dd0b0096ce19e09705060a0ed0478bee assets/create/blockstates/creative_fluid_tank.json
f0031f5e970b3d5695472ed384950b8631b015ed assets/create/blockstates/creative_motor.json f0031f5e970b3d5695472ed384950b8631b015ed assets/create/blockstates/creative_motor.json
fe2f78b94c20944399101e7369e2d43324297fb6 assets/create/blockstates/crushing_wheel.json fe2f78b94c20944399101e7369e2d43324297fb6 assets/create/blockstates/crushing_wheel.json
a1dd6cb3daa97ea871290ef7b178d28b564ee2a2 assets/create/blockstates/crushing_wheel_controller.json a1dd6cb3daa97ea871290ef7b178d28b564ee2a2 assets/create/blockstates/crushing_wheel_controller.json
@ -174,6 +175,8 @@ f4a0fc68e8daaa0a47cdc951ced4310057a874b0 assets/create/blockstates/green_valve_h
6ab675fa06317e6d07c0c1a453e7bb43e3f46b3b assets/create/blockstates/hand_crank.json 6ab675fa06317e6d07c0c1a453e7bb43e3f46b3b assets/create/blockstates/hand_crank.json
be3bef7e091d8b50bfc1c6b7275946d1f636aefd assets/create/blockstates/horizontal_framed_glass.json be3bef7e091d8b50bfc1c6b7275946d1f636aefd assets/create/blockstates/horizontal_framed_glass.json
18d9fdaa1352a7e2ec91135e46dae5c02ccd8f8f assets/create/blockstates/horizontal_framed_glass_pane.json 18d9fdaa1352a7e2ec91135e46dae5c02ccd8f8f assets/create/blockstates/horizontal_framed_glass_pane.json
30ec347dfc827a9ae52cf3da964b828005acede1 assets/create/blockstates/hose_pulley.json
6651c84ea621777d572a3d7aa13b75d9f061191b assets/create/blockstates/item_drain.json
5d851c90d23de5087ce546d4bbe509e112b84c49 assets/create/blockstates/jungle_window.json 5d851c90d23de5087ce546d4bbe509e112b84c49 assets/create/blockstates/jungle_window.json
b15bea757ef981e0ca60f740ca234ee2014eb7b7 assets/create/blockstates/jungle_window_pane.json b15bea757ef981e0ca60f740ca234ee2014eb7b7 assets/create/blockstates/jungle_window_pane.json
f651091db216b009b3379b2f48d56d03481c8675 assets/create/blockstates/large_cogwheel.json f651091db216b009b3379b2f48d56d03481c8675 assets/create/blockstates/large_cogwheel.json
@ -386,17 +389,17 @@ a3a11524cd3515fc01d905767b4b7ea782adaf03 assets/create/blockstates/yellow_seat.j
6801fa1f466f172700e573e5b8ee8ee5f9ca4583 assets/create/blockstates/yellow_valve_handle.json 6801fa1f466f172700e573e5b8ee8ee5f9ca4583 assets/create/blockstates/yellow_valve_handle.json
7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json 7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json
b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json
ad168f04d430ebd783a845e5928c3273da3f0074 assets/create/lang/en_ud.json 6fe6c50ae75a9c89c90d3423bc74f3e628bc213a assets/create/lang/en_ud.json
25b02b7b025f988b0cda9655b2c586c82dfd369c assets/create/lang/en_us.json b054eb6cf72ac04fbb2512569effa84768adef74 assets/create/lang/en_us.json
cf9075cacdbd171b33fa0b6cb68365e2c3614b40 assets/create/lang/unfinished/de_de.json cf432c7dcf9b91769a570242a59c12ecca79a091 assets/create/lang/unfinished/de_de.json
87ea3d2da2863fa61c5d5b9f535aac8c1703be28 assets/create/lang/unfinished/fr_fr.json 5a2e2499696f45b1f95feeaa702119b8e1b371eb assets/create/lang/unfinished/fr_fr.json
3349f2726256c99abd7e5268faa806b628d91e4d assets/create/lang/unfinished/it_it.json 12ac01a6f21c536aa09599c36139f593cbbf7d1f assets/create/lang/unfinished/it_it.json
3cf205e25543b7860d6b00f2f91dd799333b9d74 assets/create/lang/unfinished/ja_jp.json 3e65e163c658e4f34124807716b009e1907187cc assets/create/lang/unfinished/ja_jp.json
d112e8b804ca16511c4096b328f3635b4c84a3e9 assets/create/lang/unfinished/ko_kr.json 4dfeba1d56d8ad688442d2ca026dfa16147178ef assets/create/lang/unfinished/ko_kr.json
78791855041e56a27fb3520b289ca8a144de98ad assets/create/lang/unfinished/nl_nl.json 3d114a874d1c198ecf0978fd13b98249536cc684 assets/create/lang/unfinished/nl_nl.json
d92ac1ec1ebbad873dd6563509767428603b6ba2 assets/create/lang/unfinished/pt_br.json 3434f2d429bdf64dcbc915c0365e20250b64d819 assets/create/lang/unfinished/pt_br.json
5d4f30e05fea3bec9c6c85a5f7767eb3dd0a7dfe assets/create/lang/unfinished/ru_ru.json 0bfd9476411fc565a3011ffc43eecaca3f0e53ff assets/create/lang/unfinished/ru_ru.json
46996569e164858a5f9dc7f60731707d3517b888 assets/create/lang/unfinished/zh_cn.json d7150e9c65d74f41e2dc65daadf003dc200e512c assets/create/lang/unfinished/zh_cn.json
846200eb548d3bfa2e77b41039de159b4b6cfb45 assets/create/models/block/acacia_window.json 846200eb548d3bfa2e77b41039de159b4b6cfb45 assets/create/models/block/acacia_window.json
1930fa3a3c98d53dd19e4ee7f55bc27fd47aa281 assets/create/models/block/acacia_window_pane_noside.json 1930fa3a3c98d53dd19e4ee7f55bc27fd47aa281 assets/create/models/block/acacia_window_pane_noside.json
1763ea2c9b981d187f5031ba608f3d5d3be3986a assets/create/models/block/acacia_window_pane_noside_alt.json 1763ea2c9b981d187f5031ba608f3d5d3be3986a assets/create/models/block/acacia_window_pane_noside_alt.json
@ -503,6 +506,30 @@ a09f639bde4c61d68592eb06c807e7a6791ff950 assets/create/models/block/crate/brass/
7635211e4d833748acaea37ea48b1f749c32ea5f assets/create/models/block/crate/creative/right.json 7635211e4d833748acaea37ea48b1f749c32ea5f assets/create/models/block/crate/creative/right.json
a123e3c8a9e2ea1665f268cf3991aa7e4b3119c6 assets/create/models/block/crate/creative/single.json a123e3c8a9e2ea1665f268cf3991aa7e4b3119c6 assets/create/models/block/crate/creative/single.json
29ab5cfe7aed1271ede125e91bf78c1372b5f96e assets/create/models/block/crate/creative/top.json 29ab5cfe7aed1271ede125e91bf78c1372b5f96e assets/create/models/block/crate/creative/top.json
e04c4987746379ec24c63929abf0df4e41e13e6a assets/create/models/block/creative_bottom.json
5b1f6d98adf1e92f678a59b7eef720deeeda2795 assets/create/models/block/creative_bottom_window.json
6dd1cf78624d5ce69259fc723e9700bd842c94c8 assets/create/models/block/creative_bottom_window_ne.json
c0dfda633c3158633814e9a6cd4f4dba793ad4c8 assets/create/models/block/creative_bottom_window_nw.json
e30b13d2ae9a437664792c16be537cea73552cf8 assets/create/models/block/creative_bottom_window_se.json
8d68f53dfa4d17f8193cd8df693e340ac7a1b92e assets/create/models/block/creative_bottom_window_sw.json
77a84b8ca790ddef80e792beb79c2ae0db78005b assets/create/models/block/creative_middle.json
179f6208a04832141d83f9a6bef96334cf4fe4aa assets/create/models/block/creative_middle_window.json
cadd6df93f6ba708a3c92a958e88531cbc1d6ebf assets/create/models/block/creative_middle_window_ne.json
75b37b07555312798a519bea3325d4af6a57eb86 assets/create/models/block/creative_middle_window_nw.json
d9d6b61ba21270c83361b3ee2391161125dfc6f0 assets/create/models/block/creative_middle_window_se.json
73696b00c063cdf6c5a492eac7e5e06062abad88 assets/create/models/block/creative_middle_window_sw.json
3af304cfaa0cdba11c120e85cea88d96c986eebc assets/create/models/block/creative_single.json
feed58a4ad7d7a9e855f0cd7b3fc720616120b4b assets/create/models/block/creative_single_window.json
4f8753ba3a04853fb006be37e15d760cc154d937 assets/create/models/block/creative_single_window_ne.json
39ee24e3b1e06d38bfa4ef36aa4f89577c7f6eab assets/create/models/block/creative_single_window_nw.json
81250161ba79b846614859fe8c991c9e18bf77ba assets/create/models/block/creative_single_window_se.json
0fdca0706c76794586199287f1e29c8e87ef6385 assets/create/models/block/creative_single_window_sw.json
873b263b688f191a927a63b2d873a797eab801e1 assets/create/models/block/creative_top.json
723c5db04011eeb1f2e0483f3466bf05432c5f4c assets/create/models/block/creative_top_window.json
0994ef30adac0d9faa19d06fd933eb16b11d1ef3 assets/create/models/block/creative_top_window_ne.json
59c43cc18525792ca96026c966076f52cf7ebef7 assets/create/models/block/creative_top_window_nw.json
a6eea01609266b757342984889af16234ecd5189 assets/create/models/block/creative_top_window_se.json
6e1d2fb66291f2a3e3a213f43b47fb9760cb959f assets/create/models/block/creative_top_window_sw.json
68843a02a32c156afad85830877b83f9b51c5147 assets/create/models/block/cyan_sail.json 68843a02a32c156afad85830877b83f9b51c5147 assets/create/models/block/cyan_sail.json
6704782830b3d872321e895b6903709c18e3778f assets/create/models/block/cyan_seat.json 6704782830b3d872321e895b6903709c18e3778f assets/create/models/block/cyan_seat.json
f45ef4a5f0aa8482d493661673b1c0ab6d061157 assets/create/models/block/cyan_valve_handle.json f45ef4a5f0aa8482d493661673b1c0ab6d061157 assets/create/models/block/cyan_valve_handle.json
@ -1124,6 +1151,7 @@ f56bf22324faf8958eaef4d94b958f1108d52e5a assets/create/models/item/copper_tiles.
5583368909c319acfcf0f7a419bedf23272fe613 assets/create/models/item/copper_valve_handle.json 5583368909c319acfcf0f7a419bedf23272fe613 assets/create/models/item/copper_valve_handle.json
4e9126b349d55c65aa5407f05700579e52101c1f assets/create/models/item/crafter_slot_cover.json 4e9126b349d55c65aa5407f05700579e52101c1f assets/create/models/item/crafter_slot_cover.json
7b333dea353afaa27b182aedc647c9e9e34e92ef assets/create/models/item/creative_crate.json 7b333dea353afaa27b182aedc647c9e9e34e92ef assets/create/models/item/creative_crate.json
f7d06c52c3ca8c22ad67f5741471f06ac22e7fcb assets/create/models/item/creative_fluid_tank.json
5b39403f6c81f05e566b621b62e267267de47c41 assets/create/models/item/creative_motor.json 5b39403f6c81f05e566b621b62e267267de47c41 assets/create/models/item/creative_motor.json
19c8492ced64a872a040005dd212a9a14e20477c assets/create/models/item/crushed_brass.json 19c8492ced64a872a040005dd212a9a14e20477c assets/create/models/item/crushed_brass.json
8167f2a6d05d65a4ebd809b9c114027862afb38e assets/create/models/item/crushed_copper_ore.json 8167f2a6d05d65a4ebd809b9c114027862afb38e assets/create/models/item/crushed_copper_ore.json
@ -1250,8 +1278,10 @@ cfab82a2cf7495d21778c1de9730a26afbdd523d assets/create/models/item/handheld_bloc
dee43bf1a9c211a752fac2c07aeba123f7f0c914 assets/create/models/item/handheld_worldshaper.json dee43bf1a9c211a752fac2c07aeba123f7f0c914 assets/create/models/item/handheld_worldshaper.json
e7ec65ad5be13cae5f7d60836b8df9e4a5baad56 assets/create/models/item/horizontal_framed_glass.json e7ec65ad5be13cae5f7d60836b8df9e4a5baad56 assets/create/models/item/horizontal_framed_glass.json
f0e3b2b8a553b6e61746c922c27302dabfff71b6 assets/create/models/item/horizontal_framed_glass_pane.json f0e3b2b8a553b6e61746c922c27302dabfff71b6 assets/create/models/item/horizontal_framed_glass_pane.json
ff92f6a9dfb73a6ee1eaaed3279c89390ff04a80 assets/create/models/item/hose_pulley.json
771d439eac70b52f593fa7381f2c48729fbdaec7 assets/create/models/item/integrated_circuit.json 771d439eac70b52f593fa7381f2c48729fbdaec7 assets/create/models/item/integrated_circuit.json
d254f47bc185f2a2f01608a875aa63ed2c4ceb0f assets/create/models/item/iron_sheet.json d254f47bc185f2a2f01608a875aa63ed2c4ceb0f assets/create/models/item/iron_sheet.json
52e435014cb03e93411666c4799ebff206e55fc9 assets/create/models/item/item_drain.json
83fa8699318e51f838b483b40b3e897c34ed53d1 assets/create/models/item/jungle_window.json 83fa8699318e51f838b483b40b3e897c34ed53d1 assets/create/models/item/jungle_window.json
34dc05da3edef554dad1cfde834773aecd861293 assets/create/models/item/jungle_window_pane.json 34dc05da3edef554dad1cfde834773aecd861293 assets/create/models/item/jungle_window_pane.json
0c9b16c3f5f0a5f77110b3fc2467bde8c1b288b7 assets/create/models/item/lapis_sheet.json 0c9b16c3f5f0a5f77110b3fc2467bde8c1b288b7 assets/create/models/item/lapis_sheet.json
@ -1566,6 +1596,7 @@ c023b9221d7983487d21e5ecc7d92246cfc7e791 data/create/advancements/recipes/create
2ba23f019a110a3e035a49e56ee8156fc11d74c0 data/create/advancements/recipes/create.base/crafting/kinetics/green_seat_from_other_seat.json 2ba23f019a110a3e035a49e56ee8156fc11d74c0 data/create/advancements/recipes/create.base/crafting/kinetics/green_seat_from_other_seat.json
9af3d92d11c3f520df3e22f3069042bf34585010 data/create/advancements/recipes/create.base/crafting/kinetics/green_valve_handle_from_other_valve_handle.json 9af3d92d11c3f520df3e22f3069042bf34585010 data/create/advancements/recipes/create.base/crafting/kinetics/green_valve_handle_from_other_valve_handle.json
dbb96a4db4ef8172af73a626bed9727278d804bd data/create/advancements/recipes/create.base/crafting/kinetics/hand_crank.json dbb96a4db4ef8172af73a626bed9727278d804bd data/create/advancements/recipes/create.base/crafting/kinetics/hand_crank.json
21cd686e1f3a4004d8e9bd3d92675bd61fb2b4db data/create/advancements/recipes/create.base/crafting/kinetics/hose_pulley.json
a71b626b6ee58a4eabee56f67c48f041a1323506 data/create/advancements/recipes/create.base/crafting/kinetics/large_cogwheel.json a71b626b6ee58a4eabee56f67c48f041a1323506 data/create/advancements/recipes/create.base/crafting/kinetics/large_cogwheel.json
eb007bb079bbe6b6aaad2ca90f5af84261e3f8ea data/create/advancements/recipes/create.base/crafting/kinetics/light_blue_seat.json eb007bb079bbe6b6aaad2ca90f5af84261e3f8ea data/create/advancements/recipes/create.base/crafting/kinetics/light_blue_seat.json
571da50fbf5f2fcd3363b3dab91e7233e0ebffa0 data/create/advancements/recipes/create.base/crafting/kinetics/light_blue_seat_from_other_seat.json 571da50fbf5f2fcd3363b3dab91e7233e0ebffa0 data/create/advancements/recipes/create.base/crafting/kinetics/light_blue_seat_from_other_seat.json
@ -2147,6 +2178,7 @@ a5a7ba88a1d38da83b37bbe842dc7cc0544f37be data/create/loot_tables/blocks/copper_s
c013613df278f6e8b4c9dad5f16e0ec6c3e992e3 data/create/loot_tables/blocks/copper_tiles.json c013613df278f6e8b4c9dad5f16e0ec6c3e992e3 data/create/loot_tables/blocks/copper_tiles.json
5c15f22db359a2af8efa18561e080cdf361a0100 data/create/loot_tables/blocks/copper_valve_handle.json 5c15f22db359a2af8efa18561e080cdf361a0100 data/create/loot_tables/blocks/copper_valve_handle.json
b160899aa785dc54d8c6cc095337f70b81f3e44f data/create/loot_tables/blocks/creative_crate.json b160899aa785dc54d8c6cc095337f70b81f3e44f data/create/loot_tables/blocks/creative_crate.json
51d66e32581b87beb871d99b93cb45d45eada8dd data/create/loot_tables/blocks/creative_fluid_tank.json
d8f2f8921b9200b1d9476a77ee1be32c25308ac3 data/create/loot_tables/blocks/creative_motor.json d8f2f8921b9200b1d9476a77ee1be32c25308ac3 data/create/loot_tables/blocks/creative_motor.json
c28fa42746a4d5ca2f824001b67e58673810169e data/create/loot_tables/blocks/crushing_wheel.json c28fa42746a4d5ca2f824001b67e58673810169e data/create/loot_tables/blocks/crushing_wheel.json
205f5899101262f31f5c1a88bb7d954918d08d04 data/create/loot_tables/blocks/crushing_wheel_controller.json 205f5899101262f31f5c1a88bb7d954918d08d04 data/create/loot_tables/blocks/crushing_wheel_controller.json
@ -2265,6 +2297,8 @@ a71599eecd3f1179e3d0367623460e798828aa6d data/create/loot_tables/blocks/green_se
9bdc47ea3ffc52f037f12f40f387e6b72a352c4e data/create/loot_tables/blocks/hand_crank.json 9bdc47ea3ffc52f037f12f40f387e6b72a352c4e data/create/loot_tables/blocks/hand_crank.json
22012e7759f1dbccbb06bcaf0311a54190270825 data/create/loot_tables/blocks/horizontal_framed_glass.json 22012e7759f1dbccbb06bcaf0311a54190270825 data/create/loot_tables/blocks/horizontal_framed_glass.json
5d3f585539942f13bbc458a0a002849c1f034fc1 data/create/loot_tables/blocks/horizontal_framed_glass_pane.json 5d3f585539942f13bbc458a0a002849c1f034fc1 data/create/loot_tables/blocks/horizontal_framed_glass_pane.json
1b28cc5e1e535aa0c62d4a75ad76fcb40bf6232c data/create/loot_tables/blocks/hose_pulley.json
ef3890c4fa262959cf31a0063fd21919da86eda1 data/create/loot_tables/blocks/item_drain.json
cf2bfae903e7f8510962e672b6266c0e74176aae data/create/loot_tables/blocks/jungle_window.json cf2bfae903e7f8510962e672b6266c0e74176aae data/create/loot_tables/blocks/jungle_window.json
1a3a19517f95fc632286d3cc693bfee4a59dfa0a data/create/loot_tables/blocks/jungle_window_pane.json 1a3a19517f95fc632286d3cc693bfee4a59dfa0a data/create/loot_tables/blocks/jungle_window_pane.json
4d948f80fb7a8b6b99897544681f43fe3d2058f0 data/create/loot_tables/blocks/large_cogwheel.json 4d948f80fb7a8b6b99897544681f43fe3d2058f0 data/create/loot_tables/blocks/large_cogwheel.json
@ -2567,6 +2601,7 @@ b7fa20d10c0e0e7270b1c0d6f3881b8e25b39bea data/create/recipes/crafting/kinetics/g
6f65a84e00f25d956a6ae834678ff781569b243a data/create/recipes/crafting/kinetics/green_seat_from_other_seat.json 6f65a84e00f25d956a6ae834678ff781569b243a data/create/recipes/crafting/kinetics/green_seat_from_other_seat.json
63edaccace961a65aa7bd406d36894c7ca4816b8 data/create/recipes/crafting/kinetics/green_valve_handle_from_other_valve_handle.json 63edaccace961a65aa7bd406d36894c7ca4816b8 data/create/recipes/crafting/kinetics/green_valve_handle_from_other_valve_handle.json
9f08bdaeec88e04a43c2dc103869f9648deee079 data/create/recipes/crafting/kinetics/hand_crank.json 9f08bdaeec88e04a43c2dc103869f9648deee079 data/create/recipes/crafting/kinetics/hand_crank.json
d10639b0c3999481531fe0a9383a1bb4af60225e data/create/recipes/crafting/kinetics/hose_pulley.json
237541c1c318b8426734c1c43be31fbd01413d39 data/create/recipes/crafting/kinetics/large_cogwheel.json 237541c1c318b8426734c1c43be31fbd01413d39 data/create/recipes/crafting/kinetics/large_cogwheel.json
a33e3301fc6d3a446e61a1c4b8a93aff079baeba data/create/recipes/crafting/kinetics/light_blue_seat.json a33e3301fc6d3a446e61a1c4b8a93aff079baeba data/create/recipes/crafting/kinetics/light_blue_seat.json
958bb5d3aeb8d8e5dbf5d97cf5fd9ff5151575dc data/create/recipes/crafting/kinetics/light_blue_seat_from_other_seat.json 958bb5d3aeb8d8e5dbf5d97cf5fd9ff5151575dc data/create/recipes/crafting/kinetics/light_blue_seat_from_other_seat.json

View file

@ -0,0 +1,76 @@
{
"variants": {
"bottom=false,shape=plain,top=false": {
"model": "create:block/creative_middle"
},
"bottom=true,shape=plain,top=false": {
"model": "create:block/creative_bottom"
},
"bottom=false,shape=window,top=false": {
"model": "create:block/creative_middle_window"
},
"bottom=true,shape=window,top=false": {
"model": "create:block/creative_bottom_window"
},
"bottom=false,shape=window_nw,top=false": {
"model": "create:block/creative_middle_window_nw"
},
"bottom=true,shape=window_nw,top=false": {
"model": "create:block/creative_bottom_window_nw"
},
"bottom=false,shape=window_sw,top=false": {
"model": "create:block/creative_middle_window_sw"
},
"bottom=true,shape=window_sw,top=false": {
"model": "create:block/creative_bottom_window_sw"
},
"bottom=false,shape=window_ne,top=false": {
"model": "create:block/creative_middle_window_ne"
},
"bottom=true,shape=window_ne,top=false": {
"model": "create:block/creative_bottom_window_ne"
},
"bottom=false,shape=window_se,top=false": {
"model": "create:block/creative_middle_window_se"
},
"bottom=true,shape=window_se,top=false": {
"model": "create:block/creative_bottom_window_se"
},
"bottom=false,shape=plain,top=true": {
"model": "create:block/creative_top"
},
"bottom=true,shape=plain,top=true": {
"model": "create:block/creative_single"
},
"bottom=false,shape=window,top=true": {
"model": "create:block/creative_top_window"
},
"bottom=true,shape=window,top=true": {
"model": "create:block/creative_single_window"
},
"bottom=false,shape=window_nw,top=true": {
"model": "create:block/creative_top_window_nw"
},
"bottom=true,shape=window_nw,top=true": {
"model": "create:block/creative_single_window_nw"
},
"bottom=false,shape=window_sw,top=true": {
"model": "create:block/creative_top_window_sw"
},
"bottom=true,shape=window_sw,top=true": {
"model": "create:block/creative_single_window_sw"
},
"bottom=false,shape=window_ne,top=true": {
"model": "create:block/creative_top_window_ne"
},
"bottom=true,shape=window_ne,top=true": {
"model": "create:block/creative_single_window_ne"
},
"bottom=false,shape=window_se,top=true": {
"model": "create:block/creative_top_window_se"
},
"bottom=true,shape=window_se,top=true": {
"model": "create:block/creative_single_window_se"
}
}
}

View file

@ -0,0 +1,19 @@
{
"variants": {
"facing=north": {
"model": "create:block/hose_pulley/block"
},
"facing=south": {
"model": "create:block/hose_pulley/block",
"y": 180
},
"facing=west": {
"model": "create:block/hose_pulley/block",
"y": 270
},
"facing=east": {
"model": "create:block/hose_pulley/block",
"y": 90
}
}
}

View file

@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "create:block/item_drain"
}
}
}

View file

@ -57,6 +57,7 @@
"block.create.copper_tiles": "s\u01DD\u05DF\u0131\u27D8 \u0279\u01DDddo\u0186", "block.create.copper_tiles": "s\u01DD\u05DF\u0131\u27D8 \u0279\u01DDddo\u0186",
"block.create.copper_valve_handle": "\u01DD\u05DFpu\u0250H \u01DD\u028C\u05DF\u0250\u039B \u0279\u01DDddo\u0186", "block.create.copper_valve_handle": "\u01DD\u05DFpu\u0250H \u01DD\u028C\u05DF\u0250\u039B \u0279\u01DDddo\u0186",
"block.create.creative_crate": "\u01DD\u0287\u0250\u0279\u0186 \u01DD\u028C\u0131\u0287\u0250\u01DD\u0279\u0186", "block.create.creative_crate": "\u01DD\u0287\u0250\u0279\u0186 \u01DD\u028C\u0131\u0287\u0250\u01DD\u0279\u0186",
"block.create.creative_fluid_tank": "\u029Eu\u0250\u27D8 p\u0131n\u05DF\u2132 \u01DD\u028C\u0131\u0287\u0250\u01DD\u0279\u0186",
"block.create.creative_motor": "\u0279o\u0287oW \u01DD\u028C\u0131\u0287\u0250\u01DD\u0279\u0186", "block.create.creative_motor": "\u0279o\u0287oW \u01DD\u028C\u0131\u0287\u0250\u01DD\u0279\u0186",
"block.create.crushing_wheel": "\u05DF\u01DD\u01DD\u0265M bu\u0131\u0265sn\u0279\u0186", "block.create.crushing_wheel": "\u05DF\u01DD\u01DD\u0265M bu\u0131\u0265sn\u0279\u0186",
"block.create.crushing_wheel_controller": "\u0279\u01DD\u05DF\u05DFo\u0279\u0287uo\u0186 \u05DF\u01DD\u01DD\u0265M bu\u0131\u0265sn\u0279\u0186", "block.create.crushing_wheel_controller": "\u0279\u01DD\u05DF\u05DFo\u0279\u0287uo\u0186 \u05DF\u01DD\u01DD\u0265M bu\u0131\u0265sn\u0279\u0186",
@ -175,6 +176,8 @@
"block.create.hand_crank": "\u029Eu\u0250\u0279\u0186 pu\u0250H", "block.create.hand_crank": "\u029Eu\u0250\u0279\u0186 pu\u0250H",
"block.create.horizontal_framed_glass": "ss\u0250\u05DF\u2141 p\u01DD\u026F\u0250\u0279\u2132 \u05DF\u0250\u0287uoz\u0131\u0279oH", "block.create.horizontal_framed_glass": "ss\u0250\u05DF\u2141 p\u01DD\u026F\u0250\u0279\u2132 \u05DF\u0250\u0287uoz\u0131\u0279oH",
"block.create.horizontal_framed_glass_pane": "\u01DDu\u0250\u0500 ss\u0250\u05DF\u2141 p\u01DD\u026F\u0250\u0279\u2132 \u05DF\u0250\u0287uoz\u0131\u0279oH", "block.create.horizontal_framed_glass_pane": "\u01DDu\u0250\u0500 ss\u0250\u05DF\u2141 p\u01DD\u026F\u0250\u0279\u2132 \u05DF\u0250\u0287uoz\u0131\u0279oH",
"block.create.hose_pulley": "\u028E\u01DD\u05DF\u05DFn\u0500 \u01DDsoH",
"block.create.item_drain": "u\u0131\u0250\u0279\u15E1 \u026F\u01DD\u0287I",
"block.create.jungle_window": "\u028Dopu\u0131M \u01DD\u05DFbun\u017F", "block.create.jungle_window": "\u028Dopu\u0131M \u01DD\u05DFbun\u017F",
"block.create.jungle_window_pane": "\u01DDu\u0250\u0500 \u028Dopu\u0131M \u01DD\u05DFbun\u017F", "block.create.jungle_window_pane": "\u01DDu\u0250\u0500 \u028Dopu\u0131M \u01DD\u05DFbun\u017F",
"block.create.large_cogwheel": "\u05DF\u01DD\u01DD\u0265\u028Dbo\u0186 \u01DDb\u0279\u0250\uA780", "block.create.large_cogwheel": "\u05DF\u01DD\u01DD\u0265\u028Dbo\u0186 \u01DDb\u0279\u0250\uA780",

View file

@ -60,6 +60,7 @@
"block.create.copper_tiles": "Copper Tiles", "block.create.copper_tiles": "Copper Tiles",
"block.create.copper_valve_handle": "Copper Valve Handle", "block.create.copper_valve_handle": "Copper Valve Handle",
"block.create.creative_crate": "Creative Crate", "block.create.creative_crate": "Creative Crate",
"block.create.creative_fluid_tank": "Creative Fluid Tank",
"block.create.creative_motor": "Creative Motor", "block.create.creative_motor": "Creative Motor",
"block.create.crushing_wheel": "Crushing Wheel", "block.create.crushing_wheel": "Crushing Wheel",
"block.create.crushing_wheel_controller": "Crushing Wheel Controller", "block.create.crushing_wheel_controller": "Crushing Wheel Controller",
@ -178,6 +179,8 @@
"block.create.hand_crank": "Hand Crank", "block.create.hand_crank": "Hand Crank",
"block.create.horizontal_framed_glass": "Horizontal Framed Glass", "block.create.horizontal_framed_glass": "Horizontal Framed Glass",
"block.create.horizontal_framed_glass_pane": "Horizontal Framed Glass Pane", "block.create.horizontal_framed_glass_pane": "Horizontal Framed Glass Pane",
"block.create.hose_pulley": "Hose Pulley",
"block.create.item_drain": "Item Drain",
"block.create.jungle_window": "Jungle Window", "block.create.jungle_window": "Jungle Window",
"block.create.jungle_window_pane": "Jungle Window Pane", "block.create.jungle_window_pane": "Jungle Window Pane",
"block.create.large_cogwheel": "Large Cogwheel", "block.create.large_cogwheel": "Large Cogwheel",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 1021", "_": "Missing Localizations: 1024",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -61,6 +61,7 @@
"block.create.copper_tiles": "UNLOCALIZED: Copper Tiles", "block.create.copper_tiles": "UNLOCALIZED: Copper Tiles",
"block.create.copper_valve_handle": "UNLOCALIZED: Copper Valve Handle", "block.create.copper_valve_handle": "UNLOCALIZED: Copper Valve Handle",
"block.create.creative_crate": "Bauplankanonenmacher", "block.create.creative_crate": "Bauplankanonenmacher",
"block.create.creative_fluid_tank": "UNLOCALIZED: Creative Fluid Tank",
"block.create.creative_motor": "UNLOCALIZED: Creative Motor", "block.create.creative_motor": "UNLOCALIZED: Creative Motor",
"block.create.crushing_wheel": "Mahlwerkrad", "block.create.crushing_wheel": "Mahlwerkrad",
"block.create.crushing_wheel_controller": "UNLOCALIZED: Crushing Wheel Controller", "block.create.crushing_wheel_controller": "UNLOCALIZED: Crushing Wheel Controller",
@ -179,6 +180,8 @@
"block.create.hand_crank": "UNLOCALIZED: Hand Crank", "block.create.hand_crank": "UNLOCALIZED: Hand Crank",
"block.create.horizontal_framed_glass": "UNLOCALIZED: Horizontal Framed Glass", "block.create.horizontal_framed_glass": "UNLOCALIZED: Horizontal Framed Glass",
"block.create.horizontal_framed_glass_pane": "UNLOCALIZED: Horizontal Framed Glass Pane", "block.create.horizontal_framed_glass_pane": "UNLOCALIZED: Horizontal Framed Glass Pane",
"block.create.hose_pulley": "UNLOCALIZED: Hose Pulley",
"block.create.item_drain": "UNLOCALIZED: Item Drain",
"block.create.jungle_window": "UNLOCALIZED: Jungle Window", "block.create.jungle_window": "UNLOCALIZED: Jungle Window",
"block.create.jungle_window_pane": "UNLOCALIZED: Jungle Window Pane", "block.create.jungle_window_pane": "UNLOCALIZED: Jungle Window Pane",
"block.create.large_cogwheel": "Großes Zahnrad", "block.create.large_cogwheel": "Großes Zahnrad",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 650", "_": "Missing Localizations: 653",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -61,6 +61,7 @@
"block.create.copper_tiles": "UNLOCALIZED: Copper Tiles", "block.create.copper_tiles": "UNLOCALIZED: Copper Tiles",
"block.create.copper_valve_handle": "UNLOCALIZED: Copper Valve Handle", "block.create.copper_valve_handle": "UNLOCALIZED: Copper Valve Handle",
"block.create.creative_crate": "Créateur de schémacanon", "block.create.creative_crate": "Créateur de schémacanon",
"block.create.creative_fluid_tank": "UNLOCALIZED: Creative Fluid Tank",
"block.create.creative_motor": "Moteur", "block.create.creative_motor": "Moteur",
"block.create.crushing_wheel": "Roue de concassage", "block.create.crushing_wheel": "Roue de concassage",
"block.create.crushing_wheel_controller": "UNLOCALIZED: Crushing Wheel Controller", "block.create.crushing_wheel_controller": "UNLOCALIZED: Crushing Wheel Controller",
@ -179,6 +180,8 @@
"block.create.hand_crank": "Manivelle", "block.create.hand_crank": "Manivelle",
"block.create.horizontal_framed_glass": "Fenêtre en verre horizontale", "block.create.horizontal_framed_glass": "Fenêtre en verre horizontale",
"block.create.horizontal_framed_glass_pane": "Vitre encadrée horizontale", "block.create.horizontal_framed_glass_pane": "Vitre encadrée horizontale",
"block.create.hose_pulley": "UNLOCALIZED: Hose Pulley",
"block.create.item_drain": "UNLOCALIZED: Item Drain",
"block.create.jungle_window": "UNLOCALIZED: Jungle Window", "block.create.jungle_window": "UNLOCALIZED: Jungle Window",
"block.create.jungle_window_pane": "UNLOCALIZED: Jungle Window Pane", "block.create.jungle_window_pane": "UNLOCALIZED: Jungle Window Pane",
"block.create.large_cogwheel": "Grande roue dentée", "block.create.large_cogwheel": "Grande roue dentée",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 634", "_": "Missing Localizations: 637",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -61,6 +61,7 @@
"block.create.copper_tiles": "UNLOCALIZED: Copper Tiles", "block.create.copper_tiles": "UNLOCALIZED: Copper Tiles",
"block.create.copper_valve_handle": "UNLOCALIZED: Copper Valve Handle", "block.create.copper_valve_handle": "UNLOCALIZED: Copper Valve Handle",
"block.create.creative_crate": "Creatore Cannoneschematico", "block.create.creative_crate": "Creatore Cannoneschematico",
"block.create.creative_fluid_tank": "UNLOCALIZED: Creative Fluid Tank",
"block.create.creative_motor": "Motore", "block.create.creative_motor": "Motore",
"block.create.crushing_wheel": "Ruota di Frantumazione", "block.create.crushing_wheel": "Ruota di Frantumazione",
"block.create.crushing_wheel_controller": "UNLOCALIZED: Crushing Wheel Controller", "block.create.crushing_wheel_controller": "UNLOCALIZED: Crushing Wheel Controller",
@ -179,6 +180,8 @@
"block.create.hand_crank": "Manovella", "block.create.hand_crank": "Manovella",
"block.create.horizontal_framed_glass": "Finestra Orizzontale Vetro", "block.create.horizontal_framed_glass": "Finestra Orizzontale Vetro",
"block.create.horizontal_framed_glass_pane": "Pannello di Finestra Orizzontale Vetro", "block.create.horizontal_framed_glass_pane": "Pannello di Finestra Orizzontale Vetro",
"block.create.hose_pulley": "UNLOCALIZED: Hose Pulley",
"block.create.item_drain": "UNLOCALIZED: Item Drain",
"block.create.jungle_window": "UNLOCALIZED: Jungle Window", "block.create.jungle_window": "UNLOCALIZED: Jungle Window",
"block.create.jungle_window_pane": "UNLOCALIZED: Jungle Window Pane", "block.create.jungle_window_pane": "UNLOCALIZED: Jungle Window Pane",
"block.create.large_cogwheel": "Ruota Dentata Grande", "block.create.large_cogwheel": "Ruota Dentata Grande",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 633", "_": "Missing Localizations: 636",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -61,6 +61,7 @@
"block.create.copper_tiles": "UNLOCALIZED: Copper Tiles", "block.create.copper_tiles": "UNLOCALIZED: Copper Tiles",
"block.create.copper_valve_handle": "UNLOCALIZED: Copper Valve Handle", "block.create.copper_valve_handle": "UNLOCALIZED: Copper Valve Handle",
"block.create.creative_crate": "概略図砲クリエティフィアー", "block.create.creative_crate": "概略図砲クリエティフィアー",
"block.create.creative_fluid_tank": "UNLOCALIZED: Creative Fluid Tank",
"block.create.creative_motor": "モーター", "block.create.creative_motor": "モーター",
"block.create.crushing_wheel": "破砕ホイール", "block.create.crushing_wheel": "破砕ホイール",
"block.create.crushing_wheel_controller": "UNLOCALIZED: Crushing Wheel Controller", "block.create.crushing_wheel_controller": "UNLOCALIZED: Crushing Wheel Controller",
@ -179,6 +180,8 @@
"block.create.hand_crank": "ハンドクランク", "block.create.hand_crank": "ハンドクランク",
"block.create.horizontal_framed_glass": "横型ガラス窓", "block.create.horizontal_framed_glass": "横型ガラス窓",
"block.create.horizontal_framed_glass_pane": "横型ガラス窓板", "block.create.horizontal_framed_glass_pane": "横型ガラス窓板",
"block.create.hose_pulley": "UNLOCALIZED: Hose Pulley",
"block.create.item_drain": "UNLOCALIZED: Item Drain",
"block.create.jungle_window": "UNLOCALIZED: Jungle Window", "block.create.jungle_window": "UNLOCALIZED: Jungle Window",
"block.create.jungle_window_pane": "UNLOCALIZED: Jungle Window Pane", "block.create.jungle_window_pane": "UNLOCALIZED: Jungle Window Pane",
"block.create.large_cogwheel": "大きな歯車", "block.create.large_cogwheel": "大きな歯車",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 634", "_": "Missing Localizations: 637",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -61,6 +61,7 @@
"block.create.copper_tiles": "UNLOCALIZED: Copper Tiles", "block.create.copper_tiles": "UNLOCALIZED: Copper Tiles",
"block.create.copper_valve_handle": "UNLOCALIZED: Copper Valve Handle", "block.create.copper_valve_handle": "UNLOCALIZED: Copper Valve Handle",
"block.create.creative_crate": "청사진 대포 지원기", "block.create.creative_crate": "청사진 대포 지원기",
"block.create.creative_fluid_tank": "UNLOCALIZED: Creative Fluid Tank",
"block.create.creative_motor": "모터", "block.create.creative_motor": "모터",
"block.create.crushing_wheel": "분쇄 휠", "block.create.crushing_wheel": "분쇄 휠",
"block.create.crushing_wheel_controller": "UNLOCALIZED: Crushing Wheel Controller", "block.create.crushing_wheel_controller": "UNLOCALIZED: Crushing Wheel Controller",
@ -179,6 +180,8 @@
"block.create.hand_crank": "핸드 크랭크", "block.create.hand_crank": "핸드 크랭크",
"block.create.horizontal_framed_glass": "수평 유리", "block.create.horizontal_framed_glass": "수평 유리",
"block.create.horizontal_framed_glass_pane": "수평 유리판", "block.create.horizontal_framed_glass_pane": "수평 유리판",
"block.create.hose_pulley": "UNLOCALIZED: Hose Pulley",
"block.create.item_drain": "UNLOCALIZED: Item Drain",
"block.create.jungle_window": "UNLOCALIZED: Jungle Window", "block.create.jungle_window": "UNLOCALIZED: Jungle Window",
"block.create.jungle_window_pane": "UNLOCALIZED: Jungle Window Pane", "block.create.jungle_window_pane": "UNLOCALIZED: Jungle Window Pane",
"block.create.large_cogwheel": "큰 톱니바퀴", "block.create.large_cogwheel": "큰 톱니바퀴",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 962", "_": "Missing Localizations: 965",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -61,6 +61,7 @@
"block.create.copper_tiles": "UNLOCALIZED: Copper Tiles", "block.create.copper_tiles": "UNLOCALIZED: Copper Tiles",
"block.create.copper_valve_handle": "UNLOCALIZED: Copper Valve Handle", "block.create.copper_valve_handle": "UNLOCALIZED: Copper Valve Handle",
"block.create.creative_crate": "Bouwtekeningkannon Creatiefeerder", "block.create.creative_crate": "Bouwtekeningkannon Creatiefeerder",
"block.create.creative_fluid_tank": "UNLOCALIZED: Creative Fluid Tank",
"block.create.creative_motor": "UNLOCALIZED: Creative Motor", "block.create.creative_motor": "UNLOCALIZED: Creative Motor",
"block.create.crushing_wheel": "Verpulveraar", "block.create.crushing_wheel": "Verpulveraar",
"block.create.crushing_wheel_controller": "UNLOCALIZED: Crushing Wheel Controller", "block.create.crushing_wheel_controller": "UNLOCALIZED: Crushing Wheel Controller",
@ -179,6 +180,8 @@
"block.create.hand_crank": "UNLOCALIZED: Hand Crank", "block.create.hand_crank": "UNLOCALIZED: Hand Crank",
"block.create.horizontal_framed_glass": "UNLOCALIZED: Horizontal Framed Glass", "block.create.horizontal_framed_glass": "UNLOCALIZED: Horizontal Framed Glass",
"block.create.horizontal_framed_glass_pane": "UNLOCALIZED: Horizontal Framed Glass Pane", "block.create.horizontal_framed_glass_pane": "UNLOCALIZED: Horizontal Framed Glass Pane",
"block.create.hose_pulley": "UNLOCALIZED: Hose Pulley",
"block.create.item_drain": "UNLOCALIZED: Item Drain",
"block.create.jungle_window": "UNLOCALIZED: Jungle Window", "block.create.jungle_window": "UNLOCALIZED: Jungle Window",
"block.create.jungle_window_pane": "UNLOCALIZED: Jungle Window Pane", "block.create.jungle_window_pane": "UNLOCALIZED: Jungle Window Pane",
"block.create.large_cogwheel": "Groot Tandwiel", "block.create.large_cogwheel": "Groot Tandwiel",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 1028", "_": "Missing Localizations: 1031",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -61,6 +61,7 @@
"block.create.copper_tiles": "UNLOCALIZED: Copper Tiles", "block.create.copper_tiles": "UNLOCALIZED: Copper Tiles",
"block.create.copper_valve_handle": "UNLOCALIZED: Copper Valve Handle", "block.create.copper_valve_handle": "UNLOCALIZED: Copper Valve Handle",
"block.create.creative_crate": "Criativador Esquemaannon", "block.create.creative_crate": "Criativador Esquemaannon",
"block.create.creative_fluid_tank": "UNLOCALIZED: Creative Fluid Tank",
"block.create.creative_motor": "UNLOCALIZED: Creative Motor", "block.create.creative_motor": "UNLOCALIZED: Creative Motor",
"block.create.crushing_wheel": "Roda de Moer", "block.create.crushing_wheel": "Roda de Moer",
"block.create.crushing_wheel_controller": "UNLOCALIZED: Crushing Wheel Controller", "block.create.crushing_wheel_controller": "UNLOCALIZED: Crushing Wheel Controller",
@ -179,6 +180,8 @@
"block.create.hand_crank": "UNLOCALIZED: Hand Crank", "block.create.hand_crank": "UNLOCALIZED: Hand Crank",
"block.create.horizontal_framed_glass": "UNLOCALIZED: Horizontal Framed Glass", "block.create.horizontal_framed_glass": "UNLOCALIZED: Horizontal Framed Glass",
"block.create.horizontal_framed_glass_pane": "UNLOCALIZED: Horizontal Framed Glass Pane", "block.create.horizontal_framed_glass_pane": "UNLOCALIZED: Horizontal Framed Glass Pane",
"block.create.hose_pulley": "UNLOCALIZED: Hose Pulley",
"block.create.item_drain": "UNLOCALIZED: Item Drain",
"block.create.jungle_window": "UNLOCALIZED: Jungle Window", "block.create.jungle_window": "UNLOCALIZED: Jungle Window",
"block.create.jungle_window_pane": "UNLOCALIZED: Jungle Window Pane", "block.create.jungle_window_pane": "UNLOCALIZED: Jungle Window Pane",
"block.create.large_cogwheel": "Roda Dentada Grande", "block.create.large_cogwheel": "Roda Dentada Grande",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 303", "_": "Missing Localizations: 306",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -61,6 +61,7 @@
"block.create.copper_tiles": "UNLOCALIZED: Copper Tiles", "block.create.copper_tiles": "UNLOCALIZED: Copper Tiles",
"block.create.copper_valve_handle": "UNLOCALIZED: Copper Valve Handle", "block.create.copper_valve_handle": "UNLOCALIZED: Copper Valve Handle",
"block.create.creative_crate": "Творческий ящик", "block.create.creative_crate": "Творческий ящик",
"block.create.creative_fluid_tank": "UNLOCALIZED: Creative Fluid Tank",
"block.create.creative_motor": "Творческий мотор", "block.create.creative_motor": "Творческий мотор",
"block.create.crushing_wheel": "Колесо дробления", "block.create.crushing_wheel": "Колесо дробления",
"block.create.crushing_wheel_controller": "Контроллер колеса дробления", "block.create.crushing_wheel_controller": "Контроллер колеса дробления",
@ -179,6 +180,8 @@
"block.create.hand_crank": "Рукоятка", "block.create.hand_crank": "Рукоятка",
"block.create.horizontal_framed_glass": "Горизонтальное обрамлённое стекло", "block.create.horizontal_framed_glass": "Горизонтальное обрамлённое стекло",
"block.create.horizontal_framed_glass_pane": "Горизонтальная обрамлённая стеклянная панель", "block.create.horizontal_framed_glass_pane": "Горизонтальная обрамлённая стеклянная панель",
"block.create.hose_pulley": "UNLOCALIZED: Hose Pulley",
"block.create.item_drain": "UNLOCALIZED: Item Drain",
"block.create.jungle_window": "Окно из тропического дерева", "block.create.jungle_window": "Окно из тропического дерева",
"block.create.jungle_window_pane": "Панель окна из тропического дерева", "block.create.jungle_window_pane": "Панель окна из тропического дерева",
"block.create.large_cogwheel": "Большая шестерня", "block.create.large_cogwheel": "Большая шестерня",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 316", "_": "Missing Localizations: 319",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -61,6 +61,7 @@
"block.create.copper_tiles": "UNLOCALIZED: Copper Tiles", "block.create.copper_tiles": "UNLOCALIZED: Copper Tiles",
"block.create.copper_valve_handle": "UNLOCALIZED: Copper Valve Handle", "block.create.copper_valve_handle": "UNLOCALIZED: Copper Valve Handle",
"block.create.creative_crate": "创造板条箱", "block.create.creative_crate": "创造板条箱",
"block.create.creative_fluid_tank": "UNLOCALIZED: Creative Fluid Tank",
"block.create.creative_motor": "创造马达", "block.create.creative_motor": "创造马达",
"block.create.crushing_wheel": "粉碎轮", "block.create.crushing_wheel": "粉碎轮",
"block.create.crushing_wheel_controller": "粉碎轮控制器", "block.create.crushing_wheel_controller": "粉碎轮控制器",
@ -179,6 +180,8 @@
"block.create.hand_crank": "手摇曲柄", "block.create.hand_crank": "手摇曲柄",
"block.create.horizontal_framed_glass": "竖直边框玻璃", "block.create.horizontal_framed_glass": "竖直边框玻璃",
"block.create.horizontal_framed_glass_pane": "竖直边框玻璃板", "block.create.horizontal_framed_glass_pane": "竖直边框玻璃板",
"block.create.hose_pulley": "UNLOCALIZED: Hose Pulley",
"block.create.item_drain": "UNLOCALIZED: Item Drain",
"block.create.jungle_window": "丛林窗户", "block.create.jungle_window": "丛林窗户",
"block.create.jungle_window_pane": "丛林窗户板", "block.create.jungle_window_pane": "丛林窗户板",
"block.create.large_cogwheel": "大齿轮", "block.create.large_cogwheel": "大齿轮",

View file

@ -0,0 +1,10 @@
{
"parent": "create:block/fluid_tank/block_bottom",
"textures": {
"0": "create:block/creative_casing",
"1": "create:block/creative_fluid_tank",
"3": "create:block/creative_fluid_tank_window",
"4": "create:block/creative_fluid_tank_window_single",
"particle": "create:block/creative_fluid_tank"
}
}

View file

@ -0,0 +1,10 @@
{
"parent": "create:block/fluid_tank/block_bottom_window",
"textures": {
"0": "create:block/creative_casing",
"1": "create:block/creative_fluid_tank",
"3": "create:block/creative_fluid_tank_window",
"4": "create:block/creative_fluid_tank_window_single",
"particle": "create:block/creative_fluid_tank"
}
}

View file

@ -0,0 +1,10 @@
{
"parent": "create:block/fluid_tank/block_bottom_window_ne",
"textures": {
"0": "create:block/creative_casing",
"1": "create:block/creative_fluid_tank",
"3": "create:block/creative_fluid_tank_window",
"4": "create:block/creative_fluid_tank_window_single",
"particle": "create:block/creative_fluid_tank"
}
}

View file

@ -0,0 +1,10 @@
{
"parent": "create:block/fluid_tank/block_bottom_window_nw",
"textures": {
"0": "create:block/creative_casing",
"1": "create:block/creative_fluid_tank",
"3": "create:block/creative_fluid_tank_window",
"4": "create:block/creative_fluid_tank_window_single",
"particle": "create:block/creative_fluid_tank"
}
}

View file

@ -0,0 +1,10 @@
{
"parent": "create:block/fluid_tank/block_bottom_window_se",
"textures": {
"0": "create:block/creative_casing",
"1": "create:block/creative_fluid_tank",
"3": "create:block/creative_fluid_tank_window",
"4": "create:block/creative_fluid_tank_window_single",
"particle": "create:block/creative_fluid_tank"
}
}

View file

@ -0,0 +1,10 @@
{
"parent": "create:block/fluid_tank/block_bottom_window_sw",
"textures": {
"0": "create:block/creative_casing",
"1": "create:block/creative_fluid_tank",
"3": "create:block/creative_fluid_tank_window",
"4": "create:block/creative_fluid_tank_window_single",
"particle": "create:block/creative_fluid_tank"
}
}

View file

@ -0,0 +1,10 @@
{
"parent": "create:block/fluid_tank/block_middle",
"textures": {
"0": "create:block/creative_casing",
"1": "create:block/creative_fluid_tank",
"3": "create:block/creative_fluid_tank_window",
"4": "create:block/creative_fluid_tank_window_single",
"particle": "create:block/creative_fluid_tank"
}
}

View file

@ -0,0 +1,10 @@
{
"parent": "create:block/fluid_tank/block_middle_window",
"textures": {
"0": "create:block/creative_casing",
"1": "create:block/creative_fluid_tank",
"3": "create:block/creative_fluid_tank_window",
"4": "create:block/creative_fluid_tank_window_single",
"particle": "create:block/creative_fluid_tank"
}
}

View file

@ -0,0 +1,10 @@
{
"parent": "create:block/fluid_tank/block_middle_window_ne",
"textures": {
"0": "create:block/creative_casing",
"1": "create:block/creative_fluid_tank",
"3": "create:block/creative_fluid_tank_window",
"4": "create:block/creative_fluid_tank_window_single",
"particle": "create:block/creative_fluid_tank"
}
}

View file

@ -0,0 +1,10 @@
{
"parent": "create:block/fluid_tank/block_middle_window_nw",
"textures": {
"0": "create:block/creative_casing",
"1": "create:block/creative_fluid_tank",
"3": "create:block/creative_fluid_tank_window",
"4": "create:block/creative_fluid_tank_window_single",
"particle": "create:block/creative_fluid_tank"
}
}

View file

@ -0,0 +1,10 @@
{
"parent": "create:block/fluid_tank/block_middle_window_se",
"textures": {
"0": "create:block/creative_casing",
"1": "create:block/creative_fluid_tank",
"3": "create:block/creative_fluid_tank_window",
"4": "create:block/creative_fluid_tank_window_single",
"particle": "create:block/creative_fluid_tank"
}
}

View file

@ -0,0 +1,10 @@
{
"parent": "create:block/fluid_tank/block_middle_window_sw",
"textures": {
"0": "create:block/creative_casing",
"1": "create:block/creative_fluid_tank",
"3": "create:block/creative_fluid_tank_window",
"4": "create:block/creative_fluid_tank_window_single",
"particle": "create:block/creative_fluid_tank"
}
}

View file

@ -0,0 +1,10 @@
{
"parent": "create:block/fluid_tank/block_single",
"textures": {
"0": "create:block/creative_casing",
"1": "create:block/creative_fluid_tank",
"3": "create:block/creative_fluid_tank_window",
"4": "create:block/creative_fluid_tank_window_single",
"particle": "create:block/creative_fluid_tank"
}
}

View file

@ -0,0 +1,10 @@
{
"parent": "create:block/fluid_tank/block_single_window",
"textures": {
"0": "create:block/creative_casing",
"1": "create:block/creative_fluid_tank",
"3": "create:block/creative_fluid_tank_window",
"4": "create:block/creative_fluid_tank_window_single",
"particle": "create:block/creative_fluid_tank"
}
}

View file

@ -0,0 +1,10 @@
{
"parent": "create:block/fluid_tank/block_single_window_ne",
"textures": {
"0": "create:block/creative_casing",
"1": "create:block/creative_fluid_tank",
"3": "create:block/creative_fluid_tank_window",
"4": "create:block/creative_fluid_tank_window_single",
"particle": "create:block/creative_fluid_tank"
}
}

View file

@ -0,0 +1,10 @@
{
"parent": "create:block/fluid_tank/block_single_window_nw",
"textures": {
"0": "create:block/creative_casing",
"1": "create:block/creative_fluid_tank",
"3": "create:block/creative_fluid_tank_window",
"4": "create:block/creative_fluid_tank_window_single",
"particle": "create:block/creative_fluid_tank"
}
}

View file

@ -0,0 +1,10 @@
{
"parent": "create:block/fluid_tank/block_single_window_se",
"textures": {
"0": "create:block/creative_casing",
"1": "create:block/creative_fluid_tank",
"3": "create:block/creative_fluid_tank_window",
"4": "create:block/creative_fluid_tank_window_single",
"particle": "create:block/creative_fluid_tank"
}
}

View file

@ -0,0 +1,10 @@
{
"parent": "create:block/fluid_tank/block_single_window_sw",
"textures": {
"0": "create:block/creative_casing",
"1": "create:block/creative_fluid_tank",
"3": "create:block/creative_fluid_tank_window",
"4": "create:block/creative_fluid_tank_window_single",
"particle": "create:block/creative_fluid_tank"
}
}

View file

@ -0,0 +1,10 @@
{
"parent": "create:block/fluid_tank/block_top",
"textures": {
"0": "create:block/creative_casing",
"1": "create:block/creative_fluid_tank",
"3": "create:block/creative_fluid_tank_window",
"4": "create:block/creative_fluid_tank_window_single",
"particle": "create:block/creative_fluid_tank"
}
}

View file

@ -0,0 +1,10 @@
{
"parent": "create:block/fluid_tank/block_top_window",
"textures": {
"0": "create:block/creative_casing",
"1": "create:block/creative_fluid_tank",
"3": "create:block/creative_fluid_tank_window",
"4": "create:block/creative_fluid_tank_window_single",
"particle": "create:block/creative_fluid_tank"
}
}

View file

@ -0,0 +1,10 @@
{
"parent": "create:block/fluid_tank/block_top_window_ne",
"textures": {
"0": "create:block/creative_casing",
"1": "create:block/creative_fluid_tank",
"3": "create:block/creative_fluid_tank_window",
"4": "create:block/creative_fluid_tank_window_single",
"particle": "create:block/creative_fluid_tank"
}
}

View file

@ -0,0 +1,10 @@
{
"parent": "create:block/fluid_tank/block_top_window_nw",
"textures": {
"0": "create:block/creative_casing",
"1": "create:block/creative_fluid_tank",
"3": "create:block/creative_fluid_tank_window",
"4": "create:block/creative_fluid_tank_window_single",
"particle": "create:block/creative_fluid_tank"
}
}

View file

@ -0,0 +1,10 @@
{
"parent": "create:block/fluid_tank/block_top_window_se",
"textures": {
"0": "create:block/creative_casing",
"1": "create:block/creative_fluid_tank",
"3": "create:block/creative_fluid_tank_window",
"4": "create:block/creative_fluid_tank_window_single",
"particle": "create:block/creative_fluid_tank"
}
}

View file

@ -0,0 +1,10 @@
{
"parent": "create:block/fluid_tank/block_top_window_sw",
"textures": {
"0": "create:block/creative_casing",
"1": "create:block/creative_fluid_tank",
"3": "create:block/creative_fluid_tank_window",
"4": "create:block/creative_fluid_tank_window_single",
"particle": "create:block/creative_fluid_tank"
}
}

View file

@ -0,0 +1,8 @@
{
"parent": "create:block/fluid_tank/block_single_window",
"textures": {
"5": "create:block/creative_fluid_tank_window_single",
"1": "create:block/creative_fluid_tank",
"0": "create:block/creative_casing"
}
}

View file

@ -0,0 +1,3 @@
{
"parent": "create:block/hose_pulley/item"
}

View file

@ -0,0 +1,3 @@
{
"parent": "create:block/item_drain"
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"create:crafting/kinetics/hose_pulley"
]
},
"criteria": {
"has_item": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"tag": "forge:ingots/copper"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "create:crafting/kinetics/hose_pulley"
}
}
},
"requirements": [
[
"has_item",
"has_the_recipe"
]
]
}

View file

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

View file

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

View file

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

View file

@ -0,0 +1,28 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
" B ",
"SCP",
" I "
],
"key": {
"S": {
"item": "create:shaft"
},
"P": {
"item": "create:fluid_pipe"
},
"B": {
"item": "create:copper_casing"
},
"C": {
"item": "minecraft:dried_kelp"
},
"I": {
"tag": "forge:plates/copper"
}
},
"result": {
"item": "create:hose_pulley"
}
}

View file

@ -68,8 +68,18 @@ public class AllBlockPartials {
FURNACE_GENERATOR_FRAME = get("furnace_engine/frame"), CUCKOO_MINUTE_HAND = get("cuckoo_clock/minute_hand"), FURNACE_GENERATOR_FRAME = get("furnace_engine/frame"), CUCKOO_MINUTE_HAND = get("cuckoo_clock/minute_hand"),
CUCKOO_HOUR_HAND = get("cuckoo_clock/hour_hand"), CUCKOO_LEFT_DOOR = get("cuckoo_clock/left_door"), CUCKOO_HOUR_HAND = get("cuckoo_clock/hour_hand"), CUCKOO_LEFT_DOOR = get("cuckoo_clock/left_door"),
CUCKOO_RIGHT_DOOR = get("cuckoo_clock/right_door"), CUCKOO_PIG = get("cuckoo_clock/pig"), CUCKOO_RIGHT_DOOR = get("cuckoo_clock/right_door"), CUCKOO_PIG = get("cuckoo_clock/pig"),
CUCKOO_CREEPER = get("cuckoo_clock/creeper"), ROPE_COIL = get("rope_pulley/rope_coil"), CUCKOO_CREEPER = get("cuckoo_clock/creeper"),
ROPE_HALF = get("rope_pulley/rope_half"), ROPE_HALF_MAGNET = get("rope_pulley/rope_half_magnet"),
ROPE_COIL = get("rope_pulley/rope_coil"),
ROPE_HALF = get("rope_pulley/rope_half"),
ROPE_HALF_MAGNET = get("rope_pulley/rope_half_magnet"),
HOSE_COIL = get("hose_pulley/rope_coil"),
HOSE = get("hose_pulley/rope"),
HOSE_MAGNET = get("hose_pulley/pulley_magnet"),
HOSE_HALF = get("hose_pulley/rope_half"),
HOSE_HALF_MAGNET = get("hose_pulley/rope_half_magnet"),
MILLSTONE_COG = get("millstone/inner"), MILLSTONE_COG = get("millstone/inner"),
SYMMETRY_PLANE = get("symmetry_effect/plane"), SYMMETRY_CROSSPLANE = get("symmetry_effect/crossplane"), SYMMETRY_PLANE = get("symmetry_effect/plane"), SYMMETRY_CROSSPLANE = get("symmetry_effect/crossplane"),

View file

@ -65,6 +65,8 @@ import com.simibubi.create.content.contraptions.components.turntable.TurntableBl
import com.simibubi.create.content.contraptions.components.waterwheel.WaterWheelBlock; import com.simibubi.create.content.contraptions.components.waterwheel.WaterWheelBlock;
import com.simibubi.create.content.contraptions.fluids.PipeAttachmentModel; import com.simibubi.create.content.contraptions.fluids.PipeAttachmentModel;
import com.simibubi.create.content.contraptions.fluids.PumpBlock; 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.actors.SpoutBlock;
import com.simibubi.create.content.contraptions.fluids.pipes.EncasedPipeBlock; import com.simibubi.create.content.contraptions.fluids.pipes.EncasedPipeBlock;
import com.simibubi.create.content.contraptions.fluids.pipes.FluidPipeBlock; import com.simibubi.create.content.contraptions.fluids.pipes.FluidPipeBlock;
@ -548,17 +550,49 @@ public class AllBlocks {
} }
} }
public static final BlockEntry<FluidTankBlock> FLUID_TANK = REGISTRATE.block("fluid_tank", FluidTankBlock::new) public static final BlockEntry<FluidTankBlock> FLUID_TANK = REGISTRATE.block("fluid_tank", FluidTankBlock::regular)
.initialProperties(SharedProperties::softMetal) .initialProperties(SharedProperties::softMetal)
.properties(Block.Properties::nonOpaque) .properties(Block.Properties::nonOpaque)
.blockstate(new FluidTankGenerator()::generate) .blockstate(new FluidTankGenerator()::generate)
.onRegister(CreateRegistrate.blockModel(() -> FluidTankModel::new)) .onRegister(CreateRegistrate
.blockModel(() -> m -> new FluidTankModel(m, AllSpriteShifts.FLUID_TANK, AllSpriteShifts.COPPER_CASING)))
.addLayer(() -> RenderType::getCutoutMipped) .addLayer(() -> RenderType::getCutoutMipped)
.item(FluidTankItem::new) .item(FluidTankItem::new)
.model(AssetLookup.<FluidTankItem>customItemModel("_", "block_single_window")) .model(AssetLookup.<FluidTankItem>customItemModel("_", "block_single_window"))
.build() .build()
.register(); .register();
public static final BlockEntry<FluidTankBlock> CREATIVE_FLUID_TANK =
REGISTRATE.block("creative_fluid_tank", FluidTankBlock::creative)
.initialProperties(SharedProperties::softMetal)
.properties(Block.Properties::nonOpaque)
.blockstate(new FluidTankGenerator("creative_")::generate)
.onRegister(CreateRegistrate.blockModel(
() -> m -> new FluidTankModel(m, AllSpriteShifts.CREATIVE_FLUID_TANK, AllSpriteShifts.CREATIVE_CASING)))
.addLayer(() -> RenderType::getCutoutMipped)
.item(FluidTankItem::new)
.model((c, p) -> p.withExistingParent(c.getName(), p.modLoc("block/fluid_tank/block_single_window"))
.texture("5", p.modLoc("block/creative_fluid_tank_window_single"))
.texture("1", p.modLoc("block/creative_fluid_tank"))
.texture("0", p.modLoc("block/creative_casing")))
.build()
.register();
public static final BlockEntry<HosePulleyBlock> HOSE_PULLEY = REGISTRATE.block("hose_pulley", HosePulleyBlock::new)
.initialProperties(SharedProperties::softMetal)
.blockstate(BlockStateGen.horizontalBlockProvider(true))
.transform(StressConfigDefaults.setImpact(4.0))
.item()
.transform(customItemModel())
.register();
public static final BlockEntry<ItemDrainBlock> ITEM_DRAIN = REGISTRATE.block("item_drain", ItemDrainBlock::new)
.initialProperties(SharedProperties::softMetal)
.addLayer(() -> RenderType::getCutoutMipped)
.blockstate((c, p) -> p.simpleBlock(c.get(), AssetLookup.standardModel(c, p)))
.simpleItem()
.register();
public static final BlockEntry<SpoutBlock> SPOUT = REGISTRATE.block("spout", SpoutBlock::new) public static final BlockEntry<SpoutBlock> SPOUT = REGISTRATE.block("spout", SpoutBlock::new)
.initialProperties(SharedProperties::softMetal) .initialProperties(SharedProperties::softMetal)
.blockstate((ctx, prov) -> prov.simpleBlock(ctx.getEntry(), AssetLookup.partialBaseModel(ctx, prov))) .blockstate((ctx, prov) -> prov.simpleBlock(ctx.getEntry(), AssetLookup.partialBaseModel(ctx, prov)))

View file

@ -25,6 +25,7 @@ public class AllShapes {
public static final VoxelShaper public static final VoxelShaper
CASING_14PX = shape(0, 0, 0, 16, 14, 16).forDirectional(), CASING_14PX = shape(0, 0, 0, 16, 14, 16).forDirectional(),
CASING_13PX = shape(0, 0, 0, 16, 13, 16).forDirectional(),
CASING_12PX = shape(0, 0, 0, 16, 12, 16).forDirectional(), CASING_12PX = shape(0, 0, 0, 16, 12, 16).forDirectional(),
CASING_11PX = shape(0, 0, 0, 16, 11, 16).forDirectional(), CASING_11PX = shape(0, 0, 0, 16, 11, 16).forDirectional(),
MOTOR_BLOCK = shape(3, 0, 3, 13, 14, 13).forDirectional(), MOTOR_BLOCK = shape(3, 0, 3, 13, 14, 13).forDirectional(),
@ -34,11 +35,12 @@ public class AllShapes {
.forHorizontal(Direction.SOUTH), .forHorizontal(Direction.SOUTH),
PORTABLE_STORAGE_INTERFACE = shape(0, 0, 0, 16, 14, 16).forDirectional(), PORTABLE_STORAGE_INTERFACE = shape(0, 0, 0, 16, 14, 16).forDirectional(),
PULLEY = shape(0, 0, 0, 16, 16, 2).add(1, 1, 2, 15, 15, 14) PULLEY = shape(0, 0, 0, 16, 16, 2).add(1, 1, 2, 15, 15, 14)
.add(2, 13, 2, 14, 16, 14)
.add(0, 0, 14, 16, 16, 16) .add(0, 0, 14, 16, 16, 16)
.forHorizontalAxis(), .forHorizontalAxis(),
SAIL_FRAME_COLLISION = shape(0, 5, 0, 16, 9, 16).erase(2, 0, 2, 14, 16, 14).forDirectional(), SAIL_FRAME_COLLISION = shape(0, 5, 0, 16, 9, 16).erase(2, 0, 2, 14, 16, 14)
SAIL_FRAME = shape(0, 5, 0, 16, 9, 16).forDirectional(), .forDirectional(),
SAIL = shape(0, 5, 0, 16, 10, 16).forDirectional(), SAIL_FRAME = shape(0, 5, 0, 16, 9, 16).forDirectional(), SAIL = shape(0, 5, 0, 16, 10, 16).forDirectional(),
SPEED_CONTROLLER = shape(0, 0, 0, 16, 2, 16).add(1, 1, 1, 15, 15, 15) SPEED_CONTROLLER = shape(0, 0, 0, 16, 2, 16).add(1, 1, 1, 15, 15, 15)
.erase(0, 8, 5, 16, 16, 11) .erase(0, 8, 5, 16, 16, 11)
.add(2, 9, 2, 14, 14, 14) .add(2, 9, 2, 14, 14, 14)
@ -121,9 +123,6 @@ public class AllShapes {
LOGISTICS_TABLE_SLOPE = shape(0, 10, 15, 16, 14, 10.667).add(0, 12, 10.667, 16, 16, 6.333) LOGISTICS_TABLE_SLOPE = shape(0, 10, 15, 16, 14, 10.667).add(0, 12, 10.667, 16, 16, 6.333)
.add(0, 14, 6.333, 16, 18, 2) .add(0, 14, 6.333, 16, 18, 2)
.build(), .build(),
SCHEMATICS_TABLE_SLOPE = shape(0, 10, 16, 16, 14, 11).add(0, 12, 11, 16, 16, 6)
.add(0, 14, 6, 16, 18, 1)
.build(),
TANK_BOTTOM_LID = shape(0, 0, 0, 16, 4, 16).build(), TANK_TOP_LID = shape(0, 12, 0, 16, 16, 16).build() TANK_BOTTOM_LID = shape(0, 0, 0, 16, 4, 16).build(), TANK_TOP_LID = shape(0, 12, 0, 16, 16, 16).build()
; ;
@ -196,7 +195,7 @@ public class AllShapes {
.withVerticalShapes(LOGISTICAL_CONTROLLER.get(UP)), .withVerticalShapes(LOGISTICAL_CONTROLLER.get(UP)),
LOGISTICS_TABLE = shape(TABLE_POLE_SHAPE).add(LOGISTICS_TABLE_SLOPE) LOGISTICS_TABLE = shape(TABLE_POLE_SHAPE).add(LOGISTICS_TABLE_SLOPE)
.forHorizontal(SOUTH), .forHorizontal(SOUTH),
SCHEMATICS_TABLE = shape(TABLE_POLE_SHAPE).add(SCHEMATICS_TABLE_SLOPE) SCHEMATICS_TABLE = shape(4, 0, 4, 12, 12, 12).add(0, 11, 2, 16, 14, 14)
.forDirectional(SOUTH), .forDirectional(SOUTH),
CHUTE_SLOPE = shape(ChuteShapes.createSlope()).forHorizontal(SOUTH) CHUTE_SLOPE = shape(ChuteShapes.createSlope()).forHorizontal(SOUTH)

View file

@ -42,7 +42,8 @@ public class AllSpriteShifts {
BRASS_CASING = omni("brass_casing"), BRASS_CASING = omni("brass_casing"),
COPPER_CASING = omni("copper_casing"), COPPER_CASING = omni("copper_casing"),
SHADOW_STEEL_CASING = omni("shadow_steel_casing"), SHADOW_STEEL_CASING = omni("shadow_steel_casing"),
REFINED_RADIANCE_CASING = omni("refined_radiance_casing"); REFINED_RADIANCE_CASING = omni("refined_radiance_casing"),
CREATIVE_CASING = getCT(CTType.CROSS, "creative_casing");
public static final CTSpriteShiftEntry public static final CTSpriteShiftEntry
CHASSIS = getCT(CTType.OMNIDIRECTIONAL, "linear_chassis_end"), CHASSIS = getCT(CTType.OMNIDIRECTIONAL, "linear_chassis_end"),
@ -50,7 +51,8 @@ public class AllSpriteShifts {
public static final CTSpriteShiftEntry public static final CTSpriteShiftEntry
BRASS_TUNNEL_TOP = vertical("brass_tunnel_top"), BRASS_TUNNEL_TOP = vertical("brass_tunnel_top"),
FLUID_TANK = getCT(CTType.CROSS, "fluid_tank"); FLUID_TANK = getCT(CTType.CROSS, "fluid_tank"),
CREATIVE_FLUID_TANK = getCT(CTType.CROSS, "creative_fluid_tank");
public static final SpriteShiftEntry public static final SpriteShiftEntry
BELT = SpriteShifter.get("block/belt", "block/belt_animated"), BELT = SpriteShifter.get("block/belt", "block/belt_animated"),

View file

@ -48,6 +48,8 @@ import com.simibubi.create.content.contraptions.components.turntable.TurntableTi
import com.simibubi.create.content.contraptions.components.waterwheel.WaterWheelTileEntity; import com.simibubi.create.content.contraptions.components.waterwheel.WaterWheelTileEntity;
import com.simibubi.create.content.contraptions.fluids.PumpRenderer; import com.simibubi.create.content.contraptions.fluids.PumpRenderer;
import com.simibubi.create.content.contraptions.fluids.PumpTileEntity; import com.simibubi.create.content.contraptions.fluids.PumpTileEntity;
import com.simibubi.create.content.contraptions.fluids.actors.HosePulleyRenderer;
import com.simibubi.create.content.contraptions.fluids.actors.HosePulleyTileEntity;
import com.simibubi.create.content.contraptions.fluids.actors.SpoutRenderer; import com.simibubi.create.content.contraptions.fluids.actors.SpoutRenderer;
import com.simibubi.create.content.contraptions.fluids.actors.SpoutTileEntity; import com.simibubi.create.content.contraptions.fluids.actors.SpoutTileEntity;
import com.simibubi.create.content.contraptions.fluids.pipes.FluidPipeTileEntity; import com.simibubi.create.content.contraptions.fluids.pipes.FluidPipeTileEntity;
@ -56,6 +58,7 @@ import com.simibubi.create.content.contraptions.fluids.pipes.FluidValveTileEntit
import com.simibubi.create.content.contraptions.fluids.pipes.SmartFluidPipeTileEntity; import com.simibubi.create.content.contraptions.fluids.pipes.SmartFluidPipeTileEntity;
import com.simibubi.create.content.contraptions.fluids.pipes.StraightPipeTileEntity; import com.simibubi.create.content.contraptions.fluids.pipes.StraightPipeTileEntity;
import com.simibubi.create.content.contraptions.fluids.pipes.TransparentStraightPipeRenderer; import com.simibubi.create.content.contraptions.fluids.pipes.TransparentStraightPipeRenderer;
import com.simibubi.create.content.contraptions.fluids.tank.CreativeFluidTankTileEntity;
import com.simibubi.create.content.contraptions.fluids.tank.FluidTankRenderer; import com.simibubi.create.content.contraptions.fluids.tank.FluidTankRenderer;
import com.simibubi.create.content.contraptions.fluids.tank.FluidTankTileEntity; import com.simibubi.create.content.contraptions.fluids.tank.FluidTankTileEntity;
import com.simibubi.create.content.contraptions.processing.BasinRenderer; import com.simibubi.create.content.contraptions.processing.BasinRenderer;
@ -120,7 +123,6 @@ public class AllTileEntities {
public static final TileEntityEntry<SchematicTableTileEntity> SCHEMATIC_TABLE = Create.registrate() public static final TileEntityEntry<SchematicTableTileEntity> SCHEMATIC_TABLE = Create.registrate()
.tileEntity("schematic_table", SchematicTableTileEntity::new) .tileEntity("schematic_table", SchematicTableTileEntity::new)
.validBlocks(AllBlocks.SCHEMATIC_TABLE) .validBlocks(AllBlocks.SCHEMATIC_TABLE)
// .renderer(() -> renderer)
.register(); .register();
// Kinetics // Kinetics
@ -237,6 +239,18 @@ public class AllTileEntities {
.renderer(() -> FluidTankRenderer::new) .renderer(() -> FluidTankRenderer::new)
.register(); .register();
public static final TileEntityEntry<CreativeFluidTankTileEntity> CREATIVE_FLUID_TANK = Create.registrate()
.tileEntity("creative_fluid_tank", CreativeFluidTankTileEntity::new)
.validBlocks(AllBlocks.CREATIVE_FLUID_TANK)
.renderer(() -> FluidTankRenderer::new)
.register();
public static final TileEntityEntry<HosePulleyTileEntity> HOSE_PULLEY = Create.registrate()
.tileEntity("hose_pulley", HosePulleyTileEntity::new)
.validBlocks(AllBlocks.HOSE_PULLEY)
.renderer(() -> HosePulleyRenderer::new)
.register();
public static final TileEntityEntry<SpoutTileEntity> SPOUT = Create.registrate() public static final TileEntityEntry<SpoutTileEntity> SPOUT = Create.registrate()
.tileEntity("spout", SpoutTileEntity::new) .tileEntity("spout", SpoutTileEntity::new)
.validBlocks(AllBlocks.SPOUT) .validBlocks(AllBlocks.SPOUT)

View file

@ -1,5 +1,7 @@
package com.simibubi.create.content.contraptions.base; package com.simibubi.create.content.contraptions.base;
import com.simibubi.create.foundation.utility.Iterate;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.item.BlockItemUseContext; import net.minecraft.item.BlockItemUseContext;
@ -26,18 +28,20 @@ public abstract class HorizontalKineticBlock extends KineticBlock {
@Override @Override
public BlockState getStateForPlacement(BlockItemUseContext context) { public BlockState getStateForPlacement(BlockItemUseContext context) {
return this.getDefaultState().with(HORIZONTAL_FACING, context.getPlacementHorizontalFacing().getOpposite()); return this.getDefaultState()
.with(HORIZONTAL_FACING, context.getPlacementHorizontalFacing()
.getOpposite());
} }
public Direction getPreferredHorizontalFacing(BlockItemUseContext context) { public Direction getPreferredHorizontalFacing(BlockItemUseContext context) {
Direction prefferedSide = null; Direction prefferedSide = null;
for (Direction side : Direction.values()) { for (Direction side : Iterate.horizontalDirections) {
if (side.getAxis().isVertical()) BlockState blockState = context.getWorld()
continue; .getBlockState(context.getPos()
BlockState blockState = context.getWorld().getBlockState(context.getPos().offset(side)); .offset(side));
if (blockState.getBlock() instanceof IRotate) { if (blockState.getBlock() instanceof IRotate) {
if (((IRotate) blockState.getBlock()).hasShaftTowards(context.getWorld(), context.getPos().offset(side), if (((IRotate) blockState.getBlock()).hasShaftTowards(context.getWorld(), context.getPos()
blockState, side.getOpposite())) .offset(side), blockState, side.getOpposite()))
if (prefferedSide != null && prefferedSide.getAxis() != side.getAxis()) { if (prefferedSide != null && prefferedSide.getAxis() != side.getAxis()) {
prefferedSide = null; prefferedSide = null;
break; break;

View file

@ -72,8 +72,11 @@ public class SailBlock extends ProperDirectionalBlock {
BlockPos offsetPos = pos.offset(offset); BlockPos offsetPos = pos.offset(offset);
if (!world.isRemote && world.getBlockState(offsetPos) if (!world.isRemote && world.getBlockState(offsetPos)
.getMaterial() .getMaterial()
.isReplaceable()) .isReplaceable()) {
world.setBlockState(offsetPos, blockState); world.setBlockState(offsetPos, blockState);
if (!player.isCreative())
heldItem.shrink(1);
}
return ActionResultType.SUCCESS; return ActionResultType.SUCCESS;
} }

View file

@ -20,6 +20,7 @@ import net.minecraft.util.Direction.AxisDirection;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.MathHelper;
import net.minecraft.world.IWorld; import net.minecraft.world.IWorld;
import net.minecraft.world.World;
public class PulleyRenderer extends KineticTileEntityRenderer { public class PulleyRenderer extends KineticTileEntityRenderer {
@ -38,6 +39,7 @@ public class PulleyRenderer extends KineticTileEntityRenderer {
super.renderSafe(te, partialTicks, ms, buffer, light, overlay); super.renderSafe(te, partialTicks, ms, buffer, light, overlay);
PulleyTileEntity pulley = (PulleyTileEntity) te; PulleyTileEntity pulley = (PulleyTileEntity) te;
World world = te.getWorld();
BlockState blockState = te.getBlockState(); BlockState blockState = te.getBlockState();
BlockPos pos = te.getPos(); BlockPos pos = te.getPos();
@ -46,7 +48,8 @@ public class PulleyRenderer extends KineticTileEntityRenderer {
SuperByteBuffer magnet = CreateClient.bufferCache.renderBlock(AllBlocks.PULLEY_MAGNET.getDefaultState()); SuperByteBuffer magnet = CreateClient.bufferCache.renderBlock(AllBlocks.PULLEY_MAGNET.getDefaultState());
SuperByteBuffer rope = CreateClient.bufferCache.renderBlock(AllBlocks.ROPE.getDefaultState()); SuperByteBuffer rope = CreateClient.bufferCache.renderBlock(AllBlocks.ROPE.getDefaultState());
boolean moving = pulley.running && (pulley.movedContraption == null || !pulley.movedContraption.isStalled()); boolean running = pulley.running;
boolean moving = running && (pulley.movedContraption == null || !pulley.movedContraption.isStalled());
float offset = pulley.getInterpolatedOffset(moving ? partialTicks : 0.5f); float offset = pulley.getInterpolatedOffset(moving ? partialTicks : 0.5f);
if (pulley.movedContraption != null) { if (pulley.movedContraption != null) {
@ -56,23 +59,28 @@ public class PulleyRenderer extends KineticTileEntityRenderer {
offset = (float) -(entityPos - c.getAnchor().getY() - c.initialOffset); offset = (float) -(entityPos - c.getAnchor().getY() - c.initialOffset);
} }
IVertexBuilder vb = buffer.getBuffer(RenderType.getSolid()); renderPulleyRope(ms, buffer, world, pos, halfMagnet, halfRope, magnet, rope, running, offset);
}
if (pulley.running || pulley.offset == 0) public static void renderPulleyRope(MatrixStack ms, IRenderTypeBuffer buffer, World world, BlockPos pos,
renderAt(te.getWorld(), offset > .25f ? magnet : halfMagnet, offset, pos, ms, vb); SuperByteBuffer halfMagnet, SuperByteBuffer halfRope, SuperByteBuffer magnet, SuperByteBuffer rope,
boolean running, float offset) {
IVertexBuilder vb = buffer.getBuffer(RenderType.getSolid());
if (running || offset == 0)
renderAt(world, offset > .25f ? magnet : halfMagnet, offset, pos, ms, vb);
float f = offset % 1; float f = offset % 1;
if (offset > .75f && (f < .25f || f > .75f)) if (offset > .75f && (f < .25f || f > .75f))
renderAt(te.getWorld(), halfRope, f > .75f ? f - 1 : f, pos, ms, vb); renderAt(world, halfRope, f > .75f ? f - 1 : f, pos, ms, vb);
if (!pulley.running) if (!running)
return; return;
for (int i = 0; i < offset - 1.25f; i++) for (int i = 0; i < offset - 1.25f; i++)
renderAt(te.getWorld(), rope, offset - i - 1, pos, ms, vb); renderAt(world, rope, offset - i - 1, pos, ms, vb);
} }
public void renderAt(IWorld world, SuperByteBuffer partial, float offset, BlockPos pulleyPos, public static void renderAt(IWorld world, SuperByteBuffer partial, float offset, BlockPos pulleyPos,
MatrixStack ms, IVertexBuilder buffer) { MatrixStack ms, IVertexBuilder buffer) {
BlockPos actualPos = pulleyPos.down((int) offset); BlockPos actualPos = pulleyPos.down((int) offset);
int light = WorldRenderer.getLightmapCoordinates(world, world.getBlockState(actualPos), actualPos); int light = WorldRenderer.getLightmapCoordinates(world, world.getBlockState(actualPos), actualPos);

View file

@ -0,0 +1,51 @@
package com.simibubi.create.content.contraptions.fluids;
import java.util.Random;
import com.simibubi.create.foundation.utility.VecHelper;
import net.minecraft.client.Minecraft;
import net.minecraft.fluid.Fluid;
import net.minecraft.fluid.Fluids;
import net.minecraft.fluid.IFluidState;
import net.minecraft.particles.BlockParticleData;
import net.minecraft.particles.IParticleData;
import net.minecraft.particles.ParticleTypes;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.World;
import net.minecraftforge.fluids.FluidStack;
public class FluidFX {
static Random r = new Random();
public static void splash(BlockPos pos, FluidStack fluidStack) {
Fluid fluid = fluidStack.getFluid();
if (fluid == Fluids.EMPTY)
return;
IFluidState defaultState = fluid.getDefaultState();
if (defaultState == null || defaultState.isEmpty()) {
return;
}
BlockParticleData blockParticleData = new BlockParticleData(ParticleTypes.BLOCK, defaultState.getBlockState());
Vec3d center = VecHelper.getCenterOf(pos);
for (int i = 0; i < 20; i++) {
Vec3d v = VecHelper.offsetRandomly(Vec3d.ZERO, r, .25f);
particle(blockParticleData, center.add(v), v);
}
}
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);
}
private static World world() {
return Minecraft.getInstance().world;
}
}

View file

@ -1,5 +1,6 @@
package com.simibubi.create.content.contraptions.fluids; package com.simibubi.create.content.contraptions.fluids;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.foundation.tileEntity.SmartTileEntity; import com.simibubi.create.foundation.tileEntity.SmartTileEntity;
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
import com.simibubi.create.foundation.tileEntity.behaviour.BehaviourType; import com.simibubi.create.foundation.tileEntity.behaviour.BehaviourType;
@ -24,7 +25,8 @@ public class FluidPipeAttachmentBehaviour extends TileEntityBehaviour {
.getAxis() == direction.getAxis()) .getAxis() == direction.getAxis())
return AttachmentTypes.NONE; return AttachmentTypes.NONE;
if (FluidPropagator.hasFluidCapability(facingState, world, offsetPos, direction)) if (FluidPropagator.hasFluidCapability(facingState, world, offsetPos, direction)
&& !AllBlocks.HOSE_PULLEY.has(facingState))
return AttachmentTypes.DRAIN; return AttachmentTypes.DRAIN;
return AttachmentTypes.RIM; return AttachmentTypes.RIM;

View file

@ -0,0 +1,347 @@
package com.simibubi.create.content.contraptions.fluids.actors;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Objects;
import java.util.Set;
import javax.annotation.Nullable;
import com.simibubi.create.foundation.tileEntity.SmartTileEntity;
import com.simibubi.create.foundation.tileEntity.behaviour.BehaviourType;
import com.simibubi.create.foundation.utility.Debug;
import it.unimi.dsi.fastutil.PriorityQueue;
import it.unimi.dsi.fastutil.objects.ObjectHeapPriorityQueue;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.block.FlowingFluidBlock;
import net.minecraft.fluid.Fluid;
import net.minecraft.fluid.Fluids;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.state.properties.BlockStateProperties;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MutableBoundingBox;
import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.world.World;
import net.minecraftforge.fluids.FluidStack;
public class FluidDrainingBehaviour extends FluidManipulationBehaviour {
Fluid fluid;
// Execution
Set<BlockPos> validationSet;
PriorityQueue<BlockPosEntry> queue;
boolean isValid;
// Validation
List<BlockPosEntry> validationFrontier;
Set<BlockPos> validationVisited;
Set<BlockPos> newValidationSet;
public FluidDrainingBehaviour(SmartTileEntity te) {
super(te);
validationVisited = new HashSet<>();
validationFrontier = new ArrayList<>();
validationSet = new HashSet<>();
newValidationSet = new HashSet<>();
queue = new ObjectHeapPriorityQueue<>(this::comparePositions);
}
@Nullable
public boolean pullNext(BlockPos root, boolean simulate) {
if (!frontier.isEmpty())
return false;
if (!Objects.equals(root, rootPos)) {
rebuildContext(root);
return false;
}
if (counterpartActed) {
Debug.debugChat("<!> Counterpart acted");
counterpartActed = false;
softReset(root);
return false;
}
if (affectedArea == null)
affectedArea = new MutableBoundingBox(root, root);
World world = getWorld();
if (!queue.isEmpty() && !isValid) {
rebuildContext(root);
return false;
}
if (validationFrontier.isEmpty() && !queue.isEmpty() && !simulate && revalidateIn == 0)
revalidate(root);
while (!queue.isEmpty()) {
// Dont dequeue here, so we can decide not to dequeue a valid entry when
// simulating
BlockPos currentPos = queue.first().pos;
BlockState blockState = world.getBlockState(currentPos);
BlockState emptied = blockState;
Fluid fluid = Fluids.EMPTY;
if (blockState.has(BlockStateProperties.WATERLOGGED) && blockState.get(BlockStateProperties.WATERLOGGED)) {
emptied = blockState.with(BlockStateProperties.WATERLOGGED, Boolean.valueOf(false));
fluid = Fluids.WATER;
} else if (blockState.getBlock() instanceof FlowingFluidBlock) {
FlowingFluidBlock flowingFluid = (FlowingFluidBlock) blockState.getBlock();
emptied = Blocks.AIR.getDefaultState();
if (blockState.get(FlowingFluidBlock.LEVEL) == 0)
fluid = flowingFluid.getFluid();
else {
affectedArea.expandTo(new MutableBoundingBox(currentPos, currentPos));
world.setBlockState(currentPos, emptied, 2 | 16);
queue.dequeue();
if (queue.isEmpty()) {
isValid = checkValid(world, rootPos);
reset();
}
continue;
}
} else if (blockState.getFluidState()
.getFluid() != Fluids.EMPTY
&& blockState.getCollisionShape(world, currentPos, ISelectionContext.dummy())
.isEmpty()) {
fluid = blockState.getFluidState()
.getFluid();
emptied = Blocks.AIR.getDefaultState();
}
if (this.fluid == null)
this.fluid = fluid;
if (!this.fluid.isEquivalentTo(fluid)) {
queue.dequeue();
if (queue.isEmpty()) {
isValid = checkValid(world, rootPos);
reset();
}
continue;
}
if (simulate)
return true;
playEffect(world, currentPos, fluid, true);
if (infinite)
return true;
world.setBlockState(currentPos, emptied, 2 | 16);
affectedArea.expandTo(new MutableBoundingBox(currentPos, currentPos));
queue.dequeue();
if (queue.isEmpty()) {
isValid = checkValid(world, rootPos);
reset();
} else if (!validationSet.contains(currentPos)) {
Debug.debugChat("<!> Drained unreachable fluid - rebuilding");
reset();
}
return true;
}
if (rootPos == null)
return false;
if (isValid)
rebuildContext(root);
return false;
}
protected void softReset(BlockPos root) {
queue.clear();
validationSet.clear();
newValidationSet.clear();
validationFrontier.clear();
validationVisited.clear();
visited.clear();
infinite = false;
setValidationTimer();
frontier.add(new BlockPosEntry(root, 0));
}
protected boolean checkValid(World world, BlockPos root) {
BlockPos currentPos = root;
for (int timeout = 1000; timeout > 0 && !root.equals(tileEntity.getPos()); timeout--) {
FluidBlockType canPullFluidsFrom = canPullFluidsFrom(world.getBlockState(currentPos), currentPos);
if (canPullFluidsFrom == FluidBlockType.FLOWING) {
currentPos = currentPos.up();
continue;
}
if (canPullFluidsFrom == FluidBlockType.SOURCE)
return true;
break;
}
return false;
}
enum FluidBlockType {
NONE, SOURCE, FLOWING;
}
@Override
public void read(CompoundNBT nbt, boolean clientPacket) {
super.read(nbt, clientPacket);
if (!clientPacket && affectedArea != null)
frontier.add(new BlockPosEntry(rootPos, 0));
}
protected FluidBlockType canPullFluidsFrom(BlockState blockState, BlockPos pos) {
if (blockState.has(BlockStateProperties.WATERLOGGED) && blockState.get(BlockStateProperties.WATERLOGGED))
return FluidBlockType.SOURCE;
if (blockState.getBlock() instanceof FlowingFluidBlock)
return blockState.get(FlowingFluidBlock.LEVEL) == 0 ? FluidBlockType.SOURCE : FluidBlockType.FLOWING;
if (blockState.getFluidState()
.getFluid() != Fluids.EMPTY && blockState.getCollisionShape(getWorld(), pos, ISelectionContext.dummy())
.isEmpty())
return FluidBlockType.SOURCE;
return FluidBlockType.NONE;
}
@Override
public void tick() {
super.tick();
if (rootPos != null)
isValid = checkValid(getWorld(), rootPos);
if (!frontier.isEmpty()) {
continueSearch();
return;
}
if (!validationFrontier.isEmpty()) {
continueValidation();
return;
}
if (revalidateIn > 0)
revalidateIn--;
}
@Override
public void lazyTick() {
super.lazyTick();
}
public void rebuildContext(BlockPos root) {
reset();
Debug.debugChat("Rebuilding!");
rootPos = root;
affectedArea = new MutableBoundingBox(rootPos, rootPos);
if (isValid)
frontier.add(new BlockPosEntry(root, 0));
}
public void revalidate(BlockPos root) {
Debug.debugChat("Revalidating!");
validationFrontier.clear();
validationVisited.clear();
newValidationSet.clear();
validationFrontier.add(new BlockPosEntry(root, 0));
setValidationTimer();
}
private void continueSearch() {
search(fluid, frontier, visited, (e, d) -> {
queue.enqueue(new BlockPosEntry(e, d));
validationSet.add(e);
}, false);
Debug.debugChat("<...> Building - queue size " + queue.size());
World world = getWorld();
int maxBlocks = maxBlocks();
if (visited.size() > maxBlocks) {
infinite = true;
// Find first block with valid fluid
while (true) {
BlockPos first = queue.first().pos;
if (canPullFluidsFrom(world.getBlockState(first), first) != FluidBlockType.SOURCE) {
queue.dequeue();
continue;
}
break;
}
BlockPos firstValid = queue.first().pos;
frontier.clear();
visited.clear();
queue.clear();
queue.enqueue(new BlockPosEntry(firstValid, 0));
tileEntity.sendData();
Debug.debugChat("<!> Build complete - infinite");
return;
}
if (!frontier.isEmpty())
return;
Debug.debugChat("<!> Build complete - queue size " + queue.size());
tileEntity.sendData();
visited.clear();
}
private void continueValidation() {
search(fluid, validationFrontier, validationVisited, (e, d) -> newValidationSet.add(e), false);
Debug.debugChat("<...> Validating - set size " + newValidationSet.size());
int maxBlocks = maxBlocks();
if (validationVisited.size() > maxBlocks) {
if (!infinite) {
Debug.debugChat("<!> Validation complete - now infinite");
reset();
}
Debug.debugChat("Validation complete - still infinite");
validationFrontier.clear();
setLongValidationTimer();
return;
}
if (!validationFrontier.isEmpty())
return;
if (infinite) {
Debug.debugChat("<!> Validation complete - no longer infinite");
reset();
return;
}
Debug.debugChat("Validation complete - set size " + newValidationSet.size());
validationSet = newValidationSet;
newValidationSet = new HashSet<>();
validationVisited.clear();
}
@Override
public void reset() {
Debug.debugChat("<!> RESET");
super.reset();
fluid = null;
rootPos = null;
queue.clear();
validationSet.clear();
newValidationSet.clear();
validationFrontier.clear();
validationVisited.clear();
}
public static BehaviourType<FluidDrainingBehaviour> TYPE = new BehaviourType<>();
@Override
public BehaviourType<?> getType() {
return TYPE;
}
protected boolean isSearching() {
return !frontier.isEmpty();
}
public FluidStack getDrainableFluid(BlockPos rootPos) {
return fluid == null || isSearching() || !pullNext(rootPos, true) ? FluidStack.EMPTY
: new FluidStack(fluid, 1000);
}
}

View file

@ -0,0 +1,265 @@
package com.simibubi.create.content.contraptions.fluids.actors;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Objects;
import java.util.Set;
import com.simibubi.create.foundation.tileEntity.SmartTileEntity;
import com.simibubi.create.foundation.tileEntity.behaviour.BehaviourType;
import com.simibubi.create.foundation.utility.Debug;
import com.simibubi.create.foundation.utility.Iterate;
import it.unimi.dsi.fastutil.PriorityQueue;
import it.unimi.dsi.fastutil.objects.ObjectHeapPriorityQueue;
import net.minecraft.block.BlockState;
import net.minecraft.block.FlowingFluidBlock;
import net.minecraft.fluid.Fluid;
import net.minecraft.fluid.Fluids;
import net.minecraft.fluid.IFluidState;
import net.minecraft.state.properties.BlockStateProperties;
import net.minecraft.util.Direction;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MutableBoundingBox;
import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.world.ITickList;
import net.minecraft.world.NextTickListEntry;
import net.minecraft.world.World;
import net.minecraft.world.server.ServerTickList;
public class FluidFillingBehaviour extends FluidManipulationBehaviour {
PriorityQueue<BlockPosEntry> queue;
List<BlockPosEntry> infinityCheckFrontier;
Set<BlockPos> infinityCheckVisited;
public FluidFillingBehaviour(SmartTileEntity te) {
super(te);
queue = new ObjectHeapPriorityQueue<>((p, p2) -> -comparePositions(p, p2));
revalidateIn = 1;
infinityCheckFrontier = new ArrayList<>();
infinityCheckVisited = new HashSet<>();
}
@Override
public void tick() {
super.tick();
if (!infinityCheckFrontier.isEmpty() && rootPos != null) {
Fluid fluid = getWorld().getFluidState(rootPos)
.getFluid();
if (fluid != Fluids.EMPTY)
continueValidation(fluid);
}
if (revalidateIn > 0)
revalidateIn--;
}
protected void continueValidation(Fluid fluid) {
search(fluid, infinityCheckFrontier, infinityCheckVisited,
(p, d) -> infinityCheckFrontier.add(new BlockPosEntry(p, d)), true);
int maxBlocks = maxBlocks();
if (infinityCheckVisited.size() > maxBlocks) {
if (!infinite) {
Debug.debugChat("<!> Filler Validation complete - now infinite");
reset();
infinite = true;
}
Debug.debugChat("Filler Validation complete - still infinite");
infinityCheckFrontier.clear();
setLongValidationTimer();
return;
}
if (!infinityCheckFrontier.isEmpty())
return;
if (infinite) {
Debug.debugChat("<!> Filler Validation complete - no longer infinite");
reset();
return;
}
infinityCheckVisited.clear();
}
public boolean tryDeposit(Fluid fluid, BlockPos root, boolean simulate) {
if (!Objects.equals(root, rootPos)) {
reset();
rootPos = root;
queue.enqueue(new BlockPosEntry(root, 0));
affectedArea = new MutableBoundingBox(rootPos, rootPos);
return false;
}
if (counterpartActed) {
Debug.debugChat("<!> Counterpart acted");
counterpartActed = false;
softReset(root);
return false;
}
if (affectedArea == null)
affectedArea = new MutableBoundingBox(root, root);
if (revalidateIn == 0) {
visited.clear();
infinityCheckFrontier.clear();
infinityCheckVisited.clear();
infinityCheckFrontier.add(new BlockPosEntry(root, 0));
setValidationTimer();
softReset(root);
}
World world = getWorld();
int maxRange = maxRange();
int maxRangeSq = maxRange * maxRange;
int maxBlocks = maxBlocks();
if (infinite) {
IFluidState fluidState = world.getFluidState(rootPos);
boolean equivalentTo = fluidState.getFluid()
.isEquivalentTo(fluid);
if (!equivalentTo)
return false;
if (simulate)
return true;
playEffect(world, BlockPos.ZERO, fluid, false);
return true;
}
boolean success = false;
for (int i = 0; !success && !queue.isEmpty() && i < searchedPerTick; i++) {
BlockPosEntry entry = queue.first();
BlockPos currentPos = entry.pos;
if (visited.contains(currentPos)) {
queue.dequeue();
continue;
}
if (!simulate)
visited.add(currentPos);
if (visited.size() >= maxBlocks) {
Debug.debugChat("<F> Search exceeded - now infinite");
infinite = true;
visited.clear();
queue.clear();
return false;
}
SpaceType spaceType = getAtPos(world, currentPos, fluid);
if (spaceType == SpaceType.BLOCKING)
continue;
if (spaceType == SpaceType.FILLABLE) {
success = true;
if (!simulate) {
playEffect(world, currentPos, fluid, false);
BlockState blockState = world.getBlockState(currentPos);
if (blockState.has(BlockStateProperties.WATERLOGGED) && fluid.isEquivalentTo(Fluids.WATER)) {
world.setBlockState(currentPos, blockState.with(BlockStateProperties.WATERLOGGED, true),
2 | 16);
} else {
world.setBlockState(currentPos, fluid.getDefaultState()
.getBlockState(), 2 | 16);
}
ITickList<Fluid> pendingFluidTicks = world.getPendingFluidTicks();
if (pendingFluidTicks instanceof ServerTickList) {
ServerTickList<Fluid> serverTickList = (ServerTickList<Fluid>) pendingFluidTicks;
NextTickListEntry<Fluid> removedEntry = null;
for (NextTickListEntry<Fluid> nextTickListEntry : serverTickList.pendingTickListEntriesHashSet) {
if (nextTickListEntry.position.equals(currentPos)) {
removedEntry = nextTickListEntry;
break;
}
}
if (removedEntry != null) {
serverTickList.pendingTickListEntriesHashSet.remove(removedEntry);
serverTickList.pendingTickListEntriesTreeSet.remove(removedEntry);
}
}
affectedArea.expandTo(new MutableBoundingBox(currentPos, currentPos));
}
}
if (simulate && success)
return true;
visited.add(currentPos);
queue.dequeue();
for (Direction side : Iterate.directions) {
if (side == Direction.UP)
continue;
BlockPos offsetPos = currentPos.offset(side);
if (visited.contains(offsetPos))
continue;
if (offsetPos.distanceSq(rootPos) > maxRangeSq)
continue;
SpaceType nextSpaceType = getAtPos(world, offsetPos, fluid);
if (nextSpaceType != SpaceType.BLOCKING)
queue.enqueue(new BlockPosEntry(offsetPos, entry.distance + 1));
}
}
return success;
}
protected void softReset(BlockPos root) {
visited.clear();
queue.clear();
queue.enqueue(new BlockPosEntry(root, 0));
infinite = false;
setValidationTimer();
}
enum SpaceType {
FILLABLE, FILLED, BLOCKING
}
protected SpaceType getAtPos(World world, BlockPos pos, Fluid toFill) {
BlockState blockState = world.getBlockState(pos);
IFluidState fluidState = blockState.getFluidState();
if (blockState.has(BlockStateProperties.WATERLOGGED))
return toFill.isEquivalentTo(Fluids.WATER)
? blockState.get(BlockStateProperties.WATERLOGGED) ? SpaceType.FILLED : SpaceType.FILLABLE
: SpaceType.BLOCKING;
if (blockState.getBlock() instanceof FlowingFluidBlock)
return blockState.get(FlowingFluidBlock.LEVEL) == 0
? toFill.isEquivalentTo(fluidState.getFluid()) ? SpaceType.FILLED : SpaceType.BLOCKING
: SpaceType.FILLABLE;
if (fluidState.getFluid() != Fluids.EMPTY
&& blockState.getCollisionShape(getWorld(), pos, ISelectionContext.dummy())
.isEmpty())
return toFill.isEquivalentTo(fluidState.getFluid()) ? SpaceType.FILLED : SpaceType.BLOCKING;
return blockState.getMaterial()
.isReplaceable() ? SpaceType.FILLABLE : SpaceType.BLOCKING;
}
@Override
public void reset() {
super.reset();
queue.clear();
infinityCheckFrontier.clear();
infinityCheckVisited.clear();
}
public static BehaviourType<FluidFillingBehaviour> TYPE = new BehaviourType<>();
@Override
public BehaviourType<?> getType() {
return TYPE;
}
}

View file

@ -0,0 +1,222 @@
package com.simibubi.create.content.contraptions.fluids.actors;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.function.BiConsumer;
import com.simibubi.create.foundation.fluid.FluidHelper;
import com.simibubi.create.foundation.networking.AllPackets;
import com.simibubi.create.foundation.tileEntity.SmartTileEntity;
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
import com.simibubi.create.foundation.utility.Iterate;
import com.simibubi.create.foundation.utility.VecHelper;
import net.minecraft.fluid.Fluid;
import net.minecraft.fluid.IFluidState;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.NBTUtil;
import net.minecraft.tags.FluidTags;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction.Axis;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.SoundEvent;
import net.minecraft.util.SoundEvents;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MutableBoundingBox;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.World;
import net.minecraft.world.server.ServerWorld;
import net.minecraftforge.fluids.FluidStack;
public abstract class FluidManipulationBehaviour extends TileEntityBehaviour {
protected static class BlockPosEntry {
public BlockPos pos;
public int distance;
public BlockPosEntry(BlockPos pos, int distance) {
this.pos = pos;
this.distance = distance;
}
}
MutableBoundingBox affectedArea;
BlockPos rootPos;
boolean infinite;
protected boolean counterpartActed;
// Search
static final int searchedPerTick = 256;
List<BlockPosEntry> frontier;
Set<BlockPos> visited;
static final int validationTimer = 160;
int revalidateIn;
public FluidManipulationBehaviour(SmartTileEntity te) {
super(te);
setValidationTimer();
infinite = false;
visited = new HashSet<>();
frontier = new ArrayList<>();
}
public void counterpartActed() {
counterpartActed = true;
}
protected int setValidationTimer() {
return revalidateIn = validationTimer;
}
protected int setLongValidationTimer() {
return revalidateIn = validationTimer * 2;
}
protected int maxRange() {
return 128;
}
protected int maxBlocks() {
return 10000;
}
public void reset() {
if (affectedArea != null)
scheduleUpdatesInAffectedArea();
affectedArea = null;
setValidationTimer();
frontier.clear();
visited.clear();
infinite = false;
}
@Override
public void destroy() {
reset();
super.destroy();
}
protected void scheduleUpdatesInAffectedArea() {
World world = getWorld();
affectedArea = new MutableBoundingBox(affectedArea.minX - 1, affectedArea.minY - 1, affectedArea.minZ - 1,
affectedArea.maxX + 1, affectedArea.maxY + 1, affectedArea.maxZ + 1);
BlockPos.func_229383_a_(affectedArea)
.forEach(pos -> {
IFluidState nextFluidState = world.getFluidState(pos);
if (nextFluidState.isEmpty())
return;
world.getPendingFluidTicks()
.scheduleTick(pos, nextFluidState.getFluid(), world.getRandom()
.nextInt(5));
});
}
protected int comparePositions(BlockPosEntry e1, BlockPosEntry e2) {
Vec3d centerOfRoot = VecHelper.getCenterOf(rootPos);
BlockPos pos2 = e2.pos;
BlockPos pos1 = e1.pos;
if (pos1.getY() != pos2.getY())
return Integer.compare(pos2.getY(), pos1.getY());
int compareDistance = Integer.compare(e2.distance, e1.distance);
if (compareDistance != 0)
return compareDistance;
return Double.compare(VecHelper.getCenterOf(pos2)
.squareDistanceTo(centerOfRoot),
VecHelper.getCenterOf(pos1)
.squareDistanceTo(centerOfRoot));
}
protected void search(Fluid fluid, List<BlockPosEntry> frontier, Set<BlockPos> visited,
BiConsumer<BlockPos, Integer> add, boolean searchDownward) {
World world = getWorld();
int maxBlocks = maxBlocks();
int maxRange = maxRange();
int maxRangeSq = maxRange * maxRange;
int i;
for (i = 0; i < searchedPerTick && !frontier.isEmpty() && visited.size() <= maxBlocks; i++) {
BlockPosEntry entry = frontier.remove(0);
BlockPos currentPos = entry.pos;
if (visited.contains(currentPos))
continue;
visited.add(currentPos);
IFluidState fluidState = world.getFluidState(currentPos);
if (fluidState.isEmpty())
continue;
Fluid currentFluid = FluidHelper.convertToStill(fluidState.getFluid());
if (fluid == null)
fluid = currentFluid;
if (!currentFluid.isEquivalentTo(fluid))
continue;
add.accept(currentPos, entry.distance);
for (Direction side : Iterate.directions) {
if (!searchDownward && side == Direction.DOWN)
continue;
BlockPos offsetPos = currentPos.offset(side);
if (visited.contains(offsetPos))
continue;
if (offsetPos.distanceSq(rootPos) > maxRangeSq)
continue;
IFluidState nextFluidState = world.getFluidState(offsetPos);
if (nextFluidState.isEmpty())
continue;
Fluid nextFluid = nextFluidState.getFluid();
if (nextFluid == FluidHelper.convertToFlowing(nextFluid) && side == Direction.UP
&& !VecHelper.onSameAxis(rootPos, offsetPos, Axis.Y))
continue;
frontier.add(new BlockPosEntry(offsetPos, entry.distance + 1));
}
}
}
protected void playEffect(World world, BlockPos pos, Fluid fluid, boolean fillSound) {
BlockPos splooshPos = infinite ? tileEntity.getPos() : pos;
SoundEvent soundevent = fillSound ? fluid.getAttributes()
.getFillSound()
: fluid.getAttributes()
.getEmptySound();
if (soundevent == null)
soundevent = fluid.isIn(FluidTags.LAVA)
? fillSound ? SoundEvents.ITEM_BUCKET_FILL_LAVA : SoundEvents.ITEM_BUCKET_EMPTY_LAVA
: fillSound ? SoundEvents.ITEM_BUCKET_FILL : SoundEvents.ITEM_BUCKET_EMPTY;
world.playSound(null, splooshPos, soundevent, SoundCategory.BLOCKS, 0.3F, 1.0F);
if (world instanceof ServerWorld)
AllPackets.sendToNear(world, splooshPos, 10, new FluidSplashPacket(splooshPos, new FluidStack(fluid, 1)));
}
@Override
public void write(CompoundNBT nbt, boolean clientPacket) {
if (rootPos != null)
nbt.put("LastPos", NBTUtil.writeBlockPos(rootPos));
if (affectedArea != null) {
nbt.put("AffectedAreaFrom",
NBTUtil.writeBlockPos(new BlockPos(affectedArea.minX, affectedArea.minY, affectedArea.minZ)));
nbt.put("AffectedAreaTo",
NBTUtil.writeBlockPos(new BlockPos(affectedArea.maxX, affectedArea.maxY, affectedArea.maxZ)));
}
super.write(nbt, clientPacket);
}
@Override
public void read(CompoundNBT nbt, boolean clientPacket) {
if (nbt.contains("LastPos"))
rootPos = NBTUtil.readBlockPos(nbt.getCompound("LastPos"));
if (nbt.contains("AffectedAreaFrom") && nbt.contains("AffectedAreaTo"))
affectedArea = new MutableBoundingBox(NBTUtil.readBlockPos(nbt.getCompound("AffectedAreaFrom")),
NBTUtil.readBlockPos(nbt.getCompound("AffectedAreaTo")));
super.read(nbt, clientPacket);
}
}

View file

@ -0,0 +1,49 @@
package com.simibubi.create.content.contraptions.fluids.actors;
import java.util.function.Supplier;
import com.simibubi.create.content.contraptions.fluids.FluidFX;
import com.simibubi.create.foundation.networking.SimplePacketBase;
import net.minecraft.client.Minecraft;
import net.minecraft.network.PacketBuffer;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fml.DistExecutor;
import net.minecraftforge.fml.network.NetworkEvent.Context;
public class FluidSplashPacket extends SimplePacketBase {
private BlockPos pos;
private FluidStack fluid;
public FluidSplashPacket(BlockPos pos, FluidStack fluid) {
this.pos = pos;
this.fluid = fluid;
}
public FluidSplashPacket(PacketBuffer buffer) {
pos = buffer.readBlockPos();
fluid = buffer.readFluidStack();
}
public void write(PacketBuffer buffer) {
buffer.writeBlockPos(pos);
buffer.writeFluidStack(fluid);
}
public void handle(Supplier<Context> ctx) {
ctx.get()
.enqueueWork(() -> DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> {
if (Minecraft.getInstance().player.getPositionVector()
.distanceTo(new Vec3d(pos)) > 100)
return;
FluidFX.splash(pos, fluid);
}));
ctx.get()
.setPacketHandled(true);
}
}

View file

@ -0,0 +1,107 @@
package com.simibubi.create.content.contraptions.fluids.actors;
import com.simibubi.create.AllShapes;
import com.simibubi.create.AllTileEntities;
import com.simibubi.create.content.contraptions.base.HorizontalKineticBlock;
import com.simibubi.create.content.contraptions.fluids.pipes.FluidPipeBlock;
import com.simibubi.create.foundation.block.ITE;
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
import com.simibubi.create.foundation.utility.Iterate;
import net.minecraft.block.BlockState;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction.Axis;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.IWorldReader;
import net.minecraft.world.World;
public class HosePulleyBlock extends HorizontalKineticBlock implements ITE<HosePulleyTileEntity> {
public HosePulleyBlock(Properties properties) {
super(properties);
}
@Override
public Axis getRotationAxis(BlockState state) {
return state.get(HORIZONTAL_FACING)
.rotateY()
.getAxis();
}
@Override
public BlockState getStateForPlacement(BlockItemUseContext context) {
Direction preferredHorizontalFacing = getPreferredHorizontalFacing(context);
return this.getDefaultState()
.with(HORIZONTAL_FACING,
preferredHorizontalFacing != null ? preferredHorizontalFacing.rotateYCCW()
: context.getPlacementHorizontalFacing()
.getOpposite());
}
@Override
public boolean hasShaftTowards(IWorldReader world, BlockPos pos, BlockState state, Direction face) {
return state.get(HORIZONTAL_FACING)
.rotateY() == face;
}
public static boolean hasPipeTowards(IWorldReader world, BlockPos pos, BlockState state, Direction face) {
return state.get(HORIZONTAL_FACING)
.rotateYCCW() == face;
}
@Override
public TileEntity createTileEntity(BlockState state, IBlockReader world) {
return AllTileEntities.HOSE_PULLEY.create();
}
@Override
public Direction getPreferredHorizontalFacing(BlockItemUseContext context) {
Direction fromParent = super.getPreferredHorizontalFacing(context);
if (fromParent != null)
return fromParent;
Direction prefferedSide = null;
for (Direction facing : Iterate.horizontalDirections) {
BlockPos pos = context.getPos()
.offset(facing);
BlockState blockState = context.getWorld()
.getBlockState(pos);
if (FluidPipeBlock.canConnectTo(context.getWorld(), pos, blockState, facing))
if (prefferedSide != null && prefferedSide.getAxis() != facing.getAxis()) {
prefferedSide = null;
break;
} else
prefferedSide = facing;
}
return prefferedSide == null ? null : prefferedSide.getOpposite();
}
@Override
public void onReplaced(BlockState p_196243_1_, World world, BlockPos pos, BlockState p_196243_4_,
boolean p_196243_5_) {
if (p_196243_1_.hasTileEntity()
&& (p_196243_1_.getBlock() != p_196243_4_.getBlock() || !p_196243_4_.hasTileEntity())) {
TileEntityBehaviour.destroy(world, pos, FluidDrainingBehaviour.TYPE);
TileEntityBehaviour.destroy(world, pos, FluidFillingBehaviour.TYPE);
world.removeTileEntity(pos);
}
}
@Override
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
return AllShapes.PULLEY.get(state.get(HORIZONTAL_FACING)
.rotateY()
.getAxis());
}
@Override
public Class<HosePulleyTileEntity> getTileEntityClass() {
return HosePulleyTileEntity.class;
}
}

View file

@ -0,0 +1,123 @@
package com.simibubi.create.content.contraptions.fluids.actors;
import java.util.function.Supplier;
import javax.annotation.Nullable;
import com.simibubi.create.foundation.fluid.SmartFluidTank;
import net.minecraft.util.math.BlockPos;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.capability.IFluidHandler;
public class HosePulleyFluidHandler implements IFluidHandler {
// The dynamic interface
@Override
public int fill(FluidStack resource, FluidAction action) {
if (!internalTank.isEmpty() && !resource.isFluidEqual(internalTank.getFluid()))
return 0;
int diff = resource.getAmount();
int totalAmountAfterFill = diff + internalTank.getFluidAmount();
FluidStack remaining = resource.copy();
if (predicate.get() && totalAmountAfterFill >= 1000) {
if (filler.tryDeposit(resource.getFluid(), rootPosGetter.get(), action.simulate())) {
drainer.counterpartActed();
remaining.shrink(1000);
diff -= 1000;
}
}
if (action.simulate())
return diff <= 0 ? resource.getAmount() : internalTank.fill(remaining, action);
if (diff <= 0) {
internalTank.drain(-diff, FluidAction.EXECUTE);
return resource.getAmount();
}
return internalTank.fill(remaining, action);
}
@Override
public FluidStack getFluidInTank(int tank) {
if (internalTank.isEmpty())
return drainer.getDrainableFluid(rootPosGetter.get());
return internalTank.getFluidInTank(tank);
}
@Override
public FluidStack drain(FluidStack resource, FluidAction action) {
return drainInternal(resource.getAmount(), resource, action);
}
@Override
public FluidStack drain(int maxDrain, FluidAction action) {
return drainInternal(maxDrain, null, action);
}
private FluidStack drainInternal(int maxDrain, @Nullable FluidStack resource, FluidAction action) {
if (resource != null && !internalTank.isEmpty() && !resource.isFluidEqual(internalTank.getFluid()))
return FluidStack.EMPTY;
if (internalTank.getFluidAmount() >= 1000)
return internalTank.drain(maxDrain, action);
BlockPos pos = rootPosGetter.get();
FluidStack returned = drainer.getDrainableFluid(pos);
if (!predicate.get() || !drainer.pullNext(pos, action.simulate()))
return internalTank.drain(maxDrain, action);
filler.counterpartActed();
FluidStack leftover = returned.copy();
int available = 1000 + internalTank.getFluidAmount();
int drained;
if (!internalTank.isEmpty() && !internalTank.getFluid()
.isFluidEqual(returned) || returned.isEmpty())
return internalTank.drain(maxDrain, action);
if (resource != null && !returned.isFluidEqual(resource))
return FluidStack.EMPTY;
drained = Math.min(maxDrain, available);
returned.setAmount(drained);
leftover.setAmount(available - drained);
if (action.execute() && !leftover.isEmpty())
internalTank.setFluid(leftover);
return returned;
}
//
private SmartFluidTank internalTank;
private FluidFillingBehaviour filler;
private FluidDrainingBehaviour drainer;
private Supplier<BlockPos> rootPosGetter;
private Supplier<Boolean> predicate;
public HosePulleyFluidHandler(SmartFluidTank internalTank, FluidFillingBehaviour filler,
FluidDrainingBehaviour drainer, Supplier<BlockPos> rootPosGetter, Supplier<Boolean> predicate) {
this.internalTank = internalTank;
this.filler = filler;
this.drainer = drainer;
this.rootPosGetter = rootPosGetter;
this.predicate = predicate;
}
@Override
public int getTanks() {
return internalTank.getTanks();
}
@Override
public int getTankCapacity(int tank) {
return internalTank.getTankCapacity(tank);
}
@Override
public boolean isFluidValid(int tank, FluidStack stack) {
return internalTank.isFluidValid(tank, stack);
}
}

View file

@ -0,0 +1,70 @@
package com.simibubi.create.content.contraptions.fluids.actors;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.contraptions.base.IRotate;
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
import com.simibubi.create.content.contraptions.components.structureMovement.pulley.PulleyRenderer;
import com.simibubi.create.foundation.utility.AngleHelper;
import com.simibubi.create.foundation.utility.SuperByteBuffer;
import net.minecraft.block.BlockState;
import net.minecraft.client.renderer.IRenderTypeBuffer;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
import net.minecraft.util.Direction.Axis;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
public class HosePulleyRenderer extends KineticTileEntityRenderer {
public HosePulleyRenderer(TileEntityRendererDispatcher dispatcher) {
super(dispatcher);
}
@Override
public boolean isGlobalRenderer(KineticTileEntity p_188185_1_) {
return true;
}
@Override
protected void renderSafe(KineticTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer,
int light, int overlay) {
super.renderSafe(te, partialTicks, ms, buffer, light, overlay);
HosePulleyTileEntity pulley = (HosePulleyTileEntity) te;
float offset = pulley.getInterpolatedOffset(partialTicks);
Axis rotationAxis = ((IRotate) te.getBlockState()
.getBlock()).getRotationAxis(te.getBlockState());
kineticRotationTransform(getRotatedCoil(te), te, rotationAxis, AngleHelper.rad(offset * 180), light).renderInto(ms,
buffer.getBuffer(RenderType.getSolid()));
World world = te.getWorld();
BlockState blockState = te.getBlockState();
BlockPos pos = te.getPos();
SuperByteBuffer halfMagnet = AllBlockPartials.HOSE_HALF_MAGNET.renderOn(blockState);
SuperByteBuffer halfRope = AllBlockPartials.HOSE_HALF.renderOn(blockState);
SuperByteBuffer magnet = AllBlockPartials.HOSE_MAGNET.renderOn(blockState);
SuperByteBuffer rope = AllBlockPartials.HOSE.renderOn(blockState);
PulleyRenderer.renderPulleyRope(ms, buffer, world, pos, halfMagnet, halfRope, magnet, rope, true, offset);
}
@Override
protected BlockState getRenderedBlockState(KineticTileEntity te) {
return shaft(te.getBlockState()
.get(HosePulleyBlock.HORIZONTAL_FACING)
.rotateY()
.getAxis());
}
protected SuperByteBuffer getRotatedCoil(KineticTileEntity te) {
BlockState blockState = te.getBlockState();
return AllBlockPartials.HOSE_COIL.renderOnDirectionalSouth(blockState,
blockState.get(HosePulleyBlock.HORIZONTAL_FACING)
.rotateY());
}
}

View file

@ -0,0 +1,171 @@
package com.simibubi.create.content.contraptions.fluids.actors;
import java.util.List;
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
import com.simibubi.create.foundation.fluid.SmartFluidTank;
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
import com.simibubi.create.foundation.utility.LerpedFloat;
import com.simibubi.create.foundation.utility.ServerSpeedProvider;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.tileentity.TileEntityType;
import net.minecraft.util.Direction;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.util.LazyOptional;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.capability.IFluidHandler;
public class HosePulleyTileEntity extends KineticTileEntity {
LerpedFloat offset;
boolean isMoving;
private SmartFluidTank internalTank;
private LazyOptional<IFluidHandler> capability;
private FluidDrainingBehaviour drainer;
private FluidFillingBehaviour filler;
public HosePulleyTileEntity(TileEntityType<?> typeIn) {
super(typeIn);
offset = LerpedFloat.linear()
.startWithValue(0);
isMoving = true;
internalTank = new SmartFluidTank(1500, this::onTankContentsChanged);
IFluidHandler handler = new HosePulleyFluidHandler(internalTank, filler, drainer,
() -> pos.down((int) Math.ceil(offset.getValue())), () -> !this.isMoving);
capability = LazyOptional.of(() -> handler);
}
@Override
public void addBehaviours(List<TileEntityBehaviour> behaviours) {
drainer = new FluidDrainingBehaviour(this);
filler = new FluidFillingBehaviour(this);
behaviours.add(drainer);
behaviours.add(filler);
super.addBehaviours(behaviours);
}
protected void onTankContentsChanged(FluidStack contents) {}
@Override
public void onSpeedChanged(float previousSpeed) {
isMoving = true;
if (getSpeed() == 0) {
offset.forceNextSync();
offset.setValue(Math.round(offset.getValue()));
isMoving = false;
}
if (isMoving) {
float newOffset = offset.getValue() + getMovementSpeed();
if (newOffset < 0)
isMoving = false;
if (!world.getBlockState(pos.down((int) Math.ceil(newOffset)))
.getMaterial()
.isReplaceable()) {
isMoving = false;
}
if (isMoving) {
drainer.reset();
filler.reset();
}
}
super.onSpeedChanged(previousSpeed);
}
@Override
@OnlyIn(Dist.CLIENT)
public AxisAlignedBB getRenderBoundingBox() {
return super.getRenderBoundingBox().expand(0, -offset.getValue(), 0);
}
@Override
@OnlyIn(Dist.CLIENT)
public double getMaxRenderDistanceSquared() {
return super.getMaxRenderDistanceSquared() + offset.getValue() * offset.getValue();
}
@Override
public void tick() {
super.tick();
float newOffset = offset.getValue() + getMovementSpeed();
if (newOffset < 0) {
newOffset = 0;
isMoving = false;
}
if (!world.getBlockState(pos.down((int) Math.ceil(newOffset)))
.getMaterial()
.isReplaceable()) {
newOffset = (int) newOffset;
isMoving = false;
}
if (getSpeed() == 0)
isMoving = false;
offset.setValue(newOffset);
}
@Override
public void lazyTick() {
super.lazyTick();
if (world.isRemote)
return;
if (isMoving)
return;
int ceil = (int) Math.ceil(offset.getValue() + getMovementSpeed());
if (getMovementSpeed() > 0 && world.getBlockState(pos.down(ceil))
.getMaterial()
.isReplaceable()) {
isMoving = true;
drainer.reset();
filler.reset();
return;
}
}
@Override
protected void write(CompoundNBT compound, boolean clientPacket) {
compound.put("Offset", offset.writeNBT());
compound.put("Tank", internalTank.writeToNBT(new CompoundNBT()));
super.write(compound, clientPacket);
}
@Override
protected void read(CompoundNBT compound, boolean clientPacket) {
offset.readNBT(compound.getCompound("Offset"), clientPacket);
internalTank.readFromNBT(compound.getCompound("Tank"));
super.read(compound, clientPacket);
}
@Override
public void remove() {
super.remove();
capability.invalidate();
}
public float getMovementSpeed() {
float movementSpeed = getSpeed() / 512f;
if (world.isRemote)
movementSpeed *= ServerSpeedProvider.get();
return movementSpeed;
}
public float getInterpolatedOffset(float pt) {
return offset.getValue(pt);
}
@Override
public <T> LazyOptional<T> getCapability(Capability<T> cap, Direction side) {
if (isFluidHandlerCap(cap)
&& (side == null || HosePulleyBlock.hasPipeTowards(world, pos, getBlockState(), side)))
return this.capability.cast();
return super.getCapability(cap, side);
}
}

View file

@ -0,0 +1,31 @@
package com.simibubi.create.content.contraptions.fluids.actors;
import com.simibubi.create.AllShapes;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.item.ItemGroup;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Direction;
import net.minecraft.util.NonNullList;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.world.IBlockReader;
public class ItemDrainBlock extends Block {
public ItemDrainBlock(Properties p_i48440_1_) {
super(p_i48440_1_);
}
@Override
public VoxelShape getShape(BlockState p_220053_1_, IBlockReader p_220053_2_, BlockPos p_220053_3_,
ISelectionContext p_220053_4_) {
return AllShapes.CASING_13PX.get(Direction.UP);
}
@Override
public void fillItemGroup(ItemGroup p_149666_1_, NonNullList<ItemStack> p_149666_2_) {}
}

View file

@ -0,0 +1,56 @@
package com.simibubi.create.content.contraptions.fluids.tank;
import java.util.function.Consumer;
import com.simibubi.create.foundation.fluid.SmartFluidTank;
import net.minecraft.tileentity.TileEntityType;
import net.minecraftforge.fluids.FluidStack;
public class CreativeFluidTankTileEntity extends FluidTankTileEntity {
public CreativeFluidTankTileEntity(TileEntityType<?> tileEntityTypeIn) {
super(tileEntityTypeIn);
}
@Override
protected SmartFluidTank createInventory() {
return new CreativeSmartFluidTank(getCapacityMultiplier(), this::onFluidStackChanged);
}
class CreativeSmartFluidTank extends SmartFluidTank {
public CreativeSmartFluidTank(int capacity, Consumer<FluidStack> updateCallback) {
super(capacity, updateCallback);
}
@Override
public int getFluidAmount() {
return getFluid().isEmpty() ? 0 : getTankCapacity(0);
}
public void setContainedFluid(FluidStack fluidStack) {
fluid = fluidStack.copy();
if (!fluidStack.isEmpty())
fluid.setAmount(getTankCapacity(0));
notifyUpdate();
}
@Override
public int fill(FluidStack resource, FluidAction action) {
return resource.getAmount();
}
@Override
public FluidStack drain(FluidStack resource, FluidAction action) {
return super.drain(resource, FluidAction.SIMULATE);
}
@Override
public FluidStack drain(int maxDrain, FluidAction action) {
return super.drain(maxDrain, FluidAction.SIMULATE);
}
}
}

View file

@ -1,6 +1,9 @@
package com.simibubi.create.content.contraptions.fluids.tank; package com.simibubi.create.content.contraptions.fluids.tank;
import com.simibubi.create.AllTileEntities; import com.simibubi.create.AllTileEntities;
import com.simibubi.create.content.contraptions.fluids.actors.GenericItemFilling;
import com.simibubi.create.content.contraptions.fluids.tank.CreativeFluidTankTileEntity.CreativeSmartFluidTank;
import com.simibubi.create.content.contraptions.processing.EmptyingByBasin;
import com.simibubi.create.content.contraptions.wrench.IWrenchable; import com.simibubi.create.content.contraptions.wrench.IWrenchable;
import com.simibubi.create.foundation.block.ITE; import com.simibubi.create.foundation.block.ITE;
import com.simibubi.create.foundation.fluid.FluidHelper; import com.simibubi.create.foundation.fluid.FluidHelper;
@ -38,9 +41,7 @@ import net.minecraft.world.World;
import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.common.util.LazyOptional;
import net.minecraftforge.fluids.FluidAttributes; import net.minecraftforge.fluids.FluidAttributes;
import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
import net.minecraftforge.fluids.capability.IFluidHandler; import net.minecraftforge.fluids.capability.IFluidHandler;
import net.minecraftforge.fluids.capability.IFluidHandlerItem;
public class FluidTankBlock extends Block implements IWrenchable, ITE<FluidTankTileEntity> { public class FluidTankBlock extends Block implements IWrenchable, ITE<FluidTankTileEntity> {
@ -48,8 +49,19 @@ public class FluidTankBlock extends Block implements IWrenchable, ITE<FluidTankT
public static final BooleanProperty BOTTOM = BooleanProperty.create("bottom"); public static final BooleanProperty BOTTOM = BooleanProperty.create("bottom");
public static final EnumProperty<Shape> SHAPE = EnumProperty.create("shape", Shape.class); public static final EnumProperty<Shape> SHAPE = EnumProperty.create("shape", Shape.class);
public FluidTankBlock(Properties p_i48440_1_) { private boolean creative;
public static FluidTankBlock regular(Properties p_i48440_1_) {
return new FluidTankBlock(p_i48440_1_, false);
}
public static FluidTankBlock creative(Properties p_i48440_1_) {
return new FluidTankBlock(p_i48440_1_, true);
}
protected FluidTankBlock(Properties p_i48440_1_, boolean creative) {
super(p_i48440_1_); super(p_i48440_1_);
this.creative = creative;
setDefaultState(getDefaultState().with(TOP, true) setDefaultState(getDefaultState().with(TOP, true)
.with(BOTTOM, true) .with(BOTTOM, true)
.with(SHAPE, Shape.WINDOW)); .with(SHAPE, Shape.WINDOW));
@ -73,7 +85,7 @@ public class FluidTankBlock extends Block implements IWrenchable, ITE<FluidTankT
@Override @Override
public int getLightValue(BlockState state, IBlockReader world, BlockPos pos) { public int getLightValue(BlockState state, IBlockReader world, BlockPos pos) {
FluidTankTileEntity tankAt = FluidTankConnectivityHandler.tankAt(world, pos); FluidTankTileEntity tankAt = FluidTankConnectivityHandler.anyTankAt(world, pos);
if (tankAt == null) if (tankAt == null)
return 0; return 0;
FluidTankTileEntity controllerTE = tankAt.getControllerTE(); FluidTankTileEntity controllerTE = tankAt.getControllerTE();
@ -92,45 +104,49 @@ public class FluidTankBlock extends Block implements IWrenchable, ITE<FluidTankT
public ActionResultType onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, public ActionResultType onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand,
BlockRayTraceResult ray) { BlockRayTraceResult ray) {
ItemStack heldItem = player.getHeldItem(hand); ItemStack heldItem = player.getHeldItem(hand);
ItemStack copy = heldItem.copy();
copy.setCount(1);
LazyOptional<IFluidHandlerItem> capability =
copy.getCapability(CapabilityFluidHandler.FLUID_HANDLER_ITEM_CAPABILITY);
if (!capability.isPresent())
return ActionResultType.PASS;
if (!player.isCreative())
return ActionResultType.FAIL;
TileEntity te = world.getTileEntity(pos);
LazyOptional<IFluidHandler> tankCapability =
te.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, ray.getFace());
if (!tankCapability.isPresent())
return ActionResultType.PASS;
boolean onClient = world.isRemote; boolean onClient = world.isRemote;
IFluidHandlerItem fluidItem = capability.orElse(null); if (heldItem.isEmpty())
return ActionResultType.PASS;
if (!player.isCreative())
return ActionResultType.PASS;
FluidExchange exchange = null;
FluidTankTileEntity te = FluidTankConnectivityHandler.anyTankAt(world, pos);
if (te == null)
return ActionResultType.FAIL;
LazyOptional<IFluidHandler> tankCapability = te.fluidCapability;
if (!tankCapability.isPresent())
return ActionResultType.PASS;
IFluidHandler fluidTank = tankCapability.orElse(null); IFluidHandler fluidTank = tankCapability.orElse(null);
FluidStack prevFluidInTank = fluidTank.getFluidInTank(0) FluidStack prevFluidInTank = fluidTank.getFluidInTank(0)
.copy(); .copy();
FluidExchange exchange = FluidHelper.exchange(fluidTank, fluidItem, FluidExchange.TANK_TO_ITEM, 1000); if (FluidHelper.tryEmptyItemIntoTE(world, player, hand, heldItem, te))
exchange = FluidExchange.ITEM_TO_TANK;
else if (FluidHelper.tryFillItemFromTE(world, player, hand, heldItem, te))
exchange = FluidExchange.TANK_TO_ITEM;
FluidStack fluidInTank = fluidTank.getFluidInTank(0); if (exchange == null) {
if (!player.isCreative() && !onClient) { if (EmptyingByBasin.canItemBeEmptied(world, heldItem)
if (heldItem.getCount() > 1) { || GenericItemFilling.canItemBeFilled(world, heldItem))
heldItem.shrink(1); return ActionResultType.SUCCESS;
player.addItemStackToInventory(fluidItem.getContainer()); return ActionResultType.PASS;
} else {
player.setHeldItem(hand, fluidItem.getContainer());
}
} }
SoundEvent soundevent = null; SoundEvent soundevent = null;
BlockState fluidState = null; BlockState fluidState = null;
FluidStack fluidInTank = tankCapability.map(fh -> fh.getFluidInTank(0))
.orElse(FluidStack.EMPTY);
if (exchange == FluidExchange.ITEM_TO_TANK) { if (exchange == FluidExchange.ITEM_TO_TANK) {
if (creative && !onClient) {
FluidStack fluidInItem = EmptyingByBasin.emptyItem(world, heldItem, true).getFirst();
if (!fluidInItem.isEmpty() && fluidTank instanceof CreativeSmartFluidTank)
((CreativeSmartFluidTank) fluidTank).setContainedFluid(fluidInItem);
}
Fluid fluid = fluidInTank.getFluid(); Fluid fluid = fluidInTank.getFluid();
fluidState = fluid.getDefaultState() fluidState = fluid.getDefaultState()
.getBlockState(); .getBlockState();
@ -141,6 +157,10 @@ public class FluidTankBlock extends Block implements IWrenchable, ITE<FluidTankT
fluid.isIn(FluidTags.LAVA) ? SoundEvents.ITEM_BUCKET_EMPTY_LAVA : SoundEvents.ITEM_BUCKET_EMPTY; fluid.isIn(FluidTags.LAVA) ? SoundEvents.ITEM_BUCKET_EMPTY_LAVA : SoundEvents.ITEM_BUCKET_EMPTY;
} }
if (exchange == FluidExchange.TANK_TO_ITEM) { if (exchange == FluidExchange.TANK_TO_ITEM) {
if (creative && !onClient)
if (fluidTank instanceof CreativeSmartFluidTank)
((CreativeSmartFluidTank) fluidTank).setContainedFluid(FluidStack.EMPTY);
Fluid fluid = prevFluidInTank.getFluid(); Fluid fluid = prevFluidInTank.getFluid();
fluidState = fluid.getDefaultState() fluidState = fluid.getDefaultState()
.getBlockState(); .getBlockState();
@ -213,7 +233,7 @@ public class FluidTankBlock extends Block implements IWrenchable, ITE<FluidTankT
@Override @Override
public TileEntity createTileEntity(BlockState state, IBlockReader world) { public TileEntity createTileEntity(BlockState state, IBlockReader world) {
return AllTileEntities.FLUID_TANK.create(); return creative ? AllTileEntities.CREATIVE_FLUID_TANK.create() : AllTileEntities.FLUID_TANK.create();
} }
@Override @Override

View file

@ -18,6 +18,7 @@ import com.simibubi.create.foundation.utility.Iterate;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.tileentity.TileEntityType;
import net.minecraft.util.Direction; import net.minecraft.util.Direction;
import net.minecraft.util.Direction.Axis; import net.minecraft.util.Direction.Axis;
import net.minecraft.util.Direction.AxisDirection; import net.minecraft.util.Direction.AxisDirection;
@ -33,10 +34,11 @@ public class FluidTankConnectivityHandler {
TankSearchCache cache = new TankSearchCache(); TankSearchCache cache = new TankSearchCache();
List<FluidTankTileEntity> frontier = new ArrayList<>(); List<FluidTankTileEntity> frontier = new ArrayList<>();
frontier.add(te); frontier.add(te);
formTanks(te.getWorld(), cache, frontier); formTanks(te.getType(), te.getWorld(), cache, frontier);
} }
private static void formTanks(IBlockReader world, TankSearchCache cache, List<FluidTankTileEntity> frontier) { private static void formTanks(TileEntityType<?> type, IBlockReader world, TankSearchCache cache,
List<FluidTankTileEntity> frontier) {
PriorityQueue<Pair<Integer, FluidTankTileEntity>> creationQueue = makeCreationQueue(); PriorityQueue<Pair<Integer, FluidTankTileEntity>> creationQueue = makeCreationQueue();
Set<BlockPos> visited = new HashSet<>(); Set<BlockPos> visited = new HashSet<>();
@ -70,7 +72,7 @@ public class FluidTankConnectivityHandler {
continue; continue;
if (visited.contains(next)) if (visited.contains(next))
continue; continue;
FluidTankTileEntity nextTank = tankAt(world, next); FluidTankTileEntity nextTank = tankAt(type, world, next);
if (nextTank == null) if (nextTank == null)
continue; continue;
if (nextTank.isRemoved()) if (nextTank.isRemoved())
@ -142,6 +144,7 @@ public class FluidTankConnectivityHandler {
boolean simulate) { boolean simulate) {
int amount = 0; int amount = 0;
int height = 0; int height = 0;
TileEntityType<?> type = te.getType();
World world = te.getWorld(); World world = te.getWorld();
BlockPos origin = te.getPos(); BlockPos origin = te.getPos();
FluidStack fluid = te.getTankInventory() FluidStack fluid = te.getTankInventory()
@ -154,7 +157,7 @@ public class FluidTankConnectivityHandler {
for (int zOffset = 0; zOffset < width; zOffset++) { for (int zOffset = 0; zOffset < width; zOffset++) {
BlockPos pos = origin.add(xOffset, yOffset, zOffset); BlockPos pos = origin.add(xOffset, yOffset, zOffset);
Optional<FluidTankTileEntity> tank = cache.getOrCache(world, pos); Optional<FluidTankTileEntity> tank = cache.getOrCache(type, world, pos);
if (!tank.isPresent()) if (!tank.isPresent())
break Search; break Search;
@ -194,7 +197,7 @@ public class FluidTankConnectivityHandler {
for (int xOffset = 0; xOffset < width; xOffset++) { for (int xOffset = 0; xOffset < width; xOffset++) {
for (int zOffset = 0; zOffset < width; zOffset++) { for (int zOffset = 0; zOffset < width; zOffset++) {
BlockPos pos = origin.add(xOffset, yOffset, zOffset); BlockPos pos = origin.add(xOffset, yOffset, zOffset);
FluidTankTileEntity tank = tankAt(world, pos); FluidTankTileEntity tank = tankAt(type, world, pos);
if (tank == te) if (tank == te)
continue; continue;
@ -248,7 +251,7 @@ public class FluidTankConnectivityHandler {
for (int zOffset = 0; zOffset < width; zOffset++) { for (int zOffset = 0; zOffset < width; zOffset++) {
BlockPos pos = origin.add(xOffset, yOffset, zOffset); BlockPos pos = origin.add(xOffset, yOffset, zOffset);
FluidTankTileEntity tankAt = tankAt(world, pos); FluidTankTileEntity tankAt = tankAt(te.getType(), world, pos);
if (tankAt == null) if (tankAt == null)
continue; continue;
if (!tankAt.getController() if (!tankAt.getController()
@ -278,7 +281,7 @@ public class FluidTankConnectivityHandler {
te.fluidCapability.invalidate(); te.fluidCapability.invalidate();
if (tryReconnect) if (tryReconnect)
formTanks(world, cache == null ? new TankSearchCache() : cache, frontier); formTanks(te.getType(), world, cache == null ? new TankSearchCache() : cache, frontier);
} }
private static PriorityQueue<Pair<Integer, FluidTankTileEntity>> makeCreationQueue() { private static PriorityQueue<Pair<Integer, FluidTankTileEntity>> makeCreationQueue() {
@ -291,7 +294,15 @@ public class FluidTankConnectivityHandler {
} }
@Nullable @Nullable
public static FluidTankTileEntity tankAt(IBlockReader world, BlockPos pos) { public static FluidTankTileEntity tankAt(TileEntityType<?> type, IBlockReader world, BlockPos pos) {
TileEntity te = world.getTileEntity(pos);
if (te instanceof FluidTankTileEntity && te.getType() == type)
return (FluidTankTileEntity) te;
return null;
}
@Nullable
public static FluidTankTileEntity anyTankAt(IBlockReader world, BlockPos pos) {
TileEntity te = world.getTileEntity(pos); TileEntity te = world.getTileEntity(pos);
if (te instanceof FluidTankTileEntity) if (te instanceof FluidTankTileEntity)
return (FluidTankTileEntity) te; return (FluidTankTileEntity) te;
@ -317,10 +328,10 @@ public class FluidTankConnectivityHandler {
return controllerMap.containsKey(pos); return controllerMap.containsKey(pos);
} }
Optional<FluidTankTileEntity> getOrCache(IBlockReader world, BlockPos pos) { Optional<FluidTankTileEntity> getOrCache(TileEntityType<?> type, IBlockReader world, BlockPos pos) {
if (hasVisited(pos)) if (hasVisited(pos))
return controllerMap.get(pos); return controllerMap.get(pos);
FluidTankTileEntity tankAt = tankAt(world, pos); FluidTankTileEntity tankAt = tankAt(type, world, pos);
if (tankAt == null) { if (tankAt == null) {
putEmpty(pos); putEmpty(pos);
return Optional.empty(); return Optional.empty();

View file

@ -12,6 +12,16 @@ import net.minecraftforge.client.model.generators.ModelFile;
public class FluidTankGenerator extends SpecialBlockStateGen { public class FluidTankGenerator extends SpecialBlockStateGen {
private String prefix;
public FluidTankGenerator() {
this("");
}
public FluidTankGenerator(String prefix) {
this.prefix = prefix;
}
@Override @Override
protected int getXRotation(BlockState state) { protected int getXRotation(BlockState state) {
return 0; return 0;
@ -37,8 +47,18 @@ public class FluidTankGenerator extends SpecialBlockStateGen {
else if (bottom) else if (bottom)
shapeName = "bottom"; shapeName = "bottom";
return AssetLookup.partialBaseModel(ctx, prov, String modelName = shapeName + (shape == Shape.PLAIN ? "" : "_" + shape.getName());
shapeName + (shape == Shape.PLAIN ? "" : "_" + shape.getName()));
if (!prefix.isEmpty())
return prov.models()
.withExistingParent(prefix + modelName, prov.modLoc("block/fluid_tank/block_" + modelName))
.texture("0", prov.modLoc("block/" + prefix + "casing"))
.texture("1", prov.modLoc("block/" + prefix + "fluid_tank"))
.texture("3", prov.modLoc("block/" + prefix + "fluid_tank_window"))
.texture("4", prov.modLoc("block/" + prefix + "fluid_tank_window_single"))
.texture("particle", prov.modLoc("block/" + prefix + "fluid_tank"));
return AssetLookup.partialBaseModel(ctx, prov, modelName);
} }
} }

View file

@ -44,7 +44,7 @@ public class FluidTankItem extends BlockItem {
if (!FluidTankBlock.isTank(placedOnState)) if (!FluidTankBlock.isTank(placedOnState))
return; return;
FluidTankTileEntity tankAt = FluidTankConnectivityHandler.tankAt(world, placedOnPos); FluidTankTileEntity tankAt = FluidTankConnectivityHandler.anyTankAt(world, placedOnPos);
if (tankAt == null) if (tankAt == null)
return; return;
FluidTankTileEntity controllerTE = tankAt.getControllerTE(); FluidTankTileEntity controllerTE = tankAt.getControllerTE();
@ -87,9 +87,11 @@ public class FluidTankItem extends BlockItem {
if (FluidTankBlock.isTank(blockState)) if (FluidTankBlock.isTank(blockState))
continue; continue;
BlockItemUseContext context = BlockItemUseContext.func_221536_a(ctx, offsetPos, face); BlockItemUseContext context = BlockItemUseContext.func_221536_a(ctx, offsetPos, face);
player.getPersistentData().putBoolean("SilenceTankSound", true); player.getPersistentData()
.putBoolean("SilenceTankSound", true);
super.tryPlace(context); super.tryPlace(context);
player.getPersistentData().remove("SilenceTankSound"); player.getPersistentData()
.remove("SilenceTankSound");
} }
} }
} }

View file

@ -6,9 +6,8 @@ import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.Random; import java.util.Random;
import com.simibubi.create.AllSpriteShifts;
import com.simibubi.create.foundation.block.connected.CTModel; import com.simibubi.create.foundation.block.connected.CTModel;
import com.simibubi.create.foundation.block.connected.ConnectedTextureBehaviour; import com.simibubi.create.foundation.block.connected.CTSpriteShiftEntry;
import com.simibubi.create.foundation.utility.Iterate; import com.simibubi.create.foundation.utility.Iterate;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
@ -23,11 +22,9 @@ import net.minecraftforge.client.model.data.ModelProperty;
public class FluidTankModel extends CTModel { public class FluidTankModel extends CTModel {
protected static ModelProperty<CullData> CULL_PROPERTY = new ModelProperty<>(); protected static ModelProperty<CullData> CULL_PROPERTY = new ModelProperty<>();
static ConnectedTextureBehaviour CT_BEHAVIOUR =
new FluidTankCTBehaviour(AllSpriteShifts.FLUID_TANK, AllSpriteShifts.COPPER_CASING);
public FluidTankModel(IBakedModel originalModel) { public FluidTankModel(IBakedModel originalModel, CTSpriteShiftEntry side, CTSpriteShiftEntry top) {
super(originalModel, CT_BEHAVIOUR); super(originalModel, new FluidTankCTBehaviour(side, top));
} }
@Override @Override

View file

@ -42,6 +42,9 @@ public class FluidTankRenderer extends SafeTileEntityRenderer<FluidTankTileEntit
FluidTank tank = te.tankInventory; FluidTank tank = te.tankInventory;
FluidStack fluidStack = tank.getFluid(); FluidStack fluidStack = tank.getFluid();
if (fluidStack.isEmpty())
return;
boolean top = fluidStack.getFluid() boolean top = fluidStack.getFluid()
.getAttributes() .getAttributes()
.isLighterThanAir(); .isLighterThanAir();

View file

@ -57,7 +57,7 @@ public class FluidTankTileEntity extends SmartTileEntity {
public FluidTankTileEntity(TileEntityType<?> tileEntityTypeIn) { public FluidTankTileEntity(TileEntityType<?> tileEntityTypeIn) {
super(tileEntityTypeIn); super(tileEntityTypeIn);
tankInventory = new SmartFluidTank(getCapacityMultiplier(), this::onFluidStackChanged); tankInventory = createInventory();
fluidCapability = LazyOptional.of(() -> tankInventory); fluidCapability = LazyOptional.of(() -> tankInventory);
forceFluidLevelUpdate = true; forceFluidLevelUpdate = true;
updateConnectivity = false; updateConnectivity = false;
@ -67,6 +67,10 @@ public class FluidTankTileEntity extends SmartTileEntity {
refreshCapability(); refreshCapability();
} }
protected SmartFluidTank createInventory() {
return new SmartFluidTank(getCapacityMultiplier(), this::onFluidStackChanged);
}
protected void updateConnectivity() { protected void updateConnectivity() {
updateConnectivity = false; updateConnectivity = false;
if (world.isRemote) if (world.isRemote)
@ -117,7 +121,7 @@ public class FluidTankTileEntity extends SmartTileEntity {
for (int xOffset = 0; xOffset < width; xOffset++) { for (int xOffset = 0; xOffset < width; xOffset++) {
for (int zOffset = 0; zOffset < width; zOffset++) { for (int zOffset = 0; zOffset < width; zOffset++) {
BlockPos pos = this.pos.add(xOffset, yOffset, zOffset); BlockPos pos = this.pos.add(xOffset, yOffset, zOffset);
FluidTankTileEntity tankAt = FluidTankConnectivityHandler.tankAt(world, pos); FluidTankTileEntity tankAt = FluidTankConnectivityHandler.anyTankAt(world, pos);
if (tankAt == null) if (tankAt == null)
continue; continue;
if (tankAt.luminosity == actualLuminosity) if (tankAt.luminosity == actualLuminosity)

View file

@ -7,11 +7,11 @@ import com.simibubi.create.content.contraptions.fluids.actors.GenericItemFilling
import com.simibubi.create.content.contraptions.wrench.IWrenchable; import com.simibubi.create.content.contraptions.wrench.IWrenchable;
import com.simibubi.create.foundation.advancement.AllTriggers; import com.simibubi.create.foundation.advancement.AllTriggers;
import com.simibubi.create.foundation.block.ITE; import com.simibubi.create.foundation.block.ITE;
import com.simibubi.create.foundation.fluid.FluidHelper;
import com.simibubi.create.foundation.item.ItemHelper; import com.simibubi.create.foundation.item.ItemHelper;
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringBehaviour; import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringBehaviour;
import com.simibubi.create.foundation.utility.Iterate; import com.simibubi.create.foundation.utility.Iterate;
import com.simibubi.create.foundation.utility.Pair;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
@ -34,11 +34,6 @@ import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.util.math.shapes.VoxelShape; import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.world.IBlockReader; import net.minecraft.world.IBlockReader;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.util.LazyOptional;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
import net.minecraftforge.fluids.capability.IFluidHandler;
import net.minecraftforge.fluids.capability.IFluidHandler.FluidAction;
import net.minecraftforge.items.IItemHandlerModifiable; import net.minecraftforge.items.IItemHandlerModifiable;
import net.minecraftforge.items.ItemHandlerHelper; import net.minecraftforge.items.ItemHandlerHelper;
import net.minecraftforge.items.ItemStackHandler; import net.minecraftforge.items.ItemStackHandler;
@ -80,9 +75,9 @@ public class BasinBlock extends Block implements ITE<BasinTileEntity>, IWrenchab
try { try {
BasinTileEntity te = getTileEntity(worldIn, pos); BasinTileEntity te = getTileEntity(worldIn, pos);
if (!heldItem.isEmpty()) { if (!heldItem.isEmpty()) {
if (tryEmptyItemIntoBasin(worldIn, player, handIn, heldItem, te)) if (FluidHelper.tryEmptyItemIntoTE(worldIn, player, handIn, heldItem, te))
return ActionResultType.SUCCESS; return ActionResultType.SUCCESS;
if (tryFillItemFromBasin(worldIn, player, handIn, heldItem, te)) if (FluidHelper.tryFillItemFromTE(worldIn, player, handIn, heldItem, te))
return ActionResultType.SUCCESS; return ActionResultType.SUCCESS;
if (EmptyingByBasin.canItemBeEmptied(worldIn, heldItem) if (EmptyingByBasin.canItemBeEmptied(worldIn, heldItem)
@ -103,77 +98,6 @@ public class BasinBlock extends Block implements ITE<BasinTileEntity>, IWrenchab
return ActionResultType.SUCCESS; return ActionResultType.SUCCESS;
} }
protected boolean tryEmptyItemIntoBasin(World worldIn, PlayerEntity player, Hand handIn, ItemStack heldItem,
BasinTileEntity te) {
if (!EmptyingByBasin.canItemBeEmptied(worldIn, heldItem))
return false;
Pair<FluidStack, ItemStack> emptyingResult = EmptyingByBasin.emptyItem(worldIn, heldItem, true);
LazyOptional<IFluidHandler> capability = te.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY);
IFluidHandler tank = capability.orElse(null);
FluidStack fluidStack = emptyingResult.getFirst();
if (tank == null || fluidStack.getAmount() != tank.fill(fluidStack, FluidAction.SIMULATE))
return false;
if (worldIn.isRemote)
return true;
ItemStack copyOfHeld = heldItem.copy();
emptyingResult = EmptyingByBasin.emptyItem(worldIn, copyOfHeld, false);
tank.fill(fluidStack, FluidAction.EXECUTE);
if (!player.isCreative()) {
if (copyOfHeld.isEmpty())
player.setHeldItem(handIn, emptyingResult.getSecond());
else {
player.setHeldItem(handIn, copyOfHeld);
player.inventory.placeItemBackInInventory(worldIn, emptyingResult.getSecond());
}
}
return true;
}
protected boolean tryFillItemFromBasin(World world, PlayerEntity player, Hand handIn, ItemStack heldItem,
BasinTileEntity te) {
if (!GenericItemFilling.canItemBeFilled(world, heldItem))
return false;
LazyOptional<IFluidHandler> capability = te.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY);
IFluidHandler tank = capability.orElse(null);
if (tank == null)
return false;
for (int i = 0; i < tank.getTanks(); i++) {
FluidStack fluid = tank.getFluidInTank(i);
if (fluid.isEmpty())
continue;
int requiredAmountForItem = GenericItemFilling.getRequiredAmountForItem(world, heldItem, fluid.copy());
if (requiredAmountForItem == -1)
continue;
if (requiredAmountForItem > fluid.getAmount())
continue;
if (world.isRemote)
return true;
if (player.isCreative())
heldItem = heldItem.copy();
ItemStack out = GenericItemFilling.fillItem(world, requiredAmountForItem, heldItem, fluid.copy());
FluidStack copy = fluid.copy();
copy.setAmount(requiredAmountForItem);
tank.drain(copy, FluidAction.EXECUTE);
if (!player.isCreative())
player.inventory.placeItemBackInInventory(world, out);
te.notifyUpdate();
return true;
}
return false;
}
@Override @Override
public void onLanded(IBlockReader worldIn, Entity entityIn) { public void onLanded(IBlockReader worldIn, Entity entityIn) {
super.onLanded(worldIn, entityIn); super.onLanded(worldIn, entityIn);

View file

@ -170,7 +170,7 @@ public class BeltBlock extends HorizontalKineticBlock implements ITE<BeltTileEnt
} }
BeltTileEntity belt = BeltHelper.getSegmentTE(worldIn, pos); BeltTileEntity belt = BeltHelper.getSegmentTE(worldIn, pos);
if (belt == null || belt.getSpeed() == 0) if (belt == null)
return; return;
if (entityIn instanceof ItemEntity && entityIn.isAlive()) { if (entityIn instanceof ItemEntity && entityIn.isAlive()) {
if (worldIn.isRemote) if (worldIn.isRemote)

View file

@ -95,8 +95,6 @@ public class BeltTileEntity extends KineticTileEntity {
BeltBlock.initBelt(world, pos); BeltBlock.initBelt(world, pos);
if (!AllBlocks.BELT.has(world.getBlockState(pos))) if (!AllBlocks.BELT.has(world.getBlockState(pos)))
return; return;
if (getSpeed() == 0)
return;
initializeItemHandler(); initializeItemHandler();
@ -105,6 +103,9 @@ public class BeltTileEntity extends KineticTileEntity {
return; return;
getInventory().tick(); getInventory().tick();
if (getSpeed() == 0)
return;
// Move Entities // Move Entities
if (passengers == null) if (passengers == null)
passengers = new HashMap<>(); passengers = new HashMap<>();

View file

@ -50,14 +50,6 @@ public class BeltInventory {
public void tick() { public void tick() {
// Reverse item collection if belt just reversed
if (beltMovementPositive != belt.getDirectionAwareBeltMovementSpeed() > 0) {
beltMovementPositive = !beltMovementPositive;
Collections.reverse(items);
belt.markDirty();
belt.sendData();
}
// Added/Removed items from previous cycle // Added/Removed items from previous cycle
if (!toInsert.isEmpty() || !toRemove.isEmpty()) { if (!toInsert.isEmpty() || !toRemove.isEmpty()) {
toInsert.forEach(this::insert); toInsert.forEach(this::insert);
@ -68,6 +60,17 @@ public class BeltInventory {
belt.sendData(); belt.sendData();
} }
if (belt.getSpeed() == 0)
return;
// Reverse item collection if belt just reversed
if (beltMovementPositive != belt.getDirectionAwareBeltMovementSpeed() > 0) {
beltMovementPositive = !beltMovementPositive;
Collections.reverse(items);
belt.markDirty();
belt.sendData();
}
// Assuming the first entry is furthest on the belt // Assuming the first entry is furthest on the belt
TransportedItemStack stackInFront = null; TransportedItemStack stackInFront = null;
TransportedItemStack currentItem = null; TransportedItemStack currentItem = null;

View file

@ -492,6 +492,17 @@ public class StandardRecipeGen extends CreateRecipeProvider {
.patternLine("SCS") .patternLine("SCS")
.patternLine(" I ")), .patternLine(" I ")),
HOSE_PULLEY = create(AllBlocks.HOSE_PULLEY).unlockedByTag(I::copper)
.viaShaped(b -> b
.key('S', I.shaft())
.key('P', AllBlocks.FLUID_PIPE.get())
.key('B', I.copperCasing())
.key('C', Items.DRIED_KELP)
.key('I', I.copperSheet())
.patternLine(" B ")
.patternLine("SCP")
.patternLine(" I ")),
EMPTY_BLAZE_BURNER = create(AllItems.EMPTY_BLAZE_BURNER).unlockedByTag(I::iron) EMPTY_BLAZE_BURNER = create(AllItems.EMPTY_BLAZE_BURNER).unlockedByTag(I::iron)
.viaShaped(b -> b.key('A', Blocks.IRON_BARS) .viaShaped(b -> b.key('A', Blocks.IRON_BARS)
.key('I', I.ironSheet()) .key('I', I.ironSheet())

View file

@ -7,14 +7,24 @@ import com.google.gson.JsonObject;
import com.google.gson.JsonSyntaxException; import com.google.gson.JsonSyntaxException;
import com.mojang.brigadier.exceptions.CommandSyntaxException; import com.mojang.brigadier.exceptions.CommandSyntaxException;
import com.simibubi.create.Create; import com.simibubi.create.Create;
import com.simibubi.create.content.contraptions.fluids.actors.GenericItemFilling;
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.entity.player.PlayerEntity;
import net.minecraft.fluid.Fluid; import net.minecraft.fluid.Fluid;
import net.minecraft.fluid.Fluids; import net.minecraft.fluid.Fluids;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.JsonToNBT; import net.minecraft.nbt.JsonToNBT;
import net.minecraft.util.Hand;
import net.minecraft.util.JSONUtils; import net.minecraft.util.JSONUtils;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
import net.minecraftforge.common.util.LazyOptional;
import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.ForgeFlowingFluid; import net.minecraftforge.fluids.ForgeFlowingFluid;
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
import net.minecraftforge.fluids.capability.IFluidHandler; import net.minecraftforge.fluids.capability.IFluidHandler;
import net.minecraftforge.fluids.capability.IFluidHandler.FluidAction; import net.minecraftforge.fluids.capability.IFluidHandler.FluidAction;
import net.minecraftforge.fluids.capability.IFluidHandlerItem; import net.minecraftforge.fluids.capability.IFluidHandlerItem;
@ -89,6 +99,77 @@ public class FluidHelper {
return stack; return stack;
} }
public static boolean tryEmptyItemIntoTE(World worldIn, PlayerEntity player, Hand handIn, ItemStack heldItem,
SmartTileEntity te) {
if (!EmptyingByBasin.canItemBeEmptied(worldIn, heldItem))
return false;
Pair<FluidStack, ItemStack> emptyingResult = EmptyingByBasin.emptyItem(worldIn, heldItem, true);
LazyOptional<IFluidHandler> capability = te.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY);
IFluidHandler tank = capability.orElse(null);
FluidStack fluidStack = emptyingResult.getFirst();
if (tank == null || fluidStack.getAmount() != tank.fill(fluidStack, FluidAction.SIMULATE))
return false;
if (worldIn.isRemote)
return true;
ItemStack copyOfHeld = heldItem.copy();
emptyingResult = EmptyingByBasin.emptyItem(worldIn, copyOfHeld, false);
tank.fill(fluidStack, FluidAction.EXECUTE);
if (!player.isCreative()) {
if (copyOfHeld.isEmpty())
player.setHeldItem(handIn, emptyingResult.getSecond());
else {
player.setHeldItem(handIn, copyOfHeld);
player.inventory.placeItemBackInInventory(worldIn, emptyingResult.getSecond());
}
}
return true;
}
public static boolean tryFillItemFromTE(World world, PlayerEntity player, Hand handIn, ItemStack heldItem,
SmartTileEntity te) {
if (!GenericItemFilling.canItemBeFilled(world, heldItem))
return false;
LazyOptional<IFluidHandler> capability = te.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY);
IFluidHandler tank = capability.orElse(null);
if (tank == null)
return false;
for (int i = 0; i < tank.getTanks(); i++) {
FluidStack fluid = tank.getFluidInTank(i);
if (fluid.isEmpty())
continue;
int requiredAmountForItem = GenericItemFilling.getRequiredAmountForItem(world, heldItem, fluid.copy());
if (requiredAmountForItem == -1)
continue;
if (requiredAmountForItem > fluid.getAmount())
continue;
if (world.isRemote)
return true;
if (player.isCreative())
heldItem = heldItem.copy();
ItemStack out = GenericItemFilling.fillItem(world, requiredAmountForItem, heldItem, fluid.copy());
FluidStack copy = fluid.copy();
copy.setAmount(requiredAmountForItem);
tank.drain(copy, FluidAction.EXECUTE);
if (!player.isCreative())
player.inventory.placeItemBackInInventory(world, out);
te.notifyUpdate();
return true;
}
return false;
}
@Nullable @Nullable
public static FluidExchange exchange(IFluidHandler fluidTank, IFluidHandlerItem fluidItem, FluidExchange preferred, public static FluidExchange exchange(IFluidHandler fluidTank, IFluidHandlerItem fluidItem, FluidExchange preferred,
int maxAmount) { int maxAmount) {

View file

@ -8,11 +8,9 @@ import com.mojang.blaze3d.platform.GlStateManager.SourceFactor;
import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.systems.RenderSystem;
import com.mojang.blaze3d.vertex.IVertexBuilder; import com.mojang.blaze3d.vertex.IVertexBuilder;
import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.fluid.FluidRenderer;
import com.simibubi.create.foundation.utility.ColorHelper; import com.simibubi.create.foundation.utility.ColorHelper;
import com.simibubi.create.foundation.utility.Iterate;
import com.simibubi.create.foundation.utility.VecHelper; import com.simibubi.create.foundation.utility.VecHelper;
import com.simibubi.create.foundation.utility.worldWrappers.WrappedWorld;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks; import net.minecraft.block.Blocks;
@ -27,18 +25,14 @@ import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.RenderTypeLookup; import net.minecraft.client.renderer.RenderTypeLookup;
import net.minecraft.client.renderer.model.IBakedModel; import net.minecraft.client.renderer.model.IBakedModel;
import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.client.renderer.texture.OverlayTexture;
import net.minecraft.client.world.ClientWorld;
import net.minecraft.fluid.Fluid; import net.minecraft.fluid.Fluid;
import net.minecraft.inventory.container.PlayerContainer; import net.minecraft.inventory.container.PlayerContainer;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction.AxisDirection;
import net.minecraft.util.IItemProvider; import net.minecraft.util.IItemProvider;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d; import net.minecraft.util.math.Vec3d;
import net.minecraft.world.LightType;
import net.minecraft.world.World;
import net.minecraftforge.client.model.data.EmptyModelData; import net.minecraftforge.client.model.data.EmptyModelData;
import net.minecraftforge.fluids.FluidStack;
public class GuiGameElement { public class GuiGameElement {
@ -212,36 +206,13 @@ public class GuiGameElement {
.isEmpty()) .isEmpty())
return; return;
for (RenderType type : RenderType.getBlockLayers()) {
if (!RenderTypeLookup.canRenderInLayer(blockState.getFluidState(), type))
continue;
RenderSystem.pushMatrix(); RenderSystem.pushMatrix();
RenderHelper.disableStandardItemLighting(); RenderHelper.disableStandardItemLighting();
FluidRenderer.renderTiledFluidBB(new FluidStack(blockState.getFluidState()
ClientWorld world = Minecraft.getInstance().world; .getFluid(), 1000), 0, 0, 0, 1.0001f, 1.0001f, 1.0001f, buffer, ms, 0xf000f0, true);
if (renderWorld == null || renderWorld.getWorld() != world) buffer.draw(RenderType.getTranslucent());
renderWorld = new FluidRenderWorld(world);
for (Direction d : Iterate.directions) {
vb = buffer.getBuffer(type);
if (d.getAxisDirection() == AxisDirection.POSITIVE)
continue;
RenderSystem.pushMatrix();
RenderSystem.translated(.5, .5, .5);
RenderSystem.rotatef(AngleHelper.horizontalAngle(d), 0, 1, 0);
RenderSystem.rotatef(AngleHelper.verticalAngle(d) - 90, 0, 0, 1);
RenderSystem.translated(-.5, -.5, -.5);
blockRenderer.renderFluid(new BlockPos(0, 1, 0), renderWorld, vb, blockState.getFluidState());
buffer.draw(type);
RenderSystem.popMatrix();
}
RenderHelper.enable(); RenderHelper.enable();
RenderSystem.popMatrix(); RenderSystem.popMatrix();
break;
}
} }
} }
@ -271,29 +242,12 @@ public class GuiGameElement {
transform(); transform();
RenderSystem.scaled(1, -1, 1); RenderSystem.scaled(1, -1, 1);
RenderSystem.translated(0, 0, -75); RenderSystem.translated(0, 0, -75);
Minecraft.getInstance().getItemRenderer().renderItemIntoGUI(stack, 0, 0); Minecraft.getInstance()
.getItemRenderer()
.renderItemIntoGUI(stack, 0, 0);
cleanUp(); cleanUp();
} }
} }
private static FluidRenderWorld renderWorld;
private static class FluidRenderWorld extends WrappedWorld {
public FluidRenderWorld(World world) {
super(world);
}
@Override
public int getLightLevel(LightType p_226658_1_, BlockPos p_226658_2_) {
return 15;
}
@Override
public BlockState getBlockState(BlockPos pos) {
return Blocks.AIR.getDefaultState();
}
}
} }

View file

@ -13,6 +13,7 @@ import com.simibubi.create.content.contraptions.components.structureMovement.syn
import com.simibubi.create.content.contraptions.components.structureMovement.sync.LimbSwingUpdatePacket; import com.simibubi.create.content.contraptions.components.structureMovement.sync.LimbSwingUpdatePacket;
import com.simibubi.create.content.contraptions.components.structureMovement.train.CouplingCreationPacket; import com.simibubi.create.content.contraptions.components.structureMovement.train.CouplingCreationPacket;
import com.simibubi.create.content.contraptions.components.structureMovement.train.capability.MinecartControllerUpdatePacket; import com.simibubi.create.content.contraptions.components.structureMovement.train.capability.MinecartControllerUpdatePacket;
import com.simibubi.create.content.contraptions.fluids.actors.FluidSplashPacket;
import com.simibubi.create.content.contraptions.relays.advanced.sequencer.ConfigureSequencedGearshiftPacket; import com.simibubi.create.content.contraptions.relays.advanced.sequencer.ConfigureSequencedGearshiftPacket;
import com.simibubi.create.content.curiosities.symmetry.SymmetryEffectPacket; import com.simibubi.create.content.curiosities.symmetry.SymmetryEffectPacket;
import com.simibubi.create.content.curiosities.tools.ExtendoGripInteractionPacket; import com.simibubi.create.content.curiosities.tools.ExtendoGripInteractionPacket;
@ -32,8 +33,12 @@ import com.simibubi.create.foundation.utility.ServerSpeedProvider;
import net.minecraft.network.PacketBuffer; import net.minecraft.network.PacketBuffer;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.fml.network.NetworkEvent.Context; import net.minecraftforge.fml.network.NetworkEvent.Context;
import net.minecraftforge.fml.network.NetworkRegistry; import net.minecraftforge.fml.network.NetworkRegistry;
import net.minecraftforge.fml.network.PacketDistributor;
import net.minecraftforge.fml.network.PacketDistributor.TargetPoint;
import net.minecraftforge.fml.network.simple.SimpleChannel; import net.minecraftforge.fml.network.simple.SimpleChannel;
public enum AllPackets { public enum AllPackets {
@ -66,6 +71,7 @@ public enum AllPackets {
CONTRAPTION_SEAT_MAPPING(ContraptionSeatMappingPacket.class, ContraptionSeatMappingPacket::new), CONTRAPTION_SEAT_MAPPING(ContraptionSeatMappingPacket.class, ContraptionSeatMappingPacket::new),
LIMBSWING_UPDATE(LimbSwingUpdatePacket.class, LimbSwingUpdatePacket::new), LIMBSWING_UPDATE(LimbSwingUpdatePacket.class, LimbSwingUpdatePacket::new),
MINECART_CONTROLLER(MinecartControllerUpdatePacket.class, MinecartControllerUpdatePacket::new), MINECART_CONTROLLER(MinecartControllerUpdatePacket.class, MinecartControllerUpdatePacket::new),
FLUID_SPLASH(FluidSplashPacket.class, FluidSplashPacket::new),
; ;
@ -80,11 +86,20 @@ public enum AllPackets {
} }
public static void registerPackets() { public static void registerPackets() {
channel = NetworkRegistry.ChannelBuilder.named(CHANNEL_NAME).serverAcceptedVersions(s -> true) channel = NetworkRegistry.ChannelBuilder.named(CHANNEL_NAME)
.clientAcceptedVersions(s -> true).networkProtocolVersion(() -> NETWORK_VERSION).simpleChannel(); .serverAcceptedVersions(s -> true)
.clientAcceptedVersions(s -> true)
.networkProtocolVersion(() -> NETWORK_VERSION)
.simpleChannel();
for (AllPackets packet : values()) for (AllPackets packet : values())
packet.packet.register(); packet.packet.register();
}
public static void sendToNear(World world, BlockPos pos, int range, Object message) {
channel.send(
PacketDistributor.NEAR.with(TargetPoint.p(pos.getX(), pos.getY(), pos.getZ(), range, world.getDimension()
.getType())),
message);
} }
private static class LoadedPacket<T extends SimplePacketBase> { private static class LoadedPacket<T extends SimplePacketBase> {
@ -102,7 +117,11 @@ public enum AllPackets {
} }
private void register() { private void register() {
channel.messageBuilder(type, index++).encoder(encoder).decoder(decoder).consumer(handler).add(); channel.messageBuilder(type, index++)
.encoder(encoder)
.decoder(decoder)
.consumer(handler)
.add();
} }
} }

View file

@ -20,3 +20,7 @@ public net.minecraft.potion.PotionBrewing field_185215_c # POTION_ITEMS
# Beacon # Beacon
public net.minecraft.tileentity.BeaconTileEntity field_174909_f # beamSegments public net.minecraft.tileentity.BeaconTileEntity field_174909_f # beamSegments
# Server Tick List (For stopping placed fluids from spilling)
public net.minecraft.world.server.ServerTickList field_205374_d # pendingTickListEntriesHashSet
public net.minecraft.world.server.ServerTickList field_205375_e # pendingTickListEntriesTreeSet

View file

@ -5,7 +5,7 @@
"0": "create:block/copper_casing", "0": "create:block/copper_casing",
"1": "create:block/fluid_tank", "1": "create:block/fluid_tank",
"5": "create:block/fluid_tank_window_single", "5": "create:block/fluid_tank_window_single",
"particle": "create:block/fluid_tank" "particle": "#1"
}, },
"elements": [ "elements": [
{ {

View file

@ -0,0 +1,271 @@
{
"credit": "Made with Blockbench",
"parent": "block/block",
"textures": {
"4": "create:block/copper_gearbox",
"8": "create:block/oxidized/copper_block_0",
"9": "create:block/fluid_pipe",
"particle": "create:block/oxidized/copper_block_0"
},
"elements": [
{
"name": "side",
"from": [14, 2, 2],
"to": [15, 14, 14],
"rotation": {"angle": 0, "axis": "y", "origin": [8, -8, 8]},
"faces": {
"east": {"uv": [2, 2, 14, 14], "texture": "#4"},
"west": {"uv": [2, 2, 14, 14], "texture": "#4"},
"down": {"uv": [2, 11, 14, 12], "rotation": 90, "texture": "#4"}
}
},
{
"name": "side",
"from": [1, 2, 2],
"to": [2, 14, 14],
"rotation": {"angle": 0, "axis": "y", "origin": [8, -8, 8]},
"faces": {
"east": {"uv": [14, 2, 2, 14], "texture": "#8"},
"west": {"uv": [14, 2, 2, 14], "texture": "#8"},
"down": {"uv": [2, 12, 14, 11], "rotation": 90, "texture": "#4"}
}
},
{
"name": "side",
"from": [-1.1, 2.9, 2.9],
"to": [1, 13.1, 13.1],
"rotation": {"angle": 0, "axis": "y", "origin": [7, -7, 7]},
"faces": {
"north": {"uv": [11, 5, 6, 6], "rotation": 90, "texture": "#9"},
"south": {"uv": [11, 5, 6, 6], "rotation": 270, "texture": "#9"},
"west": {"uv": [11, 0, 6, 5], "texture": "#9"},
"up": {"uv": [11, 5, 6, 6], "rotation": 270, "texture": "#9"},
"down": {"uv": [11, 5, 6, 6], "rotation": 270, "texture": "#9"}
}
},
{
"name": "side_frame",
"from": [14, 2, 14],
"to": [16, 14, 16],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 1, 8]},
"faces": {
"north": {"uv": [0, 2, 2, 14], "texture": "#8"},
"east": {"uv": [14, 2, 16, 14], "rotation": 180, "texture": "#8"},
"south": {"uv": [14, 2, 16, 14], "texture": "#8"},
"west": {"uv": [14, 2, 16, 14], "texture": "#8"},
"up": {"uv": [0, 14, 2, 16], "rotation": 270, "texture": "#8"},
"down": {"uv": [0, 0, 2, 2], "rotation": 90, "texture": "#8"}
}
},
{
"name": "side_frame",
"from": [0, 2, 14],
"to": [2, 14, 16],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 1, 8]},
"faces": {
"north": {"uv": [2, 2, 0, 14], "texture": "#8"},
"east": {"uv": [16, 2, 14, 14], "texture": "#8"},
"south": {"uv": [16, 2, 14, 14], "texture": "#8"},
"west": {"uv": [16, 2, 14, 14], "rotation": 180, "texture": "#8"},
"up": {"uv": [0, 16, 2, 14], "rotation": 270, "texture": "#8"},
"down": {"uv": [0, 2, 2, 0], "rotation": 90, "texture": "#8"}
}
},
{
"name": "side_frame",
"from": [14, 2, 0],
"to": [16, 14, 2],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 1, 8]},
"faces": {
"north": {"uv": [16, 2, 14, 14], "texture": "#8"},
"east": {"uv": [16, 2, 14, 14], "rotation": 180, "texture": "#8"},
"south": {"uv": [2, 2, 0, 14], "texture": "#8"},
"west": {"uv": [2, 2, 0, 14], "rotation": 180, "texture": "#8"},
"up": {"uv": [2, 14, 0, 16], "rotation": 270, "texture": "#8"},
"down": {"uv": [2, 0, 0, 2], "rotation": 90, "texture": "#8"}
}
},
{
"name": "side_frame",
"from": [0, 2, 0],
"to": [2, 14, 2],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 1, 8]},
"faces": {
"north": {"uv": [14, 2, 16, 14], "texture": "#8"},
"east": {"uv": [0, 2, 2, 14], "rotation": 180, "texture": "#8"},
"south": {"uv": [0, 2, 2, 14], "texture": "#8"},
"west": {"uv": [14, 2, 16, 14], "rotation": 180, "texture": "#8"},
"up": {"uv": [2, 16, 0, 14], "rotation": 270, "texture": "#8"},
"down": {"uv": [2, 2, 0, 0], "rotation": 90, "texture": "#8"}
}
},
{
"name": "side_frame",
"from": [14, 0, 0],
"to": [16, 2, 16],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 1, 8]},
"faces": {
"north": {"uv": [0, 14, 2, 16], "texture": "#8"},
"east": {"uv": [0, 14, 16, 16], "texture": "#8"},
"south": {"uv": [14, 14, 16, 16], "texture": "#8"},
"west": {"uv": [0, 14, 16, 16], "texture": "#8"},
"up": {"uv": [0, 14, 16, 16], "rotation": 90, "texture": "#8"},
"down": {"uv": [0, 14, 16, 16], "rotation": 270, "texture": "#8"}
}
},
{
"name": "side_frame",
"from": [14, 14, 0],
"to": [16, 16, 16],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 15, 8]},
"faces": {
"north": {"uv": [0, 16, 2, 14], "texture": "#8"},
"east": {"uv": [0, 16, 16, 14], "texture": "#8"},
"south": {"uv": [14, 16, 16, 14], "texture": "#8"},
"west": {"uv": [0, 16, 16, 14], "texture": "#8"},
"up": {"uv": [0, 16, 16, 14], "rotation": 90, "texture": "#8"},
"down": {"uv": [0, 16, 16, 14], "rotation": 270, "texture": "#8"}
}
},
{
"name": "side_frame",
"from": [0, 0, 0],
"to": [2, 2, 16],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 1, 8]},
"faces": {
"north": {"uv": [2, 14, 0, 16], "texture": "#8"},
"east": {"uv": [16, 14, 0, 16], "texture": "#8"},
"south": {"uv": [16, 14, 14, 16], "texture": "#8"},
"west": {"uv": [16, 14, 0, 16], "texture": "#8"},
"up": {"uv": [0, 16, 16, 14], "rotation": 90, "texture": "#8"},
"down": {"uv": [0, 14, 16, 16], "rotation": 90, "texture": "#8"}
}
},
{
"name": "side_frame",
"from": [0, 14, 0],
"to": [2, 16, 16],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 15, 8]},
"faces": {
"north": {"uv": [2, 16, 0, 14], "texture": "#8"},
"east": {"uv": [16, 16, 0, 14], "texture": "#8"},
"south": {"uv": [16, 16, 14, 14], "texture": "#8"},
"west": {"uv": [16, 16, 0, 14], "texture": "#8"},
"up": {"uv": [0, 16, 16, 14], "rotation": 270, "texture": "#8"},
"down": {"uv": [0, 14, 16, 16], "rotation": 270, "texture": "#8"}
}
},
{
"name": "front",
"from": [2, 1, 13],
"to": [14, 3, 15],
"rotation": {"angle": 0, "axis": "y", "origin": [8, -8, 8]},
"faces": {
"north": {"uv": [2, 14, 14, 16], "rotation": 180, "texture": "#8"},
"east": {"uv": [0, 0, 0, 0], "texture": "#8"},
"south": {"uv": [2, 14, 14, 16], "texture": "#8"},
"west": {"uv": [0, 0, 0, 0], "texture": "#8"},
"up": {"uv": [2, 0, 14, 2], "rotation": 180, "texture": "#8"},
"down": {"uv": [2, 14, 14, 16], "rotation": 180, "texture": "#8"}
}
},
{
"name": "front",
"from": [2, 1, 1],
"to": [14, 3, 3],
"rotation": {"angle": 0, "axis": "y", "origin": [8, -8, 8]},
"faces": {
"north": {"uv": [14, 14, 2, 16], "texture": "#8"},
"east": {"uv": [0, 0, 0, 0], "texture": "#8"},
"south": {"uv": [14, 14, 2, 16], "rotation": 180, "texture": "#8"},
"west": {"uv": [0, 0, 0, 0], "texture": "#8"},
"up": {"uv": [2, 2, 14, 0], "texture": "#8"},
"down": {"uv": [2, 16, 14, 14], "rotation": 180, "texture": "#8"}
}
},
{
"name": "front",
"from": [2, 13, 1],
"to": [14, 15, 3],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 10, 8]},
"faces": {
"north": {"uv": [14, 16, 2, 14], "texture": "#8"},
"east": {"uv": [0, 0, 0, 0], "texture": "#8"},
"south": {"uv": [14, 2, 2, 0], "texture": "#8"},
"west": {"uv": [0, 0, 0, 0], "texture": "#8"},
"up": {"uv": [14, 15, 2, 13], "texture": "#8"},
"down": {"uv": [14, 2, 2, 0], "rotation": 180, "texture": "#8"}
}
},
{
"name": "front",
"from": [2, 13, 13],
"to": [14, 15, 15],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 10, 8]},
"faces": {
"north": {"uv": [2, 2, 14, 0], "texture": "#8"},
"east": {"uv": [0, 0, 0, 0], "texture": "#8"},
"south": {"uv": [2, 16, 14, 14], "texture": "#8"},
"west": {"uv": [0, 0, 0, 0], "texture": "#8"},
"up": {"uv": [14, 13, 2, 15], "texture": "#8"},
"down": {"uv": [14, 0, 2, 2], "texture": "#8"}
}
},
{
"name": "top",
"from": [2, 14, 2],
"to": [14, 16, 14],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 10, 8]},
"faces": {
"north": {"uv": [2, 1, 14, 3], "rotation": 180, "texture": "#8"},
"east": {"uv": [0, 0, 0, 0], "texture": "#8"},
"south": {"uv": [2, 13, 14, 15], "texture": "#8"},
"west": {"uv": [0, 0, 0, 0], "texture": "#8"},
"up": {"uv": [2, 2, 14, 14], "texture": "#8"},
"down": {"uv": [2, 2, 14, 14], "rotation": 180, "texture": "#8"}
}
}
],
"display": {
"thirdperson_righthand": {
"rotation": [75, 45, 0],
"translation": [0, 2.5, 0],
"scale": [0.375, 0.375, 0.375]
},
"thirdperson_lefthand": {
"rotation": [75, 45, 0],
"translation": [0, 2.5, 0],
"scale": [0.375, 0.375, 0.375]
},
"firstperson_righthand": {
"rotation": [0, 45, 0],
"scale": [0.4, 0.4, 0.4]
},
"firstperson_lefthand": {
"rotation": [0, 225, 0],
"scale": [0.4, 0.4, 0.4]
},
"ground": {
"translation": [0, 3, 0],
"scale": [0.25, 0.25, 0.25]
},
"gui": {
"rotation": [30, 225, 0],
"scale": [0.625, 0.625, 0.625]
},
"fixed": {
"scale": [0.5, 0.5, 0.5]
}
},
"groups": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
{
"name": "shaft",
"origin": [8, 8, 8],
"children": []
},
{
"name": "rope_half_magnet",
"origin": [8, 8, 8],
"children": []
}, 15]
}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
{"meta":{"format_version":"3.2","model_format":"java_block","box_uv":false},"name":"rope","parent":"block/block","ambientocclusion":true,"front_gui_light":false,"resolution":{"width":16,"height":16},"elements":[{"name":"rope","from":[6,0,6],"to":[10,16,10],"autouv":0,"color":6,"locked":false,"origin":[7.75,0,8],"faces":{"north":{"uv":[0,0,4,16],"texture":0},"east":{"uv":[0,0,4,16],"texture":0},"south":{"uv":[0,0,4,16],"texture":0},"west":{"uv":[0,0,4,16],"texture":0},"up":{"uv":[0,0,4,4],"rotation":90,"texture":0},"down":{"uv":[0,0,4,4],"texture":0}},"uuid":"3f245b42-dde8-d34f-9f25-ae6eb2f322ae"}],"outliner":["3f245b42-dde8-d34f-9f25-ae6eb2f322ae"],"textures":[{"path":"C:\\Users\\krypp\\Documents\\Pixel Art\\Create Mod\\Pulley Pump\\copper_pulley_rope.png","name":"copper_pulley_rope.png","folder":"Pulley Pump","namespace":"create","id":"5","particle":true,"mode":"bitmap","saved":true,"uuid":"8ffc2f62-b5b6-1af9-ecc1-e22a9ae075aa","source":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAX0lEQVQ4T2M00tP4z8fLwfDp8w+GX7//MLCxsjCQwmfU0VT5r6IgwfDh0xe4IaTwGUddwEB5GLS1tf2Xl5dn0NDQYLhx4wbDw4cPGUjhMy5duvQ/uZpBlo2mgz/DIQwAKD7WmGK5ZIUAAAAASUVORK5CYII="}]}

View file

@ -0,0 +1,381 @@
{
"credit": "Made with Blockbench",
"parent": "block/block",
"textures": {
"0": "create:block/axis",
"1": "create:block/axis_top",
"4": "create:block/copper_gearbox",
"5": "create:block/hose_pulley_rope",
"6": "create:block/hose_pulley_magnet",
"8": "create:block/oxidized/copper_block_0",
"9": "create:block/fluid_pipe",
"particle": "create:block/oxidized/copper_block_0"
},
"elements": [
{
"name": "coil",
"from": [4, 4, 2],
"to": [12, 12, 14],
"rotation": {"angle": -45, "axis": "z", "origin": [8, 8, -10]},
"faces": {
"east": {"uv": [2, 1, 14, 9], "texture": "#5"},
"west": {"uv": [2, 1, 14, 9], "rotation": 180, "texture": "#5"},
"up": {"uv": [2, 1, 14, 9], "rotation": 270, "texture": "#5"},
"down": {"uv": [2, 1, 14, 9], "rotation": 90, "texture": "#5"}
}
},
{
"name": "coil",
"from": [3.5, 3.5, 3],
"to": [12.5, 12.5, 7],
"rotation": {"angle": 45, "axis": "z", "origin": [8, 8, -10]},
"faces": {
"north": {"uv": [0, 0, 1, 1], "texture": "#5"},
"east": {"uv": [0, 3, 4, 12], "rotation": 180, "texture": "#5"},
"south": {"uv": [0, 0, 1, 1], "texture": "#5"},
"west": {"uv": [0, 3, 4, 12], "texture": "#5"},
"up": {"uv": [0, 3, 4, 12], "rotation": 90, "texture": "#5"},
"down": {"uv": [0, 3, 4, 12], "rotation": 270, "texture": "#5"}
}
},
{
"name": "coil",
"from": [3.5, 3.5, 9],
"to": [12.5, 12.5, 13],
"rotation": {"angle": 45, "axis": "z", "origin": [8, 8, -4]},
"faces": {
"north": {"uv": [0, 0, 1, 1], "texture": "#5"},
"east": {"uv": [0, 3, 4, 12], "rotation": 180, "texture": "#5"},
"south": {"uv": [0, 0, 1, 1], "texture": "#5"},
"west": {"uv": [0, 3, 4, 12], "texture": "#5"},
"up": {"uv": [0, 3, 4, 12], "rotation": 90, "texture": "#5"},
"down": {"uv": [0, 3, 4, 12], "rotation": 270, "texture": "#5"}
}
},
{
"name": "side",
"from": [2, 2, 14],
"to": [14, 14, 15],
"rotation": {"angle": 0, "axis": "y", "origin": [8, -8, 8]},
"faces": {
"north": {"uv": [2, 2, 14, 14], "texture": "#4"},
"south": {"uv": [2, 2, 14, 14], "texture": "#4"},
"down": {"uv": [2, 11, 14, 12], "texture": "#4"}
}
},
{
"name": "side",
"from": [2, 2, 1],
"to": [14, 14, 2],
"rotation": {"angle": 0, "axis": "y", "origin": [8, -8, 8]},
"faces": {
"north": {"uv": [14, 2, 2, 14], "texture": "#8"},
"south": {"uv": [14, 2, 2, 14], "texture": "#8"},
"down": {"uv": [2, 12, 14, 11], "texture": "#4"}
}
},
{
"name": "side",
"from": [3, 3, -1],
"to": [13, 13, 1],
"rotation": {"angle": 0, "axis": "y", "origin": [9, -7, 7]},
"faces": {
"north": {"uv": [11, 0, 6, 5], "texture": "#9"},
"east": {"uv": [11, 5, 6, 6], "rotation": 90, "texture": "#9"},
"west": {"uv": [11, 5, 6, 6], "rotation": 270, "texture": "#9"},
"up": {"uv": [11, 5, 6, 6], "texture": "#9"},
"down": {"uv": [11, 5, 6, 6], "rotation": 180, "texture": "#9"}
}
},
{
"name": "side_frame",
"from": [0, 2, 14],
"to": [2, 14, 16],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 1, 8]},
"faces": {
"north": {"uv": [14, 2, 16, 14], "texture": "#8"},
"east": {"uv": [0, 2, 2, 14], "texture": "#8"},
"south": {"uv": [14, 2, 16, 14], "rotation": 180, "texture": "#8"},
"west": {"uv": [14, 2, 16, 14], "texture": "#8"},
"up": {"uv": [0, 14, 2, 16], "texture": "#8"},
"down": {"uv": [0, 0, 2, 2], "texture": "#8"}
}
},
{
"name": "side_frame",
"from": [0, 2, 0],
"to": [2, 14, 2],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 1, 8]},
"faces": {
"north": {"uv": [16, 2, 14, 14], "rotation": 180, "texture": "#8"},
"east": {"uv": [2, 2, 0, 14], "texture": "#8"},
"south": {"uv": [16, 2, 14, 14], "texture": "#8"},
"west": {"uv": [16, 2, 14, 14], "texture": "#8"},
"up": {"uv": [0, 16, 2, 14], "texture": "#8"},
"down": {"uv": [0, 2, 2, 0], "texture": "#8"}
}
},
{
"name": "side_frame",
"from": [14, 2, 14],
"to": [16, 14, 16],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 1, 8]},
"faces": {
"north": {"uv": [2, 2, 0, 14], "rotation": 180, "texture": "#8"},
"east": {"uv": [16, 2, 14, 14], "texture": "#8"},
"south": {"uv": [16, 2, 14, 14], "rotation": 180, "texture": "#8"},
"west": {"uv": [2, 2, 0, 14], "texture": "#8"},
"up": {"uv": [2, 14, 0, 16], "texture": "#8"},
"down": {"uv": [2, 0, 0, 2], "texture": "#8"}
}
},
{
"name": "side_frame",
"from": [14, 2, 0],
"to": [16, 14, 2],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 1, 8]},
"faces": {
"north": {"uv": [14, 2, 16, 14], "rotation": 180, "texture": "#8"},
"east": {"uv": [14, 2, 16, 14], "texture": "#8"},
"south": {"uv": [0, 2, 2, 14], "rotation": 180, "texture": "#8"},
"west": {"uv": [0, 2, 2, 14], "texture": "#8"},
"up": {"uv": [2, 16, 0, 14], "texture": "#8"},
"down": {"uv": [2, 2, 0, 0], "texture": "#8"}
}
},
{
"name": "side_frame",
"from": [0, 0, 14],
"to": [16, 2, 16],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 1, 8]},
"faces": {
"north": {"uv": [0, 14, 16, 16], "texture": "#8"},
"east": {"uv": [0, 14, 2, 16], "texture": "#8"},
"south": {"uv": [0, 14, 16, 16], "texture": "#8"},
"west": {"uv": [14, 14, 16, 16], "texture": "#8"},
"up": {"uv": [0, 14, 16, 16], "rotation": 180, "texture": "#8"},
"down": {"uv": [0, 14, 16, 16], "rotation": 180, "texture": "#8"}
}
},
{
"name": "side_frame",
"from": [0, 14, 14],
"to": [16, 16, 16],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 15, 8]},
"faces": {
"north": {"uv": [0, 16, 16, 14], "texture": "#8"},
"east": {"uv": [0, 16, 2, 14], "texture": "#8"},
"south": {"uv": [0, 16, 16, 14], "texture": "#8"},
"west": {"uv": [14, 16, 16, 14], "texture": "#8"},
"up": {"uv": [0, 16, 16, 14], "rotation": 180, "texture": "#8"},
"down": {"uv": [0, 16, 16, 14], "rotation": 180, "texture": "#8"}
}
},
{
"name": "side_frame",
"from": [0, 0, 0],
"to": [16, 2, 2],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 1, 8]},
"faces": {
"north": {"uv": [16, 14, 0, 16], "texture": "#8"},
"east": {"uv": [2, 14, 0, 16], "texture": "#8"},
"south": {"uv": [16, 14, 0, 16], "texture": "#8"},
"west": {"uv": [16, 14, 14, 16], "texture": "#8"},
"up": {"uv": [0, 16, 16, 14], "rotation": 180, "texture": "#8"},
"down": {"uv": [0, 14, 16, 16], "texture": "#8"}
}
},
{
"name": "side_frame",
"from": [0, 14, 0],
"to": [16, 16, 2],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 15, 8]},
"faces": {
"north": {"uv": [16, 16, 0, 14], "texture": "#8"},
"east": {"uv": [2, 16, 0, 14], "texture": "#8"},
"south": {"uv": [16, 16, 0, 14], "texture": "#8"},
"west": {"uv": [16, 16, 14, 14], "texture": "#8"},
"up": {"uv": [0, 16, 16, 14], "texture": "#8"},
"down": {"uv": [0, 14, 16, 16], "rotation": 180, "texture": "#8"}
}
},
{
"name": "front",
"from": [1, 1, 2],
"to": [3, 3, 14],
"rotation": {"angle": 0, "axis": "y", "origin": [8, -8, 8]},
"faces": {
"north": {"uv": [0, 0, 0, 0], "texture": "#8"},
"east": {"uv": [2, 14, 14, 16], "rotation": 180, "texture": "#8"},
"south": {"uv": [0, 0, 0, 0], "texture": "#8"},
"west": {"uv": [2, 14, 14, 16], "texture": "#8"},
"up": {"uv": [2, 0, 14, 2], "rotation": 270, "texture": "#8"},
"down": {"uv": [2, 14, 14, 16], "rotation": 90, "texture": "#8"}
}
},
{
"name": "front",
"from": [13, 1, 2],
"to": [15, 3, 14],
"rotation": {"angle": 0, "axis": "y", "origin": [8, -8, 8]},
"faces": {
"north": {"uv": [0, 0, 0, 0], "texture": "#8"},
"east": {"uv": [14, 14, 2, 16], "texture": "#8"},
"south": {"uv": [0, 0, 0, 0], "texture": "#8"},
"west": {"uv": [14, 14, 2, 16], "rotation": 180, "texture": "#8"},
"up": {"uv": [2, 2, 14, 0], "rotation": 90, "texture": "#8"},
"down": {"uv": [2, 16, 14, 14], "rotation": 90, "texture": "#8"}
}
},
{
"name": "front",
"from": [13, 13, 2],
"to": [15, 15, 14],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 10, 8]},
"faces": {
"north": {"uv": [0, 0, 0, 0], "texture": "#8"},
"east": {"uv": [14, 16, 2, 14], "texture": "#8"},
"south": {"uv": [0, 0, 0, 0], "texture": "#8"},
"west": {"uv": [14, 2, 2, 0], "texture": "#8"},
"up": {"uv": [14, 15, 2, 13], "rotation": 90, "texture": "#8"},
"down": {"uv": [14, 2, 2, 0], "rotation": 90, "texture": "#8"}
}
},
{
"name": "front",
"from": [1, 13, 2],
"to": [3, 15, 14],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 10, 8]},
"faces": {
"north": {"uv": [0, 0, 0, 0], "texture": "#8"},
"east": {"uv": [2, 2, 14, 0], "texture": "#8"},
"south": {"uv": [0, 0, 0, 0], "texture": "#8"},
"west": {"uv": [2, 16, 14, 14], "texture": "#8"},
"up": {"uv": [14, 13, 2, 15], "rotation": 90, "texture": "#8"},
"down": {"uv": [14, 0, 2, 2], "rotation": 270, "texture": "#8"}
}
},
{
"name": "Axis",
"from": [6, 6, 8],
"to": [10, 10, 16],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 1, 16]},
"faces": {
"east": {"uv": [6, 8, 10, 16], "rotation": 90, "texture": "#0"},
"south": {"uv": [6, 6, 10, 10], "texture": "#1"},
"west": {"uv": [6, 8, 10, 16], "rotation": 270, "texture": "#0"},
"up": {"uv": [6, 8, 10, 16], "texture": "#0"},
"down": {"uv": [6, 8, 10, 16], "rotation": 180, "texture": "#0"}
}
},
{
"name": "rope",
"from": [6, 2, 6],
"to": [10, 8, 10],
"rotation": {"angle": 0, "axis": "y", "origin": [7.75, 13, 8]},
"faces": {
"north": {"uv": [12, 10, 16, 16], "texture": "#6"},
"east": {"uv": [12, 10, 16, 16], "texture": "#6"},
"south": {"uv": [12, 10, 16, 16], "texture": "#6"},
"west": {"uv": [12, 10, 16, 16], "texture": "#6"},
"up": {"uv": [12, 0, 16, 4], "rotation": 90, "texture": "#6"}
}
},
{
"name": "drain 1",
"from": [4.5, 0, 4.5],
"to": [11.5, 2, 11.5],
"rotation": {"angle": 0, "axis": "y", "origin": [6.75, 14, 6]},
"faces": {
"north": {"uv": [0, 0, 7, 2], "texture": "#6"},
"east": {"uv": [0, 0, 7, 2], "texture": "#6"},
"south": {"uv": [0, 0, 7, 2], "texture": "#6"},
"west": {"uv": [0, 0, 7, 2], "texture": "#6"},
"down": {"uv": [0, 2, 7, 9], "texture": "#6"}
}
},
{
"name": "drain 2",
"from": [4.5, 2, 4.5],
"to": [11.5, 3, 11.5],
"rotation": {"angle": 0, "axis": "y", "origin": [6.75, 16, 6]},
"faces": {
"north": {"uv": [0, 1, 7, 2], "texture": "#6"},
"east": {"uv": [0, 1, 7, 2], "texture": "#6"},
"south": {"uv": [0, 1, 7, 2], "texture": "#6"},
"west": {"uv": [0, 1, 7, 2], "texture": "#6"},
"up": {"uv": [0, 2, 7, 9], "rotation": 90, "texture": "#6"},
"down": {"uv": [0, 9, 7, 16], "texture": "#6"}
}
},
{
"name": "drain 3",
"from": [5.5, 2, 5.5],
"to": [10.5, 5, 10.5],
"rotation": {"angle": 0, "axis": "y", "origin": [7.75, 16, 7]},
"faces": {
"north": {"uv": [7, 2, 10, 7], "rotation": 270, "texture": "#6"},
"east": {"uv": [7, 2, 10, 7], "rotation": 270, "texture": "#6"},
"south": {"uv": [7, 2, 10, 7], "rotation": 270, "texture": "#6"},
"west": {"uv": [7, 2, 10, 7], "rotation": 270, "texture": "#6"},
"up": {"uv": [1, 3, 6, 8], "rotation": 90, "texture": "#6"}
}
},
{
"name": "top",
"from": [2, 14, 2],
"to": [14, 16, 14],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 10, 8]},
"faces": {
"north": {"uv": [0, 0, 0, 0], "texture": "#8"},
"east": {"uv": [2, 1, 14, 3], "rotation": 180, "texture": "#8"},
"south": {"uv": [0, 0, 0, 0], "texture": "#8"},
"west": {"uv": [2, 13, 14, 15], "texture": "#8"},
"up": {"uv": [2, 2, 14, 14], "rotation": 90, "texture": "#8"},
"down": {"uv": [2, 2, 14, 14], "rotation": 90, "texture": "#8"}
}
}
],
"display": {
"thirdperson_righthand": {
"rotation": [75, 45, 0],
"translation": [0, 2.5, 0],
"scale": [0.375, 0.375, 0.375]
},
"thirdperson_lefthand": {
"rotation": [75, 45, 0],
"translation": [0, 2.5, 0],
"scale": [0.375, 0.375, 0.375]
},
"firstperson_righthand": {
"rotation": [0, 45, 0],
"scale": [0.4, 0.4, 0.4]
},
"firstperson_lefthand": {
"rotation": [0, 225, 0],
"scale": [0.4, 0.4, 0.4]
},
"ground": {
"translation": [0, 3, 0],
"scale": [0.25, 0.25, 0.25]
},
"gui": {
"rotation": [30, 225, 0],
"scale": [0.625, 0.625, 0.625]
},
"fixed": {
"scale": [0.5, 0.5, 0.5]
}
},
"groups": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
{
"name": "shaft",
"origin": [8, 8, 8],
"children": [18]
},
{
"name": "rope_half_magnet",
"origin": [8, 8, 8],
"children": [19, 20, 21, 22]
}, 23]
}

View file

@ -0,0 +1,101 @@
{
"credit": "Made with Blockbench",
"parent": "block/block",
"textures": {
"6": "create:block/hose_pulley_magnet",
"particle": "create:block/oxidized/copper_block_0"
},
"elements": [
{
"name": "rope",
"from": [6, 2, 6],
"to": [10, 16, 10],
"rotation": {"angle": 0, "axis": "y", "origin": [7.75, 13, 8]},
"faces": {
"north": {"uv": [12, 2, 16, 16], "texture": "#6"},
"east": {"uv": [12, 2, 16, 16], "texture": "#6"},
"south": {"uv": [12, 2, 16, 16], "texture": "#6"},
"west": {"uv": [12, 2, 16, 16], "texture": "#6"},
"up": {"uv": [12, 0, 16, 4], "rotation": 90, "texture": "#6"}
}
},
{
"name": "drain 1",
"from": [4.5, 0, 4.5],
"to": [11.5, 2, 11.5],
"rotation": {"angle": 0, "axis": "y", "origin": [6.75, 14, 6]},
"faces": {
"north": {"uv": [0, 0, 7, 2], "texture": "#6"},
"east": {"uv": [0, 0, 7, 2], "texture": "#6"},
"south": {"uv": [0, 0, 7, 2], "texture": "#6"},
"west": {"uv": [0, 0, 7, 2], "texture": "#6"},
"down": {"uv": [0, 2, 7, 9], "texture": "#6"}
}
},
{
"name": "drain 2",
"from": [4.5, 2, 4.5],
"to": [11.5, 3, 11.5],
"rotation": {"angle": 0, "axis": "y", "origin": [6.75, 16, 6]},
"faces": {
"north": {"uv": [0, 1, 7, 2], "texture": "#6"},
"east": {"uv": [0, 1, 7, 2], "texture": "#6"},
"south": {"uv": [0, 1, 7, 2], "texture": "#6"},
"west": {"uv": [0, 1, 7, 2], "texture": "#6"},
"up": {"uv": [0, 2, 7, 9], "rotation": 90, "texture": "#6"},
"down": {"uv": [0, 9, 7, 16], "texture": "#6"}
}
},
{
"name": "drain 3",
"from": [5.5, 2, 5.5],
"to": [10.5, 5, 10.5],
"rotation": {"angle": 0, "axis": "y", "origin": [7.75, 16, 7]},
"faces": {
"north": {"uv": [7, 2, 10, 7], "rotation": 270, "texture": "#6"},
"east": {"uv": [7, 2, 10, 7], "rotation": 270, "texture": "#6"},
"south": {"uv": [7, 2, 10, 7], "rotation": 270, "texture": "#6"},
"west": {"uv": [7, 2, 10, 7], "rotation": 270, "texture": "#6"},
"up": {"uv": [1, 3, 6, 8], "rotation": 90, "texture": "#6"}
}
}
],
"display": {
"thirdperson_righthand": {
"rotation": [75, 45, 0],
"translation": [0, 2.5, 0],
"scale": [0.375, 0.375, 0.375]
},
"thirdperson_lefthand": {
"rotation": [75, 45, 0],
"translation": [0, 2.5, 0],
"scale": [0.375, 0.375, 0.375]
},
"firstperson_righthand": {
"rotation": [0, 45, 0],
"scale": [0.4, 0.4, 0.4]
},
"firstperson_lefthand": {
"rotation": [0, 225, 0],
"scale": [0.4, 0.4, 0.4]
},
"ground": {
"translation": [0, 3, 0],
"scale": [0.25, 0.25, 0.25]
},
"gui": {
"rotation": [30, 225, 0],
"scale": [0.625, 0.625, 0.625]
},
"fixed": {
"scale": [0.5, 0.5, 0.5]
}
},
"groups": [
{
"name": "rope_half_magnet",
"origin": [8, 8, 8],
"children": [0, 1, 2, 3]
}
]
}

View file

@ -0,0 +1,7 @@
{
"parent": "create:block/rope_pulley/rope",
"textures": {
"5": "create:block/hose_pulley_rope",
"particle": "create:block/hose_pulley_rope"
}
}

View file

@ -0,0 +1,49 @@
{
"credit": "Made with Blockbench",
"parent": "block/block",
"textures": {
"5": "create:block/hose_pulley_rope"
},
"elements": [
{
"name": "coil",
"from": [4, 4, 2],
"to": [12, 12, 14],
"rotation": {"angle": -45, "axis": "z", "origin": [8, 8, -10]},
"faces": {
"east": {"uv": [2, 1, 14, 9], "texture": "#5"},
"west": {"uv": [2, 1, 14, 9], "rotation": 180, "texture": "#5"},
"up": {"uv": [2, 1, 14, 9], "rotation": 270, "texture": "#5"},
"down": {"uv": [2, 1, 14, 9], "rotation": 90, "texture": "#5"}
}
},
{
"name": "coil",
"from": [3.5, 3.5, 3],
"to": [12.5, 12.5, 7],
"rotation": {"angle": 45, "axis": "z", "origin": [8, 8, -10]},
"faces": {
"north": {"uv": [0, 0, 1, 1], "texture": "#5"},
"east": {"uv": [0, 3, 4, 12], "rotation": 180, "texture": "#5"},
"south": {"uv": [0, 0, 1, 1], "texture": "#5"},
"west": {"uv": [0, 3, 4, 12], "texture": "#5"},
"up": {"uv": [0, 3, 4, 12], "rotation": 90, "texture": "#5"},
"down": {"uv": [0, 3, 4, 12], "rotation": 270, "texture": "#5"}
}
},
{
"name": "coil",
"from": [3.5, 3.5, 9],
"to": [12.5, 12.5, 13],
"rotation": {"angle": 45, "axis": "z", "origin": [8, 8, -4]},
"faces": {
"north": {"uv": [0, 0, 1, 1], "texture": "#5"},
"east": {"uv": [0, 3, 4, 12], "rotation": 180, "texture": "#5"},
"south": {"uv": [0, 0, 1, 1], "texture": "#5"},
"west": {"uv": [0, 3, 4, 12], "texture": "#5"},
"up": {"uv": [0, 3, 4, 12], "rotation": 90, "texture": "#5"},
"down": {"uv": [0, 3, 4, 12], "rotation": 270, "texture": "#5"}
}
}
]
}

View file

@ -0,0 +1,7 @@
{
"parent": "create:block/rope_pulley/rope_half",
"textures": {
"5": "create:block/hose_pulley_rope",
"particle": "create:block/hose_pulley_rope"
}
}

View file

@ -0,0 +1,101 @@
{
"credit": "Made with Blockbench",
"parent": "block/block",
"textures": {
"6": "create:block/hose_pulley_magnet",
"particle": "create:block/oxidized/copper_block_0"
},
"elements": [
{
"name": "rope",
"from": [6, 2, 6],
"to": [10, 8, 10],
"rotation": {"angle": 0, "axis": "y", "origin": [7.75, 13, 8]},
"faces": {
"north": {"uv": [12, 10, 16, 16], "texture": "#6"},
"east": {"uv": [12, 10, 16, 16], "texture": "#6"},
"south": {"uv": [12, 10, 16, 16], "texture": "#6"},
"west": {"uv": [12, 10, 16, 16], "texture": "#6"},
"up": {"uv": [12, 0, 16, 4], "rotation": 90, "texture": "#6"}
}
},
{
"name": "drain 1",
"from": [4.5, 0, 4.5],
"to": [11.5, 2, 11.5],
"rotation": {"angle": 0, "axis": "y", "origin": [6.75, 14, 6]},
"faces": {
"north": {"uv": [0, 0, 7, 2], "texture": "#6"},
"east": {"uv": [0, 0, 7, 2], "texture": "#6"},
"south": {"uv": [0, 0, 7, 2], "texture": "#6"},
"west": {"uv": [0, 0, 7, 2], "texture": "#6"},
"down": {"uv": [0, 2, 7, 9], "texture": "#6"}
}
},
{
"name": "drain 2",
"from": [4.5, 2, 4.5],
"to": [11.5, 3, 11.5],
"rotation": {"angle": 0, "axis": "y", "origin": [6.75, 16, 6]},
"faces": {
"north": {"uv": [0, 1, 7, 2], "texture": "#6"},
"east": {"uv": [0, 1, 7, 2], "texture": "#6"},
"south": {"uv": [0, 1, 7, 2], "texture": "#6"},
"west": {"uv": [0, 1, 7, 2], "texture": "#6"},
"up": {"uv": [0, 2, 7, 9], "rotation": 90, "texture": "#6"},
"down": {"uv": [0, 9, 7, 16], "texture": "#6"}
}
},
{
"name": "drain 3",
"from": [5.5, 2, 5.5],
"to": [10.5, 5, 10.5],
"rotation": {"angle": 0, "axis": "y", "origin": [7.75, 16, 7]},
"faces": {
"north": {"uv": [7, 2, 10, 7], "rotation": 270, "texture": "#6"},
"east": {"uv": [7, 2, 10, 7], "rotation": 270, "texture": "#6"},
"south": {"uv": [7, 2, 10, 7], "rotation": 270, "texture": "#6"},
"west": {"uv": [7, 2, 10, 7], "rotation": 270, "texture": "#6"},
"up": {"uv": [1, 3, 6, 8], "rotation": 90, "texture": "#6"}
}
}
],
"display": {
"thirdperson_righthand": {
"rotation": [75, 45, 0],
"translation": [0, 2.5, 0],
"scale": [0.375, 0.375, 0.375]
},
"thirdperson_lefthand": {
"rotation": [75, 45, 0],
"translation": [0, 2.5, 0],
"scale": [0.375, 0.375, 0.375]
},
"firstperson_righthand": {
"rotation": [0, 45, 0],
"scale": [0.4, 0.4, 0.4]
},
"firstperson_lefthand": {
"rotation": [0, 225, 0],
"scale": [0.4, 0.4, 0.4]
},
"ground": {
"translation": [0, 3, 0],
"scale": [0.25, 0.25, 0.25]
},
"gui": {
"rotation": [30, 225, 0],
"scale": [0.625, 0.625, 0.625]
},
"fixed": {
"scale": [0.5, 0.5, 0.5]
}
},
"groups": [
{
"name": "rope_half_magnet",
"origin": [8, 8, 8],
"children": [0, 1, 2, 3]
}
]
}

View file

@ -0,0 +1,79 @@
{
"credit": "Made with Blockbench",
"parent": "block/block",
"textures": {
"0": "create:block/item_drain_side",
"1": "create:block/item_drain_top",
"2": "create:block/copper_casing",
"3": "create:block/pump",
"particle": "create:block/item_drain_side"
},
"elements": [
{
"from": [0, 0, 0],
"to": [16, 2, 16],
"faces": {
"north": {"uv": [0, 14, 16, 16], "texture": "#0"},
"east": {"uv": [0, 14, 16, 16], "texture": "#0"},
"south": {"uv": [0, 14, 16, 16], "texture": "#0"},
"west": {"uv": [0, 14, 16, 16], "texture": "#0"},
"up": {"uv": [0, 0, 16, 16], "texture": "#2"},
"down": {"uv": [0, 0, 16, 16], "texture": "#2"}
}
},
{
"from": [0, 2, 0],
"to": [16, 13, 2],
"faces": {
"north": {"uv": [0, 3, 16, 14], "texture": "#0"},
"east": {"uv": [14, 3, 16, 14], "texture": "#0"},
"south": {"uv": [0, 3, 16, 14], "texture": "#0"},
"west": {"uv": [0, 3, 2, 14], "texture": "#0"},
"up": {"uv": [0, 0, 16, 2], "texture": "#1"}
}
},
{
"from": [0, 2, 14],
"to": [16, 13, 16],
"faces": {
"north": {"uv": [0, 3, 16, 14], "texture": "#0"},
"east": {"uv": [0, 3, 2, 14], "texture": "#0"},
"south": {"uv": [0, 3, 16, 14], "texture": "#0"},
"west": {"uv": [14, 3, 16, 14], "texture": "#0"},
"up": {"uv": [0, 14, 16, 16], "texture": "#1"}
}
},
{
"from": [14, 2, 2],
"to": [16, 13, 14],
"faces": {
"east": {"uv": [2, 3, 14, 14], "texture": "#0"},
"west": {"uv": [2, 3, 14, 14], "texture": "#0"},
"up": {"uv": [14, 2, 16, 14], "texture": "#1"}
}
},
{
"from": [0, 2, 2],
"to": [2, 13, 14],
"faces": {
"east": {"uv": [2, 3, 14, 14], "texture": "#0"},
"west": {"uv": [2, 3, 14, 14], "texture": "#0"},
"up": {"uv": [0, 2, 2, 14], "texture": "#1"}
}
},
{
"from": [2, 12, 2],
"to": [14, 13, 14],
"faces": {
"up": {"uv": [2, 2, 14, 14], "texture": "#1"}
}
},
{
"from": [2, 4, 2],
"to": [14, 5, 14],
"faces": {
"up": {"uv": [0, 0, 12, 12], "texture": "#3"}
}
}
]
}

View file

@ -4,7 +4,7 @@
"textures": { "textures": {
"3": "create:block/gearbox_top", "3": "create:block/gearbox_top",
"4": "create:block/gearbox", "4": "create:block/gearbox",
"5": "create:block/andesite_casing_short", "6": "create:block/andesite_casing",
"particle": "create:block/pulley_rope" "particle": "create:block/pulley_rope"
}, },
"elements": [ "elements": [
@ -194,14 +194,14 @@
}, },
{ {
"name": "top", "name": "top",
"from": [3, 14, 2], "from": [2, 14, 2],
"to": [13, 16, 14], "to": [14, 16, 14],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 10, 8]}, "rotation": {"angle": 0, "axis": "y", "origin": [8, 10, 8]},
"faces": { "faces": {
"east": {"uv": [2, 14, 14, 16], "texture": "#3"}, "east": {"uv": [2, 1, 14, 3], "rotation": 180, "texture": "#6"},
"west": {"uv": [2, 14, 14, 16], "texture": "#3"}, "west": {"uv": [2, 13, 14, 15], "texture": "#6"},
"up": {"uv": [2, 5, 14, 15], "rotation": 90, "texture": "#5"}, "up": {"uv": [2, 2, 14, 14], "rotation": 90, "texture": "#6"},
"down": {"uv": [2, 5, 14, 15], "rotation": 90, "texture": "#5"} "down": {"uv": [2, 2, 14, 14], "rotation": 90, "texture": "#6"}
} }
} }
] ]

View file

@ -8,8 +8,8 @@
"4": "create:block/gearbox", "4": "create:block/gearbox",
"5": "create:block/pulley_rope", "5": "create:block/pulley_rope",
"6": "create:block/pulley_magnet", "6": "create:block/pulley_magnet",
"7": "create:block/andesite_casing_short", "8": "create:block/andesite_casing",
"particle": "create:block/pulley_magnet" "particle": "create:block/andesite_casing"
}, },
"elements": [ "elements": [
{ {
@ -279,16 +279,14 @@
}, },
{ {
"name": "top", "name": "top",
"from": [3, 14, 2], "from": [2, 14, 2],
"to": [13, 16, 14], "to": [14, 16, 14],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 10, 8]}, "rotation": {"angle": 0, "axis": "y", "origin": [8, 10, 8]},
"faces": { "faces": {
"north": {"uv": [0, 0, 0, 0], "texture": "#7"}, "east": {"uv": [2, 1, 14, 3], "rotation": 180, "texture": "#8"},
"east": {"uv": [2, 14, 14, 16], "texture": "#7"}, "west": {"uv": [2, 13, 14, 15], "texture": "#8"},
"south": {"uv": [0, 0, 0, 0], "texture": "#7"}, "up": {"uv": [2, 2, 14, 14], "rotation": 90, "texture": "#8"},
"west": {"uv": [2, 14, 14, 16], "texture": "#7"}, "down": {"uv": [2, 2, 14, 14], "rotation": 90, "texture": "#8"}
"up": {"uv": [2, 5, 14, 15], "rotation": 90, "texture": "#7"},
"down": {"uv": [2, 5, 14, 15], "rotation": 90, "texture": "#7"}
} }
} }
], ],

View file

@ -1,5 +1,5 @@
{ {
"__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)", "credit": "Made with Blockbench",
"parent": "block/block", "parent": "block/block",
"textures": { "textures": {
"0": "create:block/schematic_table_side", "0": "create:block/schematic_table_side",
@ -9,68 +9,51 @@
"elements": [ "elements": [
{ {
"name": "base", "name": "base",
"from": [ 5.0, 0.0, 5.0 ], "from": [5, 0, 5],
"to": [ 11.0, 12.0, 11.0 ], "to": [11, 12, 11],
"faces": { "faces": {
"north": { "texture": "#0", "uv": [ 5.0, 4.0, 11.0, 16.0 ] }, "north": {"uv": [0, 3, 6, 15], "texture": "#0"},
"east": { "texture": "#0", "uv": [ 5.0, 4.0, 11.0, 16.0 ] }, "east": {"uv": [0, 3, 6, 15], "texture": "#0"},
"south": { "texture": "#0", "uv": [ 5.0, 4.0, 11.0, 16.0 ] }, "south": {"uv": [0, 3, 6, 15], "texture": "#0"},
"west": { "texture": "#0", "uv": [ 5.0, 4.0, 11.0, 16.0 ] }, "west": {"uv": [0, 3, 6, 15], "texture": "#0"}
"up": { "texture": "#0", "uv": [ 0.0, 0.0, 6.0, 6.0 ] },
"down": { "texture": "#0", "uv": [ 5.0, 6.0, 11.0, 12.0 ] }
} }
}, },
{ {
"name": "Top", "name": "Top",
"from": [ 0.0, 12.0, -2.0 ], "from": [0, 11, 2],
"to": [ 16.0, 15.0, 14.0 ], "to": [16, 14, 14],
"rotation": { "origin": [ 8.0, 8.0, 8.0 ], "axis": "x", "angle": 22.5 },
"faces": { "faces": {
"north": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 3.0 ] }, "north": {"uv": [0, 0, 16, 3], "texture": "#0"},
"east": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 3.0 ] }, "east": {"uv": [0, 0, 12, 3], "texture": "#0"},
"south": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 3.0 ] }, "south": {"uv": [0, 0, 16, 3], "texture": "#0"},
"west": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 3.0 ] }, "west": {"uv": [0, 0, 12, 3], "texture": "#0"},
"up": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "up": {"uv": [0, 2, 16, 14], "texture": "#1"},
"down": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] } "down": {"uv": [0, 2, 16, 14], "texture": "#1"}
} }
}, },
{ {
"name": "Cube", "name": "Cube",
"from": [ 4.0, 11.0, 4.0 ], "from": [4, 9, 4],
"to": [ 12.0, 14.0, 11.0 ], "to": [12, 11, 12],
"faces": { "faces": {
"north": { "texture": "#1", "uv": [ 4.0, 1.0, 12.0, 4.0 ] }, "north": {"uv": [4, 2, 12, 4], "texture": "#1"},
"east": { "texture": "#1", "uv": [ 4.0, 1.0, 11.0, 4.0 ] }, "east": {"uv": [4, 2, 12, 4], "texture": "#1"},
"south": { "texture": "#1", "uv": [ 4.0, 1.0, 12.0, 4.0 ] }, "south": {"uv": [4, 2, 12, 4], "texture": "#1"},
"west": { "texture": "#1", "uv": [ 4.0, 1.0, 11.0, 4.0 ] }, "west": {"uv": [4, 2, 12, 4], "texture": "#1"},
"down": { "texture": "#1", "uv": [ 4.0, 4.0, 12.0, 11.0 ] } "down": {"uv": [4, 4, 12, 12], "texture": "#1"}
} }
}, },
{ {
"name": "Cube", "name": "Cube",
"from": [ 1.0, 12.0, 15.0 ], "from": [4, 0, 4],
"to": [ 15.0, 13.0, 16.0 ], "to": [12, 2, 12],
"rotation": { "origin": [ 8.0, 14.0, 16.0 ], "axis": "x", "angle": 22.5 },
"faces": { "faces": {
"north": { "texture": "#0", "uv": [ 1.0, 12.0, 15.0, 13.0 ] }, "north": {"uv": [5, 14, 13, 16], "texture": "#0"},
"east": { "texture": "#0", "uv": [ 6.0, 14.0, 7.0, 15.0 ] }, "east": {"uv": [6, 14, 14, 16], "texture": "#0"},
"south": { "texture": "#0", "uv": [ 1.0, 14.0, 15.0, 15.0 ] }, "south": {"uv": [1, 14, 9, 16], "texture": "#0"},
"west": { "texture": "#0", "uv": [ 7.0, 14.0, 8.0, 15.0 ] }, "west": {"uv": [4, 14, 12, 16], "texture": "#0"},
"up": { "texture": "#0", "uv": [ 1.0, 13.0, 15.0, 14.0 ] }, "up": {"uv": [6, 5, 14, 13], "texture": "#0"},
"down": { "texture": "#0", "uv": [ 1.0, 14.0, 15.0, 15.0 ] } "down": {"uv": [6, 5, 14, 13], "texture": "#0"}
}
},
{
"name": "Cube",
"from": [ 4.0, 0.0, 4.0 ],
"to": [ 12.0, 2.0, 12.0 ],
"faces": {
"north": { "texture": "#0", "uv": [ 5.0, 14.0, 13.0, 16.0 ] },
"east": { "texture": "#0", "uv": [ 6.0, 14.0, 14.0, 16.0 ] },
"south": { "texture": "#0", "uv": [ 1.0, 14.0, 9.0, 16.0 ] },
"west": { "texture": "#0", "uv": [ 4.0, 14.0, 12.0, 16.0 ] },
"up": { "texture": "#0", "uv": [ 0.0, 5.0, 8.0, 13.0 ] },
"down": { "texture": "#0", "uv": [ 4.0, 5.0, 12.0, 13.0 ] }
} }
} }
] ]

Binary file not shown.

After

Width:  |  Height:  |  Size: 367 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1,004 B

After

Width:  |  Height:  |  Size: 821 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 794 B

Some files were not shown because too many files have changed in this diff Show more