From 28cd9a1fe184be8e713b2d37000dd14713d32367 Mon Sep 17 00:00:00 2001 From: grimmauld Date: Wed, 20 Jan 2021 22:36:04 +0100 Subject: [PATCH] Druidcraft woodcutter compatibility --- build.gradle | 5 + gradle.properties | 2 +- src/generated/resources/.cache/cache | 24 +-- .../assets/create/blockstates/fluid_pipe.json | 190 +++++++++--------- .../create/blockstates/radial_chassis.json | 24 +-- .../resources/assets/create/lang/en_us.json | 1 + .../assets/create/lang/unfinished/de_de.json | 3 +- .../assets/create/lang/unfinished/fr_fr.json | 3 +- .../assets/create/lang/unfinished/it_it.json | 3 +- .../assets/create/lang/unfinished/ja_jp.json | 3 +- .../assets/create/lang/unfinished/ko_kr.json | 3 +- .../assets/create/lang/unfinished/nl_nl.json | 3 +- .../assets/create/lang/unfinished/pt_br.json | 3 +- .../assets/create/lang/unfinished/ru_ru.json | 3 +- .../assets/create/lang/unfinished/zh_cn.json | 3 +- .../simibubi/create/compat/jei/CreateJEI.java | 20 +- .../jei/category/BlockCuttingCategory.java | 5 +- .../components/saw/SawTileEntity.java | 28 ++- .../create/foundation/config/CRecipes.java | 3 + .../utility/recipe/RecipeConditions.java | 7 +- .../assets/create/lang/default/messages.json | 1 + 21 files changed, 195 insertions(+), 142 deletions(-) diff --git a/build.gradle b/build.gradle index b8cf8d5e0..07408da84 100644 --- a/build.gradle +++ b/build.gradle @@ -98,6 +98,9 @@ repositories { name = "tterrag maven" url = "https://maven.tterrag.com/" } + maven { + url = "https://www.cursemaven.com" + } } configurations { @@ -116,6 +119,8 @@ dependencies { // at runtime, use the full JEI jar runtimeOnly fg.deobf("mezz.jei:jei-${minecraft_version}:${jei_version}") + // implementation fg.deobf("curse.maven:druidcraft-340991:3101903") + // i'll leave this here commented for easier testing //runtimeOnly fg.deobf("vazkii.arl:AutoRegLib:1.4-35.69") //runtimeOnly fg.deobf("vazkii.quark:Quark:r2.0-212.984") diff --git a/gradle.properties b/gradle.properties index 999263025..97aaf8aa0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,7 +6,7 @@ org.gradle.daemon=false # mod version info mod_version=0.3e minecraft_version=1.15.2 -forge_version=31.2.31 +forge_version=31.2.47 # dependency versions registrate_version=1.0.0-rc.17 diff --git a/src/generated/resources/.cache/cache b/src/generated/resources/.cache/cache index bf2b276ce..b84f93444 100644 --- a/src/generated/resources/.cache/cache +++ b/src/generated/resources/.cache/cache @@ -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 -4c3e0500f9382d2e426e823fe876f57f4d7ee3b4 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 @@ -335,7 +335,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 -89b63c6e5875da07226854651079bcea85439f5b 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 @@ -398,16 +398,16 @@ a3a11524cd3515fc01d905767b4b7ea782adaf03 assets/create/blockstates/yellow_seat.j 7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json f11f6bc6d9284f3b995e5d250745d0a1194bc695 assets/create/lang/en_ud.json -c7ce8fb0347cc524b4497a2c251122744d66c867 assets/create/lang/en_us.json -0ded0dcda370475b7e5398da8b18a0854a4465bb assets/create/lang/unfinished/de_de.json -3b023d30bf50b7b81be0394aab9f564d54ffc1b5 assets/create/lang/unfinished/fr_fr.json -9186e35869c87606b15057e854796f3556bf8a9b assets/create/lang/unfinished/it_it.json -9abc5a7129adfcb2492b7ba10afc64d77df4397e assets/create/lang/unfinished/ja_jp.json -3e2dc7dbc703826c87efe2c340c41a14c9c400c8 assets/create/lang/unfinished/ko_kr.json -26c3e64daddecf240ace2567d79a65e93c9c960f assets/create/lang/unfinished/nl_nl.json -76f2feec509e87e0819db706b344e7e87e7b4b99 assets/create/lang/unfinished/pt_br.json -079f2c1699d4b7280e028acb51d4b6a7eca10a03 assets/create/lang/unfinished/ru_ru.json -289f948c1f44a58fd454b356a6141561e5dcf024 assets/create/lang/unfinished/zh_cn.json +59dd1d0c9c0f412f581c699f0bf592fcf348759a assets/create/lang/en_us.json +b7e4fc8328d3aa4ec53be9bb43c23c47100eeafc assets/create/lang/unfinished/de_de.json +7ceceb887b54180d28226e30b8b0b1275467e184 assets/create/lang/unfinished/fr_fr.json +9e5e930062edbfcdeaaeeb12578a07fe6bcd0e81 assets/create/lang/unfinished/it_it.json +8166a89d96a366dfd702e166b60df7e36a76a120 assets/create/lang/unfinished/ja_jp.json +6d1a54f08518bbf76f409b19d8f51c67cdfff4d5 assets/create/lang/unfinished/ko_kr.json +e95942103c0ad4530dd7a919a4a3baeb66f47f51 assets/create/lang/unfinished/nl_nl.json +44f9d40e0b762f5a83e8b7e02edc09cc2e29e8ab assets/create/lang/unfinished/pt_br.json +7e2c09dc9dde79c98f3e7726cee803f795cfa63c assets/create/lang/unfinished/ru_ru.json +d8207dfebabd2985b3d60c9222e7682cefaafdcb assets/create/lang/unfinished/zh_cn.json 846200eb548d3bfa2e77b41039de159b4b6cfb45 assets/create/models/block/acacia_window.json 1930fa3a3c98d53dd19e4ee7f55bc27fd47aa281 assets/create/models/block/acacia_window_pane_noside.json 1763ea2c9b981d187f5031ba608f3d5d3be3986a assets/create/models/block/acacia_window_pane_noside_alt.json diff --git a/src/generated/resources/assets/create/blockstates/fluid_pipe.json b/src/generated/resources/assets/create/blockstates/fluid_pipe.json index 581373307..a4cffcde7 100644 --- a/src/generated/resources/assets/create/blockstates/fluid_pipe.json +++ b/src/generated/resources/assets/create/blockstates/fluid_pipe.json @@ -60,10 +60,10 @@ }, { "when": { - "south": "false", - "up": "true", "down": "false", - "north": "true" + "north": "true", + "up": "true", + "south": "false" }, "apply": { "model": "create:block/fluid_pipe/lu_x" @@ -71,10 +71,10 @@ }, { "when": { - "south": "true", - "up": "true", "down": "false", - "north": "false" + "north": "false", + "up": "true", + "south": "true" }, "apply": { "model": "create:block/fluid_pipe/ru_x" @@ -82,10 +82,10 @@ }, { "when": { - "south": "false", - "up": "false", "down": "true", - "north": "true" + "north": "true", + "up": "false", + "south": "false" }, "apply": { "model": "create:block/fluid_pipe/ld_x" @@ -93,10 +93,10 @@ }, { "when": { - "south": "true", - "up": "false", "down": "true", - "north": "false" + "north": "false", + "up": "false", + "south": "true" }, "apply": { "model": "create:block/fluid_pipe/rd_x" @@ -104,21 +104,21 @@ }, { "when": { - "south": "false", - "up": "true", "down": "true", - "north": "false" - }, - "apply": { - "model": "create:block/fluid_pipe/ud_x" - } - }, - { - "when": { - "south": "false", + "north": "false", "up": "true", - "down": "false", - "north": "false" + "south": "false" + }, + "apply": { + "model": "create:block/fluid_pipe/ud_x" + } + }, + { + "when": { + "down": "false", + "north": "false", + "up": "true", + "south": "false" }, "apply": { "model": "create:block/fluid_pipe/ud_x" @@ -126,10 +126,10 @@ }, { "when": { - "south": "false", - "up": "false", "down": "true", - "north": "false" + "north": "false", + "up": "false", + "south": "false" }, "apply": { "model": "create:block/fluid_pipe/ud_x" @@ -137,10 +137,10 @@ }, { "when": { - "south": "true", - "up": "false", "down": "false", - "north": "true" + "north": "true", + "up": "false", + "south": "true" }, "apply": { "model": "create:block/fluid_pipe/lr_x" @@ -148,10 +148,10 @@ }, { "when": { - "south": "false", - "up": "false", "down": "false", - "north": "true" + "north": "true", + "up": "false", + "south": "false" }, "apply": { "model": "create:block/fluid_pipe/lr_x" @@ -159,10 +159,10 @@ }, { "when": { - "south": "true", - "up": "false", "down": "false", - "north": "false" + "north": "false", + "up": "false", + "south": "true" }, "apply": { "model": "create:block/fluid_pipe/lr_x" @@ -170,10 +170,10 @@ }, { "when": { - "south": "false", - "up": "false", "down": "false", - "north": "false" + "north": "false", + "up": "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": { - "up": "true", - "down": "false", "west": "false", - "east": "true" + "down": "false", + "east": "true", + "up": "true" }, "apply": { "model": "create:block/fluid_pipe/lu_z" @@ -313,10 +313,10 @@ }, { "when": { - "up": "true", - "down": "false", "west": "true", - "east": "false" + "down": "false", + "east": "false", + "up": "true" }, "apply": { "model": "create:block/fluid_pipe/ru_z" @@ -324,10 +324,10 @@ }, { "when": { - "up": "false", - "down": "true", "west": "false", - "east": "true" + "down": "true", + "east": "true", + "up": "false" }, "apply": { "model": "create:block/fluid_pipe/ld_z" @@ -335,10 +335,10 @@ }, { "when": { - "up": "false", - "down": "true", "west": "true", - "east": "false" + "down": "true", + "east": "false", + "up": "false" }, "apply": { "model": "create:block/fluid_pipe/rd_z" @@ -346,10 +346,10 @@ }, { "when": { - "up": "true", + "west": "false", "down": "true", - "west": "false", - "east": "false" + "east": "false", + "up": "true" }, "apply": { "model": "create:block/fluid_pipe/ud_z" @@ -357,10 +357,10 @@ }, { "when": { - "up": "true", + "west": "false", "down": "false", - "west": "false", - "east": "false" + "east": "false", + "up": "true" }, "apply": { "model": "create:block/fluid_pipe/ud_z" @@ -368,10 +368,10 @@ }, { "when": { - "up": "false", + "west": "false", "down": "true", - "west": "false", - "east": "false" + "east": "false", + "up": "false" }, "apply": { "model": "create:block/fluid_pipe/ud_z" @@ -379,10 +379,10 @@ }, { "when": { - "up": "false", - "down": "false", "west": "true", - "east": "true" + "down": "false", + "east": "true", + "up": "false" }, "apply": { "model": "create:block/fluid_pipe/lr_z" @@ -390,10 +390,10 @@ }, { "when": { - "up": "false", - "down": "false", "west": "false", - "east": "true" + "down": "false", + "east": "true", + "up": "false" }, "apply": { "model": "create:block/fluid_pipe/lr_z" @@ -401,10 +401,10 @@ }, { "when": { - "up": "false", - "down": "false", "west": "true", - "east": "false" + "down": "false", + "east": "false", + "up": "false" }, "apply": { "model": "create:block/fluid_pipe/lr_z" @@ -412,10 +412,10 @@ }, { "when": { - "up": "false", - "down": "false", "west": "false", - "east": "false" + "down": "false", + "east": "false", + "up": "false" }, "apply": { "model": "create:block/fluid_pipe/none_z" diff --git a/src/generated/resources/assets/create/blockstates/radial_chassis.json b/src/generated/resources/assets/create/blockstates/radial_chassis.json index d60327a8a..9d00ea8b1 100644 --- a/src/generated/resources/assets/create/blockstates/radial_chassis.json +++ b/src/generated/resources/assets/create/blockstates/radial_chassis.json @@ -149,8 +149,8 @@ }, { "when": { - "axis": "x", - "sticky_north": "true" + "sticky_north": "true", + "axis": "x" }, "apply": { "model": "create:block/radial_chassis_side_x_sticky" @@ -158,8 +158,8 @@ }, { "when": { - "axis": "y", - "sticky_north": "true" + "sticky_north": "true", + "axis": "y" }, "apply": { "model": "create:block/radial_chassis_side_y_sticky", @@ -168,8 +168,8 @@ }, { "when": { - "axis": "z", - "sticky_north": "true" + "sticky_north": "true", + "axis": "z" }, "apply": { "model": "create:block/radial_chassis_side_x_sticky", @@ -178,8 +178,8 @@ }, { "when": { - "axis": "x", - "sticky_north": "false" + "sticky_north": "false", + "axis": "x" }, "apply": { "model": "create:block/radial_chassis_side_x" @@ -187,8 +187,8 @@ }, { "when": { - "axis": "y", - "sticky_north": "false" + "sticky_north": "false", + "axis": "y" }, "apply": { "model": "create:block/radial_chassis_side_y", @@ -197,8 +197,8 @@ }, { "when": { - "axis": "z", - "sticky_north": "false" + "sticky_north": "false", + "axis": "z" }, "apply": { "model": "create:block/radial_chassis_side_x", diff --git a/src/generated/resources/assets/create/lang/en_us.json b/src/generated/resources/assets/create/lang/en_us.json index d1f8a8f5c..55b11711d 100644 --- a/src/generated/resources/assets/create/lang/en_us.json +++ b/src/generated/resources/assets/create/lang/en_us.json @@ -680,6 +680,7 @@ "create.recipe.mechanical_crafting": "Mechanical Crafting", "create.recipe.automatic_shaped": "Automated Shaped Crafting", "create.recipe.block_cutting": "Block Cutting", + "create.recipe.wood_cutting": "Wood Cutting", "create.recipe.blockzapper_upgrade": "Handheld Blockzapper", "create.recipe.sandpaper_polishing": "Sandpaper Polishing", "create.recipe.mystery_conversion": "Mysterious Conversion", diff --git a/src/generated/resources/assets/create/lang/unfinished/de_de.json b/src/generated/resources/assets/create/lang/unfinished/de_de.json index b2d1bed88..796a6e81a 100644 --- a/src/generated/resources/assets/create/lang/unfinished/de_de.json +++ b/src/generated/resources/assets/create/lang/unfinished/de_de.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 1209", + "_": "Missing Localizations: 1210", "_": "->------------------------] Game Elements [------------------------<-", @@ -681,6 +681,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", diff --git a/src/generated/resources/assets/create/lang/unfinished/fr_fr.json b/src/generated/resources/assets/create/lang/unfinished/fr_fr.json index afb011613..6ca43aaf8 100644 --- a/src/generated/resources/assets/create/lang/unfinished/fr_fr.json +++ b/src/generated/resources/assets/create/lang/unfinished/fr_fr.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 860", + "_": "Missing Localizations: 861", "_": "->------------------------] Game Elements [------------------------<-", @@ -681,6 +681,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", diff --git a/src/generated/resources/assets/create/lang/unfinished/it_it.json b/src/generated/resources/assets/create/lang/unfinished/it_it.json index 591f1afdd..eac6238ac 100644 --- a/src/generated/resources/assets/create/lang/unfinished/it_it.json +++ b/src/generated/resources/assets/create/lang/unfinished/it_it.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 844", + "_": "Missing Localizations: 845", "_": "->------------------------] Game Elements [------------------------<-", @@ -681,6 +681,7 @@ "create.recipe.mechanical_crafting": "Creazione Meccanico", "create.recipe.automatic_shaped": "UNLOCALIZED: Automated Shaped Crafting", "create.recipe.block_cutting": "Taglio Blocco", + "create.recipe.wood_cutting": "UNLOCALIZED: Wood Cutting", "create.recipe.blockzapper_upgrade": "UNLOCALIZED: Handheld Blockzapper", "create.recipe.sandpaper_polishing": "Carta Vetrata Levigata", "create.recipe.mystery_conversion": "Metamorfosi Cromatica", diff --git a/src/generated/resources/assets/create/lang/unfinished/ja_jp.json b/src/generated/resources/assets/create/lang/unfinished/ja_jp.json index 5ac5cf4a5..a93b0045b 100644 --- a/src/generated/resources/assets/create/lang/unfinished/ja_jp.json +++ b/src/generated/resources/assets/create/lang/unfinished/ja_jp.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 843", + "_": "Missing Localizations: 844", "_": "->------------------------] Game Elements [------------------------<-", @@ -681,6 +681,7 @@ "create.recipe.mechanical_crafting": "メカニカルクラフト", "create.recipe.automatic_shaped": "UNLOCALIZED: Automated Shaped Crafting", "create.recipe.block_cutting": "ブロックカット", + "create.recipe.wood_cutting": "UNLOCALIZED: Wood Cutting", "create.recipe.blockzapper_upgrade": "携帯型ブロックザッパー", "create.recipe.sandpaper_polishing": "紙やすりでの研磨", "create.recipe.mystery_conversion": "色彩変態", diff --git a/src/generated/resources/assets/create/lang/unfinished/ko_kr.json b/src/generated/resources/assets/create/lang/unfinished/ko_kr.json index 6443f3e32..de866f2ad 100644 --- a/src/generated/resources/assets/create/lang/unfinished/ko_kr.json +++ b/src/generated/resources/assets/create/lang/unfinished/ko_kr.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 50", + "_": "Missing Localizations: 51", "_": "->------------------------] Game Elements [------------------------<-", @@ -681,6 +681,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": "?", diff --git a/src/generated/resources/assets/create/lang/unfinished/nl_nl.json b/src/generated/resources/assets/create/lang/unfinished/nl_nl.json index 91e3aff32..44b05e2ff 100644 --- a/src/generated/resources/assets/create/lang/unfinished/nl_nl.json +++ b/src/generated/resources/assets/create/lang/unfinished/nl_nl.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 1150", + "_": "Missing Localizations: 1151", "_": "->------------------------] Game Elements [------------------------<-", @@ -681,6 +681,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", diff --git a/src/generated/resources/assets/create/lang/unfinished/pt_br.json b/src/generated/resources/assets/create/lang/unfinished/pt_br.json index 78bdb93c7..260acf9c5 100644 --- a/src/generated/resources/assets/create/lang/unfinished/pt_br.json +++ b/src/generated/resources/assets/create/lang/unfinished/pt_br.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 1216", + "_": "Missing Localizations: 1217", "_": "->------------------------] Game Elements [------------------------<-", @@ -681,6 +681,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", diff --git a/src/generated/resources/assets/create/lang/unfinished/ru_ru.json b/src/generated/resources/assets/create/lang/unfinished/ru_ru.json index 1ec2115ee..46eb0c3e9 100644 --- a/src/generated/resources/assets/create/lang/unfinished/ru_ru.json +++ b/src/generated/resources/assets/create/lang/unfinished/ru_ru.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 0", + "_": "Missing Localizations: 1", "_": "->------------------------] Game Elements [------------------------<-", @@ -681,6 +681,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": "Хроматический метаморфоз", diff --git a/src/generated/resources/assets/create/lang/unfinished/zh_cn.json b/src/generated/resources/assets/create/lang/unfinished/zh_cn.json index 31e6354ff..dcba9794b 100644 --- a/src/generated/resources/assets/create/lang/unfinished/zh_cn.json +++ b/src/generated/resources/assets/create/lang/unfinished/zh_cn.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 3", + "_": "Missing Localizations: 4", "_": "->------------------------] Game Elements [------------------------<-", @@ -681,6 +681,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": "神秘转化", diff --git a/src/main/java/com/simibubi/create/compat/jei/CreateJEI.java b/src/main/java/com/simibubi/create/compat/jei/CreateJEI.java index 5cb215a61..de757db48 100644 --- a/src/main/java/com/simibubi/create/compat/jei/CreateJEI.java +++ b/src/main/java/com/simibubi/create/compat/jei/CreateJEI.java @@ -35,6 +35,7 @@ import com.simibubi.create.compat.jei.category.ProcessingViaFanCategory; import com.simibubi.create.compat.jei.category.SawingCategory; import com.simibubi.create.compat.jei.category.SpoutCategory; import com.simibubi.create.content.contraptions.components.press.MechanicalPressTileEntity; +import com.simibubi.create.content.contraptions.components.saw.SawTileEntity; import com.simibubi.create.content.contraptions.fluids.recipe.PotionMixingRecipeManager; import com.simibubi.create.content.contraptions.processing.BasinRecipe; import com.simibubi.create.content.logistics.block.inventories.AdjustableCrateScreen; @@ -54,6 +55,7 @@ import mezz.jei.api.registration.ISubtypeRegistration; import mezz.jei.api.runtime.IIngredientManager; import net.minecraft.client.Minecraft; import net.minecraft.item.ItemStack; +import net.minecraft.item.Items; import net.minecraft.item.crafting.ICraftingRecipe; import net.minecraft.item.crafting.IRecipe; import net.minecraft.item.crafting.IRecipeSerializer; @@ -61,8 +63,10 @@ import net.minecraft.item.crafting.IRecipeType; import net.minecraft.item.crafting.ShapedRecipe; import net.minecraft.util.IItemProvider; import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.ModList; @JeiPlugin +@SuppressWarnings("unused") public class CreateJEI implements IModPlugin { private static final ResourceLocation ID = new ResourceLocation(Create.ID, "jei_plugin"); @@ -132,12 +136,18 @@ public class CreateJEI implements IModPlugin { .catalyst(AllBlocks.MECHANICAL_SAW::get) .build(), - blockCutting = register("block_cutting", BlockCuttingCategory::new) + blockCutting = register("block_cutting", () -> new BlockCuttingCategory(Items.STONE_BRICK_STAIRS)) .recipeList(() -> CondensedBlockCuttingRecipe.condenseRecipes(findRecipesByType(IRecipeType.STONECUTTING))) .catalyst(AllBlocks.MECHANICAL_SAW::get) .enableWhen(c -> c.allowStonecuttingOnSaw) .build(), + woodCutting = register("wood_cutting", () -> new BlockCuttingCategory(Items.OAK_STAIRS)) + .recipeList(() -> CondensedBlockCuttingRecipe.condenseRecipes(findRecipesByType(SawTileEntity.woodcuttingRecipeType.getValue()))) + .catalyst(AllBlocks.MECHANICAL_SAW::get) + .enableWhenBool(c -> c.allowWoodcuttingOnSaw.get() && ModList.get().isLoaded("druidcraft")) + .build(), + packing = register("packing", PackingCategory::standard).recipes(AllRecipeTypes.COMPACTING) .catalyst(AllBlocks.MECHANICAL_PRESS::get) .catalyst(AllBlocks.BASIN::get) @@ -293,8 +303,12 @@ public class CreateJEI implements IModPlugin { CategoryBuilder enableWhen(Function configValue) { this.pred = c -> configValue.apply(c) - .get() - .booleanValue(); + .get(); + return this; + } + + CategoryBuilder enableWhenBool(Function configValue) { + this.pred = configValue::apply; return this; } diff --git a/src/main/java/com/simibubi/create/compat/jei/category/BlockCuttingCategory.java b/src/main/java/com/simibubi/create/compat/jei/category/BlockCuttingCategory.java index 86806e554..8f00ae553 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/BlockCuttingCategory.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/BlockCuttingCategory.java @@ -14,6 +14,7 @@ import mezz.jei.api.constants.VanillaTypes; import mezz.jei.api.gui.IRecipeLayout; import mezz.jei.api.gui.ingredient.IGuiItemStackGroup; import mezz.jei.api.ingredients.IIngredients; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.Items; import net.minecraft.item.crafting.IRecipe; @@ -25,8 +26,8 @@ public class BlockCuttingCategory extends CreateRecipeCategory> woodcuttingRecipeType = new LazyValue<>(() -> Registry.RECIPE_TYPE.getOrDefault(new ResourceLocation("druidcraft", "woodcutting"))); public ProcessingInventory inventory; private int recipeIndex; - private LazyOptional invProvider = LazyOptional.empty(); + private final LazyOptional invProvider; private FilteringBehaviour filtering; public SawTileEntity(TileEntityType type) { @@ -251,7 +261,7 @@ public class SawTileEntity extends BlockBreakingKineticTileEntity { List results = new LinkedList(); if (recipe instanceof CuttingRecipe) results = ((CuttingRecipe) recipe).rollResults(); - else if (recipe instanceof StonecuttingRecipe) + else if (recipe instanceof StonecuttingRecipe || recipe.getType() == woodcuttingRecipeType.getValue()) results.add(recipe.getRecipeOutput() .copy()); @@ -266,10 +276,20 @@ public class SawTileEntity extends BlockBreakingKineticTileEntity { } private List> getRecipes() { + /* Predicate> types = AllConfigs.SERVER.recipes.allowStonecuttingOnSaw.get() ? RecipeConditions.isOfType(IRecipeType.STONECUTTING, AllRecipeTypes.CUTTING.getType()) : RecipeConditions.isOfType(AllRecipeTypes.CUTTING.getType()); - List> startedSearch = RecipeFinder.get(cuttingRecipesKey, world, types); + + */ + + Predicate> types = RecipeConditions.isOfType( + AllRecipeTypes.CUTTING.getType(), + AllConfigs.SERVER.recipes.allowStonecuttingOnSaw.get() ? IRecipeType.STONECUTTING : null, + AllConfigs.SERVER.recipes.allowWoodcuttingOnSaw.get() ? woodcuttingRecipeType.getValue() : null + ); + + List> startedSearch = RecipeFinder.get(cuttingRecipesKey, world, types); return startedSearch.stream() .filter(RecipeConditions.outputMatchesFilter(filtering)) .filter(RecipeConditions.firstIngredientMatches(inventory.getStackInSlot(0))) diff --git a/src/main/java/com/simibubi/create/foundation/config/CRecipes.java b/src/main/java/com/simibubi/create/foundation/config/CRecipes.java index 2f5ebcd65..e042c4f85 100644 --- a/src/main/java/com/simibubi/create/foundation/config/CRecipes.java +++ b/src/main/java/com/simibubi/create/foundation/config/CRecipes.java @@ -7,6 +7,7 @@ public class CRecipes extends ConfigBase { public ConfigBool allowRegularCraftingInCrafter = b(true, "allowRegularCraftingInCrafter", Comments.allowRegularCraftingInCrafter); public ConfigBool allowStonecuttingOnSaw = b(true, "allowStonecuttingOnSaw", Comments.allowStonecuttingOnSaw); + public ConfigBool allowWoodcuttingOnSaw = b(true, "allowWoodcuttingOnSaw", Comments.allowWoodcuttingOnSaw); public ConfigInt lightSourceCountForRefinedRadiance = i(10, 1, "lightSourceCountForRefinedRadiance", Comments.refinedRadiance); public ConfigBool enableRefinedRadianceRecipe = @@ -27,6 +28,8 @@ public class CRecipes extends ConfigBase { "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."; + static String allowWoodcuttingOnSaw = + "When true, allows any Druidcraft woodcutter recipes to be processed by a Mechanical Saw."; static String refinedRadiance = "The amount of Light sources destroyed before Chromatic Compound turns into Refined Radiance."; static String refinedRadianceRecipe = "Allow the standard in-world Refined Radiance recipes."; diff --git a/src/main/java/com/simibubi/create/foundation/utility/recipe/RecipeConditions.java b/src/main/java/com/simibubi/create/foundation/utility/recipe/RecipeConditions.java index adc080537..cc96987e7 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/recipe/RecipeConditions.java +++ b/src/main/java/com/simibubi/create/foundation/utility/recipe/RecipeConditions.java @@ -1,12 +1,13 @@ package com.simibubi.create.foundation.utility.recipe; -import com.google.common.base.Predicate; import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringBehaviour; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.IRecipe; import net.minecraft.item.crafting.IRecipeType; +import java.util.function.Predicate; + /** * Commonly used Predicates for searching through recipe collections. * @@ -15,11 +16,9 @@ import net.minecraft.item.crafting.IRecipeType; */ public class RecipeConditions { - public static Predicate> isOfType(IRecipeType type, IRecipeType... otherTypes) { + public static Predicate> isOfType(IRecipeType... otherTypes) { return recipe -> { IRecipeType recipeType = recipe.getType(); - if (recipeType == type) - return true; for (IRecipeType other : otherTypes) if (recipeType == other) return true; diff --git a/src/main/resources/assets/create/lang/default/messages.json b/src/main/resources/assets/create/lang/default/messages.json index 33fa8d770..59999f0d3 100644 --- a/src/main/resources/assets/create/lang/default/messages.json +++ b/src/main/resources/assets/create/lang/default/messages.json @@ -30,6 +30,7 @@ "create.recipe.mechanical_crafting": "Mechanical Crafting", "create.recipe.automatic_shaped": "Automated Shaped Crafting", "create.recipe.block_cutting": "Block Cutting", + "create.recipe.wood_cutting": "Wood Cutting", "create.recipe.blockzapper_upgrade": "Handheld Blockzapper", "create.recipe.sandpaper_polishing": "Sandpaper Polishing", "create.recipe.mystery_conversion": "Mysterious Conversion",