调整载具减伤计算的端位

This commit is contained in:
17146 2025-05-31 15:20:54 +08:00 committed by Light_Quanta
parent a725a914be
commit 1a522bf5c2
No known key found for this signature in database
GPG key ID: 11A39A1B8C890959

View file

@ -406,7 +406,12 @@ public abstract class VehicleEntity extends Entity {
if (source.is(DamageTypes.CACTUS) || source.is(DamageTypes.SWEET_BERRY_BUSH) || source.is(DamageTypes.IN_WALL))
return false;
// 计算减伤后的伤害
float computedAmount = getDamageModifier().compute(source, amount);
float computedAmount;
if (this.level().isClientSide) {
computedAmount = amount;
} else {
computedAmount = getDamageModifier().compute(source, amount);
}
this.crash = source.is(ModDamageTypes.VEHICLE_STRIKE);
if (source.getEntity() != null) {
@ -1053,7 +1058,8 @@ public abstract class VehicleEntity extends Entity {
/**
* 获取视角位置
* @param zoom 是否在载具上瞄准
*
* @param zoom 是否在载具上瞄准
* @param isFirstPerson 是否是第一人称视角
*/
@OnlyIn(Dist.CLIENT)