Skip to content

Commit a7a42cf

Browse files
committed
Move onCraft to CrafterComponent.Behavior
1 parent 15d1809 commit a7a42cf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/aztech/modern_industrialization/machines/components/CrafterComponent.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ default boolean isOverdriving() {
106106
return false;
107107
}
108108

109+
default void onCraft() {
110+
}
111+
109112
// can't use getWorld() or the remapping will fail
110113
ServerLevel getCrafterWorld();
111114

@@ -184,9 +187,6 @@ public void increaseEfficiencyTicks(int increment) {
184187
efficiencyTicks = Math.min(efficiencyTicks + increment, maxEfficiencyTicks);
185188
}
186189

187-
protected void onCraft() {
188-
}
189-
190190
@Override
191191
public long getCurrentRecipeEu() {
192192
Preconditions.checkArgument(hasActiveRecipe());
@@ -243,7 +243,7 @@ public boolean tickRecipe() {
243243
clearLocks();
244244
usedEnergy = 0;
245245
finishedRecipe = true;
246-
onCraft();
246+
behavior.onCraft();
247247
}
248248
} else if (behavior.isOverdriving()) {
249249
eu = activeRecipe.value().conditionsMatch(conditionContext) ? behavior.consumeEu(recipeMaxEu, ACT) : 0;

0 commit comments

Comments
 (0)