Skip to content

Commit

Permalink
Minor code changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrbysco committed Jun 6, 2024
1 parent da12fe9 commit 70bb33e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public FluidStack drain(int maxDrain, FluidAction action) {

@Override
public boolean isFluidValid(FluidStack stack) {
return stack.getFluid().is(ForceTags.FORCE);
return stack.is(ForceTags.FORCE);
}
};

Expand Down Expand Up @@ -550,10 +550,10 @@ private boolean applyModifier(ItemStack tool, ItemStack modifier, RecipeHolder<I
//test the ingredient of this recipe, if it matches me

InfuseRecipe recipe = recipeHolder.value();
if (recipe.resultModifier.apply(tool, modifier, bd)) {
if (recipe.getModifier().apply(tool, modifier, bd)) {
bd.onRecipeApply(recipeHolder, getBookInSlot());

if (recipe.resultModifier == InfuserModifierType.ITEM && recipe.hasOutput()) {
if (recipe.getModifier() == InfuserModifierType.ITEM && recipe.hasOutput()) {
//overwrite / convert item
handler.setStackInSlot(SLOT_TOOL, recipe.getResultItem(level.registryAccess()).copy());
} else {
Expand Down Expand Up @@ -1252,7 +1252,7 @@ public static boolean addRecipe(RecipeHolder<InfuseRecipe> holder) {
}
LEVEL_RECIPE_LIST.get(thisTier).add(recipe);
HASHES.add(id.toString());
ForceCraft.LOGGER.info("Recipe loaded {} -> {} , {}", id.toString(), recipe.resultModifier, recipe.ingredient);
ForceCraft.LOGGER.info("Recipe loaded {} -> {} , {}", id.toString(), recipe.getModifier(), recipe.getIngredient());
return true;
}
}
12 changes: 6 additions & 6 deletions src/main/java/com/mrbysco/forcecraft/recipe/InfuseRecipe.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@

public class InfuseRecipe implements Recipe<InfuserBlockEntity> {
private static final int MAX_SLOTS = 8;
public Ingredient ingredient = Ingredient.EMPTY;
public InfuserModifierType resultModifier;
ItemStack output = ItemStack.EMPTY;
private UpgradeBookTier tier;
private Ingredient center;
private int time;
protected Ingredient ingredient;
protected InfuserModifierType resultModifier;
protected ItemStack output;
protected UpgradeBookTier tier;
protected Ingredient center;
protected int time;

public InfuseRecipe(Ingredient center, Ingredient input, InfuserModifierType resultType, UpgradeBookTier tier, ItemStack outputStack, int time) {
this.ingredient = input;
Expand Down

0 comments on commit 70bb33e

Please sign in to comment.