类 RindingLeash

java.lang.Object
top.r3944realms.superleadrope.util.riding.RindingLeash

public class RindingLeash extends Object
The type Rinding leash.
  • 构造器概要

    构造器
    构造器
    说明
     
  • 方法概要

    修饰符和类型
    方法
    说明
    static void
    applyForceToPlayer(net.minecraft.server.level.ServerPlayer player, net.minecraft.world.phys.Vec3 leashVec, double k, double dampingFactor, double maxForce)
    给玩家应用拴绳力前的发包处理
    static net.minecraft.world.entity.Entity
    getFinalEntityForLeashIfForce(net.minecraft.world.entity.Entity entity, boolean hasForce)
    获取最终可作用的载具,用于拴绳合力应用。
    static @Nullable net.minecraft.world.entity.Entity
    getSafeWhitelistRoot(net.minecraft.world.entity.Entity entity)
    获取乘坐链中第一个在白名单的载具,如果没有则返回null
    static void
    protectAnimalMovement(net.minecraft.world.entity.Entity entity, boolean hasLeash)
    给动物应用拴绳力前的移动控制保护

    从类继承的方法 java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 构造器详细资料

    • RindingLeash

      public RindingLeash()
  • 方法详细资料

    • getSafeWhitelistRoot

      @Nullable public static @Nullable net.minecraft.world.entity.Entity getSafeWhitelistRoot(net.minecraft.world.entity.Entity entity)
      获取乘坐链中第一个在白名单的载具,如果没有则返回null
      参数:
      entity - the entity
      返回:
      the safe whitelist root
    • getFinalEntityForLeashIfForce

      public static net.minecraft.world.entity.Entity getFinalEntityForLeashIfForce(net.minecraft.world.entity.Entity entity, boolean hasForce)
      获取最终可作用的载具,用于拴绳合力应用。 当链条中没有白名单载具时解除骑乘并返回自身 仅在拴绳合力不为零时调用
      参数:
      entity - the entity
      hasForce - the has force
      返回:
      the final entity for leash if force
    • protectAnimalMovement

      public static void protectAnimalMovement(net.minecraft.world.entity.Entity entity, boolean hasLeash)
      给动物应用拴绳力前的移动控制保护
      参数:
      entity - the entity
      hasLeash - the has leash
    • applyForceToPlayer

      public static void applyForceToPlayer(net.minecraft.server.level.ServerPlayer player, net.minecraft.world.phys.Vec3 leashVec, double k, double dampingFactor, double maxForce)
      给玩家应用拴绳力前的发包处理
      参数:
      player - the player
      leashVec - the leash vec
      k - the k
      dampingFactor - the damping factor
      maxForce - the max force