File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
src/main/java/mekanism/common/tile/base Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -761,6 +761,12 @@ protected void applyImplicitComponents(@NotNull BlockEntity.DataComponentInput i
761761 for (ITileComponent component : components ) {
762762 component .applyImplicitComponents (input );
763763 }
764+ if (supportsUpgrades ()) {
765+ //Recalculate upgrades before setting types so that we don't clamp the stored energy
766+ for (Upgrade upgrade : getSupportedUpgrade ()) {
767+ recalculateUpgrades (upgrade );
768+ }
769+ }
764770
765771 for (ContainerType <?, ?, ?> type : ContainerType .TYPES ) {
766772 if (persists (type )) {
@@ -777,12 +783,6 @@ protected void applyImplicitComponents(@NotNull BlockEntity.DataComponentInput i
777783 if (supportsRedstone ()) {
778784 setControlType (input .getOrDefault (MekanismDataComponents .REDSTONE_CONTROL , getControlType ()));
779785 }
780- if (supportsUpgrades ()) {
781- //Recalculate upgrades after applying components
782- for (Upgrade upgrade : getSupportedUpgrade ()) {
783- recalculateUpgrades (upgrade );
784- }
785- }
786786 }
787787
788788 @ Override
You can’t perform that action at this time.
0 commit comments