Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/1.20.1' into 1.20.1
Browse files Browse the repository at this point in the history
  • Loading branch information
desht committed Aug 6, 2024
2 parents 7574ea8 + 51cb109 commit 491df41
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,8 @@ private class EtchingFluidTank extends SmartSyncTank {
}

@Override
public boolean isFluidValid(FluidStack stack) {
return stack.getFluid().is(PneumaticCraftTags.Fluids.ETCHING_ACID);
public boolean isFluidValid(FluidStack fluidStack) {
return EmptyPCBItem.getEtchingFluid().isFluidEqual(fluidStack);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import me.desht.pneumaticcraft.api.data.PneumaticCraftTags;
import me.desht.pneumaticcraft.api.item.ICustomDurabilityBar;
import me.desht.pneumaticcraft.common.block.entity.UVLightBoxBlockEntity;
import me.desht.pneumaticcraft.common.core.ModFluids;
import me.desht.pneumaticcraft.common.core.ModItems;
import me.desht.pneumaticcraft.lib.BlockEntityConstants;
import net.minecraft.ChatFormatting;
Expand All @@ -31,6 +32,7 @@
import net.minecraft.world.item.TooltipFlag;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.material.MapColor;
import net.minecraftforge.fluids.FluidStack;
import org.apache.commons.lang3.Validate;

import java.util.List;
Expand Down Expand Up @@ -183,4 +185,8 @@ public ItemStack getSuccessItem() {
public ItemStack getFailedItem() {
return new ItemStack(ModItems.FAILED_PCB.get());
}

public static FluidStack getEtchingFluid() {
return new FluidStack(ModFluids.ETCHING_ACID.get(), 1000);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public void setRecipe(IRecipeLayoutBuilder builder, EtchingTankRecipe recipe, IF
builder.addSlot(RecipeIngredientRole.INPUT, 1, 13)
.addIngredients(recipe.input);
builder.addSlot(RecipeIngredientRole.INPUT, 26, 13)
.addIngredients(ForgeTypes.FLUID_STACK, Collections.singletonList(new FluidStack(ModFluids.ETCHING_ACID.get(), 1000)));
.addIngredients(ForgeTypes.FLUID_STACK, Collections.singletonList(new FluidStack(recipe.etchingFluid, 1000)));
builder.addSlot(RecipeIngredientRole.OUTPUT, 66, 1)
.addItemStack(recipe.output);
builder.addSlot(RecipeIngredientRole.OUTPUT, 66, 25)
Expand All @@ -85,14 +85,15 @@ static List<EtchingTankRecipe> getAllRecipes() {
recipes.add(new EtchingTankRecipe(
Ingredient.of(inputs),
emptyPCBItem.getSuccessItem(),
emptyPCBItem.getFailedItem())
emptyPCBItem.getFailedItem(),
EmptyPCBItem.getEtchingFluid())
);
}
}
return recipes;
}

// pseudo-recipe
record EtchingTankRecipe(Ingredient input, ItemStack output, ItemStack failed) {
record EtchingTankRecipe(Ingredient input, ItemStack output, ItemStack failed, FluidStack etchingFluid) {
}
}

0 comments on commit 491df41

Please sign in to comment.