Fix altar double counting upgrades (#1291)
This commit is contained in:
parent
d29b91a106
commit
29ae24b044
|
@ -50,11 +50,7 @@ public class AltarUtil {
|
||||||
public static AltarUpgrade getUpgrades(World world, BlockPos pos, AltarTier currentTier) {
|
public static AltarUpgrade getUpgrades(World world, BlockPos pos, AltarTier currentTier) {
|
||||||
AltarUpgrade upgrades = new AltarUpgrade();
|
AltarUpgrade upgrades = new AltarUpgrade();
|
||||||
|
|
||||||
for (AltarTier tier : AltarTier.values()) {
|
for (AltarComponent component : currentTier.getAltarComponents()) {
|
||||||
if (tier.ordinal() > currentTier.ordinal())
|
|
||||||
return upgrades;
|
|
||||||
|
|
||||||
for (AltarComponent component : tier.getAltarComponents()) {
|
|
||||||
if (!component.isUpgradeSlot() || component.getComponent() != ComponentType.BLOODRUNE)
|
if (!component.isUpgradeSlot() || component.getComponent() != ComponentType.BLOODRUNE)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -63,7 +59,6 @@ public class AltarUtil {
|
||||||
if (state.getBlock() instanceof BlockBloodRune)
|
if (state.getBlock() instanceof BlockBloodRune)
|
||||||
upgrades.upgrade(((BlockBloodRune) state.getBlock()).getBloodRune(world, componentPos, state));
|
upgrades.upgrade(((BlockBloodRune) state.getBlock()).getBloodRune(world, componentPos, state));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return upgrades;
|
return upgrades;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue