generic infinite fluid triggers

This commit is contained in:
grimmauld 2021-02-18 23:00:17 +01:00
parent 8c8a9abd8a
commit 7023148e7f
22 changed files with 239 additions and 124 deletions

View file

@ -140,7 +140,7 @@ de8a40b7daf1497d5aecee47a43b3e0b1d030b00 assets/create/blockstates/fancy_scoria_
fc9ac0a7e7191b93516719455a17177fa6524ecc assets/create/blockstates/fancy_weathered_limestone_bricks_slab.json
b2a7c321b1795f20e7433f81a55ce4683de081b8 assets/create/blockstates/fancy_weathered_limestone_bricks_stairs.json
6372fe02ba0065acb0758121c45a15a1a8fdc5de assets/create/blockstates/fancy_weathered_limestone_bricks_wall.json
48086bf71a824faf14841b698050cc8544b09a9b assets/create/blockstates/fluid_pipe.json
3d97226b5e8d8f70ed08e45e78db1faf78d5e28b assets/create/blockstates/fluid_pipe.json
f0eaab18e16c4f3f65ebf3b55b08f0dc445720fe assets/create/blockstates/fluid_tank.json
5408d92ab02af86539ac42971d4033545970bb3a assets/create/blockstates/fluid_valve.json
e9da1794b6ece7f9aa8bcb43d42c23a55446133b assets/create/blockstates/flywheel.json
@ -337,7 +337,7 @@ e8b0a401c10d1ba67ed71ba31bd5f9bc28571b65 assets/create/blockstates/powered_toggl
d06cd9a1101b18d306a786320aab12018b1325d6 assets/create/blockstates/purple_sail.json
92957119abd5fbcca36a113b2a80255fd70fc303 assets/create/blockstates/purple_seat.json
61035f8afe75ff7bbd291da5d8690bcbebe679eb assets/create/blockstates/purple_valve_handle.json
6fa36883e76e9e403bb429c8f86b8c0d3bba0cff assets/create/blockstates/radial_chassis.json
8d7e653bfd9846e684a0d3725595714a19201017 assets/create/blockstates/radial_chassis.json
45877c4d90a7185c2f304edbd67379d800920439 assets/create/blockstates/red_sail.json
da1b08387af7afa0855ee8d040f620c01f20660a assets/create/blockstates/red_seat.json
722fc77bbf387af8a4016e42cbf9501d2b968881 assets/create/blockstates/red_valve_handle.json
@ -401,18 +401,18 @@ a3a11524cd3515fc01d905767b4b7ea782adaf03 assets/create/blockstates/yellow_seat.j
7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json
b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json
e3f618c5b622d21880de858678d1802cbf65e615 assets/create/lang/en_ud.json
04b4c59db79887cdddd128cd4cb59320c715a76a assets/create/lang/en_us.json
92840d43a7a5056ba1ddf043fe2a4b2b54533192 assets/create/lang/unfinished/de_de.json
fcded5cc7ba38ce1f13bbcf481c52da384d4335e assets/create/lang/unfinished/es_mx.json
d926a35cff961a017a174e5bad8976b8bfa246f0 assets/create/lang/unfinished/fr_fr.json
bcf5cf92717d5d8b5b4b56dc759cc5dcd3b05ae7 assets/create/lang/unfinished/it_it.json
dddcd6a8d3842035b07172dae1b61064b210dd3b assets/create/lang/unfinished/ja_jp.json
6fc6f612108b1c4498ea90e83f1ed0a7bce198d5 assets/create/lang/unfinished/ko_kr.json
f6d7256dca3a9979ce85333a72ad787657c954ff assets/create/lang/unfinished/nl_nl.json
48adee636f2a0ff06c97b738c9552dcdd48dd72c assets/create/lang/unfinished/pt_br.json
a82ef75492ff34c22f5e480fefe826aceefa956e assets/create/lang/unfinished/ru_ru.json
25b9387af4a75d4264ff001562cc4b14fccd49e6 assets/create/lang/unfinished/zh_cn.json
21e291e10cc5194b61d82c8a271cff2682ec0aee assets/create/lang/unfinished/zh_tw.json
1d231d2f74ca22001e30d023918849e3550896a1 assets/create/lang/en_us.json
435be9258b9412d4400e5364fb5047c2fd5a93ac assets/create/lang/unfinished/de_de.json
49688c098e2cdb27b51f528856d561a20d4e2dd8 assets/create/lang/unfinished/es_mx.json
18f09d363a6c0a503d7cdba12bbe0d082f07ac45 assets/create/lang/unfinished/fr_fr.json
eee4c4f4edf4efc5d409d77502c84f2eb93a6171 assets/create/lang/unfinished/it_it.json
d3b716160bc5703d6ac217f1cda10f5ff89c3bc1 assets/create/lang/unfinished/ja_jp.json
f7ea927235d19933b73e4a26c453d33418cff66e assets/create/lang/unfinished/ko_kr.json
f2987cd923d24da728a4fede0387de022067faec assets/create/lang/unfinished/nl_nl.json
2b1b0b450908d17e6c40f834d5050ffc68f1b733 assets/create/lang/unfinished/pt_br.json
27a08856af9c2a4436a6215ac063683475f77552 assets/create/lang/unfinished/ru_ru.json
a60d259329aa51ad151ab29e86f8d7d6e4ca209c assets/create/lang/unfinished/zh_cn.json
fa2a9b965dc91c1cf381524df8015d84f5c3cdc5 assets/create/lang/unfinished/zh_tw.json
846200eb548d3bfa2e77b41039de159b4b6cfb45 assets/create/models/block/acacia_window.json
1930fa3a3c98d53dd19e4ee7f55bc27fd47aa281 assets/create/models/block/acacia_window_pane_noside.json
1763ea2c9b981d187f5031ba608f3d5d3be3986a assets/create/models/block/acacia_window_pane_noside_alt.json
@ -1625,9 +1625,9 @@ acef16596b7ae82aaf853142d69bcea7094b8173 data/create/advancements/fan_smoke.json
489c58a0508a2a41cc0849dfb933eb5ac96ef364 data/create/advancements/glass_pipe.json
62f3610188f7dbd3900ab305edc2d06282705a38 data/create/advancements/goggles.json
10c8686da9cec2ae30c10f434836ac15a1b88666 data/create/advancements/hose_pulley.json
d44f4dcc6d0c51b4f347bc0c5c0d97dbb7af6523 data/create/advancements/infinite_chocolate.json
db31e7853f9f15ad35e14bfa9925f4eb527f0f01 data/create/advancements/infinite_lava.json
eb7e3aac431fd16cf643a51e8546c53d6510c81c data/create/advancements/infinite_water.json
783149a4aaba84d2fb93e036f6f642540c1d7f78 data/create/advancements/infinite_chocolate.json
4e626cc34af70e2be6bd2e209b745515293784af data/create/advancements/infinite_lava.json
07a74e519f5244c4ce5d6c8549f6c8a668238953 data/create/advancements/infinite_water.json
9beb622c79e9f5ce2397c22222cac0faf272f388 data/create/advancements/integrated_circuit.json
316bed3d8985d0a371200967d7edd2936f1b9f94 data/create/advancements/integrated_circuit_eob.json
a80eea863bfdc7777b8bade39a81655b2f99e02f data/create/advancements/item_drain.json

View file

@ -61,9 +61,9 @@
{
"when": {
"down": "false",
"north": "true",
"up": "true",
"south": "false",
"north": "true"
"south": "false"
},
"apply": {
"model": "create:block/fluid_pipe/lu_x"
@ -72,9 +72,9 @@
{
"when": {
"down": "false",
"north": "false",
"up": "true",
"south": "true",
"north": "false"
"south": "true"
},
"apply": {
"model": "create:block/fluid_pipe/ru_x"
@ -83,9 +83,9 @@
{
"when": {
"down": "true",
"north": "true",
"up": "false",
"south": "false",
"north": "true"
"south": "false"
},
"apply": {
"model": "create:block/fluid_pipe/ld_x"
@ -94,9 +94,9 @@
{
"when": {
"down": "true",
"north": "false",
"up": "false",
"south": "true",
"north": "false"
"south": "true"
},
"apply": {
"model": "create:block/fluid_pipe/rd_x"
@ -105,9 +105,9 @@
{
"when": {
"down": "true",
"north": "false",
"up": "true",
"south": "false",
"north": "false"
"south": "false"
},
"apply": {
"model": "create:block/fluid_pipe/ud_x"
@ -116,9 +116,9 @@
{
"when": {
"down": "false",
"north": "false",
"up": "true",
"south": "false",
"north": "false"
"south": "false"
},
"apply": {
"model": "create:block/fluid_pipe/ud_x"
@ -127,9 +127,9 @@
{
"when": {
"down": "true",
"north": "false",
"up": "false",
"south": "false",
"north": "false"
"south": "false"
},
"apply": {
"model": "create:block/fluid_pipe/ud_x"
@ -138,9 +138,9 @@
{
"when": {
"down": "false",
"north": "true",
"up": "false",
"south": "true",
"north": "true"
"south": "true"
},
"apply": {
"model": "create:block/fluid_pipe/lr_x"
@ -149,9 +149,9 @@
{
"when": {
"down": "false",
"north": "true",
"up": "false",
"south": "false",
"north": "true"
"south": "false"
},
"apply": {
"model": "create:block/fluid_pipe/lr_x"
@ -160,9 +160,9 @@
{
"when": {
"down": "false",
"north": "false",
"up": "false",
"south": "true",
"north": "false"
"south": "true"
},
"apply": {
"model": "create:block/fluid_pipe/lr_x"
@ -171,9 +171,9 @@
{
"when": {
"down": "false",
"north": "false",
"up": "false",
"south": "false",
"north": "false"
"south": "false"
},
"apply": {
"model": "create:block/fluid_pipe/none_x"
@ -181,10 +181,10 @@
},
{
"when": {
"south": "true",
"west": "true",
"east": "false",
"north": "false",
"east": "false"
"south": "true"
},
"apply": {
"model": "create:block/fluid_pipe/lu_y"
@ -192,10 +192,10 @@
},
{
"when": {
"south": "true",
"west": "false",
"east": "true",
"north": "false",
"east": "true"
"south": "true"
},
"apply": {
"model": "create:block/fluid_pipe/ru_y"
@ -203,10 +203,10 @@
},
{
"when": {
"south": "false",
"west": "true",
"east": "false",
"north": "true",
"east": "false"
"south": "false"
},
"apply": {
"model": "create:block/fluid_pipe/ld_y"
@ -214,10 +214,10 @@
},
{
"when": {
"south": "false",
"west": "false",
"east": "true",
"north": "true",
"east": "true"
"south": "false"
},
"apply": {
"model": "create:block/fluid_pipe/rd_y"
@ -225,10 +225,10 @@
},
{
"when": {
"south": "true",
"west": "false",
"east": "false",
"north": "true",
"east": "false"
"south": "true"
},
"apply": {
"model": "create:block/fluid_pipe/ud_y"
@ -236,10 +236,10 @@
},
{
"when": {
"south": "true",
"west": "false",
"east": "false",
"north": "false",
"east": "false"
"south": "true"
},
"apply": {
"model": "create:block/fluid_pipe/ud_y"
@ -247,10 +247,10 @@
},
{
"when": {
"south": "false",
"west": "false",
"east": "false",
"north": "true",
"east": "false"
"south": "false"
},
"apply": {
"model": "create:block/fluid_pipe/ud_y"
@ -258,10 +258,10 @@
},
{
"when": {
"south": "false",
"west": "true",
"east": "true",
"north": "false",
"east": "true"
"south": "false"
},
"apply": {
"model": "create:block/fluid_pipe/lr_y"
@ -269,10 +269,10 @@
},
{
"when": {
"south": "false",
"west": "true",
"east": "false",
"north": "false",
"east": "false"
"south": "false"
},
"apply": {
"model": "create:block/fluid_pipe/lr_y"
@ -280,10 +280,10 @@
},
{
"when": {
"south": "false",
"west": "false",
"east": "true",
"north": "false",
"east": "true"
"south": "false"
},
"apply": {
"model": "create:block/fluid_pipe/lr_y"
@ -291,10 +291,10 @@
},
{
"when": {
"south": "false",
"west": "false",
"east": "false",
"north": "false",
"east": "false"
"south": "false"
},
"apply": {
"model": "create:block/fluid_pipe/none_y"
@ -302,10 +302,10 @@
},
{
"when": {
"down": "false",
"up": "true",
"west": "false",
"east": "true"
"down": "false",
"east": "true",
"up": "true"
},
"apply": {
"model": "create:block/fluid_pipe/lu_z"
@ -313,10 +313,10 @@
},
{
"when": {
"down": "false",
"up": "true",
"west": "true",
"east": "false"
"down": "false",
"east": "false",
"up": "true"
},
"apply": {
"model": "create:block/fluid_pipe/ru_z"
@ -324,10 +324,10 @@
},
{
"when": {
"down": "true",
"up": "false",
"west": "false",
"east": "true"
"down": "true",
"east": "true",
"up": "false"
},
"apply": {
"model": "create:block/fluid_pipe/ld_z"
@ -335,10 +335,10 @@
},
{
"when": {
"down": "true",
"up": "false",
"west": "true",
"east": "false"
"down": "true",
"east": "false",
"up": "false"
},
"apply": {
"model": "create:block/fluid_pipe/rd_z"
@ -346,10 +346,10 @@
},
{
"when": {
"west": "false",
"down": "true",
"up": "true",
"west": "false",
"east": "false"
"east": "false",
"up": "true"
},
"apply": {
"model": "create:block/fluid_pipe/ud_z"
@ -357,10 +357,10 @@
},
{
"when": {
"west": "false",
"down": "false",
"up": "true",
"west": "false",
"east": "false"
"east": "false",
"up": "true"
},
"apply": {
"model": "create:block/fluid_pipe/ud_z"
@ -368,10 +368,10 @@
},
{
"when": {
"west": "false",
"down": "true",
"up": "false",
"west": "false",
"east": "false"
"east": "false",
"up": "false"
},
"apply": {
"model": "create:block/fluid_pipe/ud_z"
@ -379,10 +379,10 @@
},
{
"when": {
"down": "false",
"up": "false",
"west": "true",
"east": "true"
"down": "false",
"east": "true",
"up": "false"
},
"apply": {
"model": "create:block/fluid_pipe/lr_z"
@ -390,10 +390,10 @@
},
{
"when": {
"down": "false",
"up": "false",
"west": "false",
"east": "true"
"down": "false",
"east": "true",
"up": "false"
},
"apply": {
"model": "create:block/fluid_pipe/lr_z"
@ -401,10 +401,10 @@
},
{
"when": {
"down": "false",
"up": "false",
"west": "true",
"east": "false"
"down": "false",
"east": "false",
"up": "false"
},
"apply": {
"model": "create:block/fluid_pipe/lr_z"
@ -412,10 +412,10 @@
},
{
"when": {
"down": "false",
"up": "false",
"west": "false",
"east": "false"
"down": "false",
"east": "false",
"up": "false"
},
"apply": {
"model": "create:block/fluid_pipe/none_z"

View file

@ -29,8 +29,8 @@
},
{
"when": {
"axis": "x",
"sticky_south": "true"
"sticky_south": "true",
"axis": "x"
},
"apply": {
"model": "create:block/radial_chassis_side_x_sticky",
@ -39,8 +39,8 @@
},
{
"when": {
"axis": "y",
"sticky_south": "true"
"sticky_south": "true",
"axis": "y"
},
"apply": {
"model": "create:block/radial_chassis_side_y_sticky"
@ -48,8 +48,8 @@
},
{
"when": {
"axis": "z",
"sticky_south": "true"
"sticky_south": "true",
"axis": "z"
},
"apply": {
"model": "create:block/radial_chassis_side_x_sticky",
@ -59,8 +59,8 @@
},
{
"when": {
"axis": "x",
"sticky_south": "false"
"sticky_south": "false",
"axis": "x"
},
"apply": {
"model": "create:block/radial_chassis_side_x",
@ -69,8 +69,8 @@
},
{
"when": {
"axis": "y",
"sticky_south": "false"
"sticky_south": "false",
"axis": "y"
},
"apply": {
"model": "create:block/radial_chassis_side_y"
@ -78,8 +78,8 @@
},
{
"when": {
"axis": "z",
"sticky_south": "false"
"sticky_south": "false",
"axis": "z"
},
"apply": {
"model": "create:block/radial_chassis_side_x",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 1101",
"_": "Missing Localizations: 1102",
"_": "->------------------------] Game Elements [------------------------<-",
@ -685,6 +685,7 @@
"create.recipe.mechanical_crafting": "UNLOCALIZED: Mechanical Crafting",
"create.recipe.automatic_shaped": "UNLOCALIZED: Automated Shaped Crafting",
"create.recipe.block_cutting": "UNLOCALIZED: Block Cutting",
"create.recipe.wood_cutting": "UNLOCALIZED: Wood Cutting",
"create.recipe.blockzapper_upgrade": "Blockpistole",
"create.recipe.sandpaper_polishing": "UNLOCALIZED: Sandpaper Polishing",
"create.recipe.mystery_conversion": "UNLOCALIZED: Mysterious Conversion",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 892",
"_": "Missing Localizations: 893",
"_": "->------------------------] Game Elements [------------------------<-",
@ -685,6 +685,7 @@
"create.recipe.mechanical_crafting": "UNLOCALIZED: Mechanical Crafting",
"create.recipe.automatic_shaped": "UNLOCALIZED: Automated Shaped Crafting",
"create.recipe.block_cutting": "UNLOCALIZED: Block Cutting",
"create.recipe.wood_cutting": "UNLOCALIZED: Wood Cutting",
"create.recipe.blockzapper_upgrade": "UNLOCALIZED: Handheld Blockzapper",
"create.recipe.sandpaper_polishing": "UNLOCALIZED: Sandpaper Polishing",
"create.recipe.mystery_conversion": "UNLOCALIZED: Mysterious Conversion",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 672",
"_": "Missing Localizations: 673",
"_": "->------------------------] Game Elements [------------------------<-",
@ -685,6 +685,7 @@
"create.recipe.mechanical_crafting": "Fabrication mécanique",
"create.recipe.automatic_shaped": "UNLOCALIZED: Automated Shaped Crafting",
"create.recipe.block_cutting": "Coupe de bloc",
"create.recipe.wood_cutting": "UNLOCALIZED: Wood Cutting",
"create.recipe.blockzapper_upgrade": "Blockzappeur portable",
"create.recipe.sandpaper_polishing": "Polissage au papier de verre",
"create.recipe.mystery_conversion": "Métamorphose chromatique",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 7",
"_": "Missing Localizations: 8",
"_": "->------------------------] Game Elements [------------------------<-",
@ -685,6 +685,7 @@
"create.recipe.mechanical_crafting": "Costruzione meccanica",
"create.recipe.automatic_shaped": "Costruzione con forma automatizzata",
"create.recipe.block_cutting": "Taglio di blocchi",
"create.recipe.wood_cutting": "UNLOCALIZED: Wood Cutting",
"create.recipe.blockzapper_upgrade": "Zapper di blocchi portatile",
"create.recipe.sandpaper_polishing": "Levigamento da carta vetrata",
"create.recipe.mystery_conversion": "Metamorfosi cromatica",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 14",
"_": "Missing Localizations: 15",
"_": "->------------------------] Game Elements [------------------------<-",
@ -685,6 +685,7 @@
"create.recipe.mechanical_crafting": "メカニカルクラフト",
"create.recipe.automatic_shaped": "自動定形クラフト",
"create.recipe.block_cutting": "自動石切",
"create.recipe.wood_cutting": "UNLOCALIZED: Wood Cutting",
"create.recipe.blockzapper_upgrade": "携帯型ブロックザッパー",
"create.recipe.sandpaper_polishing": "紙やすりでの研磨",
"create.recipe.mystery_conversion": "色彩変態",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 61",
"_": "Missing Localizations: 62",
"_": "->------------------------] Game Elements [------------------------<-",
@ -685,6 +685,7 @@
"create.recipe.mechanical_crafting": "기계 조합",
"create.recipe.automatic_shaped": "유형 자동 조합",
"create.recipe.block_cutting": "블 절단",
"create.recipe.wood_cutting": "UNLOCALIZED: Wood Cutting",
"create.recipe.blockzapper_upgrade": "휴대용 블록발사기 업그레이드",
"create.recipe.sandpaper_polishing": "사포질",
"create.recipe.mystery_conversion": "?",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 1161",
"_": "Missing Localizations: 1162",
"_": "->------------------------] Game Elements [------------------------<-",
@ -685,6 +685,7 @@
"create.recipe.mechanical_crafting": "UNLOCALIZED: Mechanical Crafting",
"create.recipe.automatic_shaped": "UNLOCALIZED: Automated Shaped Crafting",
"create.recipe.block_cutting": "Blok Zagen",
"create.recipe.wood_cutting": "UNLOCALIZED: Wood Cutting",
"create.recipe.blockzapper_upgrade": "Blokzapper",
"create.recipe.sandpaper_polishing": "UNLOCALIZED: Sandpaper Polishing",
"create.recipe.mystery_conversion": "UNLOCALIZED: Mysterious Conversion",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 1227",
"_": "Missing Localizations: 1228",
"_": "->------------------------] Game Elements [------------------------<-",
@ -685,6 +685,7 @@
"create.recipe.mechanical_crafting": "UNLOCALIZED: Mechanical Crafting",
"create.recipe.automatic_shaped": "UNLOCALIZED: Automated Shaped Crafting",
"create.recipe.block_cutting": "UNLOCALIZED: Block Cutting",
"create.recipe.wood_cutting": "UNLOCALIZED: Wood Cutting",
"create.recipe.blockzapper_upgrade": "Blockzapper Portátil",
"create.recipe.sandpaper_polishing": "UNLOCALIZED: Sandpaper Polishing",
"create.recipe.mystery_conversion": "UNLOCALIZED: Mysterious Conversion",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 11",
"_": "Missing Localizations: 12",
"_": "->------------------------] Game Elements [------------------------<-",
@ -685,6 +685,7 @@
"create.recipe.mechanical_crafting": "Механическое создание",
"create.recipe.automatic_shaped": "Автоматическая форменная сборка",
"create.recipe.block_cutting": "Резка блока",
"create.recipe.wood_cutting": "UNLOCALIZED: Wood Cutting",
"create.recipe.blockzapper_upgrade": "Ручная блоковая пушка",
"create.recipe.sandpaper_polishing": "Полировка наждачной бумагой",
"create.recipe.mystery_conversion": "Хроматический метаморфоз",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 9",
"_": "Missing Localizations: 10",
"_": "->------------------------] Game Elements [------------------------<-",
@ -685,6 +685,7 @@
"create.recipe.mechanical_crafting": "自动合成",
"create.recipe.automatic_shaped": "自动合成",
"create.recipe.block_cutting": "方块切割",
"create.recipe.wood_cutting": "UNLOCALIZED: Wood Cutting",
"create.recipe.blockzapper_upgrade": "手持式方块放置器",
"create.recipe.sandpaper_polishing": "砂纸打磨",
"create.recipe.mystery_conversion": "神秘转化",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 14",
"_": "Missing Localizations: 15",
"_": "->------------------------] Game Elements [------------------------<-",
@ -685,6 +685,7 @@
"create.recipe.mechanical_crafting": "自動合成",
"create.recipe.automatic_shaped": "自動合成",
"create.recipe.block_cutting": "方塊切割",
"create.recipe.wood_cutting": "UNLOCALIZED: Wood Cutting",
"create.recipe.blockzapper_upgrade": "方塊放置器",
"create.recipe.sandpaper_polishing": "砂紙打磨",
"create.recipe.mystery_conversion": "神秘轉化",

View file

@ -17,7 +17,10 @@
},
"criteria": {
"0": {
"trigger": "create:infinite_chocolate"
"trigger": "create:infinite_fluid",
"conditions": {
"fluid": "create:chocolate"
}
}
},
"requirements": [

View file

@ -17,7 +17,10 @@
},
"criteria": {
"0": {
"trigger": "create:infinite_lava"
"trigger": "create:infinite_fluid",
"conditions": {
"fluid": "minecraft:lava"
}
}
},
"requirements": [

View file

@ -17,7 +17,10 @@
},
"criteria": {
"0": {
"trigger": "create:infinite_water"
"trigger": "create:infinite_fluid",
"conditions": {
"fluid": "minecraft:water"
}
}
},
"requirements": [

View file

@ -9,6 +9,7 @@ import java.util.Set;
import javax.annotation.Nullable;
import com.simibubi.create.AllFluids;
import com.simibubi.create.foundation.advancement.AllAdvancements;
import com.simibubi.create.foundation.advancement.AllTriggers;
import com.simibubi.create.foundation.fluid.FluidHelper;
import com.simibubi.create.foundation.tileEntity.SmartTileEntity;
@ -133,12 +134,16 @@ public class FluidDrainingBehaviour extends FluidManipulationBehaviour {
AllTriggers.triggerForNearbyPlayers(AllTriggers.HOSE_PULLEY, world, tileEntity.getPos(), 8);
if (infinite) {
Fluid stillFluid = FluidHelper.convertToStill(fluid);
AllTriggers.getPlayersInRange(world, tileEntity.getPos(), 8)
.forEach(p -> AllTriggers.INFINITE_FLUID.trigger(p, FluidHelper.convertToStill(stillFluid)));
/*
if (FluidHelper.isLava(fluid))
AllTriggers.triggerForNearbyPlayers(AllTriggers.INFINITE_LAVA, world, tileEntity.getPos(), 8);
if (FluidHelper.isWater(fluid))
AllTriggers.triggerForNearbyPlayers(AllTriggers.INFINITE_WATER, world, tileEntity.getPos(), 8);
if (fluid.isEquivalentTo(AllFluids.CHOCOLATE.get()))
AllTriggers.triggerForNearbyPlayers(AllTriggers.INFINITE_CHOCOLATE, world, tileEntity.getPos(), 8);
AllTriggers.triggerForNearbyPlayers(AllTriggers.INFINITE_CHOCOLATE, world, tileEntity.getPos(), 8);*/
return true;
}

View file

@ -6,6 +6,8 @@ import java.util.Set;
import java.util.function.Consumer;
import java.util.function.Supplier;
import net.minecraft.fluid.Fluid;
import net.minecraft.fluid.Fluids;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@ -293,17 +295,20 @@ public class AllAdvancements implements IDataProvider {
Advancement infinite_water =
advancement("infinite_water", Items.WATER_BUCKET, TaskType.NORMAL).withParent(hose_pulley)
.withCriterion("0", AllTriggers.INFINITE_WATER.instance())
// .withCriterion("0", AllTriggers.INFINITE_WATER.instance())
.withCriterion("0", isInfinite(Fluids.WATER.getFluid()))
.register(t, id + ":infinite_water");
Advancement infinite_lava =
advancement("infinite_lava", Items.LAVA_BUCKET, TaskType.GOAL).withParent(hose_pulley)
.withCriterion("0", AllTriggers.INFINITE_LAVA.instance())
// .withCriterion("0", AllTriggers.INFINITE_LAVA.instance())
.withCriterion("0", isInfinite(Fluids.LAVA.getFluid()))
.register(t, id + ":infinite_lava");
Advancement infinite_chocolate = advancement("infinite_chocolate", AllFluids.CHOCOLATE.get()
.getFilledBucket(), TaskType.CHALLENGE).withParent(hose_pulley)
.withCriterion("0", AllTriggers.INFINITE_CHOCOLATE.instance())
// .withCriterion("0", AllTriggers.INFINITE_CHOCOLATE.instance())
.withCriterion("0", isInfinite(AllFluids.CHOCOLATE.get().getFluid()))
.register(t, id + ":infinite_chocolate");
}
@ -497,6 +502,10 @@ public class AllAdvancements implements IDataProvider {
return AllTriggers.KINETIC_BLOCK.forBlock(block);
}
public CriterionTriggerBase.Instance isInfinite(Fluid fluid) {
return AllTriggers.INFINITE_FLUID.forFluid(fluid);
}
public InventoryChangeTrigger.Instance itemGathered(IItemProvider itemprovider) {
return InventoryChangeTrigger.Instance.forItems(itemprovider);
}

View file

@ -16,6 +16,7 @@ public class AllTriggers {
private static List<CriterionTriggerBase<?>> triggers = new LinkedList<>();
public static KineticBlockTrigger KINETIC_BLOCK = add(new KineticBlockTrigger("kinetic_block"));
public static InfiniteFluidTrigger INFINITE_FLUID = add(new InfiniteFluidTrigger("infinite_fluid"));
public static SimpleTrigger
ROTATION = simple("rotation"),

View file

@ -0,0 +1,80 @@
package com.simibubi.create.foundation.advancement;
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonSyntaxException;
import com.simibubi.create.Create;
import com.simibubi.create.foundation.fluid.FluidHelper;
import mcp.MethodsReturnNonnullByDefault;
import net.minecraft.entity.player.ServerPlayerEntity;
import net.minecraft.fluid.Fluid;
import net.minecraft.util.JSONUtils;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.registries.ForgeRegistries;
import javax.annotation.Nullable;
import javax.annotation.ParametersAreNonnullByDefault;
import java.util.Collections;
import java.util.List;
import java.util.function.Supplier;
@MethodsReturnNonnullByDefault
@ParametersAreNonnullByDefault
public class InfiniteFluidTrigger extends CriterionTriggerBase<InfiniteFluidTrigger.Instance> {
private static final ResourceLocation ID = new ResourceLocation(Create.ID, "infinite_fluid");
public InfiniteFluidTrigger(String id) {
super(id);
}
public Instance forFluid(Fluid fluid) {
return new Instance(fluid);
}
@Override
public Instance deserializeInstance(JsonObject json, JsonDeserializationContext context) {
Fluid fluid = null;
if (json.has("fluid")) {
ResourceLocation resourcelocation = new ResourceLocation(JSONUtils.getString(json, "fluid"));
fluid = ForgeRegistries.FLUIDS.getValue(resourcelocation);
if (fluid == null)
throw new JsonSyntaxException("Unknown fluid type '" + resourcelocation + "'");
}
return new Instance(fluid);
}
public void trigger(ServerPlayerEntity player, Fluid fluid) {
trigger(player, Collections.singletonList(() -> fluid));
}
public static class Instance extends CriterionTriggerBase.Instance {
private final Fluid fluid;
public Instance(@Nullable Fluid fluid) {
super(InfiniteFluidTrigger.ID);
this.fluid = FluidHelper.convertToStill(fluid);
}
@Override
protected boolean test(List<Supplier<Object>> suppliers) {
if (fluid == null || suppliers.isEmpty())
return false;
return fluid.equals(suppliers.get(0).get());
}
@Override
public JsonElement serialize() {
JsonObject jsonobject = new JsonObject();
ResourceLocation key = ForgeRegistries.FLUIDS.getKey(this.fluid);
if (key != null)
jsonobject.addProperty("fluid", key.toString());
return jsonobject;
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB