Fix MtE burn not awarded for outer battery
This commit is contained in:
parent
dc76513dc8
commit
e7b810f1a8
@ -389,6 +389,10 @@ public class AndroidCapability implements ICapabilityProvider, IAndroidCapabilit
|
||||
howMuch = howMuch.subtract(changed, MatteryCapability.ROUND_RULES);
|
||||
|
||||
if (howMuch.compareTo(BigDecimal.ZERO) <= 0) {
|
||||
if (!simulate && ent instanceof ServerPlayer ply) {
|
||||
ply.awardStat(Registry.Names.POWER_CONSUMED, drained.intValue() * 10);
|
||||
}
|
||||
|
||||
return drained;
|
||||
}
|
||||
}
|
||||
@ -405,6 +409,10 @@ public class AndroidCapability implements ICapabilityProvider, IAndroidCapabilit
|
||||
howMuch = howMuch.subtract(changed, MatteryCapability.ROUND_RULES);
|
||||
|
||||
if (howMuch.compareTo(BigDecimal.ZERO) <= 0) {
|
||||
if (!simulate && ent instanceof ServerPlayer ply) {
|
||||
ply.awardStat(Registry.Names.POWER_CONSUMED, drained.intValue() * 10);
|
||||
}
|
||||
|
||||
return drained;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user