接口 ILeashHelper.ILeashed

封闭接口:
ILeashHelper

public static interface ILeashHelper.ILeashed
The interface Leashed.
  • 方法概要

    修饰符和类型
    方法
    说明
    default void
    应用拴绳物理效果
    default boolean
    attachLeash(net.minecraft.world.entity.Entity holder)
    绑定拴绳到实体
    default boolean
    attachLeash(net.minecraft.world.entity.Entity holder, Double maxDistance, Double elasticDistanceScale)
    绑定拴绳并设置参数
    default boolean
    attachLeash(net.minecraft.world.entity.Entity holder, Double maxDistance, Double elasticDistanceScale, int maxKeepTicks)
    绑定拴绳并设置参数
    default boolean
    attachLeash(net.minecraft.world.entity.Entity holder, Double maxDistance, Double elasticDistanceScale, int maxKeepTicks, String reserved)
    绑定拴绳并设置参数
    default boolean
    attachLeash(net.minecraft.world.entity.Entity holder, Double maxDistance, Double elasticDistanceScale, String reserved)
    绑定拴绳并设置参数
    default boolean
    attachLeash(net.minecraft.world.entity.Entity holder, String reserved)
    绑定拴绳到实体
    default boolean
    canBeAttachedTo(net.minecraft.world.entity.Entity holder)
    检查是否可以拴到特定目标
    default boolean
    检查是否可以被拴绳
    default void
    解绑所有拴绳
    default boolean
    解绑拴绳
    default boolean
    detachLeash(net.minecraft.core.BlockPos blockPos)
    解绑拴绳
    default boolean
    detachLeash(net.minecraft.world.entity.Entity entity)
    解绑拴绳(自动判断类型)
    获取该实体的拴绳数据
    getLeashInfo(UUID holderUUID)
    获取拴绳信息
    getLeashInfo(net.minecraft.core.BlockPos knotPos)
    获取拴绳信息
    getLeashInfo(net.minecraft.world.entity.Entity entity)
    获取拴绳信息(自动判断类型)
    default boolean
    检查是否被持有者拴住
    default boolean
    isInDelayedLeash(UUID holderUUID)
    Is in delayed leash boolean.
    default boolean
    检查是否被绳结拴住
    default boolean
    检查是否被拴住
    default boolean
    检查是否被特定UUID实体拴住
    default boolean
    isLeashedBy(net.minecraft.core.BlockPos blockPos)
    检查是否被特定绳结实体拴住
    default boolean
    isLeashedBy(net.minecraft.world.entity.Entity entity)
    检查是否被特定实体拴住(自动判断类型)
    default void
    解绑所有实体拴绳
    default void
    解绑所有绳结拴绳
    default boolean
    transferLeash(UUID fromEntityUUID, net.minecraft.world.entity.Entity toEntity)
    转移拴绳到新持有者
    default boolean
    transferLeash(UUID fromEntityUUID, net.minecraft.world.entity.Entity toEntity, String reserved)
    转移拴绳到新持有者
    default boolean
    transferLeash(net.minecraft.core.BlockPos fromKnotBlockPos, net.minecraft.world.entity.Entity toEntity)
    转移拴绳到新持有者
    default boolean
    transferLeash(net.minecraft.core.BlockPos fromKnotBlockPos, net.minecraft.world.entity.Entity toEntity, String reserved)
    转移拴绳到新持有者
    default boolean
    transferLeash(net.minecraft.world.entity.Entity fromEntity, net.minecraft.world.entity.Entity toEntity)
    转移拴绳到新持有者(自动判断类型)
    default boolean
    transferLeash(net.minecraft.world.entity.Entity fromEntity, net.minecraft.world.entity.Entity toEntity, String reserved)
    转移拴绳到新持有者(自动判断类型)
  • 方法详细资料

    • getLeashData

      ILeashData getLeashData()
      获取该实体的拴绳数据
      返回:
      the leash data
    • attachLeash

      default boolean attachLeash(net.minecraft.world.entity.Entity holder)
      绑定拴绳到实体
      参数:
      holder - the holder
      返回:
      the boolean
    • attachLeash

      default boolean attachLeash(net.minecraft.world.entity.Entity holder, String reserved)
      绑定拴绳到实体
      参数:
      holder - the holder
      reserved - the reserved
      返回:
      the boolean
    • attachLeash

      default boolean attachLeash(net.minecraft.world.entity.Entity holder, Double maxDistance, Double elasticDistanceScale)
      绑定拴绳并设置参数
      参数:
      holder - the holder
      maxDistance - the max distance
      elasticDistanceScale - the elastic distance scale
      返回:
      the boolean
    • attachLeash

      default boolean attachLeash(net.minecraft.world.entity.Entity holder, Double maxDistance, Double elasticDistanceScale, String reserved)
      绑定拴绳并设置参数
      参数:
      holder - the holder
      maxDistance - the max distance
      elasticDistanceScale - the elastic distance scale
      reserved - the reserved
      返回:
      the boolean
    • attachLeash

      default boolean attachLeash(net.minecraft.world.entity.Entity holder, Double maxDistance, Double elasticDistanceScale, int maxKeepTicks)
      绑定拴绳并设置参数
      参数:
      holder - the holder
      maxDistance - the max distance
      elasticDistanceScale - the elastic distance scale
      maxKeepTicks - the max keep ticks
      返回:
      the boolean
    • attachLeash

      default boolean attachLeash(net.minecraft.world.entity.Entity holder, Double maxDistance, Double elasticDistanceScale, int maxKeepTicks, String reserved)
      绑定拴绳并设置参数
      参数:
      holder - the holder
      maxDistance - the max distance
      elasticDistanceScale - the elastic distance scale
      maxKeepTicks - the max keep ticks
      reserved - the reserved
      返回:
      the boolean
    • detachLeash

      default boolean detachLeash(net.minecraft.world.entity.Entity entity)
      解绑拴绳(自动判断类型)
      参数:
      entity - the entity
      返回:
      the boolean
    • detachLeash

      default boolean detachLeash(UUID uuid)
      解绑拴绳
      参数:
      uuid - the uuid
      返回:
      the boolean
    • detachLeash

      default boolean detachLeash(net.minecraft.core.BlockPos blockPos)
      解绑拴绳
      参数:
      blockPos - the block pos
      返回:
      the boolean
    • detachAllLeashes

      default void detachAllLeashes()
      解绑所有拴绳
    • removeAllHolderLeashes

      default void removeAllHolderLeashes()
      解绑所有实体拴绳
    • removeAllKnotLeashes

      default void removeAllKnotLeashes()
      解绑所有绳结拴绳
    • isLeashed

      default boolean isLeashed()
      检查是否被拴住
      返回:
      the boolean
    • hasHolderLeashed

      default boolean hasHolderLeashed()
      检查是否被持有者拴住
      返回:
      the boolean
    • isKnotLeashed

      default boolean isKnotLeashed()
      检查是否被绳结拴住
      返回:
      the boolean
    • isLeashedBy

      default boolean isLeashedBy(net.minecraft.world.entity.Entity entity)
      检查是否被特定实体拴住(自动判断类型)
      参数:
      entity - the entity
      返回:
      the boolean
    • isLeashedBy

      default boolean isLeashedBy(UUID uuid)
      检查是否被特定UUID实体拴住
      参数:
      uuid - the uuid
      返回:
      the boolean
    • isLeashedBy

      default boolean isLeashedBy(net.minecraft.core.BlockPos blockPos)
      检查是否被特定绳结实体拴住
      参数:
      blockPos - the block pos
      返回:
      the boolean
    • getLeashInfo

      default Optional<LeashInfo> getLeashInfo(net.minecraft.world.entity.Entity entity)
      获取拴绳信息(自动判断类型)
      参数:
      entity - the entity
      返回:
      the leash info
    • getLeashInfo

      default Optional<LeashInfo> getLeashInfo(UUID holderUUID)
      获取拴绳信息
      参数:
      holderUUID - the holder uuid
      返回:
      the leash info
    • getLeashInfo

      default Optional<LeashInfo> getLeashInfo(net.minecraft.core.BlockPos knotPos)
      获取拴绳信息
      参数:
      knotPos - the knot pos
      返回:
      the leash info
    • transferLeash

      default boolean transferLeash(net.minecraft.world.entity.Entity fromEntity, net.minecraft.world.entity.Entity toEntity)
      转移拴绳到新持有者(自动判断类型)
      参数:
      fromEntity - the from entity
      toEntity - the to entity
      返回:
      the boolean
    • transferLeash

      default boolean transferLeash(net.minecraft.world.entity.Entity fromEntity, net.minecraft.world.entity.Entity toEntity, String reserved)
      转移拴绳到新持有者(自动判断类型)
      参数:
      fromEntity - the from entity
      toEntity - the to entity
      reserved - the reserved
      返回:
      the boolean
    • transferLeash

      default boolean transferLeash(UUID fromEntityUUID, net.minecraft.world.entity.Entity toEntity)
      转移拴绳到新持有者
      参数:
      fromEntityUUID - the from entity uuid
      toEntity - the to entity
      返回:
      the boolean
    • transferLeash

      default boolean transferLeash(UUID fromEntityUUID, net.minecraft.world.entity.Entity toEntity, String reserved)
      转移拴绳到新持有者
      参数:
      fromEntityUUID - the from entity uuid
      toEntity - the to entity
      reserved - the reserved
      返回:
      the boolean
    • transferLeash

      default boolean transferLeash(net.minecraft.core.BlockPos fromKnotBlockPos, net.minecraft.world.entity.Entity toEntity)
      转移拴绳到新持有者
      参数:
      fromKnotBlockPos - the from knot block pos
      toEntity - the to entity
      返回:
      the boolean
    • transferLeash

      default boolean transferLeash(net.minecraft.core.BlockPos fromKnotBlockPos, net.minecraft.world.entity.Entity toEntity, String reserved)
      转移拴绳到新持有者
      参数:
      fromKnotBlockPos - the from knot block pos
      toEntity - the to entity
      reserved - the reserved
      返回:
      the boolean
    • isInDelayedLeash

      default boolean isInDelayedLeash(UUID holderUUID)
      Is in delayed leash boolean.
      参数:
      holderUUID - the holder uuid
      返回:
      the boolean
    • applyLeashPhysics

      default void applyLeashPhysics()
      应用拴绳物理效果
    • canBeLeashed

      default boolean canBeLeashed()
      检查是否可以被拴绳
      返回:
      the boolean
    • canBeAttachedTo

      default boolean canBeAttachedTo(net.minecraft.world.entity.Entity holder)
      检查是否可以拴到特定目标
      参数:
      holder - the holder
      返回:
      the boolean