Rebalance android values

This commit is contained in:
DBotThePony 2021-08-19 11:43:29 +07:00
parent e9401115d6
commit 54eaf68a19
Signed by: DBot
GPG Key ID: DCC23B5715498507
2 changed files with 9 additions and 4 deletions

View File

@ -32,7 +32,7 @@ import java.util.Set;
public class AndroidCapability implements ICapabilityProvider, IAndroidCapability, INBTSerializable<CompoundTag> {
protected final LivingEntity ent;
protected BigDecimal energy_stored = new BigDecimal(0);
protected BigDecimal energy_stored_max = new BigDecimal(32000);
protected BigDecimal energy_stored_max = new BigDecimal(60_000);
protected ItemStack battery = ItemStack.EMPTY;
private BigDecimal network_energy = new BigDecimal(-1);

View File

@ -62,8 +62,8 @@ public class AndroidCapabilityPlayer extends AndroidCapability {
return;
is_android = true;
energy_stored = new BigDecimal(32_000);
energy_stored_max = new BigDecimal(32_000);
energy_stored = new BigDecimal(60_000);
energy_stored_max = new BigDecimal(60_000);
ply.setHealth(0.0F);
ply.die(Registry.DAMAGE_BECOME_ANDROID);
@ -182,7 +182,7 @@ public class AndroidCapabilityPlayer extends AndroidCapability {
MatteryNetworking.CHANNEL.send(PacketDistributor.PLAYER.with(() -> (ServerPlayer) ent), packet);
}
public static final BigDecimal ENERGY_FOR_HUNGER_POINT = new BigDecimal(200);
public static final BigDecimal ENERGY_FOR_HUNGER_POINT = new BigDecimal(1000);
@Override
public void tickInner() {
@ -212,5 +212,10 @@ public class AndroidCapabilityPlayer extends AndroidCapability {
BigDecimal extracted = this.extractEnergyInner(ENERGY_FOR_HUNGER_POINT.multiply(new BigDecimal(Float.toString(food_level - stats.getSaturationLevel()))), false);
stats.setSaturation(stats.getSaturationLevel() + extracted.divide(ENERGY_FOR_HUNGER_POINT, MatteryCapability.ROUND_RULES).floatValue());
}
if (stats.getExhaustionLevel() > 0f) {
BigDecimal extracted = this.extractEnergyInner(ENERGY_FOR_HUNGER_POINT.multiply(new BigDecimal(Float.toString(stats.getExhaustionLevel() / 4f))), false);
stats.setExhaustion(stats.getExhaustionLevel() - extracted.divide(ENERGY_FOR_HUNGER_POINT, MatteryCapability.ROUND_RULES).floatValue() * 4f);
}
}
}