类 ShieldBehavior
java.lang.Object
mod.chloeprime.gunsmithlib.common.gunpack_extension.shared.shield.ShieldBehavior
- 从以下版本开始:
- 3.4.0
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static booleancanBlockBulletDamage(net.minecraft.world.entity.LivingEntity user, net.minecraft.world.phys.Vec3 bulletPos, net.minecraft.world.item.ItemStack weapon) 判断手持一把枪的玩家是否能格挡子弹。static booleancanBlockVanillaDamage(net.minecraft.world.entity.LivingEntity user, net.minecraft.world.phys.Vec3 sourcePos, net.minecraft.world.item.ItemStack weapon) 判断手持一把枪的玩家是否能格挡原版伤害。static net.minecraft.world.phys.Vec3getBetterSourcePosition(net.minecraft.world.damagesource.DamageSource source) static Optional<ShieldData> getUsedShieldForBlockingBulletDamage(net.minecraft.world.entity.LivingEntity user, net.minecraft.world.item.ItemStack weapon) static Optional<ShieldData> getUsedShieldForBlockingVanillaDamage(net.minecraft.world.entity.LivingEntity user, net.minecraft.world.item.ItemStack weapon) static voidonBulletHitEntity(com.tacz.guns.api.event.common.EntityHurtByGunEvent.Pre event) 格挡子弹static voidtriggerAnimationOnBlockingVanillaDamage(net.neoforged.neoforge.event.entity.living.LivingShieldBlockEvent event) 格挡原版伤害时触发状态机信号
-
构造器详细资料
-
ShieldBehavior
public ShieldBehavior()
-
-
方法详细资料
-
canBlockVanillaDamage
public static boolean canBlockVanillaDamage(net.minecraft.world.entity.LivingEntity user, net.minecraft.world.phys.Vec3 sourcePos, net.minecraft.world.item.ItemStack weapon) 判断手持一把枪的玩家是否能格挡原版伤害。格挡范围为满足
ShieldData.getCondition()的枪械和所有配件的格挡范围的最大值。 -
canBlockBulletDamage
public static boolean canBlockBulletDamage(net.minecraft.world.entity.LivingEntity user, net.minecraft.world.phys.Vec3 bulletPos, net.minecraft.world.item.ItemStack weapon) 判断手持一把枪的玩家是否能格挡子弹。格挡范围为满足
ShieldData.getCondition()的枪械和所有配件的格挡范围的最大值。 -
getUsedShieldForBlockingVanillaDamage
public static Optional<ShieldData> getUsedShieldForBlockingVanillaDamage(net.minecraft.world.entity.LivingEntity user, net.minecraft.world.item.ItemStack weapon) - 从以下版本开始:
- 3.6.0
-
getUsedShieldForBlockingBulletDamage
public static Optional<ShieldData> getUsedShieldForBlockingBulletDamage(net.minecraft.world.entity.LivingEntity user, net.minecraft.world.item.ItemStack weapon) - 从以下版本开始:
- 3.6.0
-
getBetterSourcePosition
public static net.minecraft.world.phys.Vec3 getBetterSourcePosition(net.minecraft.world.damagesource.DamageSource source) -
onBulletHitEntity
public static void onBulletHitEntity(com.tacz.guns.api.event.common.EntityHurtByGunEvent.Pre event) 格挡子弹 -
triggerAnimationOnBlockingVanillaDamage
public static void triggerAnimationOnBlockingVanillaDamage(net.neoforged.neoforge.event.entity.living.LivingShieldBlockEvent event) 格挡原版伤害时触发状态机信号
-