Skip to content

Commit

Permalink
- Fix RequirementCatalyst not taking effect when restarting a recipe.
Browse files Browse the repository at this point in the history
- Fix RequirementIngredientArray changing from output to input.
- Controller's AnimationFactory is no longer reloaded (maybe it caused some animation problems? But now it no longer replays the animation twice.)
  • Loading branch information
KasumiNova committed Dec 29, 2023
1 parent de11000 commit 3252c0d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ public int getMaxParallelism(final List<ProcessingComponent<?>> components, fina
return result;
}

@Override
public void finishCrafting(final List<ProcessingComponent<?>> components, final RecipeCraftingContext context, final ResultChance chance) {
super.finishCrafting(components, context, chance);
isRequired = false;
}

@Override
public RequirementCatalyst deepCopy() {
return deepCopyModified(Collections.emptyList());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public RequirementIngredientArray deepCopyModified(List<RecipeModifier> modifier
copiedIngredients.add(copied);
});

return new RequirementIngredientArray(copiedIngredients);
return new RequirementIngredientArray(copiedIngredients, getActionType());
}

@Nonnull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1051,9 +1051,9 @@ public void readCustomNBT(NBTTagCompound compound) {
BlockModelHider.hideOrShowBlocks(this);
notifyStructureFormedState(isStructureFormed());
}, 1);
if (!isStructureFormed()) {
animationFactory = null;
}
// if (!isStructureFormed()) {
// animationFactory = null;
// }
}
}

Expand Down

0 comments on commit 3252c0d

Please sign in to comment.