java.lang.Object
mod.chloeprime.gunsmithlib.common.gunpack_extension.shared.shield.ShieldBehavior

public class ShieldBehavior extends Object
从以下版本开始:
3.4.0
  • 构造器详细资料

    • 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)
      格挡原版伤害时触发状态机信号