diff --git a/common/build.gradle b/common/build.gradle index a944f13..5efb7d6 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -20,33 +20,37 @@ dependencies { modCompileOnly "dev.emi:emi-xplat-intermediary:${rootProject.emi_version}+${rootProject.minecraft_version}:api" // Fabric - modImplementation "curse.maven:lets-do-vinery-704465:5504122" + modImplementation "curse.maven:lets-do-vinery-704465:5992485" modImplementation "curse.maven:lets-do-bakery-886559:5528401" modImplementation "curse.maven:lets-do-meadow-821483:5504104" - modImplementation "curse.maven:lets-do-nethervinery-930072:5467443" + modImplementation "curse.maven:lets-do-nethervinery-930072:5987943" modImplementation "curse.maven:lets-do-candlelight-846962:5427654" modImplementation "curse.maven:lets-do-brewery-971636:5427505" modImplementation "curse.maven:lets-do-herbal-brews-951221:5400096" modImplementation "curse.maven:lets-do-beachparty-858691:5320667" - modImplementation "curse.maven:lets-do-farm-charm-1038103:5652313" - modImplementation "curse.maven:lets-do-bakery-farm-charm-compat-1038130:5652332" + modImplementation "curse.maven:lets-do-farm-charm-1038103:5824226" + modImplementation "curse.maven:lets-do-bakery-farm-charm-compat-1038130:5824485" modImplementation "curse.maven:lets-do-candlelight-farm-charm-compat-1038117:5652319" modImplementation "curse.maven:lets-do-brewery-farm-charm-compat-1038106:5652316" + modImplementation "curse.maven:lets-do-furniture-1062363:5988123" + modImplementation "curse.maven:lets-do-camping-1072398:5823924" // Forge - modImplementation "curse.maven:lets-do-vinery-704465:5504123" + modImplementation "curse.maven:lets-do-vinery-704465:5992486" modImplementation "curse.maven:lets-do-bakery-886559:5528402" modImplementation "curse.maven:lets-do-meadow-821483:5504102" - modImplementation "curse.maven:lets-do-nethervinery-930072:5467444" + modImplementation "curse.maven:lets-do-nethervinery-930072:5987940" modImplementation "curse.maven:lets-do-candlelight-846962:5427646" modImplementation "curse.maven:lets-do-brewery-971636:5427504" modImplementation "curse.maven:lets-do-herbal-brews-951221:5397666" modImplementation "curse.maven:lets-do-beachparty-858691:5320668" - modImplementation "curse.maven:lets-do-farm-charm-1038103:5652312" - modImplementation "curse.maven:lets-do-bakery-farm-charm-compat-1038130:5652331" + modImplementation "curse.maven:lets-do-farm-charm-1038103:5824225" + modImplementation "curse.maven:lets-do-bakery-farm-charm-compat-1038130:5824482" modImplementation "curse.maven:lets-do-candlelight-farm-charm-compat-1038117:5652318" modImplementation "curse.maven:lets-do-brewery-farm-charm-compat-1038106:5652315" + modImplementation "curse.maven:lets-do-furniture-1062363:5988125" + modImplementation "curse.maven:lets-do-camping-1072398:5823939" } publishing { diff --git a/common/src/main/java/com/pandaismyname1/emiletsdocompat/Emi_letsdo_compat.java b/common/src/main/java/com/pandaismyname1/emiletsdocompat/Emi_letsdo_compat.java index c7f9f32..b8a4e4d 100644 --- a/common/src/main/java/com/pandaismyname1/emiletsdocompat/Emi_letsdo_compat.java +++ b/common/src/main/java/com/pandaismyname1/emiletsdocompat/Emi_letsdo_compat.java @@ -68,7 +68,7 @@ public void register(EmiRegistry registry) { } try { - Class.forName("net.satisfy.vinery.Vinery"); + Class.forName("net.satisfy.vinery.core.Vinery"); new com.pandaismyname1.emiletsdocompat.vinery.VineryCompat().init(registry, manager); } catch (ClassNotFoundException | NoSuchFieldException | NoSuchFieldError e) { // Vinery not found diff --git a/common/src/main/java/com/pandaismyname1/emiletsdocompat/herbalbrews/HerbalbrewsCompat.java b/common/src/main/java/com/pandaismyname1/emiletsdocompat/herbalbrews/HerbalbrewsCompat.java index a2b8546..106df72 100644 --- a/common/src/main/java/com/pandaismyname1/emiletsdocompat/herbalbrews/HerbalbrewsCompat.java +++ b/common/src/main/java/com/pandaismyname1/emiletsdocompat/herbalbrews/HerbalbrewsCompat.java @@ -34,7 +34,8 @@ public void init(EmiRegistry registry, RecipeManager manager) throws NoSuchField registry.addRecipe(new TeaKettleBrewingRecipe(recipeCategory, (satisfy.herbalbrews.recipe.TeaKettleRecipe) recipe)); }, satisfy.herbalbrews.registry.RecipeTypeRegistry.TEA_KETTLE_RECIPE_TYPE.get(), - EmiStack.of(ObjectRegistry.TEA_KETTLE.get())); + EmiStack.of(ObjectRegistry.TEA_KETTLE.get()), + EmiStack.of(ObjectRegistry.COPPER_TEA_KETTLE.get())); } catch (NoSuchFieldError | NoSuchFieldException | ClassNotFoundException e) { } } diff --git a/common/src/main/java/com/pandaismyname1/emiletsdocompat/vinery/AppleFermentationRecipe.java b/common/src/main/java/com/pandaismyname1/emiletsdocompat/vinery/AppleFermentationRecipe.java new file mode 100644 index 0000000..ba46679 --- /dev/null +++ b/common/src/main/java/com/pandaismyname1/emiletsdocompat/vinery/AppleFermentationRecipe.java @@ -0,0 +1,49 @@ +package com.pandaismyname1.emiletsdocompat.vinery; + +import com.pandaismyname1.emiletsdocompat.utils.DisplayUtils; +import dev.architectury.utils.EnvExecutor; +import dev.architectury.utils.GameInstance; +import dev.emi.emi.api.recipe.BasicEmiRecipe; +import dev.emi.emi.api.recipe.EmiRecipeCategory; +import dev.emi.emi.api.stack.EmiIngredient; +import dev.emi.emi.api.stack.EmiStack; +import dev.emi.emi.api.widget.WidgetHolder; +import net.minecraft.core.RegistryAccess; +import net.minecraft.world.item.crafting.Ingredient; + +import java.util.function.Supplier; + +public class AppleFermentationRecipe extends BasicEmiRecipe { + protected static final Supplier REGISTRY_ACCESS = + EnvExecutor.getEnvSpecific(() -> () -> () -> GameInstance.getClient().player.level().registryAccess(), + () -> () -> () -> GameInstance.getServer().registryAccess()); + + public AppleFermentationRecipe(EmiRecipeCategory category, net.satisfy.vinery.core.recipe.ApplePressFermentingRecipe recipe) { + super(category, recipe.getId(), 70, 18); + var ingredients = recipe.getIngredients(); + var requiresBottle = recipe.requiresBottle(); + for (var ingredient : ingredients) { + this.inputs.add(EmiIngredient.of(ingredient)); + } + if (requiresBottle) { + var ingredient = Ingredient.of(net.satisfy.vinery.core.registry.ObjectRegistry.WINE_BOTTLE.get()); + this.inputs.add(EmiIngredient.of(ingredient)); + } + this.outputs.add(EmiStack.of(recipe.getResultItem(REGISTRY_ACCESS.get()))); + } + + @Override + public void addWidgets(WidgetHolder widgets) { + DisplayUtils.CreateWidget(this, widgets, this.inputs, this.outputs); + } + + @Override + public int getDisplayHeight() { + return 40; + } + + @Override + public int getDisplayWidth() { + return 140; + } +} diff --git a/common/src/main/java/com/pandaismyname1/emiletsdocompat/vinery/ApplePressingRecipe.java b/common/src/main/java/com/pandaismyname1/emiletsdocompat/vinery/ApplePressingRecipe.java index da7c24d..e3e1589 100644 --- a/common/src/main/java/com/pandaismyname1/emiletsdocompat/vinery/ApplePressingRecipe.java +++ b/common/src/main/java/com/pandaismyname1/emiletsdocompat/vinery/ApplePressingRecipe.java @@ -17,7 +17,7 @@ public class ApplePressingRecipe extends BasicEmiRecipe { EnvExecutor.getEnvSpecific(() -> () -> () -> GameInstance.getClient().player.level().registryAccess(), () -> () -> () -> GameInstance.getServer().registryAccess()); - public ApplePressingRecipe(EmiRecipeCategory category, net.satisfy.vinery.recipe.ApplePressRecipe recipe) { + public ApplePressingRecipe(EmiRecipeCategory category, net.satisfy.vinery.core.recipe.ApplePressMashingRecipe recipe) { super(category, recipe.getId(), 70, 18); var ingredients = recipe.getIngredients(); for (var ingredient : ingredients) { diff --git a/common/src/main/java/com/pandaismyname1/emiletsdocompat/vinery/FermentationRecipe.java b/common/src/main/java/com/pandaismyname1/emiletsdocompat/vinery/FermentationRecipe.java index 943bb6c..ef30159 100644 --- a/common/src/main/java/com/pandaismyname1/emiletsdocompat/vinery/FermentationRecipe.java +++ b/common/src/main/java/com/pandaismyname1/emiletsdocompat/vinery/FermentationRecipe.java @@ -17,7 +17,7 @@ public class FermentationRecipe extends BasicEmiRecipe { EnvExecutor.getEnvSpecific(() -> () -> () -> GameInstance.getClient().player.level().registryAccess(), () -> () -> () -> GameInstance.getServer().registryAccess()); - public FermentationRecipe(EmiRecipeCategory category, net.satisfy.vinery.recipe.FermentationBarrelRecipe recipe) { + public FermentationRecipe(EmiRecipeCategory category, net.satisfy.vinery.core.recipe.FermentationBarrelRecipe recipe) { super(category, recipe.getId(), 70, 18); var ingredients = recipe.getIngredients(); for (var ingredient : ingredients) { diff --git a/common/src/main/java/com/pandaismyname1/emiletsdocompat/vinery/VineryCompat.java b/common/src/main/java/com/pandaismyname1/emiletsdocompat/vinery/VineryCompat.java index 939784e..ce917de 100644 --- a/common/src/main/java/com/pandaismyname1/emiletsdocompat/vinery/VineryCompat.java +++ b/common/src/main/java/com/pandaismyname1/emiletsdocompat/vinery/VineryCompat.java @@ -6,9 +6,9 @@ import dev.emi.emi.api.stack.EmiStack; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.crafting.RecipeManager; -import net.satisfy.vinery.Vinery; -import net.satisfy.vinery.registry.ObjectRegistry; -import net.satisfy.vinery.registry.RecipeTypesRegistry; +import net.satisfy.vinery.core.Vinery; +import net.satisfy.vinery.core.registry.ObjectRegistry; +import net.satisfy.vinery.core.registry.RecipeTypesRegistry; public class VineryCompat implements IEmiModCompat { @Override @@ -18,7 +18,7 @@ public void init(EmiRegistry registry, RecipeManager manager) throws NoSuchField EmiStack.of(ObjectRegistry.FERMENTATION_BARREL.get())); registerRecipeType(registry, manager, recipeCategory, - (recipe) -> {registry.addRecipe(new FermentationRecipe(recipeCategory, (net.satisfy.vinery.recipe.FermentationBarrelRecipe) recipe));}, + (recipe) -> {registry.addRecipe(new FermentationRecipe(recipeCategory, (net.satisfy.vinery.core.recipe.FermentationBarrelRecipe) recipe));}, RecipeTypesRegistry.FERMENTATION_BARREL_RECIPE_TYPE.get(), EmiStack.of(ObjectRegistry.FERMENTATION_BARREL.get())); } catch (NoSuchFieldError | NoSuchFieldException | ClassNotFoundException e) { @@ -29,8 +29,19 @@ public void init(EmiRegistry registry, RecipeManager manager) throws NoSuchField EmiStack.of(ObjectRegistry.APPLE_PRESS.get())); registerRecipeType(registry, manager, recipeCategory, - (recipe) -> {registry.addRecipe(new ApplePressingRecipe(recipeCategory, (net.satisfy.vinery.recipe.ApplePressRecipe) recipe));}, - RecipeTypesRegistry.APPLE_PRESS_RECIPE_TYPE.get(), + (recipe) -> {registry.addRecipe(new ApplePressingRecipe(recipeCategory, (net.satisfy.vinery.core.recipe.ApplePressMashingRecipe) recipe));}, + RecipeTypesRegistry.APPLE_PRESS_MASHING_RECIPE_TYPE.get(), + EmiStack.of(ObjectRegistry.APPLE_PRESS.get())); + } catch (NoSuchFieldError | NoSuchFieldException | ClassNotFoundException e) { + } + + try { + var recipeCategory = new EmiRecipeCategory(new ResourceLocation(Vinery.MOD_ID, "apple_fermenting"), + EmiStack.of(ObjectRegistry.FERMENTATION_BARREL.get())); + registerRecipeType(registry, manager, + recipeCategory, + (recipe) -> {registry.addRecipe(new AppleFermentationRecipe(recipeCategory, (net.satisfy.vinery.core.recipe.ApplePressFermentingRecipe) recipe));}, + RecipeTypesRegistry.APPLE_PRESS_FERMENTING_RECIPE_TYPE.get(), EmiStack.of(ObjectRegistry.APPLE_PRESS.get())); } catch (NoSuchFieldError | NoSuchFieldException | ClassNotFoundException e) { } diff --git a/fabric/build.gradle b/fabric/build.gradle index b1972b0..01da1bf 100644 --- a/fabric/build.gradle +++ b/fabric/build.gradle @@ -32,18 +32,20 @@ dependencies { common(project(path: ":common", configuration: "namedElements")) { transitive false } shadowCommon(project(path: ":common", configuration: "transformProductionFabric")) { transitive false } - modImplementation "curse.maven:lets-do-vinery-704465:5504122" + modImplementation "curse.maven:lets-do-vinery-704465:5992485" modImplementation "curse.maven:lets-do-bakery-886559:5528401" modImplementation "curse.maven:lets-do-meadow-821483:5504104" - modImplementation "curse.maven:lets-do-nethervinery-930072:5467443" + modImplementation "curse.maven:lets-do-nethervinery-930072:5987943" modImplementation "curse.maven:lets-do-candlelight-846962:5427654" modImplementation "curse.maven:lets-do-brewery-971636:5427505" modImplementation "curse.maven:lets-do-herbal-brews-951221:5400096" modImplementation "curse.maven:lets-do-beachparty-858691:5320667" - modImplementation "curse.maven:lets-do-farm-charm-1038103:5652313" - modImplementation "curse.maven:lets-do-bakery-farm-charm-compat-1038130:5652332" + modImplementation "curse.maven:lets-do-farm-charm-1038103:5824226" + modImplementation "curse.maven:lets-do-bakery-farm-charm-compat-1038130:5824485" modImplementation "curse.maven:lets-do-candlelight-farm-charm-compat-1038117:5652319" modImplementation "curse.maven:lets-do-brewery-farm-charm-compat-1038106:5652316" + modImplementation "curse.maven:lets-do-furniture-1062363:5988123" + modImplementation "curse.maven:lets-do-camping-1072398:5823924" } processResources { diff --git a/forge/build.gradle b/forge/build.gradle index 23fb877..97985fc 100644 --- a/forge/build.gradle +++ b/forge/build.gradle @@ -39,18 +39,20 @@ dependencies { common(project(path: ":common", configuration: "namedElements")) { transitive false } shadowCommon(project(path: ":common", configuration: "transformProductionForge")) { transitive = false } - modImplementation "curse.maven:lets-do-vinery-704465:5504123" + modImplementation "curse.maven:lets-do-vinery-704465:5992486" modImplementation "curse.maven:lets-do-bakery-886559:5528402" modImplementation "curse.maven:lets-do-meadow-821483:5504102" - modImplementation "curse.maven:lets-do-nethervinery-930072:5467444" + modImplementation "curse.maven:lets-do-nethervinery-930072:5987940" modImplementation "curse.maven:lets-do-candlelight-846962:5427646" modImplementation "curse.maven:lets-do-brewery-971636:5427504" modImplementation "curse.maven:lets-do-herbal-brews-951221:5397666" modImplementation "curse.maven:lets-do-beachparty-858691:5320668" - modImplementation "curse.maven:lets-do-farm-charm-1038103:5652312" - modImplementation "curse.maven:lets-do-bakery-farm-charm-compat-1038130:5652331" + modImplementation "curse.maven:lets-do-farm-charm-1038103:5824225" + modImplementation "curse.maven:lets-do-bakery-farm-charm-compat-1038130:5824482" modImplementation "curse.maven:lets-do-candlelight-farm-charm-compat-1038117:5652318" modImplementation "curse.maven:lets-do-brewery-farm-charm-compat-1038106:5652315" + modImplementation "curse.maven:lets-do-furniture-1062363:5988125" + modImplementation "curse.maven:lets-do-camping-1072398:5823939" } processResources { diff --git a/gradle.properties b/gradle.properties index 3b80fe5..f92df2c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ minecraft_version=1.20.1 enabled_platforms=fabric,forge archives_base_name=emi-letsdo-compat -mod_version=1.3 +mod_version=1.4 maven_group=com.pandaismyname1 architectury_version=9.2.14