Skip to content

Commit c62f30b

Browse files
committed
Fix upgrades not being properly applied when already installed in a machine before placing (#8160)
1 parent fd189cd commit c62f30b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/main/java/mekanism/common/tile/base/TileEntityMekanism.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -840,6 +840,12 @@ protected void applyImplicitComponents(@NotNull BlockEntity.DataComponentInput i
840840
if (supportsRedstone()) {
841841
setControlType(input.getOrDefault(MekanismDataComponents.REDSTONE_CONTROL, getControlType()));
842842
}
843+
if (supportsUpgrades()) {
844+
//Recalculate upgrades after applying components
845+
for (Upgrade upgrade : getSupportedUpgrade()) {
846+
recalculateUpgrades(upgrade);
847+
}
848+
}
843849
}
844850

845851
@Override

0 commit comments

Comments
 (0)