Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ flywheel_version = 1.0.4
vanillin_version = 1.0.0-beta-11
registrate_version = MC1.21-1.3.0+62
ponder_version = 1.0.56
create_version = 6.0.6-98
create_version = 6.0.7-159
create_version_production = 6.0.6
create_version_range = [6.0.6,)
jei_minecraft_version = 1.21.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public boolean canProcess(ItemStack stack, Level level) {
public @Nullable List<ItemStack> process(ItemStack stack, Level level) {
return level.getRecipeManager()
.getRecipeFor(CDPRecipes.COLORING.getType(), new ColoringRecipeInput(this.color, stack), level)
.map(recipe -> RecipeApplier.applyRecipeOn(level, stack, recipe))
.map(recipe -> RecipeApplier.applyRecipeOn(level, stack, recipe.value(), true))
.or(() -> processByCreateGarnished(stack, level))
.or(() -> processByCrafting(stack, level)
.map(result -> ItemHelper.multipliedOutput(stack, result)))
Expand Down Expand Up @@ -158,7 +158,7 @@ private Optional<List<ItemStack>> processByCreateGarnished(ItemStack stack, Leve
return Optional.empty();
return level.getRecipeManager()
.getRecipeFor(createGarnishedRecipe.get(), new SingleRecipeInput(stack), level)
.map(recipe -> RecipeApplier.applyRecipeOn(level, stack, recipe));
.map(recipe -> RecipeApplier.applyRecipeOn(level, stack, recipe.value(), true));
}

private Optional<ItemStack> processByCrafting(ItemStack stack, Level level) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public boolean canProcess(ItemStack stack, Level level) {
var input = new SingleRecipeInput(stack);
return recipeManager
.getRecipeFor(CDPRecipes.ENDING.getType(), input, level)
.map(recipe -> RecipeApplier.applyRecipeOn(level, stack, recipe))
.map(recipe -> RecipeApplier.applyRecipeOn(level, stack, recipe.value(), true))
.or(() -> processByCompatRecipe(createDNDRecipe, stack, level))
.orElse(null);
}
Expand Down Expand Up @@ -141,6 +141,6 @@ private Optional<List<ItemStack>> processByCompatRecipe(DeferredHolder<RecipeTyp
return Optional.empty();
return level.getRecipeManager()
.getRecipeFor(recipeType.get(), new SingleRecipeInput(stack), level)
.map(recipe -> RecipeApplier.applyRecipeOn(level, stack, recipe));
.map(recipe -> RecipeApplier.applyRecipeOn(level, stack, recipe.value(), true));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public boolean canProcess(ItemStack stack, Level level) {
public @Nullable List<ItemStack> process(ItemStack stack, Level level) {
return level.getRecipeManager()
.getRecipeFor(CDPRecipes.FREEZING.getType(), new SingleRecipeInput(stack), level)
.map(recipe -> RecipeApplier.applyRecipeOn(level, stack, recipe))
.map(recipe -> RecipeApplier.applyRecipeOn(level, stack, recipe.value(), true))
.or(() -> {
var result = processByCompatRecipe(createGarnishedRecipe, stack, level);
if (result.isEmpty())
Expand Down Expand Up @@ -140,6 +140,6 @@ private Optional<List<ItemStack>> processByCompatRecipe(DeferredHolder<RecipeTyp
return Optional.empty();
return level.getRecipeManager()
.getRecipeFor(recipeType.get(), new SingleRecipeInput(stack), level)
.map(recipe -> RecipeApplier.applyRecipeOn(level, stack, recipe));
.map(recipe -> RecipeApplier.applyRecipeOn(level, stack, recipe.value(), true));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public boolean canProcess(ItemStack stack, Level level) {
.getRecipeFor((RecipeType<? extends StandardProcessingRecipe<SingleRecipeInput>>) CDPRecipes.SANDING.getType(), input, level)
.or(() -> recipeManager.getRecipeFor(AllRecipeTypes.SANDPAPER_POLISHING.getType(), input, level))
.filter(AllRecipeTypes.CAN_BE_AUTOMATED)
.map(recipe -> RecipeApplier.applyRecipeOn(level, stack, recipe))
.map(recipe -> RecipeApplier.applyRecipeOn(level, stack, recipe.value(), true))
.or(() -> processByCompatRecipe(createDNDRecipe, stack, level))
.orElse(null);
}
Expand Down Expand Up @@ -179,6 +179,6 @@ private Optional<List<ItemStack>> processByCompatRecipe(DeferredHolder<RecipeTyp
return Optional.empty();
return level.getRecipeManager()
.getRecipeFor(recipeType.get(), new SingleRecipeInput(stack), level)
.map(recipe -> RecipeApplier.applyRecipeOn(level, stack, recipe));
.map(recipe -> RecipeApplier.applyRecipeOn(level, stack, recipe.value(), true));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import com.simibubi.create.content.kinetics.mixer.MixingRecipe;
import com.simibubi.create.content.processing.recipe.HeatCondition;
import com.simibubi.create.content.processing.recipe.StandardProcessingRecipe;
import com.simibubi.create.foundation.fluid.FluidIngredient;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
Expand All @@ -35,6 +34,7 @@
import net.minecraft.world.item.crafting.Ingredient;
import net.minecraft.world.item.crafting.RecipeHolder;
import net.neoforged.neoforge.fluids.FluidStack;
import net.neoforged.neoforge.fluids.crafting.SizedFluidIngredient;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Unique;
import org.spongepowered.asm.mixin.injection.At;
Expand All @@ -56,7 +56,7 @@ public class PotionMixingRecipesMixin {
var recipeId = CDPCommon.asResource(id + "_using_dragon_breath_fluid");
var recipe = new StandardProcessingRecipe.Builder<>(MixingRecipe::new, recipeId)
.require(CDPFluids.COMMON_TAGS.dragonBreath, 250)
.require(FluidIngredient.fromFluidStack(fromFluid))
.require(SizedFluidIngredient.of(fromFluid))
.output(toFluid)
.requiresHeat(HeatCondition.HEATED)
.build();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
* Copyright (C) 2025 DragonsPlus
* SPDX-License-Identifier: LGPL-3.0-or-later
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

package plus.dragons.createdragonsplus.mixin.dndesires;

import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
Expand All @@ -18,13 +36,10 @@
@Restriction(require = @Condition(ModIntegration.Constants.CREATE_DND))
@Mixin(FanProcessingType.class)
public interface FanProcessingTypeMixinForDnD {
@WrapOperation(
method = "getAt",
at = @At(value = "INVOKE", target = "Lcom/simibubi/create/content/kinetics/fan/processing/FanProcessingType;isValidAt(Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;)Z")
)
@WrapOperation(method = "getAt", at = @At(value = "INVOKE", target = "Lcom/simibubi/create/content/kinetics/fan/processing/FanProcessingType;isValidAt(Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;)Z"))
private static boolean ignoreDisabledType(FanProcessingType instance, Level level, BlockPos blockPos, Operation<Boolean> original) {
if (instance instanceof FreezingType && CDPConfig.recipes().enableBulkFreezing.get())
return false;
return false;
else if (instance instanceof DragonBreathingType && CDPConfig.recipes().enableBulkEnding.get())
return false;
else if (instance instanceof SandingType && CDPConfig.recipes().enableBulkSanding.get())
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
* Copyright (C) 2025 DragonsPlus
* SPDX-License-Identifier: LGPL-3.0-or-later
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

package plus.dragons.createdragonsplus.mixin.garnished;

import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
Expand All @@ -16,13 +34,10 @@
@Restriction(require = @Condition(ModIntegration.Constants.CREATE_GARNISHED))
@Mixin(FanProcessingType.class)
public interface FanProcessingTypeMixinForGarnished {
@WrapOperation(
method = "getAt",
at = @At(value = "INVOKE", target = "Lcom/simibubi/create/content/kinetics/fan/processing/FanProcessingType;isValidAt(Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;)Z")
)
@WrapOperation(method = "getAt", at = @At(value = "INVOKE", target = "Lcom/simibubi/create/content/kinetics/fan/processing/FanProcessingType;isValidAt(Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;)Z"))
private static boolean ignoreDisabledType(FanProcessingType instance, Level level, BlockPos blockPos, Operation<Boolean> original) {
if (instance instanceof FreezingFanProcessingType && CDPConfig.recipes().enableBulkFreezing.get())
return false;
return false;
return original.call(instance, level, blockPos);
}
}