Rebalance android values
This commit is contained in:
parent
e9401115d6
commit
54eaf68a19
@ -32,7 +32,7 @@ import java.util.Set;
|
|||||||
public class AndroidCapability implements ICapabilityProvider, IAndroidCapability, INBTSerializable<CompoundTag> {
|
public class AndroidCapability implements ICapabilityProvider, IAndroidCapability, INBTSerializable<CompoundTag> {
|
||||||
protected final LivingEntity ent;
|
protected final LivingEntity ent;
|
||||||
protected BigDecimal energy_stored = new BigDecimal(0);
|
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;
|
protected ItemStack battery = ItemStack.EMPTY;
|
||||||
|
|
||||||
private BigDecimal network_energy = new BigDecimal(-1);
|
private BigDecimal network_energy = new BigDecimal(-1);
|
||||||
|
@ -62,8 +62,8 @@ public class AndroidCapabilityPlayer extends AndroidCapability {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
is_android = true;
|
is_android = true;
|
||||||
energy_stored = new BigDecimal(32_000);
|
energy_stored = new BigDecimal(60_000);
|
||||||
energy_stored_max = new BigDecimal(32_000);
|
energy_stored_max = new BigDecimal(60_000);
|
||||||
|
|
||||||
ply.setHealth(0.0F);
|
ply.setHealth(0.0F);
|
||||||
ply.die(Registry.DAMAGE_BECOME_ANDROID);
|
ply.die(Registry.DAMAGE_BECOME_ANDROID);
|
||||||
@ -182,7 +182,7 @@ public class AndroidCapabilityPlayer extends AndroidCapability {
|
|||||||
MatteryNetworking.CHANNEL.send(PacketDistributor.PLAYER.with(() -> (ServerPlayer) ent), packet);
|
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
|
@Override
|
||||||
public void tickInner() {
|
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);
|
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());
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user