修复光棱坦克电量显示问题
This commit is contained in:
parent
da91065e05
commit
a926a014c3
1 changed files with 1 additions and 1 deletions
|
@ -720,7 +720,7 @@ public class PrismTankEntity extends ContainerMobileVehicleEntity implements Geo
|
||||||
public int getAmmoCount(Player player) {
|
public int getAmmoCount(Player player) {
|
||||||
var cap = this.getCapability(Capabilities.EnergyStorage.ENTITY, null);
|
var cap = this.getCapability(Capabilities.EnergyStorage.ENTITY, null);
|
||||||
if (cap == null) return 0;
|
if (cap == null) return 0;
|
||||||
return (int) (cap.getEnergyStored() / 100f / this.getMaxEnergy());
|
return (int) (cap.getEnergyStored() * 100f / this.getMaxEnergy());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Add table
Reference in a new issue