Also no swimming

This commit is contained in:
DBotThePony 2021-08-18 23:55:42 +07:00
parent a6e00d22e8
commit 4b94c64b4e
Signed by: DBot
GPG Key ID: DCC23B5715498507
2 changed files with 10 additions and 2 deletions

View File

@ -144,6 +144,9 @@ public class AndroidCapability implements ICapabilityProvider, IAndroidCapabilit
}
protected void tickInner() {
if (ent.getAirSupply() < ent.getMaxAirSupply())
ent.setAirSupply(ent.getMaxAirSupply());
if (!battery.isEmpty()) {
BigDecimal demand = energy_stored_max.subtract(energy_stored, MatteryCapability.ROUND_RULES);

View File

@ -152,6 +152,10 @@ public class AndroidCapabilityPlayer extends AndroidCapability {
cap.last_jump_ticks = 20;
}
if (ply.isSwimming()) {
ply.setSwimming(false);
}
if (cap.last_jump_ticks <= 0) {
event.getMovementInput().jumping = false;
event.getMovementInput().up = false;
@ -185,8 +189,9 @@ public class AndroidCapabilityPlayer extends AndroidCapability {
// TODO: Maybe passive drain?
// extractEnergyInner(BigDecimal.valueOf(new Random().nextDouble()), false);
if (ply.getAirSupply() < ply.getMaxAirSupply())
ply.setAirSupply(ply.getMaxAirSupply());
if (ply.isSwimming()) {
ply.setSwimming(false);
}
FoodData stats = ply.getFoodData();