Climb or Convey
- Added Gantry shafts and Gantry pinions - Further attempts at stabilizing kinetic propagation - Contraption types can now be added from external code - Kinetic tile entities now have more control over kinetic propagation rules - Added backend for loading schematic configurations globally for any component to see - Encased chain drives are less likely to create a kinetic source loop when wrenched - Piston and Pulley contraptions are less likely to overshoot targets at high speeds
@ -157,6 +157,8 @@ afff479c0e5284771afa9e7ce513595fe65860ee assets/create/blockstates/gabbro_cobble
|
|||||||
a1f31a194129cfb65e335b3b96490f9275f9c564 assets/create/blockstates/gabbro_cobblestone_stairs.json
|
a1f31a194129cfb65e335b3b96490f9275f9c564 assets/create/blockstates/gabbro_cobblestone_stairs.json
|
||||||
a64d8d0924c0b5b192f355343dd9b3a440875f6a assets/create/blockstates/gabbro_cobblestone_wall.json
|
a64d8d0924c0b5b192f355343dd9b3a440875f6a assets/create/blockstates/gabbro_cobblestone_wall.json
|
||||||
a6b44e8a1c4ce0c7442b2384b41ad36dd133f19b assets/create/blockstates/gabbro_pillar.json
|
a6b44e8a1c4ce0c7442b2384b41ad36dd133f19b assets/create/blockstates/gabbro_pillar.json
|
||||||
|
2d7ffcb339b0a38b98935a382ac2a164866255b1 assets/create/blockstates/gantry_pinion.json
|
||||||
|
9fa39a44bba30c5ae8fa245b122a837c705462b4 assets/create/blockstates/gantry_shaft.json
|
||||||
eca1f0e56efdadb241f42dc6ebb036f1d52213a9 assets/create/blockstates/gearbox.json
|
eca1f0e56efdadb241f42dc6ebb036f1d52213a9 assets/create/blockstates/gearbox.json
|
||||||
f34814b17cde3231a1dfb271f3dabf8d6de4fbf6 assets/create/blockstates/gearshift.json
|
f34814b17cde3231a1dfb271f3dabf8d6de4fbf6 assets/create/blockstates/gearshift.json
|
||||||
93f8bdc22d9a5e04268964e35e4285c8cbf2b89d assets/create/blockstates/glass_fluid_pipe.json
|
93f8bdc22d9a5e04268964e35e4285c8cbf2b89d assets/create/blockstates/glass_fluid_pipe.json
|
||||||
@ -398,17 +400,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
|
||||||
df67c2c11fa22487d3a0fdc9b008056e593d14e3 assets/create/lang/en_ud.json
|
e3f618c5b622d21880de858678d1802cbf65e615 assets/create/lang/en_ud.json
|
||||||
3ad443f44eb33fe8c3ac092d1532dcbd27e49c84 assets/create/lang/en_us.json
|
acc852d80378b426d7ee6cb59c169e06b6d63b25 assets/create/lang/en_us.json
|
||||||
612a63d73f7f4b8e79dce3f53ddbe3345f0e74d8 assets/create/lang/unfinished/de_de.json
|
1f5803d0479848c114b3c2b55956dabac01accad assets/create/lang/unfinished/de_de.json
|
||||||
2e37dc718a8dea2af85daba7266c877ce80ff35b assets/create/lang/unfinished/fr_fr.json
|
c81d5b374365ca8fcce1ff7a199b28e3c969c878 assets/create/lang/unfinished/fr_fr.json
|
||||||
f843761728c403276b7a47282f4fdd039b5b6854 assets/create/lang/unfinished/it_it.json
|
5ba7a1a73fb3d08b3777325266c8ed0360302eba assets/create/lang/unfinished/it_it.json
|
||||||
8b90c66fd5974c993e83bfa5733ca03187211d28 assets/create/lang/unfinished/ja_jp.json
|
b7d067002e833c3f9864de2cdb401b30e6569600 assets/create/lang/unfinished/ja_jp.json
|
||||||
59db0a3cff42707ecb828b975ef1fcba2a21a521 assets/create/lang/unfinished/ko_kr.json
|
23aaf879d07a24775aeba3b98c355c992b24f28b assets/create/lang/unfinished/ko_kr.json
|
||||||
b1900a6cce7216a4baa844affa169cfb32ff645c assets/create/lang/unfinished/nl_nl.json
|
7372533759001f094dbcad787f01f3de7422d8c0 assets/create/lang/unfinished/nl_nl.json
|
||||||
d3f09a37b1f4ec5d53effc2b87efbccf2df2b7c7 assets/create/lang/unfinished/pt_br.json
|
0d1e5d79ef196a06b273962d5ac8f2013f91209c assets/create/lang/unfinished/pt_br.json
|
||||||
16c92dab525ba20e85b65ee084f7b760432dcb73 assets/create/lang/unfinished/ru_ru.json
|
6568b0bd677b4b94e98d598852c90dcee07bf4a5 assets/create/lang/unfinished/ru_ru.json
|
||||||
c8b5c2a3a65468950aa713a56bf1c930eef81305 assets/create/lang/unfinished/zh_cn.json
|
1a3cd22ab046498269f80247cf6d6251f4b3dc36 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
|
||||||
@ -751,6 +753,18 @@ f278ec09c13f98ccbce1a8488d4d51c72f398ed4 assets/create/models/block/gabbro_cobbl
|
|||||||
5e50c62a9db350f3a2c0e4b1c37a8dc0d149f287 assets/create/models/block/gabbro_cobblestone_wall_post.json
|
5e50c62a9db350f3a2c0e4b1c37a8dc0d149f287 assets/create/models/block/gabbro_cobblestone_wall_post.json
|
||||||
820235f51e7c3b4c05a327c3aa66618ea1e89c9c assets/create/models/block/gabbro_cobblestone_wall_side.json
|
820235f51e7c3b4c05a327c3aa66618ea1e89c9c assets/create/models/block/gabbro_cobblestone_wall_side.json
|
||||||
ede9c9209f9cee3d8e1ffc5008b1b8b026aee998 assets/create/models/block/gabbro_pillar.json
|
ede9c9209f9cee3d8e1ffc5008b1b8b026aee998 assets/create/models/block/gabbro_pillar.json
|
||||||
|
f7f55d8107d9128f7be42b2a07fd99aeeba44954 assets/create/models/block/gantry_shaft_end_flipped.json
|
||||||
|
33196bb0c2f7ca356fc62854349a3ab5fdf2d119 assets/create/models/block/gantry_shaft_end_powered.json
|
||||||
|
410c0ae1995a079766cab96a3545bb61159feba3 assets/create/models/block/gantry_shaft_end_powered_flipped.json
|
||||||
|
d66f23d811a09c7e3dad5900f9851282be2f64b7 assets/create/models/block/gantry_shaft_middle_flipped.json
|
||||||
|
9551abd37c295fe2541f2aee01dd72bfb71b8ae1 assets/create/models/block/gantry_shaft_middle_powered.json
|
||||||
|
deff4f1163284c22a60d403000c0cd7553d6caff assets/create/models/block/gantry_shaft_middle_powered_flipped.json
|
||||||
|
16eb7950f81e7242d277f5b0b2710ade820f5645 assets/create/models/block/gantry_shaft_single_flipped.json
|
||||||
|
78b51bdfa1d26f909e2d3a3ddb70a5631f4fa75f assets/create/models/block/gantry_shaft_single_powered.json
|
||||||
|
c81b86c2186cbe9867ea041776c8e70059d70f7e assets/create/models/block/gantry_shaft_single_powered_flipped.json
|
||||||
|
347430ecc316d502cea2e0f90d43ff106e9cb15c assets/create/models/block/gantry_shaft_start_flipped.json
|
||||||
|
0e1a5a8f38cd6cd3e2f7d2c0d147d924414b0560 assets/create/models/block/gantry_shaft_start_powered.json
|
||||||
|
4b2f2e9eb3d426b56bb2e0f530b249469200afd0 assets/create/models/block/gantry_shaft_start_powered_flipped.json
|
||||||
392dd57e5b96214335867799347e21ac0d05457a assets/create/models/block/granite_bricks.json
|
392dd57e5b96214335867799347e21ac0d05457a assets/create/models/block/granite_bricks.json
|
||||||
0ee90049ce09f1f1c96063bc7239cd1fadbdb947 assets/create/models/block/granite_bricks_slab.json
|
0ee90049ce09f1f1c96063bc7239cd1fadbdb947 assets/create/models/block/granite_bricks_slab.json
|
||||||
37737d6767ba08b6bd96de1ff3b920522dc3cd51 assets/create/models/block/granite_bricks_slab_top.json
|
37737d6767ba08b6bd96de1ff3b920522dc3cd51 assets/create/models/block/granite_bricks_slab_top.json
|
||||||
@ -1316,6 +1330,8 @@ b10971277417369f421324b28f0a4b47ce4c8625 assets/create/models/item/gabbro_bricks
|
|||||||
b3d7398dbc16c450928bd76b772c273382687447 assets/create/models/item/gabbro_cobblestone_stairs.json
|
b3d7398dbc16c450928bd76b772c273382687447 assets/create/models/item/gabbro_cobblestone_stairs.json
|
||||||
5680f24b43838cb6632bfcedba282a244bd24db0 assets/create/models/item/gabbro_cobblestone_wall.json
|
5680f24b43838cb6632bfcedba282a244bd24db0 assets/create/models/item/gabbro_cobblestone_wall.json
|
||||||
20950b692eecfccd77d96678bb3d909d51f6d787 assets/create/models/item/gabbro_pillar.json
|
20950b692eecfccd77d96678bb3d909d51f6d787 assets/create/models/item/gabbro_pillar.json
|
||||||
|
b10f1b188f2bf380628377bd42af2b8f8ffe5611 assets/create/models/item/gantry_pinion.json
|
||||||
|
b4bfd5041b62f3a0a955fa4872d178b590614f22 assets/create/models/item/gantry_shaft.json
|
||||||
6ab0d17f3d02678ed992e188ff09f6b2c00b5b03 assets/create/models/item/gearbox.json
|
6ab0d17f3d02678ed992e188ff09f6b2c00b5b03 assets/create/models/item/gearbox.json
|
||||||
2fe29893d74c176ea35aed73a169c13dd4ddb2a8 assets/create/models/item/gearshift.json
|
2fe29893d74c176ea35aed73a169c13dd4ddb2a8 assets/create/models/item/gearshift.json
|
||||||
52108a61865dab38133b9f916496ca680ae364ea assets/create/models/item/golden_sheet.json
|
52108a61865dab38133b9f916496ca680ae364ea assets/create/models/item/golden_sheet.json
|
||||||
@ -1727,6 +1743,8 @@ b42213bffce4e51618e1bba481959208d247c120 data/create/advancements/recipes/create
|
|||||||
11d89eca0ccb0f1a8cd27acc9fc0c10d7bf83285 data/create/advancements/recipes/create.base/crafting/kinetics/fluid_pipe.json
|
11d89eca0ccb0f1a8cd27acc9fc0c10d7bf83285 data/create/advancements/recipes/create.base/crafting/kinetics/fluid_pipe.json
|
||||||
a2b33e972c7130cbf105f34d88dd7a9a53d5465c data/create/advancements/recipes/create.base/crafting/kinetics/fluid_tank.json
|
a2b33e972c7130cbf105f34d88dd7a9a53d5465c data/create/advancements/recipes/create.base/crafting/kinetics/fluid_tank.json
|
||||||
a91b11ae44d9b1f479c6dee1f1a4580104059287 data/create/advancements/recipes/create.base/crafting/kinetics/fluid_valve.json
|
a91b11ae44d9b1f479c6dee1f1a4580104059287 data/create/advancements/recipes/create.base/crafting/kinetics/fluid_valve.json
|
||||||
|
e17c45fc17e1a8e1e618b6eae02fa0aba3247495 data/create/advancements/recipes/create.base/crafting/kinetics/gantry_pinion.json
|
||||||
|
d1d2fc2f5c4e89393808c65e015917eabb50dffe data/create/advancements/recipes/create.base/crafting/kinetics/gantry_shaft.json
|
||||||
dae9e65a089955c0367dc1453e104c3153ebad79 data/create/advancements/recipes/create.base/crafting/kinetics/gearbox.json
|
dae9e65a089955c0367dc1453e104c3153ebad79 data/create/advancements/recipes/create.base/crafting/kinetics/gearbox.json
|
||||||
8f9819912605cb2499cb3e79ecb0e709b0e38c19 data/create/advancements/recipes/create.base/crafting/kinetics/gearboxfrom_conversion.json
|
8f9819912605cb2499cb3e79ecb0e709b0e38c19 data/create/advancements/recipes/create.base/crafting/kinetics/gearboxfrom_conversion.json
|
||||||
94b8a1f976b9f853cb6e24b0cef72d2e16c3282f data/create/advancements/recipes/create.base/crafting/kinetics/gearshift.json
|
94b8a1f976b9f853cb6e24b0cef72d2e16c3282f data/create/advancements/recipes/create.base/crafting/kinetics/gearshift.json
|
||||||
@ -2435,6 +2453,8 @@ e51893e1601c470da466b35b17251238e15d0361 data/create/loot_tables/blocks/gabbro_b
|
|||||||
54879fe6ca3b7271fbb94ec26bef1c3031942d4d data/create/loot_tables/blocks/gabbro_cobblestone_stairs.json
|
54879fe6ca3b7271fbb94ec26bef1c3031942d4d data/create/loot_tables/blocks/gabbro_cobblestone_stairs.json
|
||||||
ae19749df10663efc51b8b27af310164f250ed38 data/create/loot_tables/blocks/gabbro_cobblestone_wall.json
|
ae19749df10663efc51b8b27af310164f250ed38 data/create/loot_tables/blocks/gabbro_cobblestone_wall.json
|
||||||
e8d09c919e3b8125d7da0f38383c01bcfc61c7a8 data/create/loot_tables/blocks/gabbro_pillar.json
|
e8d09c919e3b8125d7da0f38383c01bcfc61c7a8 data/create/loot_tables/blocks/gabbro_pillar.json
|
||||||
|
04e42ba63002ed8ba67780123413f6ff3fb85b02 data/create/loot_tables/blocks/gantry_pinion.json
|
||||||
|
f2883656e417a78e5e4093002eb1e36ffa1157e9 data/create/loot_tables/blocks/gantry_shaft.json
|
||||||
b0109b4a4f0f738cbbe6b5911e8c3c0310b76f99 data/create/loot_tables/blocks/gearbox.json
|
b0109b4a4f0f738cbbe6b5911e8c3c0310b76f99 data/create/loot_tables/blocks/gearbox.json
|
||||||
5f39461c5c9d3ad8d84195b06b9468fe2b0fb269 data/create/loot_tables/blocks/gearshift.json
|
5f39461c5c9d3ad8d84195b06b9468fe2b0fb269 data/create/loot_tables/blocks/gearshift.json
|
||||||
c8aa9bbed8fd703eb1853de0b7c9e04dffb7a511 data/create/loot_tables/blocks/glass_fluid_pipe.json
|
c8aa9bbed8fd703eb1853de0b7c9e04dffb7a511 data/create/loot_tables/blocks/glass_fluid_pipe.json
|
||||||
@ -2782,6 +2802,8 @@ f4ae37f736d06ccda5fbba7831a7a174ec916a05 data/create/recipes/crafting/kinetics/f
|
|||||||
86ad4d2820e8e2b01de8d977af7796119dfb7430 data/create/recipes/crafting/kinetics/fluid_tank.json
|
86ad4d2820e8e2b01de8d977af7796119dfb7430 data/create/recipes/crafting/kinetics/fluid_tank.json
|
||||||
3dad2a849796df268cd3a06ed37376f2cc529957 data/create/recipes/crafting/kinetics/fluid_valve.json
|
3dad2a849796df268cd3a06ed37376f2cc529957 data/create/recipes/crafting/kinetics/fluid_valve.json
|
||||||
84153bd478c0e63a04c77579d6595043f604b7ab data/create/recipes/crafting/kinetics/furnace_minecart_from_contraption_cart.json
|
84153bd478c0e63a04c77579d6595043f604b7ab data/create/recipes/crafting/kinetics/furnace_minecart_from_contraption_cart.json
|
||||||
|
5299a12e9272089e64073c8e151b70a5bc57b53c data/create/recipes/crafting/kinetics/gantry_pinion.json
|
||||||
|
21095a156547d4a7d215964be793f1e960b81c09 data/create/recipes/crafting/kinetics/gantry_shaft.json
|
||||||
5eb05cdf88bccdaddfe7ebfbd8b70d1196d422a6 data/create/recipes/crafting/kinetics/gearbox.json
|
5eb05cdf88bccdaddfe7ebfbd8b70d1196d422a6 data/create/recipes/crafting/kinetics/gearbox.json
|
||||||
b5da8c58f6b8aba525ae8a12ad906db37b78a566 data/create/recipes/crafting/kinetics/gearboxfrom_conversion.json
|
b5da8c58f6b8aba525ae8a12ad906db37b78a566 data/create/recipes/crafting/kinetics/gearboxfrom_conversion.json
|
||||||
4d4124b4f1df38d892cb19da19c6464522d3e37d data/create/recipes/crafting/kinetics/gearshift.json
|
4d4124b4f1df38d892cb19da19c6464522d3e37d data/create/recipes/crafting/kinetics/gearshift.json
|
||||||
|
@ -0,0 +1,52 @@
|
|||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"axis_along_first=false,facing=down": {
|
||||||
|
"model": "create:block/gantry_pinion/horizontal",
|
||||||
|
"x": 270,
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"axis_along_first=true,facing=down": {
|
||||||
|
"model": "create:block/gantry_pinion/horizontal",
|
||||||
|
"x": 270
|
||||||
|
},
|
||||||
|
"axis_along_first=false,facing=up": {
|
||||||
|
"model": "create:block/gantry_pinion/horizontal",
|
||||||
|
"x": 90,
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"axis_along_first=true,facing=up": {
|
||||||
|
"model": "create:block/gantry_pinion/horizontal",
|
||||||
|
"x": 90
|
||||||
|
},
|
||||||
|
"axis_along_first=false,facing=north": {
|
||||||
|
"model": "create:block/gantry_pinion/vertical",
|
||||||
|
"y": 180
|
||||||
|
},
|
||||||
|
"axis_along_first=true,facing=north": {
|
||||||
|
"model": "create:block/gantry_pinion/horizontal",
|
||||||
|
"y": 180
|
||||||
|
},
|
||||||
|
"axis_along_first=false,facing=south": {
|
||||||
|
"model": "create:block/gantry_pinion/vertical"
|
||||||
|
},
|
||||||
|
"axis_along_first=true,facing=south": {
|
||||||
|
"model": "create:block/gantry_pinion/horizontal"
|
||||||
|
},
|
||||||
|
"axis_along_first=false,facing=west": {
|
||||||
|
"model": "create:block/gantry_pinion/horizontal",
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"axis_along_first=true,facing=west": {
|
||||||
|
"model": "create:block/gantry_pinion/vertical",
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"axis_along_first=false,facing=east": {
|
||||||
|
"model": "create:block/gantry_pinion/horizontal",
|
||||||
|
"y": 270
|
||||||
|
},
|
||||||
|
"axis_along_first=true,facing=east": {
|
||||||
|
"model": "create:block/gantry_pinion/vertical",
|
||||||
|
"y": 270
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,212 @@
|
|||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"facing=down,part=start,powered=false": {
|
||||||
|
"model": "create:block/gantry_shaft_start_flipped",
|
||||||
|
"x": 180
|
||||||
|
},
|
||||||
|
"facing=up,part=start,powered=false": {
|
||||||
|
"model": "create:block/gantry_shaft/block_start"
|
||||||
|
},
|
||||||
|
"facing=north,part=start,powered=false": {
|
||||||
|
"model": "create:block/gantry_shaft_start_flipped",
|
||||||
|
"x": 90
|
||||||
|
},
|
||||||
|
"facing=south,part=start,powered=false": {
|
||||||
|
"model": "create:block/gantry_shaft/block_start",
|
||||||
|
"x": 90,
|
||||||
|
"y": 180
|
||||||
|
},
|
||||||
|
"facing=west,part=start,powered=false": {
|
||||||
|
"model": "create:block/gantry_shaft_start_flipped",
|
||||||
|
"x": 90,
|
||||||
|
"y": 270
|
||||||
|
},
|
||||||
|
"facing=east,part=start,powered=false": {
|
||||||
|
"model": "create:block/gantry_shaft/block_start",
|
||||||
|
"x": 90,
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"facing=down,part=middle,powered=false": {
|
||||||
|
"model": "create:block/gantry_shaft_middle_flipped",
|
||||||
|
"x": 180
|
||||||
|
},
|
||||||
|
"facing=up,part=middle,powered=false": {
|
||||||
|
"model": "create:block/gantry_shaft/block_middle"
|
||||||
|
},
|
||||||
|
"facing=north,part=middle,powered=false": {
|
||||||
|
"model": "create:block/gantry_shaft_middle_flipped",
|
||||||
|
"x": 90
|
||||||
|
},
|
||||||
|
"facing=south,part=middle,powered=false": {
|
||||||
|
"model": "create:block/gantry_shaft/block_middle",
|
||||||
|
"x": 90,
|
||||||
|
"y": 180
|
||||||
|
},
|
||||||
|
"facing=west,part=middle,powered=false": {
|
||||||
|
"model": "create:block/gantry_shaft_middle_flipped",
|
||||||
|
"x": 90,
|
||||||
|
"y": 270
|
||||||
|
},
|
||||||
|
"facing=east,part=middle,powered=false": {
|
||||||
|
"model": "create:block/gantry_shaft/block_middle",
|
||||||
|
"x": 90,
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"facing=down,part=end,powered=false": {
|
||||||
|
"model": "create:block/gantry_shaft_end_flipped",
|
||||||
|
"x": 180
|
||||||
|
},
|
||||||
|
"facing=up,part=end,powered=false": {
|
||||||
|
"model": "create:block/gantry_shaft/block_end"
|
||||||
|
},
|
||||||
|
"facing=north,part=end,powered=false": {
|
||||||
|
"model": "create:block/gantry_shaft_end_flipped",
|
||||||
|
"x": 90
|
||||||
|
},
|
||||||
|
"facing=south,part=end,powered=false": {
|
||||||
|
"model": "create:block/gantry_shaft/block_end",
|
||||||
|
"x": 90,
|
||||||
|
"y": 180
|
||||||
|
},
|
||||||
|
"facing=west,part=end,powered=false": {
|
||||||
|
"model": "create:block/gantry_shaft_end_flipped",
|
||||||
|
"x": 90,
|
||||||
|
"y": 270
|
||||||
|
},
|
||||||
|
"facing=east,part=end,powered=false": {
|
||||||
|
"model": "create:block/gantry_shaft/block_end",
|
||||||
|
"x": 90,
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"facing=down,part=single,powered=false": {
|
||||||
|
"model": "create:block/gantry_shaft_single_flipped",
|
||||||
|
"x": 180
|
||||||
|
},
|
||||||
|
"facing=up,part=single,powered=false": {
|
||||||
|
"model": "create:block/gantry_shaft/block_single"
|
||||||
|
},
|
||||||
|
"facing=north,part=single,powered=false": {
|
||||||
|
"model": "create:block/gantry_shaft_single_flipped",
|
||||||
|
"x": 90
|
||||||
|
},
|
||||||
|
"facing=south,part=single,powered=false": {
|
||||||
|
"model": "create:block/gantry_shaft/block_single",
|
||||||
|
"x": 90,
|
||||||
|
"y": 180
|
||||||
|
},
|
||||||
|
"facing=west,part=single,powered=false": {
|
||||||
|
"model": "create:block/gantry_shaft_single_flipped",
|
||||||
|
"x": 90,
|
||||||
|
"y": 270
|
||||||
|
},
|
||||||
|
"facing=east,part=single,powered=false": {
|
||||||
|
"model": "create:block/gantry_shaft/block_single",
|
||||||
|
"x": 90,
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"facing=down,part=start,powered=true": {
|
||||||
|
"model": "create:block/gantry_shaft_start_powered_flipped",
|
||||||
|
"x": 180
|
||||||
|
},
|
||||||
|
"facing=up,part=start,powered=true": {
|
||||||
|
"model": "create:block/gantry_shaft_start_powered"
|
||||||
|
},
|
||||||
|
"facing=north,part=start,powered=true": {
|
||||||
|
"model": "create:block/gantry_shaft_start_powered_flipped",
|
||||||
|
"x": 90
|
||||||
|
},
|
||||||
|
"facing=south,part=start,powered=true": {
|
||||||
|
"model": "create:block/gantry_shaft_start_powered",
|
||||||
|
"x": 90,
|
||||||
|
"y": 180
|
||||||
|
},
|
||||||
|
"facing=west,part=start,powered=true": {
|
||||||
|
"model": "create:block/gantry_shaft_start_powered_flipped",
|
||||||
|
"x": 90,
|
||||||
|
"y": 270
|
||||||
|
},
|
||||||
|
"facing=east,part=start,powered=true": {
|
||||||
|
"model": "create:block/gantry_shaft_start_powered",
|
||||||
|
"x": 90,
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"facing=down,part=middle,powered=true": {
|
||||||
|
"model": "create:block/gantry_shaft_middle_powered_flipped",
|
||||||
|
"x": 180
|
||||||
|
},
|
||||||
|
"facing=up,part=middle,powered=true": {
|
||||||
|
"model": "create:block/gantry_shaft_middle_powered"
|
||||||
|
},
|
||||||
|
"facing=north,part=middle,powered=true": {
|
||||||
|
"model": "create:block/gantry_shaft_middle_powered_flipped",
|
||||||
|
"x": 90
|
||||||
|
},
|
||||||
|
"facing=south,part=middle,powered=true": {
|
||||||
|
"model": "create:block/gantry_shaft_middle_powered",
|
||||||
|
"x": 90,
|
||||||
|
"y": 180
|
||||||
|
},
|
||||||
|
"facing=west,part=middle,powered=true": {
|
||||||
|
"model": "create:block/gantry_shaft_middle_powered_flipped",
|
||||||
|
"x": 90,
|
||||||
|
"y": 270
|
||||||
|
},
|
||||||
|
"facing=east,part=middle,powered=true": {
|
||||||
|
"model": "create:block/gantry_shaft_middle_powered",
|
||||||
|
"x": 90,
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"facing=down,part=end,powered=true": {
|
||||||
|
"model": "create:block/gantry_shaft_end_powered_flipped",
|
||||||
|
"x": 180
|
||||||
|
},
|
||||||
|
"facing=up,part=end,powered=true": {
|
||||||
|
"model": "create:block/gantry_shaft_end_powered"
|
||||||
|
},
|
||||||
|
"facing=north,part=end,powered=true": {
|
||||||
|
"model": "create:block/gantry_shaft_end_powered_flipped",
|
||||||
|
"x": 90
|
||||||
|
},
|
||||||
|
"facing=south,part=end,powered=true": {
|
||||||
|
"model": "create:block/gantry_shaft_end_powered",
|
||||||
|
"x": 90,
|
||||||
|
"y": 180
|
||||||
|
},
|
||||||
|
"facing=west,part=end,powered=true": {
|
||||||
|
"model": "create:block/gantry_shaft_end_powered_flipped",
|
||||||
|
"x": 90,
|
||||||
|
"y": 270
|
||||||
|
},
|
||||||
|
"facing=east,part=end,powered=true": {
|
||||||
|
"model": "create:block/gantry_shaft_end_powered",
|
||||||
|
"x": 90,
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"facing=down,part=single,powered=true": {
|
||||||
|
"model": "create:block/gantry_shaft_single_powered_flipped",
|
||||||
|
"x": 180
|
||||||
|
},
|
||||||
|
"facing=up,part=single,powered=true": {
|
||||||
|
"model": "create:block/gantry_shaft_single_powered"
|
||||||
|
},
|
||||||
|
"facing=north,part=single,powered=true": {
|
||||||
|
"model": "create:block/gantry_shaft_single_powered_flipped",
|
||||||
|
"x": 90
|
||||||
|
},
|
||||||
|
"facing=south,part=single,powered=true": {
|
||||||
|
"model": "create:block/gantry_shaft_single_powered",
|
||||||
|
"x": 90,
|
||||||
|
"y": 180
|
||||||
|
},
|
||||||
|
"facing=west,part=single,powered=true": {
|
||||||
|
"model": "create:block/gantry_shaft_single_powered_flipped",
|
||||||
|
"x": 90,
|
||||||
|
"y": 270
|
||||||
|
},
|
||||||
|
"facing=east,part=single,powered=true": {
|
||||||
|
"model": "create:block/gantry_shaft_single_powered",
|
||||||
|
"x": 90,
|
||||||
|
"y": 90
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -158,6 +158,8 @@
|
|||||||
"block.create.gabbro_cobblestone_stairs": "s\u0279\u0131\u0250\u0287S \u01DDuo\u0287s\u01DD\u05DFqqo\u0186 o\u0279qq\u0250\u2141",
|
"block.create.gabbro_cobblestone_stairs": "s\u0279\u0131\u0250\u0287S \u01DDuo\u0287s\u01DD\u05DFqqo\u0186 o\u0279qq\u0250\u2141",
|
||||||
"block.create.gabbro_cobblestone_wall": "\u05DF\u05DF\u0250M \u01DDuo\u0287s\u01DD\u05DFqqo\u0186 o\u0279qq\u0250\u2141",
|
"block.create.gabbro_cobblestone_wall": "\u05DF\u05DF\u0250M \u01DDuo\u0287s\u01DD\u05DFqqo\u0186 o\u0279qq\u0250\u2141",
|
||||||
"block.create.gabbro_pillar": "\u0279\u0250\u05DF\u05DF\u0131\u0500 o\u0279qq\u0250\u2141",
|
"block.create.gabbro_pillar": "\u0279\u0250\u05DF\u05DF\u0131\u0500 o\u0279qq\u0250\u2141",
|
||||||
|
"block.create.gantry_pinion": "uo\u0131u\u0131\u0500 \u028E\u0279\u0287u\u0250\u2141",
|
||||||
|
"block.create.gantry_shaft": "\u0287\u025F\u0250\u0265S \u028E\u0279\u0287u\u0250\u2141",
|
||||||
"block.create.gearbox": "xoq\u0279\u0250\u01DD\u2141",
|
"block.create.gearbox": "xoq\u0279\u0250\u01DD\u2141",
|
||||||
"block.create.gearshift": "\u0287\u025F\u0131\u0265s\u0279\u0250\u01DD\u2141",
|
"block.create.gearshift": "\u0287\u025F\u0131\u0265s\u0279\u0250\u01DD\u2141",
|
||||||
"block.create.glass_fluid_pipe": "\u01DDd\u0131\u0500 p\u0131n\u05DF\u2132 ss\u0250\u05DF\u2141",
|
"block.create.glass_fluid_pipe": "\u01DDd\u0131\u0500 p\u0131n\u05DF\u2132 ss\u0250\u05DF\u2141",
|
||||||
@ -400,6 +402,7 @@
|
|||||||
"block.create.zinc_block": "\u029E\u0254o\u05DF\u15FA \u0254u\u0131Z",
|
"block.create.zinc_block": "\u029E\u0254o\u05DF\u15FA \u0254u\u0131Z",
|
||||||
"block.create.zinc_ore": "\u01DD\u0279O \u0254u\u0131Z",
|
"block.create.zinc_ore": "\u01DD\u0279O \u0254u\u0131Z",
|
||||||
"entity.create.contraption": "uo\u0131\u0287d\u0250\u0279\u0287uo\u0186",
|
"entity.create.contraption": "uo\u0131\u0287d\u0250\u0279\u0287uo\u0186",
|
||||||
|
"entity.create.gantry_contraption": "uo\u0131\u0287d\u0250\u0279\u0287uo\u0186 \u028E\u0279\u0287u\u0250\u2141",
|
||||||
"entity.create.seat": "\u0287\u0250\u01DDS",
|
"entity.create.seat": "\u0287\u0250\u01DDS",
|
||||||
"entity.create.stationary_contraption": "uo\u0131\u0287d\u0250\u0279\u0287uo\u0186 \u028E\u0279\u0250uo\u0131\u0287\u0250\u0287S",
|
"entity.create.stationary_contraption": "uo\u0131\u0287d\u0250\u0279\u0287uo\u0186 \u028E\u0279\u0250uo\u0131\u0287\u0250\u0287S",
|
||||||
"entity.create.super_glue": "\u01DDn\u05DF\u2141 \u0279\u01DDdnS",
|
"entity.create.super_glue": "\u01DDn\u05DF\u2141 \u0279\u01DDdnS",
|
||||||
|
@ -161,6 +161,8 @@
|
|||||||
"block.create.gabbro_cobblestone_stairs": "Gabbro Cobblestone Stairs",
|
"block.create.gabbro_cobblestone_stairs": "Gabbro Cobblestone Stairs",
|
||||||
"block.create.gabbro_cobblestone_wall": "Gabbro Cobblestone Wall",
|
"block.create.gabbro_cobblestone_wall": "Gabbro Cobblestone Wall",
|
||||||
"block.create.gabbro_pillar": "Gabbro Pillar",
|
"block.create.gabbro_pillar": "Gabbro Pillar",
|
||||||
|
"block.create.gantry_pinion": "Gantry Pinion",
|
||||||
|
"block.create.gantry_shaft": "Gantry Shaft",
|
||||||
"block.create.gearbox": "Gearbox",
|
"block.create.gearbox": "Gearbox",
|
||||||
"block.create.gearshift": "Gearshift",
|
"block.create.gearshift": "Gearshift",
|
||||||
"block.create.glass_fluid_pipe": "Glass Fluid Pipe",
|
"block.create.glass_fluid_pipe": "Glass Fluid Pipe",
|
||||||
@ -404,6 +406,7 @@
|
|||||||
"block.create.zinc_ore": "Zinc Ore",
|
"block.create.zinc_ore": "Zinc Ore",
|
||||||
|
|
||||||
"entity.create.contraption": "Contraption",
|
"entity.create.contraption": "Contraption",
|
||||||
|
"entity.create.gantry_contraption": "Gantry Contraption",
|
||||||
"entity.create.seat": "Seat",
|
"entity.create.seat": "Seat",
|
||||||
"entity.create.stationary_contraption": "Stationary Contraption",
|
"entity.create.stationary_contraption": "Stationary Contraption",
|
||||||
"entity.create.super_glue": "Super Glue",
|
"entity.create.super_glue": "Super Glue",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"_": "Missing Localizations: 1211",
|
"_": "Missing Localizations: 1214",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
@ -162,6 +162,8 @@
|
|||||||
"block.create.gabbro_cobblestone_stairs": "UNLOCALIZED: Gabbro Cobblestone Stairs",
|
"block.create.gabbro_cobblestone_stairs": "UNLOCALIZED: Gabbro Cobblestone Stairs",
|
||||||
"block.create.gabbro_cobblestone_wall": "UNLOCALIZED: Gabbro Cobblestone Wall",
|
"block.create.gabbro_cobblestone_wall": "UNLOCALIZED: Gabbro Cobblestone Wall",
|
||||||
"block.create.gabbro_pillar": "UNLOCALIZED: Gabbro Pillar",
|
"block.create.gabbro_pillar": "UNLOCALIZED: Gabbro Pillar",
|
||||||
|
"block.create.gantry_pinion": "UNLOCALIZED: Gantry Pinion",
|
||||||
|
"block.create.gantry_shaft": "UNLOCALIZED: Gantry Shaft",
|
||||||
"block.create.gearbox": "Getriebe",
|
"block.create.gearbox": "Getriebe",
|
||||||
"block.create.gearshift": "Gangschaltung",
|
"block.create.gearshift": "Gangschaltung",
|
||||||
"block.create.glass_fluid_pipe": "UNLOCALIZED: Glass Fluid Pipe",
|
"block.create.glass_fluid_pipe": "UNLOCALIZED: Glass Fluid Pipe",
|
||||||
@ -405,6 +407,7 @@
|
|||||||
"block.create.zinc_ore": "UNLOCALIZED: Zinc Ore",
|
"block.create.zinc_ore": "UNLOCALIZED: Zinc Ore",
|
||||||
|
|
||||||
"entity.create.contraption": "UNLOCALIZED: Contraption",
|
"entity.create.contraption": "UNLOCALIZED: Contraption",
|
||||||
|
"entity.create.gantry_contraption": "UNLOCALIZED: Gantry Contraption",
|
||||||
"entity.create.seat": "UNLOCALIZED: Seat",
|
"entity.create.seat": "UNLOCALIZED: Seat",
|
||||||
"entity.create.stationary_contraption": "UNLOCALIZED: Stationary Contraption",
|
"entity.create.stationary_contraption": "UNLOCALIZED: Stationary Contraption",
|
||||||
"entity.create.super_glue": "UNLOCALIZED: Super Glue",
|
"entity.create.super_glue": "UNLOCALIZED: Super Glue",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"_": "Missing Localizations: 862",
|
"_": "Missing Localizations: 865",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
@ -162,6 +162,8 @@
|
|||||||
"block.create.gabbro_cobblestone_stairs": "UNLOCALIZED: Gabbro Cobblestone Stairs",
|
"block.create.gabbro_cobblestone_stairs": "UNLOCALIZED: Gabbro Cobblestone Stairs",
|
||||||
"block.create.gabbro_cobblestone_wall": "UNLOCALIZED: Gabbro Cobblestone Wall",
|
"block.create.gabbro_cobblestone_wall": "UNLOCALIZED: Gabbro Cobblestone Wall",
|
||||||
"block.create.gabbro_pillar": "UNLOCALIZED: Gabbro Pillar",
|
"block.create.gabbro_pillar": "UNLOCALIZED: Gabbro Pillar",
|
||||||
|
"block.create.gantry_pinion": "UNLOCALIZED: Gantry Pinion",
|
||||||
|
"block.create.gantry_shaft": "UNLOCALIZED: Gantry Shaft",
|
||||||
"block.create.gearbox": "Boîte à roue dentée",
|
"block.create.gearbox": "Boîte à roue dentée",
|
||||||
"block.create.gearshift": "Décaleur de rotation",
|
"block.create.gearshift": "Décaleur de rotation",
|
||||||
"block.create.glass_fluid_pipe": "UNLOCALIZED: Glass Fluid Pipe",
|
"block.create.glass_fluid_pipe": "UNLOCALIZED: Glass Fluid Pipe",
|
||||||
@ -405,6 +407,7 @@
|
|||||||
"block.create.zinc_ore": "Minerai de zinc",
|
"block.create.zinc_ore": "Minerai de zinc",
|
||||||
|
|
||||||
"entity.create.contraption": "UNLOCALIZED: Contraption",
|
"entity.create.contraption": "UNLOCALIZED: Contraption",
|
||||||
|
"entity.create.gantry_contraption": "UNLOCALIZED: Gantry Contraption",
|
||||||
"entity.create.seat": "UNLOCALIZED: Seat",
|
"entity.create.seat": "UNLOCALIZED: Seat",
|
||||||
"entity.create.stationary_contraption": "UNLOCALIZED: Stationary Contraption",
|
"entity.create.stationary_contraption": "UNLOCALIZED: Stationary Contraption",
|
||||||
"entity.create.super_glue": "UNLOCALIZED: Super Glue",
|
"entity.create.super_glue": "UNLOCALIZED: Super Glue",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"_": "Missing Localizations: 846",
|
"_": "Missing Localizations: 849",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
@ -162,6 +162,8 @@
|
|||||||
"block.create.gabbro_cobblestone_stairs": "UNLOCALIZED: Gabbro Cobblestone Stairs",
|
"block.create.gabbro_cobblestone_stairs": "UNLOCALIZED: Gabbro Cobblestone Stairs",
|
||||||
"block.create.gabbro_cobblestone_wall": "UNLOCALIZED: Gabbro Cobblestone Wall",
|
"block.create.gabbro_cobblestone_wall": "UNLOCALIZED: Gabbro Cobblestone Wall",
|
||||||
"block.create.gabbro_pillar": "UNLOCALIZED: Gabbro Pillar",
|
"block.create.gabbro_pillar": "UNLOCALIZED: Gabbro Pillar",
|
||||||
|
"block.create.gantry_pinion": "UNLOCALIZED: Gantry Pinion",
|
||||||
|
"block.create.gantry_shaft": "UNLOCALIZED: Gantry Shaft",
|
||||||
"block.create.gearbox": "Riduttore",
|
"block.create.gearbox": "Riduttore",
|
||||||
"block.create.gearshift": "Cambio",
|
"block.create.gearshift": "Cambio",
|
||||||
"block.create.glass_fluid_pipe": "UNLOCALIZED: Glass Fluid Pipe",
|
"block.create.glass_fluid_pipe": "UNLOCALIZED: Glass Fluid Pipe",
|
||||||
@ -405,6 +407,7 @@
|
|||||||
"block.create.zinc_ore": "Zinco Grezzo",
|
"block.create.zinc_ore": "Zinco Grezzo",
|
||||||
|
|
||||||
"entity.create.contraption": "UNLOCALIZED: Contraption",
|
"entity.create.contraption": "UNLOCALIZED: Contraption",
|
||||||
|
"entity.create.gantry_contraption": "UNLOCALIZED: Gantry Contraption",
|
||||||
"entity.create.seat": "UNLOCALIZED: Seat",
|
"entity.create.seat": "UNLOCALIZED: Seat",
|
||||||
"entity.create.stationary_contraption": "UNLOCALIZED: Stationary Contraption",
|
"entity.create.stationary_contraption": "UNLOCALIZED: Stationary Contraption",
|
||||||
"entity.create.super_glue": "UNLOCALIZED: Super Glue",
|
"entity.create.super_glue": "UNLOCALIZED: Super Glue",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"_": "Missing Localizations: 845",
|
"_": "Missing Localizations: 848",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
@ -162,6 +162,8 @@
|
|||||||
"block.create.gabbro_cobblestone_stairs": "UNLOCALIZED: Gabbro Cobblestone Stairs",
|
"block.create.gabbro_cobblestone_stairs": "UNLOCALIZED: Gabbro Cobblestone Stairs",
|
||||||
"block.create.gabbro_cobblestone_wall": "UNLOCALIZED: Gabbro Cobblestone Wall",
|
"block.create.gabbro_cobblestone_wall": "UNLOCALIZED: Gabbro Cobblestone Wall",
|
||||||
"block.create.gabbro_pillar": "UNLOCALIZED: Gabbro Pillar",
|
"block.create.gabbro_pillar": "UNLOCALIZED: Gabbro Pillar",
|
||||||
|
"block.create.gantry_pinion": "UNLOCALIZED: Gantry Pinion",
|
||||||
|
"block.create.gantry_shaft": "UNLOCALIZED: Gantry Shaft",
|
||||||
"block.create.gearbox": "ギアボックス",
|
"block.create.gearbox": "ギアボックス",
|
||||||
"block.create.gearshift": "ギアシフト",
|
"block.create.gearshift": "ギアシフト",
|
||||||
"block.create.glass_fluid_pipe": "UNLOCALIZED: Glass Fluid Pipe",
|
"block.create.glass_fluid_pipe": "UNLOCALIZED: Glass Fluid Pipe",
|
||||||
@ -405,6 +407,7 @@
|
|||||||
"block.create.zinc_ore": "亜鉛鉱石",
|
"block.create.zinc_ore": "亜鉛鉱石",
|
||||||
|
|
||||||
"entity.create.contraption": "UNLOCALIZED: Contraption",
|
"entity.create.contraption": "UNLOCALIZED: Contraption",
|
||||||
|
"entity.create.gantry_contraption": "UNLOCALIZED: Gantry Contraption",
|
||||||
"entity.create.seat": "UNLOCALIZED: Seat",
|
"entity.create.seat": "UNLOCALIZED: Seat",
|
||||||
"entity.create.stationary_contraption": "UNLOCALIZED: Stationary Contraption",
|
"entity.create.stationary_contraption": "UNLOCALIZED: Stationary Contraption",
|
||||||
"entity.create.super_glue": "UNLOCALIZED: Super Glue",
|
"entity.create.super_glue": "UNLOCALIZED: Super Glue",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"_": "Missing Localizations: 52",
|
"_": "Missing Localizations: 55",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
@ -162,6 +162,8 @@
|
|||||||
"block.create.gabbro_cobblestone_stairs": "반려암 조약돌 계단",
|
"block.create.gabbro_cobblestone_stairs": "반려암 조약돌 계단",
|
||||||
"block.create.gabbro_cobblestone_wall": "반려암 조약돌 담장",
|
"block.create.gabbro_cobblestone_wall": "반려암 조약돌 담장",
|
||||||
"block.create.gabbro_pillar": "반려암 기둥",
|
"block.create.gabbro_pillar": "반려암 기둥",
|
||||||
|
"block.create.gantry_pinion": "UNLOCALIZED: Gantry Pinion",
|
||||||
|
"block.create.gantry_shaft": "UNLOCALIZED: Gantry Shaft",
|
||||||
"block.create.gearbox": "기어박스",
|
"block.create.gearbox": "기어박스",
|
||||||
"block.create.gearshift": "기어쉬프트",
|
"block.create.gearshift": "기어쉬프트",
|
||||||
"block.create.glass_fluid_pipe": "액체 파이프",
|
"block.create.glass_fluid_pipe": "액체 파이프",
|
||||||
@ -405,6 +407,7 @@
|
|||||||
"block.create.zinc_ore": "아연 광석",
|
"block.create.zinc_ore": "아연 광석",
|
||||||
|
|
||||||
"entity.create.contraption": "장치",
|
"entity.create.contraption": "장치",
|
||||||
|
"entity.create.gantry_contraption": "UNLOCALIZED: Gantry Contraption",
|
||||||
"entity.create.seat": "좌석",
|
"entity.create.seat": "좌석",
|
||||||
"entity.create.stationary_contraption": "고정된 장치",
|
"entity.create.stationary_contraption": "고정된 장치",
|
||||||
"entity.create.super_glue": "강력 접착제",
|
"entity.create.super_glue": "강력 접착제",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"_": "Missing Localizations: 1152",
|
"_": "Missing Localizations: 1155",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
@ -162,6 +162,8 @@
|
|||||||
"block.create.gabbro_cobblestone_stairs": "UNLOCALIZED: Gabbro Cobblestone Stairs",
|
"block.create.gabbro_cobblestone_stairs": "UNLOCALIZED: Gabbro Cobblestone Stairs",
|
||||||
"block.create.gabbro_cobblestone_wall": "UNLOCALIZED: Gabbro Cobblestone Wall",
|
"block.create.gabbro_cobblestone_wall": "UNLOCALIZED: Gabbro Cobblestone Wall",
|
||||||
"block.create.gabbro_pillar": "UNLOCALIZED: Gabbro Pillar",
|
"block.create.gabbro_pillar": "UNLOCALIZED: Gabbro Pillar",
|
||||||
|
"block.create.gantry_pinion": "UNLOCALIZED: Gantry Pinion",
|
||||||
|
"block.create.gantry_shaft": "UNLOCALIZED: Gantry Shaft",
|
||||||
"block.create.gearbox": "Versnellingsbak",
|
"block.create.gearbox": "Versnellingsbak",
|
||||||
"block.create.gearshift": "Versnellingspook",
|
"block.create.gearshift": "Versnellingspook",
|
||||||
"block.create.glass_fluid_pipe": "UNLOCALIZED: Glass Fluid Pipe",
|
"block.create.glass_fluid_pipe": "UNLOCALIZED: Glass Fluid Pipe",
|
||||||
@ -405,6 +407,7 @@
|
|||||||
"block.create.zinc_ore": "UNLOCALIZED: Zinc Ore",
|
"block.create.zinc_ore": "UNLOCALIZED: Zinc Ore",
|
||||||
|
|
||||||
"entity.create.contraption": "UNLOCALIZED: Contraption",
|
"entity.create.contraption": "UNLOCALIZED: Contraption",
|
||||||
|
"entity.create.gantry_contraption": "UNLOCALIZED: Gantry Contraption",
|
||||||
"entity.create.seat": "UNLOCALIZED: Seat",
|
"entity.create.seat": "UNLOCALIZED: Seat",
|
||||||
"entity.create.stationary_contraption": "UNLOCALIZED: Stationary Contraption",
|
"entity.create.stationary_contraption": "UNLOCALIZED: Stationary Contraption",
|
||||||
"entity.create.super_glue": "UNLOCALIZED: Super Glue",
|
"entity.create.super_glue": "UNLOCALIZED: Super Glue",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"_": "Missing Localizations: 1218",
|
"_": "Missing Localizations: 1221",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
@ -162,6 +162,8 @@
|
|||||||
"block.create.gabbro_cobblestone_stairs": "UNLOCALIZED: Gabbro Cobblestone Stairs",
|
"block.create.gabbro_cobblestone_stairs": "UNLOCALIZED: Gabbro Cobblestone Stairs",
|
||||||
"block.create.gabbro_cobblestone_wall": "UNLOCALIZED: Gabbro Cobblestone Wall",
|
"block.create.gabbro_cobblestone_wall": "UNLOCALIZED: Gabbro Cobblestone Wall",
|
||||||
"block.create.gabbro_pillar": "UNLOCALIZED: Gabbro Pillar",
|
"block.create.gabbro_pillar": "UNLOCALIZED: Gabbro Pillar",
|
||||||
|
"block.create.gantry_pinion": "UNLOCALIZED: Gantry Pinion",
|
||||||
|
"block.create.gantry_shaft": "UNLOCALIZED: Gantry Shaft",
|
||||||
"block.create.gearbox": "Caixa de Transmissão",
|
"block.create.gearbox": "Caixa de Transmissão",
|
||||||
"block.create.gearshift": "Câmbio",
|
"block.create.gearshift": "Câmbio",
|
||||||
"block.create.glass_fluid_pipe": "UNLOCALIZED: Glass Fluid Pipe",
|
"block.create.glass_fluid_pipe": "UNLOCALIZED: Glass Fluid Pipe",
|
||||||
@ -405,6 +407,7 @@
|
|||||||
"block.create.zinc_ore": "UNLOCALIZED: Zinc Ore",
|
"block.create.zinc_ore": "UNLOCALIZED: Zinc Ore",
|
||||||
|
|
||||||
"entity.create.contraption": "UNLOCALIZED: Contraption",
|
"entity.create.contraption": "UNLOCALIZED: Contraption",
|
||||||
|
"entity.create.gantry_contraption": "UNLOCALIZED: Gantry Contraption",
|
||||||
"entity.create.seat": "UNLOCALIZED: Seat",
|
"entity.create.seat": "UNLOCALIZED: Seat",
|
||||||
"entity.create.stationary_contraption": "UNLOCALIZED: Stationary Contraption",
|
"entity.create.stationary_contraption": "UNLOCALIZED: Stationary Contraption",
|
||||||
"entity.create.super_glue": "UNLOCALIZED: Super Glue",
|
"entity.create.super_glue": "UNLOCALIZED: Super Glue",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"_": "Missing Localizations: 2",
|
"_": "Missing Localizations: 5",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
@ -162,6 +162,8 @@
|
|||||||
"block.create.gabbro_cobblestone_stairs": "Ступени из габбро-булыжника",
|
"block.create.gabbro_cobblestone_stairs": "Ступени из габбро-булыжника",
|
||||||
"block.create.gabbro_cobblestone_wall": "Стена из габбро-булыжника",
|
"block.create.gabbro_cobblestone_wall": "Стена из габбро-булыжника",
|
||||||
"block.create.gabbro_pillar": "Габбро колонна",
|
"block.create.gabbro_pillar": "Габбро колонна",
|
||||||
|
"block.create.gantry_pinion": "UNLOCALIZED: Gantry Pinion",
|
||||||
|
"block.create.gantry_shaft": "UNLOCALIZED: Gantry Shaft",
|
||||||
"block.create.gearbox": "Коробка передач",
|
"block.create.gearbox": "Коробка передач",
|
||||||
"block.create.gearshift": "Реверсивный механизм",
|
"block.create.gearshift": "Реверсивный механизм",
|
||||||
"block.create.glass_fluid_pipe": "Стеклянная жидкостная труба",
|
"block.create.glass_fluid_pipe": "Стеклянная жидкостная труба",
|
||||||
@ -405,6 +407,7 @@
|
|||||||
"block.create.zinc_ore": "Цинковая руда",
|
"block.create.zinc_ore": "Цинковая руда",
|
||||||
|
|
||||||
"entity.create.contraption": "Штуковина",
|
"entity.create.contraption": "Штуковина",
|
||||||
|
"entity.create.gantry_contraption": "UNLOCALIZED: Gantry Contraption",
|
||||||
"entity.create.seat": "сиденье",
|
"entity.create.seat": "сиденье",
|
||||||
"entity.create.stationary_contraption": "Стационарная штуковина",
|
"entity.create.stationary_contraption": "Стационарная штуковина",
|
||||||
"entity.create.super_glue": "Супер-клей",
|
"entity.create.super_glue": "Супер-клей",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"_": "Missing Localizations: 5",
|
"_": "Missing Localizations: 8",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
@ -162,6 +162,8 @@
|
|||||||
"block.create.gabbro_cobblestone_stairs": "辉长岩圆石楼梯",
|
"block.create.gabbro_cobblestone_stairs": "辉长岩圆石楼梯",
|
||||||
"block.create.gabbro_cobblestone_wall": "辉长岩圆石墙",
|
"block.create.gabbro_cobblestone_wall": "辉长岩圆石墙",
|
||||||
"block.create.gabbro_pillar": "竖纹辉长岩",
|
"block.create.gabbro_pillar": "竖纹辉长岩",
|
||||||
|
"block.create.gantry_pinion": "UNLOCALIZED: Gantry Pinion",
|
||||||
|
"block.create.gantry_shaft": "UNLOCALIZED: Gantry Shaft",
|
||||||
"block.create.gearbox": "十字齿轮箱",
|
"block.create.gearbox": "十字齿轮箱",
|
||||||
"block.create.gearshift": "换挡齿轮箱",
|
"block.create.gearshift": "换挡齿轮箱",
|
||||||
"block.create.glass_fluid_pipe": "玻璃流体管道",
|
"block.create.glass_fluid_pipe": "玻璃流体管道",
|
||||||
@ -405,6 +407,7 @@
|
|||||||
"block.create.zinc_ore": "锌矿石",
|
"block.create.zinc_ore": "锌矿石",
|
||||||
|
|
||||||
"entity.create.contraption": "结构",
|
"entity.create.contraption": "结构",
|
||||||
|
"entity.create.gantry_contraption": "UNLOCALIZED: Gantry Contraption",
|
||||||
"entity.create.seat": "坐垫",
|
"entity.create.seat": "坐垫",
|
||||||
"entity.create.stationary_contraption": "固定结构",
|
"entity.create.stationary_contraption": "固定结构",
|
||||||
"entity.create.super_glue": "强力胶",
|
"entity.create.super_glue": "强力胶",
|
||||||
|
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "create:block/gantry_shaft/block_end",
|
||||||
|
"textures": {
|
||||||
|
"2": "create:block/gantry_shaft_flipped"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "create:block/gantry_shaft/block_end",
|
||||||
|
"textures": {
|
||||||
|
"2": "create:block/gantry_shaft_powered"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "create:block/gantry_shaft/block_end",
|
||||||
|
"textures": {
|
||||||
|
"2": "create:block/gantry_shaft_powered_flipped"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "create:block/gantry_shaft/block_middle",
|
||||||
|
"textures": {
|
||||||
|
"2": "create:block/gantry_shaft_flipped"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "create:block/gantry_shaft/block_middle",
|
||||||
|
"textures": {
|
||||||
|
"2": "create:block/gantry_shaft_powered"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "create:block/gantry_shaft/block_middle",
|
||||||
|
"textures": {
|
||||||
|
"2": "create:block/gantry_shaft_powered_flipped"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "create:block/gantry_shaft/block_single",
|
||||||
|
"textures": {
|
||||||
|
"2": "create:block/gantry_shaft_flipped"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "create:block/gantry_shaft/block_single",
|
||||||
|
"textures": {
|
||||||
|
"2": "create:block/gantry_shaft_powered"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "create:block/gantry_shaft/block_single",
|
||||||
|
"textures": {
|
||||||
|
"2": "create:block/gantry_shaft_powered_flipped"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "create:block/gantry_shaft/block_start",
|
||||||
|
"textures": {
|
||||||
|
"2": "create:block/gantry_shaft_flipped"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "create:block/gantry_shaft/block_start",
|
||||||
|
"textures": {
|
||||||
|
"2": "create:block/gantry_shaft_powered"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "create:block/gantry_shaft/block_start",
|
||||||
|
"textures": {
|
||||||
|
"2": "create:block/gantry_shaft_powered_flipped"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"parent": "create:block/gantry_pinion/item"
|
||||||
|
}
|
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"parent": "create:block/gantry_shaft/block_single"
|
||||||
|
}
|
@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
"parent": "minecraft:recipes/root",
|
||||||
|
"rewards": {
|
||||||
|
"recipes": [
|
||||||
|
"create:crafting/kinetics/gantry_pinion"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"criteria": {
|
||||||
|
"has_item": {
|
||||||
|
"trigger": "minecraft:inventory_changed",
|
||||||
|
"conditions": {
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"item": "create:andesite_casing"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"has_the_recipe": {
|
||||||
|
"trigger": "minecraft:recipe_unlocked",
|
||||||
|
"conditions": {
|
||||||
|
"recipe": "create:crafting/kinetics/gantry_pinion"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"requirements": [
|
||||||
|
[
|
||||||
|
"has_item",
|
||||||
|
"has_the_recipe"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
"parent": "minecraft:recipes/root",
|
||||||
|
"rewards": {
|
||||||
|
"recipes": [
|
||||||
|
"create:crafting/kinetics/gantry_shaft"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"criteria": {
|
||||||
|
"has_item": {
|
||||||
|
"trigger": "minecraft:inventory_changed",
|
||||||
|
"conditions": {
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"item": "create:andesite_alloy"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"has_the_recipe": {
|
||||||
|
"trigger": "minecraft:recipe_unlocked",
|
||||||
|
"conditions": {
|
||||||
|
"recipe": "create:crafting/kinetics/gantry_shaft"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"requirements": [
|
||||||
|
[
|
||||||
|
"has_item",
|
||||||
|
"has_the_recipe"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"type": "minecraft:block",
|
||||||
|
"pools": [
|
||||||
|
{
|
||||||
|
"rolls": 1,
|
||||||
|
"entries": [
|
||||||
|
{
|
||||||
|
"type": "minecraft:item",
|
||||||
|
"name": "create:gantry_pinion"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"conditions": [
|
||||||
|
{
|
||||||
|
"condition": "minecraft:survives_explosion"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"type": "minecraft:block",
|
||||||
|
"pools": [
|
||||||
|
{
|
||||||
|
"rolls": 1,
|
||||||
|
"entries": [
|
||||||
|
{
|
||||||
|
"type": "minecraft:item",
|
||||||
|
"name": "create:gantry_shaft"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"conditions": [
|
||||||
|
{
|
||||||
|
"condition": "minecraft:survives_explosion"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"pattern": [
|
||||||
|
" B ",
|
||||||
|
"ICI",
|
||||||
|
" S "
|
||||||
|
],
|
||||||
|
"key": {
|
||||||
|
"B": {
|
||||||
|
"tag": "minecraft:planks"
|
||||||
|
},
|
||||||
|
"S": {
|
||||||
|
"item": "create:cogwheel"
|
||||||
|
},
|
||||||
|
"C": {
|
||||||
|
"item": "create:andesite_casing"
|
||||||
|
},
|
||||||
|
"I": {
|
||||||
|
"item": "create:shaft"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"item": "create:gantry_pinion"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"pattern": [
|
||||||
|
"A",
|
||||||
|
"R",
|
||||||
|
"A"
|
||||||
|
],
|
||||||
|
"key": {
|
||||||
|
"A": {
|
||||||
|
"item": "create:andesite_alloy"
|
||||||
|
},
|
||||||
|
"R": {
|
||||||
|
"tag": "forge:dusts/redstone"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"item": "create:gantry_shaft",
|
||||||
|
"count": 8
|
||||||
|
}
|
||||||
|
}
|
@ -71,6 +71,8 @@ public class AllBlockPartials {
|
|||||||
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"),
|
CUCKOO_CREEPER = get("cuckoo_clock/creeper"),
|
||||||
|
|
||||||
|
GANTRY_COGS = get("gantry_pinion/wheels"),
|
||||||
|
|
||||||
ROPE_COIL = get("rope_pulley/rope_coil"),
|
ROPE_COIL = get("rope_pulley/rope_coil"),
|
||||||
ROPE_HALF = get("rope_pulley/rope_half"),
|
ROPE_HALF = get("rope_pulley/rope_half"),
|
||||||
ROPE_HALF_MAGNET = get("rope_pulley/rope_half_magnet"),
|
ROPE_HALF_MAGNET = get("rope_pulley/rope_half_magnet"),
|
||||||
|
@ -54,6 +54,7 @@ import com.simibubi.create.content.contraptions.components.structureMovement.bea
|
|||||||
import com.simibubi.create.content.contraptions.components.structureMovement.chassis.LinearChassisBlock;
|
import com.simibubi.create.content.contraptions.components.structureMovement.chassis.LinearChassisBlock;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.chassis.LinearChassisBlock.ChassisCTBehaviour;
|
import com.simibubi.create.content.contraptions.components.structureMovement.chassis.LinearChassisBlock.ChassisCTBehaviour;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.chassis.RadialChassisBlock;
|
import com.simibubi.create.content.contraptions.components.structureMovement.chassis.RadialChassisBlock;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.gantry.GantryPinionBlock;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.mounted.CartAssemblerBlock;
|
import com.simibubi.create.content.contraptions.components.structureMovement.mounted.CartAssemblerBlock;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.mounted.CartAssemblerBlock.MinecartAnchorBlock;
|
import com.simibubi.create.content.contraptions.components.structureMovement.mounted.CartAssemblerBlock.MinecartAnchorBlock;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.mounted.CartAssemblerBlockItem;
|
import com.simibubi.create.content.contraptions.components.structureMovement.mounted.CartAssemblerBlockItem;
|
||||||
@ -90,6 +91,7 @@ import com.simibubi.create.content.contraptions.processing.BasinMovementBehaviou
|
|||||||
import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlock;
|
import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlock;
|
||||||
import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlockItem;
|
import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlockItem;
|
||||||
import com.simibubi.create.content.contraptions.processing.burner.LitBlazeBurnerBlock;
|
import com.simibubi.create.content.contraptions.processing.burner.LitBlazeBurnerBlock;
|
||||||
|
import com.simibubi.create.content.contraptions.relays.advanced.GantryShaftBlock;
|
||||||
import com.simibubi.create.content.contraptions.relays.advanced.SpeedControllerBlock;
|
import com.simibubi.create.content.contraptions.relays.advanced.SpeedControllerBlock;
|
||||||
import com.simibubi.create.content.contraptions.relays.advanced.sequencer.SequencedGearshiftBlock;
|
import com.simibubi.create.content.contraptions.relays.advanced.sequencer.SequencedGearshiftBlock;
|
||||||
import com.simibubi.create.content.contraptions.relays.advanced.sequencer.SequencedGearshiftGenerator;
|
import com.simibubi.create.content.contraptions.relays.advanced.sequencer.SequencedGearshiftGenerator;
|
||||||
@ -171,8 +173,10 @@ import net.minecraft.item.Item;
|
|||||||
import net.minecraft.state.properties.PistonType;
|
import net.minecraft.state.properties.PistonType;
|
||||||
import net.minecraft.tags.BlockTags;
|
import net.minecraft.tags.BlockTags;
|
||||||
import net.minecraft.tags.ItemTags;
|
import net.minecraft.tags.ItemTags;
|
||||||
|
import net.minecraft.util.Direction.AxisDirection;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraftforge.client.model.generators.ConfiguredModel;
|
import net.minecraftforge.client.model.generators.ConfiguredModel;
|
||||||
|
import net.minecraftforge.client.model.generators.ModelFile;
|
||||||
import net.minecraftforge.common.Tags;
|
import net.minecraftforge.common.Tags;
|
||||||
import net.minecraftforge.common.ToolType;
|
import net.minecraftforge.common.ToolType;
|
||||||
|
|
||||||
@ -686,6 +690,38 @@ public class AllBlocks {
|
|||||||
.getName() + "/head"))))
|
.getName() + "/head"))))
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
|
public static final BlockEntry<GantryPinionBlock> GANTRY_PINION =
|
||||||
|
REGISTRATE.block("gantry_pinion", GantryPinionBlock::new)
|
||||||
|
.initialProperties(SharedProperties::stone)
|
||||||
|
.properties(Block.Properties::nonOpaque)
|
||||||
|
.blockstate(BlockStateGen.directionalAxisBlockProvider())
|
||||||
|
.item()
|
||||||
|
.transform(customItemModel())
|
||||||
|
.register();
|
||||||
|
|
||||||
|
public static final BlockEntry<GantryShaftBlock> GANTRY_SHAFT =
|
||||||
|
REGISTRATE.block("gantry_shaft", GantryShaftBlock::new)
|
||||||
|
.initialProperties(SharedProperties::stone)
|
||||||
|
.blockstate((c, p) -> p.directionalBlock(c.get(), s -> {
|
||||||
|
boolean isPowered = s.get(GantryShaftBlock.POWERED);
|
||||||
|
boolean isFlipped = s.get(GantryShaftBlock.FACING)
|
||||||
|
.getAxisDirection() == AxisDirection.NEGATIVE;
|
||||||
|
String partName = s.get(GantryShaftBlock.PART)
|
||||||
|
.getName();
|
||||||
|
String flipped = isFlipped ? "_flipped" : "";
|
||||||
|
String powered = isPowered ? "_powered" : "";
|
||||||
|
ModelFile existing = AssetLookup.partialBaseModel(c, p, partName);
|
||||||
|
if (!isPowered && !isFlipped)
|
||||||
|
return existing;
|
||||||
|
return p.models()
|
||||||
|
.withExistingParent("block/" + c.getName() + "_" + partName + powered + flipped,
|
||||||
|
existing.getLocation())
|
||||||
|
.texture("2", p.modLoc("block/" + c.getName() + powered + flipped));
|
||||||
|
}))
|
||||||
|
.item()
|
||||||
|
.transform(customItemModel("_", "block_single"))
|
||||||
|
.register();
|
||||||
|
|
||||||
public static final BlockEntry<WindmillBearingBlock> WINDMILL_BEARING =
|
public static final BlockEntry<WindmillBearingBlock> WINDMILL_BEARING =
|
||||||
REGISTRATE.block("windmill_bearing", WindmillBearingBlock::new)
|
REGISTRATE.block("windmill_bearing", WindmillBearingBlock::new)
|
||||||
.transform(BuilderTransformers.bearing("windmill", "gearbox", true))
|
.transform(BuilderTransformers.bearing("windmill", "gearbox", true))
|
||||||
|
@ -6,6 +6,8 @@ import com.simibubi.create.content.contraptions.components.structureMovement.Con
|
|||||||
import com.simibubi.create.content.contraptions.components.structureMovement.ControlledContraptionEntityRenderer;
|
import com.simibubi.create.content.contraptions.components.structureMovement.ControlledContraptionEntityRenderer;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.OrientedContraptionEntity;
|
import com.simibubi.create.content.contraptions.components.structureMovement.OrientedContraptionEntity;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.OrientedContraptionEntityRenderer;
|
import com.simibubi.create.content.contraptions.components.structureMovement.OrientedContraptionEntityRenderer;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.gantry.GantryContraptionEntity;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.gantry.GantryContraptionEntityRenderer;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.glue.SuperGlueEntity;
|
import com.simibubi.create.content.contraptions.components.structureMovement.glue.SuperGlueEntity;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.glue.SuperGlueRenderer;
|
import com.simibubi.create.content.contraptions.components.structureMovement.glue.SuperGlueRenderer;
|
||||||
import com.simibubi.create.foundation.utility.Lang;
|
import com.simibubi.create.foundation.utility.Lang;
|
||||||
@ -23,16 +25,27 @@ import net.minecraftforge.fml.client.registry.RenderingRegistry;
|
|||||||
public class AllEntityTypes {
|
public class AllEntityTypes {
|
||||||
|
|
||||||
public static final RegistryEntry<EntityType<OrientedContraptionEntity>> ORIENTED_CONTRAPTION =
|
public static final RegistryEntry<EntityType<OrientedContraptionEntity>> ORIENTED_CONTRAPTION =
|
||||||
register("contraption", OrientedContraptionEntity::new, EntityClassification.MISC, 5, 3, true,
|
contraption("contraption", OrientedContraptionEntity::new, 5, 3, true);
|
||||||
AbstractContraptionEntity::build);
|
|
||||||
public static final RegistryEntry<EntityType<ControlledContraptionEntity>> CONTROLLED_CONTRAPTION =
|
public static final RegistryEntry<EntityType<ControlledContraptionEntity>> CONTROLLED_CONTRAPTION =
|
||||||
register("stationary_contraption", ControlledContraptionEntity::new, EntityClassification.MISC, 20, 40, false,
|
contraption("stationary_contraption", ControlledContraptionEntity::new, 20, 40, false);
|
||||||
AbstractContraptionEntity::build);
|
public static final RegistryEntry<EntityType<GantryContraptionEntity>> GANTRY_CONTRAPTION =
|
||||||
|
contraption("gantry_contraption", GantryContraptionEntity::new, 10, 40, false);
|
||||||
|
|
||||||
public static final RegistryEntry<EntityType<SuperGlueEntity>> SUPER_GLUE = register("super_glue",
|
public static final RegistryEntry<EntityType<SuperGlueEntity>> SUPER_GLUE = register("super_glue",
|
||||||
SuperGlueEntity::new, EntityClassification.MISC, 10, Integer.MAX_VALUE, false, SuperGlueEntity::build);
|
SuperGlueEntity::new, EntityClassification.MISC, 10, Integer.MAX_VALUE, false, SuperGlueEntity::build);
|
||||||
public static final RegistryEntry<EntityType<SeatEntity>> SEAT =
|
public static final RegistryEntry<EntityType<SeatEntity>> SEAT =
|
||||||
register("seat", SeatEntity::new, EntityClassification.MISC, 0, Integer.MAX_VALUE, false, SeatEntity::build);
|
register("seat", SeatEntity::new, EntityClassification.MISC, 0, Integer.MAX_VALUE, false, SeatEntity::build);
|
||||||
|
|
||||||
|
//
|
||||||
|
|
||||||
|
public static void register() {}
|
||||||
|
|
||||||
|
private static <T extends Entity> RegistryEntry<EntityType<T>> contraption(String name, IFactory<T> factory,
|
||||||
|
int range, int updateFrequency, boolean sendVelocity) {
|
||||||
|
return register(name, factory, EntityClassification.MISC, range, updateFrequency, sendVelocity,
|
||||||
|
AbstractContraptionEntity::build);
|
||||||
|
}
|
||||||
|
|
||||||
private static <T extends Entity> RegistryEntry<EntityType<T>> register(String name, IFactory<T> factory,
|
private static <T extends Entity> RegistryEntry<EntityType<T>> register(String name, IFactory<T> factory,
|
||||||
EntityClassification group, int range, int updateFrequency, boolean sendVelocity,
|
EntityClassification group, int range, int updateFrequency, boolean sendVelocity,
|
||||||
NonNullConsumer<EntityType.Builder<T>> propertyBuilder) {
|
NonNullConsumer<EntityType.Builder<T>> propertyBuilder) {
|
||||||
@ -46,14 +59,14 @@ public class AllEntityTypes {
|
|||||||
.register();
|
.register();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void register() {}
|
|
||||||
|
|
||||||
@OnlyIn(value = Dist.CLIENT)
|
@OnlyIn(value = Dist.CLIENT)
|
||||||
public static void registerRenderers() {
|
public static void registerRenderers() {
|
||||||
RenderingRegistry.registerEntityRenderingHandler(CONTROLLED_CONTRAPTION.get(),
|
RenderingRegistry.registerEntityRenderingHandler(CONTROLLED_CONTRAPTION.get(),
|
||||||
ControlledContraptionEntityRenderer::new);
|
ControlledContraptionEntityRenderer::new);
|
||||||
RenderingRegistry.registerEntityRenderingHandler(ORIENTED_CONTRAPTION.get(),
|
RenderingRegistry.registerEntityRenderingHandler(ORIENTED_CONTRAPTION.get(),
|
||||||
OrientedContraptionEntityRenderer::new);
|
OrientedContraptionEntityRenderer::new);
|
||||||
|
RenderingRegistry.registerEntityRenderingHandler(GANTRY_CONTRAPTION.get(),
|
||||||
|
GantryContraptionEntityRenderer::new);
|
||||||
RenderingRegistry.registerEntityRenderingHandler(SUPER_GLUE.get(), SuperGlueRenderer::new);
|
RenderingRegistry.registerEntityRenderingHandler(SUPER_GLUE.get(), SuperGlueRenderer::new);
|
||||||
RenderingRegistry.registerEntityRenderingHandler(SEAT.get(), SeatEntity.Render::new);
|
RenderingRegistry.registerEntityRenderingHandler(SEAT.get(), SeatEntity.Render::new);
|
||||||
}
|
}
|
||||||
|
@ -40,6 +40,8 @@ import com.simibubi.create.content.contraptions.components.structureMovement.bea
|
|||||||
import com.simibubi.create.content.contraptions.components.structureMovement.bearing.MechanicalBearingTileEntity;
|
import com.simibubi.create.content.contraptions.components.structureMovement.bearing.MechanicalBearingTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.bearing.WindmillBearingTileEntity;
|
import com.simibubi.create.content.contraptions.components.structureMovement.bearing.WindmillBearingTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.chassis.ChassisTileEntity;
|
import com.simibubi.create.content.contraptions.components.structureMovement.chassis.ChassisTileEntity;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.gantry.GantryPinionRenderer;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.gantry.GantryPinionTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.mounted.CartAssemblerTileEntity;
|
import com.simibubi.create.content.contraptions.components.structureMovement.mounted.CartAssemblerTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonRenderer;
|
import com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonRenderer;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonTileEntity;
|
import com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonTileEntity;
|
||||||
@ -68,6 +70,7 @@ import com.simibubi.create.content.contraptions.processing.BasinRenderer;
|
|||||||
import com.simibubi.create.content.contraptions.processing.BasinTileEntity;
|
import com.simibubi.create.content.contraptions.processing.BasinTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerRenderer;
|
import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerRenderer;
|
||||||
import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerTileEntity;
|
import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerTileEntity;
|
||||||
|
import com.simibubi.create.content.contraptions.relays.advanced.GantryShaftTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.relays.advanced.SpeedControllerRenderer;
|
import com.simibubi.create.content.contraptions.relays.advanced.SpeedControllerRenderer;
|
||||||
import com.simibubi.create.content.contraptions.relays.advanced.SpeedControllerTileEntity;
|
import com.simibubi.create.content.contraptions.relays.advanced.SpeedControllerTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.relays.advanced.sequencer.SequencedGearshiftTileEntity;
|
import com.simibubi.create.content.contraptions.relays.advanced.sequencer.SequencedGearshiftTileEntity;
|
||||||
@ -203,6 +206,18 @@ public class AllTileEntities {
|
|||||||
.validBlocks(AllBlocks.CUCKOO_CLOCK, AllBlocks.MYSTERIOUS_CUCKOO_CLOCK)
|
.validBlocks(AllBlocks.CUCKOO_CLOCK, AllBlocks.MYSTERIOUS_CUCKOO_CLOCK)
|
||||||
.renderer(() -> CuckooClockRenderer::new)
|
.renderer(() -> CuckooClockRenderer::new)
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
|
public static final TileEntityEntry<GantryShaftTileEntity> GANTRY_SHAFT = Create.registrate()
|
||||||
|
.tileEntity("gantry_shaft", GantryShaftTileEntity::new)
|
||||||
|
.validBlocks(AllBlocks.GANTRY_SHAFT)
|
||||||
|
.renderer(() -> KineticTileEntityRenderer::new)
|
||||||
|
.register();
|
||||||
|
|
||||||
|
public static final TileEntityEntry<GantryPinionTileEntity> GANTRY_PINION = Create.registrate()
|
||||||
|
.tileEntity("gantry_pinion", GantryPinionTileEntity::new)
|
||||||
|
.validBlocks(AllBlocks.GANTRY_PINION)
|
||||||
|
.renderer(() -> GantryPinionRenderer::new)
|
||||||
|
.register();
|
||||||
|
|
||||||
public static final TileEntityEntry<PumpTileEntity> MECHANICAL_PUMP = Create.registrate()
|
public static final TileEntityEntry<PumpTileEntity> MECHANICAL_PUMP = Create.registrate()
|
||||||
.tileEntity("mechanical_pump", PumpTileEntity::new)
|
.tileEntity("mechanical_pump", PumpTileEntity::new)
|
||||||
@ -279,7 +294,7 @@ public class AllTileEntities {
|
|||||||
.validBlocks(AllBlocks.CHUTE)
|
.validBlocks(AllBlocks.CHUTE)
|
||||||
.renderer(() -> ChuteRenderer::new)
|
.renderer(() -> ChuteRenderer::new)
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
public static final TileEntityEntry<SmartChuteTileEntity> SMART_CHUTE = Create.registrate()
|
public static final TileEntityEntry<SmartChuteTileEntity> SMART_CHUTE = Create.registrate()
|
||||||
.tileEntity("smart_chute", SmartChuteTileEntity::new)
|
.tileEntity("smart_chute", SmartChuteTileEntity::new)
|
||||||
.validBlocks(AllBlocks.SMART_CHUTE)
|
.validBlocks(AllBlocks.SMART_CHUTE)
|
||||||
|
@ -14,6 +14,7 @@ import com.simibubi.create.content.logistics.RedstoneLinkNetworkHandler;
|
|||||||
import com.simibubi.create.content.palettes.AllPaletteBlocks;
|
import com.simibubi.create.content.palettes.AllPaletteBlocks;
|
||||||
import com.simibubi.create.content.palettes.PalettesItemGroup;
|
import com.simibubi.create.content.palettes.PalettesItemGroup;
|
||||||
import com.simibubi.create.content.schematics.ServerSchematicLoader;
|
import com.simibubi.create.content.schematics.ServerSchematicLoader;
|
||||||
|
import com.simibubi.create.content.schematics.filtering.SchematicInstances;
|
||||||
import com.simibubi.create.foundation.advancement.AllAdvancements;
|
import com.simibubi.create.foundation.advancement.AllAdvancements;
|
||||||
import com.simibubi.create.foundation.advancement.AllTriggers;
|
import com.simibubi.create.foundation.advancement.AllTriggers;
|
||||||
import com.simibubi.create.foundation.command.ChunkUtil;
|
import com.simibubi.create.foundation.command.ChunkUtil;
|
||||||
@ -99,6 +100,7 @@ public class Create {
|
|||||||
|
|
||||||
public static void init(final FMLCommonSetupEvent event) {
|
public static void init(final FMLCommonSetupEvent event) {
|
||||||
CapabilityMinecartController.register();
|
CapabilityMinecartController.register();
|
||||||
|
SchematicInstances.register();
|
||||||
schematicReceiver = new ServerSchematicLoader();
|
schematicReceiver = new ServerSchematicLoader();
|
||||||
redstoneLinkNetworkHandler = new RedstoneLinkNetworkHandler();
|
redstoneLinkNetworkHandler = new RedstoneLinkNetworkHandler();
|
||||||
torquePropagator = new TorquePropagator();
|
torquePropagator = new TorquePropagator();
|
||||||
|
@ -11,7 +11,6 @@ import com.simibubi.create.content.contraptions.base.IRotate;
|
|||||||
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.relays.advanced.SpeedControllerBlock;
|
import com.simibubi.create.content.contraptions.relays.advanced.SpeedControllerBlock;
|
||||||
import com.simibubi.create.content.contraptions.relays.advanced.SpeedControllerTileEntity;
|
import com.simibubi.create.content.contraptions.relays.advanced.SpeedControllerTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.relays.belt.BeltTileEntity;
|
|
||||||
import com.simibubi.create.content.contraptions.relays.elementary.CogWheelBlock;
|
import com.simibubi.create.content.contraptions.relays.elementary.CogWheelBlock;
|
||||||
import com.simibubi.create.content.contraptions.relays.encased.DirectionalShaftHalvesTileEntity;
|
import com.simibubi.create.content.contraptions.relays.encased.DirectionalShaftHalvesTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.relays.encased.EncasedBeltBlock;
|
import com.simibubi.create.content.contraptions.relays.encased.EncasedBeltBlock;
|
||||||
@ -70,11 +69,9 @@ public class RotationPropagator {
|
|||||||
boolean connectedByGears = definitionFrom.hasIntegratedCogwheel(world, from.getPos(), stateFrom)
|
boolean connectedByGears = definitionFrom.hasIntegratedCogwheel(world, from.getPos(), stateFrom)
|
||||||
&& definitionTo.hasIntegratedCogwheel(world, to.getPos(), stateTo);
|
&& definitionTo.hasIntegratedCogwheel(world, to.getPos(), stateTo);
|
||||||
|
|
||||||
// Belt <-> Belt
|
float custom = from.propagateRotationTo(to, stateFrom, stateTo, diff, connectedByAxis, connectedByGears);
|
||||||
if (from instanceof BeltTileEntity && to instanceof BeltTileEntity && !connectedByAxis) {
|
if (custom != 0)
|
||||||
return ((BeltTileEntity) from).getController()
|
return custom;
|
||||||
.equals(((BeltTileEntity) to).getController()) ? 1 : 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Axis <-> Axis
|
// Axis <-> Axis
|
||||||
if (connectedByAxis) {
|
if (connectedByAxis) {
|
||||||
@ -230,6 +227,9 @@ public class RotationPropagator {
|
|||||||
float newSpeed = getConveyedSpeed(currentTE, neighbourTE);
|
float newSpeed = getConveyedSpeed(currentTE, neighbourTE);
|
||||||
float oppositeSpeed = getConveyedSpeed(neighbourTE, currentTE);
|
float oppositeSpeed = getConveyedSpeed(neighbourTE, currentTE);
|
||||||
|
|
||||||
|
if (newSpeed == 0 && oppositeSpeed == 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
boolean incompatible =
|
boolean incompatible =
|
||||||
Math.signum(newSpeed) != Math.signum(speedOfNeighbour) && (newSpeed != 0 && speedOfNeighbour != 0);
|
Math.signum(newSpeed) != Math.signum(speedOfNeighbour) && (newSpeed != 0 && speedOfNeighbour != 0);
|
||||||
|
|
||||||
@ -395,7 +395,7 @@ public class RotationPropagator {
|
|||||||
if (!(neighbourKTE.getBlockState()
|
if (!(neighbourKTE.getBlockState()
|
||||||
.getBlock() instanceof IRotate))
|
.getBlock() instanceof IRotate))
|
||||||
return null;
|
return null;
|
||||||
if (!isConnected(currentTE, neighbourKTE))
|
if (!isConnected(currentTE, neighbourKTE) && !isConnected(neighbourKTE, currentTE))
|
||||||
return null;
|
return null;
|
||||||
return neighbourKTE;
|
return neighbourKTE;
|
||||||
}
|
}
|
||||||
@ -403,14 +403,9 @@ public class RotationPropagator {
|
|||||||
public static boolean isConnected(KineticTileEntity from, KineticTileEntity to) {
|
public static boolean isConnected(KineticTileEntity from, KineticTileEntity to) {
|
||||||
final BlockState stateFrom = from.getBlockState();
|
final BlockState stateFrom = from.getBlockState();
|
||||||
final BlockState stateTo = to.getBlockState();
|
final BlockState stateTo = to.getBlockState();
|
||||||
|
return isLargeCogToSpeedController(stateFrom, stateTo, to.getPos()
|
||||||
if (isLargeCogToSpeedController(stateFrom, stateTo, to.getPos()
|
.subtract(from.getPos())) || getRotationSpeedModifier(from, to) != 0
|
||||||
.subtract(from.getPos())))
|
|| from.isCustomConnection(to, stateFrom, stateTo);
|
||||||
return true;
|
|
||||||
if (isLargeCogToSpeedController(stateTo, stateFrom, from.getPos()
|
|
||||||
.subtract(to.getPos())))
|
|
||||||
return true;
|
|
||||||
return getRotationSpeedModifier(from, to) != 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static List<KineticTileEntity> getConnectedNeighbours(KineticTileEntity te) {
|
private static List<KineticTileEntity> getConnectedNeighbours(KineticTileEntity te) {
|
||||||
@ -436,30 +431,11 @@ public class RotationPropagator {
|
|||||||
neighbours.add(te.getPos()
|
neighbours.add(te.getPos()
|
||||||
.offset(facing));
|
.offset(facing));
|
||||||
|
|
||||||
// Some Blocks can interface diagonally
|
|
||||||
BlockState blockState = te.getBlockState();
|
BlockState blockState = te.getBlockState();
|
||||||
boolean isLargeWheel = isLargeCog(blockState);
|
|
||||||
|
|
||||||
if (!(blockState.getBlock() instanceof IRotate))
|
if (!(blockState.getBlock() instanceof IRotate))
|
||||||
return neighbours;
|
return neighbours;
|
||||||
IRotate block = (IRotate) blockState.getBlock();
|
IRotate block = (IRotate) blockState.getBlock();
|
||||||
|
return te.addPropagationLocations(block, blockState, neighbours);
|
||||||
if (block.hasIntegratedCogwheel(te.getWorld(), te.getPos(), blockState) || isLargeWheel
|
|
||||||
|| AllBlocks.BELT.has(blockState)) {
|
|
||||||
Axis axis = block.getRotationAxis(blockState);
|
|
||||||
|
|
||||||
BlockPos.getAllInBox(new BlockPos(-1, -1, -1), new BlockPos(1, 1, 1))
|
|
||||||
.forEach(offset -> {
|
|
||||||
if (!isLargeWheel && axis.getCoordinate(offset.getX(), offset.getY(), offset.getZ()) != 0)
|
|
||||||
return;
|
|
||||||
if (offset.distanceSq(0, 0, 0, false) != BlockPos.ZERO.distanceSq(1, 1, 0, false))
|
|
||||||
return;
|
|
||||||
neighbours.add(te.getPos()
|
|
||||||
.add(offset));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return neighbours;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,8 @@ public abstract class KineticBlock extends Block implements IRotate {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canHarvestBlock(BlockState state, IBlockReader world, BlockPos pos, PlayerEntity player) {
|
public boolean canHarvestBlock(BlockState state, IBlockReader world, BlockPos pos, PlayerEntity player) {
|
||||||
for (ToolType toolType : player.getHeldItemMainhand().getToolTypes()) {
|
for (ToolType toolType : player.getHeldItemMainhand()
|
||||||
|
.getToolTypes()) {
|
||||||
if (isToolEffective(state, toolType))
|
if (isToolEffective(state, toolType))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -46,6 +47,24 @@ public abstract class KineticBlock extends Block implements IRotate {
|
|||||||
@Override
|
@Override
|
||||||
public void onBlockAdded(BlockState state, World worldIn, BlockPos pos, BlockState oldState, boolean isMoving) {
|
public void onBlockAdded(BlockState state, World worldIn, BlockPos pos, BlockState oldState, boolean isMoving) {
|
||||||
// onBlockAdded is useless for init, as sometimes the TE gets re-instantiated
|
// onBlockAdded is useless for init, as sometimes the TE gets re-instantiated
|
||||||
|
|
||||||
|
// however, if a block change occurs that does not change kinetic connections,
|
||||||
|
// we can prevent a major re-propagation here
|
||||||
|
|
||||||
|
TileEntity tileEntity = worldIn.getTileEntity(pos);
|
||||||
|
if (tileEntity instanceof KineticTileEntity) {
|
||||||
|
KineticTileEntity kineticTileEntity = (KineticTileEntity) tileEntity;
|
||||||
|
kineticTileEntity.preventSpeedUpdate = false;
|
||||||
|
|
||||||
|
if (oldState.getBlock() != state.getBlock())
|
||||||
|
return;
|
||||||
|
if (state.hasTileEntity() != oldState.hasTileEntity())
|
||||||
|
return;
|
||||||
|
if (!areStatesKineticallyEquivalent(oldState, state))
|
||||||
|
return;
|
||||||
|
|
||||||
|
kineticTileEntity.preventSpeedUpdate = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -63,6 +82,10 @@ public abstract class KineticBlock extends Block implements IRotate {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected boolean areStatesKineticallyEquivalent(BlockState oldState, BlockState newState) {
|
||||||
|
return getRotationAxis(newState) == getRotationAxis(oldState);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public abstract TileEntity createTileEntity(BlockState state, IBlockReader world);
|
public abstract TileEntity createTileEntity(BlockState state, IBlockReader world);
|
||||||
|
|
||||||
@ -76,9 +99,14 @@ public abstract class KineticBlock extends Block implements IRotate {
|
|||||||
TileEntity tileEntity = worldIn.getTileEntity(pos);
|
TileEntity tileEntity = worldIn.getTileEntity(pos);
|
||||||
if (!(tileEntity instanceof KineticTileEntity))
|
if (!(tileEntity instanceof KineticTileEntity))
|
||||||
return;
|
return;
|
||||||
|
KineticTileEntity kte = (KineticTileEntity) tileEntity;
|
||||||
|
|
||||||
|
if (kte.preventSpeedUpdate) {
|
||||||
|
kte.preventSpeedUpdate = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Remove previous information when block is added
|
// Remove previous information when block is added
|
||||||
KineticTileEntity kte = (KineticTileEntity) tileEntity;
|
|
||||||
kte.warnOfMovement();
|
kte.warnOfMovement();
|
||||||
kte.clearKineticInformation();
|
kte.clearKineticInformation();
|
||||||
kte.updateSpeed = true;
|
kte.updateSpeed = true;
|
||||||
|
@ -30,6 +30,7 @@ import net.minecraft.tileentity.ITickableTileEntity;
|
|||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.tileentity.TileEntityType;
|
import net.minecraft.tileentity.TileEntityType;
|
||||||
import net.minecraft.util.Direction;
|
import net.minecraft.util.Direction;
|
||||||
|
import net.minecraft.util.Direction.Axis;
|
||||||
import net.minecraft.util.Direction.AxisDirection;
|
import net.minecraft.util.Direction.AxisDirection;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.text.TextFormatting;
|
import net.minecraft.util.text.TextFormatting;
|
||||||
@ -42,6 +43,7 @@ public abstract class KineticTileEntity extends SmartTileEntity
|
|||||||
public @Nullable BlockPos source;
|
public @Nullable BlockPos source;
|
||||||
public boolean networkDirty;
|
public boolean networkDirty;
|
||||||
public boolean updateSpeed;
|
public boolean updateSpeed;
|
||||||
|
public boolean preventSpeedUpdate;
|
||||||
|
|
||||||
protected KineticEffectHandler effects;
|
protected KineticEffectHandler effects;
|
||||||
protected float speed;
|
protected float speed;
|
||||||
@ -361,11 +363,15 @@ public abstract class KineticTileEntity extends SmartTileEntity
|
|||||||
}
|
}
|
||||||
|
|
||||||
KineticTileEntity tileEntity = (KineticTileEntity) tileEntityIn;
|
KineticTileEntity tileEntity = (KineticTileEntity) tileEntityIn;
|
||||||
if (tileEntity.hasNetwork())
|
if (state.getBlock() instanceof KineticBlock
|
||||||
tileEntity.getOrCreateNetwork()
|
&& !((KineticBlock) state.getBlock()).areStatesKineticallyEquivalent(currentState, state)) {
|
||||||
.remove(tileEntity);
|
if (tileEntity.hasNetwork())
|
||||||
tileEntity.detachKinetics();
|
tileEntity.getOrCreateNetwork()
|
||||||
tileEntity.removeSource();
|
.remove(tileEntity);
|
||||||
|
tileEntity.detachKinetics();
|
||||||
|
tileEntity.removeSource();
|
||||||
|
}
|
||||||
|
|
||||||
world.setBlockState(pos, state, 3);
|
world.setBlockState(pos, state, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -404,7 +410,7 @@ public abstract class KineticTileEntity extends SmartTileEntity
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean addToGoggleTooltip(List<String> tooltip, boolean isPlayerSneaking) {
|
public boolean addToGoggleTooltip(List<String> tooltip, boolean isPlayerSneaking) {
|
||||||
boolean added = false;
|
boolean added = false;
|
||||||
float stressAtBase = calculateStressApplied();
|
float stressAtBase = calculateStressApplied();
|
||||||
@ -417,8 +423,8 @@ public abstract class KineticTileEntity extends SmartTileEntity
|
|||||||
|
|
||||||
String stressString =
|
String stressString =
|
||||||
spacing + "%s%s" + Lang.translate("generic.unit.stress") + " " + TextFormatting.DARK_GRAY + "%s";
|
spacing + "%s%s" + Lang.translate("generic.unit.stress") + " " + TextFormatting.DARK_GRAY + "%s";
|
||||||
tooltip.add(" " + String.format(stressString, TextFormatting.AQUA, IHaveGoggleInformation.format(stressTotal),
|
tooltip.add(" " + String.format(stressString, TextFormatting.AQUA,
|
||||||
Lang.translate("gui.goggles.at_current_speed")));
|
IHaveGoggleInformation.format(stressTotal), Lang.translate("gui.goggles.at_current_speed")));
|
||||||
|
|
||||||
added = true;
|
added = true;
|
||||||
}
|
}
|
||||||
@ -454,4 +460,72 @@ public abstract class KineticTileEntity extends SmartTileEntity
|
|||||||
return overStressed;
|
return overStressed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Custom Propagation
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Specify ratio of transferred rotation from this kinetic component to a
|
||||||
|
* specific other.
|
||||||
|
*
|
||||||
|
* @param target other Kinetic TE to transfer to
|
||||||
|
* @param stateFrom this TE's blockstate
|
||||||
|
* @param stateTo other TE's blockstate
|
||||||
|
* @param diff difference in position (to.pos - from.pos)
|
||||||
|
* @param connectedViaAxes whether these kinetic blocks are connected via mutual
|
||||||
|
* IRotate.hasShaftTowards()
|
||||||
|
* @param connectedViaCogs whether these kinetic blocks are connected via mutual
|
||||||
|
* IRotate.hasIntegratedCogwheel()
|
||||||
|
* @return factor of rotation speed from this TE to other. 0 if no rotation is
|
||||||
|
* transferred, or the standard rules apply (integrated shafts/cogs)
|
||||||
|
*/
|
||||||
|
public float propagateRotationTo(KineticTileEntity target, BlockState stateFrom, BlockState stateTo, BlockPos diff,
|
||||||
|
boolean connectedViaAxes, boolean connectedViaCogs) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Specify additional locations the rotation propagator should look for
|
||||||
|
* potentially connected components. Neighbour list contains offset positions in
|
||||||
|
* all 6 directions by default.
|
||||||
|
*
|
||||||
|
* @param block
|
||||||
|
* @param state
|
||||||
|
* @param neighbours
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<BlockPos> addPropagationLocations(IRotate block, BlockState state, List<BlockPos> neighbours) {
|
||||||
|
if (!canPropagateDiagonally(block, state))
|
||||||
|
return neighbours;
|
||||||
|
|
||||||
|
Axis axis = block.getRotationAxis(state);
|
||||||
|
BlockPos.getAllInBox(new BlockPos(-1, -1, -1), new BlockPos(1, 1, 1))
|
||||||
|
.forEach(offset -> {
|
||||||
|
if (axis.getCoordinate(offset.getX(), offset.getY(), offset.getZ()) != 0)
|
||||||
|
return;
|
||||||
|
if (offset.distanceSq(0, 0, 0, false) != BlockPos.ZERO.distanceSq(1, 1, 0, false))
|
||||||
|
return;
|
||||||
|
neighbours.add(pos.add(offset));
|
||||||
|
});
|
||||||
|
return neighbours;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Specify whether this component can propagate speed to the other in any
|
||||||
|
* circumstance. Shaft and cogwheel connections are already handled by internal
|
||||||
|
* logic. Does not have to be specified on both ends, it is assumed that this
|
||||||
|
* relation is symmetrical.
|
||||||
|
*
|
||||||
|
* @param other
|
||||||
|
* @param state
|
||||||
|
* @param otherState
|
||||||
|
* @return true if this and the other component should check their propagation
|
||||||
|
* factor and are not already connected via integrated cogs or shafts
|
||||||
|
*/
|
||||||
|
public boolean isCustomConnection(KineticTileEntity other, BlockState state, BlockState otherState) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected boolean canPropagateDiagonally(IRotate block, BlockState state) {
|
||||||
|
return block.hasIntegratedCogwheel(world, pos, state);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -27,8 +27,8 @@ public class CreativeMotorTileEntity extends GeneratingKineticTileEntity {
|
|||||||
super.addBehaviours(behaviours);
|
super.addBehaviours(behaviours);
|
||||||
Integer max = AllConfigs.SERVER.kinetics.maxMotorSpeed.get();
|
Integer max = AllConfigs.SERVER.kinetics.maxMotorSpeed.get();
|
||||||
|
|
||||||
CenteredSideValueBoxTransform slot =
|
CenteredSideValueBoxTransform slot = new CenteredSideValueBoxTransform(
|
||||||
new CenteredSideValueBoxTransform((motor, side) -> motor.get(CreativeMotorBlock.FACING) == side.getOpposite());
|
(motor, side) -> motor.get(CreativeMotorBlock.FACING) == side.getOpposite());
|
||||||
|
|
||||||
generatedSpeed = new ScrollValueBehaviour(Lang.translate("generic.speed"), this, slot);
|
generatedSpeed = new ScrollValueBehaviour(Lang.translate("generic.speed"), this, slot);
|
||||||
generatedSpeed.between(-max, max);
|
generatedSpeed.between(-max, max);
|
||||||
@ -55,20 +55,21 @@ public class CreativeMotorTileEntity extends GeneratingKineticTileEntity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static int step(StepContext context) {
|
public static int step(StepContext context) {
|
||||||
if (context.shift)
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
int current = context.currentValue;
|
int current = context.currentValue;
|
||||||
int magnitude = Math.abs(current) - (context.forward == current > 0 ? 0 : 1);
|
|
||||||
int step = 1;
|
int step = 1;
|
||||||
|
|
||||||
if (magnitude >= 4)
|
if (!context.shift) {
|
||||||
step *= 4;
|
int magnitude = Math.abs(current) - (context.forward == current > 0 ? 0 : 1);
|
||||||
if (magnitude >= 32)
|
|
||||||
step *= 4;
|
if (magnitude >= 4)
|
||||||
if (magnitude >= 128)
|
step *= 4;
|
||||||
step *= 4;
|
if (magnitude >= 32)
|
||||||
return step;
|
step *= 4;
|
||||||
|
if (magnitude >= 128)
|
||||||
|
step *= 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (int) (current + (context.forward ? step : -step) == 0 ? step + 1 : step);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -73,6 +73,10 @@ public abstract class AbstractContraptionEntity extends Entity implements IEntit
|
|||||||
return;
|
return;
|
||||||
contraption.onEntityCreated(this);
|
contraption.onEntityCreated(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean supportsTerrainCollision() {
|
||||||
|
return contraption instanceof TranslatingContraption;
|
||||||
|
}
|
||||||
|
|
||||||
protected void contraptionInitialize() {
|
protected void contraptionInitialize() {
|
||||||
contraption.onEntityInitialize(world, this);
|
contraption.onEntityInitialize(world, this);
|
||||||
@ -594,7 +598,7 @@ public abstract class AbstractContraptionEntity extends Entity implements IEntit
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static class ContraptionRotationState {
|
public static class ContraptionRotationState {
|
||||||
static final ContraptionRotationState NONE = new ContraptionRotationState();
|
public static final ContraptionRotationState NONE = new ContraptionRotationState();
|
||||||
|
|
||||||
float xRotation = 0;
|
float xRotation = 0;
|
||||||
float yRotation = 0;
|
float yRotation = 0;
|
||||||
|
@ -1,39 +0,0 @@
|
|||||||
package com.simibubi.create.content.contraptions.components.structureMovement;
|
|
||||||
|
|
||||||
import java.util.function.Supplier;
|
|
||||||
|
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.bearing.BearingContraption;
|
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.bearing.ClockworkContraption;
|
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.bearing.StabilizedContraption;
|
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.mounted.MountedContraption;
|
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.piston.PistonContraption;
|
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.pulley.PulleyContraption;
|
|
||||||
import com.simibubi.create.foundation.utility.Lang;
|
|
||||||
|
|
||||||
public enum AllContraptionTypes {
|
|
||||||
|
|
||||||
PISTON(PistonContraption::new),
|
|
||||||
BEARING(BearingContraption::new),
|
|
||||||
PULLEY(PulleyContraption::new),
|
|
||||||
CLOCKWORK(ClockworkContraption::new),
|
|
||||||
MOUNTED(MountedContraption::new),
|
|
||||||
STABILIZED(StabilizedContraption::new),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
Supplier<? extends Contraption> factory;
|
|
||||||
String id;
|
|
||||||
|
|
||||||
private AllContraptionTypes(Supplier<? extends Contraption> factory) {
|
|
||||||
this.factory = factory;
|
|
||||||
id = Lang.asId(name());
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Contraption fromType(String type) {
|
|
||||||
for (AllContraptionTypes allContraptionTypes : values())
|
|
||||||
if (type.equals(allContraptionTypes.id))
|
|
||||||
return allContraptionTypes.factory.get();
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -30,6 +30,7 @@ import com.simibubi.create.content.contraptions.components.structureMovement.bea
|
|||||||
import com.simibubi.create.content.contraptions.components.structureMovement.bearing.StabilizedContraption;
|
import com.simibubi.create.content.contraptions.components.structureMovement.bearing.StabilizedContraption;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.chassis.AbstractChassisBlock;
|
import com.simibubi.create.content.contraptions.components.structureMovement.chassis.AbstractChassisBlock;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.chassis.ChassisTileEntity;
|
import com.simibubi.create.content.contraptions.components.structureMovement.chassis.ChassisTileEntity;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.gantry.GantryPinionBlock;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.glue.SuperGlueEntity;
|
import com.simibubi.create.content.contraptions.components.structureMovement.glue.SuperGlueEntity;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.glue.SuperGlueHandler;
|
import com.simibubi.create.content.contraptions.components.structureMovement.glue.SuperGlueHandler;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock;
|
import com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock;
|
||||||
@ -40,6 +41,7 @@ import com.simibubi.create.content.contraptions.components.structureMovement.pul
|
|||||||
import com.simibubi.create.content.contraptions.components.structureMovement.pulley.PulleyBlock.RopeBlock;
|
import com.simibubi.create.content.contraptions.components.structureMovement.pulley.PulleyBlock.RopeBlock;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.pulley.PulleyTileEntity;
|
import com.simibubi.create.content.contraptions.components.structureMovement.pulley.PulleyTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.fluids.tank.FluidTankTileEntity;
|
import com.simibubi.create.content.contraptions.fluids.tank.FluidTankTileEntity;
|
||||||
|
import com.simibubi.create.content.contraptions.relays.advanced.GantryShaftBlock;
|
||||||
import com.simibubi.create.content.contraptions.relays.belt.BeltBlock;
|
import com.simibubi.create.content.contraptions.relays.belt.BeltBlock;
|
||||||
import com.simibubi.create.content.logistics.block.inventories.AdjustableCrateBlock;
|
import com.simibubi.create.content.logistics.block.inventories.AdjustableCrateBlock;
|
||||||
import com.simibubi.create.content.logistics.block.redstone.RedstoneContactBlock;
|
import com.simibubi.create.content.logistics.block.redstone.RedstoneContactBlock;
|
||||||
@ -136,7 +138,7 @@ public abstract class Contraption {
|
|||||||
|
|
||||||
protected abstract boolean canAxisBeStabilized(Axis axis);
|
protected abstract boolean canAxisBeStabilized(Axis axis);
|
||||||
|
|
||||||
protected abstract AllContraptionTypes getType();
|
protected abstract ContraptionType getType();
|
||||||
|
|
||||||
protected boolean customBlockPlacement(IWorld world, BlockPos pos, BlockState state) {
|
protected boolean customBlockPlacement(IWorld world, BlockPos pos, BlockState state) {
|
||||||
return false;
|
return false;
|
||||||
@ -153,7 +155,7 @@ public abstract class Contraption {
|
|||||||
|
|
||||||
public static Contraption fromNBT(World world, CompoundNBT nbt, boolean spawnData) {
|
public static Contraption fromNBT(World world, CompoundNBT nbt, boolean spawnData) {
|
||||||
String type = nbt.getString("Type");
|
String type = nbt.getString("Type");
|
||||||
Contraption contraption = AllContraptionTypes.fromType(type);
|
Contraption contraption = ContraptionType.fromType(type);
|
||||||
contraption.readNBT(world, nbt, spawnData);
|
contraption.readNBT(world, nbt, spawnData);
|
||||||
return contraption;
|
return contraption;
|
||||||
}
|
}
|
||||||
@ -264,6 +266,26 @@ public abstract class Contraption {
|
|||||||
if (AllBlocks.BELT.has(state))
|
if (AllBlocks.BELT.has(state))
|
||||||
moveBelt(pos, frontier, visited, state);
|
moveBelt(pos, frontier, visited, state);
|
||||||
|
|
||||||
|
if (AllBlocks.GANTRY_PINION.has(state)) {
|
||||||
|
BlockPos offset = pos.offset(state.get(GantryPinionBlock.FACING));
|
||||||
|
if (!visited.contains(offset))
|
||||||
|
frontier.add(offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (AllBlocks.GANTRY_SHAFT.has(state))
|
||||||
|
for (Direction d : Iterate.directions) {
|
||||||
|
BlockPos offset = pos.offset(d);
|
||||||
|
if (!visited.contains(offset)) {
|
||||||
|
BlockState offsetState = world.getBlockState(offset);
|
||||||
|
Direction facing = state.get(GantryShaftBlock.FACING);
|
||||||
|
if (d.getAxis() == facing.getAxis() && AllBlocks.GANTRY_SHAFT.has(offsetState)
|
||||||
|
&& offsetState.get(GantryShaftBlock.FACING) == facing)
|
||||||
|
frontier.add(offset);
|
||||||
|
else if (AllBlocks.GANTRY_PINION.has(offsetState) && offsetState.get(GantryPinionBlock.FACING) == d)
|
||||||
|
frontier.add(offset);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Bearings potentially create stabilized sub-contraptions
|
// Bearings potentially create stabilized sub-contraptions
|
||||||
if (AllBlocks.MECHANICAL_BEARING.has(state))
|
if (AllBlocks.MECHANICAL_BEARING.has(state))
|
||||||
moveBearing(pos, frontier, visited, state);
|
moveBearing(pos, frontier, visited, state);
|
||||||
@ -726,7 +748,8 @@ public abstract class Contraption {
|
|||||||
if (brittles != BlockMovementTraits.isBrittle(block.state))
|
if (brittles != BlockMovementTraits.isBrittle(block.state))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
BlockPos add = block.pos.add(anchor).add(offset);
|
BlockPos add = block.pos.add(anchor)
|
||||||
|
.add(offset);
|
||||||
if (customBlockRemoval(world, add, block.state))
|
if (customBlockRemoval(world, add, block.state))
|
||||||
continue;
|
continue;
|
||||||
BlockState oldState = world.getBlockState(add);
|
BlockState oldState = world.getBlockState(add);
|
||||||
@ -735,7 +758,8 @@ public abstract class Contraption {
|
|||||||
iterator.remove();
|
iterator.remove();
|
||||||
world.getWorld()
|
world.getWorld()
|
||||||
.removeTileEntity(add);
|
.removeTileEntity(add);
|
||||||
int flags = BlockFlags.IS_MOVING | BlockFlags.NO_NEIGHBOR_DROPS | BlockFlags.UPDATE_NEIGHBORS;
|
int flags = BlockFlags.IS_MOVING | BlockFlags.NO_NEIGHBOR_DROPS | BlockFlags.UPDATE_NEIGHBORS
|
||||||
|
| BlockFlags.BLOCK_UPDATE;
|
||||||
if (blockIn instanceof IWaterLoggable && oldState.has(BlockStateProperties.WATERLOGGED)
|
if (blockIn instanceof IWaterLoggable && oldState.has(BlockStateProperties.WATERLOGGED)
|
||||||
&& oldState.get(BlockStateProperties.WATERLOGGED)
|
&& oldState.get(BlockStateProperties.WATERLOGGED)
|
||||||
.booleanValue()) {
|
.booleanValue()) {
|
||||||
@ -746,8 +770,12 @@ public abstract class Contraption {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (BlockInfo block : blocks.values()) {
|
for (BlockInfo block : blocks.values()) {
|
||||||
BlockPos add = block.pos.add(anchor).add(offset);
|
BlockPos add = block.pos.add(anchor)
|
||||||
world.markAndNotifyBlock(add, null, block.state, Blocks.AIR.getDefaultState(), BlockFlags.IS_MOVING | BlockFlags.DEFAULT);
|
.add(offset);
|
||||||
|
if (!shouldUpdateAfterMovement(block))
|
||||||
|
continue;
|
||||||
|
world.markAndNotifyBlock(add, null, block.state, Blocks.AIR.getDefaultState(),
|
||||||
|
BlockFlags.IS_MOVING | BlockFlags.DEFAULT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -828,7 +856,10 @@ public abstract class Contraption {
|
|||||||
}
|
}
|
||||||
for (BlockInfo block : blocks.values()) {
|
for (BlockInfo block : blocks.values()) {
|
||||||
BlockPos targetPos = transform.apply(block.pos);
|
BlockPos targetPos = transform.apply(block.pos);
|
||||||
world.markAndNotifyBlock(targetPos, null, block.state, block.state, BlockFlags.IS_MOVING | BlockFlags.DEFAULT);
|
if (!shouldUpdateAfterMovement(block))
|
||||||
|
continue;
|
||||||
|
world.markAndNotifyBlock(targetPos, null, block.state, block.state,
|
||||||
|
BlockFlags.IS_MOVING | BlockFlags.DEFAULT);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < inventory.getSlots(); i++)
|
for (int i = 0; i < inventory.getSlots(); i++)
|
||||||
@ -888,6 +919,10 @@ public abstract class Contraption {
|
|||||||
callBack.accept(AllMovementBehaviours.of(pair.getLeft().state), pair.getRight());
|
callBack.accept(AllMovementBehaviours.of(pair.getLeft().state), pair.getRight());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected boolean shouldUpdateAfterMovement(BlockInfo info) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
public void expandBoundsAroundAxis(Axis axis) {
|
public void expandBoundsAroundAxis(Axis axis) {
|
||||||
AxisAlignedBB bb = bounds;
|
AxisAlignedBB bb = bounds;
|
||||||
double maxXDiff = Math.max(bb.maxX - 1, -bb.minX);
|
double maxXDiff = Math.max(bb.maxX - 1, -bb.minX);
|
||||||
|
@ -348,7 +348,7 @@ public class ContraptionCollider {
|
|||||||
return potentialHits;
|
return potentialHits;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean collideBlocks(ControlledContraptionEntity contraptionEntity) {
|
public static boolean collideBlocks(AbstractContraptionEntity contraptionEntity) {
|
||||||
if (!contraptionEntity.supportsTerrainCollision())
|
if (!contraptionEntity.supportsTerrainCollision())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -0,0 +1,49 @@
|
|||||||
|
package com.simibubi.create.content.contraptions.components.structureMovement;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Map.Entry;
|
||||||
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.bearing.BearingContraption;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.bearing.ClockworkContraption;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.bearing.StabilizedContraption;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.gantry.GantryContraption;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.mounted.MountedContraption;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.piston.PistonContraption;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.pulley.PulleyContraption;
|
||||||
|
|
||||||
|
public class ContraptionType {
|
||||||
|
|
||||||
|
public static Map<String, ContraptionType> entries = new HashMap<>();
|
||||||
|
public static ContraptionType
|
||||||
|
PISTON = register("piston", PistonContraption::new),
|
||||||
|
BEARING = register("bearing", BearingContraption::new),
|
||||||
|
PULLEY = register("pulley", PulleyContraption::new),
|
||||||
|
CLOCKWORK = register("clockwork", ClockworkContraption::new),
|
||||||
|
MOUNTED = register("mounted", MountedContraption::new),
|
||||||
|
STABILIZED = register("stabilized", StabilizedContraption::new),
|
||||||
|
GANTRY = register("gantry", GantryContraption::new);
|
||||||
|
|
||||||
|
Supplier<? extends Contraption> factory;
|
||||||
|
String id;
|
||||||
|
|
||||||
|
public static ContraptionType register(String id, Supplier<? extends Contraption> factory) {
|
||||||
|
ContraptionType value = new ContraptionType(id, factory);
|
||||||
|
entries.put(id, value);
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
private ContraptionType(String id, Supplier<? extends Contraption> factory) {
|
||||||
|
this.factory = factory;
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Contraption fromType(String type) {
|
||||||
|
for (Entry<String, ContraptionType> allContraptionTypes : entries.entrySet())
|
||||||
|
if (type.equals(allContraptionTypes.getKey()))
|
||||||
|
return allContraptionTypes.getValue().factory.get();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -46,10 +46,6 @@ public class ControlledContraptionEntity extends AbstractContraptionEntity {
|
|||||||
return entity;
|
return entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean supportsTerrainCollision() {
|
|
||||||
return contraption instanceof TranslatingContraption;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Vec3d getContactPointMotion(Vec3d globalContactPoint) {
|
public Vec3d getContactPointMotion(Vec3d globalContactPoint) {
|
||||||
if (contraption instanceof TranslatingContraption)
|
if (contraption instanceof TranslatingContraption)
|
||||||
@ -151,8 +147,6 @@ public class ControlledContraptionEntity extends AbstractContraptionEntity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Vec3d motion = getMotion();
|
Vec3d motion = getMotion();
|
||||||
if (motion.length() < 1 / 4098f)
|
|
||||||
setMotion(Vec3d.ZERO);
|
|
||||||
move(motion.x, motion.y, motion.z);
|
move(motion.x, motion.y, motion.z);
|
||||||
if (ContraptionCollider.collideBlocks(this))
|
if (ContraptionCollider.collideBlocks(this))
|
||||||
getController().collided();
|
getController().collided();
|
||||||
|
@ -22,7 +22,7 @@ public class OrientedContraptionEntityRenderer extends AbstractContraptionEntity
|
|||||||
if (!super.shouldRender(entity, p_225626_2_, p_225626_3_, p_225626_5_, p_225626_7_))
|
if (!super.shouldRender(entity, p_225626_2_, p_225626_3_, p_225626_5_, p_225626_7_))
|
||||||
return false;
|
return false;
|
||||||
if (entity.getContraption()
|
if (entity.getContraption()
|
||||||
.getType() == AllContraptionTypes.MOUNTED && entity.getRidingEntity() == null)
|
.getType() == ContraptionType.MOUNTED && entity.getRidingEntity() == null)
|
||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ public abstract class TranslatingContraption extends Contraption {
|
|||||||
|
|
||||||
public Set<BlockPos> getColliders(World world, Direction movementDirection) {
|
public Set<BlockPos> getColliders(World world, Direction movementDirection) {
|
||||||
if (getBlocks() == null)
|
if (getBlocks() == null)
|
||||||
return Collections.EMPTY_SET;
|
return Collections.emptySet();
|
||||||
if (cachedColliders == null || cachedColliderDirection != movementDirection) {
|
if (cachedColliders == null || cachedColliderDirection != movementDirection) {
|
||||||
cachedColliders = new HashSet<>();
|
cachedColliders = new HashSet<>();
|
||||||
cachedColliderDirection = movementDirection;
|
cachedColliderDirection = movementDirection;
|
||||||
|
@ -3,7 +3,7 @@ package com.simibubi.create.content.contraptions.components.structureMovement.be
|
|||||||
import org.apache.commons.lang3.tuple.Pair;
|
import org.apache.commons.lang3.tuple.Pair;
|
||||||
|
|
||||||
import com.simibubi.create.AllTags.AllBlockTags;
|
import com.simibubi.create.AllTags.AllBlockTags;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.AllContraptionTypes;
|
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionType;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.Contraption;
|
import com.simibubi.create.content.contraptions.components.structureMovement.Contraption;
|
||||||
|
|
||||||
import net.minecraft.nbt.CompoundNBT;
|
import net.minecraft.nbt.CompoundNBT;
|
||||||
@ -43,8 +43,8 @@ public class BearingContraption extends Contraption {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected AllContraptionTypes getType() {
|
protected ContraptionType getType() {
|
||||||
return AllContraptionTypes.BEARING;
|
return ContraptionType.BEARING;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -6,7 +6,7 @@ import java.util.Set;
|
|||||||
|
|
||||||
import org.apache.commons.lang3.tuple.Pair;
|
import org.apache.commons.lang3.tuple.Pair;
|
||||||
|
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.AllContraptionTypes;
|
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionType;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.Contraption;
|
import com.simibubi.create.content.contraptions.components.structureMovement.Contraption;
|
||||||
import com.simibubi.create.foundation.utility.NBTHelper;
|
import com.simibubi.create.foundation.utility.NBTHelper;
|
||||||
|
|
||||||
@ -24,8 +24,8 @@ public class ClockworkContraption extends Contraption {
|
|||||||
private Set<BlockPos> ignoreBlocks = new HashSet<>();
|
private Set<BlockPos> ignoreBlocks = new HashSet<>();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected AllContraptionTypes getType() {
|
protected ContraptionType getType() {
|
||||||
return AllContraptionTypes.CLOCKWORK;
|
return ContraptionType.CLOCKWORK;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ignoreBlocks(Set<BlockPos> blocks, BlockPos anchor) {
|
private void ignoreBlocks(Set<BlockPos> blocks, BlockPos anchor) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.simibubi.create.content.contraptions.components.structureMovement.bearing;
|
package com.simibubi.create.content.contraptions.components.structureMovement.bearing;
|
||||||
|
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.AllContraptionTypes;
|
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionType;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.Contraption;
|
import com.simibubi.create.content.contraptions.components.structureMovement.Contraption;
|
||||||
|
|
||||||
import net.minecraft.nbt.CompoundNBT;
|
import net.minecraft.nbt.CompoundNBT;
|
||||||
@ -37,8 +37,8 @@ public class StabilizedContraption extends Contraption {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected AllContraptionTypes getType() {
|
protected ContraptionType getType() {
|
||||||
return AllContraptionTypes.STABILIZED;
|
return ContraptionType.STABILIZED;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -0,0 +1,63 @@
|
|||||||
|
package com.simibubi.create.content.contraptions.components.structureMovement.gantry;
|
||||||
|
|
||||||
|
import com.simibubi.create.AllBlocks;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionType;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.TranslatingContraption;
|
||||||
|
|
||||||
|
import net.minecraft.nbt.CompoundNBT;
|
||||||
|
import net.minecraft.util.Direction;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraft.world.gen.feature.template.Template.BlockInfo;
|
||||||
|
|
||||||
|
public class GantryContraption extends TranslatingContraption {
|
||||||
|
|
||||||
|
protected Direction facing;
|
||||||
|
|
||||||
|
public GantryContraption() {}
|
||||||
|
|
||||||
|
public GantryContraption(Direction facing) {
|
||||||
|
this.facing = facing;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean assemble(World world, BlockPos pos) {
|
||||||
|
if (!searchMovedStructure(world, pos, null))
|
||||||
|
return false;
|
||||||
|
startMoving(world);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CompoundNBT writeNBT(boolean spawnPacket) {
|
||||||
|
CompoundNBT tag = super.writeNBT(spawnPacket);
|
||||||
|
tag.putInt("Facing", facing.getIndex());
|
||||||
|
return tag;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void readNBT(World world, CompoundNBT tag, boolean spawnData) {
|
||||||
|
facing = Direction.byIndex(tag.getInt("Facing"));
|
||||||
|
super.readNBT(world, tag, spawnData);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean isAnchoringBlockAt(BlockPos pos) {
|
||||||
|
return super.isAnchoringBlockAt(pos.offset(facing));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected ContraptionType getType() {
|
||||||
|
return ContraptionType.GANTRY;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Direction getFacing() {
|
||||||
|
return facing;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean shouldUpdateAfterMovement(BlockInfo info) {
|
||||||
|
return super.shouldUpdateAfterMovement(info) && !AllBlocks.GANTRY_PINION.has(info.state);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,203 @@
|
|||||||
|
package com.simibubi.create.content.contraptions.components.structureMovement.gantry;
|
||||||
|
|
||||||
|
import com.simibubi.create.AllBlocks;
|
||||||
|
import com.simibubi.create.AllEntityTypes;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.AbstractContraptionEntity;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.Contraption;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionCollider;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.StructureTransform;
|
||||||
|
import com.simibubi.create.content.contraptions.relays.advanced.GantryShaftBlock;
|
||||||
|
import com.simibubi.create.content.contraptions.relays.advanced.GantryShaftTileEntity;
|
||||||
|
import com.simibubi.create.foundation.networking.AllPackets;
|
||||||
|
import com.simibubi.create.foundation.utility.NBTHelper;
|
||||||
|
import com.simibubi.create.foundation.utility.ServerSpeedProvider;
|
||||||
|
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.entity.Entity;
|
||||||
|
import net.minecraft.entity.EntityType;
|
||||||
|
import net.minecraft.nbt.CompoundNBT;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.Direction;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.util.math.MathHelper;
|
||||||
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
|
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||||
|
import net.minecraftforge.fml.network.PacketDistributor;
|
||||||
|
|
||||||
|
public class GantryContraptionEntity extends AbstractContraptionEntity {
|
||||||
|
|
||||||
|
Direction movementAxis;
|
||||||
|
double clientOffsetDiff;
|
||||||
|
double axisMotion;
|
||||||
|
|
||||||
|
public GantryContraptionEntity(EntityType<?> entityTypeIn, World worldIn) {
|
||||||
|
super(entityTypeIn, worldIn);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static GantryContraptionEntity create(World world, Contraption contraption, Direction movementAxis) {
|
||||||
|
GantryContraptionEntity entity = new GantryContraptionEntity(AllEntityTypes.GANTRY_CONTRAPTION.get(), world);
|
||||||
|
entity.setContraption(contraption);
|
||||||
|
entity.movementAxis = movementAxis;
|
||||||
|
return entity;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void tickContraption() {
|
||||||
|
if (!(contraption instanceof GantryContraption))
|
||||||
|
return;
|
||||||
|
|
||||||
|
double prevAxisMotion = axisMotion;
|
||||||
|
if (world.isRemote) {
|
||||||
|
clientOffsetDiff *= .75f;
|
||||||
|
updateClientMotion();
|
||||||
|
}
|
||||||
|
|
||||||
|
checkPinionShaft();
|
||||||
|
tickActors();
|
||||||
|
Vec3d movementVec = getMotion();
|
||||||
|
|
||||||
|
if (ContraptionCollider.collideBlocks(this)) {
|
||||||
|
if (!world.isRemote)
|
||||||
|
disassemble();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isStalled() && ticksExisted > 2)
|
||||||
|
move(movementVec.x, movementVec.y, movementVec.z);
|
||||||
|
|
||||||
|
if (!world.isRemote && (prevAxisMotion != axisMotion || ticksExisted % 3 == 0))
|
||||||
|
sendPacket();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void checkPinionShaft() {
|
||||||
|
Vec3d movementVec;
|
||||||
|
Direction facing = ((GantryContraption) contraption).getFacing();
|
||||||
|
Vec3d currentPosition = getAnchorVec().add(.5, .5, .5);
|
||||||
|
BlockPos gantryShaftPos = new BlockPos(currentPosition).offset(facing.getOpposite());
|
||||||
|
|
||||||
|
TileEntity te = world.getTileEntity(gantryShaftPos);
|
||||||
|
if (!(te instanceof GantryShaftTileEntity) || !AllBlocks.GANTRY_SHAFT.has(te.getBlockState())) {
|
||||||
|
if (!world.isRemote) {
|
||||||
|
setContraptionMotion(Vec3d.ZERO);
|
||||||
|
disassemble();
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
BlockState blockState = te.getBlockState();
|
||||||
|
Direction direction = blockState.get(GantryShaftBlock.FACING);
|
||||||
|
GantryShaftTileEntity gantryShaftTileEntity = (GantryShaftTileEntity) te;
|
||||||
|
|
||||||
|
float pinionMovementSpeed = gantryShaftTileEntity.getPinionMovementSpeed();
|
||||||
|
movementVec = new Vec3d(direction.getDirectionVec()).scale(pinionMovementSpeed);
|
||||||
|
|
||||||
|
if (blockState.get(GantryShaftBlock.POWERED) || pinionMovementSpeed == 0) {
|
||||||
|
setContraptionMotion(Vec3d.ZERO);
|
||||||
|
if (!world.isRemote)
|
||||||
|
disassemble();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Vec3d nextPosition = currentPosition.add(movementVec);
|
||||||
|
double currentCoord = direction.getAxis()
|
||||||
|
.getCoordinate(currentPosition.x, currentPosition.y, currentPosition.z);
|
||||||
|
double nextCoord = direction.getAxis()
|
||||||
|
.getCoordinate(nextPosition.x, nextPosition.y, nextPosition.z);
|
||||||
|
|
||||||
|
if ((MathHelper.floor(currentCoord) + .5f < nextCoord != (pinionMovementSpeed * direction.getAxisDirection()
|
||||||
|
.getOffset() < 0)))
|
||||||
|
if (!gantryShaftTileEntity.canAssembleOn()) {
|
||||||
|
setContraptionMotion(Vec3d.ZERO);
|
||||||
|
if (!world.isRemote)
|
||||||
|
disassemble();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (world.isRemote)
|
||||||
|
return;
|
||||||
|
|
||||||
|
axisMotion = pinionMovementSpeed;
|
||||||
|
setContraptionMotion(movementVec);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void writeAdditional(CompoundNBT compound, boolean spawnPacket) {
|
||||||
|
NBTHelper.writeEnum(compound, "GantryAxis", movementAxis);
|
||||||
|
super.writeAdditional(compound, spawnPacket);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void readAdditional(CompoundNBT compound, boolean spawnData) {
|
||||||
|
movementAxis = NBTHelper.readEnum(compound, "GantryAxis", Direction.class);
|
||||||
|
super.readAdditional(compound, spawnData);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Vec3d applyRotation(Vec3d localPos, float partialTicks) {
|
||||||
|
return localPos;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Vec3d reverseRotation(Vec3d localPos, float partialTicks) {
|
||||||
|
return localPos;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected StructureTransform makeStructureTransform() {
|
||||||
|
return new StructureTransform(new BlockPos(getAnchorVec().add(.5, .5, .5)), 0, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected float getStalledAngle() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setPositionAndUpdate(double p_70634_1_, double p_70634_3_, double p_70634_5_) {}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@OnlyIn(Dist.CLIENT)
|
||||||
|
public void setPositionAndRotationDirect(double x, double y, double z, float yw, float pt, int inc, boolean t) {}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void handleStallInformation(float x, float y, float z, float angle) {
|
||||||
|
setPos(x, y, z);
|
||||||
|
clientOffsetDiff = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ContraptionRotationState getRotationState() {
|
||||||
|
return ContraptionRotationState.NONE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateClientMotion() {
|
||||||
|
float modifier = movementAxis.getAxisDirection()
|
||||||
|
.getOffset();
|
||||||
|
setContraptionMotion(new Vec3d(movementAxis.getDirectionVec())
|
||||||
|
.scale((axisMotion + clientOffsetDiff * modifier / 2f) * ServerSpeedProvider.get()));
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getAxisCoord() {
|
||||||
|
Vec3d anchorVec = getAnchorVec();
|
||||||
|
return movementAxis.getAxis()
|
||||||
|
.getCoordinate(anchorVec.x, anchorVec.y, anchorVec.z);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void sendPacket() {
|
||||||
|
AllPackets.channel.send(PacketDistributor.TRACKING_ENTITY.with(() -> this),
|
||||||
|
new GantryContraptionUpdatePacket(getEntityId(), getAxisCoord(), axisMotion));
|
||||||
|
}
|
||||||
|
|
||||||
|
@OnlyIn(Dist.CLIENT)
|
||||||
|
public static void handlePacket(GantryContraptionUpdatePacket packet) {
|
||||||
|
Entity entity = Minecraft.getInstance().world.getEntityByID(packet.entityID);
|
||||||
|
if (!(entity instanceof GantryContraptionEntity))
|
||||||
|
return;
|
||||||
|
GantryContraptionEntity ce = (GantryContraptionEntity) entity;
|
||||||
|
ce.axisMotion = packet.motion;
|
||||||
|
ce.clientOffsetDiff = packet.coord - ce.getAxisCoord();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
package com.simibubi.create.content.contraptions.components.structureMovement.gantry;
|
||||||
|
|
||||||
|
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.AbstractContraptionEntityRenderer;
|
||||||
|
|
||||||
|
import net.minecraft.client.renderer.entity.EntityRendererManager;
|
||||||
|
|
||||||
|
public class GantryContraptionEntityRenderer extends AbstractContraptionEntityRenderer<GantryContraptionEntity> {
|
||||||
|
|
||||||
|
public GantryContraptionEntityRenderer(EntityRendererManager p_i46179_1_) {
|
||||||
|
super(p_i46179_1_);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void transform(GantryContraptionEntity contraptionEntity, float partialTicks,
|
||||||
|
MatrixStack[] matrixStacks) {}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,46 @@
|
|||||||
|
package com.simibubi.create.content.contraptions.components.structureMovement.gantry;
|
||||||
|
|
||||||
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
|
import com.simibubi.create.foundation.networking.SimplePacketBase;
|
||||||
|
|
||||||
|
import net.minecraft.network.PacketBuffer;
|
||||||
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
|
import net.minecraftforge.fml.DistExecutor;
|
||||||
|
import net.minecraftforge.fml.network.NetworkEvent.Context;
|
||||||
|
|
||||||
|
public class GantryContraptionUpdatePacket extends SimplePacketBase {
|
||||||
|
|
||||||
|
int entityID;
|
||||||
|
double coord;
|
||||||
|
double motion;
|
||||||
|
|
||||||
|
public GantryContraptionUpdatePacket(int entityID, double coord, double motion) {
|
||||||
|
this.entityID = entityID;
|
||||||
|
this.coord = coord;
|
||||||
|
this.motion = motion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GantryContraptionUpdatePacket(PacketBuffer buffer) {
|
||||||
|
entityID = buffer.readInt();
|
||||||
|
coord = buffer.readFloat();
|
||||||
|
motion = buffer.readFloat();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void write(PacketBuffer buffer) {
|
||||||
|
buffer.writeInt(entityID);
|
||||||
|
buffer.writeFloat((float) coord);
|
||||||
|
buffer.writeFloat((float) motion);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handle(Supplier<Context> context) {
|
||||||
|
context.get()
|
||||||
|
.enqueueWork(
|
||||||
|
() -> DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> GantryContraptionEntity.handlePacket(this)));
|
||||||
|
context.get()
|
||||||
|
.setPacketHandled(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,121 @@
|
|||||||
|
package com.simibubi.create.content.contraptions.components.structureMovement.gantry;
|
||||||
|
|
||||||
|
import com.simibubi.create.AllBlocks;
|
||||||
|
import com.simibubi.create.AllTileEntities;
|
||||||
|
import com.simibubi.create.content.contraptions.base.DirectionalAxisKineticBlock;
|
||||||
|
import com.simibubi.create.content.contraptions.base.IRotate;
|
||||||
|
import com.simibubi.create.content.contraptions.relays.advanced.GantryShaftBlock;
|
||||||
|
import com.simibubi.create.foundation.block.ITE;
|
||||||
|
import com.simibubi.create.foundation.utility.Iterate;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
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.world.IBlockReader;
|
||||||
|
import net.minecraft.world.IWorld;
|
||||||
|
import net.minecraft.world.IWorldReader;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class GantryPinionBlock extends DirectionalAxisKineticBlock implements ITE<GantryPinionTileEntity> {
|
||||||
|
|
||||||
|
public GantryPinionBlock(Properties properties) {
|
||||||
|
super(properties);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isValidPosition(BlockState state, IWorldReader world, BlockPos pos) {
|
||||||
|
Direction direction = state.get(FACING);
|
||||||
|
BlockState shaft = world.getBlockState(pos.offset(direction.getOpposite()));
|
||||||
|
return AllBlocks.GANTRY_SHAFT.has(shaft) && shaft.get(GantryShaftBlock.FACING)
|
||||||
|
.getAxis() != direction.getAxis();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBlockAdded(BlockState state, World worldIn, BlockPos pos, BlockState oldState, boolean isMoving) {
|
||||||
|
super.onBlockAdded(state, worldIn, pos, oldState, isMoving);
|
||||||
|
withTileEntityDo(worldIn, pos, GantryPinionTileEntity::checkValidGantryShaft);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TileEntity createTileEntity(BlockState state, IBlockReader world) {
|
||||||
|
return AllTileEntities.GANTRY_PINION.create();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Direction getFacingForPlacement(BlockItemUseContext context) {
|
||||||
|
return context.getFace();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BlockState getStateForPlacement(BlockItemUseContext context) {
|
||||||
|
BlockState stateForPlacement = super.getStateForPlacement(context);
|
||||||
|
Direction opposite = stateForPlacement.get(FACING)
|
||||||
|
.getOpposite();
|
||||||
|
return cycleAxisIfNecessary(stateForPlacement, opposite, context.getWorld()
|
||||||
|
.getBlockState(context.getPos()
|
||||||
|
.offset(opposite)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void neighborChanged(BlockState state, World world, BlockPos pos, Block p_220069_4_, BlockPos p_220069_5_,
|
||||||
|
boolean p_220069_6_) {
|
||||||
|
if (!isValidPosition(state, world, pos))
|
||||||
|
world.destroyBlock(pos, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BlockState updatePostPlacement(BlockState state, Direction direction, BlockState otherState, IWorld world,
|
||||||
|
BlockPos pos, BlockPos p_196271_6_) {
|
||||||
|
if (state.get(FACING) != direction.getOpposite())
|
||||||
|
return state;
|
||||||
|
return cycleAxisIfNecessary(state, direction, otherState);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected BlockState cycleAxisIfNecessary(BlockState state, Direction direction, BlockState otherState) {
|
||||||
|
if (!AllBlocks.GANTRY_SHAFT.has(otherState))
|
||||||
|
return state;
|
||||||
|
if (otherState.get(GantryShaftBlock.FACING)
|
||||||
|
.getAxis() == direction.getAxis())
|
||||||
|
return state;
|
||||||
|
if (isValidGantryShaftAxis(state, otherState))
|
||||||
|
return state;
|
||||||
|
return state.cycle(AXIS_ALONG_FIRST_COORDINATE);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean isValidGantryShaftAxis(BlockState pinionState, BlockState gantryState) {
|
||||||
|
return getValidGantryShaftAxis(pinionState) == gantryState.get(GantryShaftBlock.FACING)
|
||||||
|
.getAxis();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Axis getValidGantryShaftAxis(BlockState state) {
|
||||||
|
if (!(state.getBlock() instanceof GantryPinionBlock))
|
||||||
|
return Axis.Y;
|
||||||
|
IRotate block = (IRotate) state.getBlock();
|
||||||
|
Axis rotationAxis = block.getRotationAxis(state);
|
||||||
|
Axis facingAxis = state.get(FACING)
|
||||||
|
.getAxis();
|
||||||
|
for (Axis axis : Iterate.axes)
|
||||||
|
if (axis != rotationAxis && axis != facingAxis)
|
||||||
|
return axis;
|
||||||
|
return Axis.Y;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Axis getValidGantryPinionAxis(BlockState state, Axis shaftAxis) {
|
||||||
|
Axis facingAxis = state.get(FACING)
|
||||||
|
.getAxis();
|
||||||
|
for (Axis axis : Iterate.axes)
|
||||||
|
if (axis != shaftAxis && axis != facingAxis)
|
||||||
|
return axis;
|
||||||
|
return Axis.Y;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Class<GantryPinionTileEntity> getTileEntityClass() {
|
||||||
|
return GantryPinionTileEntity.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,78 @@
|
|||||||
|
package com.simibubi.create.content.contraptions.components.structureMovement.gantry;
|
||||||
|
|
||||||
|
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||||
|
import com.simibubi.create.AllBlockPartials;
|
||||||
|
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||||
|
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
|
||||||
|
import com.simibubi.create.foundation.utility.AngleHelper;
|
||||||
|
import com.simibubi.create.foundation.utility.Iterate;
|
||||||
|
import com.simibubi.create.foundation.utility.MatrixStacker;
|
||||||
|
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||||
|
import net.minecraft.client.renderer.RenderType;
|
||||||
|
import net.minecraft.client.renderer.Vector3f;
|
||||||
|
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||||
|
import net.minecraft.util.Direction;
|
||||||
|
import net.minecraft.util.Direction.Axis;
|
||||||
|
import net.minecraft.util.Direction.AxisDirection;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
|
||||||
|
public class GantryPinionRenderer extends KineticTileEntityRenderer {
|
||||||
|
|
||||||
|
public GantryPinionRenderer(TileEntityRendererDispatcher dispatcher) {
|
||||||
|
super(dispatcher);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void renderSafe(KineticTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer,
|
||||||
|
int light, int overlay) {
|
||||||
|
super.renderSafe(te, partialTicks, ms, buffer, light, overlay);
|
||||||
|
BlockState state = te.getBlockState();
|
||||||
|
Direction facing = state.get(GantryPinionBlock.FACING);
|
||||||
|
Boolean alongFirst = state.get(GantryPinionBlock.AXIS_ALONG_FIRST_COORDINATE);
|
||||||
|
Axis rotationAxis = getRotationAxisOf(te);
|
||||||
|
BlockPos visualPos = facing.getAxisDirection() == AxisDirection.POSITIVE ? te.getPos()
|
||||||
|
: te.getPos()
|
||||||
|
.offset(facing.getOpposite());
|
||||||
|
float angleForTe = getAngleForTe(te, visualPos, rotationAxis);
|
||||||
|
|
||||||
|
Axis gantryAxis = Axis.X;
|
||||||
|
for (Axis axis : Iterate.axes)
|
||||||
|
if (axis != rotationAxis && axis != facing.getAxis())
|
||||||
|
gantryAxis = axis;
|
||||||
|
|
||||||
|
if (gantryAxis == Axis.Z)
|
||||||
|
if (facing == Direction.DOWN)
|
||||||
|
angleForTe *= -1;
|
||||||
|
if (gantryAxis == Axis.Y)
|
||||||
|
if (facing == Direction.NORTH || facing == Direction.EAST)
|
||||||
|
angleForTe *= -1;
|
||||||
|
|
||||||
|
ms.push();
|
||||||
|
|
||||||
|
MatrixStacker msr = MatrixStacker.of(ms);
|
||||||
|
|
||||||
|
msr.centre()
|
||||||
|
.rotateY(AngleHelper.horizontalAngle(facing))
|
||||||
|
.rotateX(facing == Direction.UP ? 0 : facing == Direction.DOWN ? 180 : 90)
|
||||||
|
.rotateY(alongFirst ^ facing.getAxis() == Axis.Z ? 90 : 0);
|
||||||
|
|
||||||
|
ms.translate(0, -9 / 16f, 0);
|
||||||
|
ms.multiply(Vector3f.POSITIVE_X.getRadialQuaternion(-angleForTe / 2f));
|
||||||
|
ms.translate(0, 9 / 16f, 0);
|
||||||
|
|
||||||
|
msr.unCentre();
|
||||||
|
AllBlockPartials.GANTRY_COGS.renderOn(state)
|
||||||
|
.light(light)
|
||||||
|
.renderInto(ms, buffer.getBuffer(RenderType.getSolid()));
|
||||||
|
|
||||||
|
ms.pop();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected BlockState getRenderedBlockState(KineticTileEntity te) {
|
||||||
|
return shaft(getRotationAxisOf(te));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,138 @@
|
|||||||
|
package com.simibubi.create.content.contraptions.components.structureMovement.gantry;
|
||||||
|
|
||||||
|
import static net.minecraft.state.properties.BlockStateProperties.FACING;
|
||||||
|
|
||||||
|
import com.simibubi.create.AllBlocks;
|
||||||
|
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionCollider;
|
||||||
|
import com.simibubi.create.content.contraptions.relays.advanced.GantryShaftBlock;
|
||||||
|
import com.simibubi.create.content.contraptions.relays.advanced.GantryShaftTileEntity;
|
||||||
|
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.tileentity.TileEntityType;
|
||||||
|
import net.minecraft.util.Direction;
|
||||||
|
import net.minecraft.util.Direction.Axis;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
|
||||||
|
public class GantryPinionTileEntity extends KineticTileEntity {
|
||||||
|
|
||||||
|
boolean assembleNextTick;
|
||||||
|
|
||||||
|
public GantryPinionTileEntity(TileEntityType<?> typeIn) {
|
||||||
|
super(typeIn);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSpeedChanged(float previousSpeed) {
|
||||||
|
super.onSpeedChanged(previousSpeed);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void checkValidGantryShaft() {
|
||||||
|
if (shouldAssemble())
|
||||||
|
queueAssembly();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void queueAssembly() {
|
||||||
|
assembleNextTick = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void tick() {
|
||||||
|
super.tick();
|
||||||
|
|
||||||
|
if (world.isRemote)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (assembleNextTick) {
|
||||||
|
tryAssemble();
|
||||||
|
assembleNextTick = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void tryAssemble() {
|
||||||
|
BlockState blockState = getBlockState();
|
||||||
|
if (!(blockState.getBlock() instanceof GantryPinionBlock))
|
||||||
|
return;
|
||||||
|
|
||||||
|
Direction direction = blockState.get(FACING);
|
||||||
|
GantryContraption contraption = new GantryContraption(direction);
|
||||||
|
|
||||||
|
TileEntity shaftTe = world.getTileEntity(pos.offset(direction.getOpposite()));
|
||||||
|
if (!(shaftTe instanceof GantryShaftTileEntity))
|
||||||
|
return;
|
||||||
|
BlockState shaftState = shaftTe.getBlockState();
|
||||||
|
if (!AllBlocks.GANTRY_SHAFT.has(shaftState))
|
||||||
|
return;
|
||||||
|
|
||||||
|
float pinionMovementSpeed = ((GantryShaftTileEntity) shaftTe).getPinionMovementSpeed();
|
||||||
|
Direction shaftOrientation = shaftState.get(GantryShaftBlock.FACING);
|
||||||
|
Direction movementDirection = shaftOrientation;
|
||||||
|
if (pinionMovementSpeed < 0)
|
||||||
|
movementDirection = movementDirection.getOpposite();
|
||||||
|
|
||||||
|
if (!contraption.assemble(world, pos))
|
||||||
|
return;
|
||||||
|
if (ContraptionCollider.isCollidingWithWorld(world, contraption, pos.offset(movementDirection),
|
||||||
|
movementDirection))
|
||||||
|
return;
|
||||||
|
|
||||||
|
contraption.removeBlocksFromWorld(world, BlockPos.ZERO);
|
||||||
|
GantryContraptionEntity movedContraption =
|
||||||
|
GantryContraptionEntity.create(world, contraption, shaftOrientation);
|
||||||
|
BlockPos anchor = pos;
|
||||||
|
movedContraption.setPosition(anchor.getX(), anchor.getY(), anchor.getZ());
|
||||||
|
world.addEntity(movedContraption);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float propagateRotationTo(KineticTileEntity target, BlockState stateFrom, BlockState stateTo, BlockPos diff,
|
||||||
|
boolean connectedViaAxes, boolean connectedViaCogs) {
|
||||||
|
float defaultModifier =
|
||||||
|
super.propagateRotationTo(target, stateFrom, stateTo, diff, connectedViaAxes, connectedViaCogs);
|
||||||
|
|
||||||
|
if (connectedViaAxes)
|
||||||
|
return defaultModifier;
|
||||||
|
if (!AllBlocks.GANTRY_SHAFT.has(stateTo))
|
||||||
|
return defaultModifier;
|
||||||
|
if (!stateTo.get(GantryShaftBlock.POWERED))
|
||||||
|
return defaultModifier;
|
||||||
|
|
||||||
|
Direction direction = Direction.getFacingFromVector(diff.getX(), diff.getY(), diff.getZ());
|
||||||
|
if (stateFrom.get(GantryPinionBlock.FACING) != direction.getOpposite())
|
||||||
|
return defaultModifier;
|
||||||
|
return getGantryPinionModifier(stateTo.get(GantryShaftBlock.FACING), stateFrom.get(GantryPinionBlock.FACING));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static float getGantryPinionModifier(Direction shaft, Direction pinionDirection) {
|
||||||
|
Axis shaftAxis = shaft.getAxis();
|
||||||
|
float directionModifier = shaft.getAxisDirection()
|
||||||
|
.getOffset();
|
||||||
|
if (shaftAxis == Axis.Y)
|
||||||
|
if (pinionDirection == Direction.NORTH || pinionDirection == Direction.EAST)
|
||||||
|
return -directionModifier;
|
||||||
|
if (shaftAxis == Axis.X)
|
||||||
|
if (pinionDirection == Direction.DOWN || pinionDirection == Direction.SOUTH)
|
||||||
|
return -directionModifier;
|
||||||
|
if (shaftAxis == Axis.Z)
|
||||||
|
if (pinionDirection == Direction.UP || pinionDirection == Direction.WEST)
|
||||||
|
return -directionModifier;
|
||||||
|
return directionModifier;
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean shouldAssemble() {
|
||||||
|
BlockState blockState = getBlockState();
|
||||||
|
if (!(blockState.getBlock() instanceof GantryPinionBlock))
|
||||||
|
return false;
|
||||||
|
Direction facing = blockState.get(GantryPinionBlock.FACING)
|
||||||
|
.getOpposite();
|
||||||
|
BlockState shaftState = world.getBlockState(pos.offset(facing));
|
||||||
|
if (!(shaftState.getBlock() instanceof GantryShaftBlock))
|
||||||
|
return false;
|
||||||
|
if (shaftState.get(GantryShaftBlock.POWERED))
|
||||||
|
return false;
|
||||||
|
TileEntity te = world.getTileEntity(pos.offset(facing));
|
||||||
|
return te instanceof GantryShaftTileEntity && ((GantryShaftTileEntity) te).canAssembleOn();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -7,7 +7,7 @@ import java.util.List;
|
|||||||
import org.apache.commons.lang3.tuple.Pair;
|
import org.apache.commons.lang3.tuple.Pair;
|
||||||
|
|
||||||
import com.simibubi.create.AllBlocks;
|
import com.simibubi.create.AllBlocks;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.AllContraptionTypes;
|
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionType;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.Contraption;
|
import com.simibubi.create.content.contraptions.components.structureMovement.Contraption;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.mounted.CartAssemblerTileEntity.CartMovementMode;
|
import com.simibubi.create.content.contraptions.components.structureMovement.mounted.CartAssemblerTileEntity.CartMovementMode;
|
||||||
import com.simibubi.create.foundation.utility.Iterate;
|
import com.simibubi.create.foundation.utility.Iterate;
|
||||||
@ -47,8 +47,8 @@ public class MountedContraption extends Contraption {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected AllContraptionTypes getType() {
|
protected ContraptionType getType() {
|
||||||
return AllContraptionTypes.MOUNTED;
|
return ContraptionType.MOUNTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -154,7 +154,7 @@ public abstract class LinearActuatorTileEntity extends KineticTileEntity impleme
|
|||||||
compound.putBoolean("Waiting", waitingForSpeedChange);
|
compound.putBoolean("Waiting", waitingForSpeedChange);
|
||||||
compound.putFloat("Offset", offset);
|
compound.putFloat("Offset", offset);
|
||||||
super.write(compound, clientPacket);
|
super.write(compound, clientPacket);
|
||||||
|
|
||||||
if (clientPacket && forceMove) {
|
if (clientPacket && forceMove) {
|
||||||
compound.putBoolean("ForceMovement", forceMove);
|
compound.putBoolean("ForceMovement", forceMove);
|
||||||
forceMove = false;
|
forceMove = false;
|
||||||
@ -247,7 +247,7 @@ public abstract class LinearActuatorTileEntity extends KineticTileEntity impleme
|
|||||||
}
|
}
|
||||||
|
|
||||||
public float getMovementSpeed() {
|
public float getMovementSpeed() {
|
||||||
float movementSpeed = getSpeed() / 512f + clientOffsetDiff / 2f;
|
float movementSpeed = MathHelper.clamp(getSpeed() / 512f, -.49f, .49f) + clientOffsetDiff / 2f;
|
||||||
if (world.isRemote)
|
if (world.isRemote)
|
||||||
movementSpeed *= ServerSpeedProvider.get();
|
movementSpeed *= ServerSpeedProvider.get();
|
||||||
return movementSpeed;
|
return movementSpeed;
|
||||||
@ -283,7 +283,7 @@ public abstract class LinearActuatorTileEntity extends KineticTileEntity impleme
|
|||||||
public boolean isAttachedTo(AbstractContraptionEntity contraption) {
|
public boolean isAttachedTo(AbstractContraptionEntity contraption) {
|
||||||
return movedContraption == contraption;
|
return movedContraption == contraption;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BlockPos getBlockPosition() {
|
public BlockPos getBlockPosition() {
|
||||||
return pos;
|
return pos;
|
||||||
|
@ -112,7 +112,7 @@ public class MechanicalPistonTileEntity extends LinearActuatorTileEntity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float getMovementSpeed() {
|
public float getMovementSpeed() {
|
||||||
float movementSpeed = getSpeed() / 512f;
|
float movementSpeed = MathHelper.clamp(getSpeed() / 512f, -.49f, .49f);
|
||||||
if (world.isRemote)
|
if (world.isRemote)
|
||||||
movementSpeed *= ServerSpeedProvider.get();
|
movementSpeed *= ServerSpeedProvider.get();
|
||||||
Direction pistonDirection = getBlockState().get(BlockStateProperties.FACING);
|
Direction pistonDirection = getBlockState().get(BlockStateProperties.FACING);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.simibubi.create.content.contraptions.components.structureMovement.piston;
|
package com.simibubi.create.content.contraptions.components.structureMovement.piston;
|
||||||
|
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.AllContraptionTypes;
|
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionType;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.BlockMovementTraits;
|
import com.simibubi.create.content.contraptions.components.structureMovement.BlockMovementTraits;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.TranslatingContraption;
|
import com.simibubi.create.content.contraptions.components.structureMovement.TranslatingContraption;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock.*;
|
import com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock.*;
|
||||||
@ -38,8 +38,8 @@ public class PistonContraption extends TranslatingContraption {
|
|||||||
private boolean retract;
|
private boolean retract;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected AllContraptionTypes getType() {
|
protected ContraptionType getType() {
|
||||||
return AllContraptionTypes.PISTON;
|
return ContraptionType.PISTON;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PistonContraption() {}
|
public PistonContraption() {}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.simibubi.create.content.contraptions.components.structureMovement.pulley;
|
package com.simibubi.create.content.contraptions.components.structureMovement.pulley;
|
||||||
|
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.AllContraptionTypes;
|
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionType;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.TranslatingContraption;
|
import com.simibubi.create.content.contraptions.components.structureMovement.TranslatingContraption;
|
||||||
|
|
||||||
import net.minecraft.nbt.CompoundNBT;
|
import net.minecraft.nbt.CompoundNBT;
|
||||||
@ -12,8 +12,8 @@ public class PulleyContraption extends TranslatingContraption {
|
|||||||
int initialOffset;
|
int initialOffset;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected AllContraptionTypes getType() {
|
protected ContraptionType getType() {
|
||||||
return AllContraptionTypes.PULLEY;
|
return ContraptionType.PULLEY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PulleyContraption() {}
|
public PulleyContraption() {}
|
||||||
|
@ -0,0 +1,236 @@
|
|||||||
|
package com.simibubi.create.content.contraptions.relays.advanced;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.simibubi.create.AllBlocks;
|
||||||
|
import com.simibubi.create.AllShapes;
|
||||||
|
import com.simibubi.create.AllTileEntities;
|
||||||
|
import com.simibubi.create.content.contraptions.base.DirectionalKineticBlock;
|
||||||
|
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||||
|
import com.simibubi.create.foundation.utility.Iterate;
|
||||||
|
import com.simibubi.create.foundation.utility.Lang;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.BlockRenderType;
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.item.BlockItemUseContext;
|
||||||
|
import net.minecraft.item.ItemUseContext;
|
||||||
|
import net.minecraft.state.BooleanProperty;
|
||||||
|
import net.minecraft.state.EnumProperty;
|
||||||
|
import net.minecraft.state.IProperty;
|
||||||
|
import net.minecraft.state.StateContainer.Builder;
|
||||||
|
import net.minecraft.state.properties.BlockStateProperties;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.ActionResultType;
|
||||||
|
import net.minecraft.util.Direction;
|
||||||
|
import net.minecraft.util.Direction.Axis;
|
||||||
|
import net.minecraft.util.IStringSerializable;
|
||||||
|
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.IWorld;
|
||||||
|
import net.minecraft.world.IWorldReader;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class GantryShaftBlock extends DirectionalKineticBlock {
|
||||||
|
|
||||||
|
public static final IProperty<Part> PART = EnumProperty.create("part", Part.class);
|
||||||
|
public static final BooleanProperty POWERED = BlockStateProperties.POWERED;
|
||||||
|
|
||||||
|
public enum Part implements IStringSerializable {
|
||||||
|
START, MIDDLE, END, SINGLE;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return Lang.asId(name());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void fillStateContainer(Builder<Block, BlockState> builder) {
|
||||||
|
super.fillStateContainer(builder.add(PART, POWERED));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public VoxelShape getShape(BlockState state, IBlockReader p_220053_2_, BlockPos p_220053_3_,
|
||||||
|
ISelectionContext p_220053_4_) {
|
||||||
|
return AllShapes.EIGHT_VOXEL_POLE.get(state.get(FACING)
|
||||||
|
.getAxis());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BlockRenderType getRenderType(BlockState state) {
|
||||||
|
return BlockRenderType.ENTITYBLOCK_ANIMATED;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BlockState updatePostPlacement(BlockState state, Direction direction, BlockState neighbour, IWorld world,
|
||||||
|
BlockPos pos, BlockPos neighbourPos) {
|
||||||
|
Direction facing = state.get(FACING);
|
||||||
|
Axis axis = facing.getAxis();
|
||||||
|
if (direction.getAxis() != axis)
|
||||||
|
return state;
|
||||||
|
boolean connect = AllBlocks.GANTRY_SHAFT.has(neighbour) && neighbour.get(FACING) == facing;
|
||||||
|
|
||||||
|
Part part = state.get(PART);
|
||||||
|
if (direction.getAxisDirection() == facing.getAxisDirection()) {
|
||||||
|
if (connect) {
|
||||||
|
if (part == Part.END)
|
||||||
|
part = Part.MIDDLE;
|
||||||
|
if (part == Part.SINGLE)
|
||||||
|
part = Part.START;
|
||||||
|
} else {
|
||||||
|
if (part == Part.MIDDLE)
|
||||||
|
part = Part.END;
|
||||||
|
if (part == Part.START)
|
||||||
|
part = Part.SINGLE;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (connect) {
|
||||||
|
if (part == Part.START)
|
||||||
|
part = Part.MIDDLE;
|
||||||
|
if (part == Part.SINGLE)
|
||||||
|
part = Part.END;
|
||||||
|
} else {
|
||||||
|
if (part == Part.MIDDLE)
|
||||||
|
part = Part.START;
|
||||||
|
if (part == Part.END)
|
||||||
|
part = Part.SINGLE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return state.with(PART, part);
|
||||||
|
}
|
||||||
|
|
||||||
|
public GantryShaftBlock(Properties properties) {
|
||||||
|
super(properties);
|
||||||
|
setDefaultState(getDefaultState().with(POWERED, false)
|
||||||
|
.with(PART, Part.SINGLE));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BlockState getStateForPlacement(BlockItemUseContext context) {
|
||||||
|
BlockState state = super.getStateForPlacement(context);
|
||||||
|
Direction face = context.getFace();
|
||||||
|
BlockState blockState = context.getWorld()
|
||||||
|
.getBlockState(context.getPos()
|
||||||
|
.offset(face.getOpposite()));
|
||||||
|
if (AllBlocks.GANTRY_SHAFT.has(blockState) && blockState.get(FACING)
|
||||||
|
.getAxis() == face.getAxis()) {
|
||||||
|
Direction facing = blockState.get(FACING);
|
||||||
|
state = state.with(FACING, context.getPlayer() == null || !context.getPlayer()
|
||||||
|
.isSneaking() ? facing : facing.getOpposite());
|
||||||
|
}
|
||||||
|
return state.with(POWERED, shouldBePowered(state, context.getWorld(), context.getPos()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ActionResultType onWrenched(BlockState state, ItemUseContext context) {
|
||||||
|
ActionResultType onWrenched = super.onWrenched(state, context);
|
||||||
|
if (onWrenched.isAccepted()) {
|
||||||
|
BlockPos pos = context.getPos();
|
||||||
|
World world = context.getWorld();
|
||||||
|
neighborChanged(world.getBlockState(pos), world, pos, state.getBlock(), pos, false);
|
||||||
|
}
|
||||||
|
return onWrenched;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void neighborChanged(BlockState state, World worldIn, BlockPos pos, Block p_220069_4_, BlockPos p_220069_5_,
|
||||||
|
boolean p_220069_6_) {
|
||||||
|
if (worldIn.isRemote)
|
||||||
|
return;
|
||||||
|
boolean previouslyPowered = state.get(POWERED);
|
||||||
|
boolean shouldPower = worldIn.isBlockPowered(pos); // shouldBePowered(state, worldIn, pos);
|
||||||
|
|
||||||
|
if (!previouslyPowered && !shouldPower && shouldBePowered(state, worldIn, pos)) {
|
||||||
|
worldIn.setBlockState(pos, state.with(POWERED, true), 3);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (previouslyPowered == shouldPower)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// Collect affected gantry shafts
|
||||||
|
List<BlockPos> toUpdate = new ArrayList<>();
|
||||||
|
Direction facing = state.get(FACING);
|
||||||
|
Axis axis = facing.getAxis();
|
||||||
|
for (Direction d : Iterate.directionsInAxis(axis)) {
|
||||||
|
BlockPos currentPos = pos.offset(d);
|
||||||
|
while (true) {
|
||||||
|
if (!worldIn.isBlockPresent(currentPos))
|
||||||
|
break;
|
||||||
|
BlockState currentState = worldIn.getBlockState(currentPos);
|
||||||
|
if (!(currentState.getBlock() instanceof GantryShaftBlock))
|
||||||
|
break;
|
||||||
|
if (currentState.get(FACING) != facing)
|
||||||
|
break;
|
||||||
|
if (!shouldPower && currentState.get(POWERED) && worldIn.isBlockPowered(currentPos))
|
||||||
|
return;
|
||||||
|
if (currentState.get(POWERED) == shouldPower)
|
||||||
|
break;
|
||||||
|
toUpdate.add(currentPos);
|
||||||
|
currentPos = currentPos.offset(d);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
toUpdate.add(pos);
|
||||||
|
for (BlockPos blockPos : toUpdate) {
|
||||||
|
BlockState blockState = worldIn.getBlockState(blockPos);
|
||||||
|
|
||||||
|
if (!shouldPower) {
|
||||||
|
TileEntity te = worldIn.getTileEntity(blockPos);
|
||||||
|
if (te instanceof KineticTileEntity)
|
||||||
|
((KineticTileEntity) te).detachKinetics();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (blockState.getBlock() instanceof GantryShaftBlock)
|
||||||
|
worldIn.setBlockState(blockPos, blockState.with(POWERED, shouldPower), 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected boolean shouldBePowered(BlockState state, World worldIn, BlockPos pos) {
|
||||||
|
boolean shouldPower = worldIn.isBlockPowered(pos);
|
||||||
|
|
||||||
|
Direction facing = state.get(FACING);
|
||||||
|
for (Direction d : Iterate.directionsInAxis(facing.getAxis())) {
|
||||||
|
BlockPos neighbourPos = pos.offset(d);
|
||||||
|
if (!worldIn.isBlockPresent(neighbourPos))
|
||||||
|
continue;
|
||||||
|
BlockState neighbourState = worldIn.getBlockState(neighbourPos);
|
||||||
|
if (!(neighbourState.getBlock() instanceof GantryShaftBlock))
|
||||||
|
continue;
|
||||||
|
if (neighbourState.get(FACING) != facing)
|
||||||
|
continue;
|
||||||
|
shouldPower |= neighbourState.get(POWERED);
|
||||||
|
}
|
||||||
|
|
||||||
|
return shouldPower;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasShaftTowards(IWorldReader world, BlockPos pos, BlockState state, Direction face) {
|
||||||
|
return face.getAxis() == state.get(FACING)
|
||||||
|
.getAxis();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Axis getRotationAxis(BlockState state) {
|
||||||
|
return state.get(FACING)
|
||||||
|
.getAxis();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TileEntity createTileEntity(BlockState state, IBlockReader world) {
|
||||||
|
return AllTileEntities.GANTRY_SHAFT.create();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean areStatesKineticallyEquivalent(BlockState oldState, BlockState newState) {
|
||||||
|
return super.areStatesKineticallyEquivalent(oldState, newState)
|
||||||
|
&& oldState.get(POWERED) == newState.get(POWERED);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,103 @@
|
|||||||
|
package com.simibubi.create.content.contraptions.relays.advanced;
|
||||||
|
|
||||||
|
import com.simibubi.create.AllBlocks;
|
||||||
|
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.gantry.GantryPinionBlock;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.gantry.GantryPinionTileEntity;
|
||||||
|
import com.simibubi.create.foundation.utility.Iterate;
|
||||||
|
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.tileentity.TileEntityType;
|
||||||
|
import net.minecraft.util.Direction;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.util.math.MathHelper;
|
||||||
|
|
||||||
|
public class GantryShaftTileEntity extends KineticTileEntity {
|
||||||
|
|
||||||
|
public GantryShaftTileEntity(TileEntityType<?> typeIn) {
|
||||||
|
super(typeIn);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSpeedChanged(float previousSpeed) {
|
||||||
|
super.onSpeedChanged(previousSpeed);
|
||||||
|
|
||||||
|
if (!canAssembleOn())
|
||||||
|
return;
|
||||||
|
for (Direction d : Iterate.directions) {
|
||||||
|
if (d.getAxis() == getBlockState().get(GantryShaftBlock.FACING)
|
||||||
|
.getAxis())
|
||||||
|
continue;
|
||||||
|
BlockPos offset = pos.offset(d);
|
||||||
|
BlockState pinionState = world.getBlockState(offset);
|
||||||
|
if (!AllBlocks.GANTRY_PINION.has(pinionState))
|
||||||
|
continue;
|
||||||
|
if (pinionState.get(GantryPinionBlock.FACING) != d)
|
||||||
|
continue;
|
||||||
|
TileEntity tileEntity = world.getTileEntity(offset);
|
||||||
|
if (tileEntity instanceof GantryPinionTileEntity)
|
||||||
|
((GantryPinionTileEntity) tileEntity).queueAssembly();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float propagateRotationTo(KineticTileEntity target, BlockState stateFrom, BlockState stateTo, BlockPos diff,
|
||||||
|
boolean connectedViaAxes, boolean connectedViaCogs) {
|
||||||
|
float defaultModifier =
|
||||||
|
super.propagateRotationTo(target, stateFrom, stateTo, diff, connectedViaAxes, connectedViaCogs);
|
||||||
|
|
||||||
|
if (connectedViaAxes)
|
||||||
|
return defaultModifier;
|
||||||
|
if (!stateFrom.get(GantryShaftBlock.POWERED))
|
||||||
|
return defaultModifier;
|
||||||
|
if (!AllBlocks.GANTRY_PINION.has(stateTo))
|
||||||
|
return defaultModifier;
|
||||||
|
|
||||||
|
Direction direction = Direction.getFacingFromVector(diff.getX(), diff.getY(), diff.getZ());
|
||||||
|
if (stateTo.get(GantryPinionBlock.FACING) != direction)
|
||||||
|
return defaultModifier;
|
||||||
|
return GantryPinionTileEntity.getGantryPinionModifier(stateFrom.get(GantryShaftBlock.FACING),
|
||||||
|
stateTo.get(GantryPinionBlock.FACING));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isCustomConnection(KineticTileEntity other, BlockState state, BlockState otherState) {
|
||||||
|
if (!AllBlocks.GANTRY_PINION.has(otherState))
|
||||||
|
return false;
|
||||||
|
final BlockPos diff = other.getPos()
|
||||||
|
.subtract(pos);
|
||||||
|
Direction direction = Direction.getFacingFromVector(diff.getX(), diff.getY(), diff.getZ());
|
||||||
|
return otherState.get(GantryPinionBlock.FACING) == direction;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean canAssembleOn() {
|
||||||
|
BlockState blockState = getBlockState();
|
||||||
|
if (!AllBlocks.GANTRY_SHAFT.has(blockState))
|
||||||
|
return false;
|
||||||
|
if (blockState.get(GantryShaftBlock.POWERED))
|
||||||
|
return false;
|
||||||
|
float speed = getPinionMovementSpeed();
|
||||||
|
|
||||||
|
switch (blockState.get(GantryShaftBlock.PART)) {
|
||||||
|
case END:
|
||||||
|
return speed < 0;
|
||||||
|
case MIDDLE:
|
||||||
|
return speed != 0;
|
||||||
|
case START:
|
||||||
|
return speed > 0;
|
||||||
|
case SINGLE:
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getPinionMovementSpeed() {
|
||||||
|
BlockState blockState = getBlockState();
|
||||||
|
if (!AllBlocks.GANTRY_SHAFT.has(blockState))
|
||||||
|
return 0;
|
||||||
|
return MathHelper.clamp(-getSpeed() / 512f, -.49f, .49f);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -68,6 +68,11 @@ public class SequencedGearshiftBlock extends HorizontalAxisKineticBlock implemen
|
|||||||
withTileEntityDo(worldIn, pos, SequencedGearshiftTileEntity::onRedstoneUpdate);
|
withTileEntityDo(worldIn, pos, SequencedGearshiftTileEntity::onRedstoneUpdate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean areStatesKineticallyEquivalent(BlockState oldState, BlockState newState) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasShaftTowards(IWorldReader world, BlockPos pos, BlockState state, Direction face) {
|
public boolean hasShaftTowards(IWorldReader world, BlockPos pos, BlockState state, Direction face) {
|
||||||
if (state.get(VERTICAL))
|
if (state.get(VERTICAL))
|
||||||
|
@ -87,6 +87,12 @@ public class BeltBlock extends HorizontalKineticBlock implements ITE<BeltTileEnt
|
|||||||
p_149666_2_.add(AllItems.BELT_CONNECTOR.asStack());
|
p_149666_2_.add(AllItems.BELT_CONNECTOR.asStack());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean areStatesKineticallyEquivalent(BlockState oldState, BlockState newState) {
|
||||||
|
return super.areStatesKineticallyEquivalent(oldState.with(CASING, false), newState.with(CASING, false))
|
||||||
|
&& oldState.get(PART) == newState.get(PART);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasShaftTowards(IWorldReader world, BlockPos pos, BlockState state, Direction face) {
|
public boolean hasShaftTowards(IWorldReader world, BlockPos pos, BlockState state, Direction face) {
|
||||||
if (face.getAxis() != getRotationAxis(state))
|
if (face.getAxis() != getRotationAxis(state))
|
||||||
|
@ -13,6 +13,7 @@ import java.util.Optional;
|
|||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
|
|
||||||
import com.simibubi.create.AllBlocks;
|
import com.simibubi.create.AllBlocks;
|
||||||
|
import com.simibubi.create.content.contraptions.base.IRotate;
|
||||||
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.relays.belt.transport.BeltInventory;
|
import com.simibubi.create.content.contraptions.relays.belt.transport.BeltInventory;
|
||||||
import com.simibubi.create.content.contraptions.relays.belt.transport.BeltMovementHandler;
|
import com.simibubi.create.content.contraptions.relays.belt.transport.BeltMovementHandler;
|
||||||
@ -203,7 +204,7 @@ public class BeltTileEntity extends KineticTileEntity {
|
|||||||
|
|
||||||
color = compound.contains("Dye") ? Optional.of(NBTHelper.readEnum(compound, "Dye", DyeColor.class))
|
color = compound.contains("Dye") ? Optional.of(NBTHelper.readEnum(compound, "Dye", DyeColor.class))
|
||||||
: Optional.empty();
|
: Optional.empty();
|
||||||
|
|
||||||
if (!wasMoved) {
|
if (!wasMoved) {
|
||||||
if (!isController())
|
if (!isController())
|
||||||
controller = NBTUtil.readBlockPos(compound.getCompound("Controller"));
|
controller = NBTUtil.readBlockPos(compound.getCompound("Controller"));
|
||||||
@ -242,7 +243,7 @@ public class BeltTileEntity extends KineticTileEntity {
|
|||||||
return;
|
return;
|
||||||
} else if (color.isPresent() && color.get() == colorIn)
|
} else if (color.isPresent() && color.get() == colorIn)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (BlockPos blockPos : BeltBlock.getBeltChain(world, getController())) {
|
for (BlockPos blockPos : BeltBlock.getBeltChain(world, getController())) {
|
||||||
BeltTileEntity belt = BeltHelper.getSegmentTE(world, blockPos);
|
BeltTileEntity belt = BeltHelper.getSegmentTE(world, blockPos);
|
||||||
if (belt == null)
|
if (belt == null)
|
||||||
@ -480,4 +481,18 @@ public class BeltTileEntity extends KineticTileEntity {
|
|||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean canPropagateDiagonally(IRotate block, BlockState state) {
|
||||||
|
return state.has(BeltBlock.SLOPE)
|
||||||
|
&& (state.get(BeltBlock.SLOPE) == BeltSlope.UPWARD || state.get(BeltBlock.SLOPE) == BeltSlope.DOWNWARD);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float propagateRotationTo(KineticTileEntity target, BlockState stateFrom, BlockState stateTo, BlockPos diff,
|
||||||
|
boolean connectedViaAxes, boolean connectedViaCogs) {
|
||||||
|
if (target instanceof BeltTileEntity && !connectedViaAxes)
|
||||||
|
return getController().equals(((BeltTileEntity) target).getController()) ? 1 : 0;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2,12 +2,16 @@ package com.simibubi.create.content.contraptions.relays.elementary;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.simibubi.create.AllBlocks;
|
||||||
|
import com.simibubi.create.content.contraptions.base.IRotate;
|
||||||
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||||
import com.simibubi.create.foundation.advancement.AllTriggers;
|
import com.simibubi.create.foundation.advancement.AllTriggers;
|
||||||
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
||||||
|
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.tileentity.TileEntityType;
|
import net.minecraft.tileentity.TileEntityType;
|
||||||
import net.minecraft.util.math.AxisAlignedBB;
|
import net.minecraft.util.math.AxisAlignedBB;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
|
||||||
public class SimpleKineticTileEntity extends KineticTileEntity {
|
public class SimpleKineticTileEntity extends KineticTileEntity {
|
||||||
|
|
||||||
@ -28,4 +32,17 @@ public class SimpleKineticTileEntity extends KineticTileEntity {
|
|||||||
return new AxisAlignedBB(pos).grow(1);
|
return new AxisAlignedBB(pos).grow(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<BlockPos> addPropagationLocations(IRotate block, BlockState state, List<BlockPos> neighbours) {
|
||||||
|
if (!AllBlocks.LARGE_COGWHEEL.has(state))
|
||||||
|
return super.addPropagationLocations(block, state, neighbours);
|
||||||
|
|
||||||
|
BlockPos.getAllInBox(new BlockPos(-1, -1, -1), new BlockPos(1, 1, 1))
|
||||||
|
.forEach(offset -> {
|
||||||
|
if (offset.distanceSq(0, 0, 0, false) == BlockPos.ZERO.distanceSq(1, 1, 0, false))
|
||||||
|
neighbours.add(pos.add(offset));
|
||||||
|
});
|
||||||
|
return neighbours;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,7 @@ public class AdjustablePulleyBlock extends EncasedBeltBlock implements ITE<Adjus
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBlockAdded(BlockState state, World worldIn, BlockPos pos, BlockState oldState, boolean isMoving) {
|
public void onBlockAdded(BlockState state, World worldIn, BlockPos pos, BlockState oldState, boolean isMoving) {
|
||||||
|
super.onBlockAdded(state, worldIn, pos, oldState, isMoving);
|
||||||
if (oldState.getBlock() == state.getBlock())
|
if (oldState.getBlock() == state.getBlock())
|
||||||
return;
|
return;
|
||||||
withTileEntityDo(worldIn, pos, AdjustablePulleyTileEntity::neighborChanged);
|
withTileEntityDo(worldIn, pos, AdjustablePulleyTileEntity::neighborChanged);
|
||||||
@ -48,12 +49,19 @@ public class AdjustablePulleyBlock extends EncasedBeltBlock implements ITE<Adjus
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BlockState getStateForPlacement(BlockItemUseContext context) {
|
public BlockState getStateForPlacement(BlockItemUseContext context) {
|
||||||
return super.getStateForPlacement(context).with(POWERED, context.getWorld().isBlockPowered(context.getPos()));
|
return super.getStateForPlacement(context).with(POWERED, context.getWorld()
|
||||||
|
.isBlockPowered(context.getPos()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean areStatesKineticallyEquivalent(BlockState oldState, BlockState newState) {
|
||||||
|
return super.areStatesKineticallyEquivalent(oldState, newState)
|
||||||
|
&& oldState.get(POWERED) == newState.get(POWERED);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void neighborChanged(BlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos fromPos,
|
public void neighborChanged(BlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos fromPos,
|
||||||
boolean isMoving) {
|
boolean isMoving) {
|
||||||
if (worldIn.isRemote)
|
if (worldIn.isRemote)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -9,7 +9,6 @@ import com.simibubi.create.foundation.utility.Lang;
|
|||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.Blocks;
|
|
||||||
import net.minecraft.block.material.PushReaction;
|
import net.minecraft.block.material.PushReaction;
|
||||||
import net.minecraft.item.BlockItemUseContext;
|
import net.minecraft.item.BlockItemUseContext;
|
||||||
import net.minecraft.item.ItemUseContext;
|
import net.minecraft.item.ItemUseContext;
|
||||||
@ -17,6 +16,7 @@ import net.minecraft.state.BooleanProperty;
|
|||||||
import net.minecraft.state.EnumProperty;
|
import net.minecraft.state.EnumProperty;
|
||||||
import net.minecraft.state.IProperty;
|
import net.minecraft.state.IProperty;
|
||||||
import net.minecraft.state.StateContainer.Builder;
|
import net.minecraft.state.StateContainer.Builder;
|
||||||
|
import net.minecraft.state.properties.BlockStateProperties;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.Direction;
|
import net.minecraft.util.Direction;
|
||||||
import net.minecraft.util.Direction.Axis;
|
import net.minecraft.util.Direction.Axis;
|
||||||
@ -125,12 +125,23 @@ public class EncasedBeltBlock extends RotatedPillarKineticBlock {
|
|||||||
.with(CONNECTED_ALONG_FIRST_COORDINATE, connectionAlongFirst);
|
.with(CONNECTED_ALONG_FIRST_COORDINATE, connectionAlongFirst);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BlockState getRotatedBlockState(BlockState originalState, Direction targetedFace) {
|
||||||
|
if (originalState.get(PART) == Part.NONE)
|
||||||
|
return super.getRotatedBlockState(originalState, targetedFace);
|
||||||
|
return super.getRotatedBlockState(originalState,
|
||||||
|
Direction.getFacingFromAxis(AxisDirection.POSITIVE, getConnectionAxis(originalState)));
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BlockState updateAfterWrenched(BlockState newState, ItemUseContext context) {
|
public BlockState updateAfterWrenched(BlockState newState, ItemUseContext context) {
|
||||||
Blocks.AIR.getDefaultState()
|
// Blocks.AIR.getDefaultState()
|
||||||
.updateNeighbors(context.getWorld(), context.getPos(), 1);
|
// .updateNeighbors(context.getWorld(), context.getPos(), 1);
|
||||||
Axis axis = newState.get(AXIS);
|
Axis axis = newState.get(AXIS);
|
||||||
newState = getDefaultState().with(AXIS, axis);
|
newState = getDefaultState().with(AXIS, axis);
|
||||||
|
if (newState.has(BlockStateProperties.POWERED))
|
||||||
|
newState = newState.with(BlockStateProperties.POWERED, context.getWorld()
|
||||||
|
.isBlockPowered(context.getPos()));
|
||||||
for (Direction facing : Iterate.directions) {
|
for (Direction facing : Iterate.directions) {
|
||||||
if (facing.getAxis() == axis)
|
if (facing.getAxis() == axis)
|
||||||
continue;
|
continue;
|
||||||
@ -139,7 +150,7 @@ public class EncasedBeltBlock extends RotatedPillarKineticBlock {
|
|||||||
newState = updatePostPlacement(newState, facing, context.getWorld()
|
newState = updatePostPlacement(newState, facing, context.getWorld()
|
||||||
.getBlockState(offset), context.getWorld(), pos, offset);
|
.getBlockState(offset), context.getWorld(), pos, offset);
|
||||||
}
|
}
|
||||||
newState.updateNeighbors(context.getWorld(), context.getPos(), 1 | 2);
|
// newState.updateNeighbors(context.getWorld(), context.getPos(), 1 | 2);
|
||||||
return newState;
|
return newState;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -155,15 +166,8 @@ public class EncasedBeltBlock extends RotatedPillarKineticBlock {
|
|||||||
|
|
||||||
public static boolean areBlocksConnected(BlockState state, BlockState other, Direction facing) {
|
public static boolean areBlocksConnected(BlockState state, BlockState other, Direction facing) {
|
||||||
Part part = state.get(PART);
|
Part part = state.get(PART);
|
||||||
Axis axis = state.get(AXIS);
|
Axis connectionAxis = getConnectionAxis(state);
|
||||||
boolean connectionAlongFirst = state.get(CONNECTED_ALONG_FIRST_COORDINATE);
|
Axis otherConnectionAxis = getConnectionAxis(other);
|
||||||
Axis connectionAxis =
|
|
||||||
connectionAlongFirst ? (axis == Axis.X ? Axis.Y : Axis.X) : (axis == Axis.Z ? Axis.Y : Axis.Z);
|
|
||||||
|
|
||||||
Axis otherAxis = other.get(AXIS);
|
|
||||||
boolean otherConnection = other.get(CONNECTED_ALONG_FIRST_COORDINATE);
|
|
||||||
Axis otherConnectionAxis =
|
|
||||||
otherConnection ? (otherAxis == Axis.X ? Axis.Y : Axis.X) : (otherAxis == Axis.Z ? Axis.Y : Axis.Z);
|
|
||||||
|
|
||||||
if (otherConnectionAxis != connectionAxis)
|
if (otherConnectionAxis != connectionAxis)
|
||||||
return false;
|
return false;
|
||||||
@ -177,6 +181,14 @@ public class EncasedBeltBlock extends RotatedPillarKineticBlock {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected static Axis getConnectionAxis(BlockState state) {
|
||||||
|
Axis axis = state.get(AXIS);
|
||||||
|
boolean connectionAlongFirst = state.get(CONNECTED_ALONG_FIRST_COORDINATE);
|
||||||
|
Axis connectionAxis =
|
||||||
|
connectionAlongFirst ? (axis == Axis.X ? Axis.Y : Axis.X) : (axis == Axis.Z ? Axis.Y : Axis.Z);
|
||||||
|
return connectionAxis;
|
||||||
|
}
|
||||||
|
|
||||||
public static float getRotationSpeedModifier(KineticTileEntity from, KineticTileEntity to) {
|
public static float getRotationSpeedModifier(KineticTileEntity from, KineticTileEntity to) {
|
||||||
float fromMod = 1;
|
float fromMod = 1;
|
||||||
float toMod = 1;
|
float toMod = 1;
|
||||||
|
@ -44,7 +44,8 @@ public interface IWrenchable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
default BlockState updateAfterWrenched(BlockState newState, ItemUseContext context) {
|
default BlockState updateAfterWrenched(BlockState newState, ItemUseContext context) {
|
||||||
return newState;
|
// return newState;
|
||||||
|
return Block.getValidBlockForPosition(newState, context.getWorld(), context.getPos());
|
||||||
}
|
}
|
||||||
|
|
||||||
default ActionResultType onSneakWrenched(BlockState state, ItemUseContext context) {
|
default ActionResultType onSneakWrenched(BlockState state, ItemUseContext context) {
|
||||||
|
@ -177,7 +177,7 @@ public class SchematicWorld extends WrappedWorld {
|
|||||||
@Override
|
@Override
|
||||||
public boolean setBlockState(BlockPos pos, BlockState arg1, int arg2) {
|
public boolean setBlockState(BlockPos pos, BlockState arg1, int arg2) {
|
||||||
pos = pos.subtract(anchor);
|
pos = pos.subtract(anchor);
|
||||||
bounds.expandTo(new MutableBoundingBox(pos, pos.add(1, 1, 1)));
|
bounds.expandTo(new MutableBoundingBox(pos, pos));
|
||||||
blocks.put(pos, arg1);
|
blocks.put(pos, arg1);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,7 @@ import com.simibubi.create.AllItems;
|
|||||||
import com.simibubi.create.AllKeys;
|
import com.simibubi.create.AllKeys;
|
||||||
import com.simibubi.create.content.schematics.SchematicWorld;
|
import com.simibubi.create.content.schematics.SchematicWorld;
|
||||||
import com.simibubi.create.content.schematics.client.tools.Tools;
|
import com.simibubi.create.content.schematics.client.tools.Tools;
|
||||||
|
import com.simibubi.create.content.schematics.filtering.SchematicInstances;
|
||||||
import com.simibubi.create.content.schematics.item.SchematicItem;
|
import com.simibubi.create.content.schematics.item.SchematicItem;
|
||||||
import com.simibubi.create.content.schematics.packet.SchematicPlacePacket;
|
import com.simibubi.create.content.schematics.packet.SchematicPlacePacket;
|
||||||
import com.simibubi.create.content.schematics.packet.SchematicSyncPacket;
|
import com.simibubi.create.content.schematics.packet.SchematicSyncPacket;
|
||||||
@ -318,6 +319,7 @@ public class SchematicHandler {
|
|||||||
CompoundNBT nbt = activeSchematicItem.getTag();
|
CompoundNBT nbt = activeSchematicItem.getTag();
|
||||||
nbt.putBoolean("Deployed", false);
|
nbt.putBoolean("Deployed", false);
|
||||||
activeSchematicItem.setTag(nbt);
|
activeSchematicItem.setTag(nbt);
|
||||||
|
SchematicInstances.clearHash(activeSchematicItem);
|
||||||
renderers.forEach(r -> r.setActive(false));
|
renderers.forEach(r -> r.setActive(false));
|
||||||
active = false;
|
active = false;
|
||||||
markDirty();
|
markDirty();
|
||||||
|
@ -0,0 +1,90 @@
|
|||||||
|
package com.simibubi.create.content.schematics.filtering;
|
||||||
|
|
||||||
|
import java.util.concurrent.ExecutionException;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
|
import com.google.common.cache.Cache;
|
||||||
|
import com.google.common.cache.CacheBuilder;
|
||||||
|
import com.simibubi.create.content.schematics.SchematicWorld;
|
||||||
|
import com.simibubi.create.content.schematics.item.SchematicItem;
|
||||||
|
import com.simibubi.create.foundation.utility.Debug;
|
||||||
|
import com.simibubi.create.foundation.utility.WorldAttached;
|
||||||
|
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.nbt.CompoundNBT;
|
||||||
|
import net.minecraft.nbt.NBTUtil;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraft.world.gen.feature.template.PlacementSettings;
|
||||||
|
import net.minecraft.world.gen.feature.template.Template;
|
||||||
|
|
||||||
|
public class SchematicInstances {
|
||||||
|
|
||||||
|
public static WorldAttached<Cache<Integer, SchematicWorld>> loadedSchematics;
|
||||||
|
|
||||||
|
static {
|
||||||
|
loadedSchematics = new WorldAttached<>(() -> CacheBuilder.newBuilder()
|
||||||
|
.expireAfterAccess(5, TimeUnit.MINUTES)
|
||||||
|
.build());
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void register() {}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
public static SchematicWorld get(World world, ItemStack schematic) {
|
||||||
|
Cache<Integer, SchematicWorld> map = loadedSchematics.get(world);
|
||||||
|
int hash = getHash(schematic);
|
||||||
|
try {
|
||||||
|
return map.get(hash, () -> loadWorld(world, schematic));
|
||||||
|
} catch (ExecutionException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static SchematicWorld loadWorld(World wrapped, ItemStack schematic) {
|
||||||
|
if (schematic == null || !schematic.hasTag())
|
||||||
|
return null;
|
||||||
|
if (!schematic.getTag()
|
||||||
|
.getBoolean("Deployed"))
|
||||||
|
return null;
|
||||||
|
|
||||||
|
Template activeTemplate = SchematicItem.loadSchematic(schematic);
|
||||||
|
|
||||||
|
if (activeTemplate.getSize()
|
||||||
|
.equals(BlockPos.ZERO))
|
||||||
|
return null;
|
||||||
|
|
||||||
|
BlockPos anchor = NBTUtil.readBlockPos(schematic.getTag()
|
||||||
|
.getCompound("Anchor"));
|
||||||
|
SchematicWorld world = new SchematicWorld(anchor, wrapped);
|
||||||
|
PlacementSettings settings = SchematicItem.getSettings(schematic);
|
||||||
|
activeTemplate.addBlocksToWorld(world, anchor, settings);
|
||||||
|
|
||||||
|
Debug.debugChat("Loading Schematic Instance of " + schematic.getTag()
|
||||||
|
.getString("File") + ". Total active instances: " + (loadedSchematics.get(wrapped).size() + 1));
|
||||||
|
|
||||||
|
|
||||||
|
return world;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void clearHash(ItemStack schematic) {
|
||||||
|
if (schematic == null || !schematic.hasTag())
|
||||||
|
return;
|
||||||
|
schematic.getTag()
|
||||||
|
.remove("SchematicHash");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int getHash(ItemStack schematic) {
|
||||||
|
if (schematic == null || !schematic.hasTag())
|
||||||
|
return -1;
|
||||||
|
CompoundNBT tag = schematic.getTag();
|
||||||
|
if (!tag.contains("SchematicHash"))
|
||||||
|
tag.putInt("SchematicHash", tag.toString()
|
||||||
|
.hashCode());
|
||||||
|
return tag.getInt("SchematicHash");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -13,6 +13,7 @@ import org.apache.commons.io.IOUtils;
|
|||||||
|
|
||||||
import com.simibubi.create.AllItems;
|
import com.simibubi.create.AllItems;
|
||||||
import com.simibubi.create.content.schematics.client.SchematicEditScreen;
|
import com.simibubi.create.content.schematics.client.SchematicEditScreen;
|
||||||
|
import com.simibubi.create.content.schematics.filtering.SchematicInstances;
|
||||||
import com.simibubi.create.foundation.gui.ScreenOpener;
|
import com.simibubi.create.foundation.gui.ScreenOpener;
|
||||||
import com.simibubi.create.foundation.utility.Lang;
|
import com.simibubi.create.foundation.utility.Lang;
|
||||||
|
|
||||||
@ -87,6 +88,7 @@ public class SchematicItem extends Item {
|
|||||||
Template t = loadSchematic(blueprint);
|
Template t = loadSchematic(blueprint);
|
||||||
tag.put("Bounds", NBTUtil.writeBlockPos(t.getSize()));
|
tag.put("Bounds", NBTUtil.writeBlockPos(t.getSize()));
|
||||||
blueprint.setTag(tag);
|
blueprint.setTag(tag);
|
||||||
|
SchematicInstances.clearHash(blueprint);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static PlacementSettings getSettings(ItemStack blueprint) {
|
public static PlacementSettings getSettings(ItemStack blueprint) {
|
||||||
|
@ -3,6 +3,7 @@ package com.simibubi.create.content.schematics.packet;
|
|||||||
import java.util.function.Supplier;
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
import com.simibubi.create.AllItems;
|
import com.simibubi.create.AllItems;
|
||||||
|
import com.simibubi.create.content.schematics.filtering.SchematicInstances;
|
||||||
import com.simibubi.create.foundation.networking.SimplePacketBase;
|
import com.simibubi.create.foundation.networking.SimplePacketBase;
|
||||||
|
|
||||||
import net.minecraft.entity.player.ServerPlayerEntity;
|
import net.minecraft.entity.player.ServerPlayerEntity;
|
||||||
@ -70,6 +71,7 @@ public class SchematicSyncPacket extends SimplePacketBase {
|
|||||||
tag.put("Anchor", NBTUtil.writeBlockPos(anchor));
|
tag.put("Anchor", NBTUtil.writeBlockPos(anchor));
|
||||||
tag.putString("Rotation", rotation.name());
|
tag.putString("Rotation", rotation.name());
|
||||||
tag.putString("Mirror", mirror.name());
|
tag.putString("Mirror", mirror.name());
|
||||||
|
SchematicInstances.clearHash(stack);
|
||||||
});
|
});
|
||||||
context.get().setPacketHandled(true);
|
context.get().setPacketHandled(true);
|
||||||
}
|
}
|
||||||
|
@ -317,6 +317,23 @@ public class StandardRecipeGen extends CreateRecipeProvider {
|
|||||||
.patternLine("P")
|
.patternLine("P")
|
||||||
.patternLine("A")
|
.patternLine("A")
|
||||||
.patternLine("P")),
|
.patternLine("P")),
|
||||||
|
|
||||||
|
GANTRY_PINION = create(AllBlocks.GANTRY_PINION).unlockedBy(I::andesiteCasing)
|
||||||
|
.viaShaped(b -> b.key('B', ItemTags.PLANKS)
|
||||||
|
.key('S', I.cog())
|
||||||
|
.key('C', I.andesiteCasing())
|
||||||
|
.key('I', I.shaft())
|
||||||
|
.patternLine(" B ")
|
||||||
|
.patternLine("ICI")
|
||||||
|
.patternLine(" S ")),
|
||||||
|
|
||||||
|
GANTRY_SHAFT = create(AllBlocks.GANTRY_SHAFT).returns(8)
|
||||||
|
.unlockedBy(I::andesite)
|
||||||
|
.viaShaped(b -> b.key('A', I.andesite())
|
||||||
|
.key('R', I.redstone())
|
||||||
|
.patternLine("A")
|
||||||
|
.patternLine("R")
|
||||||
|
.patternLine("A")),
|
||||||
|
|
||||||
ANALOG_LEVER = create(AllBlocks.ANALOG_LEVER).unlockedBy(I::andesite)
|
ANALOG_LEVER = create(AllBlocks.ANALOG_LEVER).unlockedBy(I::andesite)
|
||||||
.viaShaped(b -> b.key('S', I.andesiteCasing())
|
.viaShaped(b -> b.key('S', I.andesiteCasing())
|
||||||
|
@ -7,6 +7,7 @@ import java.util.function.Supplier;
|
|||||||
import com.simibubi.create.Create;
|
import com.simibubi.create.Create;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionDisassemblyPacket;
|
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionDisassemblyPacket;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionStallPacket;
|
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionStallPacket;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.gantry.GantryContraptionUpdatePacket;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.glue.GlueEffectPacket;
|
import com.simibubi.create.content.contraptions.components.structureMovement.glue.GlueEffectPacket;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.sync.ClientMotionPacket;
|
import com.simibubi.create.content.contraptions.components.structureMovement.sync.ClientMotionPacket;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.sync.ContraptionFluidPacket;
|
import com.simibubi.create.content.contraptions.components.structureMovement.sync.ContraptionFluidPacket;
|
||||||
@ -79,6 +80,7 @@ public enum AllPackets {
|
|||||||
MINECART_CONTROLLER(MinecartControllerUpdatePacket.class, MinecartControllerUpdatePacket::new),
|
MINECART_CONTROLLER(MinecartControllerUpdatePacket.class, MinecartControllerUpdatePacket::new),
|
||||||
FLUID_SPLASH(FluidSplashPacket.class, FluidSplashPacket::new),
|
FLUID_SPLASH(FluidSplashPacket.class, FluidSplashPacket::new),
|
||||||
CONTRAPTION_FLUID(ContraptionFluidPacket.class, ContraptionFluidPacket::new),
|
CONTRAPTION_FLUID(ContraptionFluidPacket.class, ContraptionFluidPacket::new),
|
||||||
|
GANTRY_UPDATE(GantryContraptionUpdatePacket.class, GantryContraptionUpdatePacket::new),
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -0,0 +1,153 @@
|
|||||||
|
{
|
||||||
|
"credit": "Made with Blockbench",
|
||||||
|
"parent": "block/block",
|
||||||
|
"textures": {
|
||||||
|
"0": "create:block/axis",
|
||||||
|
"8": "create:block/bearing_top_wooden",
|
||||||
|
"9": "create:block/windmill_bearing_side",
|
||||||
|
"10": "create:block/pinion",
|
||||||
|
"particle": "create:block/andesite_casing",
|
||||||
|
"opening": "create:block/gearbox"
|
||||||
|
},
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"name": "Bottom",
|
||||||
|
"from": [0, 0, 0],
|
||||||
|
"to": [16, 16, 4],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 16, 16], "rotation": 180, "texture": "#8"},
|
||||||
|
"east": {"uv": [0, 0, 16, 4], "rotation": 270, "texture": "#9"},
|
||||||
|
"south": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#8"},
|
||||||
|
"west": {"uv": [0, 0, 16, 4], "rotation": 90, "texture": "#9"},
|
||||||
|
"up": {"uv": [0, 8, 16, 12], "rotation": 180, "texture": "#10"},
|
||||||
|
"down": {"uv": [0, 8, 16, 12], "texture": "#10"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Bottom",
|
||||||
|
"from": [6, 0, -4],
|
||||||
|
"to": [10, 16, 0],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 6]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [6, 0, 10, 16], "rotation": 180, "texture": "#0"},
|
||||||
|
"east": {"uv": [6, 0, 10, 16], "texture": "#0"},
|
||||||
|
"west": {"uv": [6, 0, 10, 16], "rotation": 180, "texture": "#0"},
|
||||||
|
"up": {"uv": [6, 12, 10, 16], "rotation": 180, "texture": "#10"},
|
||||||
|
"down": {"uv": [6, 12, 10, 16], "texture": "#10"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Bottom",
|
||||||
|
"from": [0, 6, -4],
|
||||||
|
"to": [16, 10, 0],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 6]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [6, 0, 10, 16], "rotation": 270, "texture": "#0"},
|
||||||
|
"east": {"uv": [10, 12, 14, 16], "rotation": 270, "texture": "#10"},
|
||||||
|
"west": {"uv": [6, 12, 10, 16], "rotation": 90, "texture": "#10"},
|
||||||
|
"up": {"uv": [6, 0, 10, 16], "rotation": 270, "texture": "#0"},
|
||||||
|
"down": {"uv": [6, 0, 10, 16], "rotation": 90, "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Core",
|
||||||
|
"from": [1, 1, 2],
|
||||||
|
"to": [15, 15, 12],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 0, 0], "rotation": 90, "texture": "#opening"},
|
||||||
|
"east": {"uv": [1, 4, 15, 14], "rotation": 270, "texture": "#opening"},
|
||||||
|
"south": {"uv": [0, 0, 0, 0], "rotation": 90, "texture": "#opening"},
|
||||||
|
"west": {"uv": [1, 4, 15, 14], "rotation": 90, "texture": "#opening"},
|
||||||
|
"up": {"uv": [0, 0, 0, 0], "rotation": 180, "texture": "#opening"},
|
||||||
|
"down": {"uv": [0, 0, 0, 0], "texture": "#opening"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Top",
|
||||||
|
"from": [0, 0, 12],
|
||||||
|
"to": [16, 16, 16],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#8"},
|
||||||
|
"east": {"uv": [0, 0, 16, 4], "rotation": 270, "texture": "#9"},
|
||||||
|
"south": {"uv": [0, 0, 16, 16], "rotation": 180, "texture": "#8"},
|
||||||
|
"west": {"uv": [0, 0, 16, 4], "rotation": 90, "texture": "#9"},
|
||||||
|
"up": {"uv": [0, 0, 16, 4], "rotation": 180, "texture": "#9"},
|
||||||
|
"down": {"uv": [0, 0, 16, 4], "texture": "#9"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "SideWest",
|
||||||
|
"from": [0, 14, 4],
|
||||||
|
"to": [16, 16, 12],
|
||||||
|
"faces": {
|
||||||
|
"east": {"uv": [14, 0, 16, 8], "rotation": 270, "texture": "#10"},
|
||||||
|
"west": {"uv": [0, 0, 2, 8], "rotation": 90, "texture": "#10"},
|
||||||
|
"up": {"uv": [0, 0, 16, 8], "rotation": 180, "texture": "#10"},
|
||||||
|
"down": {"uv": [0, 0, 16, 8], "texture": "#10"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "SideEast",
|
||||||
|
"from": [0, 0, 4],
|
||||||
|
"to": [16, 2, 12],
|
||||||
|
"faces": {
|
||||||
|
"east": {"uv": [0, 0, 2, 8], "rotation": 270, "texture": "#10"},
|
||||||
|
"west": {"uv": [14, 0, 16, 8], "rotation": 90, "texture": "#10"},
|
||||||
|
"up": {"uv": [0, 0, 16, 8], "rotation": 180, "texture": "#10"},
|
||||||
|
"down": {"uv": [0, 0, 16, 8], "texture": "#10"}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"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],
|
||||||
|
"translation": [0, 1.5, 0],
|
||||||
|
"scale": [0.5, 0.5, 0.5]
|
||||||
|
},
|
||||||
|
"fixed": {
|
||||||
|
"rotation": [0, 90, 0],
|
||||||
|
"translation": [0, 2.25, 0],
|
||||||
|
"scale": [0.45, 0.45, 0.45]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"groups": [
|
||||||
|
{
|
||||||
|
"name": "item_andesite",
|
||||||
|
"origin": [8, 8, 8],
|
||||||
|
"children": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "item",
|
||||||
|
"origin": [8, 8, 8],
|
||||||
|
"children": [0, 1, 2, 3, 4, 5, 6,
|
||||||
|
{
|
||||||
|
"name": "shaft",
|
||||||
|
"origin": [8, 8, 8],
|
||||||
|
"children": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,346 @@
|
|||||||
|
{
|
||||||
|
"credit": "Made with Blockbench",
|
||||||
|
"parent": "block/block",
|
||||||
|
"textures": {
|
||||||
|
"0": "create:block/axis",
|
||||||
|
"3": "create:block/cogwheel",
|
||||||
|
"8": "create:block/bearing_top_wooden",
|
||||||
|
"9": "create:block/windmill_bearing_side",
|
||||||
|
"10": "create:block/pinion",
|
||||||
|
"11": "create:block/axis_top",
|
||||||
|
"particle": "create:block/andesite_casing",
|
||||||
|
"opening": "create:block/gearbox"
|
||||||
|
},
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"name": "Gear",
|
||||||
|
"from": [10.5, -10, 6.5],
|
||||||
|
"to": [13.5, 8, 9.5],
|
||||||
|
"rotation": {"angle": -22.5, "axis": "x", "origin": [12, -1, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [7, 7.5, 16, 9], "rotation": 90, "texture": "#3"},
|
||||||
|
"east": {"uv": [7, 6, 16, 7.5], "rotation": 270, "texture": "#3"},
|
||||||
|
"south": {"uv": [7, 7.5, 16, 9], "rotation": 270, "texture": "#3"},
|
||||||
|
"west": {"uv": [7, 6, 16, 7.5], "rotation": 270, "texture": "#3"},
|
||||||
|
"up": {"uv": [5.5, 7.5, 7, 9], "rotation": 270, "texture": "#3"},
|
||||||
|
"down": {"uv": [5.5, 7.5, 7, 9], "rotation": 270, "texture": "#3"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Gear2",
|
||||||
|
"from": [10.5, -2.5, -1],
|
||||||
|
"to": [13.5, 0.5, 17],
|
||||||
|
"rotation": {"angle": 22.5, "axis": "x", "origin": [12, -1, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [5.5, 7.5, 7, 9], "rotation": 90, "texture": "#3"},
|
||||||
|
"east": {"uv": [7, 6, 16, 7.5], "texture": "#3"},
|
||||||
|
"south": {"uv": [5.5, 7.5, 7, 9], "rotation": 270, "texture": "#3"},
|
||||||
|
"west": {"uv": [7, 6, 16, 7.5], "rotation": 180, "texture": "#3"},
|
||||||
|
"up": {"uv": [7, 7.5, 16, 9], "rotation": 270, "texture": "#3"},
|
||||||
|
"down": {"uv": [7, 7.5, 16, 9], "rotation": 270, "texture": "#3"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Gear3",
|
||||||
|
"from": [10.5, -10, 6.5],
|
||||||
|
"to": [13.5, 8, 9.5],
|
||||||
|
"rotation": {"angle": 22.5, "axis": "x", "origin": [12, -1, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [7, 7.5, 16, 9], "rotation": 90, "texture": "#3"},
|
||||||
|
"east": {"uv": [7, 6, 16, 7.5], "rotation": 270, "texture": "#3"},
|
||||||
|
"south": {"uv": [7, 7.5, 16, 9], "rotation": 270, "texture": "#3"},
|
||||||
|
"west": {"uv": [7, 6, 16, 7.5], "rotation": 270, "texture": "#3"},
|
||||||
|
"up": {"uv": [5.5, 7.5, 7, 9], "rotation": 270, "texture": "#3"},
|
||||||
|
"down": {"uv": [5.5, 7.5, 7, 9], "rotation": 270, "texture": "#3"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Gear4",
|
||||||
|
"from": [10.5, -2.5, -1],
|
||||||
|
"to": [13.5, 0.5, 17],
|
||||||
|
"rotation": {"angle": -22.5, "axis": "x", "origin": [12, -1, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [5.5, 7.5, 7, 9], "rotation": 90, "texture": "#3"},
|
||||||
|
"east": {"uv": [7, 6, 16, 7.5], "texture": "#3"},
|
||||||
|
"south": {"uv": [5.5, 7.5, 7, 9], "rotation": 270, "texture": "#3"},
|
||||||
|
"west": {"uv": [7, 6, 16, 7.5], "texture": "#3"},
|
||||||
|
"up": {"uv": [7, 7.5, 16, 9], "rotation": 270, "texture": "#3"},
|
||||||
|
"down": {"uv": [7, 7.5, 16, 9], "rotation": 270, "texture": "#3"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "GearCaseInner",
|
||||||
|
"from": [11, -7, 2],
|
||||||
|
"to": [13, 5, 14],
|
||||||
|
"rotation": {"angle": -22.5, "axis": "x", "origin": [12, -1, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 6, 6, 7], "rotation": 90, "texture": "#3"},
|
||||||
|
"east": {"uv": [4, 0, 10, 6], "rotation": 270, "texture": "#3"},
|
||||||
|
"south": {"uv": [0, 6, 6, 7], "rotation": 270, "texture": "#3"},
|
||||||
|
"west": {"uv": [4, 0, 10, 6], "rotation": 270, "texture": "#3"},
|
||||||
|
"up": {"uv": [0, 6, 6, 7], "rotation": 270, "texture": "#3"},
|
||||||
|
"down": {"uv": [0, 6, 6, 7], "rotation": 270, "texture": "#3"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "GearCaseOuter",
|
||||||
|
"from": [10, -5, 4],
|
||||||
|
"to": [14, 3, 12],
|
||||||
|
"rotation": {"angle": -22.5, "axis": "x", "origin": [12, -1, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 4, 4, 6], "rotation": 90, "texture": "#3"},
|
||||||
|
"east": {"uv": [0, 0, 4, 4], "rotation": 270, "texture": "#3"},
|
||||||
|
"south": {"uv": [0, 4, 4, 6], "rotation": 270, "texture": "#3"},
|
||||||
|
"west": {"uv": [0, 0, 4, 4], "rotation": 270, "texture": "#3"},
|
||||||
|
"up": {"uv": [0, 4, 4, 6], "rotation": 270, "texture": "#3"},
|
||||||
|
"down": {"uv": [0, 4, 4, 6], "rotation": 270, "texture": "#3"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Gear",
|
||||||
|
"from": [2.5, -10, 6.5],
|
||||||
|
"to": [5.5, 8, 9.5],
|
||||||
|
"rotation": {"angle": -22.5, "axis": "x", "origin": [4, -1, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [7, 7.5, 16, 9], "rotation": 90, "texture": "#3"},
|
||||||
|
"east": {"uv": [7, 6, 16, 7.5], "rotation": 270, "texture": "#3"},
|
||||||
|
"south": {"uv": [7, 7.5, 16, 9], "rotation": 270, "texture": "#3"},
|
||||||
|
"west": {"uv": [7, 6, 16, 7.5], "rotation": 270, "texture": "#3"},
|
||||||
|
"up": {"uv": [5.5, 7.5, 7, 9], "rotation": 270, "texture": "#3"},
|
||||||
|
"down": {"uv": [5.5, 7.5, 7, 9], "rotation": 270, "texture": "#3"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Gear3",
|
||||||
|
"from": [2.5, -2.5, -1],
|
||||||
|
"to": [5.5, 0.5, 17],
|
||||||
|
"rotation": {"angle": 22.5, "axis": "x", "origin": [4, -1, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [5.5, 7.5, 7, 9], "rotation": 90, "texture": "#3"},
|
||||||
|
"east": {"uv": [7, 6, 16, 7.5], "texture": "#3"},
|
||||||
|
"south": {"uv": [5.5, 7.5, 7, 9], "rotation": 270, "texture": "#3"},
|
||||||
|
"west": {"uv": [7, 6, 16, 7.5], "rotation": 180, "texture": "#3"},
|
||||||
|
"up": {"uv": [7, 7.5, 16, 9], "rotation": 270, "texture": "#3"},
|
||||||
|
"down": {"uv": [7, 7.5, 16, 9], "rotation": 270, "texture": "#3"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Gear4",
|
||||||
|
"from": [2.5, -10, 6.5],
|
||||||
|
"to": [5.5, 8, 9.5],
|
||||||
|
"rotation": {"angle": 22.5, "axis": "x", "origin": [4, -1, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [7, 7.5, 16, 9], "rotation": 90, "texture": "#3"},
|
||||||
|
"east": {"uv": [7, 6, 16, 7.5], "rotation": 270, "texture": "#3"},
|
||||||
|
"south": {"uv": [7, 7.5, 16, 9], "rotation": 270, "texture": "#3"},
|
||||||
|
"west": {"uv": [7, 6, 16, 7.5], "rotation": 270, "texture": "#3"},
|
||||||
|
"up": {"uv": [5.5, 7.5, 7, 9], "rotation": 270, "texture": "#3"},
|
||||||
|
"down": {"uv": [5.5, 7.5, 7, 9], "rotation": 270, "texture": "#3"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Gear5",
|
||||||
|
"from": [2.5, -2.5, -1],
|
||||||
|
"to": [5.5, 0.5, 17],
|
||||||
|
"rotation": {"angle": -22.5, "axis": "x", "origin": [4, -1, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [5.5, 7.5, 7, 9], "rotation": 90, "texture": "#3"},
|
||||||
|
"east": {"uv": [7, 6, 16, 7.5], "texture": "#3"},
|
||||||
|
"south": {"uv": [5.5, 7.5, 7, 9], "rotation": 270, "texture": "#3"},
|
||||||
|
"west": {"uv": [7, 6, 16, 7.5], "texture": "#3"},
|
||||||
|
"up": {"uv": [7, 7.5, 16, 9], "rotation": 270, "texture": "#3"},
|
||||||
|
"down": {"uv": [7, 7.5, 16, 9], "rotation": 270, "texture": "#3"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "GearCaseInner",
|
||||||
|
"from": [3, -7, 2],
|
||||||
|
"to": [5, 5, 14],
|
||||||
|
"rotation": {"angle": -22.5, "axis": "x", "origin": [4, -1, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 6, 6, 7], "rotation": 90, "texture": "#3"},
|
||||||
|
"east": {"uv": [4, 0, 10, 6], "rotation": 270, "texture": "#3"},
|
||||||
|
"south": {"uv": [0, 6, 6, 7], "rotation": 270, "texture": "#3"},
|
||||||
|
"west": {"uv": [4, 0, 10, 6], "rotation": 270, "texture": "#3"},
|
||||||
|
"up": {"uv": [0, 6, 6, 7], "rotation": 270, "texture": "#3"},
|
||||||
|
"down": {"uv": [0, 6, 6, 7], "rotation": 270, "texture": "#3"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "GearCaseOuter",
|
||||||
|
"from": [2, -5, 4],
|
||||||
|
"to": [6, 3, 12],
|
||||||
|
"rotation": {"angle": -22.5, "axis": "x", "origin": [4, -1, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 4, 4, 6], "rotation": 90, "texture": "#3"},
|
||||||
|
"east": {"uv": [0, 0, 4, 4], "rotation": 270, "texture": "#3"},
|
||||||
|
"south": {"uv": [0, 4, 4, 6], "rotation": 270, "texture": "#3"},
|
||||||
|
"west": {"uv": [0, 0, 4, 4], "rotation": 270, "texture": "#3"},
|
||||||
|
"up": {"uv": [0, 4, 4, 6], "rotation": 270, "texture": "#3"},
|
||||||
|
"down": {"uv": [0, 4, 4, 6], "rotation": 270, "texture": "#3"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Bottom",
|
||||||
|
"from": [0, 0, 0],
|
||||||
|
"to": [16, 4, 16],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 8, 16, 12], "texture": "#10"},
|
||||||
|
"east": {"uv": [0, 0, 16, 4], "texture": "#9"},
|
||||||
|
"south": {"uv": [0, 8, 16, 12], "texture": "#10"},
|
||||||
|
"west": {"uv": [0, 0, 16, 4], "texture": "#9"},
|
||||||
|
"up": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#8"},
|
||||||
|
"down": {"uv": [0, 0, 16, 16], "texture": "#8"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Bottom",
|
||||||
|
"from": [6, -4, 0],
|
||||||
|
"to": [10, 0, 16],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [8, 6, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [6, 12, 10, 16], "texture": "#10"},
|
||||||
|
"east": {"uv": [6, 0, 10, 16], "rotation": 90, "texture": "#0"},
|
||||||
|
"south": {"uv": [6, 12, 10, 16], "texture": "#10"},
|
||||||
|
"west": {"uv": [6, 0, 10, 16], "rotation": 90, "texture": "#0"},
|
||||||
|
"down": {"uv": [6, 0, 10, 16], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Bottom",
|
||||||
|
"from": [0, -4, 6],
|
||||||
|
"to": [16, 0, 10],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [8, 6, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [6, 0, 10, 16], "rotation": 90, "texture": "#0"},
|
||||||
|
"east": {"uv": [10, 12, 14, 16], "texture": "#10"},
|
||||||
|
"south": {"uv": [6, 0, 10, 16], "rotation": 90, "texture": "#0"},
|
||||||
|
"west": {"uv": [6, 12, 10, 16], "texture": "#10"},
|
||||||
|
"down": {"uv": [6, 0, 10, 16], "rotation": 90, "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Core",
|
||||||
|
"from": [1, 2, 1],
|
||||||
|
"to": [15, 12, 15],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 0, 0], "texture": "#opening"},
|
||||||
|
"east": {"uv": [1, 4, 15, 14], "texture": "#opening"},
|
||||||
|
"south": {"uv": [0, 0, 0, 0], "texture": "#opening"},
|
||||||
|
"west": {"uv": [1, 4, 15, 14], "texture": "#opening"},
|
||||||
|
"up": {"uv": [0, 0, 0, 0], "rotation": 90, "texture": "#opening"},
|
||||||
|
"down": {"uv": [0, 0, 0, 0], "rotation": 270, "texture": "#opening"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Top",
|
||||||
|
"from": [0, 12, 0],
|
||||||
|
"to": [16, 16, 16],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 16, 4], "texture": "#9"},
|
||||||
|
"east": {"uv": [0, 0, 16, 4], "texture": "#9"},
|
||||||
|
"south": {"uv": [0, 0, 16, 4], "texture": "#9"},
|
||||||
|
"west": {"uv": [0, 0, 16, 4], "texture": "#9"},
|
||||||
|
"up": {"uv": [0, 0, 16, 16], "rotation": 180, "texture": "#8"},
|
||||||
|
"down": {"uv": [0, 0, 16, 16], "rotation": 270, "texture": "#8"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "SideWest",
|
||||||
|
"from": [0, 4, 0],
|
||||||
|
"to": [16, 12, 2],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 16, 8], "texture": "#10"},
|
||||||
|
"east": {"uv": [14, 0, 16, 8], "texture": "#10"},
|
||||||
|
"south": {"uv": [0, 0, 16, 8], "texture": "#10"},
|
||||||
|
"west": {"uv": [0, 0, 2, 8], "texture": "#10"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "SideEast",
|
||||||
|
"from": [0, 4, 14],
|
||||||
|
"to": [16, 12, 16],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 16, 8], "texture": "#10"},
|
||||||
|
"east": {"uv": [0, 0, 2, 8], "texture": "#10"},
|
||||||
|
"south": {"uv": [0, 0, 16, 8], "texture": "#10"},
|
||||||
|
"west": {"uv": [14, 0, 16, 8], "texture": "#10"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Axis",
|
||||||
|
"from": [0, 6, 6],
|
||||||
|
"to": [16, 10, 10],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [6, 0, 10, 16], "rotation": 270, "texture": "#0"},
|
||||||
|
"east": {"uv": [6, 6, 10, 10], "rotation": 180, "texture": "#11"},
|
||||||
|
"south": {"uv": [6, 0, 10, 16], "rotation": 90, "texture": "#0"},
|
||||||
|
"west": {"uv": [6, 6, 10, 10], "texture": "#11"},
|
||||||
|
"up": {"uv": [6, 0, 10, 16], "rotation": 90, "texture": "#0"},
|
||||||
|
"down": {"uv": [6, 0, 10, 16], "rotation": 90, "texture": "#0"}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"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, 135, 0],
|
||||||
|
"translation": [0, 1.5, 0],
|
||||||
|
"scale": [0.5, 0.5, 0.5]
|
||||||
|
},
|
||||||
|
"fixed": {
|
||||||
|
"rotation": [0, 90, 0],
|
||||||
|
"translation": [0, 2.25, 0],
|
||||||
|
"scale": [0.45, 0.45, 0.45]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"groups": [
|
||||||
|
{
|
||||||
|
"name": "cogwheel_shaftless",
|
||||||
|
"origin": [8, 8, 8],
|
||||||
|
"children": [0, 1, 2, 3, 4, 5]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "cogwheel_shaftless",
|
||||||
|
"origin": [8, 8, 8],
|
||||||
|
"children": [6, 7, 8, 9, 10, 11]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "item_andesite",
|
||||||
|
"origin": [8, 8, 8],
|
||||||
|
"children": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "item",
|
||||||
|
"origin": [8, 8, 8],
|
||||||
|
"children": [12, 13, 14, 15, 16, 17, 18,
|
||||||
|
{
|
||||||
|
"name": "shaft",
|
||||||
|
"origin": [8, 8, 8],
|
||||||
|
"children": [19]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,153 @@
|
|||||||
|
{
|
||||||
|
"credit": "Made with Blockbench",
|
||||||
|
"parent": "block/block",
|
||||||
|
"textures": {
|
||||||
|
"0": "create:block/axis",
|
||||||
|
"8": "create:block/bearing_top_wooden",
|
||||||
|
"9": "create:block/windmill_bearing_side",
|
||||||
|
"10": "create:block/pinion",
|
||||||
|
"particle": "create:block/andesite_casing",
|
||||||
|
"opening": "create:block/gearbox"
|
||||||
|
},
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"name": "Bottom",
|
||||||
|
"from": [0, 0, 0],
|
||||||
|
"to": [16, 16, 4],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 16, 16], "rotation": 270, "texture": "#8"},
|
||||||
|
"east": {"uv": [0, 8, 16, 12], "rotation": 270, "texture": "#10"},
|
||||||
|
"south": {"uv": [0, 0, 16, 16], "texture": "#8"},
|
||||||
|
"west": {"uv": [0, 8, 16, 12], "rotation": 90, "texture": "#10"},
|
||||||
|
"up": {"uv": [0, 0, 16, 4], "rotation": 180, "texture": "#9"},
|
||||||
|
"down": {"uv": [0, 0, 16, 4], "texture": "#9"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Bottom",
|
||||||
|
"from": [0, 6, -4],
|
||||||
|
"to": [16, 10, 0],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 6]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [6, 0, 10, 16], "rotation": 270, "texture": "#0"},
|
||||||
|
"east": {"uv": [6, 12, 10, 16], "rotation": 270, "texture": "#10"},
|
||||||
|
"west": {"uv": [6, 12, 10, 16], "rotation": 90, "texture": "#10"},
|
||||||
|
"up": {"uv": [6, 0, 10, 16], "rotation": 270, "texture": "#0"},
|
||||||
|
"down": {"uv": [6, 0, 10, 16], "rotation": 90, "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Bottom",
|
||||||
|
"from": [6, 0, -4],
|
||||||
|
"to": [10, 16, 0],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 6]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [6, 0, 10, 16], "texture": "#0"},
|
||||||
|
"east": {"uv": [6, 0, 10, 16], "texture": "#0"},
|
||||||
|
"west": {"uv": [6, 0, 10, 16], "rotation": 180, "texture": "#0"},
|
||||||
|
"up": {"uv": [10, 12, 14, 16], "rotation": 180, "texture": "#10"},
|
||||||
|
"down": {"uv": [6, 12, 10, 16], "texture": "#10"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Core",
|
||||||
|
"from": [1, 1, 2],
|
||||||
|
"to": [15, 15, 12],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 0, 0], "rotation": 180, "texture": "#opening"},
|
||||||
|
"east": {"uv": [0, 0, 0, 0], "rotation": 270, "texture": "#opening"},
|
||||||
|
"south": {"uv": [0, 0, 0, 0], "texture": "#opening"},
|
||||||
|
"west": {"uv": [0, 0, 0, 0], "rotation": 90, "texture": "#opening"},
|
||||||
|
"up": {"uv": [1, 4, 15, 14], "rotation": 180, "texture": "#opening"},
|
||||||
|
"down": {"uv": [1, 4, 15, 14], "texture": "#opening"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Top",
|
||||||
|
"from": [0, 0, 12],
|
||||||
|
"to": [16, 16, 16],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 16, 16], "rotation": 180, "texture": "#8"},
|
||||||
|
"east": {"uv": [0, 0, 16, 4], "rotation": 270, "texture": "#9"},
|
||||||
|
"south": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#8"},
|
||||||
|
"west": {"uv": [0, 0, 16, 4], "rotation": 90, "texture": "#9"},
|
||||||
|
"up": {"uv": [0, 0, 16, 4], "rotation": 180, "texture": "#9"},
|
||||||
|
"down": {"uv": [0, 0, 16, 4], "texture": "#9"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "SideWest",
|
||||||
|
"from": [0, 0, 4],
|
||||||
|
"to": [2, 16, 12],
|
||||||
|
"faces": {
|
||||||
|
"east": {"uv": [0, 0, 16, 8], "rotation": 270, "texture": "#10"},
|
||||||
|
"west": {"uv": [0, 0, 16, 8], "rotation": 90, "texture": "#10"},
|
||||||
|
"up": {"uv": [14, 0, 16, 8], "rotation": 180, "texture": "#10"},
|
||||||
|
"down": {"uv": [0, 0, 2, 8], "texture": "#10"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "SideEast",
|
||||||
|
"from": [14, 0, 4],
|
||||||
|
"to": [16, 16, 12],
|
||||||
|
"faces": {
|
||||||
|
"east": {"uv": [0, 0, 16, 8], "rotation": 270, "texture": "#10"},
|
||||||
|
"west": {"uv": [0, 0, 16, 8], "rotation": 90, "texture": "#10"},
|
||||||
|
"up": {"uv": [0, 0, 2, 8], "rotation": 180, "texture": "#10"},
|
||||||
|
"down": {"uv": [14, 0, 16, 8], "texture": "#10"}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"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],
|
||||||
|
"translation": [0, 1.5, 0],
|
||||||
|
"scale": [0.5, 0.5, 0.5]
|
||||||
|
},
|
||||||
|
"fixed": {
|
||||||
|
"rotation": [0, 90, 0],
|
||||||
|
"translation": [0, 2.25, 0],
|
||||||
|
"scale": [0.45, 0.45, 0.45]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"groups": [
|
||||||
|
{
|
||||||
|
"name": "item_andesite",
|
||||||
|
"origin": [8, 8, 8],
|
||||||
|
"children": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "item",
|
||||||
|
"origin": [8, 8, 8],
|
||||||
|
"children": [0, 1, 2, 3, 4, 5, 6,
|
||||||
|
{
|
||||||
|
"name": "shaft",
|
||||||
|
"origin": [8, 8, 8],
|
||||||
|
"children": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,224 @@
|
|||||||
|
{
|
||||||
|
"credit": "Made with Blockbench",
|
||||||
|
"parent": "block/block",
|
||||||
|
"textures": {
|
||||||
|
"3": "create:block/cogwheel",
|
||||||
|
"particle": "create:block/andesite_casing"
|
||||||
|
},
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"name": "Gear",
|
||||||
|
"from": [10.5, -10, 6.5],
|
||||||
|
"to": [13.5, 8, 9.5],
|
||||||
|
"rotation": {"angle": 0, "axis": "x", "origin": [12, -1, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [7, 7.5, 16, 9], "rotation": 90, "texture": "#3"},
|
||||||
|
"east": {"uv": [7, 6, 16, 7.5], "rotation": 270, "texture": "#3"},
|
||||||
|
"south": {"uv": [7, 7.5, 16, 9], "rotation": 270, "texture": "#3"},
|
||||||
|
"west": {"uv": [7, 6, 16, 7.5], "rotation": 270, "texture": "#3"},
|
||||||
|
"up": {"uv": [5.5, 7.5, 7, 9], "rotation": 270, "texture": "#3"},
|
||||||
|
"down": {"uv": [5.5, 7.5, 7, 9], "rotation": 270, "texture": "#3"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Gear2",
|
||||||
|
"from": [10.5, -2.5, -1],
|
||||||
|
"to": [13.5, 0.5, 17],
|
||||||
|
"rotation": {"angle": 45, "axis": "x", "origin": [12, -1, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [5.5, 7.5, 7, 9], "rotation": 90, "texture": "#3"},
|
||||||
|
"east": {"uv": [7, 6, 16, 7.5], "texture": "#3"},
|
||||||
|
"south": {"uv": [5.5, 7.5, 7, 9], "rotation": 270, "texture": "#3"},
|
||||||
|
"west": {"uv": [7, 6, 16, 7.5], "rotation": 180, "texture": "#3"},
|
||||||
|
"up": {"uv": [7, 7.5, 16, 9], "rotation": 270, "texture": "#3"},
|
||||||
|
"down": {"uv": [7, 7.5, 16, 9], "rotation": 270, "texture": "#3"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Gear3",
|
||||||
|
"from": [10.5, -10, 6.5],
|
||||||
|
"to": [13.5, 8, 9.5],
|
||||||
|
"rotation": {"angle": 45, "axis": "x", "origin": [12, -1, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [7, 7.5, 16, 9], "rotation": 90, "texture": "#3"},
|
||||||
|
"east": {"uv": [7, 6, 16, 7.5], "rotation": 270, "texture": "#3"},
|
||||||
|
"south": {"uv": [7, 7.5, 16, 9], "rotation": 270, "texture": "#3"},
|
||||||
|
"west": {"uv": [7, 6, 16, 7.5], "rotation": 270, "texture": "#3"},
|
||||||
|
"up": {"uv": [5.5, 7.5, 7, 9], "rotation": 270, "texture": "#3"},
|
||||||
|
"down": {"uv": [5.5, 7.5, 7, 9], "rotation": 270, "texture": "#3"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Gear4",
|
||||||
|
"from": [10.5, -2.5, -1],
|
||||||
|
"to": [13.5, 0.5, 17],
|
||||||
|
"rotation": {"angle": 0, "axis": "x", "origin": [12, -1, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [5.5, 7.5, 7, 9], "rotation": 90, "texture": "#3"},
|
||||||
|
"east": {"uv": [7, 6, 16, 7.5], "texture": "#3"},
|
||||||
|
"south": {"uv": [5.5, 7.5, 7, 9], "rotation": 270, "texture": "#3"},
|
||||||
|
"west": {"uv": [7, 6, 16, 7.5], "texture": "#3"},
|
||||||
|
"up": {"uv": [7, 7.5, 16, 9], "rotation": 270, "texture": "#3"},
|
||||||
|
"down": {"uv": [7, 7.5, 16, 9], "rotation": 270, "texture": "#3"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "GearCaseInner",
|
||||||
|
"from": [11, -7, 2],
|
||||||
|
"to": [13, 5, 14],
|
||||||
|
"rotation": {"angle": 0, "axis": "x", "origin": [12, -1, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 6, 6, 7], "rotation": 90, "texture": "#3"},
|
||||||
|
"east": {"uv": [4, 0, 10, 6], "rotation": 270, "texture": "#3"},
|
||||||
|
"south": {"uv": [0, 6, 6, 7], "rotation": 270, "texture": "#3"},
|
||||||
|
"west": {"uv": [4, 0, 10, 6], "rotation": 270, "texture": "#3"},
|
||||||
|
"up": {"uv": [0, 6, 6, 7], "rotation": 270, "texture": "#3"},
|
||||||
|
"down": {"uv": [0, 6, 6, 7], "rotation": 270, "texture": "#3"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "GearCaseOuter",
|
||||||
|
"from": [10, -5, 4],
|
||||||
|
"to": [14, 3, 12],
|
||||||
|
"rotation": {"angle": 0, "axis": "x", "origin": [12, -1, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 4, 4, 6], "rotation": 90, "texture": "#3"},
|
||||||
|
"east": {"uv": [0, 0, 4, 4], "rotation": 270, "texture": "#3"},
|
||||||
|
"south": {"uv": [0, 4, 4, 6], "rotation": 270, "texture": "#3"},
|
||||||
|
"west": {"uv": [0, 0, 4, 4], "rotation": 270, "texture": "#3"},
|
||||||
|
"up": {"uv": [0, 4, 4, 6], "rotation": 270, "texture": "#3"},
|
||||||
|
"down": {"uv": [0, 4, 4, 6], "rotation": 270, "texture": "#3"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Gear",
|
||||||
|
"from": [2.5, -10, 6.5],
|
||||||
|
"to": [5.5, 8, 9.5],
|
||||||
|
"rotation": {"angle": 0, "axis": "x", "origin": [4, -1, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [7, 7.5, 16, 9], "rotation": 90, "texture": "#3"},
|
||||||
|
"east": {"uv": [7, 6, 16, 7.5], "rotation": 270, "texture": "#3"},
|
||||||
|
"south": {"uv": [7, 7.5, 16, 9], "rotation": 270, "texture": "#3"},
|
||||||
|
"west": {"uv": [7, 6, 16, 7.5], "rotation": 270, "texture": "#3"},
|
||||||
|
"up": {"uv": [5.5, 7.5, 7, 9], "rotation": 270, "texture": "#3"},
|
||||||
|
"down": {"uv": [5.5, 7.5, 7, 9], "rotation": 270, "texture": "#3"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Gear3",
|
||||||
|
"from": [2.5, -2.5, -1],
|
||||||
|
"to": [5.5, 0.5, 17],
|
||||||
|
"rotation": {"angle": 45, "axis": "x", "origin": [4, -1, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [5.5, 7.5, 7, 9], "rotation": 90, "texture": "#3"},
|
||||||
|
"east": {"uv": [7, 6, 16, 7.5], "texture": "#3"},
|
||||||
|
"south": {"uv": [5.5, 7.5, 7, 9], "rotation": 270, "texture": "#3"},
|
||||||
|
"west": {"uv": [7, 6, 16, 7.5], "rotation": 180, "texture": "#3"},
|
||||||
|
"up": {"uv": [7, 7.5, 16, 9], "rotation": 270, "texture": "#3"},
|
||||||
|
"down": {"uv": [7, 7.5, 16, 9], "rotation": 270, "texture": "#3"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Gear4",
|
||||||
|
"from": [2.5, -10, 6.5],
|
||||||
|
"to": [5.5, 8, 9.5],
|
||||||
|
"rotation": {"angle": 45, "axis": "x", "origin": [4, -1, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [7, 7.5, 16, 9], "rotation": 90, "texture": "#3"},
|
||||||
|
"east": {"uv": [7, 6, 16, 7.5], "rotation": 270, "texture": "#3"},
|
||||||
|
"south": {"uv": [7, 7.5, 16, 9], "rotation": 270, "texture": "#3"},
|
||||||
|
"west": {"uv": [7, 6, 16, 7.5], "rotation": 270, "texture": "#3"},
|
||||||
|
"up": {"uv": [5.5, 7.5, 7, 9], "rotation": 270, "texture": "#3"},
|
||||||
|
"down": {"uv": [5.5, 7.5, 7, 9], "rotation": 270, "texture": "#3"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Gear5",
|
||||||
|
"from": [2.5, -2.5, -1],
|
||||||
|
"to": [5.5, 0.5, 17],
|
||||||
|
"rotation": {"angle": 0, "axis": "x", "origin": [4, -1, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [5.5, 7.5, 7, 9], "rotation": 90, "texture": "#3"},
|
||||||
|
"east": {"uv": [7, 6, 16, 7.5], "texture": "#3"},
|
||||||
|
"south": {"uv": [5.5, 7.5, 7, 9], "rotation": 270, "texture": "#3"},
|
||||||
|
"west": {"uv": [7, 6, 16, 7.5], "texture": "#3"},
|
||||||
|
"up": {"uv": [7, 7.5, 16, 9], "rotation": 270, "texture": "#3"},
|
||||||
|
"down": {"uv": [7, 7.5, 16, 9], "rotation": 270, "texture": "#3"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "GearCaseInner",
|
||||||
|
"from": [3, -7, 2],
|
||||||
|
"to": [5, 5, 14],
|
||||||
|
"rotation": {"angle": 0, "axis": "x", "origin": [4, -1, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 6, 6, 7], "rotation": 90, "texture": "#3"},
|
||||||
|
"east": {"uv": [4, 0, 10, 6], "rotation": 270, "texture": "#3"},
|
||||||
|
"south": {"uv": [0, 6, 6, 7], "rotation": 270, "texture": "#3"},
|
||||||
|
"west": {"uv": [4, 0, 10, 6], "rotation": 270, "texture": "#3"},
|
||||||
|
"up": {"uv": [0, 6, 6, 7], "rotation": 270, "texture": "#3"},
|
||||||
|
"down": {"uv": [0, 6, 6, 7], "rotation": 270, "texture": "#3"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "GearCaseOuter",
|
||||||
|
"from": [2, -5, 4],
|
||||||
|
"to": [6, 3, 12],
|
||||||
|
"rotation": {"angle": 0, "axis": "x", "origin": [4, -1, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 4, 4, 6], "rotation": 90, "texture": "#3"},
|
||||||
|
"east": {"uv": [0, 0, 4, 4], "rotation": 270, "texture": "#3"},
|
||||||
|
"south": {"uv": [0, 4, 4, 6], "rotation": 270, "texture": "#3"},
|
||||||
|
"west": {"uv": [0, 0, 4, 4], "rotation": 270, "texture": "#3"},
|
||||||
|
"up": {"uv": [0, 4, 4, 6], "rotation": 270, "texture": "#3"},
|
||||||
|
"down": {"uv": [0, 4, 4, 6], "rotation": 270, "texture": "#3"}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"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],
|
||||||
|
"translation": [0, 1.5, 0],
|
||||||
|
"scale": [0.5, 0.5, 0.5]
|
||||||
|
},
|
||||||
|
"fixed": {
|
||||||
|
"rotation": [0, 90, 0],
|
||||||
|
"translation": [0, 2.25, 0],
|
||||||
|
"scale": [0.45, 0.45, 0.45]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"groups": [
|
||||||
|
{
|
||||||
|
"name": "cogwheel_shaftless",
|
||||||
|
"origin": [8, 8, 8],
|
||||||
|
"children": [0, 1, 2, 3, 4, 5]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "cogwheel_shaftless",
|
||||||
|
"origin": [8, 8, 8],
|
||||||
|
"children": [6, 7, 8, 9, 10, 11]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,69 @@
|
|||||||
|
{
|
||||||
|
"credit": "Made with Blockbench",
|
||||||
|
"parent": "block/block",
|
||||||
|
"textures": {
|
||||||
|
"0": "create:block/axis",
|
||||||
|
"1": "create:block/axis_top",
|
||||||
|
"2": "create:block/gantry_shaft",
|
||||||
|
"3": "create:block/cogwheel",
|
||||||
|
"particle": "#2"
|
||||||
|
},
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"from": [4, 11, 4],
|
||||||
|
"to": [12, 14, 12],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [14.5, 0, 16, 4], "rotation": 270, "texture": "#3"},
|
||||||
|
"east": {"uv": [14.5, 0, 16, 4], "rotation": 90, "texture": "#3"},
|
||||||
|
"south": {"uv": [14.5, 0, 16, 4], "rotation": 90, "texture": "#3"},
|
||||||
|
"west": {"uv": [14.5, 0, 16, 4], "rotation": 270, "texture": "#3"},
|
||||||
|
"up": {"uv": [0, 0, 4, 4], "texture": "#3"},
|
||||||
|
"down": {"uv": [0, 0, 4, 4], "rotation": 180, "texture": "#3"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [5, 0, 5],
|
||||||
|
"to": [11, 11, 11],
|
||||||
|
"shade": false,
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [8, 5, 14, 16], "texture": "#2"},
|
||||||
|
"east": {"uv": [2, 5, 8, 16], "texture": "#2"},
|
||||||
|
"south": {"uv": [4, 5, 10, 16], "texture": "#2"},
|
||||||
|
"west": {"uv": [6, 5, 12, 16], "texture": "#2"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Axis",
|
||||||
|
"from": [6, 0, 6],
|
||||||
|
"to": [10, 16, 10],
|
||||||
|
"shade": false,
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [6, 0, 10, 16], "texture": "#0"},
|
||||||
|
"east": {"uv": [6, 0, 10, 16], "texture": "#0"},
|
||||||
|
"south": {"uv": [6, 0, 10, 16], "texture": "#0"},
|
||||||
|
"west": {"uv": [6, 0, 10, 16], "texture": "#0"},
|
||||||
|
"up": {"uv": [6, 6, 10, 10], "texture": "#1"},
|
||||||
|
"down": {"uv": [6, 6, 10, 10], "texture": "#1"}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"groups": [
|
||||||
|
{
|
||||||
|
"name": "rack",
|
||||||
|
"origin": [8, 8, 8],
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"name": "end",
|
||||||
|
"origin": [8, 8, 8],
|
||||||
|
"children": [0, 1,
|
||||||
|
{
|
||||||
|
"name": "shaft",
|
||||||
|
"origin": [8, 8, 8],
|
||||||
|
"children": [2]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
"credit": "Made with Blockbench",
|
||||||
|
"parent": "block/block",
|
||||||
|
"textures": {
|
||||||
|
"2": "create:block/gantry_shaft",
|
||||||
|
"particle": "#2"
|
||||||
|
},
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"from": [5, 0, 5],
|
||||||
|
"to": [11, 16, 11],
|
||||||
|
"shade": false,
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 6, 16], "texture": "#2"},
|
||||||
|
"east": {"uv": [2, 0, 8, 16], "texture": "#2"},
|
||||||
|
"south": {"uv": [4, 0, 10, 16], "texture": "#2"},
|
||||||
|
"west": {"uv": [6, 0, 12, 16], "texture": "#2"}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"groups": [
|
||||||
|
{
|
||||||
|
"name": "rack",
|
||||||
|
"origin": [8, 8, 8],
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"name": "middle",
|
||||||
|
"origin": [8, 8, 8],
|
||||||
|
"children": [0,
|
||||||
|
{
|
||||||
|
"name": "shaft",
|
||||||
|
"origin": [8, 8, 8],
|
||||||
|
"children": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,103 @@
|
|||||||
|
{
|
||||||
|
"credit": "Made with Blockbench",
|
||||||
|
"parent": "block/block",
|
||||||
|
"textures": {
|
||||||
|
"0": "create:block/axis",
|
||||||
|
"1": "create:block/axis_top",
|
||||||
|
"2": "create:block/gantry_shaft",
|
||||||
|
"3": "create:block/cogwheel",
|
||||||
|
"particle": "#2"
|
||||||
|
},
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"from": [4, 2, 4],
|
||||||
|
"to": [12, 5, 12],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [14.5, 0, 16, 4], "rotation": 270, "texture": "#3"},
|
||||||
|
"east": {"uv": [14.5, 0, 16, 4], "rotation": 270, "texture": "#3"},
|
||||||
|
"south": {"uv": [14.5, 0, 16, 4], "rotation": 90, "texture": "#3"},
|
||||||
|
"west": {"uv": [14.5, 0, 16, 4], "rotation": 90, "texture": "#3"},
|
||||||
|
"up": {"uv": [0, 0, 4, 4], "rotation": 180, "texture": "#3"},
|
||||||
|
"down": {"uv": [0, 0, 4, 4], "texture": "#3"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Axis",
|
||||||
|
"from": [6, 0, 6],
|
||||||
|
"to": [10, 16, 10],
|
||||||
|
"shade": false,
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [6, 0, 10, 16], "rotation": 180, "texture": "#0"},
|
||||||
|
"east": {"uv": [6, 0, 10, 16], "rotation": 180, "texture": "#0"},
|
||||||
|
"south": {"uv": [6, 0, 10, 16], "rotation": 180, "texture": "#0"},
|
||||||
|
"west": {"uv": [6, 0, 10, 16], "rotation": 180, "texture": "#0"},
|
||||||
|
"up": {"uv": [6, 6, 10, 10], "texture": "#1"},
|
||||||
|
"down": {"uv": [6, 6, 10, 10], "texture": "#1"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [4, 11, 4],
|
||||||
|
"to": [12, 14, 12],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [14.5, 0, 16, 4], "rotation": 270, "texture": "#3"},
|
||||||
|
"east": {"uv": [14.5, 0, 16, 4], "rotation": 270, "texture": "#3"},
|
||||||
|
"south": {"uv": [14.5, 0, 16, 4], "rotation": 90, "texture": "#3"},
|
||||||
|
"west": {"uv": [14.5, 0, 16, 4], "rotation": 90, "texture": "#3"},
|
||||||
|
"up": {"uv": [0, 0, 4, 4], "rotation": 180, "texture": "#3"},
|
||||||
|
"down": {"uv": [0, 0, 4, 4], "texture": "#3"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [5, 5, 5],
|
||||||
|
"to": [11, 11, 11],
|
||||||
|
"shade": false,
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [4, 5, 10, 11], "rotation": 180, "texture": "#2"},
|
||||||
|
"east": {"uv": [3, 5, 9, 11], "rotation": 180, "texture": "#2"},
|
||||||
|
"south": {"uv": [0, 5, 6, 11], "rotation": 180, "texture": "#2"},
|
||||||
|
"west": {"uv": [6, 5, 12, 11], "rotation": 180, "texture": "#2"}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"groups": [
|
||||||
|
{
|
||||||
|
"name": "rack",
|
||||||
|
"origin": [8, 8, 8],
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"name": "end",
|
||||||
|
"origin": [8, 8, 8],
|
||||||
|
"children": [0,
|
||||||
|
{
|
||||||
|
"name": "shaft",
|
||||||
|
"origin": [8, 8, 8],
|
||||||
|
"children": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "middle",
|
||||||
|
"origin": [8, 8, 8],
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"name": "shaft",
|
||||||
|
"origin": [8, 8, 8],
|
||||||
|
"children": [1]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "start",
|
||||||
|
"origin": [8, 8, 8],
|
||||||
|
"children": [2, 3,
|
||||||
|
{
|
||||||
|
"name": "shaft",
|
||||||
|
"origin": [8, 8, 8],
|
||||||
|
"children": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,69 @@
|
|||||||
|
{
|
||||||
|
"credit": "Made with Blockbench",
|
||||||
|
"parent": "block/block",
|
||||||
|
"textures": {
|
||||||
|
"0": "create:block/axis",
|
||||||
|
"1": "create:block/axis_top",
|
||||||
|
"2": "create:block/gantry_shaft",
|
||||||
|
"3": "create:block/cogwheel",
|
||||||
|
"particle": "#2"
|
||||||
|
},
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"from": [4, 2, 4],
|
||||||
|
"to": [12, 5, 12],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [14.5, 0, 16, 4], "rotation": 270, "texture": "#3"},
|
||||||
|
"east": {"uv": [14.5, 0, 16, 4], "rotation": 90, "texture": "#3"},
|
||||||
|
"south": {"uv": [14.5, 0, 16, 4], "rotation": 90, "texture": "#3"},
|
||||||
|
"west": {"uv": [14.5, 0, 16, 4], "rotation": 270, "texture": "#3"},
|
||||||
|
"up": {"uv": [0, 0, 4, 4], "texture": "#3"},
|
||||||
|
"down": {"uv": [0, 0, 4, 4], "rotation": 180, "texture": "#3"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [5, 5, 5],
|
||||||
|
"to": [11, 16, 11],
|
||||||
|
"shade": false,
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 6, 11], "texture": "#2"},
|
||||||
|
"east": {"uv": [2, 0, 8, 11], "texture": "#2"},
|
||||||
|
"south": {"uv": [4, 0, 10, 11], "texture": "#2"},
|
||||||
|
"west": {"uv": [6, 0, 12, 11], "texture": "#2"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Axis",
|
||||||
|
"from": [6, 0, 6],
|
||||||
|
"to": [10, 16, 10],
|
||||||
|
"shade": false,
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [6, 0, 10, 16], "texture": "#0"},
|
||||||
|
"east": {"uv": [6, 0, 10, 16], "texture": "#0"},
|
||||||
|
"south": {"uv": [6, 0, 10, 16], "texture": "#0"},
|
||||||
|
"west": {"uv": [6, 0, 10, 16], "texture": "#0"},
|
||||||
|
"up": {"uv": [6, 6, 10, 10], "texture": "#1"},
|
||||||
|
"down": {"uv": [6, 6, 10, 10], "texture": "#1"}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"groups": [
|
||||||
|
{
|
||||||
|
"name": "rack",
|
||||||
|
"origin": [8, 8, 8],
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"name": "start",
|
||||||
|
"origin": [8, 8, 8],
|
||||||
|
"children": [0, 1,
|
||||||
|
{
|
||||||
|
"name": "shaft",
|
||||||
|
"origin": [8, 8, 8],
|
||||||
|
"children": [2]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
Before Width: | Height: | Size: 561 B After Width: | Height: | Size: 373 B |
BIN
src/main/resources/assets/create/textures/block/gantry_shaft.png
Normal file
After Width: | Height: | Size: 234 B |
After Width: | Height: | Size: 233 B |
After Width: | Height: | Size: 227 B |
After Width: | Height: | Size: 231 B |
BIN
src/main/resources/assets/create/textures/block/pinion.png
Normal file
After Width: | Height: | Size: 514 B |