Skip to content

Commit fec6377

Browse files
committed
update internal prismac logic for recipe mode switching, if ever needed
1 parent 35e5465 commit fec6377

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/main/java/net/neganote/monilabs/common/machine/multiblock/PrismaticCrucibleMachine.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public class PrismaticCrucibleMachine extends WorkableElectricMultiblockMachine
4040
private final Set<BlockPos> fluidBlockOffsets = new HashSet<>();
4141

4242
@Persisted
43+
@RequireRerender
4344
private Color color;
4445

4546
@Persisted
@@ -74,6 +75,18 @@ public void onStructureFormed() {
7475
updateColoredActiveBlocks(true);
7576
}
7677

78+
// Not currently used now, but would reset the machine's color
79+
// if there were multiple recipe types and the mode was switched
80+
@Override
81+
public void setActiveRecipeType(int activeRecipeType) {
82+
super.setActiveRecipeType(activeRecipeType);
83+
// Make this check because this method is also used to set the recipe
84+
// mode on world load
85+
if (isFormed()) {
86+
changeColorState(Color.RED);
87+
}
88+
}
89+
7790
@Override
7891
public int getOutputSignal(@Nullable Direction side) {
7992
if (!isFormed()) {

0 commit comments

Comments
 (0)