mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-15 22:33:42 +01:00
Merge remote-tracking branch 'origin/mc1.15/dev' into mc1.15/dev
This commit is contained in:
commit
6649ae8d28
142 changed files with 3634 additions and 1948 deletions
|
@ -18,7 +18,7 @@ a579c40c43dc2174afb66f42d00d0c4a0efaaeee assets/create/blockstates/andesite_bric
|
||||||
11908c2f8603e61bec88010bc6d0890e6339c6b1 assets/create/blockstates/andesite_funnel.json
|
11908c2f8603e61bec88010bc6d0890e6339c6b1 assets/create/blockstates/andesite_funnel.json
|
||||||
398922758a6219544e5b85c91c9cf8a543b437e5 assets/create/blockstates/andesite_pillar.json
|
398922758a6219544e5b85c91c9cf8a543b437e5 assets/create/blockstates/andesite_pillar.json
|
||||||
1d2d8081581e07d9be4b382aede4f2de4401cc6b assets/create/blockstates/andesite_tunnel.json
|
1d2d8081581e07d9be4b382aede4f2de4401cc6b assets/create/blockstates/andesite_tunnel.json
|
||||||
f9fa6aa530eb0891a74eadfbebc663172a57147a assets/create/blockstates/basin.json
|
e555e3c2b2d3f01440e48db4ba88f7e00fd99b6f assets/create/blockstates/basin.json
|
||||||
f25693a9429f6337149ff24f27900dc4eb82a7c2 assets/create/blockstates/belt.json
|
f25693a9429f6337149ff24f27900dc4eb82a7c2 assets/create/blockstates/belt.json
|
||||||
cf9045eb16e5299a1d917c4cb536289f49411276 assets/create/blockstates/birch_window.json
|
cf9045eb16e5299a1d917c4cb536289f49411276 assets/create/blockstates/birch_window.json
|
||||||
94a1a91403eb4b035fec48071e7fcae57a8a6abd assets/create/blockstates/birch_window_pane.json
|
94a1a91403eb4b035fec48071e7fcae57a8a6abd assets/create/blockstates/birch_window_pane.json
|
||||||
|
@ -132,7 +132,7 @@ de8a40b7daf1497d5aecee47a43b3e0b1d030b00 assets/create/blockstates/fancy_scoria_
|
||||||
fc9ac0a7e7191b93516719455a17177fa6524ecc assets/create/blockstates/fancy_weathered_limestone_bricks_slab.json
|
fc9ac0a7e7191b93516719455a17177fa6524ecc assets/create/blockstates/fancy_weathered_limestone_bricks_slab.json
|
||||||
b2a7c321b1795f20e7433f81a55ce4683de081b8 assets/create/blockstates/fancy_weathered_limestone_bricks_stairs.json
|
b2a7c321b1795f20e7433f81a55ce4683de081b8 assets/create/blockstates/fancy_weathered_limestone_bricks_stairs.json
|
||||||
6372fe02ba0065acb0758121c45a15a1a8fdc5de assets/create/blockstates/fancy_weathered_limestone_bricks_wall.json
|
6372fe02ba0065acb0758121c45a15a1a8fdc5de assets/create/blockstates/fancy_weathered_limestone_bricks_wall.json
|
||||||
3d97226b5e8d8f70ed08e45e78db1faf78d5e28b assets/create/blockstates/fluid_pipe.json
|
4c3e0500f9382d2e426e823fe876f57f4d7ee3b4 assets/create/blockstates/fluid_pipe.json
|
||||||
f0eaab18e16c4f3f65ebf3b55b08f0dc445720fe assets/create/blockstates/fluid_tank.json
|
f0eaab18e16c4f3f65ebf3b55b08f0dc445720fe assets/create/blockstates/fluid_tank.json
|
||||||
5408d92ab02af86539ac42971d4033545970bb3a assets/create/blockstates/fluid_valve.json
|
5408d92ab02af86539ac42971d4033545970bb3a assets/create/blockstates/fluid_valve.json
|
||||||
e9da1794b6ece7f9aa8bcb43d42c23a55446133b assets/create/blockstates/flywheel.json
|
e9da1794b6ece7f9aa8bcb43d42c23a55446133b assets/create/blockstates/flywheel.json
|
||||||
|
@ -312,7 +312,7 @@ e8b0a401c10d1ba67ed71ba31bd5f9bc28571b65 assets/create/blockstates/powered_toggl
|
||||||
469e430d96cb0a5e1aaf6b7cc5d401d488c9e600 assets/create/blockstates/pulse_repeater.json
|
469e430d96cb0a5e1aaf6b7cc5d401d488c9e600 assets/create/blockstates/pulse_repeater.json
|
||||||
92957119abd5fbcca36a113b2a80255fd70fc303 assets/create/blockstates/purple_seat.json
|
92957119abd5fbcca36a113b2a80255fd70fc303 assets/create/blockstates/purple_seat.json
|
||||||
61035f8afe75ff7bbd291da5d8690bcbebe679eb assets/create/blockstates/purple_valve_handle.json
|
61035f8afe75ff7bbd291da5d8690bcbebe679eb assets/create/blockstates/purple_valve_handle.json
|
||||||
8d7e653bfd9846e684a0d3725595714a19201017 assets/create/blockstates/radial_chassis.json
|
bdd56f32ce0a148b6e466a55ab2777f69fc08cfc assets/create/blockstates/radial_chassis.json
|
||||||
da1b08387af7afa0855ee8d040f620c01f20660a assets/create/blockstates/red_seat.json
|
da1b08387af7afa0855ee8d040f620c01f20660a assets/create/blockstates/red_seat.json
|
||||||
722fc77bbf387af8a4016e42cbf9501d2b968881 assets/create/blockstates/red_valve_handle.json
|
722fc77bbf387af8a4016e42cbf9501d2b968881 assets/create/blockstates/red_valve_handle.json
|
||||||
8929677f2cc5354aa19ef182af69f9f0b41eb242 assets/create/blockstates/redstone_contact.json
|
8929677f2cc5354aa19ef182af69f9f0b41eb242 assets/create/blockstates/redstone_contact.json
|
||||||
|
@ -368,16 +368,16 @@ a3a11524cd3515fc01d905767b4b7ea782adaf03 assets/create/blockstates/yellow_seat.j
|
||||||
7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json
|
7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json
|
||||||
b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json
|
b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json
|
||||||
c113d0a180880243538e9b1c3019c863df3fbdc1 assets/create/lang/en_ud.json
|
c113d0a180880243538e9b1c3019c863df3fbdc1 assets/create/lang/en_ud.json
|
||||||
88bb3904aaac091ed7ce4bb336dbf3e770c022dd assets/create/lang/en_us.json
|
a4cd12907a1ddfd60883077b2d11c5459d436016 assets/create/lang/en_us.json
|
||||||
ca20d938212e7bd07f98b6547113dd7054ebb8ac assets/create/lang/unfinished/de_de.json
|
063195daed96a4420588e6d6d13f4a9b1f099ff4 assets/create/lang/unfinished/de_de.json
|
||||||
3e59c20a5966a30f80fd4c565bbdb48a08f16aab assets/create/lang/unfinished/fr_fr.json
|
30da89bafac8a5ea4d82903928ba4d2a63385117 assets/create/lang/unfinished/fr_fr.json
|
||||||
2e6088860eba69341a168d44c9db6aef9bcc2682 assets/create/lang/unfinished/it_it.json
|
faddc5022cc10c8fca1649d66427e910cfa28286 assets/create/lang/unfinished/it_it.json
|
||||||
0135c7d92bac5955a620c25588ed86785479dd4b assets/create/lang/unfinished/ja_jp.json
|
7f448e863397725c11ab083d39af68d205d579d7 assets/create/lang/unfinished/ja_jp.json
|
||||||
b7fb3f75f54e9568e9eda012df72ce9deb2aae09 assets/create/lang/unfinished/ko_kr.json
|
48d61d21ee096513f2b9e06df38882cf6ace96db assets/create/lang/unfinished/ko_kr.json
|
||||||
9630962c49ec42b5f76b20ca5ea0b35f285eae24 assets/create/lang/unfinished/nl_nl.json
|
a908ecd03bd7ede95b5e5f0698157353ae2bec6c assets/create/lang/unfinished/nl_nl.json
|
||||||
4ceb1a664412c9385faa27f409f4bc5669aaf7f8 assets/create/lang/unfinished/pt_br.json
|
ffa305b619c58bdff92d2e69b2bbc81ad5b8dcb6 assets/create/lang/unfinished/pt_br.json
|
||||||
f66486f19a4142831608e2e38d8074b967a324c1 assets/create/lang/unfinished/ru_ru.json
|
6588d559aaafb4f036ba47ba2414caaa9d2f6f6a assets/create/lang/unfinished/ru_ru.json
|
||||||
b37970264c2fda5394ed38a6f3d56be01185ed07 assets/create/lang/unfinished/zh_cn.json
|
4593a6013875039a6a30ac64d45bb4f140190fe1 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
|
||||||
|
@ -1045,7 +1045,7 @@ b0f664dd6de3d0ee9afcb6223fbcd53b97fa0d65 assets/create/models/item/andesite_cobb
|
||||||
7490819e7e5445019b6b8cb2538f12a5b6717a46 assets/create/models/item/andesite_funnel.json
|
7490819e7e5445019b6b8cb2538f12a5b6717a46 assets/create/models/item/andesite_funnel.json
|
||||||
75b8b00c2418b9660d35a7fabd0774925cf1c02f assets/create/models/item/andesite_pillar.json
|
75b8b00c2418b9660d35a7fabd0774925cf1c02f assets/create/models/item/andesite_pillar.json
|
||||||
c0e35daccfb398947532e9499d6bda963387cd9c assets/create/models/item/andesite_tunnel.json
|
c0e35daccfb398947532e9499d6bda963387cd9c assets/create/models/item/andesite_tunnel.json
|
||||||
bf1fc6bdf7fca6f1958a2d3e96202c1cecb50669 assets/create/models/item/basin.json
|
421e481b7fbca4c4a1080ed703401eb25375e087 assets/create/models/item/basin.json
|
||||||
1da382e7e58eaa9788f5b1d92221ccac573e068f assets/create/models/item/belt_connector.json
|
1da382e7e58eaa9788f5b1d92221ccac573e068f assets/create/models/item/belt_connector.json
|
||||||
9044243882cfd49a2827e1b910a4c9b0e46daa47 assets/create/models/item/birch_window.json
|
9044243882cfd49a2827e1b910a4c9b0e46daa47 assets/create/models/item/birch_window.json
|
||||||
6ed49f59ea91068ef68720f43e67a9237594bdf0 assets/create/models/item/birch_window_pane.json
|
6ed49f59ea91068ef68720f43e67a9237594bdf0 assets/create/models/item/birch_window_pane.json
|
||||||
|
@ -1481,7 +1481,7 @@ d531f87f425d199aee4777a588c1cd6cab6f5173 data/create/advancements/recipes/create
|
||||||
2eef3201017af03f6a2f0f015645e3ff5e25d9c1 data/create/advancements/recipes/create.base/crafting/curiosities/wand_of_symmetry.json
|
2eef3201017af03f6a2f0f015645e3ff5e25d9c1 data/create/advancements/recipes/create.base/crafting/curiosities/wand_of_symmetry.json
|
||||||
d97d96e1b2ddd25df15fe1ef1c3d084f15bb9789 data/create/advancements/recipes/create.base/crafting/kinetics/adjustable_pulley.json
|
d97d96e1b2ddd25df15fe1ef1c3d084f15bb9789 data/create/advancements/recipes/create.base/crafting/kinetics/adjustable_pulley.json
|
||||||
92416ced6ede6965fd728e1c7336bb05a3e41ea2 data/create/advancements/recipes/create.base/crafting/kinetics/analog_lever.json
|
92416ced6ede6965fd728e1c7336bb05a3e41ea2 data/create/advancements/recipes/create.base/crafting/kinetics/analog_lever.json
|
||||||
2105b4f1fd9a170a100efc083a794fdb9e068924 data/create/advancements/recipes/create.base/crafting/kinetics/attribute_filter.json
|
3e9753006da898d4569bbeabf95997e8c90847c8 data/create/advancements/recipes/create.base/crafting/kinetics/attribute_filter.json
|
||||||
bec8c280b717306f87050b08a418feab53be71cb data/create/advancements/recipes/create.base/crafting/kinetics/basin.json
|
bec8c280b717306f87050b08a418feab53be71cb data/create/advancements/recipes/create.base/crafting/kinetics/basin.json
|
||||||
5af08853632fb5970fe542b3ecbde0ad16d64714 data/create/advancements/recipes/create.base/crafting/kinetics/belt_connector.json
|
5af08853632fb5970fe542b3ecbde0ad16d64714 data/create/advancements/recipes/create.base/crafting/kinetics/belt_connector.json
|
||||||
80d87f1dde60adb5334e0cff25a9f0b7f67c1526 data/create/advancements/recipes/create.base/crafting/kinetics/black_seat.json
|
80d87f1dde60adb5334e0cff25a9f0b7f67c1526 data/create/advancements/recipes/create.base/crafting/kinetics/black_seat.json
|
||||||
|
@ -2428,6 +2428,8 @@ d9021504be855cd2d4d91503a82b84233052adb0 data/create/recipes/blasting/gold_ingot
|
||||||
c323b106e88b7de77fea71ff12494abdbb818d15 data/create/recipes/chiseled_limestone_from_limestone_stonecutting.json
|
c323b106e88b7de77fea71ff12494abdbb818d15 data/create/recipes/chiseled_limestone_from_limestone_stonecutting.json
|
||||||
da9a919b476954c1de34826aa7706bf6056a8f12 data/create/recipes/chiseled_scoria_from_scoria_stonecutting.json
|
da9a919b476954c1de34826aa7706bf6056a8f12 data/create/recipes/chiseled_scoria_from_scoria_stonecutting.json
|
||||||
09faa4ddcf9f3907dcdb3ab3e8b68c1deb2486e5 data/create/recipes/chiseled_weathered_limestone_from_weathered_limestone_stonecutting.json
|
09faa4ddcf9f3907dcdb3ab3e8b68c1deb2486e5 data/create/recipes/chiseled_weathered_limestone_from_weathered_limestone_stonecutting.json
|
||||||
|
c3cfdc9552a23e4749c42e71fbddd153b76ca708 data/create/recipes/compacting/ice.json
|
||||||
|
5758a1804287c261e1c953bda599d8495ba7c40a data/create/recipes/compacting/temp_gabbro.json
|
||||||
19526da3a59fc136654ff1bc93c0251581f397a9 data/create/recipes/crafting/appliances/dough.json
|
19526da3a59fc136654ff1bc93c0251581f397a9 data/create/recipes/crafting/appliances/dough.json
|
||||||
7b5f863dda3d05a79cb85943a178eba0bd8a7dc7 data/create/recipes/crafting/appliances/slime_ball.json
|
7b5f863dda3d05a79cb85943a178eba0bd8a7dc7 data/create/recipes/crafting/appliances/slime_ball.json
|
||||||
b159ba84428eee6ef6e23df1766f2a18f2c8a63e data/create/recipes/crafting/appliances/tree_fertilizer.json
|
b159ba84428eee6ef6e23df1766f2a18f2c8a63e data/create/recipes/crafting/appliances/tree_fertilizer.json
|
||||||
|
@ -2437,7 +2439,7 @@ b159ba84428eee6ef6e23df1766f2a18f2c8a63e data/create/recipes/crafting/appliances
|
||||||
fcbc04d0a7eaf820a74bc7e4736a4a581e0a9dff data/create/recipes/crafting/curiosities/wand_of_symmetry.json
|
fcbc04d0a7eaf820a74bc7e4736a4a581e0a9dff data/create/recipes/crafting/curiosities/wand_of_symmetry.json
|
||||||
696df0fe5f8e29220ea15527f8c119c39b418819 data/create/recipes/crafting/kinetics/adjustable_pulley.json
|
696df0fe5f8e29220ea15527f8c119c39b418819 data/create/recipes/crafting/kinetics/adjustable_pulley.json
|
||||||
88de51b451469698665b7319e5b9cfb9a87ae3e0 data/create/recipes/crafting/kinetics/analog_lever.json
|
88de51b451469698665b7319e5b9cfb9a87ae3e0 data/create/recipes/crafting/kinetics/analog_lever.json
|
||||||
6912101930aae627820783c27358dcf2ff4016aa data/create/recipes/crafting/kinetics/attribute_filter.json
|
cf1f3a6306d47025cebe153cf05949ef69ccbe5a data/create/recipes/crafting/kinetics/attribute_filter.json
|
||||||
059d12526529b2896ed583555373afa31839a0de data/create/recipes/crafting/kinetics/basin.json
|
059d12526529b2896ed583555373afa31839a0de data/create/recipes/crafting/kinetics/basin.json
|
||||||
dcf98e667d321fb4bd9fa6dfec7927a84cdbd5d6 data/create/recipes/crafting/kinetics/belt_connector.json
|
dcf98e667d321fb4bd9fa6dfec7927a84cdbd5d6 data/create/recipes/crafting/kinetics/belt_connector.json
|
||||||
1123903a11b13448b61cf8f8a5dc2e8013d39ac0 data/create/recipes/crafting/kinetics/black_seat.json
|
1123903a11b13448b61cf8f8a5dc2e8013d39ac0 data/create/recipes/crafting/kinetics/black_seat.json
|
||||||
|
@ -2675,6 +2677,7 @@ ddda28bb6efc43b7e3149756daf53e1664187283 data/create/recipes/dolomite_cobbleston
|
||||||
500ecdfdcf34e9d26256948e206aab4f0b79e659 data/create/recipes/dolomite_cobblestone_wall_from_dolomite_cobblestone_stonecutting.json
|
500ecdfdcf34e9d26256948e206aab4f0b79e659 data/create/recipes/dolomite_cobblestone_wall_from_dolomite_cobblestone_stonecutting.json
|
||||||
ff39e629b242ae91e23aec86b0a1f757dd938305 data/create/recipes/dolomite_pillar.json
|
ff39e629b242ae91e23aec86b0a1f757dd938305 data/create/recipes/dolomite_pillar.json
|
||||||
b4a8d14d9a20e812e0acb691b5b511a87e8b0576 data/create/recipes/dolomite_pillar_from_dolomite_stonecutting.json
|
b4a8d14d9a20e812e0acb691b5b511a87e8b0576 data/create/recipes/dolomite_pillar_from_dolomite_stonecutting.json
|
||||||
|
ae6698363e49f7cb5f2ed52c6b8805bebed31fa2 data/create/recipes/emptying/water_bottle.json
|
||||||
0e11aa1accb71ed62e212f23a7069b7b7b4e8119 data/create/recipes/fancy_andesite_bricks_from_andesite_stonecutting.json
|
0e11aa1accb71ed62e212f23a7069b7b7b4e8119 data/create/recipes/fancy_andesite_bricks_from_andesite_stonecutting.json
|
||||||
8b86fc9a9416adeaab3f26192a73a481887675c3 data/create/recipes/fancy_andesite_bricks_slab.json
|
8b86fc9a9416adeaab3f26192a73a481887675c3 data/create/recipes/fancy_andesite_bricks_slab.json
|
||||||
c7b762b25c7a6705dba3e922e981be851ac4f36b data/create/recipes/fancy_andesite_bricks_slab_from_fancy_andesite_bricks_stonecutting.json
|
c7b762b25c7a6705dba3e922e981be851ac4f36b data/create/recipes/fancy_andesite_bricks_slab_from_fancy_andesite_bricks_stonecutting.json
|
||||||
|
@ -2860,6 +2863,7 @@ e7bfaa806d57573d060fac0a5e7a84f345b8bb85 data/create/recipes/mixing/andesite_all
|
||||||
76939e4d3e5b615ae21d14c0ff7b917a622bcf80 data/create/recipes/mixing/chromatic_compound.json
|
76939e4d3e5b615ae21d14c0ff7b917a622bcf80 data/create/recipes/mixing/chromatic_compound.json
|
||||||
d9a3dff1288d675ab812eef1eb73cb27dcc71bd2 data/create/recipes/mixing/crushed_brass.json
|
d9a3dff1288d675ab812eef1eb73cb27dcc71bd2 data/create/recipes/mixing/crushed_brass.json
|
||||||
00b165ea38d834c7955440e87062004a8182c3f8 data/create/recipes/mixing/gunpowder.json
|
00b165ea38d834c7955440e87062004a8182c3f8 data/create/recipes/mixing/gunpowder.json
|
||||||
|
35c4e8a765479861f307afb9ec650f912f92b998 data/create/recipes/mixing/temp_cobble.json
|
||||||
1998c6f84f871d6da58ec29d729401d18f8f1aa1 data/create/recipes/mossy_andesite_from_andesite_stonecutting.json
|
1998c6f84f871d6da58ec29d729401d18f8f1aa1 data/create/recipes/mossy_andesite_from_andesite_stonecutting.json
|
||||||
89929d9cb11b5c589b2ecfa821c61add1ef7b62b data/create/recipes/mossy_dark_scoria_from_dark_scoria_stonecutting.json
|
89929d9cb11b5c589b2ecfa821c61add1ef7b62b data/create/recipes/mossy_dark_scoria_from_dark_scoria_stonecutting.json
|
||||||
4b8b1191dd3a21294293dc5ad237af89b849df28 data/create/recipes/mossy_diorite_from_diorite_stonecutting.json
|
4b8b1191dd3a21294293dc5ad237af89b849df28 data/create/recipes/mossy_diorite_from_diorite_stonecutting.json
|
||||||
|
|
|
@ -1,7 +1,22 @@
|
||||||
{
|
{
|
||||||
"variants": {
|
"variants": {
|
||||||
"": {
|
"facing=down": {
|
||||||
"model": "create:block/basin"
|
"model": "create:block/basin/block"
|
||||||
|
},
|
||||||
|
"facing=north": {
|
||||||
|
"model": "create:block/basin/block_directional",
|
||||||
|
"y": 180
|
||||||
|
},
|
||||||
|
"facing=south": {
|
||||||
|
"model": "create:block/basin/block_directional"
|
||||||
|
},
|
||||||
|
"facing=west": {
|
||||||
|
"model": "create:block/basin/block_directional",
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"facing=east": {
|
||||||
|
"model": "create:block/basin/block_directional",
|
||||||
|
"y": 270
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -89,8 +89,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"sticky_west": "true",
|
"axis": "x",
|
||||||
"axis": "x"
|
"sticky_west": "true"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_x_sticky",
|
"model": "create:block/radial_chassis_side_x_sticky",
|
||||||
|
@ -99,8 +99,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"sticky_west": "true",
|
"axis": "y",
|
||||||
"axis": "y"
|
"sticky_west": "true"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_y_sticky",
|
"model": "create:block/radial_chassis_side_y_sticky",
|
||||||
|
@ -109,8 +109,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"sticky_west": "true",
|
"axis": "z",
|
||||||
"axis": "z"
|
"sticky_west": "true"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_z_sticky",
|
"model": "create:block/radial_chassis_side_z_sticky",
|
||||||
|
@ -119,8 +119,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"sticky_west": "false",
|
"axis": "x",
|
||||||
"axis": "x"
|
"sticky_west": "false"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_x",
|
"model": "create:block/radial_chassis_side_x",
|
||||||
|
@ -129,8 +129,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"sticky_west": "false",
|
"axis": "y",
|
||||||
"axis": "y"
|
"sticky_west": "false"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_y",
|
"model": "create:block/radial_chassis_side_y",
|
||||||
|
@ -139,8 +139,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"sticky_west": "false",
|
"axis": "z",
|
||||||
"axis": "z"
|
"sticky_west": "false"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_z",
|
"model": "create:block/radial_chassis_side_z",
|
||||||
|
@ -149,8 +149,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"sticky_north": "true",
|
"axis": "x",
|
||||||
"axis": "x"
|
"sticky_north": "true"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_x_sticky"
|
"model": "create:block/radial_chassis_side_x_sticky"
|
||||||
|
@ -158,8 +158,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"sticky_north": "true",
|
"axis": "y",
|
||||||
"axis": "y"
|
"sticky_north": "true"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_y_sticky",
|
"model": "create:block/radial_chassis_side_y_sticky",
|
||||||
|
@ -168,8 +168,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"sticky_north": "true",
|
"axis": "z",
|
||||||
"axis": "z"
|
"sticky_north": "true"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_x_sticky",
|
"model": "create:block/radial_chassis_side_x_sticky",
|
||||||
|
@ -178,8 +178,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"sticky_north": "false",
|
"axis": "x",
|
||||||
"axis": "x"
|
"sticky_north": "false"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_x"
|
"model": "create:block/radial_chassis_side_x"
|
||||||
|
@ -187,8 +187,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"sticky_north": "false",
|
"axis": "y",
|
||||||
"axis": "y"
|
"sticky_north": "false"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_y",
|
"model": "create:block/radial_chassis_side_y",
|
||||||
|
@ -197,8 +197,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"sticky_north": "false",
|
"axis": "z",
|
||||||
"axis": "z"
|
"sticky_north": "false"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_x",
|
"model": "create:block/radial_chassis_side_x",
|
||||||
|
@ -207,8 +207,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"sticky_east": "true",
|
"axis": "x",
|
||||||
"axis": "x"
|
"sticky_east": "true"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_x_sticky",
|
"model": "create:block/radial_chassis_side_x_sticky",
|
||||||
|
@ -217,8 +217,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"sticky_east": "true",
|
"axis": "y",
|
||||||
"axis": "y"
|
"sticky_east": "true"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_y_sticky",
|
"model": "create:block/radial_chassis_side_y_sticky",
|
||||||
|
@ -227,8 +227,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"sticky_east": "true",
|
"axis": "z",
|
||||||
"axis": "z"
|
"sticky_east": "true"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_z_sticky"
|
"model": "create:block/radial_chassis_side_z_sticky"
|
||||||
|
@ -236,8 +236,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"sticky_east": "false",
|
"axis": "x",
|
||||||
"axis": "x"
|
"sticky_east": "false"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_x",
|
"model": "create:block/radial_chassis_side_x",
|
||||||
|
@ -246,8 +246,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"sticky_east": "false",
|
"axis": "y",
|
||||||
"axis": "y"
|
"sticky_east": "false"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_y",
|
"model": "create:block/radial_chassis_side_y",
|
||||||
|
@ -256,8 +256,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"sticky_east": "false",
|
"axis": "z",
|
||||||
"axis": "z"
|
"sticky_east": "false"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_z"
|
"model": "create:block/radial_chassis_side_z"
|
||||||
|
|
|
@ -678,12 +678,9 @@
|
||||||
"create.gui.adjustable_crate.title": "Adjustable Crate",
|
"create.gui.adjustable_crate.title": "Adjustable Crate",
|
||||||
"create.gui.adjustable_crate.storageSpace": "Storage Space",
|
"create.gui.adjustable_crate.storageSpace": "Storage Space",
|
||||||
"create.gui.stockpile_switch.title": "Stockpile Switch",
|
"create.gui.stockpile_switch.title": "Stockpile Switch",
|
||||||
"create.gui.stockpile_switch.lowerLimit": "Lower Threshold",
|
"create.gui.stockpile_switch.invert_signal": "Invert Signal",
|
||||||
"create.gui.stockpile_switch.upperLimit": "Upper Threshold",
|
"create.gui.stockpile_switch.move_to_lower_at": "Move to lower lane at %1$s%%",
|
||||||
"create.gui.stockpile_switch.startAt": "Start Signal at",
|
"create.gui.stockpile_switch.move_to_upper_at": "Move to upper lane at %1$s%%",
|
||||||
"create.gui.stockpile_switch.startAbove": "Start Signal above",
|
|
||||||
"create.gui.stockpile_switch.stopAt": "Stop Signal at",
|
|
||||||
"create.gui.stockpile_switch.stopBelow": "Stop Signal below",
|
|
||||||
"create.gui.sequenced_gearshift.title": "Sequenced Gearshift",
|
"create.gui.sequenced_gearshift.title": "Sequenced Gearshift",
|
||||||
"create.gui.sequenced_gearshift.instruction": "Instruction",
|
"create.gui.sequenced_gearshift.instruction": "Instruction",
|
||||||
"create.gui.sequenced_gearshift.instruction.turn_angle": "Turn",
|
"create.gui.sequenced_gearshift.instruction.turn_angle": "Turn",
|
||||||
|
@ -704,7 +701,8 @@
|
||||||
"create.schematicAndQuill.secondPos": "Second position set.",
|
"create.schematicAndQuill.secondPos": "Second position set.",
|
||||||
"create.schematicAndQuill.noTarget": "Hold [Ctrl] to select Air blocks.",
|
"create.schematicAndQuill.noTarget": "Hold [Ctrl] to select Air blocks.",
|
||||||
"create.schematicAndQuill.abort": "Removed selection.",
|
"create.schematicAndQuill.abort": "Removed selection.",
|
||||||
"create.schematicAndQuill.prompt": "Enter a name for the Schematic:",
|
"create.schematicAndQuill.title": "Schematic Name:",
|
||||||
|
"create.schematicAndQuill.convert": "Save and Deploy Immediately",
|
||||||
"create.schematicAndQuill.fallbackName": "My Schematic",
|
"create.schematicAndQuill.fallbackName": "My Schematic",
|
||||||
"create.schematicAndQuill.saved": "Saved as %1$s",
|
"create.schematicAndQuill.saved": "Saved as %1$s",
|
||||||
|
|
||||||
|
@ -751,28 +749,33 @@
|
||||||
"create.schematic.tool.flip.description.3": "",
|
"create.schematic.tool.flip.description.3": "",
|
||||||
|
|
||||||
"create.schematics.synchronizing": "Syncing...",
|
"create.schematics.synchronizing": "Syncing...",
|
||||||
"create.schematics.uploadTooLarge": "Your schematic is too big.",
|
"create.schematics.uploadTooLarge": "Your schematic exceeds limitations specified by the server.",
|
||||||
"create.schematics.maxAllowedSize": "The maximum allowed schematic file size is:",
|
"create.schematics.maxAllowedSize": "The maximum allowed schematic file size is:",
|
||||||
|
|
||||||
"create.gui.schematicTable.title": "Schematic Table",
|
"create.gui.schematicTable.title": "Schematic Table",
|
||||||
|
"create.gui.schematicTable.refresh": "Refresh Files",
|
||||||
|
"create.gui.schematicTable.open_folder": "Open Folder",
|
||||||
"create.gui.schematicTable.availableSchematics": "Available Schematics",
|
"create.gui.schematicTable.availableSchematics": "Available Schematics",
|
||||||
"create.gui.schematicTable.noSchematics": "No Schematics Saved",
|
"create.gui.schematicTable.noSchematics": "No Schematics Saved",
|
||||||
"create.gui.schematicTable.uploading": "Uploading...",
|
"create.gui.schematicTable.uploading": "Uploading...",
|
||||||
"create.gui.schematicTable.finished": "Upload Finished!",
|
"create.gui.schematicTable.finished": "Upload Finished!",
|
||||||
"create.gui.schematicannon.title": "Schematicannon",
|
"create.gui.schematicannon.title": "Schematicannon",
|
||||||
"create.gui.schematicannon.settingsTitle": "Placement Settings",
|
"create.gui.schematicannon.listPrinter": "Checklist Printer",
|
||||||
"create.gui.schematicannon.listPrinter": "Material List Printer",
|
|
||||||
"create.gui.schematicannon.gunpowderLevel": "Gunpowder at %1$s%%",
|
"create.gui.schematicannon.gunpowderLevel": "Gunpowder at %1$s%%",
|
||||||
"create.gui.schematicannon.shotsRemaining": "Shots left: %1$s",
|
"create.gui.schematicannon.shotsRemaining": "Shots left: %1$s",
|
||||||
"create.gui.schematicannon.shotsRemainingWithBackup": "With backup: %1$s",
|
"create.gui.schematicannon.shotsRemainingWithBackup": "With backup: %1$s",
|
||||||
"create.gui.schematicannon.optionEnabled": "Currently Enabled",
|
"create.gui.schematicannon.optionEnabled": "Currently Enabled",
|
||||||
"create.gui.schematicannon.optionDisabled": "Currently Disabled",
|
"create.gui.schematicannon.optionDisabled": "Currently Disabled",
|
||||||
|
"create.gui.schematicannon.showOptions": "Show Printer Settings",
|
||||||
"create.gui.schematicannon.option.dontReplaceSolid": "Don't Replace Solid Blocks",
|
"create.gui.schematicannon.option.dontReplaceSolid": "Don't Replace Solid Blocks",
|
||||||
"create.gui.schematicannon.option.replaceWithSolid": "Replace Solid with Solid",
|
"create.gui.schematicannon.option.replaceWithSolid": "Replace Solid with Solid",
|
||||||
"create.gui.schematicannon.option.replaceWithAny": "Replace Solid with Any",
|
"create.gui.schematicannon.option.replaceWithAny": "Replace Solid with Any",
|
||||||
"create.gui.schematicannon.option.replaceWithEmpty": "Replace Solid with Empty",
|
"create.gui.schematicannon.option.replaceWithEmpty": "Replace Solid with Empty",
|
||||||
"create.gui.schematicannon.option.skipMissing": "Skip missing Blocks",
|
"create.gui.schematicannon.option.skipMissing": "Skip missing Blocks",
|
||||||
"create.gui.schematicannon.option.skipTileEntities": "Protect Tile Entities",
|
"create.gui.schematicannon.option.skipTileEntities": "Protect Tile Entities",
|
||||||
|
"create.gui.schematicannon.slot.gunpowder": "Add gunpowder to fuel the cannon",
|
||||||
|
"create.gui.schematicannon.slot.listPrinter": "Place books here to print a Checklist for your Schematic",
|
||||||
|
"create.gui.schematicannon.slot.schematic": "Add your Schematic here. Make sure it is deployed at a specific location.",
|
||||||
"create.gui.schematicannon.option.skipMissing.description": "If the cannon cannot find a required Block for placement, it will continue at the next Location.",
|
"create.gui.schematicannon.option.skipMissing.description": "If the cannon cannot find a required Block for placement, it will continue at the next Location.",
|
||||||
"create.gui.schematicannon.option.skipTileEntities.description": "The cannon will avoid replacing data holding blocks such as Chests.",
|
"create.gui.schematicannon.option.skipTileEntities.description": "The cannon will avoid replacing data holding blocks such as Chests.",
|
||||||
"create.gui.schematicannon.option.dontReplaceSolid.description": "The cannon will never replace any Solid blocks in its working area, only non-Solid and Air.",
|
"create.gui.schematicannon.option.dontReplaceSolid.description": "The cannon will never replace any Solid blocks in its working area, only non-Solid and Air.",
|
||||||
|
@ -808,23 +811,42 @@
|
||||||
"create.gui.filter.ignore_data.description": "Items match regardless of their attributes.",
|
"create.gui.filter.ignore_data.description": "Items match regardless of their attributes.",
|
||||||
|
|
||||||
"create.item_attributes.placeable": "is placeable",
|
"create.item_attributes.placeable": "is placeable",
|
||||||
|
"create.item_attributes.placeable.inverted": "is not placeable",
|
||||||
"create.item_attributes.consumable": "can be eaten",
|
"create.item_attributes.consumable": "can be eaten",
|
||||||
|
"create.item_attributes.consumable.inverted": "cannot be eaten",
|
||||||
"create.item_attributes.smeltable": "can be Smelted",
|
"create.item_attributes.smeltable": "can be Smelted",
|
||||||
|
"create.item_attributes.smeltable.inverted": "cannot be Smelted",
|
||||||
"create.item_attributes.washable": "can be Washed",
|
"create.item_attributes.washable": "can be Washed",
|
||||||
|
"create.item_attributes.washable.inverted": "cannot be Washed",
|
||||||
"create.item_attributes.smokable": "can be Smoked",
|
"create.item_attributes.smokable": "can be Smoked",
|
||||||
|
"create.item_attributes.smokable.inverted": "cannot be Smoked",
|
||||||
|
"create.item_attributes.crushable": "can be Crushed",
|
||||||
|
"create.item_attributes.crushable.inverted": "cannot be Crushed",
|
||||||
"create.item_attributes.blastable": "is smeltable in Blast Furnace",
|
"create.item_attributes.blastable": "is smeltable in Blast Furnace",
|
||||||
|
"create.item_attributes.blastable.inverted": "is not smeltable in Blast Furnace",
|
||||||
"create.item_attributes.enchanted": "is enchanted",
|
"create.item_attributes.enchanted": "is enchanted",
|
||||||
|
"create.item_attributes.enchanted.inverted": "is unenchanted",
|
||||||
"create.item_attributes.damaged": "is damaged",
|
"create.item_attributes.damaged": "is damaged",
|
||||||
|
"create.item_attributes.damaged.inverted": "is not damaged",
|
||||||
"create.item_attributes.badly_damaged": "is heavily damaged",
|
"create.item_attributes.badly_damaged": "is heavily damaged",
|
||||||
|
"create.item_attributes.badly_damaged.inverted": "is not heavily damaged",
|
||||||
"create.item_attributes.not_stackable": "cannot stack",
|
"create.item_attributes.not_stackable": "cannot stack",
|
||||||
|
"create.item_attributes.not_stackable.inverted": "can be stacked",
|
||||||
"create.item_attributes.equipable": "can be equipped",
|
"create.item_attributes.equipable": "can be equipped",
|
||||||
|
"create.item_attributes.equipable.inverted": "cannot be equipped",
|
||||||
"create.item_attributes.furnace_fuel": "is furnace fuel",
|
"create.item_attributes.furnace_fuel": "is furnace fuel",
|
||||||
|
"create.item_attributes.furnace_fuel.inverted": "is not furnace fuel",
|
||||||
"create.item_attributes.in_tag": "is tagged %1$s",
|
"create.item_attributes.in_tag": "is tagged %1$s",
|
||||||
"create.item_attributes.in_item_group": "belongs to %1$s",
|
"create.item_attributes.in_tag.inverted": "is not tagged %1$s",
|
||||||
|
"create.item_attributes.in_item_group": "is in group '%1$s'",
|
||||||
|
"create.item_attributes.in_item_group.inverted": "is not in group '%1$s'",
|
||||||
"create.item_attributes.added_by": "was added by %1$s",
|
"create.item_attributes.added_by": "was added by %1$s",
|
||||||
|
"create.item_attributes.added_by.inverted": "was not added by %1$s",
|
||||||
|
|
||||||
"create.gui.attribute_filter.no_selected_attributes": "No attributes selected",
|
"create.gui.attribute_filter.no_selected_attributes": "No attributes selected",
|
||||||
"create.gui.attribute_filter.selected_attributes": "Selected attributes:",
|
"create.gui.attribute_filter.selected_attributes": "Selected attributes:",
|
||||||
|
"create.gui.attribute_filter.add_attribute": "Add attribute to List",
|
||||||
|
"create.gui.attribute_filter.add_inverted_attribute": "Add opposite attribute to List",
|
||||||
"create.gui.attribute_filter.whitelist_disjunctive": "Whitelist (Any)",
|
"create.gui.attribute_filter.whitelist_disjunctive": "Whitelist (Any)",
|
||||||
"create.gui.attribute_filter.whitelist_disjunctive.description": "Items pass if they have any of the selected attributes.",
|
"create.gui.attribute_filter.whitelist_disjunctive.description": "Items pass if they have any of the selected attributes.",
|
||||||
"create.gui.attribute_filter.whitelist_conjunctive": "Whitelist (All)",
|
"create.gui.attribute_filter.whitelist_conjunctive": "Whitelist (All)",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 823",
|
"_": "Missing Localizations: 853",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -679,12 +679,9 @@
|
||||||
"create.gui.adjustable_crate.title": "adjustable_crate",
|
"create.gui.adjustable_crate.title": "adjustable_crate",
|
||||||
"create.gui.adjustable_crate.storageSpace": "Lagerraum",
|
"create.gui.adjustable_crate.storageSpace": "Lagerraum",
|
||||||
"create.gui.stockpile_switch.title": "Vorratssensor",
|
"create.gui.stockpile_switch.title": "Vorratssensor",
|
||||||
"create.gui.stockpile_switch.lowerLimit": "Untergrenze",
|
"create.gui.stockpile_switch.invert_signal": "UNLOCALIZED: Invert Signal",
|
||||||
"create.gui.stockpile_switch.upperLimit": "Obergrenze",
|
"create.gui.stockpile_switch.move_to_lower_at": "UNLOCALIZED: Move to lower lane at %1$s%%",
|
||||||
"create.gui.stockpile_switch.startAt": "Signal bei",
|
"create.gui.stockpile_switch.move_to_upper_at": "UNLOCALIZED: Move to upper lane at %1$s%%",
|
||||||
"create.gui.stockpile_switch.startAbove": "Signal über",
|
|
||||||
"create.gui.stockpile_switch.stopAt": "Signalstopp bei",
|
|
||||||
"create.gui.stockpile_switch.stopBelow": "Signalstopp über",
|
|
||||||
"create.gui.sequenced_gearshift.title": "UNLOCALIZED: Sequenced Gearshift",
|
"create.gui.sequenced_gearshift.title": "UNLOCALIZED: Sequenced Gearshift",
|
||||||
"create.gui.sequenced_gearshift.instruction": "UNLOCALIZED: Instruction",
|
"create.gui.sequenced_gearshift.instruction": "UNLOCALIZED: Instruction",
|
||||||
"create.gui.sequenced_gearshift.instruction.turn_angle": "UNLOCALIZED: Turn",
|
"create.gui.sequenced_gearshift.instruction.turn_angle": "UNLOCALIZED: Turn",
|
||||||
|
@ -705,7 +702,8 @@
|
||||||
"create.schematicAndQuill.secondPos": "Zweite Position festgelegt.",
|
"create.schematicAndQuill.secondPos": "Zweite Position festgelegt.",
|
||||||
"create.schematicAndQuill.noTarget": "Halte [Strg] zur Auswahl von Luft.",
|
"create.schematicAndQuill.noTarget": "Halte [Strg] zur Auswahl von Luft.",
|
||||||
"create.schematicAndQuill.abort": "Auswahl zurückgesetzt.",
|
"create.schematicAndQuill.abort": "Auswahl zurückgesetzt.",
|
||||||
"create.schematicAndQuill.prompt": "Gib dem Bauplan einen Namen:",
|
"create.schematicAndQuill.title": "UNLOCALIZED: Schematic Name:",
|
||||||
|
"create.schematicAndQuill.convert": "UNLOCALIZED: Save and Deploy Immediately",
|
||||||
"create.schematicAndQuill.fallbackName": "Mein Bauplan",
|
"create.schematicAndQuill.fallbackName": "Mein Bauplan",
|
||||||
"create.schematicAndQuill.saved": "Gespeichert als %1$s",
|
"create.schematicAndQuill.saved": "Gespeichert als %1$s",
|
||||||
|
|
||||||
|
@ -756,24 +754,29 @@
|
||||||
"create.schematics.maxAllowedSize": "Die maximale Bauplan-Dateigröße ist:",
|
"create.schematics.maxAllowedSize": "Die maximale Bauplan-Dateigröße ist:",
|
||||||
|
|
||||||
"create.gui.schematicTable.title": "Bauplantisch",
|
"create.gui.schematicTable.title": "Bauplantisch",
|
||||||
|
"create.gui.schematicTable.refresh": "UNLOCALIZED: Refresh Files",
|
||||||
|
"create.gui.schematicTable.open_folder": "UNLOCALIZED: Open Folder",
|
||||||
"create.gui.schematicTable.availableSchematics": "Verfügbare Baupläne",
|
"create.gui.schematicTable.availableSchematics": "Verfügbare Baupläne",
|
||||||
"create.gui.schematicTable.noSchematics": "Keine gespeicherten Baupläne",
|
"create.gui.schematicTable.noSchematics": "Keine gespeicherten Baupläne",
|
||||||
"create.gui.schematicTable.uploading": "Hochladen...",
|
"create.gui.schematicTable.uploading": "Hochladen...",
|
||||||
"create.gui.schematicTable.finished": "Hochgeladen!",
|
"create.gui.schematicTable.finished": "Hochgeladen!",
|
||||||
"create.gui.schematicannon.title": "Bauplankanone",
|
"create.gui.schematicannon.title": "Bauplankanone",
|
||||||
"create.gui.schematicannon.settingsTitle": "Platzier-Optionen",
|
|
||||||
"create.gui.schematicannon.listPrinter": "Materiallistendruck",
|
"create.gui.schematicannon.listPrinter": "Materiallistendruck",
|
||||||
"create.gui.schematicannon.gunpowderLevel": "Schwarzpulver bei %1$s%%",
|
"create.gui.schematicannon.gunpowderLevel": "Schwarzpulver bei %1$s%%",
|
||||||
"create.gui.schematicannon.shotsRemaining": "%1$s Schuss übrig",
|
"create.gui.schematicannon.shotsRemaining": "%1$s Schuss übrig",
|
||||||
"create.gui.schematicannon.shotsRemainingWithBackup": "Mit Reserve: %1$s",
|
"create.gui.schematicannon.shotsRemainingWithBackup": "Mit Reserve: %1$s",
|
||||||
"create.gui.schematicannon.optionEnabled": "Aktiviert",
|
"create.gui.schematicannon.optionEnabled": "Aktiviert",
|
||||||
"create.gui.schematicannon.optionDisabled": "Deaktiviert",
|
"create.gui.schematicannon.optionDisabled": "Deaktiviert",
|
||||||
|
"create.gui.schematicannon.showOptions": "UNLOCALIZED: Show Printer Settings",
|
||||||
"create.gui.schematicannon.option.dontReplaceSolid": "Feste Blöcke nicht ersetzen",
|
"create.gui.schematicannon.option.dontReplaceSolid": "Feste Blöcke nicht ersetzen",
|
||||||
"create.gui.schematicannon.option.replaceWithSolid": "Feste Blöcke mit festen ersetzen",
|
"create.gui.schematicannon.option.replaceWithSolid": "Feste Blöcke mit festen ersetzen",
|
||||||
"create.gui.schematicannon.option.replaceWithAny": "Feste Blöcke immer ersetzen",
|
"create.gui.schematicannon.option.replaceWithAny": "Feste Blöcke immer ersetzen",
|
||||||
"create.gui.schematicannon.option.replaceWithEmpty": "Feste Blöcke mit Leere ersetzen",
|
"create.gui.schematicannon.option.replaceWithEmpty": "Feste Blöcke mit Leere ersetzen",
|
||||||
"create.gui.schematicannon.option.skipMissing": "Fehlende Blöcke ignorieren",
|
"create.gui.schematicannon.option.skipMissing": "Fehlende Blöcke ignorieren",
|
||||||
"create.gui.schematicannon.option.skipTileEntities": "Tile Entities ignorieren",
|
"create.gui.schematicannon.option.skipTileEntities": "Tile Entities ignorieren",
|
||||||
|
"create.gui.schematicannon.slot.gunpowder": "UNLOCALIZED: Add gunpowder to fuel the cannon",
|
||||||
|
"create.gui.schematicannon.slot.listPrinter": "UNLOCALIZED: Place books here to print a Checklist for your Schematic",
|
||||||
|
"create.gui.schematicannon.slot.schematic": "UNLOCALIZED: Add your Schematic here. Make sure it is deployed at a specific location.",
|
||||||
"create.gui.schematicannon.option.skipMissing.description": "Wenn die Bauplankanone einen benötigten Block nicht finden kann, wird sie einfach beim nächsten weiter machen.",
|
"create.gui.schematicannon.option.skipMissing.description": "Wenn die Bauplankanone einen benötigten Block nicht finden kann, wird sie einfach beim nächsten weiter machen.",
|
||||||
"create.gui.schematicannon.option.skipTileEntities.description": "Die Bauplankanone wird versuchen, Blöcke mit extra Daten, beispielsweise Truhen, nicht zu ersetzen.",
|
"create.gui.schematicannon.option.skipTileEntities.description": "Die Bauplankanone wird versuchen, Blöcke mit extra Daten, beispielsweise Truhen, nicht zu ersetzen.",
|
||||||
"create.gui.schematicannon.option.dontReplaceSolid.description": "Die Kanone wird ausschließlich nicht feste Blöcke und Luft in ihrem Arbeitsbereich ersetzen.",
|
"create.gui.schematicannon.option.dontReplaceSolid.description": "Die Kanone wird ausschließlich nicht feste Blöcke und Luft in ihrem Arbeitsbereich ersetzen.",
|
||||||
|
@ -809,23 +812,42 @@
|
||||||
"create.gui.filter.ignore_data.description": "UNLOCALIZED: Items match regardless of their attributes.",
|
"create.gui.filter.ignore_data.description": "UNLOCALIZED: Items match regardless of their attributes.",
|
||||||
|
|
||||||
"create.item_attributes.placeable": "UNLOCALIZED: is placeable",
|
"create.item_attributes.placeable": "UNLOCALIZED: is placeable",
|
||||||
|
"create.item_attributes.placeable.inverted": "UNLOCALIZED: is not placeable",
|
||||||
"create.item_attributes.consumable": "UNLOCALIZED: can be eaten",
|
"create.item_attributes.consumable": "UNLOCALIZED: can be eaten",
|
||||||
|
"create.item_attributes.consumable.inverted": "UNLOCALIZED: cannot be eaten",
|
||||||
"create.item_attributes.smeltable": "UNLOCALIZED: can be Smelted",
|
"create.item_attributes.smeltable": "UNLOCALIZED: can be Smelted",
|
||||||
|
"create.item_attributes.smeltable.inverted": "UNLOCALIZED: cannot be Smelted",
|
||||||
"create.item_attributes.washable": "UNLOCALIZED: can be Washed",
|
"create.item_attributes.washable": "UNLOCALIZED: can be Washed",
|
||||||
|
"create.item_attributes.washable.inverted": "UNLOCALIZED: cannot be Washed",
|
||||||
"create.item_attributes.smokable": "UNLOCALIZED: can be Smoked",
|
"create.item_attributes.smokable": "UNLOCALIZED: can be Smoked",
|
||||||
|
"create.item_attributes.smokable.inverted": "UNLOCALIZED: cannot be Smoked",
|
||||||
|
"create.item_attributes.crushable": "UNLOCALIZED: can be Crushed",
|
||||||
|
"create.item_attributes.crushable.inverted": "UNLOCALIZED: cannot be Crushed",
|
||||||
"create.item_attributes.blastable": "UNLOCALIZED: is smeltable in Blast Furnace",
|
"create.item_attributes.blastable": "UNLOCALIZED: is smeltable in Blast Furnace",
|
||||||
|
"create.item_attributes.blastable.inverted": "UNLOCALIZED: is not smeltable in Blast Furnace",
|
||||||
"create.item_attributes.enchanted": "UNLOCALIZED: is enchanted",
|
"create.item_attributes.enchanted": "UNLOCALIZED: is enchanted",
|
||||||
|
"create.item_attributes.enchanted.inverted": "UNLOCALIZED: is unenchanted",
|
||||||
"create.item_attributes.damaged": "UNLOCALIZED: is damaged",
|
"create.item_attributes.damaged": "UNLOCALIZED: is damaged",
|
||||||
|
"create.item_attributes.damaged.inverted": "UNLOCALIZED: is not damaged",
|
||||||
"create.item_attributes.badly_damaged": "UNLOCALIZED: is heavily damaged",
|
"create.item_attributes.badly_damaged": "UNLOCALIZED: is heavily damaged",
|
||||||
|
"create.item_attributes.badly_damaged.inverted": "UNLOCALIZED: is not heavily damaged",
|
||||||
"create.item_attributes.not_stackable": "UNLOCALIZED: cannot stack",
|
"create.item_attributes.not_stackable": "UNLOCALIZED: cannot stack",
|
||||||
|
"create.item_attributes.not_stackable.inverted": "UNLOCALIZED: can be stacked",
|
||||||
"create.item_attributes.equipable": "UNLOCALIZED: can be equipped",
|
"create.item_attributes.equipable": "UNLOCALIZED: can be equipped",
|
||||||
|
"create.item_attributes.equipable.inverted": "UNLOCALIZED: cannot be equipped",
|
||||||
"create.item_attributes.furnace_fuel": "UNLOCALIZED: is furnace fuel",
|
"create.item_attributes.furnace_fuel": "UNLOCALIZED: is furnace fuel",
|
||||||
|
"create.item_attributes.furnace_fuel.inverted": "UNLOCALIZED: is not furnace fuel",
|
||||||
"create.item_attributes.in_tag": "UNLOCALIZED: is tagged %1$s",
|
"create.item_attributes.in_tag": "UNLOCALIZED: is tagged %1$s",
|
||||||
"create.item_attributes.in_item_group": "UNLOCALIZED: belongs to %1$s",
|
"create.item_attributes.in_tag.inverted": "UNLOCALIZED: is not tagged %1$s",
|
||||||
|
"create.item_attributes.in_item_group": "UNLOCALIZED: is in group '%1$s'",
|
||||||
|
"create.item_attributes.in_item_group.inverted": "UNLOCALIZED: is not in group '%1$s'",
|
||||||
"create.item_attributes.added_by": "UNLOCALIZED: was added by %1$s",
|
"create.item_attributes.added_by": "UNLOCALIZED: was added by %1$s",
|
||||||
|
"create.item_attributes.added_by.inverted": "UNLOCALIZED: was not added by %1$s",
|
||||||
|
|
||||||
"create.gui.attribute_filter.no_selected_attributes": "UNLOCALIZED: No attributes selected",
|
"create.gui.attribute_filter.no_selected_attributes": "UNLOCALIZED: No attributes selected",
|
||||||
"create.gui.attribute_filter.selected_attributes": "UNLOCALIZED: Selected attributes:",
|
"create.gui.attribute_filter.selected_attributes": "UNLOCALIZED: Selected attributes:",
|
||||||
|
"create.gui.attribute_filter.add_attribute": "UNLOCALIZED: Add attribute to List",
|
||||||
|
"create.gui.attribute_filter.add_inverted_attribute": "UNLOCALIZED: Add opposite attribute to List",
|
||||||
"create.gui.attribute_filter.whitelist_disjunctive": "UNLOCALIZED: Whitelist (Any)",
|
"create.gui.attribute_filter.whitelist_disjunctive": "UNLOCALIZED: Whitelist (Any)",
|
||||||
"create.gui.attribute_filter.whitelist_disjunctive.description": "UNLOCALIZED: Items pass if they have any of the selected attributes.",
|
"create.gui.attribute_filter.whitelist_disjunctive.description": "UNLOCALIZED: Items pass if they have any of the selected attributes.",
|
||||||
"create.gui.attribute_filter.whitelist_conjunctive": "UNLOCALIZED: Whitelist (All)",
|
"create.gui.attribute_filter.whitelist_conjunctive": "UNLOCALIZED: Whitelist (All)",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 447",
|
"_": "Missing Localizations: 477",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -679,12 +679,9 @@
|
||||||
"create.gui.adjustable_crate.title": "Caisse réglable",
|
"create.gui.adjustable_crate.title": "Caisse réglable",
|
||||||
"create.gui.adjustable_crate.storageSpace": "Espace de stockage",
|
"create.gui.adjustable_crate.storageSpace": "Espace de stockage",
|
||||||
"create.gui.stockpile_switch.title": "Commutateur de stockage",
|
"create.gui.stockpile_switch.title": "Commutateur de stockage",
|
||||||
"create.gui.stockpile_switch.lowerLimit": "Seuil inférieur",
|
"create.gui.stockpile_switch.invert_signal": "UNLOCALIZED: Invert Signal",
|
||||||
"create.gui.stockpile_switch.upperLimit": "Seuil supérieur",
|
"create.gui.stockpile_switch.move_to_lower_at": "UNLOCALIZED: Move to lower lane at %1$s%%",
|
||||||
"create.gui.stockpile_switch.startAt": "Signal de départ à",
|
"create.gui.stockpile_switch.move_to_upper_at": "UNLOCALIZED: Move to upper lane at %1$s%%",
|
||||||
"create.gui.stockpile_switch.startAbove": "Signal de démarrage au-dessus",
|
|
||||||
"create.gui.stockpile_switch.stopAt": "Signal d'arrêt à",
|
|
||||||
"create.gui.stockpile_switch.stopBelow": "Signal d'arrêt en-dessous",
|
|
||||||
"create.gui.sequenced_gearshift.title": "Décaleur de rotation séquencé",
|
"create.gui.sequenced_gearshift.title": "Décaleur de rotation séquencé",
|
||||||
"create.gui.sequenced_gearshift.instruction": "Instructions",
|
"create.gui.sequenced_gearshift.instruction": "Instructions",
|
||||||
"create.gui.sequenced_gearshift.instruction.turn_angle": "Tourner",
|
"create.gui.sequenced_gearshift.instruction.turn_angle": "Tourner",
|
||||||
|
@ -705,7 +702,8 @@
|
||||||
"create.schematicAndQuill.secondPos": "Seconde position définie.",
|
"create.schematicAndQuill.secondPos": "Seconde position définie.",
|
||||||
"create.schematicAndQuill.noTarget": "Enfoncez [Ctrl] pour sélectionner les blocs d'air.",
|
"create.schematicAndQuill.noTarget": "Enfoncez [Ctrl] pour sélectionner les blocs d'air.",
|
||||||
"create.schematicAndQuill.abort": "Sélection supprimée.",
|
"create.schematicAndQuill.abort": "Sélection supprimée.",
|
||||||
"create.schematicAndQuill.prompt": "Entrez un nom pour le schéma:",
|
"create.schematicAndQuill.title": "UNLOCALIZED: Schematic Name:",
|
||||||
|
"create.schematicAndQuill.convert": "UNLOCALIZED: Save and Deploy Immediately",
|
||||||
"create.schematicAndQuill.fallbackName": "Mon schéma",
|
"create.schematicAndQuill.fallbackName": "Mon schéma",
|
||||||
"create.schematicAndQuill.saved": "Sauvegardé en tant que %1$s",
|
"create.schematicAndQuill.saved": "Sauvegardé en tant que %1$s",
|
||||||
|
|
||||||
|
@ -756,24 +754,29 @@
|
||||||
"create.schematics.maxAllowedSize": "La taille de fichier schématique maximale autorisée est:",
|
"create.schematics.maxAllowedSize": "La taille de fichier schématique maximale autorisée est:",
|
||||||
|
|
||||||
"create.gui.schematicTable.title": "Table à schéma",
|
"create.gui.schematicTable.title": "Table à schéma",
|
||||||
|
"create.gui.schematicTable.refresh": "UNLOCALIZED: Refresh Files",
|
||||||
|
"create.gui.schematicTable.open_folder": "UNLOCALIZED: Open Folder",
|
||||||
"create.gui.schematicTable.availableSchematics": "Schémas disponibles",
|
"create.gui.schematicTable.availableSchematics": "Schémas disponibles",
|
||||||
"create.gui.schematicTable.noSchematics": "Aucun schéma enregistré",
|
"create.gui.schematicTable.noSchematics": "Aucun schéma enregistré",
|
||||||
"create.gui.schematicTable.uploading": "Téléchargement...",
|
"create.gui.schematicTable.uploading": "Téléchargement...",
|
||||||
"create.gui.schematicTable.finished": "Téléchargement terminé!",
|
"create.gui.schematicTable.finished": "Téléchargement terminé!",
|
||||||
"create.gui.schematicannon.title": "Schémacanon",
|
"create.gui.schematicannon.title": "Schémacanon",
|
||||||
"create.gui.schematicannon.settingsTitle": "Options de placement",
|
|
||||||
"create.gui.schematicannon.listPrinter": "Imprimante de liste de matériaux",
|
"create.gui.schematicannon.listPrinter": "Imprimante de liste de matériaux",
|
||||||
"create.gui.schematicannon.gunpowderLevel": "Poudre à canon à %1$s%%",
|
"create.gui.schematicannon.gunpowderLevel": "Poudre à canon à %1$s%%",
|
||||||
"create.gui.schematicannon.shotsRemaining": "Tirs restants: %1$s",
|
"create.gui.schematicannon.shotsRemaining": "Tirs restants: %1$s",
|
||||||
"create.gui.schematicannon.shotsRemainingWithBackup": "Avec sauvegarde: %1$s",
|
"create.gui.schematicannon.shotsRemainingWithBackup": "Avec sauvegarde: %1$s",
|
||||||
"create.gui.schematicannon.optionEnabled": "Actuellement activé",
|
"create.gui.schematicannon.optionEnabled": "Actuellement activé",
|
||||||
"create.gui.schematicannon.optionDisabled": "Actuellement désactivé",
|
"create.gui.schematicannon.optionDisabled": "Actuellement désactivé",
|
||||||
|
"create.gui.schematicannon.showOptions": "UNLOCALIZED: Show Printer Settings",
|
||||||
"create.gui.schematicannon.option.dontReplaceSolid": "Ne remplacez pas les blocs solides",
|
"create.gui.schematicannon.option.dontReplaceSolid": "Ne remplacez pas les blocs solides",
|
||||||
"create.gui.schematicannon.option.replaceWithSolid": "Remplacer solide par solide",
|
"create.gui.schematicannon.option.replaceWithSolid": "Remplacer solide par solide",
|
||||||
"create.gui.schematicannon.option.replaceWithAny": "Remplacer le solide par n'importe quoi",
|
"create.gui.schematicannon.option.replaceWithAny": "Remplacer le solide par n'importe quoi",
|
||||||
"create.gui.schematicannon.option.replaceWithEmpty": "Remplacer le solide par rien",
|
"create.gui.schematicannon.option.replaceWithEmpty": "Remplacer le solide par rien",
|
||||||
"create.gui.schematicannon.option.skipMissing": "Ignorer les blocs manquants",
|
"create.gui.schematicannon.option.skipMissing": "Ignorer les blocs manquants",
|
||||||
"create.gui.schematicannon.option.skipTileEntities": "Protéger les Tile Entities",
|
"create.gui.schematicannon.option.skipTileEntities": "Protéger les Tile Entities",
|
||||||
|
"create.gui.schematicannon.slot.gunpowder": "UNLOCALIZED: Add gunpowder to fuel the cannon",
|
||||||
|
"create.gui.schematicannon.slot.listPrinter": "UNLOCALIZED: Place books here to print a Checklist for your Schematic",
|
||||||
|
"create.gui.schematicannon.slot.schematic": "UNLOCALIZED: Add your Schematic here. Make sure it is deployed at a specific location.",
|
||||||
"create.gui.schematicannon.option.skipMissing.description": "Si le canon ne peut pas trouver un bloc requis pour le placement, il continuera au prochain emplacement.",
|
"create.gui.schematicannon.option.skipMissing.description": "Si le canon ne peut pas trouver un bloc requis pour le placement, il continuera au prochain emplacement.",
|
||||||
"create.gui.schematicannon.option.skipTileEntities.description": "Le canon évitera de remplacer les blocs de stockage de données tels que les coffres.",
|
"create.gui.schematicannon.option.skipTileEntities.description": "Le canon évitera de remplacer les blocs de stockage de données tels que les coffres.",
|
||||||
"create.gui.schematicannon.option.dontReplaceSolid.description": "Le canon ne remplacera jamais les blocs solides dans sa zone de travail, seulement non solides et air.",
|
"create.gui.schematicannon.option.dontReplaceSolid.description": "Le canon ne remplacera jamais les blocs solides dans sa zone de travail, seulement non solides et air.",
|
||||||
|
@ -809,23 +812,42 @@
|
||||||
"create.gui.filter.ignore_data.description": "Les éléments correspondent indépendamment de leurs attributs.",
|
"create.gui.filter.ignore_data.description": "Les éléments correspondent indépendamment de leurs attributs.",
|
||||||
|
|
||||||
"create.item_attributes.placeable": "est placeable",
|
"create.item_attributes.placeable": "est placeable",
|
||||||
|
"create.item_attributes.placeable.inverted": "UNLOCALIZED: is not placeable",
|
||||||
"create.item_attributes.consumable": "peut être mangé",
|
"create.item_attributes.consumable": "peut être mangé",
|
||||||
|
"create.item_attributes.consumable.inverted": "UNLOCALIZED: cannot be eaten",
|
||||||
"create.item_attributes.smeltable": "UNLOCALIZED: can be Smelted",
|
"create.item_attributes.smeltable": "UNLOCALIZED: can be Smelted",
|
||||||
|
"create.item_attributes.smeltable.inverted": "UNLOCALIZED: cannot be Smelted",
|
||||||
"create.item_attributes.washable": "UNLOCALIZED: can be Washed",
|
"create.item_attributes.washable": "UNLOCALIZED: can be Washed",
|
||||||
|
"create.item_attributes.washable.inverted": "UNLOCALIZED: cannot be Washed",
|
||||||
"create.item_attributes.smokable": "UNLOCALIZED: can be Smoked",
|
"create.item_attributes.smokable": "UNLOCALIZED: can be Smoked",
|
||||||
|
"create.item_attributes.smokable.inverted": "UNLOCALIZED: cannot be Smoked",
|
||||||
|
"create.item_attributes.crushable": "UNLOCALIZED: can be Crushed",
|
||||||
|
"create.item_attributes.crushable.inverted": "UNLOCALIZED: cannot be Crushed",
|
||||||
"create.item_attributes.blastable": "UNLOCALIZED: is smeltable in Blast Furnace",
|
"create.item_attributes.blastable": "UNLOCALIZED: is smeltable in Blast Furnace",
|
||||||
|
"create.item_attributes.blastable.inverted": "UNLOCALIZED: is not smeltable in Blast Furnace",
|
||||||
"create.item_attributes.enchanted": "est enchanté",
|
"create.item_attributes.enchanted": "est enchanté",
|
||||||
|
"create.item_attributes.enchanted.inverted": "UNLOCALIZED: is unenchanted",
|
||||||
"create.item_attributes.damaged": "est endommagé",
|
"create.item_attributes.damaged": "est endommagé",
|
||||||
|
"create.item_attributes.damaged.inverted": "UNLOCALIZED: is not damaged",
|
||||||
"create.item_attributes.badly_damaged": "est fortement damaged",
|
"create.item_attributes.badly_damaged": "est fortement damaged",
|
||||||
|
"create.item_attributes.badly_damaged.inverted": "UNLOCALIZED: is not heavily damaged",
|
||||||
"create.item_attributes.not_stackable": "ne peut pas s'empiler",
|
"create.item_attributes.not_stackable": "ne peut pas s'empiler",
|
||||||
|
"create.item_attributes.not_stackable.inverted": "UNLOCALIZED: can be stacked",
|
||||||
"create.item_attributes.equipable": "peut être équipé",
|
"create.item_attributes.equipable": "peut être équipé",
|
||||||
|
"create.item_attributes.equipable.inverted": "UNLOCALIZED: cannot be equipped",
|
||||||
"create.item_attributes.furnace_fuel": "est du combustible",
|
"create.item_attributes.furnace_fuel": "est du combustible",
|
||||||
|
"create.item_attributes.furnace_fuel.inverted": "UNLOCALIZED: is not furnace fuel",
|
||||||
"create.item_attributes.in_tag": "est étiqueté %1$s",
|
"create.item_attributes.in_tag": "est étiqueté %1$s",
|
||||||
|
"create.item_attributes.in_tag.inverted": "UNLOCALIZED: is not tagged %1$s",
|
||||||
"create.item_attributes.in_item_group": "appartient à %1$s",
|
"create.item_attributes.in_item_group": "appartient à %1$s",
|
||||||
|
"create.item_attributes.in_item_group.inverted": "UNLOCALIZED: is not in group '%1$s'",
|
||||||
"create.item_attributes.added_by": "a été ajouté par %1$s",
|
"create.item_attributes.added_by": "a été ajouté par %1$s",
|
||||||
|
"create.item_attributes.added_by.inverted": "UNLOCALIZED: was not added by %1$s",
|
||||||
|
|
||||||
"create.gui.attribute_filter.no_selected_attributes": "Aucun attribut sélectionné",
|
"create.gui.attribute_filter.no_selected_attributes": "Aucun attribut sélectionné",
|
||||||
"create.gui.attribute_filter.selected_attributes": "Attributs sélectionnés:",
|
"create.gui.attribute_filter.selected_attributes": "Attributs sélectionnés:",
|
||||||
|
"create.gui.attribute_filter.add_attribute": "UNLOCALIZED: Add attribute to List",
|
||||||
|
"create.gui.attribute_filter.add_inverted_attribute": "UNLOCALIZED: Add opposite attribute to List",
|
||||||
"create.gui.attribute_filter.whitelist_disjunctive": "Liste blanche (n'importe)",
|
"create.gui.attribute_filter.whitelist_disjunctive": "Liste blanche (n'importe)",
|
||||||
"create.gui.attribute_filter.whitelist_disjunctive.description": "Les objets réussissent s'ils possèdent l'un des attributs sélectionnés.",
|
"create.gui.attribute_filter.whitelist_disjunctive.description": "Les objets réussissent s'ils possèdent l'un des attributs sélectionnés.",
|
||||||
"create.gui.attribute_filter.whitelist_conjunctive": "Liste blanche (tout)",
|
"create.gui.attribute_filter.whitelist_conjunctive": "Liste blanche (tout)",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 431",
|
"_": "Missing Localizations: 461",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -679,12 +679,9 @@
|
||||||
"create.gui.adjustable_crate.title": "Baule Regolabile",
|
"create.gui.adjustable_crate.title": "Baule Regolabile",
|
||||||
"create.gui.adjustable_crate.storageSpace": "Spazio di Immagazzinamento",
|
"create.gui.adjustable_crate.storageSpace": "Spazio di Immagazzinamento",
|
||||||
"create.gui.stockpile_switch.title": "Interruttore Accumulatore",
|
"create.gui.stockpile_switch.title": "Interruttore Accumulatore",
|
||||||
"create.gui.stockpile_switch.lowerLimit": "Soglia Inferiore",
|
"create.gui.stockpile_switch.invert_signal": "UNLOCALIZED: Invert Signal",
|
||||||
"create.gui.stockpile_switch.upperLimit": "Soglia Superiore",
|
"create.gui.stockpile_switch.move_to_lower_at": "UNLOCALIZED: Move to lower lane at %1$s%%",
|
||||||
"create.gui.stockpile_switch.startAt": "Inizia Segnale al",
|
"create.gui.stockpile_switch.move_to_upper_at": "UNLOCALIZED: Move to upper lane at %1$s%%",
|
||||||
"create.gui.stockpile_switch.startAbove": "Inizia il Segnale dop.",
|
|
||||||
"create.gui.stockpile_switch.stopAt": "Ferma Segnale al",
|
|
||||||
"create.gui.stockpile_switch.stopBelow": "Ferma il Segnale dop.",
|
|
||||||
"create.gui.sequenced_gearshift.title": "Cambio Sequenziale",
|
"create.gui.sequenced_gearshift.title": "Cambio Sequenziale",
|
||||||
"create.gui.sequenced_gearshift.instruction": "Istruzione",
|
"create.gui.sequenced_gearshift.instruction": "Istruzione",
|
||||||
"create.gui.sequenced_gearshift.instruction.turn_angle": "Gira",
|
"create.gui.sequenced_gearshift.instruction.turn_angle": "Gira",
|
||||||
|
@ -705,7 +702,8 @@
|
||||||
"create.schematicAndQuill.secondPos": "Seconda posizione impostata.",
|
"create.schematicAndQuill.secondPos": "Seconda posizione impostata.",
|
||||||
"create.schematicAndQuill.noTarget": "Premi [Ctrl] per selezionare il Blocco d'Aria.",
|
"create.schematicAndQuill.noTarget": "Premi [Ctrl] per selezionare il Blocco d'Aria.",
|
||||||
"create.schematicAndQuill.abort": "Selezione rimossa.",
|
"create.schematicAndQuill.abort": "Selezione rimossa.",
|
||||||
"create.schematicAndQuill.prompt": "Immettere un nome per lo schema:",
|
"create.schematicAndQuill.title": "UNLOCALIZED: Schematic Name:",
|
||||||
|
"create.schematicAndQuill.convert": "UNLOCALIZED: Save and Deploy Immediately",
|
||||||
"create.schematicAndQuill.fallbackName": "La mia Schematica",
|
"create.schematicAndQuill.fallbackName": "La mia Schematica",
|
||||||
"create.schematicAndQuill.saved": "Salvata come %1$s",
|
"create.schematicAndQuill.saved": "Salvata come %1$s",
|
||||||
|
|
||||||
|
@ -756,24 +754,29 @@
|
||||||
"create.schematics.maxAllowedSize": "La dimensione massima consentita del file schematica è:",
|
"create.schematics.maxAllowedSize": "La dimensione massima consentita del file schematica è:",
|
||||||
|
|
||||||
"create.gui.schematicTable.title": "Banco Schematico",
|
"create.gui.schematicTable.title": "Banco Schematico",
|
||||||
|
"create.gui.schematicTable.refresh": "UNLOCALIZED: Refresh Files",
|
||||||
|
"create.gui.schematicTable.open_folder": "UNLOCALIZED: Open Folder",
|
||||||
"create.gui.schematicTable.availableSchematics": "Schatiche disponibili",
|
"create.gui.schematicTable.availableSchematics": "Schatiche disponibili",
|
||||||
"create.gui.schematicTable.noSchematics": "Nessuna Schatica Salvata",
|
"create.gui.schematicTable.noSchematics": "Nessuna Schatica Salvata",
|
||||||
"create.gui.schematicTable.uploading": "Caricamento...",
|
"create.gui.schematicTable.uploading": "Caricamento...",
|
||||||
"create.gui.schematicTable.finished": "Caricamento Finito!",
|
"create.gui.schematicTable.finished": "Caricamento Finito!",
|
||||||
"create.gui.schematicannon.title": "Cannoneschematico",
|
"create.gui.schematicannon.title": "Cannoneschematico",
|
||||||
"create.gui.schematicannon.settingsTitle": "Impostazioni di Posizionamento",
|
|
||||||
"create.gui.schematicannon.listPrinter": "Stampante Lisra dei Materiali",
|
"create.gui.schematicannon.listPrinter": "Stampante Lisra dei Materiali",
|
||||||
"create.gui.schematicannon.gunpowderLevel": "Polvere da sparo al %1$s%%",
|
"create.gui.schematicannon.gunpowderLevel": "Polvere da sparo al %1$s%%",
|
||||||
"create.gui.schematicannon.shotsRemaining": "Spari Rimanenti: %1$s",
|
"create.gui.schematicannon.shotsRemaining": "Spari Rimanenti: %1$s",
|
||||||
"create.gui.schematicannon.shotsRemainingWithBackup": "Con il backup: %1$s",
|
"create.gui.schematicannon.shotsRemainingWithBackup": "Con il backup: %1$s",
|
||||||
"create.gui.schematicannon.optionEnabled": "Attualmente Abilitato",
|
"create.gui.schematicannon.optionEnabled": "Attualmente Abilitato",
|
||||||
"create.gui.schematicannon.optionDisabled": "Attualmente Disabilitato",
|
"create.gui.schematicannon.optionDisabled": "Attualmente Disabilitato",
|
||||||
|
"create.gui.schematicannon.showOptions": "UNLOCALIZED: Show Printer Settings",
|
||||||
"create.gui.schematicannon.option.dontReplaceSolid": "Non sostituire i Blocchi Solidi",
|
"create.gui.schematicannon.option.dontReplaceSolid": "Non sostituire i Blocchi Solidi",
|
||||||
"create.gui.schematicannon.option.replaceWithSolid": "Sostituisci Solidi con Solidi",
|
"create.gui.schematicannon.option.replaceWithSolid": "Sostituisci Solidi con Solidi",
|
||||||
"create.gui.schematicannon.option.replaceWithAny": "Sostituisci Solidi con Qualsiasi",
|
"create.gui.schematicannon.option.replaceWithAny": "Sostituisci Solidi con Qualsiasi",
|
||||||
"create.gui.schematicannon.option.replaceWithEmpty": "Sostituisci Solidi con il Vuoto",
|
"create.gui.schematicannon.option.replaceWithEmpty": "Sostituisci Solidi con il Vuoto",
|
||||||
"create.gui.schematicannon.option.skipMissing": "Salta i Blocchi Mancanti",
|
"create.gui.schematicannon.option.skipMissing": "Salta i Blocchi Mancanti",
|
||||||
"create.gui.schematicannon.option.skipTileEntities": "Proteggi i Blocchi Entità",
|
"create.gui.schematicannon.option.skipTileEntities": "Proteggi i Blocchi Entità",
|
||||||
|
"create.gui.schematicannon.slot.gunpowder": "UNLOCALIZED: Add gunpowder to fuel the cannon",
|
||||||
|
"create.gui.schematicannon.slot.listPrinter": "UNLOCALIZED: Place books here to print a Checklist for your Schematic",
|
||||||
|
"create.gui.schematicannon.slot.schematic": "UNLOCALIZED: Add your Schematic here. Make sure it is deployed at a specific location.",
|
||||||
"create.gui.schematicannon.option.skipMissing.description": "Se il cannone non riesce a trovare un blocco richiesto per il posizionamento, continuerà nella posizione successiva.",
|
"create.gui.schematicannon.option.skipMissing.description": "Se il cannone non riesce a trovare un blocco richiesto per il posizionamento, continuerà nella posizione successiva.",
|
||||||
"create.gui.schematicannon.option.skipTileEntities.description": "Il cannone eviterà di sostituire i blocchi di dati come bauli.",
|
"create.gui.schematicannon.option.skipTileEntities.description": "Il cannone eviterà di sostituire i blocchi di dati come bauli.",
|
||||||
"create.gui.schematicannon.option.dontReplaceSolid.description": "Il cannone non sostituirà mai alcun blocco Solido nella sua area di lavoro, solo non solidi e aria.",
|
"create.gui.schematicannon.option.dontReplaceSolid.description": "Il cannone non sostituirà mai alcun blocco Solido nella sua area di lavoro, solo non solidi e aria.",
|
||||||
|
@ -809,23 +812,42 @@
|
||||||
"create.gui.filter.ignore_data.description": "Gli oggetti corrispondono indipendentemente dai loro attributi.",
|
"create.gui.filter.ignore_data.description": "Gli oggetti corrispondono indipendentemente dai loro attributi.",
|
||||||
|
|
||||||
"create.item_attributes.placeable": "è posizionabile",
|
"create.item_attributes.placeable": "è posizionabile",
|
||||||
|
"create.item_attributes.placeable.inverted": "UNLOCALIZED: is not placeable",
|
||||||
"create.item_attributes.consumable": "può essere mangiato",
|
"create.item_attributes.consumable": "può essere mangiato",
|
||||||
|
"create.item_attributes.consumable.inverted": "UNLOCALIZED: cannot be eaten",
|
||||||
"create.item_attributes.smeltable": "può essere Fuso",
|
"create.item_attributes.smeltable": "può essere Fuso",
|
||||||
|
"create.item_attributes.smeltable.inverted": "UNLOCALIZED: cannot be Smelted",
|
||||||
"create.item_attributes.washable": "può essere Lavato",
|
"create.item_attributes.washable": "può essere Lavato",
|
||||||
|
"create.item_attributes.washable.inverted": "UNLOCALIZED: cannot be Washed",
|
||||||
"create.item_attributes.smokable": "può essere Affumicato",
|
"create.item_attributes.smokable": "può essere Affumicato",
|
||||||
|
"create.item_attributes.smokable.inverted": "UNLOCALIZED: cannot be Smoked",
|
||||||
|
"create.item_attributes.crushable": "UNLOCALIZED: can be Crushed",
|
||||||
|
"create.item_attributes.crushable.inverted": "UNLOCALIZED: cannot be Crushed",
|
||||||
"create.item_attributes.blastable": "è fondibile in un Forno fusorio",
|
"create.item_attributes.blastable": "è fondibile in un Forno fusorio",
|
||||||
|
"create.item_attributes.blastable.inverted": "UNLOCALIZED: is not smeltable in Blast Furnace",
|
||||||
"create.item_attributes.enchanted": "è incantato",
|
"create.item_attributes.enchanted": "è incantato",
|
||||||
|
"create.item_attributes.enchanted.inverted": "UNLOCALIZED: is unenchanted",
|
||||||
"create.item_attributes.damaged": "è danneggiato",
|
"create.item_attributes.damaged": "è danneggiato",
|
||||||
|
"create.item_attributes.damaged.inverted": "UNLOCALIZED: is not damaged",
|
||||||
"create.item_attributes.badly_damaged": "è gravemente danneggiato",
|
"create.item_attributes.badly_damaged": "è gravemente danneggiato",
|
||||||
|
"create.item_attributes.badly_damaged.inverted": "UNLOCALIZED: is not heavily damaged",
|
||||||
"create.item_attributes.not_stackable": "non impilabile",
|
"create.item_attributes.not_stackable": "non impilabile",
|
||||||
|
"create.item_attributes.not_stackable.inverted": "UNLOCALIZED: can be stacked",
|
||||||
"create.item_attributes.equipable": "può essere equipaggiato",
|
"create.item_attributes.equipable": "può essere equipaggiato",
|
||||||
|
"create.item_attributes.equipable.inverted": "UNLOCALIZED: cannot be equipped",
|
||||||
"create.item_attributes.furnace_fuel": "è il combustibile della fornace",
|
"create.item_attributes.furnace_fuel": "è il combustibile della fornace",
|
||||||
|
"create.item_attributes.furnace_fuel.inverted": "UNLOCALIZED: is not furnace fuel",
|
||||||
"create.item_attributes.in_tag": "è etichettato %1$s",
|
"create.item_attributes.in_tag": "è etichettato %1$s",
|
||||||
|
"create.item_attributes.in_tag.inverted": "UNLOCALIZED: is not tagged %1$s",
|
||||||
"create.item_attributes.in_item_group": "appartiene a %1$s",
|
"create.item_attributes.in_item_group": "appartiene a %1$s",
|
||||||
|
"create.item_attributes.in_item_group.inverted": "UNLOCALIZED: is not in group '%1$s'",
|
||||||
"create.item_attributes.added_by": "è stato aggiunto da %1$s",
|
"create.item_attributes.added_by": "è stato aggiunto da %1$s",
|
||||||
|
"create.item_attributes.added_by.inverted": "UNLOCALIZED: was not added by %1$s",
|
||||||
|
|
||||||
"create.gui.attribute_filter.no_selected_attributes": "Nessun attributo selezionato",
|
"create.gui.attribute_filter.no_selected_attributes": "Nessun attributo selezionato",
|
||||||
"create.gui.attribute_filter.selected_attributes": "Attributi selezionati:",
|
"create.gui.attribute_filter.selected_attributes": "Attributi selezionati:",
|
||||||
|
"create.gui.attribute_filter.add_attribute": "UNLOCALIZED: Add attribute to List",
|
||||||
|
"create.gui.attribute_filter.add_inverted_attribute": "UNLOCALIZED: Add opposite attribute to List",
|
||||||
"create.gui.attribute_filter.whitelist_disjunctive": "Lista Bianca (Qualsiasi)",
|
"create.gui.attribute_filter.whitelist_disjunctive": "Lista Bianca (Qualsiasi)",
|
||||||
"create.gui.attribute_filter.whitelist_disjunctive.description": "Gli oggetti passano se hanno uno degli attributi selezionati.",
|
"create.gui.attribute_filter.whitelist_disjunctive.description": "Gli oggetti passano se hanno uno degli attributi selezionati.",
|
||||||
"create.gui.attribute_filter.whitelist_conjunctive": "Lista Bianca (Tutti)",
|
"create.gui.attribute_filter.whitelist_conjunctive": "Lista Bianca (Tutti)",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 426",
|
"_": "Missing Localizations: 456",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -679,12 +679,9 @@
|
||||||
"create.gui.adjustable_crate.title": "調整可能なクレート",
|
"create.gui.adjustable_crate.title": "調整可能なクレート",
|
||||||
"create.gui.adjustable_crate.storageSpace": "収納スペース",
|
"create.gui.adjustable_crate.storageSpace": "収納スペース",
|
||||||
"create.gui.stockpile_switch.title": "在庫スイッチ",
|
"create.gui.stockpile_switch.title": "在庫スイッチ",
|
||||||
"create.gui.stockpile_switch.lowerLimit": "下限しきい値",
|
"create.gui.stockpile_switch.invert_signal": "UNLOCALIZED: Invert Signal",
|
||||||
"create.gui.stockpile_switch.upperLimit": "上限しきい値",
|
"create.gui.stockpile_switch.move_to_lower_at": "UNLOCALIZED: Move to lower lane at %1$s%%",
|
||||||
"create.gui.stockpile_switch.startAt": "開始信号",
|
"create.gui.stockpile_switch.move_to_upper_at": "UNLOCALIZED: Move to upper lane at %1$s%%",
|
||||||
"create.gui.stockpile_switch.startAbove": "以上の開始信号",
|
|
||||||
"create.gui.stockpile_switch.stopAt": "停止信号",
|
|
||||||
"create.gui.stockpile_switch.stopBelow": "以下の停止信号",
|
|
||||||
"create.gui.sequenced_gearshift.title": "シーケンスギアシフト",
|
"create.gui.sequenced_gearshift.title": "シーケンスギアシフト",
|
||||||
"create.gui.sequenced_gearshift.instruction": "命令",
|
"create.gui.sequenced_gearshift.instruction": "命令",
|
||||||
"create.gui.sequenced_gearshift.instruction.turn_angle": "回転",
|
"create.gui.sequenced_gearshift.instruction.turn_angle": "回転",
|
||||||
|
@ -705,7 +702,8 @@
|
||||||
"create.schematicAndQuill.secondPos": "2番目の位置セット。",
|
"create.schematicAndQuill.secondPos": "2番目の位置セット。",
|
||||||
"create.schematicAndQuill.noTarget": "[Ctrl] を押したままで空気ブロックを選択します",
|
"create.schematicAndQuill.noTarget": "[Ctrl] を押したままで空気ブロックを選択します",
|
||||||
"create.schematicAndQuill.abort": "選択を削除しました。",
|
"create.schematicAndQuill.abort": "選択を削除しました。",
|
||||||
"create.schematicAndQuill.prompt": "概略図の名前を入力してください:",
|
"create.schematicAndQuill.title": "UNLOCALIZED: Schematic Name:",
|
||||||
|
"create.schematicAndQuill.convert": "UNLOCALIZED: Save and Deploy Immediately",
|
||||||
"create.schematicAndQuill.fallbackName": "My Schematic",
|
"create.schematicAndQuill.fallbackName": "My Schematic",
|
||||||
"create.schematicAndQuill.saved": "%1$s として保存しました",
|
"create.schematicAndQuill.saved": "%1$s として保存しました",
|
||||||
|
|
||||||
|
@ -756,24 +754,29 @@
|
||||||
"create.schematics.maxAllowedSize": "最大許容概略図ファイルサイズは:",
|
"create.schematics.maxAllowedSize": "最大許容概略図ファイルサイズは:",
|
||||||
|
|
||||||
"create.gui.schematicTable.title": "概略図テーブル",
|
"create.gui.schematicTable.title": "概略図テーブル",
|
||||||
|
"create.gui.schematicTable.refresh": "UNLOCALIZED: Refresh Files",
|
||||||
|
"create.gui.schematicTable.open_folder": "UNLOCALIZED: Open Folder",
|
||||||
"create.gui.schematicTable.availableSchematics": "利用可能な概略図",
|
"create.gui.schematicTable.availableSchematics": "利用可能な概略図",
|
||||||
"create.gui.schematicTable.noSchematics": "保存された概略図はありません",
|
"create.gui.schematicTable.noSchematics": "保存された概略図はありません",
|
||||||
"create.gui.schematicTable.uploading": "アップロードしています...",
|
"create.gui.schematicTable.uploading": "アップロードしています...",
|
||||||
"create.gui.schematicTable.finished": "アップロードが完了しました!",
|
"create.gui.schematicTable.finished": "アップロードが完了しました!",
|
||||||
"create.gui.schematicannon.title": "概略図砲",
|
"create.gui.schematicannon.title": "概略図砲",
|
||||||
"create.gui.schematicannon.settingsTitle": "配置設定",
|
|
||||||
"create.gui.schematicannon.listPrinter": "材料リストプリンター",
|
"create.gui.schematicannon.listPrinter": "材料リストプリンター",
|
||||||
"create.gui.schematicannon.gunpowderLevel": "火薬はあと %1$s%% 残っています",
|
"create.gui.schematicannon.gunpowderLevel": "火薬はあと %1$s%% 残っています",
|
||||||
"create.gui.schematicannon.shotsRemaining": "残りのショット数: %1$s",
|
"create.gui.schematicannon.shotsRemaining": "残りのショット数: %1$s",
|
||||||
"create.gui.schematicannon.shotsRemainingWithBackup": "バックアップあり: %1$s",
|
"create.gui.schematicannon.shotsRemainingWithBackup": "バックアップあり: %1$s",
|
||||||
"create.gui.schematicannon.optionEnabled": "現在有効",
|
"create.gui.schematicannon.optionEnabled": "現在有効",
|
||||||
"create.gui.schematicannon.optionDisabled": "現在無効",
|
"create.gui.schematicannon.optionDisabled": "現在無効",
|
||||||
|
"create.gui.schematicannon.showOptions": "UNLOCALIZED: Show Printer Settings",
|
||||||
"create.gui.schematicannon.option.dontReplaceSolid": "固体ブロックを置き換えない",
|
"create.gui.schematicannon.option.dontReplaceSolid": "固体ブロックを置き換えない",
|
||||||
"create.gui.schematicannon.option.replaceWithSolid": "固体を固体に置き換える",
|
"create.gui.schematicannon.option.replaceWithSolid": "固体を固体に置き換える",
|
||||||
"create.gui.schematicannon.option.replaceWithAny": "固体を任意のものに置き換える",
|
"create.gui.schematicannon.option.replaceWithAny": "固体を任意のものに置き換える",
|
||||||
"create.gui.schematicannon.option.replaceWithEmpty": "空の固体と交換",
|
"create.gui.schematicannon.option.replaceWithEmpty": "空の固体と交換",
|
||||||
"create.gui.schematicannon.option.skipMissing": "不足しているブロックをスキップ",
|
"create.gui.schematicannon.option.skipMissing": "不足しているブロックをスキップ",
|
||||||
"create.gui.schematicannon.option.skipTileEntities": "タイルエンティティを保護する",
|
"create.gui.schematicannon.option.skipTileEntities": "タイルエンティティを保護する",
|
||||||
|
"create.gui.schematicannon.slot.gunpowder": "UNLOCALIZED: Add gunpowder to fuel the cannon",
|
||||||
|
"create.gui.schematicannon.slot.listPrinter": "UNLOCALIZED: Place books here to print a Checklist for your Schematic",
|
||||||
|
"create.gui.schematicannon.slot.schematic": "UNLOCALIZED: Add your Schematic here. Make sure it is deployed at a specific location.",
|
||||||
"create.gui.schematicannon.option.skipMissing.description": "大砲が配置に必要なブロックを見つけられない場合、次の場所に進みます。",
|
"create.gui.schematicannon.option.skipMissing.description": "大砲が配置に必要なブロックを見つけられない場合、次の場所に進みます。",
|
||||||
"create.gui.schematicannon.option.skipTileEntities.description": "大砲は、チェストなどのデータ保持ブロックの交換を回避します。",
|
"create.gui.schematicannon.option.skipTileEntities.description": "大砲は、チェストなどのデータ保持ブロックの交換を回避します。",
|
||||||
"create.gui.schematicannon.option.dontReplaceSolid.description": "大砲は、その作業領域の固体ブロックを置き換えることはなく、非固体と空気のみを置き換えます。",
|
"create.gui.schematicannon.option.dontReplaceSolid.description": "大砲は、その作業領域の固体ブロックを置き換えることはなく、非固体と空気のみを置き換えます。",
|
||||||
|
@ -809,23 +812,42 @@
|
||||||
"create.gui.filter.ignore_data.description": "アイテムは属性に関係なく一致します。",
|
"create.gui.filter.ignore_data.description": "アイテムは属性に関係なく一致します。",
|
||||||
|
|
||||||
"create.item_attributes.placeable": "設置可能か",
|
"create.item_attributes.placeable": "設置可能か",
|
||||||
|
"create.item_attributes.placeable.inverted": "UNLOCALIZED: is not placeable",
|
||||||
"create.item_attributes.consumable": "食べられるか",
|
"create.item_attributes.consumable": "食べられるか",
|
||||||
|
"create.item_attributes.consumable.inverted": "UNLOCALIZED: cannot be eaten",
|
||||||
"create.item_attributes.smeltable": "精錬可能か",
|
"create.item_attributes.smeltable": "精錬可能か",
|
||||||
|
"create.item_attributes.smeltable.inverted": "UNLOCALIZED: cannot be Smelted",
|
||||||
"create.item_attributes.washable": "洗えるか",
|
"create.item_attributes.washable": "洗えるか",
|
||||||
|
"create.item_attributes.washable.inverted": "UNLOCALIZED: cannot be Washed",
|
||||||
"create.item_attributes.smokable": "燻製可能か",
|
"create.item_attributes.smokable": "燻製可能か",
|
||||||
|
"create.item_attributes.smokable.inverted": "UNLOCALIZED: cannot be Smoked",
|
||||||
|
"create.item_attributes.crushable": "UNLOCALIZED: can be Crushed",
|
||||||
|
"create.item_attributes.crushable.inverted": "UNLOCALIZED: cannot be Crushed",
|
||||||
"create.item_attributes.blastable": "高炉で製錬可能か",
|
"create.item_attributes.blastable": "高炉で製錬可能か",
|
||||||
|
"create.item_attributes.blastable.inverted": "UNLOCALIZED: is not smeltable in Blast Furnace",
|
||||||
"create.item_attributes.enchanted": "エンチャント済みか",
|
"create.item_attributes.enchanted": "エンチャント済みか",
|
||||||
|
"create.item_attributes.enchanted.inverted": "UNLOCALIZED: is unenchanted",
|
||||||
"create.item_attributes.damaged": "破損してるか",
|
"create.item_attributes.damaged": "破損してるか",
|
||||||
|
"create.item_attributes.damaged.inverted": "UNLOCALIZED: is not damaged",
|
||||||
"create.item_attributes.badly_damaged": "ひどく損傷してるか",
|
"create.item_attributes.badly_damaged": "ひどく損傷してるか",
|
||||||
|
"create.item_attributes.badly_damaged.inverted": "UNLOCALIZED: is not heavily damaged",
|
||||||
"create.item_attributes.not_stackable": "スタック可能か",
|
"create.item_attributes.not_stackable": "スタック可能か",
|
||||||
|
"create.item_attributes.not_stackable.inverted": "UNLOCALIZED: can be stacked",
|
||||||
"create.item_attributes.equipable": "装備可能か",
|
"create.item_attributes.equipable": "装備可能か",
|
||||||
|
"create.item_attributes.equipable.inverted": "UNLOCALIZED: cannot be equipped",
|
||||||
"create.item_attributes.furnace_fuel": "かまどの燃料か",
|
"create.item_attributes.furnace_fuel": "かまどの燃料か",
|
||||||
|
"create.item_attributes.furnace_fuel.inverted": "UNLOCALIZED: is not furnace fuel",
|
||||||
"create.item_attributes.in_tag": "%1$s のタグが付けられてるか",
|
"create.item_attributes.in_tag": "%1$s のタグが付けられてるか",
|
||||||
|
"create.item_attributes.in_tag.inverted": "UNLOCALIZED: is not tagged %1$s",
|
||||||
"create.item_attributes.in_item_group": "%1$s に属してるか",
|
"create.item_attributes.in_item_group": "%1$s に属してるか",
|
||||||
|
"create.item_attributes.in_item_group.inverted": "UNLOCALIZED: is not in group '%1$s'",
|
||||||
"create.item_attributes.added_by": "%1$s によって追加されたか",
|
"create.item_attributes.added_by": "%1$s によって追加されたか",
|
||||||
|
"create.item_attributes.added_by.inverted": "UNLOCALIZED: was not added by %1$s",
|
||||||
|
|
||||||
"create.gui.attribute_filter.no_selected_attributes": "属性が選択されていません",
|
"create.gui.attribute_filter.no_selected_attributes": "属性が選択されていません",
|
||||||
"create.gui.attribute_filter.selected_attributes": "選択された属性:",
|
"create.gui.attribute_filter.selected_attributes": "選択された属性:",
|
||||||
|
"create.gui.attribute_filter.add_attribute": "UNLOCALIZED: Add attribute to List",
|
||||||
|
"create.gui.attribute_filter.add_inverted_attribute": "UNLOCALIZED: Add opposite attribute to List",
|
||||||
"create.gui.attribute_filter.whitelist_disjunctive": "ホワイトリスト(どれか)",
|
"create.gui.attribute_filter.whitelist_disjunctive": "ホワイトリスト(どれか)",
|
||||||
"create.gui.attribute_filter.whitelist_disjunctive.description": "選択した属性のいずれかを持っている場合、アイテムは通り抜けます。",
|
"create.gui.attribute_filter.whitelist_disjunctive.description": "選択した属性のいずれかを持っている場合、アイテムは通り抜けます。",
|
||||||
"create.gui.attribute_filter.whitelist_conjunctive": "ホワイトリスト(全て)",
|
"create.gui.attribute_filter.whitelist_conjunctive": "ホワイトリスト(全て)",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 431",
|
"_": "Missing Localizations: 461",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -679,12 +679,9 @@
|
||||||
"create.gui.adjustable_crate.title": "가변 창고 ",
|
"create.gui.adjustable_crate.title": "가변 창고 ",
|
||||||
"create.gui.adjustable_crate.storageSpace": "저장 공간",
|
"create.gui.adjustable_crate.storageSpace": "저장 공간",
|
||||||
"create.gui.stockpile_switch.title": "수량 스위치",
|
"create.gui.stockpile_switch.title": "수량 스위치",
|
||||||
"create.gui.stockpile_switch.lowerLimit": "최소 신호 유지수량",
|
"create.gui.stockpile_switch.invert_signal": "UNLOCALIZED: Invert Signal",
|
||||||
"create.gui.stockpile_switch.upperLimit": "최초 신호 발동수량",
|
"create.gui.stockpile_switch.move_to_lower_at": "UNLOCALIZED: Move to lower lane at %1$s%%",
|
||||||
"create.gui.stockpile_switch.startAt": "다음 수량에 신호 주기",
|
"create.gui.stockpile_switch.move_to_upper_at": "UNLOCALIZED: Move to upper lane at %1$s%%",
|
||||||
"create.gui.stockpile_switch.startAbove": "다음 수량이상일떄 신호 주기",
|
|
||||||
"create.gui.stockpile_switch.stopAt": "다음 수량에 신호 멈추기",
|
|
||||||
"create.gui.stockpile_switch.stopBelow": "다음 수량이하일때 신호 멈추기",
|
|
||||||
"create.gui.sequenced_gearshift.title": "순서 기어쉬프트",
|
"create.gui.sequenced_gearshift.title": "순서 기어쉬프트",
|
||||||
"create.gui.sequenced_gearshift.instruction": "설명",
|
"create.gui.sequenced_gearshift.instruction": "설명",
|
||||||
"create.gui.sequenced_gearshift.instruction.turn_angle": "회전",
|
"create.gui.sequenced_gearshift.instruction.turn_angle": "회전",
|
||||||
|
@ -705,7 +702,8 @@
|
||||||
"create.schematicAndQuill.secondPos": "두번째 위치 지정됨.",
|
"create.schematicAndQuill.secondPos": "두번째 위치 지정됨.",
|
||||||
"create.schematicAndQuill.noTarget": "[Ctrl]을 눌러 공기 블럭을 선택하기.",
|
"create.schematicAndQuill.noTarget": "[Ctrl]을 눌러 공기 블럭을 선택하기.",
|
||||||
"create.schematicAndQuill.abort": "위치 제거됨.",
|
"create.schematicAndQuill.abort": "위치 제거됨.",
|
||||||
"create.schematicAndQuill.prompt": "청사진의 제목을 작성하기:",
|
"create.schematicAndQuill.title": "UNLOCALIZED: Schematic Name:",
|
||||||
|
"create.schematicAndQuill.convert": "UNLOCALIZED: Save and Deploy Immediately",
|
||||||
"create.schematicAndQuill.fallbackName": "내 청사진",
|
"create.schematicAndQuill.fallbackName": "내 청사진",
|
||||||
"create.schematicAndQuill.saved": "%1$s로 저장됨",
|
"create.schematicAndQuill.saved": "%1$s로 저장됨",
|
||||||
|
|
||||||
|
@ -756,24 +754,29 @@
|
||||||
"create.schematics.maxAllowedSize": "최대 청사진 파일 크기는:",
|
"create.schematics.maxAllowedSize": "최대 청사진 파일 크기는:",
|
||||||
|
|
||||||
"create.gui.schematicTable.title": "청사진 테이블",
|
"create.gui.schematicTable.title": "청사진 테이블",
|
||||||
|
"create.gui.schematicTable.refresh": "UNLOCALIZED: Refresh Files",
|
||||||
|
"create.gui.schematicTable.open_folder": "UNLOCALIZED: Open Folder",
|
||||||
"create.gui.schematicTable.availableSchematics": "이용가능한 청사진",
|
"create.gui.schematicTable.availableSchematics": "이용가능한 청사진",
|
||||||
"create.gui.schematicTable.noSchematics": "저장된 청사진 없음",
|
"create.gui.schematicTable.noSchematics": "저장된 청사진 없음",
|
||||||
"create.gui.schematicTable.uploading": "업로딩 중...",
|
"create.gui.schematicTable.uploading": "업로딩 중...",
|
||||||
"create.gui.schematicTable.finished": "업로드 완료!",
|
"create.gui.schematicTable.finished": "업로드 완료!",
|
||||||
"create.gui.schematicannon.title": "청사진 대포",
|
"create.gui.schematicannon.title": "청사진 대포",
|
||||||
"create.gui.schematicannon.settingsTitle": "설치 설정",
|
|
||||||
"create.gui.schematicannon.listPrinter": "재료 목록 프린터",
|
"create.gui.schematicannon.listPrinter": "재료 목록 프린터",
|
||||||
"create.gui.schematicannon.gunpowderLevel": "화약 용량 %1$s%%",
|
"create.gui.schematicannon.gunpowderLevel": "화약 용량 %1$s%%",
|
||||||
"create.gui.schematicannon.shotsRemaining": "남은 발포 수 : %1$s",
|
"create.gui.schematicannon.shotsRemaining": "남은 발포 수 : %1$s",
|
||||||
"create.gui.schematicannon.shotsRemainingWithBackup": "화약 여분: %1$s",
|
"create.gui.schematicannon.shotsRemainingWithBackup": "화약 여분: %1$s",
|
||||||
"create.gui.schematicannon.optionEnabled": "현재 활성화 됨",
|
"create.gui.schematicannon.optionEnabled": "현재 활성화 됨",
|
||||||
"create.gui.schematicannon.optionDisabled": "현재 비활성화 됨",
|
"create.gui.schematicannon.optionDisabled": "현재 비활성화 됨",
|
||||||
|
"create.gui.schematicannon.showOptions": "UNLOCALIZED: Show Printer Settings",
|
||||||
"create.gui.schematicannon.option.dontReplaceSolid": "온전한 블럭을 대체하지 않음",
|
"create.gui.schematicannon.option.dontReplaceSolid": "온전한 블럭을 대체하지 않음",
|
||||||
"create.gui.schematicannon.option.replaceWithSolid": "온전한 블럭을 재료로 대체함",
|
"create.gui.schematicannon.option.replaceWithSolid": "온전한 블럭을 재료로 대체함",
|
||||||
"create.gui.schematicannon.option.replaceWithAny": "온전한 블럭을 아무 재료로 대체함",
|
"create.gui.schematicannon.option.replaceWithAny": "온전한 블럭을 아무 재료로 대체함",
|
||||||
"create.gui.schematicannon.option.replaceWithEmpty": "온전한 블럭을 공기로 채움",
|
"create.gui.schematicannon.option.replaceWithEmpty": "온전한 블럭을 공기로 채움",
|
||||||
"create.gui.schematicannon.option.skipMissing": "부족한 블럭을 무시하고 진행",
|
"create.gui.schematicannon.option.skipMissing": "부족한 블럭을 무시하고 진행",
|
||||||
"create.gui.schematicannon.option.skipTileEntities": "타일 엔티티를 보호",
|
"create.gui.schematicannon.option.skipTileEntities": "타일 엔티티를 보호",
|
||||||
|
"create.gui.schematicannon.slot.gunpowder": "UNLOCALIZED: Add gunpowder to fuel the cannon",
|
||||||
|
"create.gui.schematicannon.slot.listPrinter": "UNLOCALIZED: Place books here to print a Checklist for your Schematic",
|
||||||
|
"create.gui.schematicannon.slot.schematic": "UNLOCALIZED: Add your Schematic here. Make sure it is deployed at a specific location.",
|
||||||
"create.gui.schematicannon.option.skipMissing.description": "만약 대포가 설치에 필요한 블럭을 찾지 못할 경우,건너뛰고 다음 블럭 설치를 진행합니다.",
|
"create.gui.schematicannon.option.skipMissing.description": "만약 대포가 설치에 필요한 블럭을 찾지 못할 경우,건너뛰고 다음 블럭 설치를 진행합니다.",
|
||||||
"create.gui.schematicannon.option.skipTileEntities.description": "대포가 상세정보가 든 상자같은 타일 엔티티 설치를 무시합니다.",
|
"create.gui.schematicannon.option.skipTileEntities.description": "대포가 상세정보가 든 상자같은 타일 엔티티 설치를 무시합니다.",
|
||||||
"create.gui.schematicannon.option.dontReplaceSolid.description": "대포가 작업구역의 온전한 블럭을 대체하지 않습니다.",
|
"create.gui.schematicannon.option.dontReplaceSolid.description": "대포가 작업구역의 온전한 블럭을 대체하지 않습니다.",
|
||||||
|
@ -809,23 +812,42 @@
|
||||||
"create.gui.filter.ignore_data.description": "상세정보와 상관없이 아이템 종류만 일치한다면 통과시킵니다.",
|
"create.gui.filter.ignore_data.description": "상세정보와 상관없이 아이템 종류만 일치한다면 통과시킵니다.",
|
||||||
|
|
||||||
"create.item_attributes.placeable": "설치할 수 있음",
|
"create.item_attributes.placeable": "설치할 수 있음",
|
||||||
|
"create.item_attributes.placeable.inverted": "UNLOCALIZED: is not placeable",
|
||||||
"create.item_attributes.consumable": "먹을 수 있음",
|
"create.item_attributes.consumable": "먹을 수 있음",
|
||||||
|
"create.item_attributes.consumable.inverted": "UNLOCALIZED: cannot be eaten",
|
||||||
"create.item_attributes.smeltable": "구워질 수 있음",
|
"create.item_attributes.smeltable": "구워질 수 있음",
|
||||||
|
"create.item_attributes.smeltable.inverted": "UNLOCALIZED: cannot be Smelted",
|
||||||
"create.item_attributes.washable": "세척될 수 있음",
|
"create.item_attributes.washable": "세척될 수 있음",
|
||||||
|
"create.item_attributes.washable.inverted": "UNLOCALIZED: cannot be Washed",
|
||||||
"create.item_attributes.smokable": "훈연될 수 있음",
|
"create.item_attributes.smokable": "훈연될 수 있음",
|
||||||
|
"create.item_attributes.smokable.inverted": "UNLOCALIZED: cannot be Smoked",
|
||||||
|
"create.item_attributes.crushable": "UNLOCALIZED: can be Crushed",
|
||||||
|
"create.item_attributes.crushable.inverted": "UNLOCALIZED: cannot be Crushed",
|
||||||
"create.item_attributes.blastable": "용광로에 녹일 수 있음",
|
"create.item_attributes.blastable": "용광로에 녹일 수 있음",
|
||||||
|
"create.item_attributes.blastable.inverted": "UNLOCALIZED: is not smeltable in Blast Furnace",
|
||||||
"create.item_attributes.enchanted": "마법부여됨",
|
"create.item_attributes.enchanted": "마법부여됨",
|
||||||
|
"create.item_attributes.enchanted.inverted": "UNLOCALIZED: is unenchanted",
|
||||||
"create.item_attributes.damaged": "내구도가 닮",
|
"create.item_attributes.damaged": "내구도가 닮",
|
||||||
|
"create.item_attributes.damaged.inverted": "UNLOCALIZED: is not damaged",
|
||||||
"create.item_attributes.badly_damaged": "심각하게 내구도가 닮",
|
"create.item_attributes.badly_damaged": "심각하게 내구도가 닮",
|
||||||
|
"create.item_attributes.badly_damaged.inverted": "UNLOCALIZED: is not heavily damaged",
|
||||||
"create.item_attributes.not_stackable": "겹쳐질 수 없음",
|
"create.item_attributes.not_stackable": "겹쳐질 수 없음",
|
||||||
|
"create.item_attributes.not_stackable.inverted": "UNLOCALIZED: can be stacked",
|
||||||
"create.item_attributes.equipable": "장착할 수 있음",
|
"create.item_attributes.equipable": "장착할 수 있음",
|
||||||
|
"create.item_attributes.equipable.inverted": "UNLOCALIZED: cannot be equipped",
|
||||||
"create.item_attributes.furnace_fuel": "화로 연료로 쓸 수 있음",
|
"create.item_attributes.furnace_fuel": "화로 연료로 쓸 수 있음",
|
||||||
|
"create.item_attributes.furnace_fuel.inverted": "UNLOCALIZED: is not furnace fuel",
|
||||||
"create.item_attributes.in_tag": "%1$s로 등록됨",
|
"create.item_attributes.in_tag": "%1$s로 등록됨",
|
||||||
|
"create.item_attributes.in_tag.inverted": "UNLOCALIZED: is not tagged %1$s",
|
||||||
"create.item_attributes.in_item_group": "%1$s탭에 속함",
|
"create.item_attributes.in_item_group": "%1$s탭에 속함",
|
||||||
|
"create.item_attributes.in_item_group.inverted": "UNLOCALIZED: is not in group '%1$s'",
|
||||||
"create.item_attributes.added_by": "%1$s가 추가함",
|
"create.item_attributes.added_by": "%1$s가 추가함",
|
||||||
|
"create.item_attributes.added_by.inverted": "UNLOCALIZED: was not added by %1$s",
|
||||||
|
|
||||||
"create.gui.attribute_filter.no_selected_attributes": "속성이 선택되지 않음",
|
"create.gui.attribute_filter.no_selected_attributes": "속성이 선택되지 않음",
|
||||||
"create.gui.attribute_filter.selected_attributes": "선택된 속성:",
|
"create.gui.attribute_filter.selected_attributes": "선택된 속성:",
|
||||||
|
"create.gui.attribute_filter.add_attribute": "UNLOCALIZED: Add attribute to List",
|
||||||
|
"create.gui.attribute_filter.add_inverted_attribute": "UNLOCALIZED: Add opposite attribute to List",
|
||||||
"create.gui.attribute_filter.whitelist_disjunctive": "화이트리스트 (최소)",
|
"create.gui.attribute_filter.whitelist_disjunctive": "화이트리스트 (최소)",
|
||||||
"create.gui.attribute_filter.whitelist_disjunctive.description": "아이템이 선택된 속성 중 하나라도 가지고 있다면 통과시킵니다.",
|
"create.gui.attribute_filter.whitelist_disjunctive.description": "아이템이 선택된 속성 중 하나라도 가지고 있다면 통과시킵니다.",
|
||||||
"create.gui.attribute_filter.whitelist_conjunctive": "화이트리스트 (모두)",
|
"create.gui.attribute_filter.whitelist_conjunctive": "화이트리스트 (모두)",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 761",
|
"_": "Missing Localizations: 791",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -679,12 +679,9 @@
|
||||||
"create.gui.adjustable_crate.title": "FlexKrat",
|
"create.gui.adjustable_crate.title": "FlexKrat",
|
||||||
"create.gui.adjustable_crate.storageSpace": "Opslagruimte",
|
"create.gui.adjustable_crate.storageSpace": "Opslagruimte",
|
||||||
"create.gui.stockpile_switch.title": "Voorraad Schakelaar",
|
"create.gui.stockpile_switch.title": "Voorraad Schakelaar",
|
||||||
"create.gui.stockpile_switch.lowerLimit": "Lagere drempel",
|
"create.gui.stockpile_switch.invert_signal": "UNLOCALIZED: Invert Signal",
|
||||||
"create.gui.stockpile_switch.upperLimit": "Hogere drempel",
|
"create.gui.stockpile_switch.move_to_lower_at": "UNLOCALIZED: Move to lower lane at %1$s%%",
|
||||||
"create.gui.stockpile_switch.startAt": "Start Signaal op",
|
"create.gui.stockpile_switch.move_to_upper_at": "UNLOCALIZED: Move to upper lane at %1$s%%",
|
||||||
"create.gui.stockpile_switch.startAbove": "Start Signaal boven",
|
|
||||||
"create.gui.stockpile_switch.stopAt": "Stop Signaal op",
|
|
||||||
"create.gui.stockpile_switch.stopBelow": "Stop Signaal onder",
|
|
||||||
"create.gui.sequenced_gearshift.title": "UNLOCALIZED: Sequenced Gearshift",
|
"create.gui.sequenced_gearshift.title": "UNLOCALIZED: Sequenced Gearshift",
|
||||||
"create.gui.sequenced_gearshift.instruction": "UNLOCALIZED: Instruction",
|
"create.gui.sequenced_gearshift.instruction": "UNLOCALIZED: Instruction",
|
||||||
"create.gui.sequenced_gearshift.instruction.turn_angle": "UNLOCALIZED: Turn",
|
"create.gui.sequenced_gearshift.instruction.turn_angle": "UNLOCALIZED: Turn",
|
||||||
|
@ -705,7 +702,8 @@
|
||||||
"create.schematicAndQuill.secondPos": "Tweede positie ingesteld.",
|
"create.schematicAndQuill.secondPos": "Tweede positie ingesteld.",
|
||||||
"create.schematicAndQuill.noTarget": "Houd [Ctrl] ingedrukt om een Lucht block te kiezen.",
|
"create.schematicAndQuill.noTarget": "Houd [Ctrl] ingedrukt om een Lucht block te kiezen.",
|
||||||
"create.schematicAndQuill.abort": "Keuze verwijderd.",
|
"create.schematicAndQuill.abort": "Keuze verwijderd.",
|
||||||
"create.schematicAndQuill.prompt": "Vul een naam in voor de bouwtekening:",
|
"create.schematicAndQuill.title": "UNLOCALIZED: Schematic Name:",
|
||||||
|
"create.schematicAndQuill.convert": "UNLOCALIZED: Save and Deploy Immediately",
|
||||||
"create.schematicAndQuill.fallbackName": "Mijn Bouwtekening",
|
"create.schematicAndQuill.fallbackName": "Mijn Bouwtekening",
|
||||||
"create.schematicAndQuill.saved": "Opgeslagen als %1$s",
|
"create.schematicAndQuill.saved": "Opgeslagen als %1$s",
|
||||||
|
|
||||||
|
@ -756,24 +754,29 @@
|
||||||
"create.schematics.maxAllowedSize": "De maximum toegestane grote van een Bouwtekings bestand is:",
|
"create.schematics.maxAllowedSize": "De maximum toegestane grote van een Bouwtekings bestand is:",
|
||||||
|
|
||||||
"create.gui.schematicTable.title": "Bouwtekening Tafel",
|
"create.gui.schematicTable.title": "Bouwtekening Tafel",
|
||||||
|
"create.gui.schematicTable.refresh": "UNLOCALIZED: Refresh Files",
|
||||||
|
"create.gui.schematicTable.open_folder": "UNLOCALIZED: Open Folder",
|
||||||
"create.gui.schematicTable.availableSchematics": "Beschikbare Bouwtekeningen",
|
"create.gui.schematicTable.availableSchematics": "Beschikbare Bouwtekeningen",
|
||||||
"create.gui.schematicTable.noSchematics": "Geen Bouwtekeningen opgeslagen",
|
"create.gui.schematicTable.noSchematics": "Geen Bouwtekeningen opgeslagen",
|
||||||
"create.gui.schematicTable.uploading": "Uploaden...",
|
"create.gui.schematicTable.uploading": "Uploaden...",
|
||||||
"create.gui.schematicTable.finished": "Upload Klaar!",
|
"create.gui.schematicTable.finished": "Upload Klaar!",
|
||||||
"create.gui.schematicannon.title": "Bouwtekeningkannon",
|
"create.gui.schematicannon.title": "Bouwtekeningkannon",
|
||||||
"create.gui.schematicannon.settingsTitle": "Plaatsing Instellingen",
|
|
||||||
"create.gui.schematicannon.listPrinter": "Materiaal lijst Printer",
|
"create.gui.schematicannon.listPrinter": "Materiaal lijst Printer",
|
||||||
"create.gui.schematicannon.gunpowderLevel": "Buskruit op %1$s%%",
|
"create.gui.schematicannon.gunpowderLevel": "Buskruit op %1$s%%",
|
||||||
"create.gui.schematicannon.shotsRemaining": "Schoten over: %1$s",
|
"create.gui.schematicannon.shotsRemaining": "Schoten over: %1$s",
|
||||||
"create.gui.schematicannon.shotsRemainingWithBackup": "Met backup: %1$s",
|
"create.gui.schematicannon.shotsRemainingWithBackup": "Met backup: %1$s",
|
||||||
"create.gui.schematicannon.optionEnabled": "Momenteel Ingeschakeld",
|
"create.gui.schematicannon.optionEnabled": "Momenteel Ingeschakeld",
|
||||||
"create.gui.schematicannon.optionDisabled": "Momenteel Uitgeschakeld",
|
"create.gui.schematicannon.optionDisabled": "Momenteel Uitgeschakeld",
|
||||||
|
"create.gui.schematicannon.showOptions": "UNLOCALIZED: Show Printer Settings",
|
||||||
"create.gui.schematicannon.option.dontReplaceSolid": "Niet vaste blokken vervangen",
|
"create.gui.schematicannon.option.dontReplaceSolid": "Niet vaste blokken vervangen",
|
||||||
"create.gui.schematicannon.option.replaceWithSolid": "Vervang vast met vast",
|
"create.gui.schematicannon.option.replaceWithSolid": "Vervang vast met vast",
|
||||||
"create.gui.schematicannon.option.replaceWithAny": "Vervang vast met alles",
|
"create.gui.schematicannon.option.replaceWithAny": "Vervang vast met alles",
|
||||||
"create.gui.schematicannon.option.replaceWithEmpty": "Vervang vast met leeg",
|
"create.gui.schematicannon.option.replaceWithEmpty": "Vervang vast met leeg",
|
||||||
"create.gui.schematicannon.option.skipMissing": "Sla missende blokken over",
|
"create.gui.schematicannon.option.skipMissing": "Sla missende blokken over",
|
||||||
"create.gui.schematicannon.option.skipTileEntities": "Bescherm Tile Entities",
|
"create.gui.schematicannon.option.skipTileEntities": "Bescherm Tile Entities",
|
||||||
|
"create.gui.schematicannon.slot.gunpowder": "UNLOCALIZED: Add gunpowder to fuel the cannon",
|
||||||
|
"create.gui.schematicannon.slot.listPrinter": "UNLOCALIZED: Place books here to print a Checklist for your Schematic",
|
||||||
|
"create.gui.schematicannon.slot.schematic": "UNLOCALIZED: Add your Schematic here. Make sure it is deployed at a specific location.",
|
||||||
"create.gui.schematicannon.option.skipMissing.description": "Als het Bouwtekeningkannon niet een geschikt blok kan vinden om te plaatsen gaat hij door bij de volgende locatie.",
|
"create.gui.schematicannon.option.skipMissing.description": "Als het Bouwtekeningkannon niet een geschikt blok kan vinden om te plaatsen gaat hij door bij de volgende locatie.",
|
||||||
"create.gui.schematicannon.option.skipTileEntities.description": "Het Bouwtekeningkannon probeert blokken met data zoals kisten te vermijden",
|
"create.gui.schematicannon.option.skipTileEntities.description": "Het Bouwtekeningkannon probeert blokken met data zoals kisten te vermijden",
|
||||||
"create.gui.schematicannon.option.dontReplaceSolid.description": "Het Bouwtekeningkannon zal nooit vaste blokken in zijn gebied vervangen, alleen niet-vaste blokken en lucht",
|
"create.gui.schematicannon.option.dontReplaceSolid.description": "Het Bouwtekeningkannon zal nooit vaste blokken in zijn gebied vervangen, alleen niet-vaste blokken en lucht",
|
||||||
|
@ -809,23 +812,42 @@
|
||||||
"create.gui.filter.ignore_data.description": "UNLOCALIZED: Items match regardless of their attributes.",
|
"create.gui.filter.ignore_data.description": "UNLOCALIZED: Items match regardless of their attributes.",
|
||||||
|
|
||||||
"create.item_attributes.placeable": "UNLOCALIZED: is placeable",
|
"create.item_attributes.placeable": "UNLOCALIZED: is placeable",
|
||||||
|
"create.item_attributes.placeable.inverted": "UNLOCALIZED: is not placeable",
|
||||||
"create.item_attributes.consumable": "UNLOCALIZED: can be eaten",
|
"create.item_attributes.consumable": "UNLOCALIZED: can be eaten",
|
||||||
|
"create.item_attributes.consumable.inverted": "UNLOCALIZED: cannot be eaten",
|
||||||
"create.item_attributes.smeltable": "UNLOCALIZED: can be Smelted",
|
"create.item_attributes.smeltable": "UNLOCALIZED: can be Smelted",
|
||||||
|
"create.item_attributes.smeltable.inverted": "UNLOCALIZED: cannot be Smelted",
|
||||||
"create.item_attributes.washable": "UNLOCALIZED: can be Washed",
|
"create.item_attributes.washable": "UNLOCALIZED: can be Washed",
|
||||||
|
"create.item_attributes.washable.inverted": "UNLOCALIZED: cannot be Washed",
|
||||||
"create.item_attributes.smokable": "UNLOCALIZED: can be Smoked",
|
"create.item_attributes.smokable": "UNLOCALIZED: can be Smoked",
|
||||||
|
"create.item_attributes.smokable.inverted": "UNLOCALIZED: cannot be Smoked",
|
||||||
|
"create.item_attributes.crushable": "UNLOCALIZED: can be Crushed",
|
||||||
|
"create.item_attributes.crushable.inverted": "UNLOCALIZED: cannot be Crushed",
|
||||||
"create.item_attributes.blastable": "UNLOCALIZED: is smeltable in Blast Furnace",
|
"create.item_attributes.blastable": "UNLOCALIZED: is smeltable in Blast Furnace",
|
||||||
|
"create.item_attributes.blastable.inverted": "UNLOCALIZED: is not smeltable in Blast Furnace",
|
||||||
"create.item_attributes.enchanted": "UNLOCALIZED: is enchanted",
|
"create.item_attributes.enchanted": "UNLOCALIZED: is enchanted",
|
||||||
|
"create.item_attributes.enchanted.inverted": "UNLOCALIZED: is unenchanted",
|
||||||
"create.item_attributes.damaged": "UNLOCALIZED: is damaged",
|
"create.item_attributes.damaged": "UNLOCALIZED: is damaged",
|
||||||
|
"create.item_attributes.damaged.inverted": "UNLOCALIZED: is not damaged",
|
||||||
"create.item_attributes.badly_damaged": "UNLOCALIZED: is heavily damaged",
|
"create.item_attributes.badly_damaged": "UNLOCALIZED: is heavily damaged",
|
||||||
|
"create.item_attributes.badly_damaged.inverted": "UNLOCALIZED: is not heavily damaged",
|
||||||
"create.item_attributes.not_stackable": "UNLOCALIZED: cannot stack",
|
"create.item_attributes.not_stackable": "UNLOCALIZED: cannot stack",
|
||||||
|
"create.item_attributes.not_stackable.inverted": "UNLOCALIZED: can be stacked",
|
||||||
"create.item_attributes.equipable": "UNLOCALIZED: can be equipped",
|
"create.item_attributes.equipable": "UNLOCALIZED: can be equipped",
|
||||||
|
"create.item_attributes.equipable.inverted": "UNLOCALIZED: cannot be equipped",
|
||||||
"create.item_attributes.furnace_fuel": "UNLOCALIZED: is furnace fuel",
|
"create.item_attributes.furnace_fuel": "UNLOCALIZED: is furnace fuel",
|
||||||
|
"create.item_attributes.furnace_fuel.inverted": "UNLOCALIZED: is not furnace fuel",
|
||||||
"create.item_attributes.in_tag": "UNLOCALIZED: is tagged %1$s",
|
"create.item_attributes.in_tag": "UNLOCALIZED: is tagged %1$s",
|
||||||
"create.item_attributes.in_item_group": "UNLOCALIZED: belongs to %1$s",
|
"create.item_attributes.in_tag.inverted": "UNLOCALIZED: is not tagged %1$s",
|
||||||
|
"create.item_attributes.in_item_group": "UNLOCALIZED: is in group '%1$s'",
|
||||||
|
"create.item_attributes.in_item_group.inverted": "UNLOCALIZED: is not in group '%1$s'",
|
||||||
"create.item_attributes.added_by": "UNLOCALIZED: was added by %1$s",
|
"create.item_attributes.added_by": "UNLOCALIZED: was added by %1$s",
|
||||||
|
"create.item_attributes.added_by.inverted": "UNLOCALIZED: was not added by %1$s",
|
||||||
|
|
||||||
"create.gui.attribute_filter.no_selected_attributes": "UNLOCALIZED: No attributes selected",
|
"create.gui.attribute_filter.no_selected_attributes": "UNLOCALIZED: No attributes selected",
|
||||||
"create.gui.attribute_filter.selected_attributes": "UNLOCALIZED: Selected attributes:",
|
"create.gui.attribute_filter.selected_attributes": "UNLOCALIZED: Selected attributes:",
|
||||||
|
"create.gui.attribute_filter.add_attribute": "UNLOCALIZED: Add attribute to List",
|
||||||
|
"create.gui.attribute_filter.add_inverted_attribute": "UNLOCALIZED: Add opposite attribute to List",
|
||||||
"create.gui.attribute_filter.whitelist_disjunctive": "UNLOCALIZED: Whitelist (Any)",
|
"create.gui.attribute_filter.whitelist_disjunctive": "UNLOCALIZED: Whitelist (Any)",
|
||||||
"create.gui.attribute_filter.whitelist_disjunctive.description": "UNLOCALIZED: Items pass if they have any of the selected attributes.",
|
"create.gui.attribute_filter.whitelist_disjunctive.description": "UNLOCALIZED: Items pass if they have any of the selected attributes.",
|
||||||
"create.gui.attribute_filter.whitelist_conjunctive": "UNLOCALIZED: Whitelist (All)",
|
"create.gui.attribute_filter.whitelist_conjunctive": "UNLOCALIZED: Whitelist (All)",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 830",
|
"_": "Missing Localizations: 860",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -679,12 +679,9 @@
|
||||||
"create.gui.adjustable_crate.title": "adjustable_crate",
|
"create.gui.adjustable_crate.title": "adjustable_crate",
|
||||||
"create.gui.adjustable_crate.storageSpace": "Espaço de Armazenamento",
|
"create.gui.adjustable_crate.storageSpace": "Espaço de Armazenamento",
|
||||||
"create.gui.stockpile_switch.title": "Disjuntor de Armazenamento",
|
"create.gui.stockpile_switch.title": "Disjuntor de Armazenamento",
|
||||||
"create.gui.stockpile_switch.lowerLimit": "Limite Mínimo",
|
"create.gui.stockpile_switch.invert_signal": "UNLOCALIZED: Invert Signal",
|
||||||
"create.gui.stockpile_switch.upperLimit": "Limite Máximo",
|
"create.gui.stockpile_switch.move_to_lower_at": "UNLOCALIZED: Move to lower lane at %1$s%%",
|
||||||
"create.gui.stockpile_switch.startAt": "Iniciar Sinal em",
|
"create.gui.stockpile_switch.move_to_upper_at": "UNLOCALIZED: Move to upper lane at %1$s%%",
|
||||||
"create.gui.stockpile_switch.startAbove": "Iniciar Sinal acima de",
|
|
||||||
"create.gui.stockpile_switch.stopAt": "Parar Sinal em",
|
|
||||||
"create.gui.stockpile_switch.stopBelow": "Parar Sinal abaixo de",
|
|
||||||
"create.gui.sequenced_gearshift.title": "UNLOCALIZED: Sequenced Gearshift",
|
"create.gui.sequenced_gearshift.title": "UNLOCALIZED: Sequenced Gearshift",
|
||||||
"create.gui.sequenced_gearshift.instruction": "UNLOCALIZED: Instruction",
|
"create.gui.sequenced_gearshift.instruction": "UNLOCALIZED: Instruction",
|
||||||
"create.gui.sequenced_gearshift.instruction.turn_angle": "UNLOCALIZED: Turn",
|
"create.gui.sequenced_gearshift.instruction.turn_angle": "UNLOCALIZED: Turn",
|
||||||
|
@ -705,7 +702,8 @@
|
||||||
"create.schematicAndQuill.secondPos": "Segunda posição feita.",
|
"create.schematicAndQuill.secondPos": "Segunda posição feita.",
|
||||||
"create.schematicAndQuill.noTarget": "Seguro [Ctrl] para selecionar Blocos de Ar.",
|
"create.schematicAndQuill.noTarget": "Seguro [Ctrl] para selecionar Blocos de Ar.",
|
||||||
"create.schematicAndQuill.abort": "Seleção removida.",
|
"create.schematicAndQuill.abort": "Seleção removida.",
|
||||||
"create.schematicAndQuill.prompt": "Informe um nome para o Esquema:",
|
"create.schematicAndQuill.title": "UNLOCALIZED: Schematic Name:",
|
||||||
|
"create.schematicAndQuill.convert": "UNLOCALIZED: Save and Deploy Immediately",
|
||||||
"create.schematicAndQuill.fallbackName": "Meu Esquema",
|
"create.schematicAndQuill.fallbackName": "Meu Esquema",
|
||||||
"create.schematicAndQuill.saved": "Salvo como %1$s",
|
"create.schematicAndQuill.saved": "Salvo como %1$s",
|
||||||
|
|
||||||
|
@ -756,24 +754,29 @@
|
||||||
"create.schematics.maxAllowedSize": "O tamanho máximo permitido para o esquema é:",
|
"create.schematics.maxAllowedSize": "O tamanho máximo permitido para o esquema é:",
|
||||||
|
|
||||||
"create.gui.schematicTable.title": "Mesa de Desenho",
|
"create.gui.schematicTable.title": "Mesa de Desenho",
|
||||||
|
"create.gui.schematicTable.refresh": "UNLOCALIZED: Refresh Files",
|
||||||
|
"create.gui.schematicTable.open_folder": "UNLOCALIZED: Open Folder",
|
||||||
"create.gui.schematicTable.availableSchematics": "UNLOCALIZED: Available Schematics",
|
"create.gui.schematicTable.availableSchematics": "UNLOCALIZED: Available Schematics",
|
||||||
"create.gui.schematicTable.noSchematics": "UNLOCALIZED: No Schematics Saved",
|
"create.gui.schematicTable.noSchematics": "UNLOCALIZED: No Schematics Saved",
|
||||||
"create.gui.schematicTable.uploading": "Importando...",
|
"create.gui.schematicTable.uploading": "Importando...",
|
||||||
"create.gui.schematicTable.finished": "Envio Concluído!",
|
"create.gui.schematicTable.finished": "Envio Concluído!",
|
||||||
"create.gui.schematicannon.title": "Esquemaannon",
|
"create.gui.schematicannon.title": "Esquemaannon",
|
||||||
"create.gui.schematicannon.settingsTitle": "Parâmetros de Posicionamento",
|
|
||||||
"create.gui.schematicannon.listPrinter": "Impressora de Lista de Materiais",
|
"create.gui.schematicannon.listPrinter": "Impressora de Lista de Materiais",
|
||||||
"create.gui.schematicannon.gunpowderLevel": "Pólvora em %1$s%%",
|
"create.gui.schematicannon.gunpowderLevel": "Pólvora em %1$s%%",
|
||||||
"create.gui.schematicannon.shotsRemaining": "Disparos faltantes: %1$s",
|
"create.gui.schematicannon.shotsRemaining": "Disparos faltantes: %1$s",
|
||||||
"create.gui.schematicannon.shotsRemainingWithBackup": "Com backup: %1$s",
|
"create.gui.schematicannon.shotsRemainingWithBackup": "Com backup: %1$s",
|
||||||
"create.gui.schematicannon.optionEnabled": "Habilitado Atualmente",
|
"create.gui.schematicannon.optionEnabled": "Habilitado Atualmente",
|
||||||
"create.gui.schematicannon.optionDisabled": "Desabilitado Atualmente",
|
"create.gui.schematicannon.optionDisabled": "Desabilitado Atualmente",
|
||||||
|
"create.gui.schematicannon.showOptions": "UNLOCALIZED: Show Printer Settings",
|
||||||
"create.gui.schematicannon.option.dontReplaceSolid": "Não Substituir Blocos Sólidos",
|
"create.gui.schematicannon.option.dontReplaceSolid": "Não Substituir Blocos Sólidos",
|
||||||
"create.gui.schematicannon.option.replaceWithSolid": "Substituir Blocos Sólidos",
|
"create.gui.schematicannon.option.replaceWithSolid": "Substituir Blocos Sólidos",
|
||||||
"create.gui.schematicannon.option.replaceWithAny": "Substituir Sólidos com Qualquer",
|
"create.gui.schematicannon.option.replaceWithAny": "Substituir Sólidos com Qualquer",
|
||||||
"create.gui.schematicannon.option.replaceWithEmpty": "Substituir Sólidos com Vazio",
|
"create.gui.schematicannon.option.replaceWithEmpty": "Substituir Sólidos com Vazio",
|
||||||
"create.gui.schematicannon.option.skipMissing": "Pulando Blocos faltantes",
|
"create.gui.schematicannon.option.skipMissing": "Pulando Blocos faltantes",
|
||||||
"create.gui.schematicannon.option.skipTileEntities": "Proteger Entidades Entalhadas",
|
"create.gui.schematicannon.option.skipTileEntities": "Proteger Entidades Entalhadas",
|
||||||
|
"create.gui.schematicannon.slot.gunpowder": "UNLOCALIZED: Add gunpowder to fuel the cannon",
|
||||||
|
"create.gui.schematicannon.slot.listPrinter": "UNLOCALIZED: Place books here to print a Checklist for your Schematic",
|
||||||
|
"create.gui.schematicannon.slot.schematic": "UNLOCALIZED: Add your Schematic here. Make sure it is deployed at a specific location.",
|
||||||
"create.gui.schematicannon.option.skipMissing.description": "Se o Esquemaannon não encontrar o Bloco para colocar, ele irá continuar para a próx. Posição.",
|
"create.gui.schematicannon.option.skipMissing.description": "Se o Esquemaannon não encontrar o Bloco para colocar, ele irá continuar para a próx. Posição.",
|
||||||
"create.gui.schematicannon.option.skipTileEntities.description": "O Esquemaannon vai evitar substituir blocos que contêm dados como Baus.",
|
"create.gui.schematicannon.option.skipTileEntities.description": "O Esquemaannon vai evitar substituir blocos que contêm dados como Baus.",
|
||||||
"create.gui.schematicannon.option.dontReplaceSolid.description": "O canhão irá nunca substituir Blocos sólidos na área em trabalho, apenas não-Sólidos e Ar.",
|
"create.gui.schematicannon.option.dontReplaceSolid.description": "O canhão irá nunca substituir Blocos sólidos na área em trabalho, apenas não-Sólidos e Ar.",
|
||||||
|
@ -809,23 +812,42 @@
|
||||||
"create.gui.filter.ignore_data.description": "UNLOCALIZED: Items match regardless of their attributes.",
|
"create.gui.filter.ignore_data.description": "UNLOCALIZED: Items match regardless of their attributes.",
|
||||||
|
|
||||||
"create.item_attributes.placeable": "UNLOCALIZED: is placeable",
|
"create.item_attributes.placeable": "UNLOCALIZED: is placeable",
|
||||||
|
"create.item_attributes.placeable.inverted": "UNLOCALIZED: is not placeable",
|
||||||
"create.item_attributes.consumable": "UNLOCALIZED: can be eaten",
|
"create.item_attributes.consumable": "UNLOCALIZED: can be eaten",
|
||||||
|
"create.item_attributes.consumable.inverted": "UNLOCALIZED: cannot be eaten",
|
||||||
"create.item_attributes.smeltable": "UNLOCALIZED: can be Smelted",
|
"create.item_attributes.smeltable": "UNLOCALIZED: can be Smelted",
|
||||||
|
"create.item_attributes.smeltable.inverted": "UNLOCALIZED: cannot be Smelted",
|
||||||
"create.item_attributes.washable": "UNLOCALIZED: can be Washed",
|
"create.item_attributes.washable": "UNLOCALIZED: can be Washed",
|
||||||
|
"create.item_attributes.washable.inverted": "UNLOCALIZED: cannot be Washed",
|
||||||
"create.item_attributes.smokable": "UNLOCALIZED: can be Smoked",
|
"create.item_attributes.smokable": "UNLOCALIZED: can be Smoked",
|
||||||
|
"create.item_attributes.smokable.inverted": "UNLOCALIZED: cannot be Smoked",
|
||||||
|
"create.item_attributes.crushable": "UNLOCALIZED: can be Crushed",
|
||||||
|
"create.item_attributes.crushable.inverted": "UNLOCALIZED: cannot be Crushed",
|
||||||
"create.item_attributes.blastable": "UNLOCALIZED: is smeltable in Blast Furnace",
|
"create.item_attributes.blastable": "UNLOCALIZED: is smeltable in Blast Furnace",
|
||||||
|
"create.item_attributes.blastable.inverted": "UNLOCALIZED: is not smeltable in Blast Furnace",
|
||||||
"create.item_attributes.enchanted": "UNLOCALIZED: is enchanted",
|
"create.item_attributes.enchanted": "UNLOCALIZED: is enchanted",
|
||||||
|
"create.item_attributes.enchanted.inverted": "UNLOCALIZED: is unenchanted",
|
||||||
"create.item_attributes.damaged": "UNLOCALIZED: is damaged",
|
"create.item_attributes.damaged": "UNLOCALIZED: is damaged",
|
||||||
|
"create.item_attributes.damaged.inverted": "UNLOCALIZED: is not damaged",
|
||||||
"create.item_attributes.badly_damaged": "UNLOCALIZED: is heavily damaged",
|
"create.item_attributes.badly_damaged": "UNLOCALIZED: is heavily damaged",
|
||||||
|
"create.item_attributes.badly_damaged.inverted": "UNLOCALIZED: is not heavily damaged",
|
||||||
"create.item_attributes.not_stackable": "UNLOCALIZED: cannot stack",
|
"create.item_attributes.not_stackable": "UNLOCALIZED: cannot stack",
|
||||||
|
"create.item_attributes.not_stackable.inverted": "UNLOCALIZED: can be stacked",
|
||||||
"create.item_attributes.equipable": "UNLOCALIZED: can be equipped",
|
"create.item_attributes.equipable": "UNLOCALIZED: can be equipped",
|
||||||
|
"create.item_attributes.equipable.inverted": "UNLOCALIZED: cannot be equipped",
|
||||||
"create.item_attributes.furnace_fuel": "UNLOCALIZED: is furnace fuel",
|
"create.item_attributes.furnace_fuel": "UNLOCALIZED: is furnace fuel",
|
||||||
|
"create.item_attributes.furnace_fuel.inverted": "UNLOCALIZED: is not furnace fuel",
|
||||||
"create.item_attributes.in_tag": "UNLOCALIZED: is tagged %1$s",
|
"create.item_attributes.in_tag": "UNLOCALIZED: is tagged %1$s",
|
||||||
"create.item_attributes.in_item_group": "UNLOCALIZED: belongs to %1$s",
|
"create.item_attributes.in_tag.inverted": "UNLOCALIZED: is not tagged %1$s",
|
||||||
|
"create.item_attributes.in_item_group": "UNLOCALIZED: is in group '%1$s'",
|
||||||
|
"create.item_attributes.in_item_group.inverted": "UNLOCALIZED: is not in group '%1$s'",
|
||||||
"create.item_attributes.added_by": "UNLOCALIZED: was added by %1$s",
|
"create.item_attributes.added_by": "UNLOCALIZED: was added by %1$s",
|
||||||
|
"create.item_attributes.added_by.inverted": "UNLOCALIZED: was not added by %1$s",
|
||||||
|
|
||||||
"create.gui.attribute_filter.no_selected_attributes": "UNLOCALIZED: No attributes selected",
|
"create.gui.attribute_filter.no_selected_attributes": "UNLOCALIZED: No attributes selected",
|
||||||
"create.gui.attribute_filter.selected_attributes": "UNLOCALIZED: Selected attributes:",
|
"create.gui.attribute_filter.selected_attributes": "UNLOCALIZED: Selected attributes:",
|
||||||
|
"create.gui.attribute_filter.add_attribute": "UNLOCALIZED: Add attribute to List",
|
||||||
|
"create.gui.attribute_filter.add_inverted_attribute": "UNLOCALIZED: Add opposite attribute to List",
|
||||||
"create.gui.attribute_filter.whitelist_disjunctive": "UNLOCALIZED: Whitelist (Any)",
|
"create.gui.attribute_filter.whitelist_disjunctive": "UNLOCALIZED: Whitelist (Any)",
|
||||||
"create.gui.attribute_filter.whitelist_disjunctive.description": "UNLOCALIZED: Items pass if they have any of the selected attributes.",
|
"create.gui.attribute_filter.whitelist_disjunctive.description": "UNLOCALIZED: Items pass if they have any of the selected attributes.",
|
||||||
"create.gui.attribute_filter.whitelist_conjunctive": "UNLOCALIZED: Whitelist (All)",
|
"create.gui.attribute_filter.whitelist_conjunctive": "UNLOCALIZED: Whitelist (All)",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 824",
|
"_": "Missing Localizations: 854",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -679,12 +679,9 @@
|
||||||
"create.gui.adjustable_crate.title": "Гибкий ящик",
|
"create.gui.adjustable_crate.title": "Гибкий ящик",
|
||||||
"create.gui.adjustable_crate.storageSpace": "Обьём хранилища",
|
"create.gui.adjustable_crate.storageSpace": "Обьём хранилища",
|
||||||
"create.gui.stockpile_switch.title": "Сенсор хранилища",
|
"create.gui.stockpile_switch.title": "Сенсор хранилища",
|
||||||
"create.gui.stockpile_switch.lowerLimit": "Нижний порог",
|
"create.gui.stockpile_switch.invert_signal": "UNLOCALIZED: Invert Signal",
|
||||||
"create.gui.stockpile_switch.upperLimit": "Верхний порог",
|
"create.gui.stockpile_switch.move_to_lower_at": "UNLOCALIZED: Move to lower lane at %1$s%%",
|
||||||
"create.gui.stockpile_switch.startAt": "Включить на",
|
"create.gui.stockpile_switch.move_to_upper_at": "UNLOCALIZED: Move to upper lane at %1$s%%",
|
||||||
"create.gui.stockpile_switch.startAbove": "Включить выше",
|
|
||||||
"create.gui.stockpile_switch.stopAt": "Отключить на",
|
|
||||||
"create.gui.stockpile_switch.stopBelow": "Отключить ниже",
|
|
||||||
"create.gui.sequenced_gearshift.title": "UNLOCALIZED: Sequenced Gearshift",
|
"create.gui.sequenced_gearshift.title": "UNLOCALIZED: Sequenced Gearshift",
|
||||||
"create.gui.sequenced_gearshift.instruction": "UNLOCALIZED: Instruction",
|
"create.gui.sequenced_gearshift.instruction": "UNLOCALIZED: Instruction",
|
||||||
"create.gui.sequenced_gearshift.instruction.turn_angle": "UNLOCALIZED: Turn",
|
"create.gui.sequenced_gearshift.instruction.turn_angle": "UNLOCALIZED: Turn",
|
||||||
|
@ -705,7 +702,8 @@
|
||||||
"create.schematicAndQuill.secondPos": "Вторая позиция установлена.",
|
"create.schematicAndQuill.secondPos": "Вторая позиция установлена.",
|
||||||
"create.schematicAndQuill.noTarget": "Зажмите [Ctrl], чтобы выделять блоки воздуха.",
|
"create.schematicAndQuill.noTarget": "Зажмите [Ctrl], чтобы выделять блоки воздуха.",
|
||||||
"create.schematicAndQuill.abort": "Выделение удалено.",
|
"create.schematicAndQuill.abort": "Выделение удалено.",
|
||||||
"create.schematicAndQuill.prompt": "Введите название для новой схемы:",
|
"create.schematicAndQuill.title": "UNLOCALIZED: Schematic Name:",
|
||||||
|
"create.schematicAndQuill.convert": "UNLOCALIZED: Save and Deploy Immediately",
|
||||||
"create.schematicAndQuill.fallbackName": "Моя схема",
|
"create.schematicAndQuill.fallbackName": "Моя схема",
|
||||||
"create.schematicAndQuill.saved": "Сохранено как %1$s",
|
"create.schematicAndQuill.saved": "Сохранено как %1$s",
|
||||||
|
|
||||||
|
@ -756,24 +754,29 @@
|
||||||
"create.schematics.maxAllowedSize": "Максимальный размер файла схемы:",
|
"create.schematics.maxAllowedSize": "Максимальный размер файла схемы:",
|
||||||
|
|
||||||
"create.gui.schematicTable.title": "Стол для схем",
|
"create.gui.schematicTable.title": "Стол для схем",
|
||||||
|
"create.gui.schematicTable.refresh": "UNLOCALIZED: Refresh Files",
|
||||||
|
"create.gui.schematicTable.open_folder": "UNLOCALIZED: Open Folder",
|
||||||
"create.gui.schematicTable.availableSchematics": "Доступные схемы",
|
"create.gui.schematicTable.availableSchematics": "Доступные схемы",
|
||||||
"create.gui.schematicTable.noSchematics": "Нет сохранённых схем",
|
"create.gui.schematicTable.noSchematics": "Нет сохранённых схем",
|
||||||
"create.gui.schematicTable.uploading": "Загрузка...",
|
"create.gui.schematicTable.uploading": "Загрузка...",
|
||||||
"create.gui.schematicTable.finished": "Загрузка завершена!",
|
"create.gui.schematicTable.finished": "Загрузка завершена!",
|
||||||
"create.gui.schematicannon.title": "Схемопушка",
|
"create.gui.schematicannon.title": "Схемопушка",
|
||||||
"create.gui.schematicannon.settingsTitle": "Параметры размещения",
|
|
||||||
"create.gui.schematicannon.listPrinter": "Распечатать список материалов",
|
"create.gui.schematicannon.listPrinter": "Распечатать список материалов",
|
||||||
"create.gui.schematicannon.gunpowderLevel": "Порох: %1$s%%",
|
"create.gui.schematicannon.gunpowderLevel": "Порох: %1$s%%",
|
||||||
"create.gui.schematicannon.shotsRemaining": "Выстрелов осталось: %1$s",
|
"create.gui.schematicannon.shotsRemaining": "Выстрелов осталось: %1$s",
|
||||||
"create.gui.schematicannon.shotsRemainingWithBackup": "C запасом: %1$s",
|
"create.gui.schematicannon.shotsRemainingWithBackup": "C запасом: %1$s",
|
||||||
"create.gui.schematicannon.optionEnabled": "Включена",
|
"create.gui.schematicannon.optionEnabled": "Включена",
|
||||||
"create.gui.schematicannon.optionDisabled": "Отключена",
|
"create.gui.schematicannon.optionDisabled": "Отключена",
|
||||||
|
"create.gui.schematicannon.showOptions": "UNLOCALIZED: Show Printer Settings",
|
||||||
"create.gui.schematicannon.option.dontReplaceSolid": "Не заменять целые блоки",
|
"create.gui.schematicannon.option.dontReplaceSolid": "Не заменять целые блоки",
|
||||||
"create.gui.schematicannon.option.replaceWithSolid": "Заменять целые блоки целыми блоками",
|
"create.gui.schematicannon.option.replaceWithSolid": "Заменять целые блоки целыми блоками",
|
||||||
"create.gui.schematicannon.option.replaceWithAny": "Заменять целые блоки чем угодно",
|
"create.gui.schematicannon.option.replaceWithAny": "Заменять целые блоки чем угодно",
|
||||||
"create.gui.schematicannon.option.replaceWithEmpty": "Заменять целые блоки пустотой",
|
"create.gui.schematicannon.option.replaceWithEmpty": "Заменять целые блоки пустотой",
|
||||||
"create.gui.schematicannon.option.skipMissing": "Пропускать отсутствующие блоки",
|
"create.gui.schematicannon.option.skipMissing": "Пропускать отсутствующие блоки",
|
||||||
"create.gui.schematicannon.option.skipTileEntities": "Защита от сущностей",
|
"create.gui.schematicannon.option.skipTileEntities": "Защита от сущностей",
|
||||||
|
"create.gui.schematicannon.slot.gunpowder": "UNLOCALIZED: Add gunpowder to fuel the cannon",
|
||||||
|
"create.gui.schematicannon.slot.listPrinter": "UNLOCALIZED: Place books here to print a Checklist for your Schematic",
|
||||||
|
"create.gui.schematicannon.slot.schematic": "UNLOCALIZED: Add your Schematic here. Make sure it is deployed at a specific location.",
|
||||||
"create.gui.schematicannon.option.skipMissing.description": "Если схемопушка не найдёт нужный блок, то она продолжит в следующем месте.",
|
"create.gui.schematicannon.option.skipMissing.description": "Если схемопушка не найдёт нужный блок, то она продолжит в следующем месте.",
|
||||||
"create.gui.schematicannon.option.skipTileEntities.description": "Схемопушка будет избегать замены блоков с данными, например сундуки.",
|
"create.gui.schematicannon.option.skipTileEntities.description": "Схемопушка будет избегать замены блоков с данными, например сундуки.",
|
||||||
"create.gui.schematicannon.option.dontReplaceSolid.description": "Схемопушка никогда не заменит целые блоки, только не целые и воздух.",
|
"create.gui.schematicannon.option.dontReplaceSolid.description": "Схемопушка никогда не заменит целые блоки, только не целые и воздух.",
|
||||||
|
@ -809,23 +812,42 @@
|
||||||
"create.gui.filter.ignore_data.description": "UNLOCALIZED: Items match regardless of their attributes.",
|
"create.gui.filter.ignore_data.description": "UNLOCALIZED: Items match regardless of their attributes.",
|
||||||
|
|
||||||
"create.item_attributes.placeable": "UNLOCALIZED: is placeable",
|
"create.item_attributes.placeable": "UNLOCALIZED: is placeable",
|
||||||
|
"create.item_attributes.placeable.inverted": "UNLOCALIZED: is not placeable",
|
||||||
"create.item_attributes.consumable": "UNLOCALIZED: can be eaten",
|
"create.item_attributes.consumable": "UNLOCALIZED: can be eaten",
|
||||||
|
"create.item_attributes.consumable.inverted": "UNLOCALIZED: cannot be eaten",
|
||||||
"create.item_attributes.smeltable": "UNLOCALIZED: can be Smelted",
|
"create.item_attributes.smeltable": "UNLOCALIZED: can be Smelted",
|
||||||
|
"create.item_attributes.smeltable.inverted": "UNLOCALIZED: cannot be Smelted",
|
||||||
"create.item_attributes.washable": "UNLOCALIZED: can be Washed",
|
"create.item_attributes.washable": "UNLOCALIZED: can be Washed",
|
||||||
|
"create.item_attributes.washable.inverted": "UNLOCALIZED: cannot be Washed",
|
||||||
"create.item_attributes.smokable": "UNLOCALIZED: can be Smoked",
|
"create.item_attributes.smokable": "UNLOCALIZED: can be Smoked",
|
||||||
|
"create.item_attributes.smokable.inverted": "UNLOCALIZED: cannot be Smoked",
|
||||||
|
"create.item_attributes.crushable": "UNLOCALIZED: can be Crushed",
|
||||||
|
"create.item_attributes.crushable.inverted": "UNLOCALIZED: cannot be Crushed",
|
||||||
"create.item_attributes.blastable": "UNLOCALIZED: is smeltable in Blast Furnace",
|
"create.item_attributes.blastable": "UNLOCALIZED: is smeltable in Blast Furnace",
|
||||||
|
"create.item_attributes.blastable.inverted": "UNLOCALIZED: is not smeltable in Blast Furnace",
|
||||||
"create.item_attributes.enchanted": "UNLOCALIZED: is enchanted",
|
"create.item_attributes.enchanted": "UNLOCALIZED: is enchanted",
|
||||||
|
"create.item_attributes.enchanted.inverted": "UNLOCALIZED: is unenchanted",
|
||||||
"create.item_attributes.damaged": "UNLOCALIZED: is damaged",
|
"create.item_attributes.damaged": "UNLOCALIZED: is damaged",
|
||||||
|
"create.item_attributes.damaged.inverted": "UNLOCALIZED: is not damaged",
|
||||||
"create.item_attributes.badly_damaged": "UNLOCALIZED: is heavily damaged",
|
"create.item_attributes.badly_damaged": "UNLOCALIZED: is heavily damaged",
|
||||||
|
"create.item_attributes.badly_damaged.inverted": "UNLOCALIZED: is not heavily damaged",
|
||||||
"create.item_attributes.not_stackable": "UNLOCALIZED: cannot stack",
|
"create.item_attributes.not_stackable": "UNLOCALIZED: cannot stack",
|
||||||
|
"create.item_attributes.not_stackable.inverted": "UNLOCALIZED: can be stacked",
|
||||||
"create.item_attributes.equipable": "UNLOCALIZED: can be equipped",
|
"create.item_attributes.equipable": "UNLOCALIZED: can be equipped",
|
||||||
|
"create.item_attributes.equipable.inverted": "UNLOCALIZED: cannot be equipped",
|
||||||
"create.item_attributes.furnace_fuel": "UNLOCALIZED: is furnace fuel",
|
"create.item_attributes.furnace_fuel": "UNLOCALIZED: is furnace fuel",
|
||||||
|
"create.item_attributes.furnace_fuel.inverted": "UNLOCALIZED: is not furnace fuel",
|
||||||
"create.item_attributes.in_tag": "UNLOCALIZED: is tagged %1$s",
|
"create.item_attributes.in_tag": "UNLOCALIZED: is tagged %1$s",
|
||||||
"create.item_attributes.in_item_group": "UNLOCALIZED: belongs to %1$s",
|
"create.item_attributes.in_tag.inverted": "UNLOCALIZED: is not tagged %1$s",
|
||||||
|
"create.item_attributes.in_item_group": "UNLOCALIZED: is in group '%1$s'",
|
||||||
|
"create.item_attributes.in_item_group.inverted": "UNLOCALIZED: is not in group '%1$s'",
|
||||||
"create.item_attributes.added_by": "UNLOCALIZED: was added by %1$s",
|
"create.item_attributes.added_by": "UNLOCALIZED: was added by %1$s",
|
||||||
|
"create.item_attributes.added_by.inverted": "UNLOCALIZED: was not added by %1$s",
|
||||||
|
|
||||||
"create.gui.attribute_filter.no_selected_attributes": "UNLOCALIZED: No attributes selected",
|
"create.gui.attribute_filter.no_selected_attributes": "UNLOCALIZED: No attributes selected",
|
||||||
"create.gui.attribute_filter.selected_attributes": "UNLOCALIZED: Selected attributes:",
|
"create.gui.attribute_filter.selected_attributes": "UNLOCALIZED: Selected attributes:",
|
||||||
|
"create.gui.attribute_filter.add_attribute": "UNLOCALIZED: Add attribute to List",
|
||||||
|
"create.gui.attribute_filter.add_inverted_attribute": "UNLOCALIZED: Add opposite attribute to List",
|
||||||
"create.gui.attribute_filter.whitelist_disjunctive": "UNLOCALIZED: Whitelist (Any)",
|
"create.gui.attribute_filter.whitelist_disjunctive": "UNLOCALIZED: Whitelist (Any)",
|
||||||
"create.gui.attribute_filter.whitelist_disjunctive.description": "UNLOCALIZED: Items pass if they have any of the selected attributes.",
|
"create.gui.attribute_filter.whitelist_disjunctive.description": "UNLOCALIZED: Items pass if they have any of the selected attributes.",
|
||||||
"create.gui.attribute_filter.whitelist_conjunctive": "UNLOCALIZED: Whitelist (All)",
|
"create.gui.attribute_filter.whitelist_conjunctive": "UNLOCALIZED: Whitelist (All)",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 111",
|
"_": "Missing Localizations: 141",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -679,12 +679,9 @@
|
||||||
"create.gui.adjustable_crate.title": "板条箱",
|
"create.gui.adjustable_crate.title": "板条箱",
|
||||||
"create.gui.adjustable_crate.storageSpace": "储存空间",
|
"create.gui.adjustable_crate.storageSpace": "储存空间",
|
||||||
"create.gui.stockpile_switch.title": "储存开关",
|
"create.gui.stockpile_switch.title": "储存开关",
|
||||||
"create.gui.stockpile_switch.lowerLimit": "阈值下限",
|
"create.gui.stockpile_switch.invert_signal": "UNLOCALIZED: Invert Signal",
|
||||||
"create.gui.stockpile_switch.upperLimit": "阈值上限",
|
"create.gui.stockpile_switch.move_to_lower_at": "UNLOCALIZED: Move to lower lane at %1$s%%",
|
||||||
"create.gui.stockpile_switch.startAt": "启动信号",
|
"create.gui.stockpile_switch.move_to_upper_at": "UNLOCALIZED: Move to upper lane at %1$s%%",
|
||||||
"create.gui.stockpile_switch.startAbove": "给予红石信号当容量大于",
|
|
||||||
"create.gui.stockpile_switch.stopAt": "停止信号",
|
|
||||||
"create.gui.stockpile_switch.stopBelow": "停止红石信号当容量小于",
|
|
||||||
"create.gui.sequenced_gearshift.title": "可编程齿轮箱",
|
"create.gui.sequenced_gearshift.title": "可编程齿轮箱",
|
||||||
"create.gui.sequenced_gearshift.instruction": "指令",
|
"create.gui.sequenced_gearshift.instruction": "指令",
|
||||||
"create.gui.sequenced_gearshift.instruction.turn_angle": "旋转",
|
"create.gui.sequenced_gearshift.instruction.turn_angle": "旋转",
|
||||||
|
@ -705,7 +702,8 @@
|
||||||
"create.schematicAndQuill.secondPos": "第二个位置.",
|
"create.schematicAndQuill.secondPos": "第二个位置.",
|
||||||
"create.schematicAndQuill.noTarget": "按住Ctrl选择空气方块.",
|
"create.schematicAndQuill.noTarget": "按住Ctrl选择空气方块.",
|
||||||
"create.schematicAndQuill.abort": "删除选择.",
|
"create.schematicAndQuill.abort": "删除选择.",
|
||||||
"create.schematicAndQuill.prompt": "输入蓝图的名称:",
|
"create.schematicAndQuill.title": "UNLOCALIZED: Schematic Name:",
|
||||||
|
"create.schematicAndQuill.convert": "UNLOCALIZED: Save and Deploy Immediately",
|
||||||
"create.schematicAndQuill.fallbackName": "我的蓝图",
|
"create.schematicAndQuill.fallbackName": "我的蓝图",
|
||||||
"create.schematicAndQuill.saved": "另存为 %1$s",
|
"create.schematicAndQuill.saved": "另存为 %1$s",
|
||||||
|
|
||||||
|
@ -756,24 +754,29 @@
|
||||||
"create.schematics.maxAllowedSize": "允许的最大蓝图文件大小为:",
|
"create.schematics.maxAllowedSize": "允许的最大蓝图文件大小为:",
|
||||||
|
|
||||||
"create.gui.schematicTable.title": "蓝图桌",
|
"create.gui.schematicTable.title": "蓝图桌",
|
||||||
|
"create.gui.schematicTable.refresh": "UNLOCALIZED: Refresh Files",
|
||||||
|
"create.gui.schematicTable.open_folder": "UNLOCALIZED: Open Folder",
|
||||||
"create.gui.schematicTable.availableSchematics": "可用蓝图",
|
"create.gui.schematicTable.availableSchematics": "可用蓝图",
|
||||||
"create.gui.schematicTable.noSchematics": "没有保存的蓝图",
|
"create.gui.schematicTable.noSchematics": "没有保存的蓝图",
|
||||||
"create.gui.schematicTable.uploading": "正在上传...",
|
"create.gui.schematicTable.uploading": "正在上传...",
|
||||||
"create.gui.schematicTable.finished": "上传完成!",
|
"create.gui.schematicTable.finished": "上传完成!",
|
||||||
"create.gui.schematicannon.title": "蓝图加农炮",
|
"create.gui.schematicannon.title": "蓝图加农炮",
|
||||||
"create.gui.schematicannon.settingsTitle": "放置设置",
|
|
||||||
"create.gui.schematicannon.listPrinter": "物品清单打印机",
|
"create.gui.schematicannon.listPrinter": "物品清单打印机",
|
||||||
"create.gui.schematicannon.gunpowderLevel": "火药 %1$s%%",
|
"create.gui.schematicannon.gunpowderLevel": "火药 %1$s%%",
|
||||||
"create.gui.schematicannon.shotsRemaining": "发射进度: %1$s",
|
"create.gui.schematicannon.shotsRemaining": "发射进度: %1$s",
|
||||||
"create.gui.schematicannon.shotsRemainingWithBackup": "备份: %1$s",
|
"create.gui.schematicannon.shotsRemainingWithBackup": "备份: %1$s",
|
||||||
"create.gui.schematicannon.optionEnabled": "当前启用",
|
"create.gui.schematicannon.optionEnabled": "当前启用",
|
||||||
"create.gui.schematicannon.optionDisabled": "当前禁用",
|
"create.gui.schematicannon.optionDisabled": "当前禁用",
|
||||||
|
"create.gui.schematicannon.showOptions": "UNLOCALIZED: Show Printer Settings",
|
||||||
"create.gui.schematicannon.option.dontReplaceSolid": "不要替换方块",
|
"create.gui.schematicannon.option.dontReplaceSolid": "不要替换方块",
|
||||||
"create.gui.schematicannon.option.replaceWithSolid": "用固体方块替换工作区域内的方块",
|
"create.gui.schematicannon.option.replaceWithSolid": "用固体方块替换工作区域内的方块",
|
||||||
"create.gui.schematicannon.option.replaceWithAny": "用任何方块替换工作区域内的方块",
|
"create.gui.schematicannon.option.replaceWithAny": "用任何方块替换工作区域内的方块",
|
||||||
"create.gui.schematicannon.option.replaceWithEmpty": "用空气替换工作区域内的方块",
|
"create.gui.schematicannon.option.replaceWithEmpty": "用空气替换工作区域内的方块",
|
||||||
"create.gui.schematicannon.option.skipMissing": "绕过缺少的方块",
|
"create.gui.schematicannon.option.skipMissing": "绕过缺少的方块",
|
||||||
"create.gui.schematicannon.option.skipTileEntities": "保护存储方块",
|
"create.gui.schematicannon.option.skipTileEntities": "保护存储方块",
|
||||||
|
"create.gui.schematicannon.slot.gunpowder": "UNLOCALIZED: Add gunpowder to fuel the cannon",
|
||||||
|
"create.gui.schematicannon.slot.listPrinter": "UNLOCALIZED: Place books here to print a Checklist for your Schematic",
|
||||||
|
"create.gui.schematicannon.slot.schematic": "UNLOCALIZED: Add your Schematic here. Make sure it is deployed at a specific location.",
|
||||||
"create.gui.schematicannon.option.skipMissing.description": "如果缺失材料, 蓝图大炮将忽略当前缺失材料并且使用其他已有材料继续工作",
|
"create.gui.schematicannon.option.skipMissing.description": "如果缺失材料, 蓝图大炮将忽略当前缺失材料并且使用其他已有材料继续工作",
|
||||||
"create.gui.schematicannon.option.skipTileEntities.description": "蓝图将避免更换存储方块,如箱子.",
|
"create.gui.schematicannon.option.skipTileEntities.description": "蓝图将避免更换存储方块,如箱子.",
|
||||||
"create.gui.schematicannon.option.dontReplaceSolid.description": "蓝图加农炮将不会替换工作范围内的任何固体方块.",
|
"create.gui.schematicannon.option.dontReplaceSolid.description": "蓝图加农炮将不会替换工作范围内的任何固体方块.",
|
||||||
|
@ -809,23 +812,42 @@
|
||||||
"create.gui.filter.ignore_data.description": "匹配时忽视物品的耐久、附魔等其他属性",
|
"create.gui.filter.ignore_data.description": "匹配时忽视物品的耐久、附魔等其他属性",
|
||||||
|
|
||||||
"create.item_attributes.placeable": "可放置",
|
"create.item_attributes.placeable": "可放置",
|
||||||
|
"create.item_attributes.placeable.inverted": "UNLOCALIZED: is not placeable",
|
||||||
"create.item_attributes.consumable": "可食用",
|
"create.item_attributes.consumable": "可食用",
|
||||||
|
"create.item_attributes.consumable.inverted": "UNLOCALIZED: cannot be eaten",
|
||||||
"create.item_attributes.smeltable": "可被熔炉烧制",
|
"create.item_attributes.smeltable": "可被熔炉烧制",
|
||||||
|
"create.item_attributes.smeltable.inverted": "UNLOCALIZED: cannot be Smelted",
|
||||||
"create.item_attributes.washable": "可被筛洗",
|
"create.item_attributes.washable": "可被筛洗",
|
||||||
|
"create.item_attributes.washable.inverted": "UNLOCALIZED: cannot be Washed",
|
||||||
"create.item_attributes.smokable": "可被烟熏",
|
"create.item_attributes.smokable": "可被烟熏",
|
||||||
|
"create.item_attributes.smokable.inverted": "UNLOCALIZED: cannot be Smoked",
|
||||||
|
"create.item_attributes.crushable": "UNLOCALIZED: can be Crushed",
|
||||||
|
"create.item_attributes.crushable.inverted": "UNLOCALIZED: cannot be Crushed",
|
||||||
"create.item_attributes.blastable": "可被高炉冶炼",
|
"create.item_attributes.blastable": "可被高炉冶炼",
|
||||||
|
"create.item_attributes.blastable.inverted": "UNLOCALIZED: is not smeltable in Blast Furnace",
|
||||||
"create.item_attributes.enchanted": "已被附魔",
|
"create.item_attributes.enchanted": "已被附魔",
|
||||||
|
"create.item_attributes.enchanted.inverted": "UNLOCALIZED: is unenchanted",
|
||||||
"create.item_attributes.damaged": "已损坏",
|
"create.item_attributes.damaged": "已损坏",
|
||||||
|
"create.item_attributes.damaged.inverted": "UNLOCALIZED: is not damaged",
|
||||||
"create.item_attributes.badly_damaged": "严重受损",
|
"create.item_attributes.badly_damaged": "严重受损",
|
||||||
|
"create.item_attributes.badly_damaged.inverted": "UNLOCALIZED: is not heavily damaged",
|
||||||
"create.item_attributes.not_stackable": "无法堆叠",
|
"create.item_attributes.not_stackable": "无法堆叠",
|
||||||
|
"create.item_attributes.not_stackable.inverted": "UNLOCALIZED: can be stacked",
|
||||||
"create.item_attributes.equipable": "可装备",
|
"create.item_attributes.equipable": "可装备",
|
||||||
|
"create.item_attributes.equipable.inverted": "UNLOCALIZED: cannot be equipped",
|
||||||
"create.item_attributes.furnace_fuel": "是燃料",
|
"create.item_attributes.furnace_fuel": "是燃料",
|
||||||
|
"create.item_attributes.furnace_fuel.inverted": "UNLOCALIZED: is not furnace fuel",
|
||||||
"create.item_attributes.in_tag": "标签是%1$s",
|
"create.item_attributes.in_tag": "标签是%1$s",
|
||||||
|
"create.item_attributes.in_tag.inverted": "UNLOCALIZED: is not tagged %1$s",
|
||||||
"create.item_attributes.in_item_group": "属于 %1$s",
|
"create.item_attributes.in_item_group": "属于 %1$s",
|
||||||
|
"create.item_attributes.in_item_group.inverted": "UNLOCALIZED: is not in group '%1$s'",
|
||||||
"create.item_attributes.added_by": "由%1$s添加",
|
"create.item_attributes.added_by": "由%1$s添加",
|
||||||
|
"create.item_attributes.added_by.inverted": "UNLOCALIZED: was not added by %1$s",
|
||||||
|
|
||||||
"create.gui.attribute_filter.no_selected_attributes": "没有标记任何属性",
|
"create.gui.attribute_filter.no_selected_attributes": "没有标记任何属性",
|
||||||
"create.gui.attribute_filter.selected_attributes": "已选择的属性:",
|
"create.gui.attribute_filter.selected_attributes": "已选择的属性:",
|
||||||
|
"create.gui.attribute_filter.add_attribute": "UNLOCALIZED: Add attribute to List",
|
||||||
|
"create.gui.attribute_filter.add_inverted_attribute": "UNLOCALIZED: Add opposite attribute to List",
|
||||||
"create.gui.attribute_filter.whitelist_disjunctive": "任意匹配白名单 (任何)",
|
"create.gui.attribute_filter.whitelist_disjunctive": "任意匹配白名单 (任何)",
|
||||||
"create.gui.attribute_filter.whitelist_disjunctive.description": "只要有其中一项属性符合,就可以通过",
|
"create.gui.attribute_filter.whitelist_disjunctive.description": "只要有其中一项属性符合,就可以通过",
|
||||||
"create.gui.attribute_filter.whitelist_conjunctive": "全匹配白名单 (所有)",
|
"create.gui.attribute_filter.whitelist_conjunctive": "全匹配白名单 (所有)",
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
{
|
{
|
||||||
"parent": "create:block/basin"
|
"parent": "create:block/basin/block"
|
||||||
}
|
}
|
|
@ -11,7 +11,7 @@
|
||||||
"conditions": {
|
"conditions": {
|
||||||
"items": [
|
"items": [
|
||||||
{
|
{
|
||||||
"item": "create:andesite_alloy"
|
"tag": "forge:ingots/brass"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
"type": "create:compacting",
|
||||||
|
"ingredients": [
|
||||||
|
{
|
||||||
|
"item": "minecraft:ice"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"results": [
|
||||||
|
{
|
||||||
|
"fluid": "minecraft:water",
|
||||||
|
"amount": 250
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
"type": "create:compacting",
|
||||||
|
"ingredients": [
|
||||||
|
{
|
||||||
|
"item": "minecraft:cobblestone"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fluidTag": "minecraft:lava",
|
||||||
|
"amount": 250
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"results": [
|
||||||
|
{
|
||||||
|
"item": "create:gabbro",
|
||||||
|
"count": 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -8,7 +8,7 @@
|
||||||
"tag": "minecraft:wool"
|
"tag": "minecraft:wool"
|
||||||
},
|
},
|
||||||
"A": {
|
"A": {
|
||||||
"tag": "forge:nuggets/copper"
|
"tag": "forge:nuggets/brass"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"result": {
|
"result": {
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
"type": "create:emptying",
|
||||||
|
"ingredients": [
|
||||||
|
{
|
||||||
|
"item": "minecraft:potion"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"results": [
|
||||||
|
{
|
||||||
|
"item": "minecraft:glass_bottle",
|
||||||
|
"count": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fluid": "minecraft:water",
|
||||||
|
"amount": 250
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
"type": "create:mixing",
|
||||||
|
"ingredients": [
|
||||||
|
{
|
||||||
|
"fluidTag": "minecraft:water",
|
||||||
|
"amount": 250
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fluidTag": "minecraft:lava",
|
||||||
|
"amount": 250
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"results": [
|
||||||
|
{
|
||||||
|
"item": "minecraft:cobblestone",
|
||||||
|
"count": 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -73,6 +73,7 @@ import com.simibubi.create.content.contraptions.fluids.tank.FluidTankGenerator;
|
||||||
import com.simibubi.create.content.contraptions.fluids.tank.FluidTankItem;
|
import com.simibubi.create.content.contraptions.fluids.tank.FluidTankItem;
|
||||||
import com.simibubi.create.content.contraptions.fluids.tank.FluidTankModel;
|
import com.simibubi.create.content.contraptions.fluids.tank.FluidTankModel;
|
||||||
import com.simibubi.create.content.contraptions.processing.BasinBlock;
|
import com.simibubi.create.content.contraptions.processing.BasinBlock;
|
||||||
|
import com.simibubi.create.content.contraptions.processing.BasinGenerator;
|
||||||
import com.simibubi.create.content.contraptions.processing.BasinMovementBehaviour;
|
import com.simibubi.create.content.contraptions.processing.BasinMovementBehaviour;
|
||||||
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;
|
||||||
|
@ -408,9 +409,10 @@ public class AllBlocks {
|
||||||
|
|
||||||
public static final BlockEntry<BasinBlock> BASIN = REGISTRATE.block("basin", BasinBlock::new)
|
public static final BlockEntry<BasinBlock> BASIN = REGISTRATE.block("basin", BasinBlock::new)
|
||||||
.initialProperties(SharedProperties::stone)
|
.initialProperties(SharedProperties::stone)
|
||||||
.blockstate((ctx, prov) -> prov.simpleBlock(ctx.getEntry(), AssetLookup.standardModel(ctx, prov)))
|
.blockstate(new BasinGenerator()::generate)
|
||||||
.onRegister(addMovementBehaviour(new BasinMovementBehaviour()))
|
.onRegister(addMovementBehaviour(new BasinMovementBehaviour()))
|
||||||
.simpleItem()
|
.item()
|
||||||
|
.transform(customItemModel("_", "block"))
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
public static final BlockEntry<BlazeBurnerBlock> BLAZE_BURNER =
|
public static final BlockEntry<BlazeBurnerBlock> BLAZE_BURNER =
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.simibubi.create;
|
package com.simibubi.create;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
import java.util.function.Supplier;
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
import com.simibubi.create.compat.jei.ConversionRecipe;
|
import com.simibubi.create.compat.jei.ConversionRecipe;
|
||||||
|
@ -7,10 +8,13 @@ import com.simibubi.create.content.contraptions.components.crafter.MechanicalCra
|
||||||
import com.simibubi.create.content.contraptions.components.crusher.CrushingRecipe;
|
import com.simibubi.create.content.contraptions.components.crusher.CrushingRecipe;
|
||||||
import com.simibubi.create.content.contraptions.components.fan.SplashingRecipe;
|
import com.simibubi.create.content.contraptions.components.fan.SplashingRecipe;
|
||||||
import com.simibubi.create.content.contraptions.components.millstone.MillingRecipe;
|
import com.simibubi.create.content.contraptions.components.millstone.MillingRecipe;
|
||||||
|
import com.simibubi.create.content.contraptions.components.mixer.CompactingRecipe;
|
||||||
import com.simibubi.create.content.contraptions.components.mixer.MixingRecipe;
|
import com.simibubi.create.content.contraptions.components.mixer.MixingRecipe;
|
||||||
import com.simibubi.create.content.contraptions.components.press.PressingRecipe;
|
import com.simibubi.create.content.contraptions.components.press.PressingRecipe;
|
||||||
import com.simibubi.create.content.contraptions.components.saw.CuttingRecipe;
|
import com.simibubi.create.content.contraptions.components.saw.CuttingRecipe;
|
||||||
import com.simibubi.create.content.contraptions.fluids.actors.FillingRecipe;
|
import com.simibubi.create.content.contraptions.fluids.actors.FillingRecipe;
|
||||||
|
import com.simibubi.create.content.contraptions.processing.BasinRecipe;
|
||||||
|
import com.simibubi.create.content.contraptions.processing.EmptyingRecipe;
|
||||||
import com.simibubi.create.content.contraptions.processing.ProcessingRecipe;
|
import com.simibubi.create.content.contraptions.processing.ProcessingRecipe;
|
||||||
import com.simibubi.create.content.contraptions.processing.ProcessingRecipeBuilder.ProcessingRecipeFactory;
|
import com.simibubi.create.content.contraptions.processing.ProcessingRecipeBuilder.ProcessingRecipeFactory;
|
||||||
import com.simibubi.create.content.contraptions.processing.ProcessingRecipeSerializer;
|
import com.simibubi.create.content.contraptions.processing.ProcessingRecipeSerializer;
|
||||||
|
@ -25,6 +29,7 @@ import net.minecraft.item.crafting.IRecipeType;
|
||||||
import net.minecraft.item.crafting.ShapedRecipe;
|
import net.minecraft.item.crafting.ShapedRecipe;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.util.registry.Registry;
|
import net.minecraft.util.registry.Registry;
|
||||||
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.event.RegistryEvent;
|
import net.minecraftforge.event.RegistryEvent;
|
||||||
|
|
||||||
public enum AllRecipeTypes {
|
public enum AllRecipeTypes {
|
||||||
|
@ -36,11 +41,14 @@ public enum AllRecipeTypes {
|
||||||
CRUSHING(processingSerializer(CrushingRecipe::new)),
|
CRUSHING(processingSerializer(CrushingRecipe::new)),
|
||||||
CUTTING(processingSerializer(CuttingRecipe::new)),
|
CUTTING(processingSerializer(CuttingRecipe::new)),
|
||||||
MILLING(processingSerializer(MillingRecipe::new)),
|
MILLING(processingSerializer(MillingRecipe::new)),
|
||||||
|
BASIN(processingSerializer(BasinRecipe::new)),
|
||||||
MIXING(processingSerializer(MixingRecipe::new)),
|
MIXING(processingSerializer(MixingRecipe::new)),
|
||||||
|
COMPACTING(processingSerializer(CompactingRecipe::new)),
|
||||||
PRESSING(processingSerializer(PressingRecipe::new)),
|
PRESSING(processingSerializer(PressingRecipe::new)),
|
||||||
SANDPAPER_POLISHING(processingSerializer(SandPaperPolishingRecipe::new)),
|
SANDPAPER_POLISHING(processingSerializer(SandPaperPolishingRecipe::new)),
|
||||||
SPLASHING(processingSerializer(SplashingRecipe::new)),
|
SPLASHING(processingSerializer(SplashingRecipe::new)),
|
||||||
FILLING(processingSerializer(FillingRecipe::new)),
|
FILLING(processingSerializer(FillingRecipe::new)),
|
||||||
|
EMPTYING(processingSerializer(EmptyingRecipe::new)),
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -89,4 +97,9 @@ public enum AllRecipeTypes {
|
||||||
public <T extends IRecipeType<?>> T getType() {
|
public <T extends IRecipeType<?>> T getType() {
|
||||||
return (T) type;
|
return (T) type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public <C extends IInventory, T extends IRecipe<C>> Optional<T> find(C inv, World world) {
|
||||||
|
return world.getRecipeManager()
|
||||||
|
.getRecipe(getType(), inv, world);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,10 +23,12 @@ import com.simibubi.create.compat.jei.category.PressingCategory;
|
||||||
import com.simibubi.create.compat.jei.category.SawingCategory;
|
import com.simibubi.create.compat.jei.category.SawingCategory;
|
||||||
import com.simibubi.create.compat.jei.category.SmokingViaFanCategory;
|
import com.simibubi.create.compat.jei.category.SmokingViaFanCategory;
|
||||||
import com.simibubi.create.compat.jei.category.SplashingCategory;
|
import com.simibubi.create.compat.jei.category.SplashingCategory;
|
||||||
import com.simibubi.create.content.contraptions.components.mixer.MixingRecipe;
|
|
||||||
import com.simibubi.create.content.contraptions.components.press.MechanicalPressTileEntity;
|
import com.simibubi.create.content.contraptions.components.press.MechanicalPressTileEntity;
|
||||||
|
import com.simibubi.create.content.contraptions.processing.BasinRecipe;
|
||||||
import com.simibubi.create.content.logistics.block.inventories.AdjustableCrateScreen;
|
import com.simibubi.create.content.logistics.block.inventories.AdjustableCrateScreen;
|
||||||
import com.simibubi.create.content.schematics.block.SchematicannonScreen;
|
import com.simibubi.create.content.schematics.block.SchematicannonScreen;
|
||||||
|
import com.simibubi.create.foundation.config.AllConfigs;
|
||||||
|
import com.simibubi.create.foundation.config.CRecipes;
|
||||||
import com.simibubi.create.foundation.utility.Lang;
|
import com.simibubi.create.foundation.utility.Lang;
|
||||||
|
|
||||||
import mezz.jei.api.IModPlugin;
|
import mezz.jei.api.IModPlugin;
|
||||||
|
@ -96,8 +98,7 @@ public class CreateJEI implements IModPlugin {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void registerCategories(IRecipeCategoryRegistration registration) {
|
public void registerCategories(IRecipeCategoryRegistration registration) {
|
||||||
registration
|
registration.addRecipeCategories(millingCategory, crushingCategory, splashingCategory, pressingCategory,
|
||||||
.addRecipeCategories(millingCategory, crushingCategory, splashingCategory, pressingCategory,
|
|
||||||
smokingCategory, blastingCategory, blockzapperCategory, mixingCategory, sawingCategory,
|
smokingCategory, blastingCategory, blockzapperCategory, mixingCategory, sawingCategory,
|
||||||
blockCuttingCategory, packingCategory, polishingCategory, mysteryConversionCategory,
|
blockCuttingCategory, packingCategory, polishingCategory, mysteryConversionCategory,
|
||||||
mechanicalCraftingCategory);
|
mechanicalCraftingCategory);
|
||||||
|
@ -105,9 +106,12 @@ public class CreateJEI implements IModPlugin {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void registerRecipes(IRecipeRegistration registration) {
|
public void registerRecipes(IRecipeRegistration registration) {
|
||||||
|
CRecipes recipeConfig = AllConfigs.SERVER.recipes;
|
||||||
|
|
||||||
registration.addRecipes(findRecipes(AllRecipeTypes.MILLING), millingCategory.getUid());
|
registration.addRecipes(findRecipes(AllRecipeTypes.MILLING), millingCategory.getUid());
|
||||||
registration.addRecipes(findRecipes(AllRecipeTypes.CRUSHING), crushingCategory.getUid());
|
registration.addRecipes(findRecipes(AllRecipeTypes.CRUSHING), crushingCategory.getUid());
|
||||||
registration.addRecipes(findRecipesByTypeExcluding(AllRecipeTypes.MILLING.getType(), AllRecipeTypes.CRUSHING.getType()),
|
registration.addRecipes(
|
||||||
|
findRecipesByTypeExcluding(AllRecipeTypes.MILLING.getType(), AllRecipeTypes.CRUSHING.getType()),
|
||||||
crushingCategory.getUid());
|
crushingCategory.getUid());
|
||||||
registration.addRecipes(findRecipes(AllRecipeTypes.SPLASHING), splashingCategory.getUid());
|
registration.addRecipes(findRecipes(AllRecipeTypes.SPLASHING), splashingCategory.getUid());
|
||||||
registration.addRecipes(findRecipes(AllRecipeTypes.PRESSING), pressingCategory.getUid());
|
registration.addRecipes(findRecipes(AllRecipeTypes.PRESSING), pressingCategory.getUid());
|
||||||
|
@ -117,23 +121,39 @@ public class CreateJEI implements IModPlugin {
|
||||||
registration.addRecipes(findRecipesByTypeExcluding(IRecipeType.SMELTING, IRecipeType.SMOKING),
|
registration.addRecipes(findRecipesByTypeExcluding(IRecipeType.SMELTING, IRecipeType.SMOKING),
|
||||||
blastingCategory.getUid());
|
blastingCategory.getUid());
|
||||||
registration.addRecipes(findRecipes(AllRecipeTypes.MIXING), mixingCategory.getUid());
|
registration.addRecipes(findRecipes(AllRecipeTypes.MIXING), mixingCategory.getUid());
|
||||||
|
|
||||||
|
if (recipeConfig.allowShapelessInMixer.get())
|
||||||
registration.addRecipes(findRecipes(r -> r.getSerializer() == IRecipeSerializer.CRAFTING_SHAPELESS
|
registration.addRecipes(findRecipes(r -> r.getSerializer() == IRecipeSerializer.CRAFTING_SHAPELESS
|
||||||
&& !MechanicalPressTileEntity.canCompress(r.getIngredients())).stream().map(MixingRecipe::convertShapeless)
|
&& !MechanicalPressTileEntity.canCompress(r.getIngredients())).stream()
|
||||||
|
.map(BasinRecipe::convert)
|
||||||
.collect(Collectors.toList()),
|
.collect(Collectors.toList()),
|
||||||
mixingCategory.getUid());
|
mixingCategory.getUid());
|
||||||
|
|
||||||
registration.addRecipes(findRecipes(AllRecipeTypes.CUTTING), sawingCategory.getUid());
|
registration.addRecipes(findRecipes(AllRecipeTypes.CUTTING), sawingCategory.getUid());
|
||||||
|
|
||||||
|
if (recipeConfig.allowStonecuttingOnSaw.get())
|
||||||
registration.addRecipes(
|
registration.addRecipes(
|
||||||
CondensedBlockCuttingRecipe.condenseRecipes(findRecipesByType(IRecipeType.STONECUTTING)),
|
CondensedBlockCuttingRecipe.condenseRecipes(findRecipesByType(IRecipeType.STONECUTTING)),
|
||||||
blockCuttingCategory.getUid());
|
blockCuttingCategory.getUid());
|
||||||
|
|
||||||
|
registration.addRecipes(findRecipes(AllRecipeTypes.COMPACTING), packingCategory.getUid());
|
||||||
|
if (recipeConfig.allowShapedSquareInPress.get())
|
||||||
registration.addRecipes(findRecipes(
|
registration.addRecipes(findRecipes(
|
||||||
r -> (r instanceof ICraftingRecipe) && MechanicalPressTileEntity.canCompress(r.getIngredients())),
|
r -> (r instanceof ICraftingRecipe) && MechanicalPressTileEntity.canCompress(r.getIngredients()))
|
||||||
|
.stream()
|
||||||
|
.map(BasinRecipe::convert)
|
||||||
|
.collect(Collectors.toList()),
|
||||||
packingCategory.getUid());
|
packingCategory.getUid());
|
||||||
|
|
||||||
registration.addRecipes(findRecipes(AllRecipeTypes.SANDPAPER_POLISHING), polishingCategory.getUid());
|
registration.addRecipes(findRecipes(AllRecipeTypes.SANDPAPER_POLISHING), polishingCategory.getUid());
|
||||||
registration.addRecipes(MysteriousItemConversionCategory.getRecipes(), mysteryConversionCategory.getUid());
|
registration.addRecipes(MysteriousItemConversionCategory.getRecipes(), mysteryConversionCategory.getUid());
|
||||||
registration.addRecipes(findRecipes(r -> (r.getType() == AllRecipeTypes.MECHANICAL_CRAFTING.type)),
|
registration.addRecipes(findRecipes(r -> (r.getType() == AllRecipeTypes.MECHANICAL_CRAFTING.type)),
|
||||||
mechanicalCraftingCategory.getUid());
|
mechanicalCraftingCategory.getUid());
|
||||||
registration.addRecipes(findRecipes(r -> (r.getType() == IRecipeType.CRAFTING
|
|
||||||
&& r.getType() != AllRecipeTypes.MECHANICAL_CRAFTING.type) && (r instanceof ShapedRecipe)),
|
if (recipeConfig.allowRegularCraftingInCrafter.get())
|
||||||
|
registration.addRecipes(findRecipes(
|
||||||
|
r -> (r.getType() == IRecipeType.CRAFTING && r.getType() != AllRecipeTypes.MECHANICAL_CRAFTING.type)
|
||||||
|
&& (r instanceof ShapedRecipe)),
|
||||||
mechanicalCraftingCategory.getUid());
|
mechanicalCraftingCategory.getUid());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,15 +161,11 @@ public class CreateJEI implements IModPlugin {
|
||||||
public void registerRecipeCatalysts(IRecipeCatalystRegistration registration) {
|
public void registerRecipeCatalysts(IRecipeCatalystRegistration registration) {
|
||||||
ItemStack fan = new ItemStack(AllBlocks.ENCASED_FAN.get());
|
ItemStack fan = new ItemStack(AllBlocks.ENCASED_FAN.get());
|
||||||
|
|
||||||
ItemStack splashingFan = fan
|
ItemStack splashingFan = fan.copy()
|
||||||
.copy()
|
|
||||||
.setDisplayName(new StringTextComponent(TextFormatting.RESET + Lang.translate("recipe.splashing.fan")));
|
.setDisplayName(new StringTextComponent(TextFormatting.RESET + Lang.translate("recipe.splashing.fan")));
|
||||||
ItemStack smokingFan = fan
|
ItemStack smokingFan = fan.copy()
|
||||||
.copy()
|
.setDisplayName(new StringTextComponent(TextFormatting.RESET + Lang.translate("recipe.smokingViaFan.fan")));
|
||||||
.setDisplayName(
|
ItemStack blastingFan = fan.copy()
|
||||||
new StringTextComponent(TextFormatting.RESET + Lang.translate("recipe.smokingViaFan.fan")));
|
|
||||||
ItemStack blastingFan = fan
|
|
||||||
.copy()
|
|
||||||
.setDisplayName(
|
.setDisplayName(
|
||||||
new StringTextComponent(TextFormatting.RESET + Lang.translate("recipe.blastingViaFan.fan")));
|
new StringTextComponent(TextFormatting.RESET + Lang.translate("recipe.blastingViaFan.fan")));
|
||||||
|
|
||||||
|
@ -170,8 +186,7 @@ public class CreateJEI implements IModPlugin {
|
||||||
registration.addRecipeCatalyst(new ItemStack(AllBlocks.BASIN.get()), packingCategory.getUid());
|
registration.addRecipeCatalyst(new ItemStack(AllBlocks.BASIN.get()), packingCategory.getUid());
|
||||||
registration.addRecipeCatalyst(AllItems.SAND_PAPER.asStack(), polishingCategory.getUid());
|
registration.addRecipeCatalyst(AllItems.SAND_PAPER.asStack(), polishingCategory.getUid());
|
||||||
registration.addRecipeCatalyst(AllItems.RED_SAND_PAPER.asStack(), polishingCategory.getUid());
|
registration.addRecipeCatalyst(AllItems.RED_SAND_PAPER.asStack(), polishingCategory.getUid());
|
||||||
registration
|
registration.addRecipeCatalyst(new ItemStack(AllBlocks.MECHANICAL_CRAFTER.get()),
|
||||||
.addRecipeCatalyst(new ItemStack(AllBlocks.MECHANICAL_CRAFTER.get()),
|
|
||||||
mechanicalCraftingCategory.getUid());
|
mechanicalCraftingCategory.getUid());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -186,8 +201,7 @@ public class CreateJEI implements IModPlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static List<IRecipe<?>> findRecipes(Predicate<IRecipe<?>> pred) {
|
private static List<IRecipe<?>> findRecipes(Predicate<IRecipe<?>> pred) {
|
||||||
return Minecraft.getInstance().world
|
return Minecraft.getInstance().world.getRecipeManager()
|
||||||
.getRecipeManager()
|
|
||||||
.getRecipes()
|
.getRecipes()
|
||||||
.stream()
|
.stream()
|
||||||
.filter(pred)
|
.filter(pred)
|
||||||
|
@ -195,8 +209,7 @@ public class CreateJEI implements IModPlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static List<IRecipe<?>> findRecipesByType(IRecipeType<?> type) {
|
private static List<IRecipe<?>> findRecipesByType(IRecipeType<?> type) {
|
||||||
return Minecraft.getInstance().world
|
return Minecraft.getInstance().world.getRecipeManager()
|
||||||
.getRecipeManager()
|
|
||||||
.getRecipes()
|
.getRecipes()
|
||||||
.stream()
|
.stream()
|
||||||
.filter(r -> r.getType() == type)
|
.filter(r -> r.getType() == type)
|
||||||
|
@ -204,11 +217,12 @@ public class CreateJEI implements IModPlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static List<IRecipe<?>> findRecipesById(ResourceLocation id) {
|
private static List<IRecipe<?>> findRecipesById(ResourceLocation id) {
|
||||||
return Minecraft.getInstance().world
|
return Minecraft.getInstance().world.getRecipeManager()
|
||||||
.getRecipeManager()
|
|
||||||
.getRecipes()
|
.getRecipes()
|
||||||
.stream()
|
.stream()
|
||||||
.filter(r -> r.getSerializer().getRegistryName().equals(id))
|
.filter(r -> r.getSerializer()
|
||||||
|
.getRegistryName()
|
||||||
|
.equals(id))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -217,10 +231,14 @@ public class CreateJEI implements IModPlugin {
|
||||||
List<IRecipe<?>> byExcludingType = findRecipesByType(excludingType);
|
List<IRecipe<?>> byExcludingType = findRecipesByType(excludingType);
|
||||||
byType.removeIf(recipe -> {
|
byType.removeIf(recipe -> {
|
||||||
for (IRecipe<?> r : byExcludingType) {
|
for (IRecipe<?> r : byExcludingType) {
|
||||||
ItemStack[] matchingStacks = recipe.getIngredients().get(0).getMatchingStacks();
|
ItemStack[] matchingStacks = recipe.getIngredients()
|
||||||
|
.get(0)
|
||||||
|
.getMatchingStacks();
|
||||||
if (matchingStacks.length == 0)
|
if (matchingStacks.length == 0)
|
||||||
return true;
|
return true;
|
||||||
if (r.getIngredients().get(0).test(matchingStacks[0]))
|
if (r.getIngredients()
|
||||||
|
.get(0)
|
||||||
|
.test(matchingStacks[0]))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -0,0 +1,88 @@
|
||||||
|
package com.simibubi.create.compat.jei.category;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.mutable.MutableInt;
|
||||||
|
|
||||||
|
import com.simibubi.create.content.contraptions.processing.BasinRecipe;
|
||||||
|
import com.simibubi.create.content.contraptions.processing.HeatCondition;
|
||||||
|
import com.simibubi.create.foundation.gui.AllGuiTextures;
|
||||||
|
import com.simibubi.create.foundation.item.ItemHelper;
|
||||||
|
import com.simibubi.create.foundation.utility.Pair;
|
||||||
|
|
||||||
|
import mezz.jei.api.constants.VanillaTypes;
|
||||||
|
import mezz.jei.api.gui.IRecipeLayout;
|
||||||
|
import mezz.jei.api.gui.drawable.IDrawable;
|
||||||
|
import mezz.jei.api.gui.ingredient.IGuiItemStackGroup;
|
||||||
|
import mezz.jei.api.ingredients.IIngredients;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.item.crafting.Ingredient;
|
||||||
|
import net.minecraft.util.NonNullList;
|
||||||
|
|
||||||
|
public class BasinCategory extends CreateRecipeCategory<BasinRecipe> {
|
||||||
|
|
||||||
|
public BasinCategory(String id, IDrawable icon, IDrawable background) {
|
||||||
|
super(id, icon, background);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Class<? extends BasinRecipe> getRecipeClass() {
|
||||||
|
return BasinRecipe.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setIngredients(BasinRecipe recipe, IIngredients ingredients) {
|
||||||
|
ingredients.setInputIngredients(recipe.getIngredients());
|
||||||
|
ingredients.setOutput(VanillaTypes.ITEM, recipe.getRecipeOutput());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setRecipe(IRecipeLayout recipeLayout, BasinRecipe recipe, IIngredients ingredients) {
|
||||||
|
IGuiItemStackGroup itemStacks = recipeLayout.getItemStacks();
|
||||||
|
NonNullList<Ingredient> recipeIngredients = recipe.getIngredients();
|
||||||
|
List<Pair<Ingredient, MutableInt>> actualIngredients = ItemHelper.condenseIngredients(recipeIngredients);
|
||||||
|
|
||||||
|
int size = actualIngredients.size();
|
||||||
|
int xOffset = size < 3 ? (3 - size) * 19 / 2 : 0;
|
||||||
|
int yOffset = recipe.getRequiredHeat() != HeatCondition.NONE ? 30 : 10;
|
||||||
|
|
||||||
|
int i;
|
||||||
|
for (i = 0; i < actualIngredients.size(); i++) {
|
||||||
|
itemStacks.init(i, true, 16 + xOffset + (i % 3) * 19, 50 - (i / 3) * 19 + yOffset);
|
||||||
|
List<ItemStack> stacks = new ArrayList<>();
|
||||||
|
Pair<Ingredient, MutableInt> pair = actualIngredients.get(i);
|
||||||
|
Ingredient ingredient = pair.getFirst();
|
||||||
|
MutableInt amount = pair.getSecond();
|
||||||
|
|
||||||
|
for (ItemStack itemStack : ingredient.getMatchingStacks()) {
|
||||||
|
ItemStack stack = itemStack.copy();
|
||||||
|
stack.setCount(amount.getValue());
|
||||||
|
stacks.add(stack);
|
||||||
|
}
|
||||||
|
|
||||||
|
itemStacks.set(i, stacks);
|
||||||
|
}
|
||||||
|
|
||||||
|
itemStacks.init(i, false, 141, 50 + yOffset);
|
||||||
|
itemStacks.set(i, recipe.getRecipeOutput()
|
||||||
|
.getStack());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void draw(BasinRecipe recipe, double mouseX, double mouseY) {
|
||||||
|
List<Pair<Ingredient, MutableInt>> actualIngredients = ItemHelper.condenseIngredients(recipe.getIngredients());
|
||||||
|
|
||||||
|
int size = actualIngredients.size();
|
||||||
|
int xOffset = size < 3 ? (3 - size) * 19 / 2 : 0;
|
||||||
|
HeatCondition requiredHeat = recipe.getRequiredHeat();
|
||||||
|
int yOffset = requiredHeat != HeatCondition.NONE ? 30 : 10;
|
||||||
|
for (int i = 0; i < size; i++)
|
||||||
|
AllGuiTextures.JEI_SLOT.draw(16 + xOffset + (i % 3) * 19, 50 - (i / 3) * 19 + yOffset);
|
||||||
|
|
||||||
|
AllGuiTextures.JEI_SLOT.draw(141, 50 + yOffset);
|
||||||
|
AllGuiTextures.JEI_DOWN_ARROW.draw(136, 32 + yOffset);
|
||||||
|
AllGuiTextures.JEI_SHADOW.draw(81, 57 + yOffset);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,28 +1,12 @@
|
||||||
package com.simibubi.create.compat.jei.category;
|
package com.simibubi.create.compat.jei.category;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.mutable.MutableInt;
|
|
||||||
|
|
||||||
import com.simibubi.create.AllBlocks;
|
import com.simibubi.create.AllBlocks;
|
||||||
import com.simibubi.create.compat.jei.category.animations.AnimatedBlazeBurner;
|
import com.simibubi.create.compat.jei.category.animations.AnimatedBlazeBurner;
|
||||||
import com.simibubi.create.compat.jei.category.animations.AnimatedMixer;
|
import com.simibubi.create.compat.jei.category.animations.AnimatedMixer;
|
||||||
import com.simibubi.create.content.contraptions.components.mixer.MixingRecipe;
|
import com.simibubi.create.content.contraptions.processing.BasinRecipe;
|
||||||
import com.simibubi.create.content.contraptions.processing.HeatCondition;
|
import com.simibubi.create.content.contraptions.processing.HeatCondition;
|
||||||
import com.simibubi.create.foundation.gui.AllGuiTextures;
|
|
||||||
import com.simibubi.create.foundation.item.ItemHelper;
|
|
||||||
import com.simibubi.create.foundation.utility.Pair;
|
|
||||||
|
|
||||||
import mezz.jei.api.constants.VanillaTypes;
|
public class MixingCategory extends BasinCategory {
|
||||||
import mezz.jei.api.gui.IRecipeLayout;
|
|
||||||
import mezz.jei.api.gui.ingredient.IGuiItemStackGroup;
|
|
||||||
import mezz.jei.api.ingredients.IIngredients;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.item.crafting.Ingredient;
|
|
||||||
import net.minecraft.util.NonNullList;
|
|
||||||
|
|
||||||
public class MixingCategory extends CreateRecipeCategory<MixingRecipe> {
|
|
||||||
|
|
||||||
private AnimatedMixer mixer = new AnimatedMixer();
|
private AnimatedMixer mixer = new AnimatedMixer();
|
||||||
private AnimatedBlazeBurner heater = new AnimatedBlazeBurner();
|
private AnimatedBlazeBurner heater = new AnimatedBlazeBurner();
|
||||||
|
@ -33,63 +17,9 @@ public class MixingCategory extends CreateRecipeCategory<MixingRecipe> {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Class<? extends MixingRecipe> getRecipeClass() {
|
public void draw(BasinRecipe recipe, double mouseX, double mouseY) {
|
||||||
return MixingRecipe.class;
|
super.draw(recipe, mouseX, mouseY);
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setIngredients(MixingRecipe recipe, IIngredients ingredients) {
|
|
||||||
ingredients.setInputIngredients(recipe.getIngredients());
|
|
||||||
ingredients.setOutput(VanillaTypes.ITEM, recipe.getRecipeOutput());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setRecipe(IRecipeLayout recipeLayout, MixingRecipe recipe, IIngredients ingredients) {
|
|
||||||
IGuiItemStackGroup itemStacks = recipeLayout.getItemStacks();
|
|
||||||
NonNullList<Ingredient> recipeIngredients = recipe.getIngredients();
|
|
||||||
List<Pair<Ingredient, MutableInt>> actualIngredients = ItemHelper.condenseIngredients(recipeIngredients);
|
|
||||||
|
|
||||||
int size = actualIngredients.size();
|
|
||||||
int xOffset = size < 3 ? (3 - size) * 19 / 2 : 0;
|
|
||||||
int yOffset = recipe.getRequiredHeat() != HeatCondition.NONE ? 30 : 10;
|
|
||||||
|
|
||||||
int i;
|
|
||||||
for (i = 0; i < actualIngredients.size(); i++) {
|
|
||||||
itemStacks.init(i, true, 16 + xOffset + (i % 3) * 19, 50 - (i / 3) * 19 + yOffset);
|
|
||||||
List<ItemStack> stacks = new ArrayList<>();
|
|
||||||
Pair<Ingredient, MutableInt> pair = actualIngredients.get(i);
|
|
||||||
Ingredient ingredient = pair.getFirst();
|
|
||||||
MutableInt amount = pair.getSecond();
|
|
||||||
|
|
||||||
for (ItemStack itemStack : ingredient.getMatchingStacks()) {
|
|
||||||
ItemStack stack = itemStack.copy();
|
|
||||||
stack.setCount(amount.getValue());
|
|
||||||
stacks.add(stack);
|
|
||||||
}
|
|
||||||
|
|
||||||
itemStacks.set(i, stacks);
|
|
||||||
}
|
|
||||||
|
|
||||||
itemStacks.init(i, false, 141, 50 + yOffset);
|
|
||||||
itemStacks.set(i, recipe.getRecipeOutput()
|
|
||||||
.getStack());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void draw(MixingRecipe recipe, double mouseX, double mouseY) {
|
|
||||||
List<Pair<Ingredient, MutableInt>> actualIngredients = ItemHelper.condenseIngredients(recipe.getIngredients());
|
|
||||||
|
|
||||||
int size = actualIngredients.size();
|
|
||||||
int xOffset = size < 3 ? (3 - size) * 19 / 2 : 0;
|
|
||||||
HeatCondition requiredHeat = recipe.getRequiredHeat();
|
HeatCondition requiredHeat = recipe.getRequiredHeat();
|
||||||
int yOffset = requiredHeat != HeatCondition.NONE ? 30 : 10;
|
|
||||||
for (int i = 0; i < size; i++)
|
|
||||||
AllGuiTextures.JEI_SLOT.draw(16 + xOffset + (i % 3) * 19, 50 - (i / 3) * 19 + yOffset);
|
|
||||||
|
|
||||||
AllGuiTextures.JEI_SLOT.draw(141, 50 + yOffset);
|
|
||||||
AllGuiTextures.JEI_DOWN_ARROW.draw(136, 32 + yOffset);
|
|
||||||
AllGuiTextures.JEI_SHADOW.draw(81, 57 + yOffset);
|
|
||||||
|
|
||||||
if (requiredHeat != HeatCondition.NONE)
|
if (requiredHeat != HeatCondition.NONE)
|
||||||
heater.withHeat(requiredHeat.visualizeAsBlazeBurner())
|
heater.withHeat(requiredHeat.visualizeAsBlazeBurner())
|
||||||
.draw(getBackground().getWidth() / 2 + 3, 55);
|
.draw(getBackground().getWidth() / 2 + 3, 55);
|
||||||
|
|
|
@ -4,18 +4,16 @@ import java.util.Arrays;
|
||||||
|
|
||||||
import com.simibubi.create.AllBlocks;
|
import com.simibubi.create.AllBlocks;
|
||||||
import com.simibubi.create.compat.jei.category.animations.AnimatedPress;
|
import com.simibubi.create.compat.jei.category.animations.AnimatedPress;
|
||||||
|
import com.simibubi.create.content.contraptions.processing.BasinRecipe;
|
||||||
import com.simibubi.create.foundation.gui.AllGuiTextures;
|
import com.simibubi.create.foundation.gui.AllGuiTextures;
|
||||||
|
|
||||||
import mezz.jei.api.constants.VanillaTypes;
|
|
||||||
import mezz.jei.api.gui.IRecipeLayout;
|
import mezz.jei.api.gui.IRecipeLayout;
|
||||||
import mezz.jei.api.gui.ingredient.IGuiItemStackGroup;
|
import mezz.jei.api.gui.ingredient.IGuiItemStackGroup;
|
||||||
import mezz.jei.api.ingredients.IIngredients;
|
import mezz.jei.api.ingredients.IIngredients;
|
||||||
import net.minecraft.item.crafting.ICraftingRecipe;
|
|
||||||
import net.minecraft.item.crafting.IRecipe;
|
|
||||||
import net.minecraft.item.crafting.Ingredient;
|
import net.minecraft.item.crafting.Ingredient;
|
||||||
import net.minecraft.util.NonNullList;
|
import net.minecraft.util.NonNullList;
|
||||||
|
|
||||||
public class PackingCategory extends CreateRecipeCategory<IRecipe<?>> {
|
public class PackingCategory extends BasinCategory {
|
||||||
|
|
||||||
private AnimatedPress press = new AnimatedPress(true);
|
private AnimatedPress press = new AnimatedPress(true);
|
||||||
|
|
||||||
|
@ -25,18 +23,12 @@ public class PackingCategory extends CreateRecipeCategory<IRecipe<?>> {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Class<? extends IRecipe<?>> getRecipeClass() {
|
public void setRecipe(IRecipeLayout recipeLayout, BasinRecipe recipe, IIngredients ingredients) {
|
||||||
return ICraftingRecipe.class;
|
if (!recipe.convertedRecipe) {
|
||||||
|
super.setRecipe(recipeLayout, recipe, ingredients);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setIngredients(IRecipe<?> recipe, IIngredients ingredients) {
|
|
||||||
ingredients.setInputIngredients(recipe.getIngredients());
|
|
||||||
ingredients.setOutput(VanillaTypes.ITEM, recipe.getRecipeOutput());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setRecipe(IRecipeLayout recipeLayout, IRecipe<?> recipe, IIngredients ingredients) {
|
|
||||||
IGuiItemStackGroup itemStacks = recipeLayout.getItemStacks();
|
IGuiItemStackGroup itemStacks = recipeLayout.getItemStacks();
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
|
@ -55,16 +47,21 @@ public class PackingCategory extends CreateRecipeCategory<IRecipe<?>> {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void draw(IRecipe<?> recipe, double mouseX, double mouseY) {
|
public void draw(BasinRecipe recipe, double mouseX, double mouseY) {
|
||||||
|
if (!recipe.convertedRecipe) {
|
||||||
|
super.draw(recipe, mouseX, mouseY);
|
||||||
|
|
||||||
|
} else {
|
||||||
NonNullList<Ingredient> ingredients2 = recipe.getIngredients();
|
NonNullList<Ingredient> ingredients2 = recipe.getIngredients();
|
||||||
int size = ingredients2.size();
|
int size = ingredients2.size();
|
||||||
int rows = size == 4 ? 2 : 3;
|
int rows = size == 4 ? 2 : 3;
|
||||||
for (int i = 0; i < size; i++) {
|
for (int i = 0; i < size; i++)
|
||||||
AllGuiTextures.JEI_SLOT.draw((rows == 2 ? 26 : 17) + (i % rows) * 19, 50 - (i / rows) * 19);
|
AllGuiTextures.JEI_SLOT.draw((rows == 2 ? 26 : 17) + (i % rows) * 19, 50 - (i / rows) * 19);
|
||||||
}
|
|
||||||
AllGuiTextures.JEI_SLOT.draw(141, 50);
|
AllGuiTextures.JEI_SLOT.draw(141, 50);
|
||||||
AllGuiTextures.JEI_DOWN_ARROW.draw(136, 32);
|
AllGuiTextures.JEI_DOWN_ARROW.draw(136, 32);
|
||||||
AllGuiTextures.JEI_SHADOW.draw(81, 57);
|
AllGuiTextures.JEI_SHADOW.draw(81, 57);
|
||||||
|
}
|
||||||
|
|
||||||
press.draw(getBackground().getWidth() / 2 + 6, 30);
|
press.draw(getBackground().getWidth() / 2 + 6, 30);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@ import org.apache.commons.lang3.tuple.Pair;
|
||||||
import com.google.common.base.Predicates;
|
import com.google.common.base.Predicates;
|
||||||
import com.simibubi.create.AllBlocks;
|
import com.simibubi.create.AllBlocks;
|
||||||
import com.simibubi.create.AllRecipeTypes;
|
import com.simibubi.create.AllRecipeTypes;
|
||||||
|
import com.simibubi.create.foundation.config.AllConfigs;
|
||||||
import com.simibubi.create.foundation.utility.Pointing;
|
import com.simibubi.create.foundation.utility.Pointing;
|
||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
|
@ -139,16 +140,16 @@ public class RecipeGridHandler {
|
||||||
public static ItemStack tryToApplyRecipe(World world, GroupedItems items) {
|
public static ItemStack tryToApplyRecipe(World world, GroupedItems items) {
|
||||||
items.calcStats();
|
items.calcStats();
|
||||||
CraftingInventory craftinginventory = new MechanicalCraftingInventory(items);
|
CraftingInventory craftinginventory = new MechanicalCraftingInventory(items);
|
||||||
ItemStack result = world.getRecipeManager()
|
ItemStack result = null;
|
||||||
|
if (AllConfigs.SERVER.recipes.allowRegularCraftingInCrafter.get())
|
||||||
|
result = world.getRecipeManager()
|
||||||
.getRecipe(IRecipeType.CRAFTING, craftinginventory, world)
|
.getRecipe(IRecipeType.CRAFTING, craftinginventory, world)
|
||||||
.map(r -> r.getCraftingResult(craftinginventory))
|
.map(r -> r.getCraftingResult(craftinginventory))
|
||||||
.orElse(null);
|
.orElse(null);
|
||||||
if (result == null)
|
if (result == null)
|
||||||
result = world.getRecipeManager()
|
result = AllRecipeTypes.MECHANICAL_CRAFTING.find(craftinginventory, world)
|
||||||
.getRecipe(AllRecipeTypes.MECHANICAL_CRAFTING.getType(), craftinginventory, world)
|
|
||||||
.map(r -> r.getCraftingResult(craftinginventory))
|
.map(r -> r.getCraftingResult(craftinginventory))
|
||||||
.orElse(null);
|
.orElse(null);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -206,11 +206,9 @@ public class CrushingWheelControllerTileEntity extends SmartTileEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Optional<ProcessingRecipe<RecipeWrapper>> findRecipe() {
|
public Optional<ProcessingRecipe<RecipeWrapper>> findRecipe() {
|
||||||
Optional<ProcessingRecipe<RecipeWrapper>> crushingRecipe = world.getRecipeManager()
|
Optional<ProcessingRecipe<RecipeWrapper>> crushingRecipe = AllRecipeTypes.CRUSHING.find(wrapper, world);
|
||||||
.getRecipe(AllRecipeTypes.CRUSHING.getType(), wrapper, world);
|
|
||||||
if (!crushingRecipe.isPresent())
|
if (!crushingRecipe.isPresent())
|
||||||
crushingRecipe = world.getRecipeManager()
|
crushingRecipe = AllRecipeTypes.MILLING.find(wrapper, world);
|
||||||
.getRecipe(AllRecipeTypes.MILLING.getType(), wrapper, world);
|
|
||||||
return crushingRecipe;
|
return crushingRecipe;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@ import com.simibubi.create.content.logistics.InWorldProcessing.Type;
|
||||||
import com.simibubi.create.foundation.config.AllConfigs;
|
import com.simibubi.create.foundation.config.AllConfigs;
|
||||||
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
||||||
import com.simibubi.create.foundation.tileEntity.behaviour.belt.TransportedItemStackHandlerBehaviour;
|
import com.simibubi.create.foundation.tileEntity.behaviour.belt.TransportedItemStackHandlerBehaviour;
|
||||||
|
import com.simibubi.create.foundation.tileEntity.behaviour.belt.TransportedItemStackHandlerBehaviour.TransportedResult;
|
||||||
import com.simibubi.create.foundation.utility.Iterate;
|
import com.simibubi.create.foundation.utility.Iterate;
|
||||||
import com.simibubi.create.foundation.utility.VecHelper;
|
import com.simibubi.create.foundation.utility.VecHelper;
|
||||||
|
|
||||||
|
@ -305,7 +306,7 @@ public class AirCurrent {
|
||||||
InWorldProcessing.spawnParticlesForProcessing(world, handler.getWorldPositionOf(transported),
|
InWorldProcessing.spawnParticlesForProcessing(world, handler.getWorldPositionOf(transported),
|
||||||
processingType);
|
processingType);
|
||||||
if (world.isRemote)
|
if (world.isRemote)
|
||||||
return null;
|
return TransportedResult.doNothing();
|
||||||
return InWorldProcessing.applyProcessing(transported, world, processingType);
|
return InWorldProcessing.applyProcessing(transported, world, processingType);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,8 +65,7 @@ public class MillstoneTileEntity extends KineticTileEntity {
|
||||||
|
|
||||||
RecipeWrapper inventoryIn = new RecipeWrapper(inputInv);
|
RecipeWrapper inventoryIn = new RecipeWrapper(inputInv);
|
||||||
if (lastRecipe == null || !lastRecipe.matches(inventoryIn, world)) {
|
if (lastRecipe == null || !lastRecipe.matches(inventoryIn, world)) {
|
||||||
Optional<MillingRecipe> recipe = world.getRecipeManager()
|
Optional<MillingRecipe> recipe = AllRecipeTypes.MILLING.find(inventoryIn, world);
|
||||||
.getRecipe(AllRecipeTypes.MILLING.getType(), inventoryIn, world);
|
|
||||||
if (!recipe.isPresent()) {
|
if (!recipe.isPresent()) {
|
||||||
timer = 100;
|
timer = 100;
|
||||||
sendData();
|
sendData();
|
||||||
|
@ -86,8 +85,7 @@ public class MillstoneTileEntity extends KineticTileEntity {
|
||||||
RecipeWrapper inventoryIn = new RecipeWrapper(inputInv);
|
RecipeWrapper inventoryIn = new RecipeWrapper(inputInv);
|
||||||
|
|
||||||
if (lastRecipe == null || !lastRecipe.matches(inventoryIn, world)) {
|
if (lastRecipe == null || !lastRecipe.matches(inventoryIn, world)) {
|
||||||
Optional<MillingRecipe> recipe = world.getRecipeManager()
|
Optional<MillingRecipe> recipe = AllRecipeTypes.MILLING.find(inventoryIn, world);
|
||||||
.getRecipe(AllRecipeTypes.MILLING.getType(), inventoryIn, world);
|
|
||||||
if (!recipe.isPresent())
|
if (!recipe.isPresent())
|
||||||
return;
|
return;
|
||||||
lastRecipe = recipe.get();
|
lastRecipe = recipe.get();
|
||||||
|
@ -153,8 +151,7 @@ public class MillstoneTileEntity extends KineticTileEntity {
|
||||||
|
|
||||||
if (lastRecipe != null && lastRecipe.matches(inventoryIn, world))
|
if (lastRecipe != null && lastRecipe.matches(inventoryIn, world))
|
||||||
return true;
|
return true;
|
||||||
return world.getRecipeManager()
|
return AllRecipeTypes.MILLING.find(inventoryIn, world)
|
||||||
.getRecipe(AllRecipeTypes.MILLING.getType(), inventoryIn, world)
|
|
||||||
.isPresent();
|
.isPresent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.simibubi.create.content.contraptions.components.mixer;
|
||||||
|
|
||||||
|
import com.simibubi.create.AllRecipeTypes;
|
||||||
|
import com.simibubi.create.content.contraptions.processing.BasinRecipe;
|
||||||
|
import com.simibubi.create.content.contraptions.processing.ProcessingRecipeBuilder.ProcessingRecipeParams;
|
||||||
|
|
||||||
|
public class CompactingRecipe extends BasinRecipe {
|
||||||
|
|
||||||
|
public CompactingRecipe(ProcessingRecipeParams params) {
|
||||||
|
super(AllRecipeTypes.COMPACTING, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,37 +1,29 @@
|
||||||
package com.simibubi.create.content.contraptions.components.mixer;
|
package com.simibubi.create.content.contraptions.components.mixer;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Comparator;
|
|
||||||
import java.util.LinkedList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
import com.simibubi.create.AllRecipeTypes;
|
import com.simibubi.create.AllRecipeTypes;
|
||||||
import com.simibubi.create.AllTags;
|
|
||||||
import com.simibubi.create.content.contraptions.components.press.MechanicalPressTileEntity;
|
import com.simibubi.create.content.contraptions.components.press.MechanicalPressTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.processing.BasinOperatingTileEntity;
|
import com.simibubi.create.content.contraptions.processing.BasinOperatingTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.processing.BasinTileEntity;
|
import com.simibubi.create.content.contraptions.processing.BasinTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlock;
|
import com.simibubi.create.foundation.advancement.AllTriggers;
|
||||||
import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlock.HeatLevel;
|
import com.simibubi.create.foundation.advancement.ITriggerable;
|
||||||
|
import com.simibubi.create.foundation.config.AllConfigs;
|
||||||
import com.simibubi.create.foundation.item.SmartInventory;
|
import com.simibubi.create.foundation.item.SmartInventory;
|
||||||
import com.simibubi.create.foundation.utility.VecHelper;
|
import com.simibubi.create.foundation.utility.VecHelper;
|
||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
|
||||||
import net.minecraft.inventory.IInventory;
|
import net.minecraft.inventory.IInventory;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.crafting.IRecipe;
|
import net.minecraft.item.crafting.IRecipe;
|
||||||
import net.minecraft.item.crafting.IRecipeSerializer;
|
import net.minecraft.item.crafting.IRecipeSerializer;
|
||||||
import net.minecraft.item.crafting.Ingredient;
|
|
||||||
import net.minecraft.nbt.CompoundNBT;
|
import net.minecraft.nbt.CompoundNBT;
|
||||||
import net.minecraft.particles.ItemParticleData;
|
import net.minecraft.particles.ItemParticleData;
|
||||||
import net.minecraft.particles.ParticleTypes;
|
import net.minecraft.particles.ParticleTypes;
|
||||||
import net.minecraft.tileentity.TileEntityType;
|
import net.minecraft.tileentity.TileEntityType;
|
||||||
import net.minecraft.util.Direction.Axis;
|
import net.minecraft.util.Direction.Axis;
|
||||||
import net.minecraft.util.NonNullList;
|
|
||||||
import net.minecraft.util.math.AxisAlignedBB;
|
import net.minecraft.util.math.AxisAlignedBB;
|
||||||
import net.minecraft.util.math.MathHelper;
|
import net.minecraft.util.math.MathHelper;
|
||||||
import net.minecraft.util.math.Vec3d;
|
import net.minecraft.util.math.Vec3d;
|
||||||
import net.minecraftforge.fluids.FluidStack;
|
|
||||||
|
|
||||||
public class MechanicalMixerTileEntity extends BasinOperatingTileEntity {
|
public class MechanicalMixerTileEntity extends BasinOperatingTileEntity {
|
||||||
|
|
||||||
|
@ -99,13 +91,6 @@ public class MechanicalMixerTileEntity extends BasinOperatingTileEntity {
|
||||||
super.write(compound, clientPacket);
|
super.write(compound, clientPacket);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void lazyTick() {
|
|
||||||
super.lazyTick();
|
|
||||||
if (world != null && world.isRemote && running && !basinItemInv.isPresent())
|
|
||||||
updateBasin();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void tick() {
|
public void tick() {
|
||||||
super.tick();
|
super.tick();
|
||||||
|
@ -168,45 +153,11 @@ public class MechanicalMixerTileEntity extends BasinOperatingTileEntity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected <C extends IInventory> boolean matchStaticFilters(IRecipe<C> r) {
|
protected <C extends IInventory> boolean matchStaticFilters(IRecipe<C> r) {
|
||||||
return (r.getSerializer() == IRecipeSerializer.CRAFTING_SHAPELESS || r.getType() == AllRecipeTypes.MIXING.type)
|
return ((r.getSerializer() == IRecipeSerializer.CRAFTING_SHAPELESS
|
||||||
|
&& AllConfigs.SERVER.recipes.allowShapelessInMixer.get()) || r.getType() == AllRecipeTypes.MIXING.type)
|
||||||
&& !MechanicalPressTileEntity.canCompress(r.getIngredients());
|
&& !MechanicalPressTileEntity.canCompress(r.getIngredients());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected <C extends IInventory> boolean matchBasinRecipe(IRecipe<C> recipe) {
|
|
||||||
if (!super.matchBasinRecipe(recipe))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
NonNullList<Ingredient> ingredients = recipe.getIngredients();
|
|
||||||
List<ItemStack> remainingItems = new ArrayList<>();
|
|
||||||
itemInputs.forEach(stack -> remainingItems.add(stack.copy()));
|
|
||||||
List<FluidStack> remainingFluids = new ArrayList<>();
|
|
||||||
fluidInputs.forEach(stack -> remainingFluids.add(stack.copy()));
|
|
||||||
|
|
||||||
// TODO: match fluid inputs
|
|
||||||
|
|
||||||
// Sort by leniency
|
|
||||||
List<Ingredient> sortedIngredients = new LinkedList<>(ingredients);
|
|
||||||
sortedIngredients.sort(Comparator.comparingInt(i -> i.getMatchingStacks().length));
|
|
||||||
|
|
||||||
Ingredients: for (Ingredient ingredient : sortedIngredients) {
|
|
||||||
for (ItemStack stack : remainingItems) {
|
|
||||||
if (stack.isEmpty())
|
|
||||||
continue;
|
|
||||||
if (ingredient.test(stack)) {
|
|
||||||
stack.shrink(1);
|
|
||||||
continue Ingredients;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(recipe instanceof MixingRecipe))
|
|
||||||
return true;
|
|
||||||
return ((MixingRecipe) recipe).getRequiredHeat()
|
|
||||||
.testBlazeBurner(getHeatLevel());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void startProcessingBasin() {
|
public void startProcessingBasin() {
|
||||||
if (running && runningTicks <= 20)
|
if (running && runningTicks <= 20)
|
||||||
|
@ -240,12 +191,9 @@ public class MechanicalMixerTileEntity extends BasinOperatingTileEntity {
|
||||||
return running;
|
return running;
|
||||||
}
|
}
|
||||||
|
|
||||||
private HeatLevel getHeatLevel() {
|
@Override
|
||||||
if (world == null)
|
protected Optional<ITriggerable> getProcessedRecipeTrigger() {
|
||||||
return HeatLevel.NONE;
|
return Optional.of(AllTriggers.MIXER_MIX);
|
||||||
BlockState state = world.getBlockState(pos.down(3));
|
|
||||||
if (state.has(BlazeBurnerBlock.HEAT_LEVEL))
|
|
||||||
return state.get(BlazeBurnerBlock.HEAT_LEVEL);
|
|
||||||
return AllTags.AllBlockTags.FAN_HEATERS.matches(state) ? HeatLevel.SMOULDERING : HeatLevel.NONE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,98 +1,13 @@
|
||||||
package com.simibubi.create.content.contraptions.components.mixer;
|
package com.simibubi.create.content.contraptions.components.mixer;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Comparator;
|
|
||||||
import java.util.LinkedList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
|
||||||
|
|
||||||
import com.simibubi.create.AllRecipeTypes;
|
import com.simibubi.create.AllRecipeTypes;
|
||||||
import com.simibubi.create.content.contraptions.processing.ProcessingRecipe;
|
import com.simibubi.create.content.contraptions.processing.BasinRecipe;
|
||||||
import com.simibubi.create.content.contraptions.processing.ProcessingRecipeBuilder;
|
|
||||||
import com.simibubi.create.content.contraptions.processing.ProcessingRecipeBuilder.ProcessingRecipeParams;
|
import com.simibubi.create.content.contraptions.processing.ProcessingRecipeBuilder.ProcessingRecipeParams;
|
||||||
import com.simibubi.create.foundation.item.SmartInventory;
|
|
||||||
|
|
||||||
import net.minecraft.item.ItemStack;
|
public class MixingRecipe extends BasinRecipe {
|
||||||
import net.minecraft.item.crafting.IRecipe;
|
|
||||||
import net.minecraft.item.crafting.Ingredient;
|
|
||||||
import net.minecraft.util.NonNullList;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
public class MixingRecipe extends ProcessingRecipe<SmartInventory> {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* For JEI purposes only
|
|
||||||
*/
|
|
||||||
public static MixingRecipe convertShapeless(IRecipe<?> recipe) {
|
|
||||||
return new ProcessingRecipeBuilder<>(MixingRecipe::new, recipe.getId())
|
|
||||||
.withItemIngredients(recipe.getIngredients())
|
|
||||||
.withSingleItemOutput(recipe.getRecipeOutput())
|
|
||||||
.build();
|
|
||||||
}
|
|
||||||
|
|
||||||
public MixingRecipe(ProcessingRecipeParams params) {
|
public MixingRecipe(ProcessingRecipeParams params) {
|
||||||
super(AllRecipeTypes.MIXING, params);
|
super(AllRecipeTypes.MIXING, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected int getMaxInputCount() {
|
|
||||||
return 9;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected int getMaxOutputCount() {
|
|
||||||
return 1;// TODO increase
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected int getMaxFluidInputCount() {
|
|
||||||
return 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected int getMaxFluidOutputCount() {
|
|
||||||
return 1;// TODO increase?
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected boolean canRequireHeat() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean matches(SmartInventory inv, @Nonnull World worldIn) {
|
|
||||||
if (inv.isEmpty())
|
|
||||||
return false;
|
|
||||||
|
|
||||||
NonNullList<Ingredient> ingredients = this.getIngredients();
|
|
||||||
if (!ingredients.stream()
|
|
||||||
.allMatch(Ingredient::isSimple))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
List<ItemStack> remaining = new ArrayList<>();
|
|
||||||
for (int slot = 0; slot < inv.getSizeInventory(); ++slot) {
|
|
||||||
ItemStack itemstack = inv.getStackInSlot(slot);
|
|
||||||
if (!itemstack.isEmpty()) {
|
|
||||||
remaining.add(itemstack.copy());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// sort by leniency
|
|
||||||
List<Ingredient> sortedIngredients = new LinkedList<>(ingredients);
|
|
||||||
sortedIngredients.sort(Comparator.comparingInt(i -> i.getMatchingStacks().length));
|
|
||||||
Ingredients: for (Ingredient ingredient : sortedIngredients) {
|
|
||||||
for (ItemStack stack : remaining) {
|
|
||||||
if (stack.isEmpty())
|
|
||||||
continue;
|
|
||||||
if (ingredient.test(stack)) {
|
|
||||||
stack.shrink(1);
|
|
||||||
continue Ingredients;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,8 @@ import com.simibubi.create.content.contraptions.processing.BasinOperatingTileEnt
|
||||||
import com.simibubi.create.content.contraptions.processing.BasinTileEntity;
|
import com.simibubi.create.content.contraptions.processing.BasinTileEntity;
|
||||||
import com.simibubi.create.content.logistics.InWorldProcessing;
|
import com.simibubi.create.content.logistics.InWorldProcessing;
|
||||||
import com.simibubi.create.foundation.advancement.AllTriggers;
|
import com.simibubi.create.foundation.advancement.AllTriggers;
|
||||||
|
import com.simibubi.create.foundation.advancement.ITriggerable;
|
||||||
|
import com.simibubi.create.foundation.config.AllConfigs;
|
||||||
import com.simibubi.create.foundation.item.ItemHelper;
|
import com.simibubi.create.foundation.item.ItemHelper;
|
||||||
import com.simibubi.create.foundation.item.SmartInventory;
|
import com.simibubi.create.foundation.item.SmartInventory;
|
||||||
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
||||||
|
@ -41,29 +43,12 @@ public class MechanicalPressTileEntity extends BasinOperatingTileEntity {
|
||||||
|
|
||||||
private static final Object compressingRecipesKey = new Object();
|
private static final Object compressingRecipesKey = new Object();
|
||||||
public List<ItemStack> pressedItems = new ArrayList<>();
|
public List<ItemStack> pressedItems = new ArrayList<>();
|
||||||
|
|
||||||
public static class PressingInv extends RecipeWrapper {
|
|
||||||
public PressingInv() {
|
|
||||||
super(new ItemStackHandler(1));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
enum Mode {
|
|
||||||
WORLD(1), BELT(19f / 16f), BASIN(22f / 16f)
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
float headOffset;
|
|
||||||
|
|
||||||
Mode(float headOffset) {
|
|
||||||
this.headOffset = headOffset;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static final PressingInv pressingInv = new PressingInv();
|
|
||||||
public BeltProcessingBehaviour processingBehaviour;
|
public BeltProcessingBehaviour processingBehaviour;
|
||||||
|
|
||||||
|
public int prevRunningTicks;
|
||||||
public int runningTicks;
|
public int runningTicks;
|
||||||
|
static final int CYCLE = 240;
|
||||||
|
|
||||||
public boolean running;
|
public boolean running;
|
||||||
public Mode mode;
|
public Mode mode;
|
||||||
public boolean finished;
|
public boolean finished;
|
||||||
|
@ -87,7 +72,7 @@ public class MechanicalPressTileEntity extends BasinOperatingTileEntity {
|
||||||
running = compound.getBoolean("Running");
|
running = compound.getBoolean("Running");
|
||||||
mode = Mode.values()[compound.getInt("Mode")];
|
mode = Mode.values()[compound.getInt("Mode")];
|
||||||
finished = compound.getBoolean("Finished");
|
finished = compound.getBoolean("Finished");
|
||||||
runningTicks = compound.getInt("Ticks");
|
prevRunningTicks = runningTicks = compound.getInt("Ticks");
|
||||||
super.read(compound, clientPacket);
|
super.read(compound, clientPacket);
|
||||||
|
|
||||||
if (clientPacket) {
|
if (clientPacket) {
|
||||||
|
@ -105,8 +90,10 @@ public class MechanicalPressTileEntity extends BasinOperatingTileEntity {
|
||||||
compound.putInt("Ticks", runningTicks);
|
compound.putInt("Ticks", runningTicks);
|
||||||
super.write(compound, clientPacket);
|
super.write(compound, clientPacket);
|
||||||
|
|
||||||
if (clientPacket)
|
if (clientPacket) {
|
||||||
compound.put("ParticleItems", NBTHelper.writeCompoundList(pressedItems, ItemStack::serializeNBT));
|
compound.put("ParticleItems", NBTHelper.writeCompoundList(pressedItems, ItemStack::serializeNBT));
|
||||||
|
pressedItems.clear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -116,15 +103,12 @@ public class MechanicalPressTileEntity extends BasinOperatingTileEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
public float getRenderedHeadOffset(float partialTicks) {
|
public float getRenderedHeadOffset(float partialTicks) {
|
||||||
if (running) {
|
if (!running)
|
||||||
if (runningTicks < 40) {
|
|
||||||
float num = (runningTicks - 1 + partialTicks) / 30f;
|
|
||||||
return MathHelper.clamp(num * num * num, 0, mode.headOffset);
|
|
||||||
}
|
|
||||||
return MathHelper.clamp(((60 - runningTicks) + 1 - partialTicks) / 20f * mode.headOffset, 0,
|
|
||||||
mode.headOffset);
|
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
|
float ticks = MathHelper.lerp(partialTicks, prevRunningTicks, runningTicks);
|
||||||
|
if (runningTicks < (CYCLE * 2) / 3)
|
||||||
|
return (float) MathHelper.clamp(Math.pow(ticks / CYCLE * 2, 3), 0, mode.headOffset);
|
||||||
|
return MathHelper.clamp((CYCLE - ticks) / CYCLE * 3 * mode.headOffset, 0, mode.headOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void start(Mode mode) {
|
public void start(Mode mode) {
|
||||||
|
@ -150,34 +134,44 @@ public class MechanicalPressTileEntity extends BasinOperatingTileEntity {
|
||||||
if (!running || world == null)
|
if (!running || world == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (runningTicks == 30) {
|
if (runningTicks == CYCLE / 2) {
|
||||||
|
if (inWorld())
|
||||||
|
applyPressingInWorld();
|
||||||
|
if (onBasin())
|
||||||
|
applyCompactingOnBasin();
|
||||||
|
if (!world.isRemote) {
|
||||||
|
world.playSound(null, getPos(), AllSoundEvents.MECHANICAL_PRESS_ITEM_BREAK.get(), SoundCategory.BLOCKS,
|
||||||
|
.5f, 1f);
|
||||||
|
world.playSound(null, getPos(), AllSoundEvents.MECHANICAL_PRESS_ACTIVATION.get(), SoundCategory.BLOCKS,
|
||||||
|
.125f, 1f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!world.isRemote && runningTicks > CYCLE) {
|
||||||
|
finished = true;
|
||||||
|
if (inWorld())
|
||||||
|
finished = world.isBlockPowered(pos);
|
||||||
|
running = false;
|
||||||
|
|
||||||
|
if (onBasin() && matchBasinRecipe(currentRecipe))
|
||||||
|
startProcessingBasin();
|
||||||
|
|
||||||
if (inWorld()) {
|
|
||||||
AxisAlignedBB bb = new AxisAlignedBB(pos.down(1));
|
|
||||||
pressedItems.clear();
|
pressedItems.clear();
|
||||||
for (Entity entity : world.getEntitiesWithinAABBExcludingEntity(null, bb)) {
|
|
||||||
if (!(entity instanceof ItemEntity))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
ItemEntity itemEntity = (ItemEntity) entity;
|
|
||||||
|
|
||||||
if (!world.isRemote) {
|
|
||||||
pressedItems.add(itemEntity.getItem());
|
|
||||||
sendData();
|
sendData();
|
||||||
Optional<PressingRecipe> recipe = getRecipe(itemEntity.getItem());
|
return;
|
||||||
if (recipe.isPresent()) {
|
|
||||||
InWorldProcessing.applyRecipeOn(itemEntity, recipe.get());
|
|
||||||
AllTriggers.triggerForNearbyPlayers(AllTriggers.BONK, world, pos, 4);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (onBasin()) {
|
prevRunningTicks = runningTicks;
|
||||||
if (!world.isRemote) {
|
runningTicks += getRunningTickSpeed();
|
||||||
|
if (prevRunningTicks < CYCLE / 2 && runningTicks >= CYCLE / 2)
|
||||||
|
runningTicks = CYCLE / 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void applyCompactingOnBasin() {
|
||||||
|
if (world.isRemote)
|
||||||
|
return;
|
||||||
pressedItems.clear();
|
pressedItems.clear();
|
||||||
applyBasinRecipe();
|
applyBasinRecipe();
|
||||||
|
|
||||||
Optional<BasinTileEntity> basin = getBasin();
|
Optional<BasinTileEntity> basin = getBasin();
|
||||||
SmartInventory inputs = basin.get()
|
SmartInventory inputs = basin.get()
|
||||||
.getInputInventory();
|
.getInputInventory();
|
||||||
|
@ -192,58 +186,50 @@ public class MechanicalPressTileEntity extends BasinOperatingTileEntity {
|
||||||
sendData();
|
sendData();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
protected void applyPressingInWorld() {
|
||||||
|
AxisAlignedBB bb = new AxisAlignedBB(pos.down(1));
|
||||||
if (!world.isRemote) {
|
|
||||||
world.playSound(null, getPos(), AllSoundEvents.MECHANICAL_PRESS_ITEM_BREAK.get(), SoundCategory.BLOCKS,
|
|
||||||
.5f, 1f);
|
|
||||||
world.playSound(null, getPos(), AllSoundEvents.MECHANICAL_PRESS_ACTIVATION.get(), SoundCategory.BLOCKS,
|
|
||||||
.125f, 1f);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!world.isRemote && runningTicks > 60) {
|
|
||||||
finished = true;
|
|
||||||
if (inWorld())
|
|
||||||
finished = world.isBlockPowered(pos);
|
|
||||||
running = false;
|
|
||||||
|
|
||||||
if (onBasin()) {
|
|
||||||
gatherInputs();
|
|
||||||
if (matchBasinRecipe(lastRecipe)) {
|
|
||||||
startProcessingBasin();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pressedItems.clear();
|
pressedItems.clear();
|
||||||
sendData();
|
if (world.isRemote)
|
||||||
return;
|
return;
|
||||||
|
for (Entity entity : world.getEntitiesWithinAABBExcludingEntity(null, bb)) {
|
||||||
|
if (!(entity instanceof ItemEntity))
|
||||||
|
continue;
|
||||||
|
ItemEntity itemEntity = (ItemEntity) entity;
|
||||||
|
pressedItems.add(itemEntity.getItem());
|
||||||
|
sendData();
|
||||||
|
Optional<PressingRecipe> recipe = getRecipe(itemEntity.getItem());
|
||||||
|
if (!recipe.isPresent())
|
||||||
|
continue;
|
||||||
|
InWorldProcessing.applyRecipeOn(itemEntity, recipe.get());
|
||||||
|
AllTriggers.triggerForNearbyPlayers(AllTriggers.BONK, world, pos, 4);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
runningTicks++;
|
public int getRunningTickSpeed() {
|
||||||
|
if (getSpeed() == 0)
|
||||||
|
return 0;
|
||||||
|
return (int) MathHelper.lerp(MathHelper.clamp(Math.abs(getSpeed()) / 512f, 0, 1), 1, 60);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void spawnParticles() {
|
protected void spawnParticles() {
|
||||||
if (pressedItems.isEmpty())
|
if (pressedItems.isEmpty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (mode == Mode.BASIN) {
|
if (mode == Mode.BASIN)
|
||||||
pressedItems.forEach(stack -> makeCompactingParticleEffect(VecHelper.getCenterOf(pos.down(2)), stack));
|
pressedItems.forEach(stack -> makeCompactingParticleEffect(VecHelper.getCenterOf(pos.down(2)), stack));
|
||||||
}
|
if (mode == Mode.BELT)
|
||||||
if (mode == Mode.BELT) {
|
|
||||||
pressedItems.forEach(stack -> makePressingParticleEffect(VecHelper.getCenterOf(pos.down(2))
|
pressedItems.forEach(stack -> makePressingParticleEffect(VecHelper.getCenterOf(pos.down(2))
|
||||||
.add(0, 8 / 16f, 0), stack));
|
.add(0, 8 / 16f, 0), stack));
|
||||||
}
|
if (mode == Mode.WORLD)
|
||||||
if (mode == Mode.WORLD) {
|
|
||||||
pressedItems.forEach(stack -> makePressingParticleEffect(VecHelper.getCenterOf(pos.down(1))
|
pressedItems.forEach(stack -> makePressingParticleEffect(VecHelper.getCenterOf(pos.down(1))
|
||||||
.add(0, -1 / 4f, 0), stack));
|
.add(0, -1 / 4f, 0), stack));
|
||||||
}
|
|
||||||
|
|
||||||
pressedItems.clear();
|
pressedItems.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void makePressingParticleEffect(Vec3d pos, ItemStack stack) {
|
public void makePressingParticleEffect(Vec3d pos, ItemStack stack) {
|
||||||
if (world != null && world.isRemote) {
|
if (world == null || !world.isRemote)
|
||||||
|
return;
|
||||||
for (int i = 0; i < 20; i++) {
|
for (int i = 0; i < 20; i++) {
|
||||||
Vec3d motion = VecHelper.offsetRandomly(Vec3d.ZERO, world.rand, .125f)
|
Vec3d motion = VecHelper.offsetRandomly(Vec3d.ZERO, world.rand, .125f)
|
||||||
.mul(1, 0, 1);
|
.mul(1, 0, 1);
|
||||||
|
@ -251,10 +237,10 @@ public class MechanicalPressTileEntity extends BasinOperatingTileEntity {
|
||||||
motion.y + .125f, motion.z);
|
motion.y + .125f, motion.z);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public void makeCompactingParticleEffect(Vec3d pos, ItemStack stack) {
|
public void makeCompactingParticleEffect(Vec3d pos, ItemStack stack) {
|
||||||
if (world != null && world.isRemote) {
|
if (world == null || !world.isRemote)
|
||||||
|
return;
|
||||||
for (int i = 0; i < 20; i++) {
|
for (int i = 0; i < 20; i++) {
|
||||||
Vec3d motion = VecHelper.offsetRandomly(Vec3d.ZERO, world.rand, .175f)
|
Vec3d motion = VecHelper.offsetRandomly(Vec3d.ZERO, world.rand, .175f)
|
||||||
.mul(1, 0, 1);
|
.mul(1, 0, 1);
|
||||||
|
@ -262,45 +248,24 @@ public class MechanicalPressTileEntity extends BasinOperatingTileEntity {
|
||||||
motion.y + .25f, motion.z);
|
motion.y + .25f, motion.z);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
private static final RecipeWrapper pressingInv = new RecipeWrapper(new ItemStackHandler(1));
|
||||||
|
|
||||||
public Optional<PressingRecipe> getRecipe(ItemStack item) {
|
public Optional<PressingRecipe> getRecipe(ItemStack item) {
|
||||||
pressingInv.setInventorySlotContents(0, item);
|
pressingInv.setInventorySlotContents(0, item);
|
||||||
return world.getRecipeManager()
|
return AllRecipeTypes.PRESSING.find(pressingInv, world);
|
||||||
.getRecipe(AllRecipeTypes.PRESSING.getType(), pressingInv, world);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean canCompress(NonNullList<Ingredient> ingredients) {
|
public static boolean canCompress(NonNullList<Ingredient> ingredients) {
|
||||||
return (ingredients.size() == 4 || ingredients.size() == 9) && ItemHelper.condenseIngredients(ingredients)
|
return AllConfigs.SERVER.recipes.allowShapedSquareInPress.get()
|
||||||
|
&& (ingredients.size() == 4 || ingredients.size() == 9) && ItemHelper.condenseIngredients(ingredients)
|
||||||
.size() == 1;
|
.size() == 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected <C extends IInventory> boolean matchStaticFilters(IRecipe<C> recipe) {
|
protected <C extends IInventory> boolean matchStaticFilters(IRecipe<C> recipe) {
|
||||||
return recipe instanceof ICraftingRecipe && canCompress(recipe.getIngredients());
|
return (recipe instanceof ICraftingRecipe && canCompress(recipe.getIngredients()))
|
||||||
}
|
|| recipe.getType() == AllRecipeTypes.COMPACTING.type;
|
||||||
|
|
||||||
@Override
|
|
||||||
protected <C extends IInventory> boolean matchBasinRecipe(IRecipe<C> recipe) {
|
|
||||||
if (!super.matchBasinRecipe(recipe))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
NonNullList<Ingredient> ingredients = recipe.getIngredients();
|
|
||||||
List<ItemStack> remainingItems = new ArrayList<>();
|
|
||||||
itemInputs.forEach(stack -> remainingItems.add(stack.copy()));
|
|
||||||
|
|
||||||
Ingredients: for (Ingredient ingredient : ingredients) {
|
|
||||||
for (ItemStack stack : remainingItems) {
|
|
||||||
if (stack.isEmpty())
|
|
||||||
continue;
|
|
||||||
if (ingredient.test(stack)) {
|
|
||||||
stack.shrink(1);
|
|
||||||
continue Ingredients;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -310,7 +275,7 @@ public class MechanicalPressTileEntity extends BasinOperatingTileEntity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void startProcessingBasin() {
|
public void startProcessingBasin() {
|
||||||
if (running && runningTicks <= 30)
|
if (running && runningTicks <= CYCLE / 2)
|
||||||
return;
|
return;
|
||||||
super.startProcessingBasin();
|
super.startProcessingBasin();
|
||||||
start(Mode.BASIN);
|
start(Mode.BASIN);
|
||||||
|
@ -329,4 +294,21 @@ public class MechanicalPressTileEntity extends BasinOperatingTileEntity {
|
||||||
return running;
|
return running;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Optional<ITriggerable> getProcessedRecipeTrigger() {
|
||||||
|
return Optional.of(AllTriggers.PRESS_COMPACT);
|
||||||
|
}
|
||||||
|
|
||||||
|
enum Mode {
|
||||||
|
WORLD(1), BELT(19f / 16f), BASIN(22f / 16f)
|
||||||
|
|
||||||
|
;
|
||||||
|
|
||||||
|
float headOffset;
|
||||||
|
|
||||||
|
Mode(float headOffset) {
|
||||||
|
this.headOffset = headOffset;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,21 +3,21 @@ package com.simibubi.create.content.contraptions.components.press;
|
||||||
import javax.annotation.ParametersAreNonnullByDefault;
|
import javax.annotation.ParametersAreNonnullByDefault;
|
||||||
|
|
||||||
import com.simibubi.create.AllRecipeTypes;
|
import com.simibubi.create.AllRecipeTypes;
|
||||||
import com.simibubi.create.content.contraptions.components.press.MechanicalPressTileEntity.PressingInv;
|
|
||||||
import com.simibubi.create.content.contraptions.processing.ProcessingRecipe;
|
import com.simibubi.create.content.contraptions.processing.ProcessingRecipe;
|
||||||
import com.simibubi.create.content.contraptions.processing.ProcessingRecipeBuilder.ProcessingRecipeParams;
|
import com.simibubi.create.content.contraptions.processing.ProcessingRecipeBuilder.ProcessingRecipeParams;
|
||||||
|
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.items.wrapper.RecipeWrapper;
|
||||||
|
|
||||||
@ParametersAreNonnullByDefault
|
@ParametersAreNonnullByDefault
|
||||||
public class PressingRecipe extends ProcessingRecipe<MechanicalPressTileEntity.PressingInv> {
|
public class PressingRecipe extends ProcessingRecipe<RecipeWrapper> {
|
||||||
|
|
||||||
public PressingRecipe(ProcessingRecipeParams params) {
|
public PressingRecipe(ProcessingRecipeParams params) {
|
||||||
super(AllRecipeTypes.PRESSING, params);
|
super(AllRecipeTypes.PRESSING, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matches(PressingInv inv, World worldIn) {
|
public boolean matches(RecipeWrapper inv, World worldIn) {
|
||||||
if (inv.isEmpty())
|
if (inv.isEmpty())
|
||||||
return false;
|
return false;
|
||||||
return ingredients.get(0)
|
return ingredients.get(0)
|
||||||
|
|
|
@ -8,9 +8,11 @@ import java.util.List;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import com.google.common.base.Predicate;
|
||||||
import com.simibubi.create.AllRecipeTypes;
|
import com.simibubi.create.AllRecipeTypes;
|
||||||
import com.simibubi.create.content.contraptions.components.actors.BlockBreakingKineticTileEntity;
|
import com.simibubi.create.content.contraptions.components.actors.BlockBreakingKineticTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.processing.ProcessingInventory;
|
import com.simibubi.create.content.contraptions.processing.ProcessingInventory;
|
||||||
|
import com.simibubi.create.foundation.config.AllConfigs;
|
||||||
import com.simibubi.create.foundation.item.ItemHelper;
|
import com.simibubi.create.foundation.item.ItemHelper;
|
||||||
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
||||||
import com.simibubi.create.foundation.tileEntity.behaviour.belt.DirectBeltInputBehaviour;
|
import com.simibubi.create.foundation.tileEntity.behaviour.belt.DirectBeltInputBehaviour;
|
||||||
|
@ -264,8 +266,10 @@ public class SawTileEntity extends BlockBreakingKineticTileEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<? extends IRecipe<?>> getRecipes() {
|
private List<? extends IRecipe<?>> getRecipes() {
|
||||||
List<IRecipe<?>> startedSearch = RecipeFinder.get(cuttingRecipesKey, world,
|
Predicate<IRecipe<?>> types = AllConfigs.SERVER.recipes.allowStonecuttingOnSaw.get()
|
||||||
RecipeConditions.isOfType(IRecipeType.STONECUTTING, AllRecipeTypes.CUTTING.getType()));
|
? RecipeConditions.isOfType(IRecipeType.STONECUTTING, AllRecipeTypes.CUTTING.getType())
|
||||||
|
: RecipeConditions.isOfType(AllRecipeTypes.CUTTING.getType());
|
||||||
|
List<IRecipe<?>> startedSearch = RecipeFinder.get(cuttingRecipesKey, world, types);
|
||||||
return startedSearch.stream()
|
return startedSearch.stream()
|
||||||
.filter(RecipeConditions.outputMatchesFilter(filtering))
|
.filter(RecipeConditions.outputMatchesFilter(filtering))
|
||||||
.filter(RecipeConditions.firstIngredientMatches(inventory.getStackInSlot(0)))
|
.filter(RecipeConditions.firstIngredientMatches(inventory.getStackInSlot(0)))
|
||||||
|
|
|
@ -9,13 +9,13 @@ import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
import com.simibubi.create.AllMovementBehaviours;
|
|
||||||
import org.apache.commons.lang3.mutable.MutableBoolean;
|
import org.apache.commons.lang3.mutable.MutableBoolean;
|
||||||
import org.apache.commons.lang3.mutable.MutableObject;
|
import org.apache.commons.lang3.mutable.MutableObject;
|
||||||
|
|
||||||
import com.google.common.base.Predicates;
|
import com.google.common.base.Predicates;
|
||||||
import com.google.common.collect.ImmutableSet;
|
import com.google.common.collect.ImmutableSet;
|
||||||
import com.simibubi.create.AllBlocks;
|
import com.simibubi.create.AllBlocks;
|
||||||
|
import com.simibubi.create.AllMovementBehaviours;
|
||||||
import com.simibubi.create.content.contraptions.components.actors.BlockBreakingMovementBehaviour;
|
import com.simibubi.create.content.contraptions.components.actors.BlockBreakingMovementBehaviour;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.sync.ClientMotionPacket;
|
import com.simibubi.create.content.contraptions.components.structureMovement.sync.ClientMotionPacket;
|
||||||
import com.simibubi.create.foundation.collision.ContinuousOBBCollider.ContinuousSeparationManifold;
|
import com.simibubi.create.foundation.collision.ContinuousOBBCollider.ContinuousSeparationManifold;
|
||||||
|
@ -28,6 +28,7 @@ import com.simibubi.create.foundation.utility.VecHelper;
|
||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.CocoaBlock;
|
import net.minecraft.block.CocoaBlock;
|
||||||
|
import net.minecraft.client.entity.player.ClientPlayerEntity;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.EntityType;
|
import net.minecraft.entity.EntityType;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
@ -37,6 +38,7 @@ import net.minecraft.util.Direction.AxisDirection;
|
||||||
import net.minecraft.util.ReuseableStream;
|
import net.minecraft.util.ReuseableStream;
|
||||||
import net.minecraft.util.math.AxisAlignedBB;
|
import net.minecraft.util.math.AxisAlignedBB;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.util.math.MathHelper;
|
||||||
import net.minecraft.util.math.Vec3d;
|
import net.minecraft.util.math.Vec3d;
|
||||||
import net.minecraft.util.math.shapes.IBooleanFunction;
|
import net.minecraft.util.math.shapes.IBooleanFunction;
|
||||||
import net.minecraft.util.math.shapes.ISelectionContext;
|
import net.minecraft.util.math.shapes.ISelectionContext;
|
||||||
|
@ -44,6 +46,9 @@ import net.minecraft.util.math.shapes.VoxelShape;
|
||||||
import net.minecraft.util.math.shapes.VoxelShapes;
|
import net.minecraft.util.math.shapes.VoxelShapes;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.gen.feature.template.Template.BlockInfo;
|
import net.minecraft.world.gen.feature.template.Template.BlockInfo;
|
||||||
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
|
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||||
|
import net.minecraftforge.fml.DistExecutor;
|
||||||
|
|
||||||
public class ContraptionCollider {
|
public class ContraptionCollider {
|
||||||
|
|
||||||
|
@ -54,14 +59,20 @@ public class ContraptionCollider {
|
||||||
for (Iterator<WeakReference<ContraptionEntity>> iterator = list.iterator(); iterator.hasNext();) {
|
for (Iterator<WeakReference<ContraptionEntity>> iterator = list.iterator(); iterator.hasNext();) {
|
||||||
WeakReference<ContraptionEntity> weakReference = iterator.next();
|
WeakReference<ContraptionEntity> weakReference = iterator.next();
|
||||||
ContraptionEntity contraptionEntity = weakReference.get();
|
ContraptionEntity contraptionEntity = weakReference.get();
|
||||||
if (contraptionEntity == null || !contraptionEntity.isAlive()) {
|
if (contraptionEntity == null) {
|
||||||
iterator.remove();
|
iterator.remove();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (!contraptionEntity.isAlive())
|
||||||
|
continue;
|
||||||
collideEntities(contraptionEntity);
|
collideEntities(contraptionEntity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum PlayerType {
|
||||||
|
NONE, CLIENT, REMOTE, SERVER
|
||||||
|
}
|
||||||
|
|
||||||
private static void collideEntities(ContraptionEntity contraptionEntity) {
|
private static void collideEntities(ContraptionEntity contraptionEntity) {
|
||||||
World world = contraptionEntity.getEntityWorld();
|
World world = contraptionEntity.getEntityWorld();
|
||||||
Contraption contraption = contraptionEntity.getContraption();
|
Contraption contraption = contraptionEntity.getContraption();
|
||||||
|
@ -87,8 +98,10 @@ public class ContraptionCollider {
|
||||||
|
|
||||||
for (Entity entity : world.getEntitiesWithinAABB((EntityType<?>) null, bounds.grow(2)
|
for (Entity entity : world.getEntitiesWithinAABB((EntityType<?>) null, bounds.grow(2)
|
||||||
.expand(0, 32, 0), contraptionEntity::canCollideWith)) {
|
.expand(0, 32, 0), contraptionEntity::canCollideWith)) {
|
||||||
boolean player = entity instanceof PlayerEntity;
|
|
||||||
boolean serverPlayer = player && !world.isRemote;
|
PlayerType playerType = getPlayerType(entity);
|
||||||
|
if (playerType == PlayerType.REMOTE)
|
||||||
|
continue;
|
||||||
|
|
||||||
// Init matrix
|
// Init matrix
|
||||||
if (rotation == null) {
|
if (rotation == null) {
|
||||||
|
@ -199,7 +212,7 @@ public class ContraptionCollider {
|
||||||
totalResponse = rotation.transform(totalResponse);
|
totalResponse = rotation.transform(totalResponse);
|
||||||
rotation.transpose();
|
rotation.transpose();
|
||||||
|
|
||||||
if (futureCollision.isTrue() && !serverPlayer) {
|
if (futureCollision.isTrue() && playerType != PlayerType.SERVER) {
|
||||||
if (motionResponse.y != entityMotion.y) {
|
if (motionResponse.y != entityMotion.y) {
|
||||||
entity.setMotion(entityMotion.mul(1, 0, 1)
|
entity.setMotion(entityMotion.mul(1, 0, 1)
|
||||||
.add(0, motionResponse.y, 0));
|
.add(0, motionResponse.y, 0));
|
||||||
|
@ -212,7 +225,7 @@ public class ContraptionCollider {
|
||||||
entity.fallDistance = 0;
|
entity.fallDistance = 0;
|
||||||
entity.onGround = true;
|
entity.onGround = true;
|
||||||
contraptionEntity.collidingEntities.add(entity);
|
contraptionEntity.collidingEntities.add(entity);
|
||||||
if (!serverPlayer)
|
if (playerType != PlayerType.SERVER)
|
||||||
contactPointMotion = contraptionEntity.getContactPointMotion(entityPosition);
|
contactPointMotion = contraptionEntity.getContactPointMotion(entityPosition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -236,7 +249,7 @@ public class ContraptionCollider {
|
||||||
if (!hardCollision && surfaceCollision.isFalse())
|
if (!hardCollision && surfaceCollision.isFalse())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (serverPlayer && entity instanceof ServerPlayerEntity) {
|
if (playerType == PlayerType.SERVER && entity instanceof ServerPlayerEntity) {
|
||||||
((ServerPlayerEntity) entity).connection.floatingTickCount = 0;
|
((ServerPlayerEntity) entity).connection.floatingTickCount = 0;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -249,8 +262,15 @@ public class ContraptionCollider {
|
||||||
entityPosition.z + allowedMovement.z);
|
entityPosition.z + allowedMovement.z);
|
||||||
entity.setMotion(entityMotion);
|
entity.setMotion(entityMotion);
|
||||||
|
|
||||||
if (!serverPlayer && player)
|
if (playerType != PlayerType.CLIENT)
|
||||||
AllPackets.channel.sendToServer(new ClientMotionPacket(entityMotion, true));
|
continue;
|
||||||
|
|
||||||
|
double d0 = entity.getX() - entity.prevPosX - contactPointMotion.x;
|
||||||
|
double d1 = entity.getZ() - entity.prevPosZ - contactPointMotion.z;
|
||||||
|
float limbSwing = MathHelper.sqrt(d0 * d0 + d1 * d1) * 4.0F;
|
||||||
|
if (limbSwing > 1.0F)
|
||||||
|
limbSwing = 1.0F;
|
||||||
|
AllPackets.channel.sendToServer(new ClientMotionPacket(entityMotion, true, limbSwing));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -296,6 +316,21 @@ public class ContraptionCollider {
|
||||||
return vec3d;
|
return vec3d;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static PlayerType getPlayerType(Entity entity) {
|
||||||
|
if (!(entity instanceof PlayerEntity))
|
||||||
|
return PlayerType.NONE;
|
||||||
|
if (!entity.world.isRemote)
|
||||||
|
return PlayerType.SERVER;
|
||||||
|
MutableBoolean isClient = new MutableBoolean(false);
|
||||||
|
DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> isClient.setValue(isClientPlayerEntity(entity)));
|
||||||
|
return isClient.booleanValue() ? PlayerType.CLIENT : PlayerType.REMOTE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@OnlyIn(Dist.CLIENT)
|
||||||
|
private static boolean isClientPlayerEntity(Entity entity) {
|
||||||
|
return entity instanceof ClientPlayerEntity;
|
||||||
|
}
|
||||||
|
|
||||||
private static ReuseableStream<VoxelShape> getPotentiallyCollidedShapes(World world, Contraption contraption,
|
private static ReuseableStream<VoxelShape> getPotentiallyCollidedShapes(World world, Contraption contraption,
|
||||||
AxisAlignedBB localBB) {
|
AxisAlignedBB localBB) {
|
||||||
|
|
||||||
|
@ -395,10 +430,10 @@ public class ContraptionCollider {
|
||||||
BlockInfo blockInfo = contraption.blocks.get(pos);
|
BlockInfo blockInfo = contraption.blocks.get(pos);
|
||||||
|
|
||||||
if (AllMovementBehaviours.hasMovementBehaviour(blockInfo.state.getBlock())) {
|
if (AllMovementBehaviours.hasMovementBehaviour(blockInfo.state.getBlock())) {
|
||||||
MovementBehaviour movementBehaviour = AllMovementBehaviours.getMovementBehaviour(blockInfo.state.getBlock());
|
MovementBehaviour movementBehaviour =
|
||||||
|
AllMovementBehaviours.getMovementBehaviour(blockInfo.state.getBlock());
|
||||||
if (movementBehaviour instanceof BlockBreakingMovementBehaviour) {
|
if (movementBehaviour instanceof BlockBreakingMovementBehaviour) {
|
||||||
BlockBreakingMovementBehaviour behaviour =
|
BlockBreakingMovementBehaviour behaviour = (BlockBreakingMovementBehaviour) movementBehaviour;
|
||||||
(BlockBreakingMovementBehaviour) movementBehaviour;
|
|
||||||
if (!behaviour.canBreak(world, colliderPos, collidedState)
|
if (!behaviour.canBreak(world, colliderPos, collidedState)
|
||||||
&& !collidedState.getCollisionShape(world, pos)
|
&& !collidedState.getCollisionShape(world, pos)
|
||||||
.isEmpty()) {
|
.isEmpty()) {
|
||||||
|
|
|
@ -78,6 +78,7 @@ public class ContraptionEntity extends Entity implements IEntityAdditionalSpawnD
|
||||||
final List<Entity> collidingEntities = new ArrayList<>();
|
final List<Entity> collidingEntities = new ArrayList<>();
|
||||||
private boolean isSerializingFurnaceCart;
|
private boolean isSerializingFurnaceCart;
|
||||||
private boolean attachedExtraInventories;
|
private boolean attachedExtraInventories;
|
||||||
|
private boolean prevPosInvalid;
|
||||||
|
|
||||||
private static final Ingredient FUEL_ITEMS = Ingredient.fromItems(Items.COAL, Items.CHARCOAL);
|
private static final Ingredient FUEL_ITEMS = Ingredient.fromItems(Items.COAL, Items.CHARCOAL);
|
||||||
private static final DataParameter<Boolean> STALLED =
|
private static final DataParameter<Boolean> STALLED =
|
||||||
|
@ -107,6 +108,7 @@ public class ContraptionEntity extends Entity implements IEntityAdditionalSpawnD
|
||||||
isSerializingFurnaceCart = false;
|
isSerializingFurnaceCart = false;
|
||||||
attachedExtraInventories = false;
|
attachedExtraInventories = false;
|
||||||
forcedAngle = -1;
|
forcedAngle = -1;
|
||||||
|
prevPosInvalid = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ContraptionEntity createMounted(World world, Contraption contraption, float initialAngle) {
|
public static ContraptionEntity createMounted(World world, Contraption contraption, float initialAngle) {
|
||||||
|
@ -290,14 +292,19 @@ public class ContraptionEntity extends Entity implements IEntityAdditionalSpawnD
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
prevPosX = getX();
|
||||||
|
prevPosY = getY();
|
||||||
|
prevPosZ = getZ();
|
||||||
|
prevPosInvalid = false;
|
||||||
|
|
||||||
if (!initialized)
|
if (!initialized)
|
||||||
contraptionInitialize();
|
contraptionInitialize();
|
||||||
|
|
||||||
checkController();
|
checkController();
|
||||||
|
|
||||||
Entity mountedEntity = getRidingEntity();
|
Entity mountedEntity = getRidingEntity();
|
||||||
if (mountedEntity != null) {
|
if (mountedEntity != null) {
|
||||||
tickAsPassenger(mountedEntity);
|
tickAsPassenger(mountedEntity);
|
||||||
|
super.tick();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -308,7 +315,8 @@ public class ContraptionEntity extends Entity implements IEntityAdditionalSpawnD
|
||||||
if (ContraptionCollider.collideBlocks(this))
|
if (ContraptionCollider.collideBlocks(this))
|
||||||
getController().collided();
|
getController().collided();
|
||||||
|
|
||||||
tickActors(getPositionVec().subtract(prevPosX, prevPosY, prevPosZ));
|
Vec3d movement = getPositionVec().subtract(prevPosX, prevPosY, prevPosZ);
|
||||||
|
tickActors(movement);
|
||||||
|
|
||||||
prevYaw = yaw;
|
prevYaw = yaw;
|
||||||
prevPitch = pitch;
|
prevPitch = pitch;
|
||||||
|
@ -439,8 +447,6 @@ public class ContraptionEntity extends Entity implements IEntityAdditionalSpawnD
|
||||||
furnaceCart.deserializeNBT(nbt);
|
furnaceCart.deserializeNBT(nbt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
super.tick();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void tickActors(Vec3d movementVector) {
|
public void tickActors(Vec3d movementVector) {
|
||||||
|
@ -846,6 +852,9 @@ public class ContraptionEntity extends Entity implements IEntityAdditionalSpawnD
|
||||||
}
|
}
|
||||||
|
|
||||||
public Vec3d getContactPointMotion(Vec3d globalContactPoint) {
|
public Vec3d getContactPointMotion(Vec3d globalContactPoint) {
|
||||||
|
if (prevPosInvalid)
|
||||||
|
return Vec3d.ZERO;
|
||||||
|
|
||||||
Vec3d positionVec = getPositionVec();
|
Vec3d positionVec = getPositionVec();
|
||||||
Vec3d conMotion = positionVec.subtract(getPrevPositionVec());
|
Vec3d conMotion = positionVec.subtract(getPrevPositionVec());
|
||||||
Vec3d conAngularMotion = getRotationVec().subtract(getPrevRotationVec());
|
Vec3d conAngularMotion = getRotationVec().subtract(getPrevRotationVec());
|
||||||
|
@ -907,4 +916,9 @@ public class ContraptionEntity extends Entity implements IEntityAdditionalSpawnD
|
||||||
dataManager.set(COUPLED_CART, Optional.ofNullable(id));
|
dataManager.set(COUPLED_CART, Optional.ofNullable(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isOnePlayerRiding() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import static java.util.concurrent.TimeUnit.SECONDS;
|
||||||
|
|
||||||
import java.lang.ref.WeakReference;
|
import java.lang.ref.WeakReference;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.ExecutionException;
|
import java.util.concurrent.ExecutionException;
|
||||||
|
|
||||||
|
@ -28,7 +29,8 @@ public class ContraptionHandler {
|
||||||
if (!(entity instanceof ContraptionEntity))
|
if (!(entity instanceof ContraptionEntity))
|
||||||
return;
|
return;
|
||||||
try {
|
try {
|
||||||
List<WeakReference<ContraptionEntity>> list = activeContraptions.get(world, ArrayList::new);
|
List<WeakReference<ContraptionEntity>> list =
|
||||||
|
activeContraptions.get(world, () -> Collections.synchronizedList(new ArrayList<>()));
|
||||||
ContraptionEntity contraption = (ContraptionEntity) entity;
|
ContraptionEntity contraption = (ContraptionEntity) entity;
|
||||||
list.add(new WeakReference<>(contraption));
|
list.add(new WeakReference<>(contraption));
|
||||||
} catch (ExecutionException e) {
|
} catch (ExecutionException e) {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
package com.simibubi.create.content.contraptions.components.structureMovement;
|
package com.simibubi.create.content.contraptions.components.structureMovement;
|
||||||
|
|
||||||
import org.apache.commons.lang3.mutable.MutableObject;
|
import org.apache.commons.lang3.mutable.MutableObject;
|
||||||
|
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.sync.ContraptionInteractionPacket;
|
import com.simibubi.create.content.contraptions.components.structureMovement.sync.ContraptionInteractionPacket;
|
||||||
|
@ -9,6 +10,8 @@ import com.simibubi.create.foundation.utility.RaycastHelper.PredicateTraceResult
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.entity.player.ClientPlayerEntity;
|
import net.minecraft.client.entity.player.ClientPlayerEntity;
|
||||||
|
import net.minecraft.client.entity.player.RemoteClientPlayerEntity;
|
||||||
|
import net.minecraft.nbt.CompoundNBT;
|
||||||
import net.minecraft.util.Direction;
|
import net.minecraft.util.Direction;
|
||||||
import net.minecraft.util.Hand;
|
import net.minecraft.util.Hand;
|
||||||
import net.minecraft.util.math.AxisAlignedBB;
|
import net.minecraft.util.math.AxisAlignedBB;
|
||||||
|
@ -20,11 +23,38 @@ import net.minecraft.world.gen.feature.template.Template.BlockInfo;
|
||||||
import net.minecraftforge.api.distmarker.Dist;
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||||
import net.minecraftforge.client.event.InputEvent.ClickInputEvent;
|
import net.minecraftforge.client.event.InputEvent.ClickInputEvent;
|
||||||
|
import net.minecraftforge.event.TickEvent.Phase;
|
||||||
|
import net.minecraftforge.event.TickEvent.PlayerTickEvent;
|
||||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||||
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
|
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
|
||||||
|
|
||||||
@EventBusSubscriber
|
@EventBusSubscriber
|
||||||
public class ContraptionInteractionHandler {
|
public class ContraptionHandlerClient {
|
||||||
|
|
||||||
|
@SubscribeEvent
|
||||||
|
@OnlyIn(Dist.CLIENT)
|
||||||
|
public static void preventRemotePlayersWalkingAnimations(PlayerTickEvent event) {
|
||||||
|
if (event.phase == Phase.START)
|
||||||
|
return;
|
||||||
|
if (!(event.player instanceof RemoteClientPlayerEntity))
|
||||||
|
return;
|
||||||
|
RemoteClientPlayerEntity remotePlayer = (RemoteClientPlayerEntity) event.player;
|
||||||
|
CompoundNBT data = remotePlayer.getPersistentData();
|
||||||
|
if (!data.contains("LastOverrideLimbSwingUpdate"))
|
||||||
|
return;
|
||||||
|
|
||||||
|
int lastOverride = data.getInt("LastOverrideLimbSwingUpdate");
|
||||||
|
data.putInt("LastOverrideLimbSwingUpdate", lastOverride + 1);
|
||||||
|
if (lastOverride > 5) {
|
||||||
|
data.remove("LastOverrideLimbSwingUpdate");
|
||||||
|
data.remove("OverrideLimbSwing");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
float limbSwing = data.getFloat("OverrideLimbSwing");
|
||||||
|
remotePlayer.prevPosX = remotePlayer.getX() - (limbSwing / 4);
|
||||||
|
remotePlayer.prevPosZ = remotePlayer.getZ();
|
||||||
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
@OnlyIn(Dist.CLIENT)
|
@OnlyIn(Dist.CLIENT)
|
||||||
|
@ -41,7 +71,8 @@ public class ContraptionInteractionHandler {
|
||||||
|
|
||||||
double reach = mc.playerController.getBlockReachDistance();
|
double reach = mc.playerController.getBlockReachDistance();
|
||||||
if (mc.objectMouseOver != null && mc.objectMouseOver.getHitVec() != null)
|
if (mc.objectMouseOver != null && mc.objectMouseOver.getHitVec() != null)
|
||||||
reach = Math.min(mc.objectMouseOver.getHitVec().distanceTo(origin), reach);
|
reach = Math.min(mc.objectMouseOver.getHitVec()
|
||||||
|
.distanceTo(origin), reach);
|
||||||
|
|
||||||
Vec3d target = RaycastHelper.getTraceTarget(player, reach, origin);
|
Vec3d target = RaycastHelper.getTraceTarget(player, reach, origin);
|
||||||
for (ContraptionEntity contraptionEntity : mc.world.getEntitiesWithinAABB(ContraptionEntity.class,
|
for (ContraptionEntity contraptionEntity : mc.world.getEntitiesWithinAABB(ContraptionEntity.class,
|
||||||
|
@ -78,8 +109,7 @@ public class ContraptionInteractionHandler {
|
||||||
|
|
||||||
if (!contraptionEntity.handlePlayerInteraction(player, pos, face, hand))
|
if (!contraptionEntity.handlePlayerInteraction(player, pos, face, hand))
|
||||||
return;
|
return;
|
||||||
AllPackets.channel.sendToServer(new ContraptionInteractionPacket(contraptionEntity, hand,
|
AllPackets.channel.sendToServer(new ContraptionInteractionPacket(contraptionEntity, hand, pos, face));
|
||||||
pos, face));
|
|
||||||
event.setCanceled(true);
|
event.setCanceled(true);
|
||||||
event.setSwingHand(false);
|
event.setSwingHand(false);
|
||||||
}
|
}
|
|
@ -10,9 +10,12 @@ import com.simibubi.create.foundation.tileEntity.behaviour.ValueBoxTransform;
|
||||||
import com.simibubi.create.foundation.tileEntity.behaviour.scrollvalue.INamedIconOptions;
|
import com.simibubi.create.foundation.tileEntity.behaviour.scrollvalue.INamedIconOptions;
|
||||||
import com.simibubi.create.foundation.tileEntity.behaviour.scrollvalue.ScrollOptionBehaviour;
|
import com.simibubi.create.foundation.tileEntity.behaviour.scrollvalue.ScrollOptionBehaviour;
|
||||||
import com.simibubi.create.foundation.utility.Lang;
|
import com.simibubi.create.foundation.utility.Lang;
|
||||||
|
import com.simibubi.create.foundation.utility.VecHelper;
|
||||||
|
|
||||||
|
import net.minecraft.state.properties.RailShape;
|
||||||
import net.minecraft.tileentity.TileEntityType;
|
import net.minecraft.tileentity.TileEntityType;
|
||||||
import net.minecraft.util.Direction;
|
import net.minecraft.util.Direction.Axis;
|
||||||
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
|
||||||
public class CartAssemblerTileEntity extends SmartTileEntity {
|
public class CartAssemblerTileEntity extends SmartTileEntity {
|
||||||
private static final int assemblyCooldown = 8;
|
private static final int assemblyCooldown = 8;
|
||||||
|
@ -28,7 +31,7 @@ public class CartAssemblerTileEntity extends SmartTileEntity {
|
||||||
@Override
|
@Override
|
||||||
public void tick() {
|
public void tick() {
|
||||||
super.tick();
|
super.tick();
|
||||||
if(ticksSinceMinecartUpdate < assemblyCooldown) {
|
if (ticksSinceMinecartUpdate < assemblyCooldown) {
|
||||||
ticksSinceMinecartUpdate++;
|
ticksSinceMinecartUpdate++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -42,7 +45,28 @@ public class CartAssemblerTileEntity extends SmartTileEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected ValueBoxTransform getMovementModeSlot() {
|
protected ValueBoxTransform getMovementModeSlot() {
|
||||||
return new CenteredSideValueBoxTransform((state, d) -> d == Direction.UP);
|
return new CartAssemblerValueBoxTransform();
|
||||||
|
}
|
||||||
|
|
||||||
|
private class CartAssemblerValueBoxTransform extends CenteredSideValueBoxTransform {
|
||||||
|
|
||||||
|
public CartAssemblerValueBoxTransform() {
|
||||||
|
super((state, d) -> {
|
||||||
|
if (d.getAxis()
|
||||||
|
.isVertical())
|
||||||
|
return false;
|
||||||
|
if (!state.has(CartAssemblerBlock.RAIL_SHAPE))
|
||||||
|
return false;
|
||||||
|
RailShape railShape = state.get(CartAssemblerBlock.RAIL_SHAPE);
|
||||||
|
return (d.getAxis() == Axis.X) == (railShape == RailShape.NORTH_SOUTH);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Vec3d getSouthLocation() {
|
||||||
|
return VecHelper.voxelSpace(8, 8, 18);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static enum CartMovementMode implements INamedIconOptions {
|
public static enum CartMovementMode implements INamedIconOptions {
|
||||||
|
|
|
@ -27,6 +27,11 @@ public class PulleyRenderer extends KineticTileEntityRenderer {
|
||||||
super(dispatcher);
|
super(dispatcher);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isGlobalRenderer(KineticTileEntity p_188185_1_) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void renderSafe(KineticTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer,
|
protected void renderSafe(KineticTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer,
|
||||||
int light, int overlay) {
|
int light, int overlay) {
|
||||||
|
|
|
@ -2,26 +2,31 @@ package com.simibubi.create.content.contraptions.components.structureMovement.sy
|
||||||
|
|
||||||
import java.util.function.Supplier;
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
|
import com.simibubi.create.foundation.networking.AllPackets;
|
||||||
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;
|
||||||
import net.minecraft.network.PacketBuffer;
|
import net.minecraft.network.PacketBuffer;
|
||||||
import net.minecraft.util.math.Vec3d;
|
import net.minecraft.util.math.Vec3d;
|
||||||
import net.minecraftforge.fml.network.NetworkEvent.Context;
|
import net.minecraftforge.fml.network.NetworkEvent.Context;
|
||||||
|
import net.minecraftforge.fml.network.PacketDistributor;
|
||||||
|
|
||||||
public class ClientMotionPacket extends SimplePacketBase {
|
public class ClientMotionPacket extends SimplePacketBase {
|
||||||
|
|
||||||
private Vec3d motion;
|
private Vec3d motion;
|
||||||
private boolean onGround;
|
private boolean onGround;
|
||||||
|
private float limbSwing;
|
||||||
|
|
||||||
public ClientMotionPacket(Vec3d motion, boolean onGround) {
|
public ClientMotionPacket(Vec3d motion, boolean onGround, float limbSwing) {
|
||||||
this.motion = motion;
|
this.motion = motion;
|
||||||
this.onGround = onGround;
|
this.onGround = onGround;
|
||||||
|
this.limbSwing = limbSwing;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ClientMotionPacket(PacketBuffer buffer) {
|
public ClientMotionPacket(PacketBuffer buffer) {
|
||||||
motion = new Vec3d(buffer.readFloat(), buffer.readFloat(), buffer.readFloat());
|
motion = new Vec3d(buffer.readFloat(), buffer.readFloat(), buffer.readFloat());
|
||||||
onGround = buffer.readBoolean();
|
onGround = buffer.readBoolean();
|
||||||
|
limbSwing = buffer.readFloat();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -30,6 +35,7 @@ public class ClientMotionPacket extends SimplePacketBase {
|
||||||
buffer.writeFloat((float) motion.y);
|
buffer.writeFloat((float) motion.y);
|
||||||
buffer.writeFloat((float) motion.z);
|
buffer.writeFloat((float) motion.z);
|
||||||
buffer.writeBoolean(onGround);
|
buffer.writeBoolean(onGround);
|
||||||
|
buffer.writeFloat(limbSwing);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -47,6 +53,8 @@ public class ClientMotionPacket extends SimplePacketBase {
|
||||||
sender.fallDistance = 0;
|
sender.fallDistance = 0;
|
||||||
sender.connection.floatingTickCount = 0;
|
sender.connection.floatingTickCount = 0;
|
||||||
}
|
}
|
||||||
|
AllPackets.channel.send(PacketDistributor.TRACKING_ENTITY.with(() -> sender),
|
||||||
|
new LimbSwingUpdatePacket(sender.getEntityId(), sender.getPositionVec(), limbSwing));
|
||||||
});
|
});
|
||||||
context.get()
|
context.get()
|
||||||
.setPacketHandled(true);
|
.setPacketHandled(true);
|
||||||
|
|
|
@ -0,0 +1,62 @@
|
||||||
|
package com.simibubi.create.content.contraptions.components.structureMovement.sync;
|
||||||
|
|
||||||
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
|
import com.simibubi.create.foundation.networking.SimplePacketBase;
|
||||||
|
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.client.world.ClientWorld;
|
||||||
|
import net.minecraft.entity.Entity;
|
||||||
|
import net.minecraft.nbt.CompoundNBT;
|
||||||
|
import net.minecraft.network.PacketBuffer;
|
||||||
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
import net.minecraftforge.fml.network.NetworkEvent.Context;
|
||||||
|
|
||||||
|
public class LimbSwingUpdatePacket extends SimplePacketBase {
|
||||||
|
|
||||||
|
private int entityId;
|
||||||
|
private Vec3d position;
|
||||||
|
private float limbSwing;
|
||||||
|
|
||||||
|
public LimbSwingUpdatePacket(int entityId, Vec3d position, float limbSwing) {
|
||||||
|
this.entityId = entityId;
|
||||||
|
this.position = position;
|
||||||
|
this.limbSwing = limbSwing;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LimbSwingUpdatePacket(PacketBuffer buffer) {
|
||||||
|
entityId = buffer.readInt();
|
||||||
|
position = new Vec3d(buffer.readFloat(), buffer.readFloat(), buffer.readFloat());
|
||||||
|
limbSwing = buffer.readFloat();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void write(PacketBuffer buffer) {
|
||||||
|
buffer.writeInt(entityId);
|
||||||
|
buffer.writeFloat((float) position.x);
|
||||||
|
buffer.writeFloat((float) position.y);
|
||||||
|
buffer.writeFloat((float) position.z);
|
||||||
|
buffer.writeFloat(limbSwing);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handle(Supplier<Context> context) {
|
||||||
|
context.get()
|
||||||
|
.enqueueWork(() -> {
|
||||||
|
ClientWorld world = Minecraft.getInstance().world;
|
||||||
|
if (world == null)
|
||||||
|
return;
|
||||||
|
Entity entity = world.getEntityByID(entityId);
|
||||||
|
if (entity == null)
|
||||||
|
return;
|
||||||
|
CompoundNBT data = entity.getPersistentData();
|
||||||
|
data.putInt("LastOverrideLimbSwingUpdate", 0);
|
||||||
|
data.putFloat("OverrideLimbSwing", limbSwing);
|
||||||
|
entity.setPositionAndRotationDirect(position.x, position.y, position.z, entity.rotationYaw,
|
||||||
|
entity.rotationPitch, 2, false);
|
||||||
|
});
|
||||||
|
context.get()
|
||||||
|
.setPacketHandled(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -24,8 +24,7 @@ public class FillingBySpout {
|
||||||
|
|
||||||
public static boolean canItemBeFilled(World world, ItemStack stack) {
|
public static boolean canItemBeFilled(World world, ItemStack stack) {
|
||||||
wrapper.setInventorySlotContents(0, stack);
|
wrapper.setInventorySlotContents(0, stack);
|
||||||
if (world.getRecipeManager()
|
if (AllRecipeTypes.FILLING.find(wrapper, world)
|
||||||
.getRecipe(AllRecipeTypes.FILLING.getType(), wrapper, world)
|
|
||||||
.isPresent())
|
.isPresent())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
@ -44,8 +43,7 @@ public class FillingBySpout {
|
||||||
|
|
||||||
public static int getRequiredAmountForItem(World world, ItemStack stack, FluidStack availableFluid) {
|
public static int getRequiredAmountForItem(World world, ItemStack stack, FluidStack availableFluid) {
|
||||||
wrapper.setInventorySlotContents(0, stack);
|
wrapper.setInventorySlotContents(0, stack);
|
||||||
Optional<IRecipe<RecipeWrapper>> recipe = world.getRecipeManager()
|
Optional<IRecipe<RecipeWrapper>> recipe = AllRecipeTypes.FILLING.find(wrapper, world);
|
||||||
.getRecipe(AllRecipeTypes.FILLING.getType(), wrapper, world);
|
|
||||||
if (recipe.isPresent()) {
|
if (recipe.isPresent()) {
|
||||||
FillingRecipe fillingRecipe = (FillingRecipe) recipe.get();
|
FillingRecipe fillingRecipe = (FillingRecipe) recipe.get();
|
||||||
FluidIngredient requiredFluid = fillingRecipe.getRequiredFluid();
|
FluidIngredient requiredFluid = fillingRecipe.getRequiredFluid();
|
||||||
|
@ -71,8 +69,7 @@ public class FillingBySpout {
|
||||||
availableFluid.shrink(requiredAmount);
|
availableFluid.shrink(requiredAmount);
|
||||||
|
|
||||||
wrapper.setInventorySlotContents(0, stack);
|
wrapper.setInventorySlotContents(0, stack);
|
||||||
Optional<IRecipe<RecipeWrapper>> recipe = world.getRecipeManager()
|
Optional<IRecipe<RecipeWrapper>> recipe = AllRecipeTypes.FILLING.find(wrapper, world);
|
||||||
.getRecipe(AllRecipeTypes.FILLING.getType(), wrapper, world);
|
|
||||||
if (recipe.isPresent()) {
|
if (recipe.isPresent()) {
|
||||||
FillingRecipe fillingRecipe = (FillingRecipe) recipe.get();
|
FillingRecipe fillingRecipe = (FillingRecipe) recipe.get();
|
||||||
FluidIngredient requiredFluid = fillingRecipe.getRequiredFluid();
|
FluidIngredient requiredFluid = fillingRecipe.getRequiredFluid();
|
||||||
|
|
|
@ -100,6 +100,9 @@ public class FluidTankBlock extends Block implements IWrenchable, ITE<FluidTankT
|
||||||
if (!capability.isPresent())
|
if (!capability.isPresent())
|
||||||
return ActionResultType.PASS;
|
return ActionResultType.PASS;
|
||||||
|
|
||||||
|
if (!player.isCreative())
|
||||||
|
return ActionResultType.FAIL;
|
||||||
|
|
||||||
TileEntity te = world.getTileEntity(pos);
|
TileEntity te = world.getTileEntity(pos);
|
||||||
LazyOptional<IFluidHandler> tankCapability =
|
LazyOptional<IFluidHandler> tankCapability =
|
||||||
te.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, ray.getFace());
|
te.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, ray.getFace());
|
||||||
|
|
|
@ -9,16 +9,23 @@ import com.simibubi.create.foundation.block.ITE;
|
||||||
import com.simibubi.create.foundation.item.ItemHelper;
|
import com.simibubi.create.foundation.item.ItemHelper;
|
||||||
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
||||||
import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringBehaviour;
|
import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringBehaviour;
|
||||||
|
import com.simibubi.create.foundation.utility.Iterate;
|
||||||
|
import com.simibubi.create.foundation.utility.Pair;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.item.ItemEntity;
|
import net.minecraft.entity.item.ItemEntity;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
import net.minecraft.item.BlockItemUseContext;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.ItemUseContext;
|
import net.minecraft.item.ItemUseContext;
|
||||||
|
import net.minecraft.state.DirectionProperty;
|
||||||
|
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.ActionResultType;
|
import net.minecraft.util.ActionResultType;
|
||||||
|
import net.minecraft.util.Direction;
|
||||||
import net.minecraft.util.Hand;
|
import net.minecraft.util.Hand;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.math.BlockRayTraceResult;
|
import net.minecraft.util.math.BlockRayTraceResult;
|
||||||
|
@ -26,14 +33,22 @@ import net.minecraft.util.math.shapes.ISelectionContext;
|
||||||
import net.minecraft.util.math.shapes.VoxelShape;
|
import net.minecraft.util.math.shapes.VoxelShape;
|
||||||
import net.minecraft.world.IBlockReader;
|
import net.minecraft.world.IBlockReader;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.util.LazyOptional;
|
||||||
|
import net.minecraftforge.fluids.FluidStack;
|
||||||
|
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
|
||||||
|
import net.minecraftforge.fluids.capability.IFluidHandler;
|
||||||
|
import net.minecraftforge.fluids.capability.IFluidHandler.FluidAction;
|
||||||
import net.minecraftforge.items.IItemHandlerModifiable;
|
import net.minecraftforge.items.IItemHandlerModifiable;
|
||||||
import net.minecraftforge.items.ItemHandlerHelper;
|
import net.minecraftforge.items.ItemHandlerHelper;
|
||||||
import net.minecraftforge.items.ItemStackHandler;
|
import net.minecraftforge.items.ItemStackHandler;
|
||||||
|
|
||||||
public class BasinBlock extends Block implements ITE<BasinTileEntity>, IWrenchable {
|
public class BasinBlock extends Block implements ITE<BasinTileEntity>, IWrenchable {
|
||||||
|
|
||||||
|
public static final DirectionProperty FACING = BlockStateProperties.FACING_EXCEPT_UP;
|
||||||
|
|
||||||
public BasinBlock(Properties p_i48440_1_) {
|
public BasinBlock(Properties p_i48440_1_) {
|
||||||
super(p_i48440_1_);
|
super(p_i48440_1_);
|
||||||
|
setDefaultState(getDefaultState().with(FACING, Direction.DOWN));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -41,6 +56,11 @@ public class BasinBlock extends Block implements ITE<BasinTileEntity>, IWrenchab
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void fillStateContainer(Builder<Block, BlockState> p_206840_1_) {
|
||||||
|
super.fillStateContainer(p_206840_1_.add(FACING));
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createTileEntity(BlockState state, IBlockReader world) {
|
public TileEntity createTileEntity(BlockState state, IBlockReader world) {
|
||||||
return AllTileEntities.BASIN.create();
|
return AllTileEntities.BASIN.create();
|
||||||
|
@ -54,12 +74,16 @@ public class BasinBlock extends Block implements ITE<BasinTileEntity>, IWrenchab
|
||||||
@Override
|
@Override
|
||||||
public ActionResultType onUse(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn,
|
public ActionResultType onUse(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn,
|
||||||
BlockRayTraceResult hit) {
|
BlockRayTraceResult hit) {
|
||||||
if (!player.getHeldItem(handIn)
|
ItemStack heldItem = player.getHeldItem(handIn);
|
||||||
.isEmpty())
|
|
||||||
return ActionResultType.PASS;
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
BasinTileEntity te = getTileEntity(worldIn, pos);
|
BasinTileEntity te = getTileEntity(worldIn, pos);
|
||||||
|
if (!heldItem.isEmpty()) {
|
||||||
|
if (tryEmptyItemIntoBasin(worldIn, player, handIn, heldItem, te))
|
||||||
|
return ActionResultType.SUCCESS;
|
||||||
|
return ActionResultType.PASS;
|
||||||
|
}
|
||||||
|
|
||||||
IItemHandlerModifiable inv = te.itemCapability.orElse(new ItemStackHandler(1));
|
IItemHandlerModifiable inv = te.itemCapability.orElse(new ItemStackHandler(1));
|
||||||
for (int slot = 0; slot < inv.getSlots(); slot++) {
|
for (int slot = 0; slot < inv.getSlots(); slot++) {
|
||||||
player.inventory.placeItemBackInInventory(worldIn, inv.getStackInSlot(slot));
|
player.inventory.placeItemBackInInventory(worldIn, inv.getStackInSlot(slot));
|
||||||
|
@ -72,6 +96,30 @@ public class BasinBlock extends Block implements ITE<BasinTileEntity>, IWrenchab
|
||||||
return ActionResultType.SUCCESS;
|
return ActionResultType.SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected boolean tryEmptyItemIntoBasin(World worldIn, PlayerEntity player, Hand handIn, ItemStack heldItem,
|
||||||
|
BasinTileEntity te) {
|
||||||
|
if (!EmptyingByBasin.canItemBeEmptied(worldIn, heldItem))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
Pair<FluidStack, ItemStack> emptyItem = EmptyingByBasin.emptyItem(worldIn, heldItem, true);
|
||||||
|
LazyOptional<IFluidHandler> capability = te.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY);
|
||||||
|
IFluidHandler tank = capability.orElse(null);
|
||||||
|
FluidStack fluidStack = emptyItem.getFirst();
|
||||||
|
|
||||||
|
if (tank == null || fluidStack.getAmount() != tank.fill(fluidStack, FluidAction.SIMULATE))
|
||||||
|
return false;
|
||||||
|
if (worldIn.isRemote)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
EmptyingByBasin.emptyItem(worldIn, heldItem, false);
|
||||||
|
tank.fill(fluidStack, FluidAction.EXECUTE);
|
||||||
|
if (heldItem.isEmpty())
|
||||||
|
player.setHeldItem(handIn, emptyItem.getSecond());
|
||||||
|
else
|
||||||
|
player.inventory.placeItemBackInInventory(worldIn, emptyItem.getSecond());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLanded(IBlockReader worldIn, Entity entityIn) {
|
public void onLanded(IBlockReader worldIn, Entity entityIn) {
|
||||||
super.onLanded(worldIn, entityIn);
|
super.onLanded(worldIn, entityIn);
|
||||||
|
@ -102,6 +150,11 @@ public class BasinBlock extends Block implements ITE<BasinTileEntity>, IWrenchab
|
||||||
return AllShapes.BASIN_BLOCK_SHAPE;
|
return AllShapes.BASIN_BLOCK_SHAPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState p_220082_4_, boolean p_220082_5_) {
|
||||||
|
updateDiagonalNeighbours(state, world, pos);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public VoxelShape getCollisionShape(BlockState state, IBlockReader reader, BlockPos pos, ISelectionContext ctx) {
|
public VoxelShape getCollisionShape(BlockState state, IBlockReader reader, BlockPos pos, ISelectionContext ctx) {
|
||||||
if (ctx.getEntity() instanceof ItemEntity)
|
if (ctx.getEntity() instanceof ItemEntity)
|
||||||
|
@ -111,6 +164,7 @@ public class BasinBlock extends Block implements ITE<BasinTileEntity>, IWrenchab
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onReplaced(BlockState state, World worldIn, BlockPos pos, BlockState newState, boolean isMoving) {
|
public void onReplaced(BlockState state, World worldIn, BlockPos pos, BlockState newState, boolean isMoving) {
|
||||||
|
updateDiagonalNeighbours(state, worldIn, pos);
|
||||||
if (!state.hasTileEntity() || state.getBlock() == newState.getBlock())
|
if (!state.hasTileEntity() || state.getBlock() == newState.getBlock())
|
||||||
return;
|
return;
|
||||||
TileEntityBehaviour.destroy(worldIn, pos, FilteringBehaviour.TYPE);
|
TileEntityBehaviour.destroy(worldIn, pos, FilteringBehaviour.TYPE);
|
||||||
|
@ -140,4 +194,35 @@ public class BasinBlock extends Block implements ITE<BasinTileEntity>, IWrenchab
|
||||||
return BasinTileEntity.class;
|
return BasinTileEntity.class;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BlockState getStateForPlacement(BlockItemUseContext ctx) {
|
||||||
|
BlockState state = super.getStateForPlacement(ctx);
|
||||||
|
World world = ctx.getWorld();
|
||||||
|
BlockPos pos = ctx.getPos();
|
||||||
|
return updateDiagonalState(state, world, pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void updateDiagonalNeighbours(BlockState state, World world, BlockPos pos) {
|
||||||
|
for (Direction direction : Iterate.horizontalDirections) {
|
||||||
|
BlockPos toUpdate = pos.up()
|
||||||
|
.offset(direction);
|
||||||
|
BlockState stateToUpdate = world.getBlockState(toUpdate);
|
||||||
|
BlockState updated = updateDiagonalState(stateToUpdate, world, toUpdate);
|
||||||
|
if (stateToUpdate != updated && !world.isRemote)
|
||||||
|
world.setBlockState(toUpdate, updated);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static BlockState updateDiagonalState(BlockState state, IBlockReader world, BlockPos pos) {
|
||||||
|
if (!(state.getBlock() instanceof BasinBlock))
|
||||||
|
return state;
|
||||||
|
for (Direction direction : Iterate.horizontalDirections) {
|
||||||
|
BlockState diagonaloutputBasin = world.getBlockState(pos.down()
|
||||||
|
.offset(direction));
|
||||||
|
if (diagonaloutputBasin.getBlock() instanceof BasinBlock)
|
||||||
|
return state.with(FACING, direction);
|
||||||
|
}
|
||||||
|
return state.with(FACING, Direction.DOWN);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
package com.simibubi.create.content.contraptions.processing;
|
||||||
|
|
||||||
|
import com.simibubi.create.foundation.data.AssetLookup;
|
||||||
|
import com.simibubi.create.foundation.data.SpecialBlockStateGen;
|
||||||
|
import com.tterrag.registrate.providers.DataGenContext;
|
||||||
|
import com.tterrag.registrate.providers.RegistrateBlockstateProvider;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraftforge.client.model.generators.ModelFile;
|
||||||
|
|
||||||
|
public class BasinGenerator extends SpecialBlockStateGen {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getXRotation(BlockState state) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getYRotation(BlockState state) {
|
||||||
|
return horizontalAngle(state.get(BasinBlock.FACING));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <T extends Block> ModelFile getModel(DataGenContext<Block, T> ctx, RegistrateBlockstateProvider prov,
|
||||||
|
BlockState state) {
|
||||||
|
if (state.get(BasinBlock.FACING).getAxis().isVertical())
|
||||||
|
return AssetLookup.partialBaseModel(ctx, prov);
|
||||||
|
return AssetLookup.partialBaseModel(ctx, prov, "directional");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,27 +0,0 @@
|
||||||
package com.simibubi.create.content.contraptions.processing;
|
|
||||||
|
|
||||||
import com.simibubi.create.foundation.item.SmartInventory;
|
|
||||||
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraftforge.items.ItemHandlerHelper;
|
|
||||||
|
|
||||||
public class BasinInputInventory extends SmartInventory {
|
|
||||||
|
|
||||||
public BasinInputInventory(int slots, BasinTileEntity te) {
|
|
||||||
super(slots, te);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ItemStack insertItem(int slot, ItemStack stack, boolean simulate) {
|
|
||||||
// Only insert if no other slot already has a 'full' stack of this item
|
|
||||||
for (int i = 0; i < getSlots(); i++) {
|
|
||||||
ItemStack stackInSlot = getStackInSlot(i);
|
|
||||||
if (ItemHandlerHelper.canItemStacksStack(stack, stackInSlot)
|
|
||||||
&& stackInSlot.getCount() == getStackLimit(i, stackInSlot))
|
|
||||||
return stack;
|
|
||||||
}
|
|
||||||
|
|
||||||
return super.insertItem(slot, stack, simulate);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
package com.simibubi.create.content.contraptions.processing;
|
||||||
|
|
||||||
|
import com.simibubi.create.foundation.item.SmartInventory;
|
||||||
|
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraftforge.items.ItemHandlerHelper;
|
||||||
|
|
||||||
|
public class BasinInventory extends SmartInventory {
|
||||||
|
|
||||||
|
public BasinInventory(int slots, BasinTileEntity te) {
|
||||||
|
super(slots, te, 16, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack insertItem(int slot, ItemStack stack, boolean simulate) {
|
||||||
|
// Only insert if no other slot already has a stack of this item
|
||||||
|
for (int i = 0; i < getSlots(); i++)
|
||||||
|
if (i != slot && ItemHandlerHelper.canItemStacksStack(stack, inv.getStackInSlot(i)))
|
||||||
|
return stack;
|
||||||
|
return super.insertItem(slot, stack, simulate);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,49 +1,29 @@
|
||||||
package com.simibubi.create.content.contraptions.processing;
|
package com.simibubi.create.content.contraptions.processing;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import com.simibubi.create.AllTileEntities;
|
|
||||||
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||||
import com.simibubi.create.foundation.advancement.AllTriggers;
|
import com.simibubi.create.foundation.advancement.AllTriggers;
|
||||||
import com.simibubi.create.foundation.advancement.SimpleTrigger;
|
import com.simibubi.create.foundation.advancement.ITriggerable;
|
||||||
import com.simibubi.create.foundation.item.SmartInventory;
|
|
||||||
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
||||||
import com.simibubi.create.foundation.tileEntity.behaviour.simple.DeferralBehaviour;
|
import com.simibubi.create.foundation.tileEntity.behaviour.simple.DeferralBehaviour;
|
||||||
import com.simibubi.create.foundation.utility.recipe.RecipeFinder;
|
import com.simibubi.create.foundation.utility.recipe.RecipeFinder;
|
||||||
|
|
||||||
import net.minecraft.inventory.IInventory;
|
import net.minecraft.inventory.IInventory;
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.item.crafting.IRecipe;
|
import net.minecraft.item.crafting.IRecipe;
|
||||||
import net.minecraft.item.crafting.Ingredient;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.tileentity.TileEntityType;
|
import net.minecraft.tileentity.TileEntityType;
|
||||||
import net.minecraft.util.NonNullList;
|
|
||||||
import net.minecraftforge.common.util.LazyOptional;
|
|
||||||
import net.minecraftforge.fluids.FluidStack;
|
|
||||||
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
|
|
||||||
import net.minecraftforge.fluids.capability.IFluidHandler;
|
|
||||||
import net.minecraftforge.items.CapabilityItemHandler;
|
|
||||||
import net.minecraftforge.items.IItemHandler;
|
|
||||||
import net.minecraftforge.items.ItemHandlerHelper;
|
|
||||||
|
|
||||||
public abstract class BasinOperatingTileEntity extends KineticTileEntity {
|
public abstract class BasinOperatingTileEntity extends KineticTileEntity {
|
||||||
|
|
||||||
public DeferralBehaviour basinChecker;
|
public DeferralBehaviour basinChecker;
|
||||||
public boolean basinRemoved;
|
public boolean basinRemoved;
|
||||||
protected IRecipe<?> lastRecipe;
|
protected IRecipe<?> currentRecipe;
|
||||||
|
|
||||||
protected LazyOptional<IItemHandler> basinItemInv = LazyOptional.empty();
|
|
||||||
protected List<ItemStack> itemInputs;
|
|
||||||
protected LazyOptional<IFluidHandler> basinFluidInv = LazyOptional.empty();
|
|
||||||
protected List<FluidStack> fluidInputs;
|
|
||||||
|
|
||||||
public BasinOperatingTileEntity(TileEntityType<?> typeIn) {
|
public BasinOperatingTileEntity(TileEntityType<?> typeIn) {
|
||||||
super(typeIn);
|
super(typeIn);
|
||||||
itemInputs = new ArrayList<>();
|
|
||||||
fluidInputs = new ArrayList<>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -58,29 +38,10 @@ public abstract class BasinOperatingTileEntity extends KineticTileEntity {
|
||||||
super.onSpeedChanged(prevSpeed);
|
super.onSpeedChanged(prevSpeed);
|
||||||
if (getSpeed() == 0)
|
if (getSpeed() == 0)
|
||||||
basinRemoved = true;
|
basinRemoved = true;
|
||||||
|
basinRemoved = false;
|
||||||
basinChecker.scheduleUpdate();
|
basinChecker.scheduleUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void gatherInputs() {
|
|
||||||
itemInputs.clear();
|
|
||||||
basinItemInv.ifPresent(handler -> {
|
|
||||||
for (int slot = 0; slot < handler.getSlots(); ++slot) {
|
|
||||||
ItemStack itemstack = handler.getStackInSlot(slot);
|
|
||||||
if (!itemstack.isEmpty())
|
|
||||||
itemInputs.add(itemstack);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
fluidInputs.clear();
|
|
||||||
basinFluidInv.ifPresent(handler -> {
|
|
||||||
for (int tank = 0; tank < handler.getTanks(); tank++) {
|
|
||||||
FluidStack fluidInTank = handler.getFluidInTank(tank);
|
|
||||||
if (!fluidInTank.isEmpty())
|
|
||||||
fluidInputs.add(fluidInTank);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void tick() {
|
public void tick() {
|
||||||
if (basinRemoved) {
|
if (basinRemoved) {
|
||||||
|
@ -100,28 +61,13 @@ public abstract class BasinOperatingTileEntity extends KineticTileEntity {
|
||||||
return true;
|
return true;
|
||||||
if (isRunning())
|
if (isRunning())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
Optional<BasinTileEntity> basinTe = getBasin();
|
|
||||||
if (!basinTe.isPresent())
|
|
||||||
return true;
|
|
||||||
if (!basinItemInv.isPresent())
|
|
||||||
basinItemInv = basinTe.get()
|
|
||||||
.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY);
|
|
||||||
if (!basinFluidInv.isPresent())
|
|
||||||
basinFluidInv = basinTe.get()
|
|
||||||
.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY);
|
|
||||||
if (!basinFluidInv.isPresent() || !basinItemInv.isPresent())
|
|
||||||
return true;
|
|
||||||
|
|
||||||
if (world == null || world.isRemote)
|
if (world == null || world.isRemote)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
gatherInputs();
|
|
||||||
List<IRecipe<?>> recipes = getMatchingRecipes();
|
List<IRecipe<?>> recipes = getMatchingRecipes();
|
||||||
if (recipes.isEmpty())
|
if (recipes.isEmpty())
|
||||||
return true;
|
return true;
|
||||||
|
currentRecipe = recipes.get(0);
|
||||||
lastRecipe = recipes.get(0);
|
|
||||||
startProcessingBasin();
|
startProcessingBasin();
|
||||||
sendData();
|
sendData();
|
||||||
return true;
|
return true;
|
||||||
|
@ -135,58 +81,37 @@ public abstract class BasinOperatingTileEntity extends KineticTileEntity {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void applyBasinRecipe() {
|
protected <C extends IInventory> boolean matchBasinRecipe(IRecipe<C> recipe) {
|
||||||
if (lastRecipe == null)
|
if (recipe == null)
|
||||||
return;
|
return false;
|
||||||
if (!basinItemInv.isPresent() || !basinFluidInv.isPresent())
|
|
||||||
return;
|
|
||||||
|
|
||||||
Optional<BasinTileEntity> basin = getBasin();
|
Optional<BasinTileEntity> basin = getBasin();
|
||||||
if (!basin.isPresent())
|
if (!basin.isPresent())
|
||||||
|
return false;
|
||||||
|
return BasinRecipe.match(basin.get(), recipe);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void applyBasinRecipe() {
|
||||||
|
if (currentRecipe == null)
|
||||||
return;
|
return;
|
||||||
SmartInventory inputs = basin.get().getInputInventory();
|
|
||||||
SmartInventory outputs = basin.get().getOutputInventory();
|
|
||||||
List<ItemStack> containers = new ArrayList<>();
|
|
||||||
|
|
||||||
NonNullList<Ingredient> ingredients = lastRecipe.getIngredients();
|
Optional<BasinTileEntity> optionalBasin = getBasin();
|
||||||
Ingredients: for (int i = 0; i < ingredients.size(); i++) {
|
if (!optionalBasin.isPresent())
|
||||||
Ingredient ingredient = ingredients.get(i);
|
|
||||||
|
|
||||||
for (int slot = 0; slot < inputs.getSlots(); slot++) {
|
|
||||||
if (!ingredient.test(inputs.extractItem(slot, 1, true)))
|
|
||||||
continue;
|
|
||||||
ItemStack extracted = inputs.extractItem(slot, 1, false);
|
|
||||||
if (extracted.hasContainerItem())
|
|
||||||
containers.add(extracted.getContainerItem()
|
|
||||||
.copy());
|
|
||||||
continue Ingredients;
|
|
||||||
}
|
|
||||||
|
|
||||||
// something wasn't found
|
|
||||||
return;
|
return;
|
||||||
}
|
BasinTileEntity basin = optionalBasin.get();
|
||||||
|
if (!BasinRecipe.apply(basin, currentRecipe))
|
||||||
if (world != null && !world.isRemote) {
|
return;
|
||||||
SimpleTrigger trigger = AllTriggers.MIXER_MIX;
|
Optional<ITriggerable> processedRecipeTrigger = getProcessedRecipeTrigger();
|
||||||
if (AllTileEntities.MECHANICAL_PRESS.is(this))
|
if (world != null && !world.isRemote && processedRecipeTrigger.isPresent())
|
||||||
trigger = AllTriggers.PRESS_COMPACT;
|
AllTriggers.triggerForNearbyPlayers(processedRecipeTrigger.get(), world, pos, 4);
|
||||||
AllTriggers.triggerForNearbyPlayers(trigger, world, pos, 4);
|
basin.inputTank.sendDataImmediately();
|
||||||
}
|
|
||||||
|
|
||||||
outputs.allowInsertion();
|
|
||||||
ItemHandlerHelper.insertItemStacked(outputs, lastRecipe.getRecipeOutput()
|
|
||||||
.copy(), false); // TODO only works for single item output
|
|
||||||
containers.forEach(stack -> ItemHandlerHelper.insertItemStacked(outputs, stack, false));
|
|
||||||
outputs.forbidInsertion();
|
|
||||||
|
|
||||||
// Continue mixing
|
// Continue mixing
|
||||||
gatherInputs();
|
if (matchBasinRecipe(currentRecipe)) {
|
||||||
if (matchBasinRecipe(lastRecipe)) {
|
|
||||||
continueWithPreviousRecipe();
|
continueWithPreviousRecipe();
|
||||||
sendData();
|
sendData();
|
||||||
}
|
}
|
||||||
|
|
||||||
getBasin().ifPresent(BasinTileEntity::notifyChangeOfContents);
|
basin.notifyChangeOfContents();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected List<IRecipe<?>> getMatchingRecipes() {
|
protected List<IRecipe<?>> getMatchingRecipes() {
|
||||||
|
@ -211,27 +136,12 @@ public abstract class BasinOperatingTileEntity extends KineticTileEntity {
|
||||||
return Optional.of((BasinTileEntity) basinTE);
|
return Optional.of((BasinTileEntity) basinTE);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract <C extends IInventory> boolean matchStaticFilters(IRecipe<C> recipe);
|
protected Optional<ITriggerable> getProcessedRecipeTrigger() {
|
||||||
|
return Optional.empty();
|
||||||
protected <C extends IInventory> boolean matchBasinRecipe(IRecipe<C> recipe) {
|
|
||||||
if (recipe == null)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
Optional<BasinTileEntity> basin = getBasin();
|
|
||||||
if (!basin.isPresent())
|
|
||||||
return false;
|
|
||||||
BasinTileEntity basinTileEntity = basin.get();
|
|
||||||
if (!basinTileEntity.getFilter()
|
|
||||||
.test(recipe.getRecipeOutput()))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
NonNullList<Ingredient> ingredients = recipe.getIngredients();
|
|
||||||
if (!ingredients.stream()
|
|
||||||
.allMatch(ingredient -> (ingredient.isSimple() || ingredient.getMatchingStacks().length == 1)))
|
|
||||||
return false;
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected abstract <C extends IInventory> boolean matchStaticFilters(IRecipe<C> recipe);
|
||||||
|
|
||||||
protected abstract Object getRecipeCacheKey();
|
protected abstract Object getRecipeCacheKey();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,199 @@
|
||||||
|
package com.simibubi.create.content.contraptions.processing;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.Comparator;
|
||||||
|
import java.util.LinkedList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
|
import com.simibubi.create.AllRecipeTypes;
|
||||||
|
import com.simibubi.create.content.contraptions.processing.ProcessingRecipeBuilder.ProcessingRecipeParams;
|
||||||
|
import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlock.HeatLevel;
|
||||||
|
import com.simibubi.create.foundation.fluid.FluidIngredient;
|
||||||
|
import com.simibubi.create.foundation.item.SmartInventory;
|
||||||
|
import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringBehaviour;
|
||||||
|
import com.simibubi.create.foundation.tileEntity.behaviour.fluid.SmartFluidTankBehaviour;
|
||||||
|
import com.simibubi.create.foundation.tileEntity.behaviour.fluid.SmartFluidTankBehaviour.TankSegment;
|
||||||
|
import com.simibubi.create.foundation.utility.Iterate;
|
||||||
|
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.item.crafting.IRecipe;
|
||||||
|
import net.minecraft.item.crafting.Ingredient;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.fluids.FluidStack;
|
||||||
|
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
|
||||||
|
import net.minecraftforge.fluids.capability.IFluidHandler;
|
||||||
|
import net.minecraftforge.items.CapabilityItemHandler;
|
||||||
|
import net.minecraftforge.items.IItemHandler;
|
||||||
|
|
||||||
|
public class BasinRecipe extends ProcessingRecipe<SmartInventory> {
|
||||||
|
|
||||||
|
public static boolean match(BasinTileEntity basin, IRecipe<?> recipe) {
|
||||||
|
FilteringBehaviour filter = basin.getFilter();
|
||||||
|
if (filter == null || !filter.test(recipe.getRecipeOutput()))
|
||||||
|
return false;
|
||||||
|
return apply(basin, recipe, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean apply(BasinTileEntity basin, IRecipe<?> recipe) {
|
||||||
|
return apply(basin, recipe, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static boolean apply(BasinTileEntity basin, IRecipe<?> recipe, boolean test) {
|
||||||
|
boolean isBasinRecipe = recipe instanceof BasinRecipe;
|
||||||
|
IItemHandler availableItems = basin.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY)
|
||||||
|
.orElse(null);
|
||||||
|
IFluidHandler availableFluids = basin.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY)
|
||||||
|
.orElse(null);
|
||||||
|
|
||||||
|
if (availableItems == null || availableFluids == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
HeatLevel heat = basin.getHeatLevel();
|
||||||
|
if (isBasinRecipe && !((BasinRecipe) recipe).getRequiredHeat()
|
||||||
|
.testBlazeBurner(heat))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
List<ItemStack> recipeOutputItems = new ArrayList<>();
|
||||||
|
List<FluidStack> recipeOutputFluids = new ArrayList<>();
|
||||||
|
|
||||||
|
List<Ingredient> ingredients = new LinkedList<>(recipe.getIngredients());
|
||||||
|
ingredients.sort(Comparator.comparingInt(i -> i.getMatchingStacks().length));
|
||||||
|
List<FluidIngredient> fluidIngredients =
|
||||||
|
isBasinRecipe ? ((BasinRecipe) recipe).getFluidIngredients() : Collections.emptyList();
|
||||||
|
|
||||||
|
for (boolean simulate : Iterate.trueAndFalse) {
|
||||||
|
|
||||||
|
if (!simulate && test)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
int[] extractedItemsFromSlot = new int[availableItems.getSlots()];
|
||||||
|
int[] extractedFluidsFromTank = new int[availableFluids.getTanks()];
|
||||||
|
|
||||||
|
Ingredients: for (int i = 0; i < ingredients.size(); i++) {
|
||||||
|
Ingredient ingredient = ingredients.get(i);
|
||||||
|
|
||||||
|
for (int slot = 0; slot < availableItems.getSlots(); slot++) {
|
||||||
|
if (simulate && availableItems.getStackInSlot(slot)
|
||||||
|
.getCount() <= extractedItemsFromSlot[slot])
|
||||||
|
continue;
|
||||||
|
ItemStack extracted = availableItems.extractItem(slot, 1, true);
|
||||||
|
if (!ingredient.test(extracted))
|
||||||
|
continue;
|
||||||
|
if (!simulate)
|
||||||
|
availableItems.extractItem(slot, 1, false);
|
||||||
|
else if (extracted.hasContainerItem())
|
||||||
|
recipeOutputItems.add(extracted.getContainerItem()
|
||||||
|
.copy());
|
||||||
|
extractedItemsFromSlot[slot]++;
|
||||||
|
continue Ingredients;
|
||||||
|
}
|
||||||
|
|
||||||
|
// something wasn't found
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean fluidsAffected = false;
|
||||||
|
FluidIngredients: for (int i = 0; i < fluidIngredients.size(); i++) {
|
||||||
|
FluidIngredient fluidIngredient = fluidIngredients.get(i);
|
||||||
|
int amountRequired = fluidIngredient.getRequiredAmount();
|
||||||
|
|
||||||
|
for (int tank = 0; tank < availableFluids.getTanks(); tank++) {
|
||||||
|
FluidStack fluidStack = availableFluids.getFluidInTank(tank);
|
||||||
|
if (simulate && fluidStack.getAmount() <= extractedFluidsFromTank[tank])
|
||||||
|
continue;
|
||||||
|
if (!fluidIngredient.test(fluidStack))
|
||||||
|
continue;
|
||||||
|
int drainedAmount = Math.min(amountRequired, fluidStack.getAmount());
|
||||||
|
if (!simulate) {
|
||||||
|
fluidStack.shrink(drainedAmount);
|
||||||
|
fluidsAffected = true;
|
||||||
|
}
|
||||||
|
amountRequired -= drainedAmount;
|
||||||
|
if (amountRequired != 0)
|
||||||
|
continue;
|
||||||
|
extractedFluidsFromTank[tank] += drainedAmount;
|
||||||
|
continue FluidIngredients;
|
||||||
|
}
|
||||||
|
|
||||||
|
// something wasn't found
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fluidsAffected) {
|
||||||
|
basin.getBehaviour(SmartFluidTankBehaviour.INPUT)
|
||||||
|
.foreach(TankSegment::onFluidStackChanged);
|
||||||
|
basin.getBehaviour(SmartFluidTankBehaviour.OUTPUT)
|
||||||
|
.foreach(TankSegment::onFluidStackChanged);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (simulate) {
|
||||||
|
if (recipe instanceof BasinRecipe) {
|
||||||
|
recipeOutputItems.addAll(((BasinRecipe) recipe).rollResults());
|
||||||
|
recipeOutputFluids.addAll(((BasinRecipe) recipe).getFluidResults());
|
||||||
|
} else
|
||||||
|
recipeOutputItems.add(recipe.getRecipeOutput());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!basin.acceptOutputs(recipeOutputItems, recipeOutputFluids, simulate))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* For JEI purposes only
|
||||||
|
*/
|
||||||
|
public boolean convertedRecipe;
|
||||||
|
|
||||||
|
public static BasinRecipe convert(IRecipe<?> recipe) {
|
||||||
|
BasinRecipe basinRecipe = new ProcessingRecipeBuilder<>(BasinRecipe::new, recipe.getId())
|
||||||
|
.withItemIngredients(recipe.getIngredients())
|
||||||
|
.withSingleItemOutput(recipe.getRecipeOutput())
|
||||||
|
.build();
|
||||||
|
basinRecipe.convertedRecipe = true;
|
||||||
|
return basinRecipe;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected BasinRecipe(AllRecipeTypes type, ProcessingRecipeParams params) {
|
||||||
|
super(type, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
public BasinRecipe(ProcessingRecipeParams params) {
|
||||||
|
this(AllRecipeTypes.BASIN, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getMaxInputCount() {
|
||||||
|
return 9;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getMaxOutputCount() {
|
||||||
|
return 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getMaxFluidInputCount() {
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getMaxFluidOutputCount() {
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean canRequireHeat() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean matches(SmartInventory inv, @Nonnull World worldIn) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -79,14 +79,17 @@ public class BasinRenderer extends SmartTileEntityRenderer<BasinTileEntity> {
|
||||||
if (tankSegment.getRenderedFluid()
|
if (tankSegment.getRenderedFluid()
|
||||||
.isEmpty())
|
.isEmpty())
|
||||||
continue;
|
continue;
|
||||||
totalUnits += tankSegment.getTotalUnits(partialTicks);
|
float units = tankSegment.getTotalUnits(partialTicks);
|
||||||
|
if (units < 1)
|
||||||
|
continue;
|
||||||
|
totalUnits += units;
|
||||||
renderedFluids++;
|
renderedFluids++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (renderedFluids == 0)
|
if (renderedFluids == 0)
|
||||||
return 0;
|
return 0;
|
||||||
if (totalUnits == 0)
|
if (totalUnits < 1)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
float fluidLevel = MathHelper.clamp(totalUnits / 2000, 0, 1);
|
float fluidLevel = MathHelper.clamp(totalUnits / 2000, 0, 1);
|
||||||
|
@ -105,8 +108,11 @@ public class BasinRenderer extends SmartTileEntityRenderer<BasinTileEntity> {
|
||||||
FluidStack renderedFluid = tankSegment.getRenderedFluid();
|
FluidStack renderedFluid = tankSegment.getRenderedFluid();
|
||||||
if (renderedFluid.isEmpty())
|
if (renderedFluid.isEmpty())
|
||||||
continue;
|
continue;
|
||||||
|
float units = tankSegment.getTotalUnits(partialTicks);
|
||||||
|
if (units < 1)
|
||||||
|
continue;
|
||||||
|
|
||||||
float partial = tankSegment.getTotalUnits(partialTicks) / totalUnits;
|
float partial = units / totalUnits;
|
||||||
xMax += partial * 12 / 16f;
|
xMax += partial * 12 / 16f;
|
||||||
FluidRenderer.renderTiledFluidBB(renderedFluid, xMin, yMin, zMin, xMax, yMax, zMax, buffer, ms, light,
|
FluidRenderer.renderTiledFluidBB(renderedFluid, xMin, yMin, zMin, xMax, yMax, zMax, buffer, ms, light,
|
||||||
false);
|
false);
|
||||||
|
|
|
@ -5,6 +5,9 @@ import java.util.Optional;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
|
import com.simibubi.create.AllTags;
|
||||||
|
import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlock;
|
||||||
|
import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlock.HeatLevel;
|
||||||
import com.simibubi.create.foundation.fluid.CombinedTankWrapper;
|
import com.simibubi.create.foundation.fluid.CombinedTankWrapper;
|
||||||
import com.simibubi.create.foundation.item.SmartInventory;
|
import com.simibubi.create.foundation.item.SmartInventory;
|
||||||
import com.simibubi.create.foundation.tileEntity.SmartTileEntity;
|
import com.simibubi.create.foundation.tileEntity.SmartTileEntity;
|
||||||
|
@ -13,30 +16,36 @@ import com.simibubi.create.foundation.tileEntity.behaviour.ValueBoxTransform;
|
||||||
import com.simibubi.create.foundation.tileEntity.behaviour.belt.DirectBeltInputBehaviour;
|
import com.simibubi.create.foundation.tileEntity.behaviour.belt.DirectBeltInputBehaviour;
|
||||||
import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringBehaviour;
|
import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringBehaviour;
|
||||||
import com.simibubi.create.foundation.tileEntity.behaviour.fluid.SmartFluidTankBehaviour;
|
import com.simibubi.create.foundation.tileEntity.behaviour.fluid.SmartFluidTankBehaviour;
|
||||||
|
import com.simibubi.create.foundation.utility.Iterate;
|
||||||
import com.simibubi.create.foundation.utility.VecHelper;
|
import com.simibubi.create.foundation.utility.VecHelper;
|
||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.CompoundNBT;
|
import net.minecraft.nbt.CompoundNBT;
|
||||||
import net.minecraft.tileentity.ITickableTileEntity;
|
import net.minecraft.tileentity.ITickableTileEntity;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.tileentity.TileEntityType;
|
import net.minecraft.tileentity.TileEntityType;
|
||||||
import net.minecraft.util.Direction;
|
import net.minecraft.util.Direction;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.math.Vec3d;
|
import net.minecraft.util.math.Vec3d;
|
||||||
import net.minecraftforge.api.distmarker.Dist;
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||||
import net.minecraftforge.common.capabilities.Capability;
|
import net.minecraftforge.common.capabilities.Capability;
|
||||||
import net.minecraftforge.common.util.LazyOptional;
|
import net.minecraftforge.common.util.LazyOptional;
|
||||||
|
import net.minecraftforge.fluids.FluidStack;
|
||||||
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
|
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
|
||||||
import net.minecraftforge.fluids.capability.IFluidHandler;
|
import net.minecraftforge.fluids.capability.IFluidHandler;
|
||||||
|
import net.minecraftforge.fluids.capability.IFluidHandler.FluidAction;
|
||||||
import net.minecraftforge.items.CapabilityItemHandler;
|
import net.minecraftforge.items.CapabilityItemHandler;
|
||||||
|
import net.minecraftforge.items.IItemHandler;
|
||||||
import net.minecraftforge.items.IItemHandlerModifiable;
|
import net.minecraftforge.items.IItemHandlerModifiable;
|
||||||
|
import net.minecraftforge.items.ItemHandlerHelper;
|
||||||
import net.minecraftforge.items.wrapper.CombinedInvWrapper;
|
import net.minecraftforge.items.wrapper.CombinedInvWrapper;
|
||||||
|
|
||||||
public class BasinTileEntity extends SmartTileEntity implements ITickableTileEntity {
|
public class BasinTileEntity extends SmartTileEntity implements ITickableTileEntity {
|
||||||
|
|
||||||
public BasinInputInventory inputInventory;
|
public BasinInventory inputInventory;
|
||||||
public SmartFluidTankBehaviour inputTank;
|
public SmartFluidTankBehaviour inputTank;
|
||||||
|
|
||||||
protected SmartInventory outputInventory;
|
protected SmartInventory outputInventory;
|
||||||
protected SmartFluidTankBehaviour outputTank;
|
protected SmartFluidTankBehaviour outputTank;
|
||||||
|
|
||||||
|
@ -48,12 +57,11 @@ public class BasinTileEntity extends SmartTileEntity implements ITickableTileEnt
|
||||||
|
|
||||||
public BasinTileEntity(TileEntityType<? extends BasinTileEntity> type) {
|
public BasinTileEntity(TileEntityType<? extends BasinTileEntity> type) {
|
||||||
super(type);
|
super(type);
|
||||||
inputInventory = new BasinInputInventory(9, this);
|
inputInventory = new BasinInventory(9, this);
|
||||||
inputInventory.withMaxStackSize(8)
|
inputInventory.whenContentsChanged(() -> contentsChanged = true);
|
||||||
.forbidExtraction();
|
outputInventory = new BasinInventory(9, this).forbidInsertion();
|
||||||
outputInventory = new SmartInventory(9, this).forbidInsertion();
|
|
||||||
itemCapability = LazyOptional.of(() -> new CombinedInvWrapper(inputInventory, outputInventory));
|
|
||||||
|
|
||||||
|
itemCapability = LazyOptional.of(() -> new CombinedInvWrapper(inputInventory, outputInventory));
|
||||||
contentsChanged = true;
|
contentsChanged = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,7 +73,8 @@ public class BasinTileEntity extends SmartTileEntity implements ITickableTileEnt
|
||||||
.forRecipes();
|
.forRecipes();
|
||||||
behaviours.add(filtering);
|
behaviours.add(filtering);
|
||||||
|
|
||||||
inputTank = new SmartFluidTankBehaviour(SmartFluidTankBehaviour.INPUT, this, 2, 1000, true).forbidExtraction();
|
inputTank = new SmartFluidTankBehaviour(SmartFluidTankBehaviour.INPUT, this, 2, 1000, true)
|
||||||
|
.whenFluidUpdates(() -> contentsChanged = true);
|
||||||
outputTank = new SmartFluidTankBehaviour(SmartFluidTankBehaviour.OUTPUT, this, 2, 1000, true).forbidInsertion();
|
outputTank = new SmartFluidTankBehaviour(SmartFluidTankBehaviour.OUTPUT, this, 2, 1000, true).forbidInsertion();
|
||||||
behaviours.add(inputTank);
|
behaviours.add(inputTank);
|
||||||
behaviours.add(outputTank);
|
behaviours.add(outputTank);
|
||||||
|
@ -112,6 +121,16 @@ public class BasinTileEntity extends SmartTileEntity implements ITickableTileEnt
|
||||||
return super.getCapability(cap, side);
|
return super.getCapability(cap, side);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void notifyUpdate() {
|
||||||
|
super.notifyUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void lazyTick() {
|
||||||
|
super.lazyTick();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void tick() {
|
public void tick() {
|
||||||
super.tick();
|
super.tick();
|
||||||
|
@ -119,6 +138,17 @@ public class BasinTileEntity extends SmartTileEntity implements ITickableTileEnt
|
||||||
return;
|
return;
|
||||||
contentsChanged = false;
|
contentsChanged = false;
|
||||||
getOperator().ifPresent(te -> te.basinChecker.scheduleUpdate());
|
getOperator().ifPresent(te -> te.basinChecker.scheduleUpdate());
|
||||||
|
|
||||||
|
for (Direction offset : Iterate.horizontalDirections) {
|
||||||
|
BlockPos toUpdate = pos.up()
|
||||||
|
.offset(offset);
|
||||||
|
BlockState stateToUpdate = world.getBlockState(toUpdate);
|
||||||
|
if (stateToUpdate.getBlock() instanceof BasinBlock && stateToUpdate.get(BasinBlock.FACING) == offset.getOpposite()) {
|
||||||
|
TileEntity te = world.getTileEntity(toUpdate);
|
||||||
|
if (te instanceof BasinTileEntity)
|
||||||
|
((BasinTileEntity) te).contentsChanged = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Optional<BasinOperatingTileEntity> getOperator() {
|
private Optional<BasinOperatingTileEntity> getOperator() {
|
||||||
|
@ -152,11 +182,64 @@ public class BasinTileEntity extends SmartTileEntity implements ITickableTileEnt
|
||||||
return 256;
|
return 256;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean acceptOutputs(List<ItemStack> outputItems, List<FluidStack> outputFluids, boolean simulate) {
|
||||||
|
outputInventory.allowInsertion();
|
||||||
|
outputTank.allowInsertion();
|
||||||
|
boolean acceptOutputsInner = acceptOutputsInner(outputItems, outputFluids, simulate);
|
||||||
|
outputInventory.forbidInsertion();
|
||||||
|
outputTank.forbidInsertion();
|
||||||
|
return acceptOutputsInner;
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean acceptOutputsInner(List<ItemStack> outputItems, List<FluidStack> outputFluids, boolean simulate) {
|
||||||
|
BlockState blockState = getBlockState();
|
||||||
|
if (!(blockState.getBlock() instanceof BasinBlock))
|
||||||
|
return false;
|
||||||
|
Direction direction = blockState.get(BasinBlock.FACING);
|
||||||
|
|
||||||
|
IItemHandler targetInv = null;
|
||||||
|
IFluidHandler targetTank = null;
|
||||||
|
|
||||||
|
if (direction == Direction.DOWN) {
|
||||||
|
// No output basin, gather locally
|
||||||
|
targetInv = outputInventory;
|
||||||
|
targetTank = outputTank.getCapability()
|
||||||
|
.orElse(null);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
// Output basin, try moving items to it
|
||||||
|
TileEntity te = world.getTileEntity(pos.down()
|
||||||
|
.offset(direction));
|
||||||
|
if (!(te instanceof BasinTileEntity))
|
||||||
|
return false;
|
||||||
|
targetInv = te.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY)
|
||||||
|
.orElse(null);
|
||||||
|
targetTank = te.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY)
|
||||||
|
.orElse(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (targetInv == null)
|
||||||
|
return false;
|
||||||
|
for (ItemStack itemStack : outputItems)
|
||||||
|
if (!ItemHandlerHelper.insertItemStacked(targetInv, itemStack.copy(), simulate)
|
||||||
|
.isEmpty())
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (targetTank == null)
|
||||||
|
return false;
|
||||||
|
for (FluidStack fluidStack : outputFluids)
|
||||||
|
if (targetTank.fill(fluidStack.copy(), simulate ? FluidAction.SIMULATE : FluidAction.EXECUTE) != fluidStack
|
||||||
|
.getAmount())
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
class BasinValueBox extends ValueBoxTransform.Sided {
|
class BasinValueBox extends ValueBoxTransform.Sided {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Vec3d getSouthLocation() {
|
protected Vec3d getSouthLocation() {
|
||||||
return VecHelper.voxelSpace(8, 12, 16);
|
return VecHelper.voxelSpace(8, 12, 15.75);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -171,4 +254,11 @@ public class BasinTileEntity extends SmartTileEntity implements ITickableTileEnt
|
||||||
inputInventory.deserializeNBT(compound.getCompound("InputItems"));
|
inputInventory.deserializeNBT(compound.getCompound("InputItems"));
|
||||||
outputInventory.deserializeNBT(compound.getCompound("OutputItems"));
|
outputInventory.deserializeNBT(compound.getCompound("OutputItems"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public HeatLevel getHeatLevel() {
|
||||||
|
BlockState state = world.getBlockState(pos.down(1));
|
||||||
|
if (state.has(BlazeBurnerBlock.HEAT_LEVEL))
|
||||||
|
return state.get(BlazeBurnerBlock.HEAT_LEVEL);
|
||||||
|
return AllTags.AllBlockTags.FAN_HEATERS.matches(state) ? HeatLevel.SMOULDERING : HeatLevel.NONE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,75 @@
|
||||||
|
package com.simibubi.create.content.contraptions.processing;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
import com.simibubi.create.AllRecipeTypes;
|
||||||
|
import com.simibubi.create.foundation.utility.Pair;
|
||||||
|
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.item.crafting.IRecipe;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.util.LazyOptional;
|
||||||
|
import net.minecraftforge.fluids.FluidStack;
|
||||||
|
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
|
||||||
|
import net.minecraftforge.fluids.capability.IFluidHandler.FluidAction;
|
||||||
|
import net.minecraftforge.fluids.capability.IFluidHandlerItem;
|
||||||
|
import net.minecraftforge.items.ItemStackHandler;
|
||||||
|
import net.minecraftforge.items.wrapper.RecipeWrapper;
|
||||||
|
|
||||||
|
public class EmptyingByBasin {
|
||||||
|
|
||||||
|
static RecipeWrapper wrapper = new RecipeWrapper(new ItemStackHandler(1));
|
||||||
|
|
||||||
|
public static boolean canItemBeEmptied(World world, ItemStack stack) {
|
||||||
|
wrapper.setInventorySlotContents(0, stack);
|
||||||
|
if (AllRecipeTypes.EMPTYING.find(wrapper, world)
|
||||||
|
.isPresent())
|
||||||
|
return true;
|
||||||
|
|
||||||
|
LazyOptional<IFluidHandlerItem> capability =
|
||||||
|
stack.getCapability(CapabilityFluidHandler.FLUID_HANDLER_ITEM_CAPABILITY);
|
||||||
|
IFluidHandlerItem tank = capability.orElse(null);
|
||||||
|
if (tank == null)
|
||||||
|
return false;
|
||||||
|
for (int i = 0; i < tank.getTanks(); i++) {
|
||||||
|
if (tank.getFluidInTank(i)
|
||||||
|
.getAmount() > 0)
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Pair<FluidStack, ItemStack> emptyItem(World world, ItemStack stack, boolean simulate) {
|
||||||
|
FluidStack resultingFluid = FluidStack.EMPTY;
|
||||||
|
ItemStack resultingItem = ItemStack.EMPTY;
|
||||||
|
|
||||||
|
wrapper.setInventorySlotContents(0, stack);
|
||||||
|
Optional<IRecipe<RecipeWrapper>> recipe = AllRecipeTypes.EMPTYING.find(wrapper, world);
|
||||||
|
if (recipe.isPresent()) {
|
||||||
|
EmptyingRecipe emptyingRecipe = (EmptyingRecipe) recipe.get();
|
||||||
|
List<ItemStack> results = emptyingRecipe.rollResults();
|
||||||
|
if (!simulate)
|
||||||
|
stack.shrink(1);
|
||||||
|
resultingItem = results.isEmpty() ? ItemStack.EMPTY : results.get(0);
|
||||||
|
resultingFluid = emptyingRecipe.getResultingFluid();
|
||||||
|
return Pair.of(resultingFluid, resultingItem);
|
||||||
|
}
|
||||||
|
|
||||||
|
ItemStack split = stack.copy();
|
||||||
|
split.setCount(1);
|
||||||
|
LazyOptional<IFluidHandlerItem> capability =
|
||||||
|
split.getCapability(CapabilityFluidHandler.FLUID_HANDLER_ITEM_CAPABILITY);
|
||||||
|
IFluidHandlerItem tank = capability.orElse(null);
|
||||||
|
if (tank == null)
|
||||||
|
return Pair.of(resultingFluid, resultingItem);
|
||||||
|
resultingFluid = tank.drain(1000, simulate ? FluidAction.SIMULATE : FluidAction.EXECUTE);
|
||||||
|
resultingItem = tank.getContainer()
|
||||||
|
.copy();
|
||||||
|
if (!simulate)
|
||||||
|
stack.shrink(1);
|
||||||
|
|
||||||
|
return Pair.of(resultingFluid, resultingItem);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,42 @@
|
||||||
|
package com.simibubi.create.content.contraptions.processing;
|
||||||
|
|
||||||
|
import com.simibubi.create.AllRecipeTypes;
|
||||||
|
import com.simibubi.create.content.contraptions.processing.ProcessingRecipeBuilder.ProcessingRecipeParams;
|
||||||
|
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.fluids.FluidStack;
|
||||||
|
import net.minecraftforge.items.wrapper.RecipeWrapper;
|
||||||
|
|
||||||
|
public class EmptyingRecipe extends ProcessingRecipe<RecipeWrapper> {
|
||||||
|
|
||||||
|
public EmptyingRecipe(ProcessingRecipeParams params) {
|
||||||
|
super(AllRecipeTypes.EMPTYING, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean matches(RecipeWrapper inv, World p_77569_2_) {
|
||||||
|
return ingredients.get(0).test(inv.getStackInSlot(0));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getMaxInputCount() {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getMaxOutputCount() {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getMaxFluidOutputCount() {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public FluidStack getResultingFluid() {
|
||||||
|
if (fluidResults.isEmpty())
|
||||||
|
throw new IllegalStateException("Emptying Recipe: " + id.toString() + " has no fluid output!");
|
||||||
|
return fluidResults.get(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -142,4 +142,14 @@ public class SequencedGearshiftBlock extends HorizontalAxisKineticBlock implemen
|
||||||
return SequencedGearshiftTileEntity.class;
|
return SequencedGearshiftTileEntity.class;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasComparatorInputOverride(BlockState p_149740_1_) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getComparatorInputOverride(BlockState state, World world, BlockPos pos) {
|
||||||
|
return state.get(STATE).intValue();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,11 +3,15 @@ package com.simibubi.create.content.contraptions.relays.advanced.sequencer;
|
||||||
import com.simibubi.create.AllBlocks;
|
import com.simibubi.create.AllBlocks;
|
||||||
import com.simibubi.create.foundation.gui.AbstractSimiScreen;
|
import com.simibubi.create.foundation.gui.AbstractSimiScreen;
|
||||||
import com.simibubi.create.foundation.gui.AllGuiTextures;
|
import com.simibubi.create.foundation.gui.AllGuiTextures;
|
||||||
|
import com.simibubi.create.foundation.gui.AllIcons;
|
||||||
import com.simibubi.create.foundation.gui.GuiGameElement;
|
import com.simibubi.create.foundation.gui.GuiGameElement;
|
||||||
|
import com.simibubi.create.foundation.gui.widgets.IconButton;
|
||||||
import com.simibubi.create.foundation.gui.widgets.ScrollInput;
|
import com.simibubi.create.foundation.gui.widgets.ScrollInput;
|
||||||
import com.simibubi.create.foundation.gui.widgets.SelectionScrollInput;
|
import com.simibubi.create.foundation.gui.widgets.SelectionScrollInput;
|
||||||
import com.simibubi.create.foundation.networking.AllPackets;
|
import com.simibubi.create.foundation.networking.AllPackets;
|
||||||
import com.simibubi.create.foundation.utility.Lang;
|
import com.simibubi.create.foundation.utility.Lang;
|
||||||
|
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.ListNBT;
|
import net.minecraft.nbt.ListNBT;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
@ -18,6 +22,7 @@ public class SequencedGearshiftScreen extends AbstractSimiScreen {
|
||||||
|
|
||||||
private final ItemStack renderedItem = AllBlocks.SEQUENCED_GEARSHIFT.asStack();
|
private final ItemStack renderedItem = AllBlocks.SEQUENCED_GEARSHIFT.asStack();
|
||||||
private final AllGuiTextures background = AllGuiTextures.SEQUENCER;
|
private final AllGuiTextures background = AllGuiTextures.SEQUENCER;
|
||||||
|
private IconButton confirmButton;
|
||||||
|
|
||||||
private final String title = Lang.translate("gui.sequenced_gearshift.title");
|
private final String title = Lang.translate("gui.sequenced_gearshift.title");
|
||||||
private ListNBT compareTag;
|
private ListNBT compareTag;
|
||||||
|
@ -47,9 +52,9 @@ public class SequencedGearshiftScreen extends AbstractSimiScreen {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initInputsOfRow(int row) {
|
public void initInputsOfRow(int row) {
|
||||||
int x = guiLeft + 28;
|
int x = guiLeft + 30;
|
||||||
int y = guiTop + 29;
|
int y = guiTop + 18;
|
||||||
int rowHeight = 18;
|
int rowHeight = 22;
|
||||||
|
|
||||||
Vector<ScrollInput> rowInputs = inputs.get(row);
|
Vector<ScrollInput> rowInputs = inputs.get(row);
|
||||||
rowInputs.forEach(widgets::remove);
|
rowInputs.forEach(widgets::remove);
|
||||||
|
@ -58,13 +63,13 @@ public class SequencedGearshiftScreen extends AbstractSimiScreen {
|
||||||
Instruction instruction = instructions.get(row);
|
Instruction instruction = instructions.get(row);
|
||||||
|
|
||||||
ScrollInput type =
|
ScrollInput type =
|
||||||
new SelectionScrollInput(x, y + rowHeight * row, 50, 14).forOptions(SequencerInstructions.getOptions())
|
new SelectionScrollInput(x, y + rowHeight * row, 50, 18).forOptions(SequencerInstructions.getOptions())
|
||||||
.calling(state -> instructionUpdated(index, state))
|
.calling(state -> instructionUpdated(index, state))
|
||||||
.setState(instruction.instruction.ordinal())
|
.setState(instruction.instruction.ordinal())
|
||||||
.titled(Lang.translate("gui.sequenced_gearshift.instruction"));
|
.titled(Lang.translate("gui.sequenced_gearshift.instruction"));
|
||||||
ScrollInput value =
|
ScrollInput value =
|
||||||
new ScrollInput(x + 54, y + rowHeight * row, 30, 14).calling(state -> instruction.value = state);
|
new ScrollInput(x + 58, y + rowHeight * row, 28, 18).calling(state -> instruction.value = state);
|
||||||
ScrollInput direction = new SelectionScrollInput(x + 88, y + rowHeight * row, 18, 14)
|
ScrollInput direction = new SelectionScrollInput(x + 88, y + rowHeight * row, 28, 18)
|
||||||
.forOptions(InstructionSpeedModifiers.getOptions())
|
.forOptions(InstructionSpeedModifiers.getOptions())
|
||||||
.calling(state -> instruction.speedModifier = InstructionSpeedModifiers.values()[state])
|
.calling(state -> instruction.speedModifier = InstructionSpeedModifiers.values()[state])
|
||||||
.titled(Lang.translate("gui.sequenced_gearshift.speed"));
|
.titled(Lang.translate("gui.sequenced_gearshift.speed"));
|
||||||
|
@ -75,6 +80,10 @@ public class SequencedGearshiftScreen extends AbstractSimiScreen {
|
||||||
|
|
||||||
widgets.addAll(rowInputs);
|
widgets.addAll(rowInputs);
|
||||||
updateParamsOfRow(row);
|
updateParamsOfRow(row);
|
||||||
|
|
||||||
|
confirmButton =
|
||||||
|
new IconButton(guiLeft + background.width - 33, guiTop + background.height - 24, AllIcons.I_CONFIRM);
|
||||||
|
widgets.add(confirmButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateParamsOfRow(int row) {
|
public void updateParamsOfRow(int row) {
|
||||||
|
@ -112,35 +121,32 @@ public class SequencedGearshiftScreen extends AbstractSimiScreen {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void renderWindow(int mouseX, int mouseY, float partialTicks) {
|
protected void renderWindow(int mouseX, int mouseY, float partialTicks) {
|
||||||
int hFontColor = 0xD3CBBE;
|
|
||||||
background.draw(this, guiLeft, guiTop);
|
background.draw(this, guiLeft, guiTop);
|
||||||
|
|
||||||
for (int row = 0; row < instructions.capacity(); row++) {
|
for (int row = 0; row < instructions.capacity(); row++) {
|
||||||
AllGuiTextures toDraw = AllGuiTextures.SEQUENCER_EMPTY;
|
AllGuiTextures toDraw = AllGuiTextures.SEQUENCER_EMPTY;
|
||||||
int yOffset = toDraw.height * row;
|
int yOffset = toDraw.height * row;
|
||||||
|
|
||||||
if (row < instructions.size()) {
|
if (row >= instructions.size()) {
|
||||||
Instruction instruction = instructions.get(row);
|
toDraw.draw(guiLeft, guiTop + 14 + yOffset);
|
||||||
SequencerInstructions def = instruction.instruction;
|
|
||||||
def.background.draw(guiLeft + 14, guiTop + 29 + yOffset);
|
|
||||||
|
|
||||||
label(32, 6 + yOffset, Lang.translate(def.translationKey));
|
|
||||||
if (def.hasValueParameter) {
|
|
||||||
String text = def.formatValue(instruction.value);
|
|
||||||
int stringWidth = font.getStringWidth(text);
|
|
||||||
label(85 + (12 - stringWidth / 2), 6 + yOffset, text);
|
|
||||||
}
|
|
||||||
if (def.hasSpeedParameter)
|
|
||||||
label(120, 6 + yOffset, instruction.speedModifier.label);
|
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
toDraw.draw(guiLeft + 14, guiTop + 29 + yOffset);
|
Instruction instruction = instructions.get(row);
|
||||||
|
SequencerInstructions def = instruction.instruction;
|
||||||
|
def.background.draw(guiLeft, guiTop + 14 + yOffset);
|
||||||
|
|
||||||
|
label(36, yOffset - 3, Lang.translate(def.translationKey));
|
||||||
|
if (def.hasValueParameter) {
|
||||||
|
String text = def.formatValue(instruction.value);
|
||||||
|
int stringWidth = font.getStringWidth(text);
|
||||||
|
label(90 + (12 - stringWidth / 2), yOffset - 3, text);
|
||||||
|
}
|
||||||
|
if (def.hasSpeedParameter)
|
||||||
|
label(127, yOffset - 3, instruction.speedModifier.label);
|
||||||
}
|
}
|
||||||
|
|
||||||
font.drawStringWithShadow(title, guiLeft - 3 + (background.width - font.getStringWidth(title)) / 2, guiTop + 10,
|
font.drawStringWithShadow(title, guiLeft - 3 + (background.width - font.getStringWidth(title)) / 2, guiTop + 3, 0xffffff);
|
||||||
hFontColor);
|
|
||||||
|
|
||||||
GuiGameElement.of(renderedItem)
|
GuiGameElement.of(renderedItem)
|
||||||
.at(guiLeft + background.width + 20, guiTop + 50)
|
.at(guiLeft + background.width + 20, guiTop + 50)
|
||||||
|
@ -184,4 +190,14 @@ public class SequencedGearshiftScreen extends AbstractSimiScreen {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean mouseClicked(double x, double y, int button) {
|
||||||
|
if (confirmButton.isHovered()) {
|
||||||
|
Minecraft.getInstance().player.closeScreen();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return super.mouseClicked(x, y, button);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ import com.simibubi.create.foundation.utility.Lang;
|
||||||
public enum SequencerInstructions {
|
public enum SequencerInstructions {
|
||||||
|
|
||||||
TURN_ANGLE("angle", AllGuiTextures.SEQUENCER_INSTRUCTION, true, true, 360, 45, 90),
|
TURN_ANGLE("angle", AllGuiTextures.SEQUENCER_INSTRUCTION, true, true, 360, 45, 90),
|
||||||
TURN_DISTANCE("distance", AllGuiTextures.SEQUENCER_INSTRUCTION, true, true, 50, 5, 5),
|
TURN_DISTANCE("distance", AllGuiTextures.SEQUENCER_INSTRUCTION, true, true, 128, 5, 5),
|
||||||
WAIT("duration", AllGuiTextures.SEQUENCER_WAIT, true, false, 600, 20, 10),
|
WAIT("duration", AllGuiTextures.SEQUENCER_WAIT, true, false, 600, 20, 10),
|
||||||
END("", AllGuiTextures.SEQUENCER_END),
|
END("", AllGuiTextures.SEQUENCER_END),
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,11 @@ public class BeltRenderer extends SafeTileEntityRenderer<BeltTileEntity> {
|
||||||
super(dispatcher);
|
super(dispatcher);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isGlobalRenderer(BeltTileEntity te) {
|
||||||
|
return BeltBlock.canTransportObjects(te.getBlockState());
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void renderSafe(BeltTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer,
|
protected void renderSafe(BeltTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer,
|
||||||
int light, int overlay) {
|
int light, int overlay) {
|
||||||
|
|
|
@ -13,7 +13,6 @@ import net.minecraft.block.Blocks;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.entity.player.ClientPlayerEntity;
|
import net.minecraft.client.entity.player.ClientPlayerEntity;
|
||||||
import net.minecraft.client.renderer.ActiveRenderInfo;
|
import net.minecraft.client.renderer.ActiveRenderInfo;
|
||||||
import net.minecraft.client.renderer.Atlases;
|
|
||||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||||
import net.minecraft.client.renderer.RenderType;
|
import net.minecraft.client.renderer.RenderType;
|
||||||
import net.minecraft.client.renderer.model.IBakedModel;
|
import net.minecraft.client.renderer.model.IBakedModel;
|
||||||
|
@ -103,7 +102,7 @@ public class SymmetryHandler {
|
||||||
double speed = 1 / 16d;
|
double speed = 1 / 16d;
|
||||||
yShift = MathHelper.sin((float) (AnimationTickHolder.getRenderTick() * speed)) / 5f;
|
yShift = MathHelper.sin((float) (AnimationTickHolder.getRenderTick() * speed)) / 5f;
|
||||||
|
|
||||||
IRenderTypeBuffer buffer = Minecraft.getInstance()
|
IRenderTypeBuffer.Impl buffer = Minecraft.getInstance()
|
||||||
.getBufferBuilders()
|
.getBufferBuilders()
|
||||||
.getEntityVertexConsumers();
|
.getEntityVertexConsumers();
|
||||||
ActiveRenderInfo info = mc.gameRenderer.getActiveRenderInfo();
|
ActiveRenderInfo info = mc.gameRenderer.getActiveRenderInfo();
|
||||||
|
@ -117,7 +116,7 @@ public class SymmetryHandler {
|
||||||
mirror.applyModelTransform(ms);
|
mirror.applyModelTransform(ms);
|
||||||
IBakedModel model = mirror.getModel()
|
IBakedModel model = mirror.getModel()
|
||||||
.get();
|
.get();
|
||||||
IVertexBuilder builder = buffer.getBuffer(RenderType.getTranslucent());
|
IVertexBuilder builder = buffer.getBuffer(RenderType.getSolid());
|
||||||
|
|
||||||
mc.getBlockRendererDispatcher()
|
mc.getBlockRendererDispatcher()
|
||||||
.getBlockModelRenderer()
|
.getBlockModelRenderer()
|
||||||
|
@ -125,11 +124,7 @@ public class SymmetryHandler {
|
||||||
player.world.getRandom(), MathHelper.getPositionRandom(pos), OverlayTexture.DEFAULT_UV,
|
player.world.getRandom(), MathHelper.getPositionRandom(pos), OverlayTexture.DEFAULT_UV,
|
||||||
EmptyModelData.INSTANCE);
|
EmptyModelData.INSTANCE);
|
||||||
|
|
||||||
Minecraft.getInstance()
|
buffer.draw();
|
||||||
.getBufferBuilders()
|
|
||||||
.getEntityVertexConsumers()
|
|
||||||
.draw(Atlases.getEntityTranslucent());
|
|
||||||
|
|
||||||
ms.pop();
|
ms.pop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,16 +2,24 @@ package com.simibubi.create.content.curiosities.symmetry;
|
||||||
|
|
||||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||||
import com.mojang.blaze3d.systems.RenderSystem;
|
import com.mojang.blaze3d.systems.RenderSystem;
|
||||||
import com.simibubi.create.content.curiosities.symmetry.mirror.*;
|
import com.simibubi.create.content.curiosities.symmetry.mirror.CrossPlaneMirror;
|
||||||
|
import com.simibubi.create.content.curiosities.symmetry.mirror.EmptyMirror;
|
||||||
|
import com.simibubi.create.content.curiosities.symmetry.mirror.PlaneMirror;
|
||||||
|
import com.simibubi.create.content.curiosities.symmetry.mirror.SymmetryMirror;
|
||||||
|
import com.simibubi.create.content.curiosities.symmetry.mirror.TriplePlaneMirror;
|
||||||
import com.simibubi.create.foundation.gui.AbstractSimiScreen;
|
import com.simibubi.create.foundation.gui.AbstractSimiScreen;
|
||||||
import com.simibubi.create.foundation.gui.AllGuiTextures;
|
import com.simibubi.create.foundation.gui.AllGuiTextures;
|
||||||
|
import com.simibubi.create.foundation.gui.AllIcons;
|
||||||
import com.simibubi.create.foundation.gui.GuiGameElement;
|
import com.simibubi.create.foundation.gui.GuiGameElement;
|
||||||
|
import com.simibubi.create.foundation.gui.widgets.IconButton;
|
||||||
import com.simibubi.create.foundation.gui.widgets.Label;
|
import com.simibubi.create.foundation.gui.widgets.Label;
|
||||||
import com.simibubi.create.foundation.gui.widgets.ScrollInput;
|
import com.simibubi.create.foundation.gui.widgets.ScrollInput;
|
||||||
import com.simibubi.create.foundation.gui.widgets.SelectionScrollInput;
|
import com.simibubi.create.foundation.gui.widgets.SelectionScrollInput;
|
||||||
import com.simibubi.create.foundation.networking.AllPackets;
|
import com.simibubi.create.foundation.networking.AllPackets;
|
||||||
import com.simibubi.create.foundation.networking.NbtPacket;
|
import com.simibubi.create.foundation.networking.NbtPacket;
|
||||||
import com.simibubi.create.foundation.utility.Lang;
|
import com.simibubi.create.foundation.utility.Lang;
|
||||||
|
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.renderer.Vector3f;
|
import net.minecraft.client.renderer.Vector3f;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.CompoundNBT;
|
import net.minecraft.nbt.CompoundNBT;
|
||||||
|
@ -25,6 +33,7 @@ public class SymmetryWandScreen extends AbstractSimiScreen {
|
||||||
private Label labelType;
|
private Label labelType;
|
||||||
private ScrollInput areaAlign;
|
private ScrollInput areaAlign;
|
||||||
private Label labelAlign;
|
private Label labelAlign;
|
||||||
|
private IconButton confirmButton;
|
||||||
|
|
||||||
private final String mirrorType = Lang.translate("gui.symmetryWand.mirrorType");
|
private final String mirrorType = Lang.translate("gui.symmetryWand.mirrorType");
|
||||||
private final String orientation = Lang.translate("gui.symmetryWand.orientation");
|
private final String orientation = Lang.translate("gui.symmetryWand.orientation");
|
||||||
|
@ -37,9 +46,9 @@ public class SymmetryWandScreen extends AbstractSimiScreen {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
currentElement = SymmetryWandItem.getMirror(wand);
|
currentElement = SymmetryWandItem.getMirror(wand);
|
||||||
if (currentElement instanceof EmptyMirror) {
|
if (currentElement instanceof EmptyMirror)
|
||||||
currentElement = new PlaneMirror(Vec3d.ZERO);
|
currentElement = new PlaneMirror(Vec3d.ZERO);
|
||||||
}
|
|
||||||
this.hand = hand;
|
this.hand = hand;
|
||||||
this.wand = wand;
|
this.wand = wand;
|
||||||
}
|
}
|
||||||
|
@ -47,16 +56,17 @@ public class SymmetryWandScreen extends AbstractSimiScreen {
|
||||||
@Override
|
@Override
|
||||||
public void init() {
|
public void init() {
|
||||||
super.init();
|
super.init();
|
||||||
this.setWindowSize(AllGuiTextures.WAND_SYMMETRY.width + 50, AllGuiTextures.WAND_SYMMETRY.height + 50);
|
AllGuiTextures background = AllGuiTextures.WAND_OF_SYMMETRY;
|
||||||
|
this.setWindowSize(background.width + 50, background.height + 50);
|
||||||
|
|
||||||
labelType = new Label(guiLeft + 122, guiTop + 15, "").colored(0xFFFFFFFF)
|
labelType = new Label(guiLeft + 49, guiTop + 26, "").colored(0xFFFFFFFF)
|
||||||
.withShadow();
|
.withShadow();
|
||||||
labelAlign = new Label(guiLeft + 122, guiTop + 35, "").colored(0xFFFFFFFF)
|
labelAlign = new Label(guiLeft + 49, guiTop + 48, "").colored(0xFFFFFFFF)
|
||||||
.withShadow();
|
.withShadow();
|
||||||
|
|
||||||
int state =
|
int state =
|
||||||
currentElement instanceof TriplePlaneMirror ? 2 : currentElement instanceof CrossPlaneMirror ? 1 : 0;
|
currentElement instanceof TriplePlaneMirror ? 2 : currentElement instanceof CrossPlaneMirror ? 1 : 0;
|
||||||
areaType = new SelectionScrollInput(guiLeft + 119, guiTop + 12, 70, 14).forOptions(SymmetryMirror.getMirrors())
|
areaType = new SelectionScrollInput(guiLeft + 45, guiTop + 21, 109, 18).forOptions(SymmetryMirror.getMirrors())
|
||||||
.titled(mirrorType)
|
.titled(mirrorType)
|
||||||
.writingTo(labelType)
|
.writingTo(labelType)
|
||||||
.setState(state);
|
.setState(state);
|
||||||
|
@ -86,14 +96,16 @@ public class SymmetryWandScreen extends AbstractSimiScreen {
|
||||||
widgets.add(areaType);
|
widgets.add(areaType);
|
||||||
widgets.add(labelType);
|
widgets.add(labelType);
|
||||||
|
|
||||||
|
confirmButton = new IconButton(guiLeft + background.width - 33, guiTop + background.height - 24, AllIcons.I_CONFIRM);
|
||||||
|
widgets.add(confirmButton);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initAlign(SymmetryMirror element) {
|
private void initAlign(SymmetryMirror element) {
|
||||||
if (areaAlign != null) {
|
if (areaAlign != null)
|
||||||
widgets.remove(areaAlign);
|
widgets.remove(areaAlign);
|
||||||
}
|
|
||||||
|
|
||||||
areaAlign = new SelectionScrollInput(guiLeft + 119, guiTop + 32, 70, 14).forOptions(element.getAlignToolTips())
|
areaAlign = new SelectionScrollInput(guiLeft + 45, guiTop + 43, 109, 18).forOptions(element.getAlignToolTips())
|
||||||
.titled(orientation)
|
.titled(orientation)
|
||||||
.writingTo(labelAlign)
|
.writingTo(labelAlign)
|
||||||
.setState(element.getOrientationIndex())
|
.setState(element.getOrientationIndex())
|
||||||
|
@ -104,18 +116,14 @@ public class SymmetryWandScreen extends AbstractSimiScreen {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void renderWindow(int mouseX, int mouseY, float partialTicks) {
|
protected void renderWindow(int mouseX, int mouseY, float partialTicks) {
|
||||||
AllGuiTextures.WAND_SYMMETRY.draw(this, guiLeft, guiTop);
|
AllGuiTextures.WAND_OF_SYMMETRY.draw(this, guiLeft, guiTop);
|
||||||
|
|
||||||
int x = guiLeft + 63;
|
font.drawStringWithShadow(wand.getDisplayName()
|
||||||
int y = guiTop + 15;
|
.getFormattedText(), guiLeft + 11, guiTop + 3, 0xffffff);
|
||||||
|
|
||||||
font.drawString(mirrorType, x - 5, y, AllGuiTextures.FONT_COLOR);
|
|
||||||
font.drawString(orientation, x - 5, y + 20, AllGuiTextures.FONT_COLOR);
|
|
||||||
|
|
||||||
renderBlock();
|
renderBlock();
|
||||||
|
|
||||||
GuiGameElement.of(wand)
|
GuiGameElement.of(wand)
|
||||||
.at(guiLeft + 200, guiTop + 170)
|
.at(guiLeft + 170, guiTop + 200)
|
||||||
.scale(4)
|
.scale(4)
|
||||||
.rotate(-70, 20, 20)
|
.rotate(-70, 20, 20)
|
||||||
.render();
|
.render();
|
||||||
|
@ -125,9 +133,9 @@ public class SymmetryWandScreen extends AbstractSimiScreen {
|
||||||
RenderSystem.pushMatrix();
|
RenderSystem.pushMatrix();
|
||||||
|
|
||||||
MatrixStack ms = new MatrixStack();
|
MatrixStack ms = new MatrixStack();
|
||||||
ms.translate(guiLeft + 18, guiTop + 11, 20);
|
ms.translate(guiLeft + 25.5f, guiTop + 21, 20);
|
||||||
ms.multiply(new Vector3f(.3f, 1f, 0f).getDegreesQuaternion(-22.5f));
|
ms.multiply(new Vector3f(.3f, 1f, 0f).getDegreesQuaternion(-22.5f));
|
||||||
ms.scale(32, -32, 32);
|
ms.scale(16, -16, 16);
|
||||||
currentElement.applyModelTransform(ms);
|
currentElement.applyModelTransform(ms);
|
||||||
RenderSystem.multMatrix(ms.peek()
|
RenderSystem.multMatrix(ms.peek()
|
||||||
.getModel());
|
.getModel());
|
||||||
|
@ -148,4 +156,14 @@ public class SymmetryWandScreen extends AbstractSimiScreen {
|
||||||
super.removed();
|
super.removed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean mouseClicked(double x, double y, int button) {
|
||||||
|
if (confirmButton.isHovered()) {
|
||||||
|
Minecraft.getInstance().player.closeScreen();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return super.mouseClicked(x, y, button);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@ import java.util.Vector;
|
||||||
import com.mojang.blaze3d.systems.RenderSystem;
|
import com.mojang.blaze3d.systems.RenderSystem;
|
||||||
import com.simibubi.create.foundation.gui.AbstractSimiScreen;
|
import com.simibubi.create.foundation.gui.AbstractSimiScreen;
|
||||||
import com.simibubi.create.foundation.gui.AllGuiTextures;
|
import com.simibubi.create.foundation.gui.AllGuiTextures;
|
||||||
|
import com.simibubi.create.foundation.gui.AllIcons;
|
||||||
import com.simibubi.create.foundation.gui.GuiGameElement;
|
import com.simibubi.create.foundation.gui.GuiGameElement;
|
||||||
import com.simibubi.create.foundation.gui.widgets.IconButton;
|
import com.simibubi.create.foundation.gui.widgets.IconButton;
|
||||||
import com.simibubi.create.foundation.networking.AllPackets;
|
import com.simibubi.create.foundation.networking.AllPackets;
|
||||||
|
@ -14,19 +15,18 @@ import com.simibubi.create.foundation.utility.Lang;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.Blocks;
|
import net.minecraft.block.Blocks;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.renderer.texture.AtlasTexture;
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.CompoundNBT;
|
import net.minecraft.nbt.CompoundNBT;
|
||||||
import net.minecraft.nbt.NBTUtil;
|
import net.minecraft.nbt.NBTUtil;
|
||||||
import net.minecraft.util.Hand;
|
import net.minecraft.util.Hand;
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
public class ZapperScreen extends AbstractSimiScreen {
|
public class ZapperScreen extends AbstractSimiScreen {
|
||||||
|
|
||||||
protected ItemStack zapper;
|
protected ItemStack zapper;
|
||||||
protected boolean offhand;
|
protected boolean offhand;
|
||||||
protected float animationProgress;
|
protected float animationProgress;
|
||||||
protected AllGuiTextures background;
|
protected AllGuiTextures background;
|
||||||
|
private IconButton confirmButton;
|
||||||
|
|
||||||
protected final String patternSection = Lang.translate("gui.blockzapper.patternSection");
|
protected final String patternSection = Lang.translate("gui.blockzapper.patternSection");
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ public class ZapperScreen extends AbstractSimiScreen {
|
||||||
this.zapper = zapper;
|
this.zapper = zapper;
|
||||||
this.offhand = offhand;
|
this.offhand = offhand;
|
||||||
title = "";
|
title = "";
|
||||||
brightColor = 0xCCDDFF;
|
brightColor = 0xfefefe;
|
||||||
fontColor = AllGuiTextures.FONT_COLOR;
|
fontColor = AllGuiTextures.FONT_COLOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,6 +52,9 @@ public class ZapperScreen extends AbstractSimiScreen {
|
||||||
super.init();
|
super.init();
|
||||||
widgets.clear();
|
widgets.clear();
|
||||||
|
|
||||||
|
confirmButton = new IconButton(guiLeft + background.width - 53, guiTop + background.height - 24, AllIcons.I_CONFIRM);
|
||||||
|
widgets.add(confirmButton);
|
||||||
|
|
||||||
int i = guiLeft - 20;
|
int i = guiLeft - 20;
|
||||||
int j = guiTop;
|
int j = guiTop;
|
||||||
CompoundNBT nbt = zapper.getOrCreateTag();
|
CompoundNBT nbt = zapper.getOrCreateTag();
|
||||||
|
@ -61,7 +64,7 @@ public class ZapperScreen extends AbstractSimiScreen {
|
||||||
for (int col = 0; col <= 2; col++) {
|
for (int col = 0; col <= 2; col++) {
|
||||||
int id = patternButtons.size();
|
int id = patternButtons.size();
|
||||||
PlacementPatterns pattern = PlacementPatterns.values()[id];
|
PlacementPatterns pattern = PlacementPatterns.values()[id];
|
||||||
patternButtons.add(new IconButton(i + 147 + col * 18, j + 23 + row * 18, pattern.icon));
|
patternButtons.add(new IconButton(i + background.width - 76 + col * 18, j + 19 + row * 18, pattern.icon));
|
||||||
patternButtons.get(id)
|
patternButtons.get(id)
|
||||||
.setToolTip(Lang.translate("gui.blockzapper.pattern." + pattern.translationKey));
|
.setToolTip(Lang.translate("gui.blockzapper.pattern." + pattern.translationKey));
|
||||||
}
|
}
|
||||||
|
@ -82,17 +85,12 @@ public class ZapperScreen extends AbstractSimiScreen {
|
||||||
background.draw(this, i, j);
|
background.draw(this, i, j);
|
||||||
drawOnBackground(i, j);
|
drawOnBackground(i, j);
|
||||||
|
|
||||||
minecraft.getTextureManager()
|
|
||||||
.bindTexture(AtlasTexture.LOCATION_BLOCKS_TEXTURE);
|
|
||||||
RenderSystem.enableBlend();
|
|
||||||
|
|
||||||
renderBlock();
|
renderBlock();
|
||||||
renderZapper();
|
renderZapper();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void drawOnBackground(int i, int j) {
|
protected void drawOnBackground(int i, int j) {
|
||||||
font.drawStringWithShadow(title, i + 8, j + 10, brightColor);
|
font.drawStringWithShadow(title, i + 11, j + 3, brightColor);
|
||||||
font.drawString(patternSection, i + 148, j + 11, fontColor);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -123,19 +121,24 @@ public class ZapperScreen extends AbstractSimiScreen {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (confirmButton.isHovered()) {
|
||||||
|
Minecraft.getInstance().player.closeScreen();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
return super.mouseClicked(x, y, button);
|
return super.mouseClicked(x, y, button);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void renderZapper() {
|
protected void renderZapper() {
|
||||||
GuiGameElement.of(zapper)
|
GuiGameElement.of(zapper)
|
||||||
.at((this.width - this.sWidth) / 2 + 210, this.height / 2 - this.sHeight / 4)
|
.at((this.width - this.sWidth) / 2 + 220, this.height / 2 - this.sHeight / 4 + 30)
|
||||||
.scale(4)
|
.scale(4)
|
||||||
.render();
|
.render();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void renderBlock() {
|
protected void renderBlock() {
|
||||||
RenderSystem.pushMatrix();
|
RenderSystem.pushMatrix();
|
||||||
RenderSystem.translated(guiLeft + 1.7f, guiTop + 48, 120);
|
RenderSystem.translated(guiLeft + 7f, guiTop + 43.5f, 120);
|
||||||
RenderSystem.rotatef(-30f, .5f, .9f, -.1f);
|
RenderSystem.rotatef(-30f, .5f, .9f, -.1f);
|
||||||
RenderSystem.scaled(20, 20, 20);
|
RenderSystem.scaled(20, 20, 20);
|
||||||
|
|
||||||
|
|
|
@ -43,26 +43,26 @@ public class BlockzapperScreen extends ZapperScreen {
|
||||||
int j = guiTop;
|
int j = guiTop;
|
||||||
CompoundNBT nbt = zapper.getOrCreateTag();
|
CompoundNBT nbt = zapper.getOrCreateTag();
|
||||||
|
|
||||||
replaceModeIndicator = new Indicator(i + 51, j + 36, "");
|
replaceModeIndicator = new Indicator(i + 49, j + 67, "");
|
||||||
replaceModeButton = new IconButton(i + 51, j + 41, AllIcons.I_REPLACE_SOLID);
|
replaceModeButton = new IconButton(i + 49, j + 73, AllIcons.I_REPLACE_SOLID);
|
||||||
if (nbt.contains("Replace") && nbt.getBoolean("Replace"))
|
if (nbt.contains("Replace") && nbt.getBoolean("Replace"))
|
||||||
replaceModeIndicator.state = State.ON;
|
replaceModeIndicator.state = State.ON;
|
||||||
replaceModeButton.setToolTip(Lang.translate("gui.blockzapper.replaceMode"));
|
replaceModeButton.setToolTip(Lang.translate("gui.blockzapper.replaceMode"));
|
||||||
|
|
||||||
spreadDiagonallyIndicator = new Indicator(i + 74, j + 36, "");
|
spreadDiagonallyIndicator = new Indicator(i + 8, j + 67, "");
|
||||||
spreadDiagonallyButton = new IconButton(i + 74, j + 41, AllIcons.I_FOLLOW_DIAGONAL);
|
spreadDiagonallyButton = new IconButton(i + 8, j + 73, AllIcons.I_FOLLOW_DIAGONAL);
|
||||||
if (nbt.contains("SearchDiagonal") && nbt.getBoolean("SearchDiagonal"))
|
if (nbt.contains("SearchDiagonal") && nbt.getBoolean("SearchDiagonal"))
|
||||||
spreadDiagonallyIndicator.state = State.ON;
|
spreadDiagonallyIndicator.state = State.ON;
|
||||||
spreadDiagonallyButton.setToolTip(Lang.translate("gui.blockzapper.searchDiagonal"));
|
spreadDiagonallyButton.setToolTip(Lang.translate("gui.blockzapper.searchDiagonal"));
|
||||||
|
|
||||||
spreadMaterialIndicator = new Indicator(i + 92, j + 36, "");
|
spreadMaterialIndicator = new Indicator(i + 26, j + 67, "");
|
||||||
spreadMaterialButton = new IconButton(i + 92, j + 41, AllIcons.I_FOLLOW_MATERIAL);
|
spreadMaterialButton = new IconButton(i + 26, j + 73, AllIcons.I_FOLLOW_MATERIAL);
|
||||||
if (nbt.contains("SearchFuzzy") && nbt.getBoolean("SearchFuzzy"))
|
if (nbt.contains("SearchFuzzy") && nbt.getBoolean("SearchFuzzy"))
|
||||||
spreadMaterialIndicator.state = State.ON;
|
spreadMaterialIndicator.state = State.ON;
|
||||||
spreadMaterialButton.setToolTip(Lang.translate("gui.blockzapper.searchFuzzy"));
|
spreadMaterialButton.setToolTip(Lang.translate("gui.blockzapper.searchFuzzy"));
|
||||||
|
|
||||||
spreadRangeLabel = new Label(i + 119, j + 46, "").withShadow().withSuffix("m");
|
spreadRangeLabel = new Label(i + 79, j + 78, "").withShadow().withSuffix("m");
|
||||||
spreadRangeInput = new ScrollInput(i + 115, j + 43, 22, 14).withRange(1, BlockzapperItem.getMaxAoe(zapper))
|
spreadRangeInput = new ScrollInput(i + 73, j + 73, 26, 18).withRange(1, BlockzapperItem.getMaxAoe(zapper))
|
||||||
.setState(1).titled(Lang.translate("gui.blockzapper.range")).writingTo(spreadRangeLabel);
|
.setState(1).titled(Lang.translate("gui.blockzapper.range")).writingTo(spreadRangeLabel);
|
||||||
|
|
||||||
if (nbt.contains("SearchDistance"))
|
if (nbt.contains("SearchDistance"))
|
||||||
|
|
|
@ -38,8 +38,7 @@ public class WorldshaperScreen extends ZapperScreen {
|
||||||
|
|
||||||
public WorldshaperScreen(ItemStack zapper, boolean offhand) {
|
public WorldshaperScreen(ItemStack zapper, boolean offhand) {
|
||||||
super(AllGuiTextures.TERRAINZAPPER, zapper, offhand);
|
super(AllGuiTextures.TERRAINZAPPER, zapper, offhand);
|
||||||
brightColor = 0xDFF6FF;
|
fontColor = 0x767676;
|
||||||
fontColor = 0x436B77;
|
|
||||||
title = Lang.translate("gui.terrainzapper.title");
|
title = Lang.translate("gui.terrainzapper.title");
|
||||||
nbt = zapper.getOrCreateTag();
|
nbt = zapper.getOrCreateTag();
|
||||||
}
|
}
|
||||||
|
@ -51,8 +50,8 @@ public class WorldshaperScreen extends ZapperScreen {
|
||||||
i = guiLeft - 20;
|
i = guiLeft - 20;
|
||||||
j = guiTop;
|
j = guiTop;
|
||||||
|
|
||||||
brushLabel = new Label(i + 58, j + 28, "").withShadow();
|
brushLabel = new Label(i + 61, j + 23, "").withShadow();
|
||||||
brushInput = new SelectionScrollInput(i + 55, j + 25, 78, 14).forOptions(brushOptions)
|
brushInput = new SelectionScrollInput(i + 56, j + 18, 77, 18).forOptions(brushOptions)
|
||||||
.titled(Lang.translate("gui.terrainzapper.brush"))
|
.titled(Lang.translate("gui.terrainzapper.brush"))
|
||||||
.writingTo(brushLabel)
|
.writingTo(brushLabel)
|
||||||
.calling(this::brushChanged);
|
.calling(this::brushChanged);
|
||||||
|
@ -68,7 +67,7 @@ public class WorldshaperScreen extends ZapperScreen {
|
||||||
TerrainTools[] toolValues = TerrainTools.values();
|
TerrainTools[] toolValues = TerrainTools.values();
|
||||||
for (int id = 0; id < toolValues.length; id++) {
|
for (int id = 0; id < toolValues.length; id++) {
|
||||||
TerrainTools tool = toolValues[id];
|
TerrainTools tool = toolValues[id];
|
||||||
toolButtons.add(new IconButton(i + 8 + id * 18, j + 76, tool.icon));
|
toolButtons.add(new IconButton(i + 7 + id * 18, j + 77, tool.icon));
|
||||||
toolButtons.get(id)
|
toolButtons.get(id)
|
||||||
.setToolTip(Lang.translate("gui.terrainzapper.tool." + tool.translationKey));
|
.setToolTip(Lang.translate("gui.terrainzapper.tool." + tool.translationKey));
|
||||||
}
|
}
|
||||||
|
@ -82,7 +81,7 @@ public class WorldshaperScreen extends ZapperScreen {
|
||||||
PlacementOptions[] placementValues = PlacementOptions.values();
|
PlacementOptions[] placementValues = PlacementOptions.values();
|
||||||
for (int id = 0; id < placementValues.length; id++) {
|
for (int id = 0; id < placementValues.length; id++) {
|
||||||
PlacementOptions option = placementValues[id];
|
PlacementOptions option = placementValues[id];
|
||||||
placementButtons.add(new IconButton(i + 147 + id * 18, j + 76, option.icon));
|
placementButtons.add(new IconButton(i + 136 + id * 18, j + 77, option.icon));
|
||||||
placementButtons.get(id)
|
placementButtons.get(id)
|
||||||
.setToolTip(Lang.translate("gui.terrainzapper.placement." + option.translationKey));
|
.setToolTip(Lang.translate("gui.terrainzapper.placement." + option.translationKey));
|
||||||
}
|
}
|
||||||
|
@ -114,15 +113,15 @@ public class WorldshaperScreen extends ZapperScreen {
|
||||||
Brush currentBrush = TerrainBrushes.values()[brushInput.getState()].get();
|
Brush currentBrush = TerrainBrushes.values()[brushInput.getState()].get();
|
||||||
for (int index = 0; index < 3; index++) {
|
for (int index = 0; index < 3; index++) {
|
||||||
|
|
||||||
Label label = new Label(i + 62 + 18 * index, j + 46, "").withShadow();
|
Label label = new Label(i + 65 + 20 * index, j + 43, "").withShadow();
|
||||||
brushParamLabels.add(label);
|
brushParamLabels.add(label);
|
||||||
int indexFinal = index;
|
int indexFinal = index;
|
||||||
ScrollInput input = new ScrollInput(i + 55 + 18 * index, j + 43, 14, 14)
|
ScrollInput input = new ScrollInput(i + 56 + 20 * index, j + 38, 18, 18)
|
||||||
.withRange(currentBrush.getMin(index), currentBrush.getMax(index) + 1)
|
.withRange(currentBrush.getMin(index), currentBrush.getMax(index) + 1)
|
||||||
.writingTo(label)
|
.writingTo(label)
|
||||||
.titled(currentBrush.getParamLabel(index))
|
.titled(currentBrush.getParamLabel(index))
|
||||||
.calling(state -> {
|
.calling(state -> {
|
||||||
label.x = i + 62 + 18 * indexFinal - font.getStringWidth(label.text) / 2;
|
label.x = i + 65 + 20 * indexFinal - font.getStringWidth(label.text) / 2;
|
||||||
});
|
});
|
||||||
input.setState(params[index]);
|
input.setState(params[index]);
|
||||||
input.onChanged();
|
input.onChanged();
|
||||||
|
@ -175,12 +174,11 @@ public class WorldshaperScreen extends ZapperScreen {
|
||||||
super.drawOnBackground(i, j);
|
super.drawOnBackground(i, j);
|
||||||
|
|
||||||
Brush currentBrush = TerrainBrushes.values()[brushInput.getState()].get();
|
Brush currentBrush = TerrainBrushes.values()[brushInput.getState()].get();
|
||||||
for (int index = 2; index >= currentBrush.amtParams; index--) {
|
for (int index = 2; index >= currentBrush.amtParams; index--)
|
||||||
AllGuiTextures.TERRAINZAPPER_INACTIVE_PARAM.draw(i + 55 + index * 18, j + 43);
|
AllGuiTextures.TERRAINZAPPER_INACTIVE_PARAM.draw(i + 56 + 20 * index, j + 38);
|
||||||
}
|
|
||||||
|
|
||||||
font.drawString(toolSection, i + 8, j + 64, fontColor);
|
font.drawString(toolSection, i + 7, j + 66, fontColor);
|
||||||
font.drawString(placementSection, i + 148, j + 64, fontColor);
|
font.drawString(placementSection, i + 136, j + 66, fontColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -120,8 +120,7 @@ public class InWorldProcessing {
|
||||||
|
|
||||||
public static boolean isWashable(ItemStack stack, World world) {
|
public static boolean isWashable(ItemStack stack, World world) {
|
||||||
splashingInv.setInventorySlotContents(0, stack);
|
splashingInv.setInventorySlotContents(0, stack);
|
||||||
Optional<SplashingRecipe> recipe = world.getRecipeManager()
|
Optional<SplashingRecipe> recipe = AllRecipeTypes.SPLASHING.find(splashingInv, world);
|
||||||
.getRecipe(AllRecipeTypes.SPLASHING.getType(), splashingInv, world);
|
|
||||||
return recipe.isPresent();
|
return recipe.isPresent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -176,8 +175,7 @@ public class InWorldProcessing {
|
||||||
private static List<ItemStack> process(ItemStack stack, Type type, World world) {
|
private static List<ItemStack> process(ItemStack stack, Type type, World world) {
|
||||||
if (type == Type.SPLASHING) {
|
if (type == Type.SPLASHING) {
|
||||||
splashingInv.setInventorySlotContents(0, stack);
|
splashingInv.setInventorySlotContents(0, stack);
|
||||||
Optional<SplashingRecipe> recipe = world.getRecipeManager()
|
Optional<SplashingRecipe> recipe = AllRecipeTypes.SPLASHING.find(splashingInv, world);
|
||||||
.getRecipe(AllRecipeTypes.SPLASHING.getType(), splashingInv, world);
|
|
||||||
if (recipe.isPresent())
|
if (recipe.isPresent())
|
||||||
return applyRecipeOn(stack, recipe.get());
|
return applyRecipeOn(stack, recipe.get());
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -40,17 +40,17 @@ public class AdjustableCrateContainer extends Container {
|
||||||
|
|
||||||
private void init() {
|
private void init() {
|
||||||
doubleCrate = te.isDoubleCrate();
|
doubleCrate = te.isDoubleCrate();
|
||||||
int x = doubleCrate ? 52 : 124;
|
int x = doubleCrate ? 51 : 123;
|
||||||
int maxCol = doubleCrate ? 8 : 4;
|
int maxCol = doubleCrate ? 8 : 4;
|
||||||
for (int row = 0; row < 4; ++row) {
|
for (int row = 0; row < 4; ++row) {
|
||||||
for (int col = 0; col < maxCol; ++col) {
|
for (int col = 0; col < maxCol; ++col) {
|
||||||
this.addSlot(new SlotItemHandler(te.inventory, col + row * maxCol, x + col * 18, 25 + row * 18));
|
this.addSlot(new SlotItemHandler(te.inventory, col + row * maxCol, x + col * 18, 20 + row * 18));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// player Slots
|
// player Slots
|
||||||
int xOffset = 58;
|
int xOffset = 58;
|
||||||
int yOffset = 157;
|
int yOffset = 155;
|
||||||
for (int row = 0; row < 3; ++row) {
|
for (int row = 0; row < 3; ++row) {
|
||||||
for (int col = 0; col < 9; ++col) {
|
for (int col = 0; col < 9; ++col) {
|
||||||
this.addSlot(new Slot(playerInventory, col + row * 9 + 9, xOffset + col * 18, yOffset + row * 18));
|
this.addSlot(new Slot(playerInventory, col + row * 9 + 9, xOffset + col * 18, yOffset + row * 18));
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package com.simibubi.create.content.logistics.block.inventories;
|
package com.simibubi.create.content.logistics.block.inventories;
|
||||||
|
|
||||||
import static com.simibubi.create.foundation.gui.AllGuiTextures.FLEXCRATE;
|
import static com.simibubi.create.foundation.gui.AllGuiTextures.ADJUSTABLE_CRATE;
|
||||||
import static com.simibubi.create.foundation.gui.AllGuiTextures.FLEXCRATE_DOUBLE;
|
import static com.simibubi.create.foundation.gui.AllGuiTextures.ADJUSTABLE_DOUBLE_CRATE;
|
||||||
import static com.simibubi.create.foundation.gui.AllGuiTextures.PLAYER_INVENTORY;
|
import static com.simibubi.create.foundation.gui.AllGuiTextures.PLAYER_INVENTORY;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -43,11 +43,11 @@ public class AdjustableCrateScreen extends AbstractSimiContainerScreen<Adjustabl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void init() {
|
protected void init() {
|
||||||
setWindowSize(PLAYER_INVENTORY.width + 100, FLEXCRATE.height + PLAYER_INVENTORY.height + 20);
|
setWindowSize(PLAYER_INVENTORY.width + 100, ADJUSTABLE_CRATE.height + PLAYER_INVENTORY.height + 20);
|
||||||
super.init();
|
super.init();
|
||||||
widgets.clear();
|
widgets.clear();
|
||||||
|
|
||||||
allowedItemsLabel = new Label(guiLeft + 100 + 70, guiTop + 107, "").colored(0xD3CBBE)
|
allowedItemsLabel = new Label(guiLeft + 100 + 69, guiTop + 108, "").colored(0xfefefe)
|
||||||
.withShadow();
|
.withShadow();
|
||||||
allowedItems = new ScrollInput(guiLeft + 100 + 65, guiTop + 104, 41, 14).titled(storageSpace)
|
allowedItems = new ScrollInput(guiLeft + 100 + 65, guiTop + 104, 41, 14).titled(storageSpace)
|
||||||
.withRange(1, (container.doubleCrate ? 2049 : 1025))
|
.withRange(1, (container.doubleCrate ? 2049 : 1025))
|
||||||
|
@ -60,7 +60,7 @@ public class AdjustableCrateScreen extends AbstractSimiContainerScreen<Adjustabl
|
||||||
widgets.add(allowedItems);
|
widgets.add(allowedItems);
|
||||||
|
|
||||||
extraAreas = new ArrayList<>();
|
extraAreas = new ArrayList<>();
|
||||||
extraAreas.add(new Rectangle2d(guiLeft + FLEXCRATE.width + 110, guiTop + 46, 71, 70));
|
extraAreas.add(new Rectangle2d(guiLeft + ADJUSTABLE_CRATE.width + 110, guiTop + 46, 71, 70));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -68,18 +68,17 @@ public class AdjustableCrateScreen extends AbstractSimiContainerScreen<Adjustabl
|
||||||
int crateLeft = guiLeft + 100;
|
int crateLeft = guiLeft + 100;
|
||||||
int crateTop = guiTop;
|
int crateTop = guiTop;
|
||||||
int invLeft = guiLeft + 50;
|
int invLeft = guiLeft + 50;
|
||||||
int invTop = crateTop + FLEXCRATE.height + 10;
|
int invTop = crateTop + ADJUSTABLE_CRATE.height + 10;
|
||||||
int hFontColor = 0xD3CBBE;
|
|
||||||
int fontColor = 0x4B3A22;
|
int fontColor = 0x4B3A22;
|
||||||
|
|
||||||
if (container.doubleCrate) {
|
if (container.doubleCrate) {
|
||||||
crateLeft -= 72;
|
crateLeft -= 72;
|
||||||
FLEXCRATE_DOUBLE.draw(this, crateLeft, crateTop);
|
ADJUSTABLE_DOUBLE_CRATE.draw(this, crateLeft, crateTop);
|
||||||
} else
|
} else
|
||||||
FLEXCRATE.draw(this, crateLeft, crateTop);
|
ADJUSTABLE_CRATE.draw(this, crateLeft, crateTop);
|
||||||
|
|
||||||
font.drawStringWithShadow(title, crateLeft - 3 + (FLEXCRATE.width - font.getStringWidth(title)) / 2,
|
font.drawStringWithShadow(title, crateLeft - 3 + (ADJUSTABLE_CRATE.width - font.getStringWidth(title)) / 2,
|
||||||
crateTop + 10, hFontColor);
|
crateTop + 3, 0xfefefe);
|
||||||
String itemCount = "" + te.itemCount;
|
String itemCount = "" + te.itemCount;
|
||||||
font.drawString(itemCount, guiLeft + 100 + 53 - font.getStringWidth(itemCount), crateTop + 107, fontColor);
|
font.drawString(itemCount, guiLeft + 100 + 53 - font.getStringWidth(itemCount), crateTop + 107, fontColor);
|
||||||
|
|
||||||
|
@ -91,13 +90,13 @@ public class AdjustableCrateScreen extends AbstractSimiContainerScreen<Adjustabl
|
||||||
if (allowedItems.getState() > slot * 64)
|
if (allowedItems.getState() > slot * 64)
|
||||||
continue;
|
continue;
|
||||||
int slotsPerRow = (container.doubleCrate ? 8 : 4);
|
int slotsPerRow = (container.doubleCrate ? 8 : 4);
|
||||||
int x = crateLeft + 23 + (slot % slotsPerRow) * 18;
|
int x = crateLeft + 22 + (slot % slotsPerRow) * 18;
|
||||||
int y = crateTop + 24 + (slot / slotsPerRow) * 18;
|
int y = crateTop + 19 + (slot / slotsPerRow) * 18;
|
||||||
AllGuiTextures.FLEXCRATE_LOCKED_SLOT.draw(this, x, y);
|
AllGuiTextures.ADJUSTABLE_CRATE_LOCKED_SLOT.draw(this, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
GuiGameElement.of(renderedItem)
|
GuiGameElement.of(renderedItem)
|
||||||
.at(guiLeft + FLEXCRATE.width + 110, guiTop + 40)
|
.at(guiLeft + ADJUSTABLE_CRATE.width + 110, guiTop + 40)
|
||||||
.scale(5)
|
.scale(5)
|
||||||
.render();
|
.render();
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,7 +80,7 @@ public class StockpileSwitchBlock extends HorizontalBlock implements ITE<Stockpi
|
||||||
@Override
|
@Override
|
||||||
public int getWeakPower(BlockState blockState, IBlockReader blockAccess, BlockPos pos, Direction side) {
|
public int getWeakPower(BlockState blockState, IBlockReader blockAccess, BlockPos pos, Direction side) {
|
||||||
try {
|
try {
|
||||||
return getTileEntity(blockAccess, pos).powered ? 15 : 0;
|
return getTileEntity(blockAccess, pos).isPowered() ? 15 : 0;
|
||||||
} catch (TileEntityException e) {
|
} catch (TileEntityException e) {
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -2,40 +2,39 @@ package com.simibubi.create.content.logistics.block.redstone;
|
||||||
|
|
||||||
import static com.simibubi.create.foundation.gui.AllGuiTextures.STOCKSWITCH;
|
import static com.simibubi.create.foundation.gui.AllGuiTextures.STOCKSWITCH;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
|
|
||||||
import com.mojang.blaze3d.systems.RenderSystem;
|
import com.mojang.blaze3d.systems.RenderSystem;
|
||||||
import com.simibubi.create.AllBlocks;
|
import com.simibubi.create.AllBlocks;
|
||||||
import com.simibubi.create.content.logistics.packet.ConfigureStockswitchPacket;
|
import com.simibubi.create.content.logistics.packet.ConfigureStockswitchPacket;
|
||||||
import com.simibubi.create.foundation.gui.AbstractSimiScreen;
|
import com.simibubi.create.foundation.gui.AbstractSimiScreen;
|
||||||
import com.simibubi.create.foundation.gui.AllGuiTextures;
|
import com.simibubi.create.foundation.gui.AllGuiTextures;
|
||||||
|
import com.simibubi.create.foundation.gui.AllIcons;
|
||||||
import com.simibubi.create.foundation.gui.GuiGameElement;
|
import com.simibubi.create.foundation.gui.GuiGameElement;
|
||||||
import com.simibubi.create.foundation.gui.widgets.Label;
|
import com.simibubi.create.foundation.gui.widgets.IconButton;
|
||||||
import com.simibubi.create.foundation.gui.widgets.ScrollInput;
|
import com.simibubi.create.foundation.gui.widgets.ScrollInput;
|
||||||
import com.simibubi.create.foundation.networking.AllPackets;
|
import com.simibubi.create.foundation.networking.AllPackets;
|
||||||
import com.simibubi.create.foundation.utility.Lang;
|
import com.simibubi.create.foundation.utility.Lang;
|
||||||
|
import com.simibubi.create.foundation.utility.LerpedFloat;
|
||||||
|
import com.simibubi.create.foundation.utility.LerpedFloat.Chaser;
|
||||||
|
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
public class StockpileSwitchScreen extends AbstractSimiScreen {
|
public class StockpileSwitchScreen extends AbstractSimiScreen {
|
||||||
|
|
||||||
private ScrollInput offBelow;
|
private ScrollInput offBelow;
|
||||||
private Label offBelowLabel;
|
|
||||||
private ScrollInput onAbove;
|
private ScrollInput onAbove;
|
||||||
private Label onAboveLabel;
|
private IconButton confirmButton;
|
||||||
|
private IconButton flipSignals;
|
||||||
|
|
||||||
private final String title = Lang.translate("gui.stockpile_switch.title");
|
private final String title = Lang.translate("gui.stockpile_switch.title");
|
||||||
private final String startAbove = Lang.translate("gui.stockpile_switch.startAbove");
|
private final String invertSignal = Lang.translate("gui.stockpile_switch.invert_signal");
|
||||||
private final String startAt = Lang.translate("gui.stockpile_switch.startAt");
|
|
||||||
private final String stopBelow = Lang.translate("gui.stockpile_switch.stopBelow");
|
|
||||||
private final String stopAt = Lang.translate("gui.stockpile_switch.stopAt");
|
|
||||||
private final String lowerLimit = Lang.translate("gui.stockpile_switch.lowerLimit");
|
|
||||||
private final String upperLimit = Lang.translate("gui.stockpile_switch.upperLimit");
|
|
||||||
private final ItemStack renderedItem = new ItemStack(AllBlocks.STOCKPILE_SWITCH.get());
|
private final ItemStack renderedItem = new ItemStack(AllBlocks.STOCKPILE_SWITCH.get());
|
||||||
|
|
||||||
private int lastModification;
|
private int lastModification;
|
||||||
private StockpileSwitchTileEntity te;
|
private StockpileSwitchTileEntity te;
|
||||||
private float cursorPos;
|
|
||||||
|
private LerpedFloat cursor;
|
||||||
|
private LerpedFloat cursorLane;
|
||||||
|
|
||||||
public StockpileSwitchScreen(StockpileSwitchTileEntity te) {
|
public StockpileSwitchScreen(StockpileSwitchTileEntity te) {
|
||||||
this.te = te;
|
this.te = te;
|
||||||
|
@ -44,34 +43,35 @@ public class StockpileSwitchScreen extends AbstractSimiScreen {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void init() {
|
protected void init() {
|
||||||
setWindowSize(STOCKSWITCH.width + 50, STOCKSWITCH.height);
|
AllGuiTextures background = STOCKSWITCH;
|
||||||
|
setWindowSize(background.width + 50, background.height);
|
||||||
super.init();
|
super.init();
|
||||||
widgets.clear();
|
widgets.clear();
|
||||||
cursorPos = te.currentLevel == -1 ? 0 : te.currentLevel;
|
|
||||||
|
|
||||||
offBelowLabel = new Label(guiLeft + 116, guiTop + 72, "").colored(0xD3CBBE)
|
cursor = LerpedFloat.linear()
|
||||||
.withShadow();
|
.startWithValue(te.getLevelForDisplay());
|
||||||
offBelow = new ScrollInput(guiLeft + 113, guiTop + 69, 33, 14).withRange(0, 96)
|
cursorLane = LerpedFloat.linear()
|
||||||
.titled(lowerLimit)
|
.startWithValue(te.getState() ? 1 : 0);
|
||||||
|
|
||||||
|
offBelow = new ScrollInput(guiLeft + 36, guiTop + 40, 102, 18).withRange(0, 100)
|
||||||
|
.titled("")
|
||||||
.calling(state -> {
|
.calling(state -> {
|
||||||
offBelowLabel.text = state + "%";
|
|
||||||
lastModification = 0;
|
lastModification = 0;
|
||||||
if (onAbove.getState() - 4 <= state) {
|
offBelow.titled(Lang.translate("gui.stockpile_switch.move_to_upper_at", state));
|
||||||
onAbove.setState(state + 5);
|
if (onAbove.getState() <= state) {
|
||||||
|
onAbove.setState(state + 1);
|
||||||
onAbove.onChanged();
|
onAbove.onChanged();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.setState((int) (te.offWhenBelow * 100));
|
.setState((int) (te.offWhenBelow * 100));
|
||||||
|
|
||||||
onAboveLabel = new Label(guiLeft + 116, guiTop + 55, "").colored(0xD3CBBE)
|
onAbove = new ScrollInput(guiLeft + 36, guiTop + 18, 102, 18).withRange(1, 101)
|
||||||
.withShadow();
|
.titled("")
|
||||||
onAbove = new ScrollInput(guiLeft + 113, guiTop + 52, 33, 14).withRange(5, 101)
|
|
||||||
.titled(upperLimit)
|
|
||||||
.calling(state -> {
|
.calling(state -> {
|
||||||
onAboveLabel.text = state + "%";
|
|
||||||
lastModification = 0;
|
lastModification = 0;
|
||||||
if (offBelow.getState() + 4 >= state) {
|
onAbove.titled(Lang.translate("gui.stockpile_switch.move_to_lower_at", state));
|
||||||
offBelow.setState(state - 5);
|
if (offBelow.getState() >= state) {
|
||||||
|
offBelow.setState(state - 1);
|
||||||
offBelow.onChanged();
|
offBelow.onChanged();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -79,41 +79,49 @@ public class StockpileSwitchScreen extends AbstractSimiScreen {
|
||||||
|
|
||||||
onAbove.onChanged();
|
onAbove.onChanged();
|
||||||
offBelow.onChanged();
|
offBelow.onChanged();
|
||||||
widgets.addAll(Arrays.asList(offBelowLabel, offBelow, onAbove, onAboveLabel));
|
|
||||||
|
widgets.add(onAbove);
|
||||||
|
widgets.add(offBelow);
|
||||||
|
|
||||||
|
confirmButton =
|
||||||
|
new IconButton(guiLeft + background.width - 33, guiTop + background.height - 24, AllIcons.I_CONFIRM);
|
||||||
|
widgets.add(confirmButton);
|
||||||
|
|
||||||
|
flipSignals = new IconButton(guiLeft + 14, guiTop + 40, AllIcons.I_FLIP);
|
||||||
|
flipSignals.setToolTip(invertSignal);
|
||||||
|
widgets.add(flipSignals);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void renderWindow(int mouseX, int mouseY, float partialTicks) {
|
protected void renderWindow(int mouseX, int mouseY, float partialTicks) {
|
||||||
int hFontColor = 0xD3CBBE;
|
|
||||||
int fontColor = 0x4B3A22;
|
|
||||||
STOCKSWITCH.draw(this, guiLeft, guiTop);
|
STOCKSWITCH.draw(this, guiLeft, guiTop);
|
||||||
font.drawStringWithShadow(title, guiLeft - 3 + (STOCKSWITCH.width - font.getStringWidth(title)) / 2,
|
|
||||||
guiTop + 10, hFontColor);
|
AllGuiTextures.STOCKSWITCH_POWERED_LANE.draw(this, guiLeft + 36, guiTop + (te.isInverted() ? 18 : 40));
|
||||||
font.drawString(onAbove.getState() == 100 ? startAt : startAbove, guiLeft + 13, guiTop + 55, fontColor);
|
AllGuiTextures.STOCKSWITCH_UNPOWERED_LANE.draw(this, guiLeft + 36, guiTop + (te.isInverted() ? 40 : 18));
|
||||||
font.drawString(offBelow.getState() == 0 ? stopAt : stopBelow, guiLeft + 13, guiTop + 72, fontColor);
|
|
||||||
|
font.drawStringWithShadow(title, guiLeft - 3 + (STOCKSWITCH.width - font.getStringWidth(title)) / 2, guiTop + 3,
|
||||||
|
0xffffff);
|
||||||
|
|
||||||
AllGuiTextures sprite = AllGuiTextures.STOCKSWITCH_INTERVAL;
|
AllGuiTextures sprite = AllGuiTextures.STOCKSWITCH_INTERVAL;
|
||||||
float lowerBound = offBelow.getState() / 100f * (sprite.width - 20) + 10;
|
float lowerBound = offBelow.getState();
|
||||||
float upperBound = onAbove.getState() / 100f * (sprite.width - 20) + 10;
|
float upperBound = onAbove.getState();
|
||||||
|
|
||||||
sprite.bind();
|
sprite.bind();
|
||||||
blit((int) (guiLeft + lowerBound), guiTop + 26, (int) (sprite.startX + lowerBound), sprite.startY,
|
blit((int) (guiLeft + upperBound) + 37, guiTop + 18, (int) (sprite.startX + upperBound), sprite.startY,
|
||||||
(int) (upperBound - lowerBound), sprite.height);
|
|
||||||
|
|
||||||
sprite = AllGuiTextures.STOCKSWITCH_INTERVAL_END;
|
|
||||||
sprite.bind();
|
|
||||||
blit((int) (guiLeft + upperBound), guiTop + 26, (int) (sprite.startX + upperBound), sprite.startY,
|
|
||||||
(int) (sprite.width - upperBound), sprite.height);
|
(int) (sprite.width - upperBound), sprite.height);
|
||||||
|
blit(guiLeft + 37, guiTop + 40, sprite.startX, sprite.startY, (int) (lowerBound), sprite.height);
|
||||||
|
|
||||||
AllGuiTextures.STOCKSWITCH_BOUND_LEFT.draw(this, (int) (guiLeft + lowerBound) - 1, guiTop + 24);
|
AllGuiTextures.STOCKSWITCH_ARROW_UP.draw(this, (int) (guiLeft + lowerBound + 36) - 2, guiTop + 35);
|
||||||
AllGuiTextures.STOCKSWITCH_BOUND_RIGHT.draw(this, (int) (guiLeft + upperBound) - 5, guiTop + 24);
|
AllGuiTextures.STOCKSWITCH_ARROW_DOWN.draw(this, (int) (guiLeft + upperBound + 36) - 3, guiTop + 17);
|
||||||
|
|
||||||
AllGuiTextures cursor =
|
if (te.currentLevel != -1) {
|
||||||
te.powered ? AllGuiTextures.STOCKSWITCH_CURSOR_ON : AllGuiTextures.STOCKSWITCH_CURSOR_OFF;
|
AllGuiTextures cursor = AllGuiTextures.STOCKSWITCH_CURSOR;
|
||||||
RenderSystem.pushMatrix();
|
RenderSystem.pushMatrix();
|
||||||
RenderSystem.translatef((cursorPos * (sprite.width - 20) + 10), 0, 0);
|
RenderSystem.translatef(Math.min(99, this.cursor.getValue(partialTicks) * sprite.width),
|
||||||
cursor.draw(this, guiLeft - 4, guiTop + 24);
|
cursorLane.getValue(partialTicks) * 22, 0);
|
||||||
|
cursor.draw(this, guiLeft + 34, guiTop + 19);
|
||||||
RenderSystem.popMatrix();
|
RenderSystem.popMatrix();
|
||||||
|
}
|
||||||
|
|
||||||
RenderSystem.pushMatrix();
|
RenderSystem.pushMatrix();
|
||||||
GuiGameElement.of(renderedItem)
|
GuiGameElement.of(renderedItem)
|
||||||
|
@ -127,25 +135,39 @@ public class StockpileSwitchScreen extends AbstractSimiScreen {
|
||||||
public void tick() {
|
public void tick() {
|
||||||
super.tick();
|
super.tick();
|
||||||
|
|
||||||
if (te.currentLevel == -1)
|
cursor.chase(te.getLevelForDisplay(), 1 / 4f, Chaser.EXP);
|
||||||
cursorPos = 0;
|
cursor.tickChaser();
|
||||||
else
|
cursorLane.chase(te.getState() ? 1 : 0, 1 / 4f, Chaser.EXP);
|
||||||
cursorPos += (te.currentLevel - cursorPos) / 4;
|
cursorLane.tickChaser();
|
||||||
|
|
||||||
if (lastModification >= 0)
|
if (lastModification >= 0)
|
||||||
lastModification++;
|
lastModification++;
|
||||||
|
|
||||||
if (lastModification >= 20) {
|
if (lastModification >= 20) {
|
||||||
lastModification = -1;
|
lastModification = -1;
|
||||||
AllPackets.channel.sendToServer(
|
send(te.isInverted());
|
||||||
new ConfigureStockswitchPacket(te.getPos(), offBelow.getState() / 100f, onAbove.getState() / 100f));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void removed() {
|
public void removed() {
|
||||||
AllPackets.channel.sendToServer(
|
send(te.isInverted());
|
||||||
new ConfigureStockswitchPacket(te.getPos(), offBelow.getState() / 100f, onAbove.getState() / 100f));
|
}
|
||||||
|
|
||||||
|
protected void send(boolean invert) {
|
||||||
|
AllPackets.channel.sendToServer(new ConfigureStockswitchPacket(te.getPos(), offBelow.getState() / 100f,
|
||||||
|
onAbove.getState() / 100f, invert));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean mouseClicked(double x, double y, int button) {
|
||||||
|
if (flipSignals.isHovered())
|
||||||
|
send(!te.isInverted());
|
||||||
|
if (confirmButton.isHovered()) {
|
||||||
|
Minecraft.getInstance().player.closeScreen();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return super.mouseClicked(x, y, button);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,8 @@ public class StockpileSwitchTileEntity extends SmartTileEntity {
|
||||||
public float onWhenAbove;
|
public float onWhenAbove;
|
||||||
public float offWhenBelow;
|
public float offWhenBelow;
|
||||||
public float currentLevel;
|
public float currentLevel;
|
||||||
public boolean powered;
|
private boolean state;
|
||||||
|
private boolean inverted;
|
||||||
|
|
||||||
private FilteringBehaviour filtering;
|
private FilteringBehaviour filtering;
|
||||||
private InvManipulationBehaviour observedInventory;
|
private InvManipulationBehaviour observedInventory;
|
||||||
|
@ -30,7 +31,8 @@ public class StockpileSwitchTileEntity extends SmartTileEntity {
|
||||||
onWhenAbove = .75f;
|
onWhenAbove = .75f;
|
||||||
offWhenBelow = .25f;
|
offWhenBelow = .25f;
|
||||||
currentLevel = -1;
|
currentLevel = -1;
|
||||||
powered = false;
|
state = false;
|
||||||
|
inverted = false;
|
||||||
setLazyTickRate(10);
|
setLazyTickRate(10);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,7 +41,8 @@ public class StockpileSwitchTileEntity extends SmartTileEntity {
|
||||||
onWhenAbove = compound.getFloat("OnAbove");
|
onWhenAbove = compound.getFloat("OnAbove");
|
||||||
offWhenBelow = compound.getFloat("OffBelow");
|
offWhenBelow = compound.getFloat("OffBelow");
|
||||||
currentLevel = compound.getFloat("Current");
|
currentLevel = compound.getFloat("Current");
|
||||||
powered = compound.getBoolean("Powered");
|
state = compound.getBoolean("Powered");
|
||||||
|
inverted = compound.getBoolean("Inverted");
|
||||||
super.read(compound, clientPacket);
|
super.read(compound, clientPacket);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,7 +51,8 @@ public class StockpileSwitchTileEntity extends SmartTileEntity {
|
||||||
compound.putFloat("OnAbove", onWhenAbove);
|
compound.putFloat("OnAbove", onWhenAbove);
|
||||||
compound.putFloat("OffBelow", offWhenBelow);
|
compound.putFloat("OffBelow", offWhenBelow);
|
||||||
compound.putFloat("Current", currentLevel);
|
compound.putFloat("Current", currentLevel);
|
||||||
compound.putBoolean("Powered", powered);
|
compound.putBoolean("Powered", state);
|
||||||
|
compound.putBoolean("Inverted", inverted);
|
||||||
super.write(compound, clientPacket);
|
super.write(compound, clientPacket);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,13 +61,15 @@ public class StockpileSwitchTileEntity extends SmartTileEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateCurrentLevel() {
|
public void updateCurrentLevel() {
|
||||||
|
boolean changed = false;
|
||||||
if (!observedInventory.hasInventory()) {
|
if (!observedInventory.hasInventory()) {
|
||||||
if (currentLevel == -1)
|
if (currentLevel == -1)
|
||||||
return;
|
return;
|
||||||
world.setBlockState(pos, getBlockState().with(StockpileSwitchBlock.INDICATOR, 0), 3);
|
world.setBlockState(pos, getBlockState().with(StockpileSwitchBlock.INDICATOR, 0), 3);
|
||||||
currentLevel = -1;
|
currentLevel = -1;
|
||||||
powered = false;
|
state = false;
|
||||||
world.notifyNeighbors(pos, getBlockState().getBlock());
|
world.notifyNeighbors(pos, getBlockState().getBlock());
|
||||||
|
sendData();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,15 +91,18 @@ public class StockpileSwitchTileEntity extends SmartTileEntity {
|
||||||
occupied += count * (1f / space);
|
occupied += count * (1f / space);
|
||||||
}
|
}
|
||||||
|
|
||||||
currentLevel = (float) occupied / totalSpace;
|
float level = (float) occupied / totalSpace;
|
||||||
|
if (currentLevel != level)
|
||||||
|
changed = true;
|
||||||
|
currentLevel = level;
|
||||||
currentLevel = MathHelper.clamp(currentLevel, 0, 1);
|
currentLevel = MathHelper.clamp(currentLevel, 0, 1);
|
||||||
|
|
||||||
boolean previouslyPowered = powered;
|
boolean previouslyPowered = state;
|
||||||
if (powered && currentLevel <= offWhenBelow)
|
if (state && currentLevel <= offWhenBelow)
|
||||||
powered = false;
|
state = false;
|
||||||
else if (!powered && currentLevel >= onWhenAbove)
|
else if (!state && currentLevel >= onWhenAbove)
|
||||||
powered = true;
|
state = true;
|
||||||
boolean update = previouslyPowered != powered;
|
boolean update = previouslyPowered != state;
|
||||||
|
|
||||||
int displayLevel = 0;
|
int displayLevel = 0;
|
||||||
if (currentLevel > 0)
|
if (currentLevel > 0)
|
||||||
|
@ -101,6 +110,8 @@ public class StockpileSwitchTileEntity extends SmartTileEntity {
|
||||||
world.setBlockState(pos, getBlockState().with(StockpileSwitchBlock.INDICATOR, displayLevel), update ? 3 : 2);
|
world.setBlockState(pos, getBlockState().with(StockpileSwitchBlock.INDICATOR, displayLevel), update ? 3 : 2);
|
||||||
if (update)
|
if (update)
|
||||||
world.notifyNeighbors(pos, getBlockState().getBlock());
|
world.notifyNeighbors(pos, getBlockState().getBlock());
|
||||||
|
if (changed || update)
|
||||||
|
sendData();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -120,4 +131,27 @@ public class StockpileSwitchTileEntity extends SmartTileEntity {
|
||||||
observedInventory = new InvManipulationBehaviour(this, InterfaceProvider.towardBlockFacing()).bypassSidedness();
|
observedInventory = new InvManipulationBehaviour(this, InterfaceProvider.towardBlockFacing()).bypassSidedness();
|
||||||
behaviours.add(observedInventory);
|
behaviours.add(observedInventory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public float getLevelForDisplay() {
|
||||||
|
return currentLevel == -1 ? 0 : currentLevel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean getState() {
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isPowered() {
|
||||||
|
return inverted != state;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isInverted() {
|
||||||
|
return inverted;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInverted(boolean inverted) {
|
||||||
|
if (inverted == this.inverted)
|
||||||
|
return;
|
||||||
|
this.inverted = inverted;
|
||||||
|
world.notifyNeighbors(pos, getBlockState().getBlock());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,8 +41,8 @@ public abstract class AbstractFilterScreen<F extends AbstractFilterContainer> ex
|
||||||
super.init();
|
super.init();
|
||||||
widgets.clear();
|
widgets.clear();
|
||||||
|
|
||||||
resetButton = new IconButton(guiLeft + 15, guiTop + background.height - 30, AllIcons.I_TRASH);
|
resetButton = new IconButton(guiLeft + background.width - 62, guiTop + background.height - 24, AllIcons.I_TRASH);
|
||||||
confirmButton = new IconButton(guiLeft + 159, guiTop + background.height - 30, AllIcons.I_CONFIRM);
|
confirmButton = new IconButton(guiLeft + background.width - 33, guiTop + background.height - 24, AllIcons.I_CONFIRM);
|
||||||
|
|
||||||
widgets.add(resetButton);
|
widgets.add(resetButton);
|
||||||
widgets.add(confirmButton);
|
widgets.add(confirmButton);
|
||||||
|
@ -59,14 +59,7 @@ public abstract class AbstractFilterScreen<F extends AbstractFilterContainer> ex
|
||||||
PLAYER_INVENTORY.draw(this, invX, invY);
|
PLAYER_INVENTORY.draw(this, invX, invY);
|
||||||
|
|
||||||
font.drawString(playerInventory.getDisplayName().getFormattedText(), invX + 7, invY + 6, 0x666666);
|
font.drawString(playerInventory.getDisplayName().getFormattedText(), invX + 7, invY + 6, 0x666666);
|
||||||
font.drawString(I18n.format(container.filterItem.getTranslationKey()), x + 15, y + 9, 0x5B5037);
|
font.drawStringWithShadow(I18n.format(container.filterItem.getTranslationKey()), x + 15, y + 3, 0xdedede);
|
||||||
|
|
||||||
/*RenderHelper.enableGuiDepthLighting();
|
|
||||||
RenderSystem.pushMatrix();
|
|
||||||
RenderSystem.translated(guiLeft + background.width + 0, guiTop + background.height - 60, 0);
|
|
||||||
RenderSystem.scaled(5, 5, 5);
|
|
||||||
itemRenderer.renderItemIntoGUI(container.filterItem, 0, 0);
|
|
||||||
RenderSystem.popMatrix();*/
|
|
||||||
|
|
||||||
GuiGameElement.of(container.filterItem)
|
GuiGameElement.of(container.filterItem)
|
||||||
.at(guiLeft + background.width, guiTop +background.height -60)
|
.at(guiLeft + background.width, guiTop +background.height -60)
|
||||||
|
|
|
@ -4,6 +4,7 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.simibubi.create.AllContainerTypes;
|
import com.simibubi.create.AllContainerTypes;
|
||||||
|
import com.simibubi.create.foundation.utility.Pair;
|
||||||
|
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.entity.player.PlayerInventory;
|
import net.minecraft.entity.player.PlayerInventory;
|
||||||
|
@ -27,7 +28,7 @@ public class AttributeFilterContainer extends AbstractFilterContainer {
|
||||||
}
|
}
|
||||||
|
|
||||||
WhitelistMode whitelistMode;
|
WhitelistMode whitelistMode;
|
||||||
List<ItemAttribute> selectedAttributes;
|
List<Pair<ItemAttribute, Boolean>> selectedAttributes;
|
||||||
|
|
||||||
public AttributeFilterContainer(int id, PlayerInventory inv, PacketBuffer extraData) {
|
public AttributeFilterContainer(int id, PlayerInventory inv, PacketBuffer extraData) {
|
||||||
super(AllContainerTypes.ATTRIBUTE_FILTER.type, id, inv, extraData);
|
super(AllContainerTypes.ATTRIBUTE_FILTER.type, id, inv, extraData);
|
||||||
|
@ -37,8 +38,8 @@ public class AttributeFilterContainer extends AbstractFilterContainer {
|
||||||
super(AllContainerTypes.ATTRIBUTE_FILTER.type, id, inv, stack);
|
super(AllContainerTypes.ATTRIBUTE_FILTER.type, id, inv, stack);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void appendSelectedAttribute(ItemAttribute itemAttribute) {
|
public void appendSelectedAttribute(ItemAttribute itemAttribute, boolean inverted) {
|
||||||
selectedAttributes.add(itemAttribute);
|
selectedAttributes.add(Pair.of(itemAttribute, inverted));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -61,8 +62,8 @@ public class AttributeFilterContainer extends AbstractFilterContainer {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void addFilterSlots() {
|
protected void addFilterSlots() {
|
||||||
this.addSlot(new SlotItemHandler(filterInventory, 0, 16, 23));
|
this.addSlot(new SlotItemHandler(filterInventory, 0, 16, 22));
|
||||||
this.addSlot(new SlotItemHandler(filterInventory, 1, 59, 56) {
|
this.addSlot(new SlotItemHandler(filterInventory, 1, 22, 57) {
|
||||||
@Override
|
@Override
|
||||||
public boolean canTakeStack(PlayerEntity playerIn) {
|
public boolean canTakeStack(PlayerEntity playerIn) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -110,29 +111,37 @@ public class AttributeFilterContainer extends AbstractFilterContainer {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getInventoryOffset() {
|
protected int getInventoryOffset() {
|
||||||
return 86;
|
return 83;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void readData(ItemStack filterItem) {
|
protected void readData(ItemStack filterItem) {
|
||||||
selectedAttributes = new ArrayList<>();
|
selectedAttributes = new ArrayList<>();
|
||||||
whitelistMode = WhitelistMode.values()[filterItem.getOrCreateTag().getInt("WhitelistMode")];
|
whitelistMode = WhitelistMode.values()[filterItem.getOrCreateTag()
|
||||||
ListNBT attributes = filterItem.getOrCreateTag().getList("MatchedAttributes", NBT.TAG_COMPOUND);
|
.getInt("WhitelistMode")];
|
||||||
attributes.forEach(inbt -> selectedAttributes.add(ItemAttribute.fromNBT((CompoundNBT) inbt)));
|
ListNBT attributes = filterItem.getOrCreateTag()
|
||||||
|
.getList("MatchedAttributes", NBT.TAG_COMPOUND);
|
||||||
|
attributes.forEach(inbt -> {
|
||||||
|
CompoundNBT compound = (CompoundNBT) inbt;
|
||||||
|
selectedAttributes.add(Pair.of(ItemAttribute.fromNBT(compound), compound.getBoolean("Inverted")));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void saveData(ItemStack filterItem) {
|
protected void saveData(ItemStack filterItem) {
|
||||||
filterItem.getOrCreateTag().putInt("WhitelistMode", whitelistMode.ordinal());
|
filterItem.getOrCreateTag()
|
||||||
|
.putInt("WhitelistMode", whitelistMode.ordinal());
|
||||||
ListNBT attributes = new ListNBT();
|
ListNBT attributes = new ListNBT();
|
||||||
selectedAttributes.forEach(at -> {
|
selectedAttributes.forEach(at -> {
|
||||||
if (at == null)
|
if (at == null)
|
||||||
return;
|
return;
|
||||||
CompoundNBT compoundNBT = new CompoundNBT();
|
CompoundNBT compoundNBT = new CompoundNBT();
|
||||||
at.serializeNBT(compoundNBT);
|
at.getFirst().serializeNBT(compoundNBT);
|
||||||
|
compoundNBT.putBoolean("Inverted", at.getSecond());
|
||||||
attributes.add(compoundNBT);
|
attributes.add(compoundNBT);
|
||||||
});
|
});
|
||||||
filterItem.getOrCreateTag().put("MatchedAttributes", attributes);
|
filterItem.getOrCreateTag()
|
||||||
|
.put("MatchedAttributes", attributes);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,7 @@ import com.simibubi.create.foundation.gui.widgets.Label;
|
||||||
import com.simibubi.create.foundation.gui.widgets.SelectionScrollInput;
|
import com.simibubi.create.foundation.gui.widgets.SelectionScrollInput;
|
||||||
import com.simibubi.create.foundation.networking.AllPackets;
|
import com.simibubi.create.foundation.networking.AllPackets;
|
||||||
import com.simibubi.create.foundation.utility.Lang;
|
import com.simibubi.create.foundation.utility.Lang;
|
||||||
|
import com.simibubi.create.foundation.utility.Pair;
|
||||||
|
|
||||||
import net.minecraft.entity.player.PlayerInventory;
|
import net.minecraft.entity.player.PlayerInventory;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
@ -30,6 +31,10 @@ public class AttributeFilterScreen extends AbstractFilterScreen<AttributeFilterC
|
||||||
private IconButton whitelistDis, whitelistCon, blacklist;
|
private IconButton whitelistDis, whitelistCon, blacklist;
|
||||||
private Indicator whitelistDisIndicator, whitelistConIndicator, blacklistIndicator;
|
private Indicator whitelistDisIndicator, whitelistConIndicator, blacklistIndicator;
|
||||||
private IconButton add;
|
private IconButton add;
|
||||||
|
private IconButton addInverted;
|
||||||
|
|
||||||
|
private String addDESC = Lang.translate(PREFIX + "add_attribute");
|
||||||
|
private String addInvertedDESC = Lang.translate(PREFIX + "add_inverted_attribute");
|
||||||
|
|
||||||
private String whitelistDisN = Lang.translate(PREFIX + "whitelist_disjunctive");
|
private String whitelistDisN = Lang.translate(PREFIX + "whitelist_disjunctive");
|
||||||
private String whitelistDisDESC = Lang.translate(PREFIX + "whitelist_disjunctive.description");
|
private String whitelistDisDESC = Lang.translate(PREFIX + "whitelist_disjunctive.description");
|
||||||
|
@ -58,29 +63,32 @@ public class AttributeFilterScreen extends AbstractFilterScreen<AttributeFilterC
|
||||||
int x = guiLeft;
|
int x = guiLeft;
|
||||||
int y = guiTop;
|
int y = guiTop;
|
||||||
|
|
||||||
whitelistDis = new IconButton(x + 84, y + 58, AllIcons.I_WHITELIST_OR);
|
whitelistDis = new IconButton(x + 47, y + 59, AllIcons.I_WHITELIST_OR);
|
||||||
whitelistDis.setToolTip(whitelistDisN);
|
whitelistDis.setToolTip(whitelistDisN);
|
||||||
whitelistCon = new IconButton(x + 102, y + 58, AllIcons.I_WHITELIST_AND);
|
whitelistCon = new IconButton(x + 65, y + 59, AllIcons.I_WHITELIST_AND);
|
||||||
whitelistCon.setToolTip(whitelistConN);
|
whitelistCon.setToolTip(whitelistConN);
|
||||||
blacklist = new IconButton(x + 120, y + 58, AllIcons.I_WHITELIST_NOT);
|
blacklist = new IconButton(x + 83, y + 59, AllIcons.I_WHITELIST_NOT);
|
||||||
blacklist.setToolTip(blacklistN);
|
blacklist.setToolTip(blacklistN);
|
||||||
|
|
||||||
whitelistDisIndicator = new Indicator(x + 84, y + 53, "");
|
whitelistDisIndicator = new Indicator(x + 47, y + 53, "");
|
||||||
whitelistConIndicator = new Indicator(x + 102, y + 53, "");
|
whitelistConIndicator = new Indicator(x + 65, y + 53, "");
|
||||||
blacklistIndicator = new Indicator(x + 120, y + 53, "");
|
blacklistIndicator = new Indicator(x + 83, y + 53, "");
|
||||||
|
|
||||||
widgets.addAll(Arrays.asList(blacklist, whitelistCon, whitelistDis, blacklistIndicator, whitelistConIndicator,
|
widgets.addAll(Arrays.asList(blacklist, whitelistCon, whitelistDis, blacklistIndicator, whitelistConIndicator,
|
||||||
whitelistDisIndicator));
|
whitelistDisIndicator));
|
||||||
|
|
||||||
add = new IconButton(x + 159, y + 22, AllIcons.I_ADD);
|
widgets.add(add = new IconButton(x + 182, y + 21, AllIcons.I_ADD));
|
||||||
widgets.add(add);
|
widgets.add(addInverted = new IconButton(x + 200, y + 21, AllIcons.I_ADD_INVERTED_ATTRIBUTE));
|
||||||
|
add.setToolTip(addDESC);
|
||||||
|
addInverted.setToolTip(addInvertedDESC);
|
||||||
|
|
||||||
handleIndicators();
|
handleIndicators();
|
||||||
|
|
||||||
attributeSelectorLabel = new Label(x + 40, y + 27, "").colored(0xF3EBDE).withShadow();
|
attributeSelectorLabel = new Label(x + 43, y + 26, "").colored(0xF3EBDE)
|
||||||
attributeSelector = new SelectionScrollInput(x + 37, y + 24, 118, 14);
|
.withShadow();
|
||||||
|
attributeSelector = new SelectionScrollInput(x + 39, y + 21, 137, 18);
|
||||||
attributeSelector.forOptions(Arrays.asList(""));
|
attributeSelector.forOptions(Arrays.asList(""));
|
||||||
attributeSelector.calling(s -> {
|
attributeSelector.removeCallback();
|
||||||
});
|
|
||||||
referenceItemChanged(container.filterInventory.getStackInSlot(0));
|
referenceItemChanged(container.filterInventory.getStackInSlot(0));
|
||||||
|
|
||||||
widgets.add(attributeSelector);
|
widgets.add(attributeSelector);
|
||||||
|
@ -89,7 +97,8 @@ public class AttributeFilterScreen extends AbstractFilterScreen<AttributeFilterC
|
||||||
selectedAttributes.clear();
|
selectedAttributes.clear();
|
||||||
selectedAttributes
|
selectedAttributes
|
||||||
.add(TextFormatting.YELLOW + (container.selectedAttributes.isEmpty() ? noSelectedT : selectedT));
|
.add(TextFormatting.YELLOW + (container.selectedAttributes.isEmpty() ? noSelectedT : selectedT));
|
||||||
container.selectedAttributes.forEach(at -> selectedAttributes.add(TextFormatting.GRAY + "- " + at.format()));
|
container.selectedAttributes.forEach(at -> selectedAttributes.add(TextFormatting.GRAY + "- " + at.getFirst()
|
||||||
|
.format(at.getSecond())));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,17 +110,22 @@ public class AttributeFilterScreen extends AbstractFilterScreen<AttributeFilterC
|
||||||
attributeSelector.visible = false;
|
attributeSelector.visible = false;
|
||||||
attributeSelectorLabel.text = TextFormatting.ITALIC + referenceH;
|
attributeSelectorLabel.text = TextFormatting.ITALIC + referenceH;
|
||||||
add.active = false;
|
add.active = false;
|
||||||
|
addInverted.active = false;
|
||||||
attributeSelector.calling(s -> {
|
attributeSelector.calling(s -> {
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
add.active = true;
|
add.active = true;
|
||||||
attributeSelector.titled(stack.getDisplayName().getFormattedText() + "...");
|
addInverted.active = true;
|
||||||
|
attributeSelector.titled(stack.getDisplayName()
|
||||||
|
.getFormattedText() + "...");
|
||||||
attributesOfItem.clear();
|
attributesOfItem.clear();
|
||||||
for (ItemAttribute itemAttribute : ItemAttribute.types)
|
for (ItemAttribute itemAttribute : ItemAttribute.types)
|
||||||
attributesOfItem.addAll(itemAttribute.listAttributesOf(stack, this.minecraft.world));
|
attributesOfItem.addAll(itemAttribute.listAttributesOf(stack, this.minecraft.world));
|
||||||
List<String> options = attributesOfItem.stream().map(ItemAttribute::format).collect(Collectors.toList());
|
List<String> options = attributesOfItem.stream()
|
||||||
|
.map(ia -> ia.format(false))
|
||||||
|
.collect(Collectors.toList());
|
||||||
attributeSelector.forOptions(options);
|
attributeSelector.forOptions(options);
|
||||||
attributeSelector.active = true;
|
attributeSelector.active = true;
|
||||||
attributeSelector.visible = true;
|
attributeSelector.visible = true;
|
||||||
|
@ -119,17 +133,20 @@ public class AttributeFilterScreen extends AbstractFilterScreen<AttributeFilterC
|
||||||
attributeSelector.calling(i -> {
|
attributeSelector.calling(i -> {
|
||||||
attributeSelectorLabel.setTextAndTrim(options.get(i), true, 112);
|
attributeSelectorLabel.setTextAndTrim(options.get(i), true, 112);
|
||||||
ItemAttribute selected = attributesOfItem.get(i);
|
ItemAttribute selected = attributesOfItem.get(i);
|
||||||
for (ItemAttribute existing : container.selectedAttributes) {
|
for (Pair<ItemAttribute, Boolean> existing : container.selectedAttributes) {
|
||||||
CompoundNBT testTag = new CompoundNBT();
|
CompoundNBT testTag = new CompoundNBT();
|
||||||
CompoundNBT testTag2 = new CompoundNBT();
|
CompoundNBT testTag2 = new CompoundNBT();
|
||||||
existing.serializeNBT(testTag);
|
existing.getFirst()
|
||||||
|
.serializeNBT(testTag);
|
||||||
selected.serializeNBT(testTag2);
|
selected.serializeNBT(testTag2);
|
||||||
if (testTag.equals(testTag2)) {
|
if (testTag.equals(testTag2)) {
|
||||||
add.active = false;
|
add.active = false;
|
||||||
|
addInverted.active = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
add.active = true;
|
add.active = true;
|
||||||
|
addInverted.active = true;
|
||||||
});
|
});
|
||||||
attributeSelector.onChanged();
|
attributeSelector.onChanged();
|
||||||
}
|
}
|
||||||
|
@ -141,7 +158,7 @@ public class AttributeFilterScreen extends AbstractFilterScreen<AttributeFilterC
|
||||||
RenderSystem.translatef(0.0F, 0.0F, 32.0F);
|
RenderSystem.translatef(0.0F, 0.0F, 32.0F);
|
||||||
this.setBlitOffset(200);
|
this.setBlitOffset(200);
|
||||||
this.itemRenderer.zLevel = 200.0F;
|
this.itemRenderer.zLevel = 200.0F;
|
||||||
this.itemRenderer.renderItemOverlayIntoGUI(font, stack, guiLeft + 59, guiTop + 56,
|
this.itemRenderer.renderItemOverlayIntoGUI(font, stack, guiLeft + 22, guiTop + 57,
|
||||||
String.valueOf(selectedAttributes.size() - 1));
|
String.valueOf(selectedAttributes.size() - 1));
|
||||||
this.setBlitOffset(0);
|
this.setBlitOffset(0);
|
||||||
this.itemRenderer.zLevel = 0.0F;
|
this.itemRenderer.zLevel = 0.0F;
|
||||||
|
@ -160,8 +177,8 @@ public class AttributeFilterScreen extends AbstractFilterScreen<AttributeFilterC
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void renderHoveredToolTip(int mouseX, int mouseY) {
|
protected void renderHoveredToolTip(int mouseX, int mouseY) {
|
||||||
if (this.minecraft.player.inventory.getItemStack().isEmpty() && this.hoveredSlot != null
|
if (this.minecraft.player.inventory.getItemStack()
|
||||||
&& this.hoveredSlot.getHasStack()) {
|
.isEmpty() && this.hoveredSlot != null && this.hoveredSlot.getHasStack()) {
|
||||||
if (this.hoveredSlot.slotNumber == 37) {
|
if (this.hoveredSlot.slotNumber == 37) {
|
||||||
renderTooltip(selectedAttributes, mouseX, mouseY, font);
|
renderTooltip(selectedAttributes, mouseX, mouseY, font);
|
||||||
return;
|
return;
|
||||||
|
@ -206,31 +223,40 @@ public class AttributeFilterScreen extends AbstractFilterScreen<AttributeFilterC
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (add.isHovered() && add.active) {
|
if (add.isHovered() && add.active)
|
||||||
|
return handleAddedAttibute(false);
|
||||||
|
if (addInverted.isHovered() && addInverted.active)
|
||||||
|
return handleAddedAttibute(true);
|
||||||
|
|
||||||
|
return mouseClicked;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected boolean handleAddedAttibute(boolean inverted) {
|
||||||
int index = attributeSelector.getState();
|
int index = attributeSelector.getState();
|
||||||
if (index < attributesOfItem.size()) {
|
if (index >= attributesOfItem.size())
|
||||||
|
return false;
|
||||||
add.active = false;
|
add.active = false;
|
||||||
|
addInverted.active = false;
|
||||||
CompoundNBT tag = new CompoundNBT();
|
CompoundNBT tag = new CompoundNBT();
|
||||||
ItemAttribute itemAttribute = attributesOfItem.get(index);
|
ItemAttribute itemAttribute = attributesOfItem.get(index);
|
||||||
itemAttribute.serializeNBT(tag);
|
itemAttribute.serializeNBT(tag);
|
||||||
AllPackets.channel.sendToServer(new FilterScreenPacket(Option.ADD_TAG, tag));
|
AllPackets.channel
|
||||||
container.selectedAttributes.add(itemAttribute);
|
.sendToServer(new FilterScreenPacket(inverted ? Option.ADD_INVERTED_TAG : Option.ADD_TAG, tag));
|
||||||
|
container.appendSelectedAttribute(itemAttribute, inverted);
|
||||||
if (container.selectedAttributes.size() == 1)
|
if (container.selectedAttributes.size() == 1)
|
||||||
selectedAttributes.set(0, TextFormatting.YELLOW + selectedT);
|
selectedAttributes.set(0, TextFormatting.YELLOW + selectedT);
|
||||||
selectedAttributes.add(TextFormatting.GRAY + "- " + itemAttribute.format());
|
selectedAttributes.add(TextFormatting.GRAY + "- " + itemAttribute.format(inverted));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return mouseClicked;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void contentsCleared() {
|
protected void contentsCleared() {
|
||||||
selectedAttributes.clear();
|
selectedAttributes.clear();
|
||||||
selectedAttributes.add(TextFormatting.YELLOW + noSelectedT);
|
selectedAttributes.add(TextFormatting.YELLOW + noSelectedT);
|
||||||
if (!lastItemScanned.isEmpty())
|
if (!lastItemScanned.isEmpty()) {
|
||||||
add.active = true;
|
add.active = true;
|
||||||
|
addInverted.active = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -24,8 +24,8 @@ public class FilterContainer extends AbstractFilterContainer {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void addFilterSlots() {
|
protected void addFilterSlots() {
|
||||||
int x = 16;
|
int x = 23;
|
||||||
int y = 21;
|
int y = 20;
|
||||||
|
|
||||||
for (int row = 0; row < 2; ++row)
|
for (int row = 0; row < 2; ++row)
|
||||||
for (int col = 0; col < 9; ++col)
|
for (int col = 0; col < 9; ++col)
|
||||||
|
@ -39,7 +39,7 @@ public class FilterContainer extends AbstractFilterContainer {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getInventoryOffset() {
|
protected int getInventoryOffset() {
|
||||||
return 100;
|
return 97;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -4,6 +4,8 @@ import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
import com.simibubi.create.AllItems;
|
import com.simibubi.create.AllItems;
|
||||||
import com.simibubi.create.AllKeys;
|
import com.simibubi.create.AllKeys;
|
||||||
import com.simibubi.create.content.logistics.item.filter.AttributeFilterContainer.WhitelistMode;
|
import com.simibubi.create.content.logistics.item.filter.AttributeFilterContainer.WhitelistMode;
|
||||||
|
@ -36,8 +38,6 @@ import net.minecraftforge.fml.network.NetworkHooks;
|
||||||
import net.minecraftforge.items.ItemHandlerHelper;
|
import net.minecraftforge.items.ItemHandlerHelper;
|
||||||
import net.minecraftforge.items.ItemStackHandler;
|
import net.minecraftforge.items.ItemStackHandler;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
|
||||||
|
|
||||||
public class FilterItem extends Item implements INamedContainerProvider {
|
public class FilterItem extends Item implements INamedContainerProvider {
|
||||||
|
|
||||||
private FilterType type;
|
private FilterType type;
|
||||||
|
@ -121,12 +121,14 @@ public class FilterItem extends Item implements INamedContainerProvider {
|
||||||
ListNBT attributes = filter.getOrCreateTag()
|
ListNBT attributes = filter.getOrCreateTag()
|
||||||
.getList("MatchedAttributes", NBT.TAG_COMPOUND);
|
.getList("MatchedAttributes", NBT.TAG_COMPOUND);
|
||||||
for (INBT inbt : attributes) {
|
for (INBT inbt : attributes) {
|
||||||
ItemAttribute attribute = ItemAttribute.fromNBT((CompoundNBT) inbt);
|
CompoundNBT compound = (CompoundNBT) inbt;
|
||||||
|
ItemAttribute attribute = ItemAttribute.fromNBT(compound);
|
||||||
|
boolean inverted = compound.getBoolean("Inverted");
|
||||||
if (count > 3) {
|
if (count > 3) {
|
||||||
list.add(TextFormatting.DARK_GRAY + "- ...");
|
list.add(TextFormatting.DARK_GRAY + "- ...");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
list.add(TextFormatting.GRAY + "- " + attribute.format());
|
list.add(TextFormatting.GRAY + "- " + attribute.format(inverted));
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -211,8 +213,9 @@ public class FilterItem extends Item implements INamedContainerProvider {
|
||||||
ListNBT attributes = filter.getOrCreateTag()
|
ListNBT attributes = filter.getOrCreateTag()
|
||||||
.getList("MatchedAttributes", NBT.TAG_COMPOUND);
|
.getList("MatchedAttributes", NBT.TAG_COMPOUND);
|
||||||
for (INBT inbt : attributes) {
|
for (INBT inbt : attributes) {
|
||||||
ItemAttribute attribute = ItemAttribute.fromNBT((CompoundNBT) inbt);
|
CompoundNBT compound = (CompoundNBT) inbt;
|
||||||
boolean matches = attribute.appliesTo(stack, world);
|
ItemAttribute attribute = ItemAttribute.fromNBT(compound);
|
||||||
|
boolean matches = attribute.appliesTo(stack, world) != compound.getBoolean("Inverted");
|
||||||
|
|
||||||
if (matches) {
|
if (matches) {
|
||||||
switch (whitelistMode) {
|
switch (whitelistMode) {
|
||||||
|
|
|
@ -42,20 +42,20 @@ public class FilterScreen extends AbstractFilterScreen<FilterContainer> {
|
||||||
int x = guiLeft;
|
int x = guiLeft;
|
||||||
int y = guiTop;
|
int y = guiTop;
|
||||||
|
|
||||||
blacklist = new IconButton(x + 58, y + 72, AllIcons.I_BLACKLIST);
|
blacklist = new IconButton(x + 18, y + 73, AllIcons.I_BLACKLIST);
|
||||||
blacklist.setToolTip(blacklistN);
|
blacklist.setToolTip(blacklistN);
|
||||||
whitelist = new IconButton(x + 76, y + 72, AllIcons.I_WHITELIST);
|
whitelist = new IconButton(x + 36, y + 73, AllIcons.I_WHITELIST);
|
||||||
whitelist.setToolTip(whitelistN);
|
whitelist.setToolTip(whitelistN);
|
||||||
blacklistIndicator = new Indicator(x + 58, y + 67, "");
|
blacklistIndicator = new Indicator(x + 18, y + 67, "");
|
||||||
whitelistIndicator = new Indicator(x + 76, y + 67, "");
|
whitelistIndicator = new Indicator(x + 36, y + 67, "");
|
||||||
widgets.addAll(Arrays.asList(blacklist, whitelist, blacklistIndicator, whitelistIndicator));
|
widgets.addAll(Arrays.asList(blacklist, whitelist, blacklistIndicator, whitelistIndicator));
|
||||||
|
|
||||||
respectNBT = new IconButton(x + 98, y + 72, AllIcons.I_RESPECT_NBT);
|
respectNBT = new IconButton(x + 60, y + 73, AllIcons.I_RESPECT_NBT);
|
||||||
respectNBT.setToolTip(respectDataN);
|
respectNBT.setToolTip(respectDataN);
|
||||||
ignoreNBT = new IconButton(x + 116, y + 72, AllIcons.I_IGNORE_NBT);
|
ignoreNBT = new IconButton(x + 78, y + 73, AllIcons.I_IGNORE_NBT);
|
||||||
ignoreNBT.setToolTip(ignoreDataN);
|
ignoreNBT.setToolTip(ignoreDataN);
|
||||||
respectNBTIndicator = new Indicator(x + 98, y + 67, "");
|
respectNBTIndicator = new Indicator(x + 60, y + 67, "");
|
||||||
ignoreNBTIndicator = new Indicator(x + 116, y + 67, "");
|
ignoreNBTIndicator = new Indicator(x + 78, y + 67, "");
|
||||||
widgets.addAll(Arrays.asList(respectNBT, ignoreNBT, respectNBTIndicator, ignoreNBTIndicator));
|
widgets.addAll(Arrays.asList(respectNBT, ignoreNBT, respectNBTIndicator, ignoreNBTIndicator));
|
||||||
handleIndicators();
|
handleIndicators();
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ import net.minecraftforge.fml.network.NetworkEvent.Context;
|
||||||
public class FilterScreenPacket extends SimplePacketBase {
|
public class FilterScreenPacket extends SimplePacketBase {
|
||||||
|
|
||||||
enum Option {
|
enum Option {
|
||||||
CLEAR, WHITELIST, WHITELIST2, BLACKLIST, RESPECT_DATA, IGNORE_DATA, ADD_TAG;
|
CLEAR, WHITELIST, WHITELIST2, BLACKLIST, RESPECT_DATA, IGNORE_DATA, ADD_TAG, ADD_INVERTED_TAG;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Option option;
|
private Option option;
|
||||||
|
@ -75,7 +75,9 @@ public class FilterScreenPacket extends SimplePacketBase {
|
||||||
if (option == Option.BLACKLIST)
|
if (option == Option.BLACKLIST)
|
||||||
c.whitelistMode = WhitelistMode.BLACKLIST;
|
c.whitelistMode = WhitelistMode.BLACKLIST;
|
||||||
if (option == Option.ADD_TAG)
|
if (option == Option.ADD_TAG)
|
||||||
c.appendSelectedAttribute(ItemAttribute.fromNBT(data));
|
c.appendSelectedAttribute(ItemAttribute.fromNBT(data), false);
|
||||||
|
if (option == Option.ADD_INVERTED_TAG)
|
||||||
|
c.appendSelectedAttribute(ItemAttribute.fromNBT(data), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -12,6 +12,7 @@ import java.util.stream.Collectors;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
import com.google.common.base.Predicates;
|
import com.google.common.base.Predicates;
|
||||||
|
import com.simibubi.create.AllRecipeTypes;
|
||||||
import com.simibubi.create.content.logistics.InWorldProcessing;
|
import com.simibubi.create.content.logistics.InWorldProcessing;
|
||||||
import com.simibubi.create.foundation.utility.Lang;
|
import com.simibubi.create.foundation.utility.Lang;
|
||||||
|
|
||||||
|
@ -95,8 +96,9 @@ public interface ItemAttribute {
|
||||||
}
|
}
|
||||||
|
|
||||||
@OnlyIn(value = Dist.CLIENT)
|
@OnlyIn(value = Dist.CLIENT)
|
||||||
default String format() {
|
default String format(boolean inverted) {
|
||||||
return Lang.translate("item_attributes." + getTranslationKey(), getTranslationParameters());
|
return Lang.translate("item_attributes." + getTranslationKey() + (inverted ? ".inverted" : ""),
|
||||||
|
getTranslationParameters());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static enum StandardTraits implements ItemAttribute {
|
public static enum StandardTraits implements ItemAttribute {
|
||||||
|
@ -111,6 +113,8 @@ public interface ItemAttribute {
|
||||||
EQUIPABLE(s -> s.getEquipmentSlot() != null),
|
EQUIPABLE(s -> s.getEquipmentSlot() != null),
|
||||||
FURNACE_FUEL(AbstractFurnaceTileEntity::isFuel),
|
FURNACE_FUEL(AbstractFurnaceTileEntity::isFuel),
|
||||||
WASHABLE(InWorldProcessing::isWashable),
|
WASHABLE(InWorldProcessing::isWashable),
|
||||||
|
CRUSHABLE((s, w) -> testRecipe(s, w, AllRecipeTypes.CRUSHING.getType())
|
||||||
|
|| testRecipe(s, w, AllRecipeTypes.MILLING.getType())),
|
||||||
SMELTABLE((s, w) -> testRecipe(s, w, IRecipeType.SMELTING)),
|
SMELTABLE((s, w) -> testRecipe(s, w, IRecipeType.SMELTING)),
|
||||||
SMOKABLE((s, w) -> testRecipe(s, w, IRecipeType.SMOKING)),
|
SMOKABLE((s, w) -> testRecipe(s, w, IRecipeType.SMOKING)),
|
||||||
BLASTABLE((s, w) -> testRecipe(s, w, IRecipeType.BLASTING));
|
BLASTABLE((s, w) -> testRecipe(s, w, IRecipeType.BLASTING));
|
||||||
|
@ -123,9 +127,11 @@ public interface ItemAttribute {
|
||||||
this.test = test;
|
this.test = test;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean testRecipe(ItemStack s, World w, IRecipeType<? extends IRecipe<IInventory>> smelting) {
|
private static boolean testRecipe(ItemStack s, World w, IRecipeType<? extends IRecipe<IInventory>> type) {
|
||||||
RECIPE_WRAPPER.setInventorySlotContents(0, s.copy());
|
RECIPE_WRAPPER.setInventorySlotContents(0, s.copy());
|
||||||
return w.getRecipeManager().getRecipe(smelting, RECIPE_WRAPPER, w).isPresent();
|
return w.getRecipeManager()
|
||||||
|
.getRecipe(type, RECIPE_WRAPPER, w)
|
||||||
|
.isPresent();
|
||||||
}
|
}
|
||||||
|
|
||||||
private StandardTraits(BiPredicate<ItemStack, World> test) {
|
private StandardTraits(BiPredicate<ItemStack, World> test) {
|
||||||
|
@ -193,12 +199,18 @@ public interface ItemAttribute {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean appliesTo(ItemStack stack) {
|
public boolean appliesTo(ItemStack stack) {
|
||||||
return stack.getItem().getTags().contains(tagName);
|
return stack.getItem()
|
||||||
|
.getTags()
|
||||||
|
.contains(tagName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ItemAttribute> listAttributesOf(ItemStack stack) {
|
public List<ItemAttribute> listAttributesOf(ItemStack stack) {
|
||||||
return stack.getItem().getTags().stream().map(InTag::new).collect(Collectors.toList());
|
return stack.getItem()
|
||||||
|
.getTags()
|
||||||
|
.stream()
|
||||||
|
.map(InTag::new)
|
||||||
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -240,7 +252,8 @@ public interface ItemAttribute {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ItemAttribute> listAttributesOf(ItemStack stack) {
|
public List<ItemAttribute> listAttributesOf(ItemStack stack) {
|
||||||
ItemGroup group = stack.getItem().getGroup();
|
ItemGroup group = stack.getItem()
|
||||||
|
.getGroup();
|
||||||
return group == null ? Collections.emptyList() : Arrays.asList(new InItemGroup(group));
|
return group == null ? Collections.emptyList() : Arrays.asList(new InItemGroup(group));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -249,9 +262,11 @@ public interface ItemAttribute {
|
||||||
return "in_item_group";
|
return "in_item_group";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
@OnlyIn(value = Dist.CLIENT)
|
@OnlyIn(value = Dist.CLIENT)
|
||||||
public String format() {
|
public String format(boolean inverted) {
|
||||||
return Lang.translate("item_attributes." + getTranslationKey(), I18n.format(group.getTranslationKey()));
|
return Lang.translate("item_attributes." + getTranslationKey() + (inverted ? ".inverted" : ""),
|
||||||
|
I18n.format(group.getTranslationKey()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -263,7 +278,8 @@ public interface ItemAttribute {
|
||||||
public ItemAttribute readNBT(CompoundNBT nbt) {
|
public ItemAttribute readNBT(CompoundNBT nbt) {
|
||||||
String readPath = nbt.getString("path");
|
String readPath = nbt.getString("path");
|
||||||
for (ItemGroup group : ItemGroup.GROUPS)
|
for (ItemGroup group : ItemGroup.GROUPS)
|
||||||
if (group.getPath().equals(readPath))
|
if (group.getPath()
|
||||||
|
.equals(readPath))
|
||||||
return new InItemGroup(group);
|
return new InItemGroup(group);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -280,12 +296,14 @@ public interface ItemAttribute {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean appliesTo(ItemStack stack) {
|
public boolean appliesTo(ItemStack stack) {
|
||||||
return modId.equals(stack.getItem().getCreatorModId(stack));
|
return modId.equals(stack.getItem()
|
||||||
|
.getCreatorModId(stack));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ItemAttribute> listAttributesOf(ItemStack stack) {
|
public List<ItemAttribute> listAttributesOf(ItemStack stack) {
|
||||||
String id = stack.getItem().getCreatorModId(stack);
|
String id = stack.getItem()
|
||||||
|
.getCreatorModId(stack);
|
||||||
return id == null ? Collections.emptyList() : Arrays.asList(new AddedBy(id));
|
return id == null ? Collections.emptyList() : Arrays.asList(new AddedBy(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -296,8 +314,10 @@ public interface ItemAttribute {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object[] getTranslationParameters() {
|
public Object[] getTranslationParameters() {
|
||||||
Optional<? extends ModContainer> modContainerById = ModList.get().getModContainerById(modId);
|
Optional<? extends ModContainer> modContainerById = ModList.get()
|
||||||
String name = modContainerById.map(ModContainer::getModInfo).map(IModInfo::getDisplayName)
|
.getModContainerById(modId);
|
||||||
|
String name = modContainerById.map(ModContainer::getModInfo)
|
||||||
|
.map(IModInfo::getDisplayName)
|
||||||
.orElse(StringUtils.capitalize(modId));
|
.orElse(StringUtils.capitalize(modId));
|
||||||
return new Object[] { name };
|
return new Object[] { name };
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,11 +10,13 @@ public class ConfigureStockswitchPacket extends TileEntityConfigurationPacket<St
|
||||||
|
|
||||||
private float offBelow;
|
private float offBelow;
|
||||||
private float onAbove;
|
private float onAbove;
|
||||||
|
private boolean invert;
|
||||||
|
|
||||||
public ConfigureStockswitchPacket(BlockPos pos, float offBelow, float onAbove) {
|
public ConfigureStockswitchPacket(BlockPos pos, float offBelow, float onAbove, boolean invert) {
|
||||||
super(pos);
|
super(pos);
|
||||||
this.offBelow = offBelow;
|
this.offBelow = offBelow;
|
||||||
this.onAbove = onAbove;
|
this.onAbove = onAbove;
|
||||||
|
this.invert = invert;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ConfigureStockswitchPacket(PacketBuffer buffer) {
|
public ConfigureStockswitchPacket(PacketBuffer buffer) {
|
||||||
|
@ -25,18 +27,21 @@ public class ConfigureStockswitchPacket extends TileEntityConfigurationPacket<St
|
||||||
protected void readSettings(PacketBuffer buffer) {
|
protected void readSettings(PacketBuffer buffer) {
|
||||||
offBelow = buffer.readFloat();
|
offBelow = buffer.readFloat();
|
||||||
onAbove = buffer.readFloat();
|
onAbove = buffer.readFloat();
|
||||||
|
invert = buffer.readBoolean();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void writeSettings(PacketBuffer buffer) {
|
protected void writeSettings(PacketBuffer buffer) {
|
||||||
buffer.writeFloat(offBelow);
|
buffer.writeFloat(offBelow);
|
||||||
buffer.writeFloat(onAbove);
|
buffer.writeFloat(onAbove);
|
||||||
|
buffer.writeBoolean(invert);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void applySettings(StockpileSwitchTileEntity te) {
|
protected void applySettings(StockpileSwitchTileEntity te) {
|
||||||
te.offWhenBelow = offBelow;
|
te.offWhenBelow = offBelow;
|
||||||
te.onWhenAbove = onAbove;
|
te.onWhenAbove = onAbove;
|
||||||
|
te.setInverted(invert);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,14 +66,8 @@ public class ClientSchematicLoader {
|
||||||
long size = Files.size(path);
|
long size = Files.size(path);
|
||||||
|
|
||||||
// Too big
|
// Too big
|
||||||
Integer maxSize = AllConfigs.SERVER.schematics.maxTotalSchematicSize.get();
|
if (!validateSizeLimitation(size))
|
||||||
if (size > maxSize * 1000) {
|
|
||||||
Minecraft.getInstance().player.sendMessage(new StringTextComponent(
|
|
||||||
Lang.translate("schematics.uploadTooLarge") + " (" + size / 1000 + " KB)."));
|
|
||||||
Minecraft.getInstance().player.sendMessage(
|
|
||||||
new StringTextComponent(Lang.translate("schematics.maxAllowedSize") + " " + maxSize + " KB"));
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
in = Files.newInputStream(path, StandardOpenOption.READ);
|
in = Files.newInputStream(path, StandardOpenOption.READ);
|
||||||
activeUploads.put(schematic, in);
|
activeUploads.put(schematic, in);
|
||||||
|
@ -83,6 +77,20 @@ public class ClientSchematicLoader {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean validateSizeLimitation(long size) {
|
||||||
|
if (Minecraft.getInstance().isSingleplayer())
|
||||||
|
return true;
|
||||||
|
Integer maxSize = AllConfigs.SERVER.schematics.maxTotalSchematicSize.get();
|
||||||
|
if (size > maxSize * 1000) {
|
||||||
|
Minecraft.getInstance().player.sendMessage(new StringTextComponent(
|
||||||
|
Lang.translate("schematics.uploadTooLarge") + " (" + size / 1000 + " KB)."));
|
||||||
|
Minecraft.getInstance().player.sendMessage(
|
||||||
|
new StringTextComponent(Lang.translate("schematics.maxAllowedSize") + " " + maxSize + " KB"));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
private void continueUpload(String schematic) {
|
private void continueUpload(String schematic) {
|
||||||
if (activeUploads.containsKey(schematic)) {
|
if (activeUploads.containsKey(schematic)) {
|
||||||
Integer maxPacketSize = AllConfigs.SERVER.schematics.maxSchematicPacketSize.get();
|
Integer maxPacketSize = AllConfigs.SERVER.schematics.maxSchematicPacketSize.get();
|
||||||
|
|
|
@ -14,7 +14,10 @@ import java.util.Optional;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
|
import org.apache.commons.io.IOUtils;
|
||||||
|
|
||||||
import com.simibubi.create.AllBlocks;
|
import com.simibubi.create.AllBlocks;
|
||||||
|
import com.simibubi.create.AllItems;
|
||||||
import com.simibubi.create.Create;
|
import com.simibubi.create.Create;
|
||||||
import com.simibubi.create.content.schematics.block.SchematicTableTileEntity;
|
import com.simibubi.create.content.schematics.block.SchematicTableTileEntity;
|
||||||
import com.simibubi.create.content.schematics.item.SchematicItem;
|
import com.simibubi.create.content.schematics.item.SchematicItem;
|
||||||
|
@ -23,12 +26,17 @@ import com.simibubi.create.foundation.config.CSchematics;
|
||||||
import com.simibubi.create.foundation.utility.FilesHelper;
|
import com.simibubi.create.foundation.utility.FilesHelper;
|
||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.block.Blocks;
|
||||||
import net.minecraft.entity.player.ServerPlayerEntity;
|
import net.minecraft.entity.player.ServerPlayerEntity;
|
||||||
|
import net.minecraft.nbt.CompoundNBT;
|
||||||
|
import net.minecraft.nbt.CompressedStreamTools;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.Hand;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.text.StringTextComponent;
|
import net.minecraft.util.text.StringTextComponent;
|
||||||
import net.minecraft.util.text.TranslationTextComponent;
|
import net.minecraft.util.text.TranslationTextComponent;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraft.world.gen.feature.template.Template;
|
||||||
|
|
||||||
public class ServerSchematicLoader {
|
public class ServerSchematicLoader {
|
||||||
|
|
||||||
|
@ -92,17 +100,12 @@ public class ServerSchematicLoader {
|
||||||
// Unsupported Format
|
// Unsupported Format
|
||||||
if (!schematic.endsWith(".nbt")) {
|
if (!schematic.endsWith(".nbt")) {
|
||||||
Create.logger.warn("Attempted Schematic Upload with non-supported Format: " + playerSchematicId);
|
Create.logger.warn("Attempted Schematic Upload with non-supported Format: " + playerSchematicId);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Too big
|
// Too big
|
||||||
Integer maxFileSize = getConfig().maxTotalSchematicSize.get();
|
if (!validateSchematicSizeOnServer(player, size))
|
||||||
if (size > maxFileSize * 1000) {
|
|
||||||
player.sendMessage(new TranslationTextComponent("create.schematics.uploadTooLarge")
|
|
||||||
.appendSibling(new StringTextComponent(" (" + size / 1000 + " KB).")));
|
|
||||||
player.sendMessage(new TranslationTextComponent("create.schematics.maxAllowedSize")
|
|
||||||
.appendSibling(new StringTextComponent(" " + maxFileSize + " KB")));
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
// Skip existing Uploads
|
// Skip existing Uploads
|
||||||
if (activeUploads.containsKey(playerSchematicId))
|
if (activeUploads.containsKey(playerSchematicId))
|
||||||
|
@ -134,8 +137,7 @@ public class ServerSchematicLoader {
|
||||||
// Open Stream
|
// Open Stream
|
||||||
OutputStream writer =
|
OutputStream writer =
|
||||||
Files.newOutputStream(Paths.get(getSchematicPath(), playerSchematicId), StandardOpenOption.CREATE_NEW);
|
Files.newOutputStream(Paths.get(getSchematicPath(), playerSchematicId), StandardOpenOption.CREATE_NEW);
|
||||||
activeUploads.put(playerSchematicId,
|
activeUploads.put(playerSchematicId, new SchematicUploadEntry(writer, size, player.getServerWorld(), pos));
|
||||||
new SchematicUploadEntry(writer, size, player.getServerWorld(), pos));
|
|
||||||
|
|
||||||
// Notify Tile Entity
|
// Notify Tile Entity
|
||||||
table.startUpload(schematic);
|
table.startUpload(schematic);
|
||||||
|
@ -146,6 +148,18 @@ public class ServerSchematicLoader {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected boolean validateSchematicSizeOnServer(ServerPlayerEntity player, long size) {
|
||||||
|
Integer maxFileSize = getConfig().maxTotalSchematicSize.get();
|
||||||
|
if (size > maxFileSize * 1000) {
|
||||||
|
player.sendMessage(new TranslationTextComponent("create.schematics.uploadTooLarge")
|
||||||
|
.appendSibling(new StringTextComponent(" (" + size / 1000 + " KB).")));
|
||||||
|
player.sendMessage(new TranslationTextComponent("create.schematics.maxAllowedSize")
|
||||||
|
.appendSibling(new StringTextComponent(" " + maxFileSize + " KB")));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
public CSchematics getConfig() {
|
public CSchematics getConfig() {
|
||||||
return AllConfigs.SERVER.schematics;
|
return AllConfigs.SERVER.schematics;
|
||||||
}
|
}
|
||||||
|
@ -252,6 +266,65 @@ public class ServerSchematicLoader {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void handleInstantSchematic(ServerPlayerEntity player, String schematic, World world, BlockPos pos,
|
||||||
|
BlockPos bounds) {
|
||||||
|
String playerPath = getSchematicPath() + "/" + player.getName()
|
||||||
|
.getFormattedText();
|
||||||
|
String playerSchematicId = player.getName()
|
||||||
|
.getFormattedText() + "/" + schematic;
|
||||||
|
FilesHelper.createFolderIfMissing(playerPath);
|
||||||
|
|
||||||
|
// Unsupported Format
|
||||||
|
if (!schematic.endsWith(".nbt")) {
|
||||||
|
Create.logger.warn("Attempted Schematic Upload with non-supported Format: " + playerSchematicId);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Not holding S&Q
|
||||||
|
if (!AllItems.SCHEMATIC_AND_QUILL.isIn(player.getHeldItemMainhand()))
|
||||||
|
return;
|
||||||
|
|
||||||
|
try {
|
||||||
|
// Delete schematic with same name
|
||||||
|
Path path = Paths.get(getSchematicPath(), playerSchematicId);
|
||||||
|
Files.deleteIfExists(path);
|
||||||
|
|
||||||
|
// Too many Schematics
|
||||||
|
Stream<Path> list = Files.list(Paths.get(playerPath));
|
||||||
|
if (list.count() >= getConfig().maxSchematics.get()) {
|
||||||
|
Stream<Path> list2 = Files.list(Paths.get(playerPath));
|
||||||
|
Optional<Path> lastFilePath = list2.filter(f -> !Files.isDirectory(f))
|
||||||
|
.min(Comparator.comparingLong(f -> f.toFile()
|
||||||
|
.lastModified()));
|
||||||
|
list2.close();
|
||||||
|
if (lastFilePath.isPresent())
|
||||||
|
Files.deleteIfExists(lastFilePath.get());
|
||||||
|
}
|
||||||
|
list.close();
|
||||||
|
|
||||||
|
Template t = new Template();
|
||||||
|
t.takeBlocksFromWorld(world, pos, bounds, true, Blocks.AIR);
|
||||||
|
|
||||||
|
OutputStream outputStream = null;
|
||||||
|
try {
|
||||||
|
outputStream = Files.newOutputStream(path, StandardOpenOption.CREATE);
|
||||||
|
CompoundNBT nbttagcompound = t.writeToNBT(new CompoundNBT());
|
||||||
|
CompressedStreamTools.writeCompressed(nbttagcompound, outputStream);
|
||||||
|
player.setHeldItem(Hand.MAIN_HAND, SchematicItem.create(schematic, player.getName()
|
||||||
|
.getFormattedText()));
|
||||||
|
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} finally {
|
||||||
|
if (outputStream != null)
|
||||||
|
IOUtils.closeQuietly(outputStream);
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
Create.logger.error("Exception Thrown in direct Schematic Upload: " + playerSchematicId);
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ public class SchematicTableContainer extends Container {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void init() {
|
protected void init() {
|
||||||
inputSlot = new SlotItemHandler(te.inventory, 0, -9, 40) {
|
inputSlot = new SlotItemHandler(te.inventory, 0, -35, 41) {
|
||||||
@Override
|
@Override
|
||||||
public boolean isItemValid(ItemStack stack) {
|
public boolean isItemValid(ItemStack stack) {
|
||||||
return AllItems.EMPTY_SCHEMATIC.isIn(stack) || AllItems.SCHEMATIC_AND_QUILL.isIn(stack)
|
return AllItems.EMPTY_SCHEMATIC.isIn(stack) || AllItems.SCHEMATIC_AND_QUILL.isIn(stack)
|
||||||
|
@ -49,7 +49,7 @@ public class SchematicTableContainer extends Container {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
outputSlot = new SlotItemHandler(te.inventory, 1, 75, 40) {
|
outputSlot = new SlotItemHandler(te.inventory, 1, 110, 41) {
|
||||||
@Override
|
@Override
|
||||||
public boolean isItemValid(ItemStack stack) {
|
public boolean isItemValid(ItemStack stack) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -38,6 +38,8 @@ public class SchematicTableScreen extends AbstractSimiContainerScreen<SchematicT
|
||||||
private final String title = Lang.translate("gui.schematicTable.title");
|
private final String title = Lang.translate("gui.schematicTable.title");
|
||||||
private final String uploading = Lang.translate("gui.schematicTable.uploading");
|
private final String uploading = Lang.translate("gui.schematicTable.uploading");
|
||||||
private final String finished = Lang.translate("gui.schematicTable.finished");
|
private final String finished = Lang.translate("gui.schematicTable.finished");
|
||||||
|
private final String refresh = Lang.translate("gui.schematicTable.refresh");
|
||||||
|
private final String folder = Lang.translate("gui.schematicTable.open_folder");
|
||||||
private final String noSchematics = Lang.translate("gui.schematicTable.noSchematics");
|
private final String noSchematics = Lang.translate("gui.schematicTable.noSchematics");
|
||||||
private final String availableSchematicsTitle = Lang.translate("gui.schematicTable.availableSchematics");
|
private final String availableSchematicsTitle = Lang.translate("gui.schematicTable.availableSchematics");
|
||||||
private final ItemStack renderedItem = AllBlocks.SCHEMATIC_TABLE.asStack();
|
private final ItemStack renderedItem = AllBlocks.SCHEMATIC_TABLE.asStack();
|
||||||
|
@ -63,20 +65,24 @@ public class SchematicTableScreen extends AbstractSimiContainerScreen<SchematicT
|
||||||
CreateClient.schematicSender.refresh();
|
CreateClient.schematicSender.refresh();
|
||||||
List<String> availableSchematics = CreateClient.schematicSender.getAvailableSchematics();
|
List<String> availableSchematics = CreateClient.schematicSender.getAvailableSchematics();
|
||||||
|
|
||||||
schematicsLabel = new Label(mainLeft + 36, mainTop + 26, "").withShadow();
|
schematicsLabel = new Label(mainLeft + 49, mainTop + 26, "").withShadow();
|
||||||
schematicsLabel.text = "";
|
schematicsLabel.text = "";
|
||||||
if (!availableSchematics.isEmpty()) {
|
if (!availableSchematics.isEmpty()) {
|
||||||
schematicsArea =
|
schematicsArea =
|
||||||
new SelectionScrollInput(mainLeft + 33, mainTop + 23, 134, 14).forOptions(availableSchematics)
|
new SelectionScrollInput(mainLeft + 45, mainTop + 21, 139, 18).forOptions(availableSchematics)
|
||||||
.titled(availableSchematicsTitle)
|
.titled(availableSchematicsTitle)
|
||||||
.writingTo(schematicsLabel);
|
.writingTo(schematicsLabel);
|
||||||
widgets.add(schematicsArea);
|
widgets.add(schematicsArea);
|
||||||
widgets.add(schematicsLabel);
|
widgets.add(schematicsLabel);
|
||||||
}
|
}
|
||||||
|
|
||||||
confirmButton = new IconButton(mainLeft + 69, mainTop + 55, AllIcons.I_CONFIRM);
|
confirmButton = new IconButton(mainLeft + 44, mainTop + 56, AllIcons.I_CONFIRM);
|
||||||
folderButton = new IconButton(mainLeft + 204, mainTop + 6, AllIcons.I_OPEN_FOLDER);
|
|
||||||
refreshButton = new IconButton(mainLeft + 204, mainTop + 26, AllIcons.I_REFRESH);
|
folderButton = new IconButton(mainLeft + 21, mainTop + 21, AllIcons.I_OPEN_FOLDER);
|
||||||
|
folderButton.setToolTip(folder);
|
||||||
|
refreshButton = new IconButton(mainLeft + 207, mainTop + 21, AllIcons.I_REFRESH);
|
||||||
|
refreshButton.setToolTip(refresh);
|
||||||
|
|
||||||
widgets.add(confirmButton);
|
widgets.add(confirmButton);
|
||||||
widgets.add(folderButton);
|
widgets.add(folderButton);
|
||||||
widgets.add(refreshButton);
|
widgets.add(refreshButton);
|
||||||
|
@ -104,13 +110,13 @@ public class SchematicTableScreen extends AbstractSimiContainerScreen<SchematicT
|
||||||
SCHEMATIC_TABLE.draw(this, mainLeft, mainTop);
|
SCHEMATIC_TABLE.draw(this, mainLeft, mainTop);
|
||||||
|
|
||||||
if (container.getTileEntity().isUploading)
|
if (container.getTileEntity().isUploading)
|
||||||
font.drawString(uploading, mainLeft + 76, mainTop + 10, AllGuiTextures.FONT_COLOR);
|
font.drawStringWithShadow(uploading, mainLeft + 11, mainTop + 3, 0xffffff);
|
||||||
else if (container.getSlot(1).getHasStack())
|
else if (container.getSlot(1).getHasStack())
|
||||||
font.drawString(finished, mainLeft + 60, mainTop + 10, AllGuiTextures.FONT_COLOR);
|
font.drawStringWithShadow(finished, mainLeft + 11, mainTop + 3, 0xffffff);
|
||||||
else
|
else
|
||||||
font.drawString(title, mainLeft + 60, mainTop + 10, AllGuiTextures.FONT_COLOR);
|
font.drawStringWithShadow(title, mainLeft + 11, mainTop + 3, 0xffffff);
|
||||||
if (schematicsArea == null)
|
if (schematicsArea == null)
|
||||||
font.drawStringWithShadow(noSchematics, mainLeft + 39, mainTop + 26, 0xFFDD44);
|
font.drawStringWithShadow(noSchematics, mainLeft + 54, mainTop + 26, 0xd3d3d3);
|
||||||
|
|
||||||
GuiGameElement.of(renderedItem)
|
GuiGameElement.of(renderedItem)
|
||||||
.at(mainLeft + 217, mainTop + 48)
|
.at(mainLeft + 217, mainTop + 48)
|
||||||
|
@ -123,7 +129,7 @@ public class SchematicTableScreen extends AbstractSimiContainerScreen<SchematicT
|
||||||
* MathHelper.lerp(partialTicks, lastChasingProgress, chasingProgress));
|
* MathHelper.lerp(partialTicks, lastChasingProgress, chasingProgress));
|
||||||
int height = SCHEMATIC_TABLE_PROGRESS.height;
|
int height = SCHEMATIC_TABLE_PROGRESS.height;
|
||||||
RenderSystem.disableLighting();
|
RenderSystem.disableLighting();
|
||||||
blit(mainLeft + 94, mainTop + 56, SCHEMATIC_TABLE_PROGRESS.startX, SCHEMATIC_TABLE_PROGRESS.startY, width,
|
blit(mainLeft + 70, mainTop + 58, SCHEMATIC_TABLE_PROGRESS.startX, SCHEMATIC_TABLE_PROGRESS.startY, width,
|
||||||
height);
|
height);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -194,6 +200,7 @@ public class SchematicTableScreen extends AbstractSimiContainerScreen<SchematicT
|
||||||
.forOptions(availableSchematics)
|
.forOptions(availableSchematics)
|
||||||
.titled(availableSchematicsTitle)
|
.titled(availableSchematicsTitle)
|
||||||
.writingTo(schematicsLabel);
|
.writingTo(schematicsLabel);
|
||||||
|
schematicsArea.onChanged();
|
||||||
widgets.add(schematicsArea);
|
widgets.add(schematicsArea);
|
||||||
} else {
|
} else {
|
||||||
schematicsArea = null;
|
schematicsArea = null;
|
||||||
|
|
|
@ -41,21 +41,18 @@ public class SchematicannonContainer extends Container {
|
||||||
int x = 20;
|
int x = 20;
|
||||||
int y = 0;
|
int y = 0;
|
||||||
|
|
||||||
addSlot(new SlotItemHandler(te.inventory, 0, x + 14, y + 37));
|
addSlot(new SlotItemHandler(te.inventory, 0, x + 15, y + 65));
|
||||||
addSlot(new SlotItemHandler(te.inventory, 1, x + 170, y + 37));
|
addSlot(new SlotItemHandler(te.inventory, 1, x + 171, y + 65));
|
||||||
addSlot(new SlotItemHandler(te.inventory, 2, x + 222, y + 21));
|
addSlot(new SlotItemHandler(te.inventory, 2, x + 134, y + 19));
|
||||||
addSlot(new SlotItemHandler(te.inventory, 3, x + 222, y + 60));
|
addSlot(new SlotItemHandler(te.inventory, 3, x + 174, y + 19));
|
||||||
addSlot(new SlotItemHandler(te.inventory, 4, x + 51, y + 135));
|
addSlot(new SlotItemHandler(te.inventory, 4, x + 15, y + 19));
|
||||||
|
|
||||||
// player Slots
|
// player Slots
|
||||||
for (int row = 0; row < 3; ++row) {
|
for (int row = 0; row < 3; ++row)
|
||||||
for (int col = 0; col < 9; ++col) {
|
for (int col = 0; col < 9; ++col)
|
||||||
addSlot(new Slot(player.inventory, col + row * 9 + 9, -2 + col * 18, 163 + row * 18));
|
addSlot(new Slot(player.inventory, col + row * 9 + 9, -2 + col * 18, 163 + row * 18));
|
||||||
}
|
for (int hotbarSlot = 0; hotbarSlot < 9; ++hotbarSlot)
|
||||||
}
|
|
||||||
for (int hotbarSlot = 0; hotbarSlot < 9; ++hotbarSlot) {
|
|
||||||
addSlot(new Slot(player.inventory, hotbarSlot, -2 + hotbarSlot * 18, 221));
|
addSlot(new Slot(player.inventory, hotbarSlot, -2 + hotbarSlot * 18, 221));
|
||||||
}
|
|
||||||
|
|
||||||
detectAndSendChanges();
|
detectAndSendChanges();
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,6 @@ package com.simibubi.create.content.schematics.block;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||||
import com.mojang.blaze3d.platform.GlStateManager;
|
|
||||||
import com.mojang.blaze3d.vertex.IVertexBuilder;
|
import com.mojang.blaze3d.vertex.IVertexBuilder;
|
||||||
import com.simibubi.create.AllBlockPartials;
|
import com.simibubi.create.AllBlockPartials;
|
||||||
import com.simibubi.create.content.schematics.block.LaunchedItem.ForBlockState;
|
import com.simibubi.create.content.schematics.block.LaunchedItem.ForBlockState;
|
||||||
|
@ -18,7 +17,6 @@ import net.minecraft.client.renderer.RenderType;
|
||||||
import net.minecraft.client.renderer.Vector3f;
|
import net.minecraft.client.renderer.Vector3f;
|
||||||
import net.minecraft.client.renderer.WorldRenderer;
|
import net.minecraft.client.renderer.WorldRenderer;
|
||||||
import net.minecraft.client.renderer.model.ItemCameraTransforms.TransformType;
|
import net.minecraft.client.renderer.model.ItemCameraTransforms.TransformType;
|
||||||
import net.minecraft.client.renderer.texture.AtlasTexture;
|
|
||||||
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||||
import net.minecraft.particles.ParticleTypes;
|
import net.minecraft.particles.ParticleTypes;
|
||||||
import net.minecraft.util.Direction;
|
import net.minecraft.util.Direction;
|
||||||
|
@ -27,19 +25,21 @@ import net.minecraft.util.math.MathHelper;
|
||||||
import net.minecraft.util.math.Vec3d;
|
import net.minecraft.util.math.Vec3d;
|
||||||
import net.minecraftforge.client.model.data.EmptyModelData;
|
import net.minecraftforge.client.model.data.EmptyModelData;
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
public class SchematicannonRenderer extends SafeTileEntityRenderer<SchematicannonTileEntity> {
|
public class SchematicannonRenderer extends SafeTileEntityRenderer<SchematicannonTileEntity> {
|
||||||
|
|
||||||
public SchematicannonRenderer(TileEntityRendererDispatcher dispatcher) {
|
public SchematicannonRenderer(TileEntityRendererDispatcher dispatcher) {
|
||||||
super(dispatcher);
|
super(dispatcher);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isGlobalRenderer(SchematicannonTileEntity p_188185_1_) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void renderSafe(SchematicannonTileEntity tileEntityIn, float partialTicks, MatrixStack ms,
|
protected void renderSafe(SchematicannonTileEntity tileEntityIn, float partialTicks, MatrixStack ms,
|
||||||
IRenderTypeBuffer buffer, int light, int overlay) {
|
IRenderTypeBuffer buffer, int light, int overlay) {
|
||||||
|
|
||||||
Minecraft.getInstance().getTextureManager().bindTexture(AtlasTexture.LOCATION_BLOCKS_TEXTURE);
|
|
||||||
|
|
||||||
double yaw = 0;
|
double yaw = 0;
|
||||||
double pitch = 40;
|
double pitch = 40;
|
||||||
double recoil = 0;
|
double recoil = 0;
|
||||||
|
@ -96,8 +96,8 @@ public class SchematicannonRenderer extends SafeTileEntityRenderer<Schematicanno
|
||||||
ms.push();
|
ms.push();
|
||||||
ms.translate(blockLocation.x, blockLocation.y, blockLocation.z);
|
ms.translate(blockLocation.x, blockLocation.y, blockLocation.z);
|
||||||
|
|
||||||
// Rotation and Scaling effects
|
ms.multiply(new Vector3f(0, 1, 0).getDegreesQuaternion(360 * t * 2));
|
||||||
ms.multiply(new Vector3f(1, 1, 0).getDegreesQuaternion(360 * t * 2));
|
ms.multiply(new Vector3f(1, 0, 0).getDegreesQuaternion(360 * t * 2));
|
||||||
|
|
||||||
// Render the Block
|
// Render the Block
|
||||||
if (launched instanceof ForBlockState) {
|
if (launched instanceof ForBlockState) {
|
||||||
|
@ -109,8 +109,8 @@ public class SchematicannonRenderer extends SafeTileEntityRenderer<Schematicanno
|
||||||
|
|
||||||
// Render the item
|
// Render the item
|
||||||
if (launched instanceof ForEntity) {
|
if (launched instanceof ForEntity) {
|
||||||
double scale = 1.2f;
|
float scale = 1.2f;
|
||||||
GlStateManager.scaled(scale, scale, scale);
|
ms.scale(scale, scale, scale);
|
||||||
Minecraft.getInstance().getItemRenderer().renderItem(launched.stack, TransformType.GROUND, light,
|
Minecraft.getInstance().getItemRenderer().renderItem(launched.stack, TransformType.GROUND, light,
|
||||||
overlay, ms, buffer);
|
overlay, ms, buffer);
|
||||||
}
|
}
|
||||||
|
@ -118,9 +118,8 @@ public class SchematicannonRenderer extends SafeTileEntityRenderer<Schematicanno
|
||||||
ms.pop();
|
ms.pop();
|
||||||
|
|
||||||
// Apply Recoil if block was just launched
|
// Apply Recoil if block was just launched
|
||||||
if ((launched.ticksRemaining + 1 - partialTicks) > launched.totalTicks - 10) {
|
if ((launched.ticksRemaining + 1 - partialTicks) > launched.totalTicks - 10)
|
||||||
recoil = Math.max(recoil, (launched.ticksRemaining + 1 - partialTicks) - launched.totalTicks + 10);
|
recoil = Math.max(recoil, (launched.ticksRemaining + 1 - partialTicks) - launched.totalTicks + 10);
|
||||||
}
|
|
||||||
|
|
||||||
// Render particles for launch
|
// Render particles for launch
|
||||||
if (launched.ticksRemaining == launched.totalTicks && tileEntityIn.firstRenderTick) {
|
if (launched.ticksRemaining == launched.totalTicks && tileEntityIn.firstRenderTick) {
|
||||||
|
|
|
@ -15,12 +15,15 @@ import com.simibubi.create.foundation.item.ItemDescription.Palette;
|
||||||
import com.simibubi.create.foundation.item.TooltipHelper;
|
import com.simibubi.create.foundation.item.TooltipHelper;
|
||||||
import com.simibubi.create.foundation.networking.AllPackets;
|
import com.simibubi.create.foundation.networking.AllPackets;
|
||||||
import com.simibubi.create.foundation.utility.Lang;
|
import com.simibubi.create.foundation.utility.Lang;
|
||||||
|
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.gui.widget.Widget;
|
import net.minecraft.client.gui.widget.Widget;
|
||||||
import net.minecraft.client.renderer.Rectangle2d;
|
import net.minecraft.client.renderer.Rectangle2d;
|
||||||
import net.minecraft.entity.player.PlayerInventory;
|
import net.minecraft.entity.player.PlayerInventory;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.text.ITextComponent;
|
import net.minecraft.util.text.ITextComponent;
|
||||||
import net.minecraft.util.text.TextFormatting;
|
import net.minecraft.util.text.TextFormatting;
|
||||||
|
import net.minecraft.util.text.TranslationTextComponent;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
@ -31,6 +34,9 @@ import static net.minecraft.util.text.TextFormatting.GRAY;
|
||||||
|
|
||||||
public class SchematicannonScreen extends AbstractSimiContainerScreen<SchematicannonContainer> {
|
public class SchematicannonScreen extends AbstractSimiContainerScreen<SchematicannonContainer> {
|
||||||
|
|
||||||
|
private static final AllGuiTextures BG_BOTTOM = AllGuiTextures.SCHEMATICANNON_BOTTOM;
|
||||||
|
private static final AllGuiTextures BG_TOP = AllGuiTextures.SCHEMATICANNON_TOP;
|
||||||
|
|
||||||
protected Vector<Indicator> replaceLevelIndicators;
|
protected Vector<Indicator> replaceLevelIndicators;
|
||||||
protected Vector<IconButton> replaceLevelButtons;
|
protected Vector<IconButton> replaceLevelButtons;
|
||||||
|
|
||||||
|
@ -47,27 +53,37 @@ public class SchematicannonScreen extends AbstractSimiContainerScreen<Schematica
|
||||||
protected Indicator resetIndicator;
|
protected Indicator resetIndicator;
|
||||||
|
|
||||||
private List<Rectangle2d> extraAreas;
|
private List<Rectangle2d> extraAreas;
|
||||||
|
protected List<Widget> placementSettingWidgets;
|
||||||
|
|
||||||
private final String title = Lang.translate("gui.schematicannon.title");
|
private final String title = Lang.translate("gui.schematicannon.title");
|
||||||
private final String settingsTitle = Lang.translate("gui.schematicannon.settingsTitle");
|
|
||||||
private final String listPrinter = Lang.translate("gui.schematicannon.listPrinter");
|
private final String listPrinter = Lang.translate("gui.schematicannon.listPrinter");
|
||||||
private final String _gunpowderLevel = "gui.schematicannon.gunpowderLevel";
|
private final String _gunpowderLevel = "gui.schematicannon.gunpowderLevel";
|
||||||
private final String _shotsRemaining = "gui.schematicannon.shotsRemaining";
|
private final String _shotsRemaining = "gui.schematicannon.shotsRemaining";
|
||||||
|
private final String _showSettings = "gui.schematicannon.showOptions";
|
||||||
private final String _shotsRemainingWithBackup = "gui.schematicannon.shotsRemainingWithBackup";
|
private final String _shotsRemainingWithBackup = "gui.schematicannon.shotsRemainingWithBackup";
|
||||||
|
|
||||||
|
private final String _slotGunpowder = "gui.schematicannon.slot.gunpowder";
|
||||||
|
private final String _slotListPrinter = "gui.schematicannon.slot.listPrinter";
|
||||||
|
private final String _slotSchematic = "gui.schematicannon.slot.schematic";
|
||||||
|
|
||||||
private final String optionEnabled = Lang.translate("gui.schematicannon.optionEnabled");
|
private final String optionEnabled = Lang.translate("gui.schematicannon.optionEnabled");
|
||||||
private final String optionDisabled = Lang.translate("gui.schematicannon.optionDisabled");
|
private final String optionDisabled = Lang.translate("gui.schematicannon.optionDisabled");
|
||||||
|
|
||||||
private final ItemStack renderedItem = AllBlocks.SCHEMATICANNON.asStack();
|
private final ItemStack renderedItem = AllBlocks.SCHEMATICANNON.asStack();
|
||||||
|
|
||||||
|
private IconButton confirmButton;
|
||||||
|
private IconButton showSettingsButton;
|
||||||
|
private Indicator showSettingsIndicator;
|
||||||
|
|
||||||
public SchematicannonScreen(SchematicannonContainer container, PlayerInventory inventory,
|
public SchematicannonScreen(SchematicannonContainer container, PlayerInventory inventory,
|
||||||
ITextComponent p_i51105_3_) {
|
ITextComponent p_i51105_3_) {
|
||||||
super(container, inventory, p_i51105_3_);
|
super(container, inventory, p_i51105_3_);
|
||||||
|
placementSettingWidgets = new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void init() {
|
protected void init() {
|
||||||
setWindowSize(AllGuiTextures.SCHEMATICANNON_BG.width + 50, AllGuiTextures.SCHEMATICANNON_BG.height + 80);
|
setWindowSize(BG_TOP.width + 50, BG_BOTTOM.height + BG_TOP.height + 80);
|
||||||
super.init();
|
super.init();
|
||||||
|
|
||||||
int x = guiLeft + 20;
|
int x = guiLeft + 20;
|
||||||
|
@ -76,63 +92,87 @@ public class SchematicannonScreen extends AbstractSimiContainerScreen<Schematica
|
||||||
widgets.clear();
|
widgets.clear();
|
||||||
|
|
||||||
// Play Pause Stop
|
// Play Pause Stop
|
||||||
playButton = new IconButton(x + 70, y + 55, AllIcons.I_PLAY);
|
playButton = new IconButton(x + 75, y + 86, AllIcons.I_PLAY);
|
||||||
playIndicator = new Indicator(x + 70, y + 50, "");
|
playIndicator = new Indicator(x + 75, y + 79, "");
|
||||||
pauseButton = new IconButton(x + 88, y + 55, AllIcons.I_PAUSE);
|
pauseButton = new IconButton(x + 93, y + 86, AllIcons.I_PAUSE);
|
||||||
pauseIndicator = new Indicator(x + 88, y + 50, "");
|
pauseIndicator = new Indicator(x + 93, y + 79, "");
|
||||||
resetButton = new IconButton(x + 106, y + 55, AllIcons.I_STOP);
|
resetButton = new IconButton(x + 111, y + 86, AllIcons.I_STOP);
|
||||||
resetIndicator = new Indicator(x + 106, y + 50, "");
|
resetIndicator = new Indicator(x + 111, y + 79, "");
|
||||||
resetIndicator.state = State.RED;
|
resetIndicator.state = State.RED;
|
||||||
Collections
|
Collections.addAll(widgets, playButton, playIndicator, pauseButton, pauseIndicator, resetButton,
|
||||||
.addAll(widgets, playButton, playIndicator, pauseButton, pauseIndicator, resetButton, resetIndicator);
|
resetIndicator);
|
||||||
|
|
||||||
|
extraAreas = new ArrayList<>();
|
||||||
|
extraAreas.add(new Rectangle2d(guiLeft + 240, guiTop + 88, 84, 113));
|
||||||
|
|
||||||
|
confirmButton = new IconButton(x + 180, guiTop + 117, AllIcons.I_CONFIRM);
|
||||||
|
widgets.add(confirmButton);
|
||||||
|
showSettingsButton = new IconButton(guiLeft + 29, guiTop + 117, AllIcons.I_PLACEMENT_SETTINGS);
|
||||||
|
showSettingsButton.setToolTip(Lang.translate(_showSettings));
|
||||||
|
widgets.add(showSettingsButton);
|
||||||
|
showSettingsIndicator = new Indicator(guiLeft + 29, guiTop + 111, "");
|
||||||
|
widgets.add(showSettingsIndicator);
|
||||||
|
|
||||||
|
tick();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initPlacementSettings() {
|
||||||
|
widgets.removeAll(placementSettingWidgets);
|
||||||
|
placementSettingWidgets.clear();
|
||||||
|
|
||||||
|
if (placementSettingsHidden())
|
||||||
|
return;
|
||||||
|
|
||||||
|
int x = guiLeft + 20;
|
||||||
|
int y = guiTop;
|
||||||
|
|
||||||
// Replace settings
|
// Replace settings
|
||||||
replaceLevelButtons = new Vector<>(4);
|
replaceLevelButtons = new Vector<>(4);
|
||||||
replaceLevelIndicators = new Vector<>(4);
|
replaceLevelIndicators = new Vector<>(4);
|
||||||
List<AllIcons> icons = ImmutableList
|
List<AllIcons> icons = ImmutableList.of(AllIcons.I_DONT_REPLACE, AllIcons.I_REPLACE_SOLID,
|
||||||
.of(AllIcons.I_DONT_REPLACE, AllIcons.I_REPLACE_SOLID, AllIcons.I_REPLACE_ANY,
|
AllIcons.I_REPLACE_ANY, AllIcons.I_REPLACE_EMPTY);
|
||||||
AllIcons.I_REPLACE_EMPTY);
|
List<String> toolTips = ImmutableList.of(Lang.translate("gui.schematicannon.option.dontReplaceSolid"),
|
||||||
List<String> toolTips = ImmutableList
|
|
||||||
.of(Lang.translate("gui.schematicannon.option.dontReplaceSolid"),
|
|
||||||
Lang.translate("gui.schematicannon.option.replaceWithSolid"),
|
Lang.translate("gui.schematicannon.option.replaceWithSolid"),
|
||||||
Lang.translate("gui.schematicannon.option.replaceWithAny"),
|
Lang.translate("gui.schematicannon.option.replaceWithAny"),
|
||||||
Lang.translate("gui.schematicannon.option.replaceWithEmpty"));
|
Lang.translate("gui.schematicannon.option.replaceWithEmpty"));
|
||||||
|
|
||||||
for (int i = 0; i < 4; i++) {
|
for (int i = 0; i < 4; i++) {
|
||||||
replaceLevelIndicators.add(new Indicator(x + 16 + i * 18, y + 96, ""));
|
replaceLevelIndicators.add(new Indicator(x + 33 + i * 18, y + 111, ""));
|
||||||
replaceLevelButtons.add(new IconButton(x + 16 + i * 18, y + 101, icons.get(i)));
|
replaceLevelButtons.add(new IconButton(x + 33 + i * 18, y + 117, icons.get(i)));
|
||||||
replaceLevelButtons.get(i).setToolTip(toolTips.get(i));
|
replaceLevelButtons.get(i)
|
||||||
|
.setToolTip(toolTips.get(i));
|
||||||
}
|
}
|
||||||
widgets.addAll(replaceLevelButtons);
|
placementSettingWidgets.addAll(replaceLevelButtons);
|
||||||
widgets.addAll(replaceLevelIndicators);
|
placementSettingWidgets.addAll(replaceLevelIndicators);
|
||||||
|
|
||||||
// Other Settings
|
// Other Settings
|
||||||
skipMissingButton = new IconButton(x + 106, y + 101, AllIcons.I_SKIP_MISSING);
|
skipMissingButton = new IconButton(x + 111, y + 117, AllIcons.I_SKIP_MISSING);
|
||||||
skipMissingButton.setToolTip(Lang.translate("gui.schematicannon.option.skipMissing"));
|
skipMissingButton.setToolTip(Lang.translate("gui.schematicannon.option.skipMissing"));
|
||||||
skipMissingIndicator = new Indicator(x + 106, y + 96, "");
|
skipMissingIndicator = new Indicator(x + 111, y + 111, "");
|
||||||
Collections.addAll(widgets, skipMissingButton, skipMissingIndicator);
|
Collections.addAll(placementSettingWidgets, skipMissingButton, skipMissingIndicator);
|
||||||
|
|
||||||
skipTilesButton = new IconButton(x + 124, y + 101, AllIcons.I_SKIP_TILES);
|
skipTilesButton = new IconButton(x + 129, y + 117, AllIcons.I_SKIP_TILES);
|
||||||
skipTilesButton.setToolTip(Lang.translate("gui.schematicannon.option.skipTileEntities"));
|
skipTilesButton.setToolTip(Lang.translate("gui.schematicannon.option.skipTileEntities"));
|
||||||
skipTilesIndicator = new Indicator(x + 124, y + 96, "");
|
skipTilesIndicator = new Indicator(x + 129, y + 111, "");
|
||||||
Collections.addAll(widgets, skipTilesButton, skipTilesIndicator);
|
Collections.addAll(placementSettingWidgets, skipTilesButton, skipTilesIndicator);
|
||||||
|
|
||||||
extraAreas = new ArrayList<>();
|
widgets.addAll(placementSettingWidgets);
|
||||||
extraAreas.add(new Rectangle2d(guiLeft + 240, guiTop + 88, 84, 113));
|
}
|
||||||
|
|
||||||
tick();
|
protected boolean placementSettingsHidden() {
|
||||||
|
return showSettingsIndicator.state == State.OFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void tick() {
|
public void tick() {
|
||||||
|
|
||||||
SchematicannonTileEntity te = container.getTileEntity();
|
SchematicannonTileEntity te = container.getTileEntity();
|
||||||
replaceLevelIndicators.get(0).state = te.replaceMode == 0 ? State.ON : State.OFF;
|
|
||||||
for (int replaceMode = 1; replaceMode < replaceLevelButtons.size(); replaceMode++)
|
|
||||||
replaceLevelIndicators.get(replaceMode).state = replaceMode <= te.replaceMode ? State.ON : State.OFF;
|
|
||||||
|
|
||||||
|
if (!placementSettingsHidden()) {
|
||||||
|
for (int replaceMode = 0; replaceMode < replaceLevelButtons.size(); replaceMode++)
|
||||||
|
replaceLevelIndicators.get(replaceMode).state = replaceMode == te.replaceMode ? State.ON : State.OFF;
|
||||||
skipMissingIndicator.state = te.skipMissing ? State.ON : State.OFF;
|
skipMissingIndicator.state = te.skipMissing ? State.ON : State.OFF;
|
||||||
skipTilesIndicator.state = !te.replaceTileEntities ? State.ON : State.OFF;
|
skipTilesIndicator.state = !te.replaceTileEntities ? State.ON : State.OFF;
|
||||||
|
}
|
||||||
|
|
||||||
playIndicator.state = State.OFF;
|
playIndicator.state = State.OFF;
|
||||||
pauseIndicator.state = State.OFF;
|
pauseIndicator.state = State.OFF;
|
||||||
|
@ -167,12 +207,18 @@ public class SchematicannonScreen extends AbstractSimiContainerScreen<Schematica
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void handleTooltips() {
|
protected void handleTooltips() {
|
||||||
for (Widget w : widgets)
|
if (placementSettingsHidden())
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (Widget w : placementSettingWidgets)
|
||||||
if (w instanceof IconButton) {
|
if (w instanceof IconButton) {
|
||||||
IconButton button = (IconButton) w;
|
IconButton button = (IconButton) w;
|
||||||
if (!button.getToolTip().isEmpty()) {
|
if (!button.getToolTip()
|
||||||
button.setToolTip(button.getToolTip().get(0));
|
.isEmpty()) {
|
||||||
button.getToolTip().add(TooltipHelper.holdShift(Palette.Blue, hasShiftDown()));
|
button.setToolTip(button.getToolTip()
|
||||||
|
.get(0));
|
||||||
|
button.getToolTip()
|
||||||
|
.add(TooltipHelper.holdShift(Palette.Blue, hasShiftDown()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -192,47 +238,43 @@ public class SchematicannonScreen extends AbstractSimiContainerScreen<Schematica
|
||||||
boolean enabled = indicator.state == State.ON;
|
boolean enabled = indicator.state == State.ON;
|
||||||
List<String> tip = button.getToolTip();
|
List<String> tip = button.getToolTip();
|
||||||
tip.add(TextFormatting.BLUE + (enabled ? optionEnabled : optionDisabled));
|
tip.add(TextFormatting.BLUE + (enabled ? optionEnabled : optionDisabled));
|
||||||
tip
|
tip.addAll(TooltipHelper.cutString(Lang.translate("gui.schematicannon.option." + tooltipKey + ".description"),
|
||||||
.addAll(TooltipHelper
|
GRAY, GRAY));
|
||||||
.cutString(Lang.translate("gui.schematicannon.option." + tooltipKey + ".description"), GRAY,
|
|
||||||
GRAY));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void renderWindow(int mouseX, int mouseY, float partialTicks) {
|
protected void renderWindow(int mouseX, int mouseY, float partialTicks) {
|
||||||
AllGuiTextures.PLAYER_INVENTORY.draw(this, guiLeft - 10, guiTop + 145);
|
AllGuiTextures.PLAYER_INVENTORY.draw(this, guiLeft - 10, guiTop + 145);
|
||||||
AllGuiTextures.SCHEMATICANNON_BG.draw(this, guiLeft + 20, guiTop);
|
BG_TOP.draw(this, guiLeft + 20, guiTop);
|
||||||
|
BG_BOTTOM.draw(this, guiLeft + 20, guiTop + BG_TOP.height);
|
||||||
|
|
||||||
SchematicannonTileEntity te = container.getTileEntity();
|
SchematicannonTileEntity te = container.getTileEntity();
|
||||||
renderPrintingProgress(te.schematicProgress);
|
renderPrintingProgress(te.schematicProgress);
|
||||||
renderFuelBar(te.fuelLevel);
|
renderFuelBar(te.fuelLevel);
|
||||||
renderChecklistPrinterProgress(te.bookPrintingProgress);
|
renderChecklistPrinterProgress(te.bookPrintingProgress);
|
||||||
|
|
||||||
if (!te.inventory.getStackInSlot(0).isEmpty())
|
if (!te.inventory.getStackInSlot(0)
|
||||||
|
.isEmpty())
|
||||||
renderBlueprintHighlight();
|
renderBlueprintHighlight();
|
||||||
|
|
||||||
GuiGameElement.of(renderedItem)
|
GuiGameElement.of(renderedItem)
|
||||||
.at(guiLeft + 240, guiTop + 120)
|
.at(guiLeft + 230, guiTop + 110)
|
||||||
.scale(5)
|
.scale(5)
|
||||||
.render();
|
.render();
|
||||||
|
|
||||||
|
font.drawStringWithShadow(title, guiLeft + 80, guiTop + 3, 0xfefefe);
|
||||||
font.drawString(title, guiLeft + 80, guiTop + 10, AllGuiTextures.FONT_COLOR);
|
|
||||||
|
|
||||||
String msg = Lang.translate("schematicannon.status." + te.statusMsg);
|
String msg = Lang.translate("schematicannon.status." + te.statusMsg);
|
||||||
int stringWidth = font.getStringWidth(msg);
|
int stringWidth = font.getStringWidth(msg);
|
||||||
|
|
||||||
if (te.missingItem != null) {
|
if (te.missingItem != null) {
|
||||||
stringWidth += 15;
|
stringWidth += 15;
|
||||||
itemRenderer.renderItemIntoGUI(te.missingItem, guiLeft + 145, guiTop + 25);
|
itemRenderer.renderItemIntoGUI(te.missingItem, guiLeft + 150, guiTop + 46);
|
||||||
}
|
}
|
||||||
|
|
||||||
font.drawStringWithShadow(msg, guiLeft + 20 + 96 - stringWidth / 2, guiTop + 30, 0xCCDDFF);
|
font.drawStringWithShadow(msg, guiLeft + 20 + 102 - stringWidth / 2, guiTop + 50, 0xCCDDFF);
|
||||||
|
font.drawString(playerInventory.getDisplayName()
|
||||||
font.drawString(settingsTitle, guiLeft + 20 + 13, guiTop + 84, AllGuiTextures.FONT_COLOR);
|
.getFormattedText(), guiLeft - 10 + 7, guiTop + 145 + 6, 0x666666);
|
||||||
font
|
|
||||||
.drawString(playerInventory.getDisplayName().getFormattedText(), guiLeft - 10 + 7, guiTop + 145 + 6,
|
|
||||||
0x666666);
|
|
||||||
|
|
||||||
// to see or debug the bounds of the extra area uncomment the following lines
|
// to see or debug the bounds of the extra area uncomment the following lines
|
||||||
// Rectangle2d r = extraAreas.get(0);
|
// Rectangle2d r = extraAreas.get(0);
|
||||||
|
@ -241,92 +283,128 @@ public class SchematicannonScreen extends AbstractSimiContainerScreen<Schematica
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void renderBlueprintHighlight() {
|
protected void renderBlueprintHighlight() {
|
||||||
AllGuiTextures.SCHEMATICANNON_HIGHLIGHT.draw(this, guiLeft + 20 + 8, guiTop + 31);
|
AllGuiTextures.SCHEMATICANNON_HIGHLIGHT.draw(this, guiLeft + 20 + 10, guiTop + 60);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void renderPrintingProgress(float progress) {
|
protected void renderPrintingProgress(float progress) {
|
||||||
progress = Math.min(progress, 1);
|
progress = Math.min(progress, 1);
|
||||||
AllGuiTextures sprite = AllGuiTextures.SCHEMATICANNON_PROGRESS;
|
AllGuiTextures sprite = AllGuiTextures.SCHEMATICANNON_PROGRESS;
|
||||||
minecraft.getTextureManager().bindTexture(sprite.location);
|
minecraft.getTextureManager()
|
||||||
blit(guiLeft + 20 + 39, guiTop + 36, sprite.startX, sprite.startY, (int) (sprite.width * progress),
|
.bindTexture(sprite.location);
|
||||||
|
blit(guiLeft + 20 + 44, guiTop + 64, sprite.startX, sprite.startY, (int) (sprite.width * progress),
|
||||||
sprite.height);
|
sprite.height);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void renderChecklistPrinterProgress(float progress) {
|
protected void renderChecklistPrinterProgress(float progress) {
|
||||||
AllGuiTextures sprite = AllGuiTextures.SCHEMATICANNON_PROGRESS_2;
|
AllGuiTextures sprite = AllGuiTextures.SCHEMATICANNON_CHECKLIST_PROGRESS;
|
||||||
minecraft.getTextureManager().bindTexture(sprite.location);
|
minecraft.getTextureManager()
|
||||||
blit(guiLeft + 20 + 222, guiTop + 42, sprite.startX, sprite.startY, sprite.width,
|
.bindTexture(sprite.location);
|
||||||
(int) (sprite.height * progress));
|
blit(guiLeft + 20 + 154, guiTop + 20, sprite.startX, sprite.startY, (int) (sprite.width * progress),
|
||||||
|
sprite.height);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void renderFuelBar(float amount) {
|
protected void renderFuelBar(float amount) {
|
||||||
AllGuiTextures sprite = AllGuiTextures.SCHEMATICANNON_FUEL;
|
AllGuiTextures sprite = AllGuiTextures.SCHEMATICANNON_FUEL;
|
||||||
if (container.getTileEntity().hasCreativeCrate) {
|
if (container.getTileEntity().hasCreativeCrate) {
|
||||||
AllGuiTextures.SCHEMATICANNON_FUEL_CREATIVE.draw(this, guiLeft + 20 + 73, guiTop + 135);
|
AllGuiTextures.SCHEMATICANNON_FUEL_CREATIVE.draw(this, guiLeft + 20 + 36, guiTop + 19);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
minecraft.getTextureManager().bindTexture(sprite.location);
|
minecraft.getTextureManager()
|
||||||
blit(guiLeft + 20 + 73, guiTop + 135, sprite.startX, sprite.startY, (int) (sprite.width * amount),
|
.bindTexture(sprite.location);
|
||||||
|
blit(guiLeft + 20 + 36, guiTop + 19, sprite.startX, sprite.startY, (int) (sprite.width * amount),
|
||||||
sprite.height);
|
sprite.height);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void renderWindowForeground(int mouseX, int mouseY, float partialTicks) {
|
protected void renderWindowForeground(int mouseX, int mouseY, float partialTicks) {
|
||||||
int fuelX = guiLeft + 20 + 73, fuelY = guiTop + 135;
|
|
||||||
SchematicannonTileEntity te = container.getTileEntity();
|
SchematicannonTileEntity te = container.getTileEntity();
|
||||||
|
|
||||||
|
int fuelX = guiLeft + 20 + 36, fuelY = guiTop + 19;
|
||||||
if (mouseX >= fuelX && mouseY >= fuelY && mouseX <= fuelX + AllGuiTextures.SCHEMATICANNON_FUEL.width
|
if (mouseX >= fuelX && mouseY >= fuelY && mouseX <= fuelX + AllGuiTextures.SCHEMATICANNON_FUEL.width
|
||||||
&& mouseY <= fuelY + AllGuiTextures.SCHEMATICANNON_FUEL.height) {
|
&& mouseY <= fuelY + AllGuiTextures.SCHEMATICANNON_FUEL.height) {
|
||||||
container.getTileEntity();
|
List<String> tooltip = getFuelLevelTooltip(te);
|
||||||
|
|
||||||
double fuelUsageRate = te.getFuelUsageRate();
|
|
||||||
int shotsLeft = (int) (te.fuelLevel / fuelUsageRate);
|
|
||||||
int shotsLeftWithItems = (int) (shotsLeft
|
|
||||||
+ te.inventory.getStackInSlot(4).getCount() * (te.getFuelAddedByGunPowder() / fuelUsageRate));
|
|
||||||
|
|
||||||
List<String> tooltip = new ArrayList<>();
|
|
||||||
float f = te.hasCreativeCrate ? 100 : te.fuelLevel * 100;
|
|
||||||
tooltip.add(Lang.translate(_gunpowderLevel, "" + (int) f));
|
|
||||||
if (!te.hasCreativeCrate)
|
|
||||||
tooltip.add(GRAY + Lang.translate(_shotsRemaining, "" + TextFormatting.BLUE + shotsLeft));
|
|
||||||
if (shotsLeftWithItems != shotsLeft)
|
|
||||||
tooltip
|
|
||||||
.add(GRAY + Lang
|
|
||||||
.translate(_shotsRemainingWithBackup, "" + TextFormatting.BLUE + shotsLeftWithItems));
|
|
||||||
|
|
||||||
renderTooltip(tooltip, mouseX, mouseY);
|
renderTooltip(tooltip, mouseX, mouseY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (hoveredSlot != null && !hoveredSlot.getHasStack()) {
|
||||||
|
if (hoveredSlot.getSlotIndex() == 0)
|
||||||
|
renderTooltip(
|
||||||
|
TooltipHelper.cutString(Lang.translate(_slotSchematic), TextFormatting.GRAY, TextFormatting.BLUE),
|
||||||
|
mouseX, mouseY);
|
||||||
|
if (hoveredSlot.getSlotIndex() == 2)
|
||||||
|
renderTooltip(
|
||||||
|
TooltipHelper.cutString(Lang.translate(_slotListPrinter), TextFormatting.GRAY, TextFormatting.BLUE),
|
||||||
|
mouseX, mouseY);
|
||||||
|
if (hoveredSlot.getSlotIndex() == 4)
|
||||||
|
renderTooltip(
|
||||||
|
TooltipHelper.cutString(Lang.translate(_slotGunpowder), TextFormatting.GRAY, TextFormatting.BLUE),
|
||||||
|
mouseX, mouseY);
|
||||||
|
}
|
||||||
|
|
||||||
if (te.missingItem != null) {
|
if (te.missingItem != null) {
|
||||||
int missingBlockX = guiLeft + 145, missingBlockY = guiTop + 25;
|
int missingBlockX = guiLeft + 150, missingBlockY = guiTop + 46;
|
||||||
if (mouseX >= missingBlockX && mouseY >= missingBlockY && mouseX <= missingBlockX + 16
|
if (mouseX >= missingBlockX && mouseY >= missingBlockY && mouseX <= missingBlockX + 16
|
||||||
&& mouseY <= missingBlockY + 16) {
|
&& mouseY <= missingBlockY + 16) {
|
||||||
renderTooltip(te.missingItem, mouseX, mouseY);
|
renderTooltip(te.missingItem, mouseX, mouseY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int paperX = guiLeft + 20 + 202, paperY = guiTop + 20;
|
int paperX = guiLeft + 132, paperY = guiTop + 19;
|
||||||
if (mouseX >= paperX && mouseY >= paperY && mouseX <= paperX + 16 && mouseY <= paperY + 16) {
|
if (mouseX >= paperX && mouseY >= paperY && mouseX <= paperX + 16 && mouseY <= paperY + 16)
|
||||||
renderTooltip(listPrinter, mouseX, mouseY);
|
renderTooltip(listPrinter, mouseX, mouseY);
|
||||||
}
|
|
||||||
|
|
||||||
super.renderWindowForeground(mouseX, mouseY, partialTicks);
|
super.renderWindowForeground(mouseX, mouseY, partialTicks);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected List<String> getFuelLevelTooltip(SchematicannonTileEntity te) {
|
||||||
|
double fuelUsageRate = te.getFuelUsageRate();
|
||||||
|
int shotsLeft = (int) (te.fuelLevel / fuelUsageRate);
|
||||||
|
int shotsLeftWithItems = (int) (shotsLeft + te.inventory.getStackInSlot(4)
|
||||||
|
.getCount() * (te.getFuelAddedByGunPowder() / fuelUsageRate));
|
||||||
|
List<String> tooltip = new ArrayList<>();
|
||||||
|
|
||||||
|
if (te.hasCreativeCrate) {
|
||||||
|
tooltip.add(Lang.translate(_gunpowderLevel, "" + 100));
|
||||||
|
tooltip.add(TextFormatting.DARK_PURPLE + "(" + new TranslationTextComponent(AllBlocks.CREATIVE_CRATE.get()
|
||||||
|
.getTranslationKey()).getFormattedText() + ")");
|
||||||
|
return tooltip;
|
||||||
|
}
|
||||||
|
|
||||||
|
float f = te.fuelLevel * 100;
|
||||||
|
tooltip.add(Lang.translate(_gunpowderLevel, "" + (int) f));
|
||||||
|
tooltip.add(GRAY + Lang.translate(_shotsRemaining, "" + TextFormatting.BLUE + shotsLeft));
|
||||||
|
if (shotsLeftWithItems != shotsLeft)
|
||||||
|
tooltip
|
||||||
|
.add(GRAY + Lang.translate(_shotsRemainingWithBackup, "" + TextFormatting.BLUE + shotsLeftWithItems));
|
||||||
|
return tooltip;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean mouseClicked(double x, double y, int button) {
|
public boolean mouseClicked(double x, double y, int button) {
|
||||||
|
if (showSettingsButton.isHovered()) {
|
||||||
|
showSettingsIndicator.state = placementSettingsHidden() ? State.GREEN : State.OFF;
|
||||||
|
initPlacementSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (confirmButton.isHovered()) {
|
||||||
|
Minecraft.getInstance().player.closeScreen();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!placementSettingsHidden()) {
|
||||||
for (int replaceMode = 0; replaceMode < replaceLevelButtons.size(); replaceMode++) {
|
for (int replaceMode = 0; replaceMode < replaceLevelButtons.size(); replaceMode++) {
|
||||||
if (!replaceLevelButtons.get(replaceMode).isHovered())
|
if (!replaceLevelButtons.get(replaceMode)
|
||||||
|
.isHovered())
|
||||||
continue;
|
continue;
|
||||||
if (container.getTileEntity().replaceMode == replaceMode)
|
if (container.getTileEntity().replaceMode == replaceMode)
|
||||||
continue;
|
continue;
|
||||||
sendOptionUpdate(Option.values()[replaceMode], true);
|
sendOptionUpdate(Option.values()[replaceMode], true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (skipMissingButton.isHovered())
|
if (skipMissingButton.isHovered())
|
||||||
sendOptionUpdate(Option.SKIP_MISSING, !container.getTileEntity().skipMissing);
|
sendOptionUpdate(Option.SKIP_MISSING, !container.getTileEntity().skipMissing);
|
||||||
if (skipTilesButton.isHovered())
|
if (skipTilesButton.isHovered())
|
||||||
sendOptionUpdate(Option.SKIP_TILES, !container.getTileEntity().replaceTileEntities);
|
sendOptionUpdate(Option.SKIP_TILES, !container.getTileEntity().replaceTileEntities);
|
||||||
|
}
|
||||||
|
|
||||||
if (playButton.isHovered() && playButton.active)
|
if (playButton.isHovered() && playButton.active)
|
||||||
sendOptionUpdate(Option.PLAY, true);
|
sendOptionUpdate(Option.PLAY, true);
|
||||||
|
@ -344,8 +422,8 @@ public class SchematicannonScreen extends AbstractSimiContainerScreen<Schematica
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void sendOptionUpdate(Option option, boolean set) {
|
protected void sendOptionUpdate(Option option, boolean set) {
|
||||||
AllPackets.channel
|
AllPackets.channel.sendToServer(ConfigureSchematicannonPacket.setOption(container.getTileEntity()
|
||||||
.sendToServer(ConfigureSchematicannonPacket.setOption(container.getTileEntity().getPos(), option, set));
|
.getPos(), option, set));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.simibubi.create.content.schematics.client;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
|
import java.nio.file.Path;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.nio.file.StandardOpenOption;
|
import java.nio.file.StandardOpenOption;
|
||||||
|
|
||||||
|
@ -11,9 +12,12 @@ import org.apache.commons.io.IOUtils;
|
||||||
import com.simibubi.create.AllItems;
|
import com.simibubi.create.AllItems;
|
||||||
import com.simibubi.create.AllKeys;
|
import com.simibubi.create.AllKeys;
|
||||||
import com.simibubi.create.AllSpecialTextures;
|
import com.simibubi.create.AllSpecialTextures;
|
||||||
|
import com.simibubi.create.Create;
|
||||||
import com.simibubi.create.CreateClient;
|
import com.simibubi.create.CreateClient;
|
||||||
|
import com.simibubi.create.content.schematics.ClientSchematicLoader;
|
||||||
|
import com.simibubi.create.content.schematics.packet.InstantSchematicPacket;
|
||||||
import com.simibubi.create.foundation.gui.ScreenOpener;
|
import com.simibubi.create.foundation.gui.ScreenOpener;
|
||||||
import com.simibubi.create.foundation.gui.TextInputPromptScreen;
|
import com.simibubi.create.foundation.networking.AllPackets;
|
||||||
import com.simibubi.create.foundation.utility.FilesHelper;
|
import com.simibubi.create.foundation.utility.FilesHelper;
|
||||||
import com.simibubi.create.foundation.utility.Lang;
|
import com.simibubi.create.foundation.utility.Lang;
|
||||||
import com.simibubi.create.foundation.utility.RaycastHelper;
|
import com.simibubi.create.foundation.utility.RaycastHelper;
|
||||||
|
@ -98,19 +102,12 @@ public class SchematicAndQuillHandler {
|
||||||
ClientPlayerEntity player = Minecraft.getInstance().player;
|
ClientPlayerEntity player = Minecraft.getInstance().player;
|
||||||
|
|
||||||
if (player.isSneaking()) {
|
if (player.isSneaking()) {
|
||||||
firstPos = null;
|
discard();
|
||||||
secondPos = null;
|
|
||||||
Lang.sendStatus(player, "schematicAndQuill.abort");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (secondPos != null) {
|
if (secondPos != null) {
|
||||||
TextInputPromptScreen guiScreenIn = new TextInputPromptScreen(this::saveSchematic, s -> {
|
ScreenOpener.open(new SchematicPromptScreen());
|
||||||
});
|
|
||||||
guiScreenIn.setTitle(Lang.translate("schematicAndQuill.prompt"));
|
|
||||||
guiScreenIn.setButtonTextConfirm(Lang.translate("action.saveToFile"));
|
|
||||||
guiScreenIn.setButtonTextAbort(Lang.translate("action.discard"));
|
|
||||||
ScreenOpener.open(guiScreenIn);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -129,6 +126,13 @@ public class SchematicAndQuillHandler {
|
||||||
Lang.sendStatus(player, "schematicAndQuill.firstPos");
|
Lang.sendStatus(player, "schematicAndQuill.firstPos");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void discard() {
|
||||||
|
ClientPlayerEntity player = Minecraft.getInstance().player;
|
||||||
|
firstPos = null;
|
||||||
|
secondPos = null;
|
||||||
|
Lang.sendStatus(player, "schematicAndQuill.abort");
|
||||||
|
}
|
||||||
|
|
||||||
public void tick() {
|
public void tick() {
|
||||||
if (!isActive())
|
if (!isActive())
|
||||||
return;
|
return;
|
||||||
|
@ -200,11 +204,13 @@ public class SchematicAndQuillHandler {
|
||||||
&& Minecraft.getInstance().currentScreen == null;
|
&& Minecraft.getInstance().currentScreen == null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void saveSchematic(String string) {
|
public void saveSchematic(String string, boolean convertImmediately) {
|
||||||
Template t = new Template();
|
Template t = new Template();
|
||||||
MutableBoundingBox bb = new MutableBoundingBox(firstPos, secondPos);
|
MutableBoundingBox bb = new MutableBoundingBox(firstPos, secondPos);
|
||||||
t.takeBlocksFromWorld(Minecraft.getInstance().world, new BlockPos(bb.minX, bb.minY, bb.minZ),
|
BlockPos origin = new BlockPos(bb.minX, bb.minY, bb.minZ);
|
||||||
new BlockPos(bb.getXSize(), bb.getYSize(), bb.getZSize()), true, Blocks.AIR);
|
BlockPos bounds = new BlockPos(bb.getXSize(), bb.getYSize(), bb.getZSize());
|
||||||
|
|
||||||
|
t.takeBlocksFromWorld(Minecraft.getInstance().world, origin, bounds, true, Blocks.AIR);
|
||||||
|
|
||||||
if (string.isEmpty())
|
if (string.isEmpty())
|
||||||
string = Lang.translate("schematicAndQuill.fallbackName");
|
string = Lang.translate("schematicAndQuill.fallbackName");
|
||||||
|
@ -214,9 +220,10 @@ public class SchematicAndQuillHandler {
|
||||||
String filename = FilesHelper.findFirstValidFilename(string, folderPath, "nbt");
|
String filename = FilesHelper.findFirstValidFilename(string, folderPath, "nbt");
|
||||||
String filepath = folderPath + "/" + filename;
|
String filepath = folderPath + "/" + filename;
|
||||||
|
|
||||||
|
Path path = Paths.get(filepath);
|
||||||
OutputStream outputStream = null;
|
OutputStream outputStream = null;
|
||||||
try {
|
try {
|
||||||
outputStream = Files.newOutputStream(Paths.get(filepath), StandardOpenOption.CREATE);
|
outputStream = Files.newOutputStream(path, StandardOpenOption.CREATE);
|
||||||
CompoundNBT nbttagcompound = t.writeToNBT(new CompoundNBT());
|
CompoundNBT nbttagcompound = t.writeToNBT(new CompoundNBT());
|
||||||
CompressedStreamTools.writeCompressed(nbttagcompound, outputStream);
|
CompressedStreamTools.writeCompressed(nbttagcompound, outputStream);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
@ -228,6 +235,23 @@ public class SchematicAndQuillHandler {
|
||||||
firstPos = null;
|
firstPos = null;
|
||||||
secondPos = null;
|
secondPos = null;
|
||||||
Lang.sendStatus(Minecraft.getInstance().player, "schematicAndQuill.saved", filepath);
|
Lang.sendStatus(Minecraft.getInstance().player, "schematicAndQuill.saved", filepath);
|
||||||
|
|
||||||
|
if (!convertImmediately)
|
||||||
|
return;
|
||||||
|
if (!Files.exists(path)) {
|
||||||
|
Create.logger.fatal("Missing Schematic file: " + path.toString());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
if (!ClientSchematicLoader.validateSizeLimitation(Files.size(path)))
|
||||||
|
return;
|
||||||
|
AllPackets.channel.sendToServer(new InstantSchematicPacket(filename, origin, bounds));
|
||||||
|
|
||||||
|
} catch (IOException e) {
|
||||||
|
Create.logger.fatal("Error finding Schematic file: " + path.toString());
|
||||||
|
e.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Outliner outliner() {
|
private Outliner outliner() {
|
||||||
|
|
|
@ -8,11 +8,14 @@ import com.simibubi.create.AllItems;
|
||||||
import com.simibubi.create.CreateClient;
|
import com.simibubi.create.CreateClient;
|
||||||
import com.simibubi.create.foundation.gui.AbstractSimiScreen;
|
import com.simibubi.create.foundation.gui.AbstractSimiScreen;
|
||||||
import com.simibubi.create.foundation.gui.AllGuiTextures;
|
import com.simibubi.create.foundation.gui.AllGuiTextures;
|
||||||
|
import com.simibubi.create.foundation.gui.AllIcons;
|
||||||
|
import com.simibubi.create.foundation.gui.widgets.IconButton;
|
||||||
import com.simibubi.create.foundation.gui.widgets.Label;
|
import com.simibubi.create.foundation.gui.widgets.Label;
|
||||||
import com.simibubi.create.foundation.gui.widgets.ScrollInput;
|
import com.simibubi.create.foundation.gui.widgets.ScrollInput;
|
||||||
import com.simibubi.create.foundation.gui.widgets.SelectionScrollInput;
|
import com.simibubi.create.foundation.gui.widgets.SelectionScrollInput;
|
||||||
import com.simibubi.create.foundation.utility.Lang;
|
import com.simibubi.create.foundation.utility.Lang;
|
||||||
|
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.gui.widget.TextFieldWidget;
|
import net.minecraft.client.gui.widget.TextFieldWidget;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTUtil;
|
import net.minecraft.nbt.NBTUtil;
|
||||||
|
@ -26,12 +29,12 @@ public class SchematicEditScreen extends AbstractSimiScreen {
|
||||||
private TextFieldWidget xInput;
|
private TextFieldWidget xInput;
|
||||||
private TextFieldWidget yInput;
|
private TextFieldWidget yInput;
|
||||||
private TextFieldWidget zInput;
|
private TextFieldWidget zInput;
|
||||||
|
private IconButton confirmButton;
|
||||||
|
|
||||||
private final List<String> rotationOptions =
|
private final List<String> rotationOptions =
|
||||||
Lang.translatedOptions("schematic.rotation", "none", "cw90", "cw180", "cw270");
|
Lang.translatedOptions("schematic.rotation", "none", "cw90", "cw180", "cw270");
|
||||||
private final List<String> mirrorOptions =
|
private final List<String> mirrorOptions =
|
||||||
Lang.translatedOptions("schematic.mirror", "none", "leftRight", "frontBack");
|
Lang.translatedOptions("schematic.mirror", "none", "leftRight", "frontBack");
|
||||||
private final String positionLabel = Lang.translate("schematic.position");
|
|
||||||
private final String rotationLabel = Lang.translate("schematic.rotation");
|
private final String rotationLabel = Lang.translate("schematic.rotation");
|
||||||
private final String mirrorLabel = Lang.translate("schematic.mirror");
|
private final String mirrorLabel = Lang.translate("schematic.mirror");
|
||||||
|
|
||||||
|
@ -41,16 +44,18 @@ public class SchematicEditScreen extends AbstractSimiScreen {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void init() {
|
protected void init() {
|
||||||
setWindowSize(AllGuiTextures.SCHEMATIC.width + 50, AllGuiTextures.SCHEMATIC.height);
|
AllGuiTextures background = AllGuiTextures.SCHEMATIC;
|
||||||
|
setWindowSize(background.width + 50, background.height);
|
||||||
int x = guiLeft;
|
int x = guiLeft;
|
||||||
int y = guiTop;
|
int y = guiTop;
|
||||||
handler = CreateClient.schematicHandler;
|
handler = CreateClient.schematicHandler;
|
||||||
|
|
||||||
xInput = new TextFieldWidget(font, x + 75, y + 32, 32, 10, "");
|
xInput = new TextFieldWidget(font, x + 50, y + 26, 34, 10, "");
|
||||||
yInput = new TextFieldWidget(font, x + 115, y + 32, 32, 10, "");
|
yInput = new TextFieldWidget(font, x + 90, y + 26, 34, 10, "");
|
||||||
zInput = new TextFieldWidget(font, x + 155, y + 32, 32, 10, "");
|
zInput = new TextFieldWidget(font, x + 130, y + 26, 34, 10, "");
|
||||||
|
|
||||||
BlockPos anchor = handler.getTransformation().getAnchor();
|
BlockPos anchor = handler.getTransformation()
|
||||||
|
.getAnchor();
|
||||||
if (handler.isDeployed()) {
|
if (handler.isDeployed()) {
|
||||||
xInput.setText("" + anchor.getX());
|
xInput.setText("" + anchor.getX());
|
||||||
yInput.setText("" + anchor.getY());
|
yInput.setText("" + anchor.getY());
|
||||||
|
@ -80,18 +85,29 @@ public class SchematicEditScreen extends AbstractSimiScreen {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
PlacementSettings settings = handler.getTransformation().toSettings();
|
PlacementSettings settings = handler.getTransformation()
|
||||||
Label labelR = new Label(x + 99, y + 52, "").withShadow();
|
.toSettings();
|
||||||
rotationArea = new SelectionScrollInput(x + 96, y + 49, 94, 14).forOptions(rotationOptions).titled("Rotation")
|
Label labelR = new Label(x + 50, y + 48, "").withShadow();
|
||||||
.setState(settings.getRotation().ordinal()).writingTo(labelR);
|
rotationArea = new SelectionScrollInput(x + 45, y + 43, 118, 18).forOptions(rotationOptions)
|
||||||
|
.titled(rotationLabel)
|
||||||
|
.setState(settings.getRotation()
|
||||||
|
.ordinal())
|
||||||
|
.writingTo(labelR);
|
||||||
|
|
||||||
Label labelM = new Label(x + 99, y + 72, "").withShadow();
|
Label labelM = new Label(x + 50, y + 70, "").withShadow();
|
||||||
mirrorArea = new SelectionScrollInput(x + 96, y + 69, 94, 14).forOptions(mirrorOptions).titled("Mirror")
|
mirrorArea = new SelectionScrollInput(x + 45, y + 65, 118, 18).forOptions(mirrorOptions)
|
||||||
.setState(settings.getMirror().ordinal()).writingTo(labelM);
|
.titled(mirrorLabel)
|
||||||
|
.setState(settings.getMirror()
|
||||||
|
.ordinal())
|
||||||
|
.writingTo(labelM);
|
||||||
|
|
||||||
Collections.addAll(widgets, xInput, yInput, zInput);
|
Collections.addAll(widgets, xInput, yInput, zInput);
|
||||||
Collections.addAll(widgets, labelR, labelM, rotationArea, mirrorArea);
|
Collections.addAll(widgets, labelR, labelM, rotationArea, mirrorArea);
|
||||||
|
|
||||||
|
confirmButton =
|
||||||
|
new IconButton(guiLeft + background.width - 33, guiTop + background.height - 24, AllIcons.I_CONFIRM);
|
||||||
|
widgets.add(confirmButton);
|
||||||
|
|
||||||
super.init();
|
super.init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -132,14 +148,10 @@ public class SchematicEditScreen extends AbstractSimiScreen {
|
||||||
AllGuiTextures.SCHEMATIC.draw(this, x, y);
|
AllGuiTextures.SCHEMATIC.draw(this, x, y);
|
||||||
|
|
||||||
font.drawStringWithShadow(handler.getCurrentSchematicName(),
|
font.drawStringWithShadow(handler.getCurrentSchematicName(),
|
||||||
x + 103 - font.getStringWidth(handler.getCurrentSchematicName()) / 2, y + 10, 0xDDEEFF);
|
x + 93 - font.getStringWidth(handler.getCurrentSchematicName()) / 2, y + 3, 0xffffff);
|
||||||
|
|
||||||
font.drawString(positionLabel, x + 10, y + 32, AllGuiTextures.FONT_COLOR);
|
|
||||||
font.drawString(rotationLabel, x + 10, y + 52, AllGuiTextures.FONT_COLOR);
|
|
||||||
font.drawString(mirrorLabel, x + 10, y + 72, AllGuiTextures.FONT_COLOR);
|
|
||||||
|
|
||||||
RenderSystem.pushMatrix();
|
RenderSystem.pushMatrix();
|
||||||
RenderSystem.translated(guiLeft + 220, guiTop + 20, 0);
|
RenderSystem.translated(guiLeft + 200, guiTop + 80, 0);
|
||||||
RenderSystem.scaled(3, 3, 3);
|
RenderSystem.scaled(3, 3, 3);
|
||||||
itemRenderer.renderItemIntoGUI(new ItemStack(AllItems.SCHEMATIC.get()), 0, 0);
|
itemRenderer.renderItemIntoGUI(new ItemStack(AllItems.SCHEMATIC.get()), 0, 0);
|
||||||
RenderSystem.popMatrix();
|
RenderSystem.popMatrix();
|
||||||
|
@ -163,15 +175,27 @@ public class SchematicEditScreen extends AbstractSimiScreen {
|
||||||
if (validCoords && newLocation != null) {
|
if (validCoords && newLocation != null) {
|
||||||
ItemStack item = handler.getActiveSchematicItem();
|
ItemStack item = handler.getActiveSchematicItem();
|
||||||
if (item != null) {
|
if (item != null) {
|
||||||
item.getTag().putBoolean("Deployed", true);
|
item.getTag()
|
||||||
item.getTag().put("Anchor", NBTUtil.writeBlockPos(newLocation));
|
.putBoolean("Deployed", true);
|
||||||
|
item.getTag()
|
||||||
|
.put("Anchor", NBTUtil.writeBlockPos(newLocation));
|
||||||
}
|
}
|
||||||
|
|
||||||
handler.getTransformation().init(newLocation, settings, handler.getBounds());
|
handler.getTransformation()
|
||||||
|
.init(newLocation, settings, handler.getBounds());
|
||||||
handler.markDirty();
|
handler.markDirty();
|
||||||
handler.deploy();
|
handler.deploy();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean mouseClicked(double x, double y, int button) {
|
||||||
|
if (confirmButton.isHovered()) {
|
||||||
|
Minecraft.getInstance().player.closeScreen();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return super.mouseClicked(x, y, button);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,10 +11,10 @@ public class SchematicHotbarSlotOverlay extends AbstractGui {
|
||||||
|
|
||||||
public void renderOn(int slot) {
|
public void renderOn(int slot) {
|
||||||
MainWindow mainWindow = Minecraft.getInstance().getWindow();
|
MainWindow mainWindow = Minecraft.getInstance().getWindow();
|
||||||
int x = mainWindow.getScaledWidth() / 2 - 92;
|
int x = mainWindow.getScaledWidth() / 2 - 88;
|
||||||
int y = mainWindow.getScaledHeight() - 23;
|
int y = mainWindow.getScaledHeight() - 19;
|
||||||
RenderSystem.enableAlphaTest();
|
RenderSystem.enableAlphaTest();
|
||||||
AllGuiTextures.BLUEPRINT_SLOT.draw(this, x + 20 * slot, y);
|
AllGuiTextures.SCHEMATIC_SLOT.draw(this, x + 20 * slot, y);
|
||||||
RenderSystem.disableAlphaTest();
|
RenderSystem.disableAlphaTest();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,103 @@
|
||||||
|
package com.simibubi.create.content.schematics.client;
|
||||||
|
|
||||||
|
import org.lwjgl.glfw.GLFW;
|
||||||
|
|
||||||
|
import com.simibubi.create.AllItems;
|
||||||
|
import com.simibubi.create.CreateClient;
|
||||||
|
import com.simibubi.create.foundation.gui.AbstractSimiScreen;
|
||||||
|
import com.simibubi.create.foundation.gui.AllGuiTextures;
|
||||||
|
import com.simibubi.create.foundation.gui.AllIcons;
|
||||||
|
import com.simibubi.create.foundation.gui.widgets.IconButton;
|
||||||
|
import com.simibubi.create.foundation.utility.Lang;
|
||||||
|
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.client.gui.widget.TextFieldWidget;
|
||||||
|
|
||||||
|
public class SchematicPromptScreen extends AbstractSimiScreen {
|
||||||
|
|
||||||
|
private final String title = Lang.translate("schematicAndQuill.title");
|
||||||
|
private final String convertLabel = Lang.translate("schematicAndQuill.convert");
|
||||||
|
private final String abortLabel = Lang.translate("action.discard");
|
||||||
|
private final String confirmLabel = Lang.translate("action.saveToFile");
|
||||||
|
|
||||||
|
private TextFieldWidget nameField;
|
||||||
|
private IconButton confirm;
|
||||||
|
private IconButton abort;
|
||||||
|
private IconButton convert;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void init() {
|
||||||
|
super.init();
|
||||||
|
AllGuiTextures background = AllGuiTextures.SCHEMATIC_PROMPT;
|
||||||
|
setWindowSize(background.width, background.height + 30);
|
||||||
|
|
||||||
|
nameField = new TextFieldWidget(font, guiLeft + 49, guiTop + 26, 131, 10, "");
|
||||||
|
nameField.setTextColor(-1);
|
||||||
|
nameField.setDisabledTextColour(-1);
|
||||||
|
nameField.setEnableBackgroundDrawing(false);
|
||||||
|
nameField.setMaxStringLength(35);
|
||||||
|
nameField.changeFocus(true);
|
||||||
|
|
||||||
|
abort = new IconButton(guiLeft + 7, guiTop + 53, AllIcons.I_TRASH);
|
||||||
|
abort.setToolTip(abortLabel);
|
||||||
|
widgets.add(abort);
|
||||||
|
|
||||||
|
confirm = new IconButton(guiLeft + 158, guiTop + 53, AllIcons.I_CONFIRM);
|
||||||
|
confirm.setToolTip(confirmLabel);
|
||||||
|
widgets.add(confirm);
|
||||||
|
|
||||||
|
convert = new IconButton(guiLeft + 180, guiTop + 53, AllIcons.I_SCHEMATIC);
|
||||||
|
convert.setToolTip(convertLabel);
|
||||||
|
widgets.add(convert);
|
||||||
|
|
||||||
|
widgets.add(confirm);
|
||||||
|
widgets.add(convert);
|
||||||
|
widgets.add(abort);
|
||||||
|
widgets.add(nameField);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void renderWindow(int mouseX, int mouseY, float partialTicks) {
|
||||||
|
AllGuiTextures.SCHEMATIC_PROMPT.draw(this, guiLeft, guiTop);
|
||||||
|
font.drawStringWithShadow(title, guiLeft + (sWidth / 2) - (font.getStringWidth(title) / 2), guiTop + 3,
|
||||||
|
0xffffff);
|
||||||
|
itemRenderer.renderItemIntoGUI(AllItems.SCHEMATIC.asStack(), guiLeft + 22, guiTop + 23);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean keyPressed(int keyCode, int p_keyPressed_2_, int p_keyPressed_3_) {
|
||||||
|
if (keyCode == GLFW.GLFW_KEY_ENTER) {
|
||||||
|
confirm(false);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (keyCode == 256 && this.shouldCloseOnEsc()) {
|
||||||
|
this.onClose();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return nameField.keyPressed(keyCode, p_keyPressed_2_, p_keyPressed_3_);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean mouseClicked(double x, double y, int button) {
|
||||||
|
if (confirm.isHovered()) {
|
||||||
|
confirm(false);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (abort.isHovered()) {
|
||||||
|
CreateClient.schematicAndQuillHandler.discard();
|
||||||
|
Minecraft.getInstance().player.closeScreen();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (convert.isHovered()) {
|
||||||
|
confirm(true);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return super.mouseClicked(x, y, button);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void confirm(boolean convertImmediately) {
|
||||||
|
CreateClient.schematicAndQuillHandler.saveSchematic(nameField.getText(), convertImmediately);
|
||||||
|
Minecraft.getInstance().player.closeScreen();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,52 @@
|
||||||
|
package com.simibubi.create.content.schematics.packet;
|
||||||
|
|
||||||
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
|
import com.simibubi.create.Create;
|
||||||
|
import com.simibubi.create.foundation.networking.SimplePacketBase;
|
||||||
|
|
||||||
|
import net.minecraft.entity.player.ServerPlayerEntity;
|
||||||
|
import net.minecraft.network.PacketBuffer;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraftforge.fml.network.NetworkEvent.Context;
|
||||||
|
|
||||||
|
public class InstantSchematicPacket extends SimplePacketBase {
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
private BlockPos origin;
|
||||||
|
private BlockPos bounds;
|
||||||
|
|
||||||
|
public InstantSchematicPacket(String name, BlockPos origin, BlockPos bounds) {
|
||||||
|
this.name = name;
|
||||||
|
this.origin = origin;
|
||||||
|
this.bounds = bounds;
|
||||||
|
}
|
||||||
|
|
||||||
|
public InstantSchematicPacket(PacketBuffer buffer) {
|
||||||
|
name = buffer.readString(32767);
|
||||||
|
origin = buffer.readBlockPos();
|
||||||
|
bounds = buffer.readBlockPos();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void write(PacketBuffer buffer) {
|
||||||
|
buffer.writeString(name);
|
||||||
|
buffer.writeBlockPos(origin);
|
||||||
|
buffer.writeBlockPos(bounds);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handle(Supplier<Context> context) {
|
||||||
|
context.get()
|
||||||
|
.enqueueWork(() -> {
|
||||||
|
ServerPlayerEntity player = context.get()
|
||||||
|
.getSender();
|
||||||
|
if (player == null)
|
||||||
|
return;
|
||||||
|
Create.schematicReceiver.handleInstantSchematic(player, name, player.world, origin, bounds);
|
||||||
|
});
|
||||||
|
context.get()
|
||||||
|
.setPacketHandled(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -28,6 +28,8 @@ public class CKinetics extends ConfigBase {
|
||||||
public ConfigInt maxRopeLength = i(128, 1, "maxRopeLength", Comments.maxRopeLength);
|
public ConfigInt maxRopeLength = i(128, 1, "maxRopeLength", Comments.maxRopeLength);
|
||||||
public ConfigInt maxCartCouplingLength = i(32, 1, "maxCartCouplingLength", Comments.maxCartCouplingLength);
|
public ConfigInt maxCartCouplingLength = i(32, 1, "maxCartCouplingLength", Comments.maxCartCouplingLength);
|
||||||
|
|
||||||
|
public CStress stressValues = nested(0, CStress::new, Comments.stress);
|
||||||
|
|
||||||
public ConfigGroup state = group(0, "stats", Comments.stats);
|
public ConfigGroup state = group(0, "stats", Comments.stats);
|
||||||
public ConfigFloat mediumSpeed = f(30, 0, 4096, "mediumSpeed", Comments.rpm, Comments.mediumSpeed);
|
public ConfigFloat mediumSpeed = f(30, 0, 4096, "mediumSpeed", Comments.rpm, Comments.mediumSpeed);
|
||||||
public ConfigFloat fastSpeed = f(100, 0, 65535, "fastSpeed", Comments.rpm, Comments.fastSpeed);
|
public ConfigFloat fastSpeed = f(100, 0, 65535, "fastSpeed", Comments.rpm, Comments.fastSpeed);
|
||||||
|
@ -37,8 +39,6 @@ public class CKinetics extends ConfigBase {
|
||||||
public ConfigFloat mediumCapacity = f(128, 0, 4096, "mediumCapacity", Comments.su, Comments.mediumCapacity);
|
public ConfigFloat mediumCapacity = f(128, 0, 4096, "mediumCapacity", Comments.su, Comments.mediumCapacity);
|
||||||
public ConfigFloat highCapacity = f(512, 0, 65535, "highCapacity", Comments.su, Comments.highCapacity);
|
public ConfigFloat highCapacity = f(512, 0, 65535, "highCapacity", Comments.su, Comments.highCapacity);
|
||||||
|
|
||||||
public CStress stressValues = nested(0, CStress::new, Comments.stress);
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return "kinetics";
|
return "kinetics";
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
package com.simibubi.create.foundation.config;
|
||||||
|
|
||||||
|
public class CRecipes extends ConfigBase {
|
||||||
|
|
||||||
|
public ConfigBool allowShapelessInMixer = b(true, "allowShapelessInMixer", Comments.allowShapelessInMixer);
|
||||||
|
public ConfigBool allowShapedSquareInPress = b(true, "allowShapedSquareInPress", Comments.allowShapedSquareInPress);
|
||||||
|
public ConfigBool allowRegularCraftingInCrafter = b(true, "allowRegularCraftingInCrafter", Comments.allowRegularCraftingInCrafter);
|
||||||
|
public ConfigBool allowStonecuttingOnSaw = b(true, "allowStonecuttingOnSaw", Comments.allowStonecuttingOnSaw);
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return "recipes";
|
||||||
|
}
|
||||||
|
|
||||||
|
private static class Comments {
|
||||||
|
static String allowShapelessInMixer =
|
||||||
|
"When true, allows any shapeless crafting recipes to be processed by a Mechanical Mixer + Basin.";
|
||||||
|
static String allowShapedSquareInPress =
|
||||||
|
"When true, allows any single-ingredient 2x2 or 3x3 crafting recipes to be processed by a Mechanical Press + Basin.";
|
||||||
|
static String allowRegularCraftingInCrafter =
|
||||||
|
"When true, allows any standard crafting recipes to be processed by Mechanical Crafters.";
|
||||||
|
static String allowStonecuttingOnSaw =
|
||||||
|
"When true, allows any stonecutting recipes to be processed by a Mechanical Saw.";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -6,6 +6,7 @@ public class CServer extends ConfigBase {
|
||||||
public ConfigInt tickrateSyncTimer =
|
public ConfigInt tickrateSyncTimer =
|
||||||
i(20, 5, "tickrateSyncTimer", "[in Ticks]", Comments.tickrateSyncTimer, Comments.tickrateSyncTimer2);
|
i(20, 5, "tickrateSyncTimer", "[in Ticks]", Comments.tickrateSyncTimer, Comments.tickrateSyncTimer2);
|
||||||
|
|
||||||
|
public CRecipes recipes = nested(0, CRecipes::new, Comments.recipes);
|
||||||
public CKinetics kinetics = nested(0, CKinetics::new, Comments.kinetics);
|
public CKinetics kinetics = nested(0, CKinetics::new, Comments.kinetics);
|
||||||
public CFluids fluids = nested(0, CFluids::new, Comments.fluids);
|
public CFluids fluids = nested(0, CFluids::new, Comments.fluids);
|
||||||
public CLogistics logistics = nested(0, CLogistics::new, Comments.logistics);
|
public CLogistics logistics = nested(0, CLogistics::new, Comments.logistics);
|
||||||
|
@ -19,6 +20,7 @@ public class CServer extends ConfigBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class Comments {
|
private static class Comments {
|
||||||
|
static String recipes = "Packmakers' control panel for internal recipe compat";
|
||||||
static String schematics = "Everything related to Schematic tools";
|
static String schematics = "Everything related to Schematic tools";
|
||||||
static String kinetics = "Parameters and abilities of Create's kinetic mechanisms";
|
static String kinetics = "Parameters and abilities of Create's kinetic mechanisms";
|
||||||
static String fluids = "Create's liquid manipulation tools";
|
static String fluids = "Create's liquid manipulation tools";
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.simibubi.create.foundation.data.recipe;
|
||||||
|
|
||||||
|
import com.simibubi.create.AllRecipeTypes;
|
||||||
|
import com.simibubi.create.content.palettes.AllPaletteBlocks;
|
||||||
|
|
||||||
|
import net.minecraft.data.DataGenerator;
|
||||||
|
import net.minecraft.fluid.Fluids;
|
||||||
|
import net.minecraft.item.Items;
|
||||||
|
import net.minecraft.tags.FluidTags;
|
||||||
|
|
||||||
|
public class CompactingRecipeGen extends ProcessingRecipeGen {
|
||||||
|
|
||||||
|
GeneratedRecipe
|
||||||
|
|
||||||
|
TEMPGABBRO = create("temp_gabbro", b -> b
|
||||||
|
.require(Items.COBBLESTONE)
|
||||||
|
.require(FluidTags.LAVA, 250)
|
||||||
|
.output(AllPaletteBlocks.GABBRO.get(), 1)),
|
||||||
|
|
||||||
|
ICE = create("ice", b -> b
|
||||||
|
.require(Items.ICE)
|
||||||
|
.output(Fluids.WATER, 250))
|
||||||
|
|
||||||
|
;
|
||||||
|
|
||||||
|
public CompactingRecipeGen(DataGenerator p_i48262_1_) {
|
||||||
|
super(p_i48262_1_);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected AllRecipeTypes getRecipeType() {
|
||||||
|
return AllRecipeTypes.COMPACTING;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
package com.simibubi.create.foundation.data.recipe;
|
||||||
|
|
||||||
|
import com.simibubi.create.AllRecipeTypes;
|
||||||
|
|
||||||
|
import net.minecraft.data.DataGenerator;
|
||||||
|
import net.minecraft.fluid.Fluids;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.item.Items;
|
||||||
|
import net.minecraft.potion.PotionUtils;
|
||||||
|
import net.minecraft.potion.Potions;
|
||||||
|
import net.minecraftforge.common.crafting.NBTIngredient;
|
||||||
|
|
||||||
|
public class EmptyingRecipeGen extends ProcessingRecipeGen {
|
||||||
|
|
||||||
|
GeneratedRecipe
|
||||||
|
|
||||||
|
WATER_BOTTLE = create("water_bottle", b -> b
|
||||||
|
.require(NBTIngredient.fromStacks(PotionUtils.addPotionToItemStack(new ItemStack(Items.POTION), Potions.WATER)))
|
||||||
|
.output(Fluids.WATER, 250)
|
||||||
|
.output(Items.GLASS_BOTTLE))
|
||||||
|
|
||||||
|
;
|
||||||
|
|
||||||
|
public EmptyingRecipeGen(DataGenerator p_i48262_1_) {
|
||||||
|
super(p_i48262_1_);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected AllRecipeTypes getRecipeType() {
|
||||||
|
return AllRecipeTypes.EMPTYING;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -8,6 +8,7 @@ import com.simibubi.create.content.contraptions.processing.HeatCondition;
|
||||||
import net.minecraft.block.Blocks;
|
import net.minecraft.block.Blocks;
|
||||||
import net.minecraft.data.DataGenerator;
|
import net.minecraft.data.DataGenerator;
|
||||||
import net.minecraft.item.Items;
|
import net.minecraft.item.Items;
|
||||||
|
import net.minecraft.tags.FluidTags;
|
||||||
import net.minecraft.tags.ItemTags;
|
import net.minecraft.tags.ItemTags;
|
||||||
import net.minecraftforge.common.Tags;
|
import net.minecraftforge.common.Tags;
|
||||||
|
|
||||||
|
@ -15,6 +16,11 @@ public class MixingRecipeGen extends ProcessingRecipeGen {
|
||||||
|
|
||||||
GeneratedRecipe
|
GeneratedRecipe
|
||||||
|
|
||||||
|
TEMPCOBBLE = create("temp_cobble", b -> b
|
||||||
|
.require(FluidTags.WATER, 250)
|
||||||
|
.require(FluidTags.LAVA, 250)
|
||||||
|
.output(Blocks.COBBLESTONE, 1)),
|
||||||
|
|
||||||
BRASS_INGOT = create("brass_ingot", b -> b.require(I.copper())
|
BRASS_INGOT = create("brass_ingot", b -> b.require(I.copper())
|
||||||
.require(I.zinc())
|
.require(I.zinc())
|
||||||
.output(AllItems.BRASS_INGOT.get(), 2)
|
.output(AllItems.BRASS_INGOT.get(), 2)
|
||||||
|
|
|
@ -32,8 +32,10 @@ public abstract class ProcessingRecipeGen extends CreateRecipeProvider {
|
||||||
generators.add(new WashingRecipeGen(gen));
|
generators.add(new WashingRecipeGen(gen));
|
||||||
generators.add(new PolishingRecipeGen(gen));
|
generators.add(new PolishingRecipeGen(gen));
|
||||||
generators.add(new MixingRecipeGen(gen));
|
generators.add(new MixingRecipeGen(gen));
|
||||||
|
generators.add(new CompactingRecipeGen(gen));
|
||||||
generators.add(new PressingRecipeGen(gen));
|
generators.add(new PressingRecipeGen(gen));
|
||||||
generators.add(new FillingRecipeGen(gen));
|
generators.add(new FillingRecipeGen(gen));
|
||||||
|
generators.add(new EmptyingRecipeGen(gen));
|
||||||
|
|
||||||
gen.addProvider(new IDataProvider() {
|
gen.addProvider(new IDataProvider() {
|
||||||
|
|
||||||
|
|
|
@ -201,9 +201,9 @@ public class StandardRecipeGen extends CreateRecipeProvider {
|
||||||
.key('A', Tags.Items.NUGGETS_IRON)
|
.key('A', Tags.Items.NUGGETS_IRON)
|
||||||
.patternLine("ASA")),
|
.patternLine("ASA")),
|
||||||
|
|
||||||
ATTRIBUTE_FILTER = create(AllItems.ATTRIBUTE_FILTER).unlockedBy(I::andesite)
|
ATTRIBUTE_FILTER = create(AllItems.ATTRIBUTE_FILTER).unlockedByTag(I::brass)
|
||||||
.viaShaped(b -> b.key('S', ItemTags.WOOL)
|
.viaShaped(b -> b.key('S', ItemTags.WOOL)
|
||||||
.key('A', I.copperNugget())
|
.key('A', I.brassNugget())
|
||||||
.patternLine("ASA")),
|
.patternLine("ASA")),
|
||||||
|
|
||||||
BRASS_HAND = create(AllItems.BRASS_HAND).unlockedByTag(I::brass)
|
BRASS_HAND = create(AllItems.BRASS_HAND).unlockedByTag(I::brass)
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue