调整载具减伤计算的端位
This commit is contained in:
parent
a725a914be
commit
1a522bf5c2
1 changed files with 8 additions and 2 deletions
|
@ -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))
|
if (source.is(DamageTypes.CACTUS) || source.is(DamageTypes.SWEET_BERRY_BUSH) || source.is(DamageTypes.IN_WALL))
|
||||||
return false;
|
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);
|
this.crash = source.is(ModDamageTypes.VEHICLE_STRIKE);
|
||||||
|
|
||||||
if (source.getEntity() != null) {
|
if (source.getEntity() != null) {
|
||||||
|
@ -1053,6 +1058,7 @@ public abstract class VehicleEntity extends Entity {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取视角位置
|
* 获取视角位置
|
||||||
|
*
|
||||||
* @param zoom 是否在载具上瞄准
|
* @param zoom 是否在载具上瞄准
|
||||||
* @param isFirstPerson 是否是第一人称视角
|
* @param isFirstPerson 是否是第一人称视角
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Reference in a new issue