所有超级接口:
net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
所有已知实现类:
LeashDataImpl

public interface ILeashData extends net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
Capability interface for managing leash data of entities and knots.
  • 方法详细资料

    • self

      net.minecraft.world.entity.Entity self()
      Self entity.
      返回:
      the entity
    • getStaticMaxDistance

      Double getStaticMaxDistance()
      Gets static max distance.
      返回:
      the static max distance
    • setStaticMaxDistance

      void setStaticMaxDistance(Double distance)
      Sets static max distance.
      参数:
      distance - the distance
    • getDefaultMaxDistance

      double getDefaultMaxDistance()
      Gets default max distance.
      返回:
      the default max distance
    • getCurrentMaxDistance

      double getCurrentMaxDistance()
      Gets current max distance.
      返回:
      the current max distance
    • updateAllMaxDistance

      void updateAllMaxDistance()
      Update all max distance.
    • getStaticElasticDistanceScale

      Double getStaticElasticDistanceScale()
      Gets static elastic distance scale.
      返回:
      the static elastic distance scale
    • setStaticElasticDistanceScale

      void setStaticElasticDistanceScale(Double distance)
      Sets static elastic distance scale.
      参数:
      distance - the distance
    • getDefaultElasticDistanceScale

      double getDefaultElasticDistanceScale()
      Gets default elastic distance scale.
      返回:
      the default elastic distance scale
    • getCurrentElasticDistanceScale

      double getCurrentElasticDistanceScale()
      Gets current elastic distance scale.
      返回:
      the current elastic distance scale
    • updateAllElasticDistanceScale

      void updateAllElasticDistanceScale()
      Update all elastic distance scale.
    • updateAll

      default void updateAll()
      Update all.
    • addLeash

      boolean addLeash(net.minecraft.world.entity.Entity holder)
      Add leash boolean.
      参数:
      holder - the holder
      返回:
      the boolean
    • addLeash

      boolean addLeash(net.minecraft.world.entity.Entity holder, String reserved)
      Add leash boolean.
      参数:
      holder - the holder
      reserved - the reserved
      返回:
      the boolean
    • addLeash

      boolean addLeash(net.minecraft.world.entity.Entity holder, Double maxDistance)
      Add leash boolean.
      参数:
      holder - the holder
      maxDistance - the max distance
      返回:
      the boolean
    • addLeash

      boolean addLeash(net.minecraft.world.entity.Entity holder, Double maxDistance, Double elasticDistanceScale)
      Add leash boolean.
      参数:
      holder - the holder
      maxDistance - the max distance
      elasticDistanceScale - the elastic distance scale
      返回:
      the boolean
    • addLeash

      boolean addLeash(net.minecraft.world.entity.Entity holder, Double maxDistance, Double elasticDistanceScale, int maxKeepTicks)
      Add leash boolean.
      参数:
      holder - the holder
      maxDistance - the max distance
      elasticDistanceScale - the elastic distance scale
      maxKeepTicks - the max keep ticks
      返回:
      the boolean
    • addLeash

      boolean addLeash(net.minecraft.world.entity.Entity holder, Double maxDistance, Double elasticDistanceScale, String reserved)
      Add leash boolean.
      参数:
      holder - the holder
      maxDistance - the max distance
      elasticDistanceScale - the elastic distance scale
      reserved - the reserved
      返回:
      the boolean
    • addLeash

      boolean addLeash(net.minecraft.world.entity.Entity holder, Double maxDistance, String reserved)
      Add leash boolean.
      参数:
      holder - the holder
      maxDistance - the max distance
      reserved - the reserved
      返回:
      the boolean
    • addLeash

      boolean addLeash(net.minecraft.world.entity.Entity holder, Double maxDistance, Double elasticDistanceScale, int maxKeepTicks, String reserved)
      Add leash boolean.
      参数:
      holder - the holder
      maxDistance - the max distance
      elasticDistanceScale - the elastic distance scale
      maxKeepTicks - the max keep ticks
      reserved - the reserved
      返回:
      the boolean
    • addLeash

      void addLeash(net.minecraft.world.entity.Entity holder, LeashInfo info)
      Add leash.
      参数:
      holder - the holder
      info - the info
    • addDelayedLeash

      void addDelayedLeash(net.minecraft.world.entity.Entity holder)
      Add delayed leash.
      参数:
      holder - the holder player
    • addDelayedLeash

      void addDelayedLeash(UUID holderUUID)
      Add delayed leash.
      参数:
      holderUUID - the holder uuid
    • removeDelayedLeash

      void removeDelayedLeash(UUID onceHolderPlayerUUID)
      Remove delayed leash.
      参数:
      onceHolderPlayerUUID - the once holder player uuid
    • removeLeash

      boolean removeLeash(net.minecraft.world.entity.Entity holder)
      Remove leash boolean.
      参数:
      holder - the holder
      返回:
      the boolean
    • removeLeash

      boolean removeLeash(UUID holderUUID)
      Remove leash boolean.
      参数:
      holderUUID - the holder uuid
      返回:
      the boolean
    • removeLeash

      boolean removeLeash(net.minecraft.core.BlockPos knotPos)
      Remove leash boolean.
      参数:
      knotPos - the knot pos
      返回:
      the boolean
    • removeAllLeashes

      void removeAllLeashes()
      Remove all leashes.
    • removeAllHolderLeashes

      void removeAllHolderLeashes()
      Remove all holder leashes.
    • removeAllKnotLeashes

      void removeAllKnotLeashes()
      Remove all knot leashes.
    • setMaxDistance

      boolean setMaxDistance(net.minecraft.world.entity.Entity holder, Double distance)
      Sets max distance.
      参数:
      holder - the holder
      distance - the distance
      返回:
      the max distance
    • setMaxDistance

      boolean setMaxDistance(net.minecraft.world.entity.Entity holder, Double distance, String reserved)
      Sets max distance.
      参数:
      holder - the holder
      distance - the distance
      reserved - the reserved
      返回:
      the max distance
    • setMaxDistance

      boolean setMaxDistance(net.minecraft.world.entity.Entity holder, Double distance, int maxKeepTicks)
      Sets max distance.
      参数:
      holder - the holder
      distance - the distance
      maxKeepTicks - the max keep ticks
      返回:
      the max distance
    • setMaxDistance

      boolean setMaxDistance(net.minecraft.world.entity.Entity holder, Double distance, int maxKeepTicks, String reserved)
      Sets max distance.
      参数:
      holder - the holder
      distance - the distance
      maxKeepTicks - the max keep ticks
      reserved - the reserved
      返回:
      the max distance
    • setMaxDistance

      boolean setMaxDistance(UUID holderUUID, Double distance)
      Sets max distance.
      参数:
      holderUUID - the holder uuid
      distance - the distance
      返回:
      the max distance
    • setMaxDistance

      boolean setMaxDistance(UUID holderUUID, Double distance, String reserved)
      Sets max distance.
      参数:
      holderUUID - the holder uuid
      distance - the distance
      reserved - the reserved
      返回:
      the max distance
    • setMaxDistance

      boolean setMaxDistance(UUID holderUUID, Double distance, int maxKeepTicks)
      Sets max distance.
      参数:
      holderUUID - the holder uuid
      distance - the distance
      maxKeepTicks - the max keep ticks
      返回:
      the max distance
    • setMaxDistance

      boolean setMaxDistance(UUID holderUUID, Double distance, int maxKeepTicks, String reserved)
      Sets max distance.
      参数:
      holderUUID - the holder uuid
      distance - the distance
      maxKeepTicks - the max keep ticks
      reserved - the reserved
      返回:
      the max distance
    • setMaxDistance

      boolean setMaxDistance(net.minecraft.core.BlockPos knotPos, Double distance)
      Sets max distance.
      参数:
      knotPos - the knot pos
      distance - the distance
      返回:
      the max distance
    • setMaxDistance

      boolean setMaxDistance(net.minecraft.core.BlockPos knotPos, Double distance, String reserved)
      Sets max distance.
      参数:
      knotPos - the knot pos
      distance - the distance
      reserved - the reserved
      返回:
      the max distance
    • setMaxDistance

      boolean setMaxDistance(net.minecraft.core.BlockPos knotPos, Double distance, int maxKeepTicks)
      Sets max distance.
      参数:
      knotPos - the knot pos
      distance - the distance
      maxKeepTicks - the max keep ticks
      返回:
      the max distance
    • setMaxDistance

      boolean setMaxDistance(net.minecraft.core.BlockPos knotPos, Double distance, int maxKeepTicks, String reserved)
      Sets max distance.
      参数:
      knotPos - the knot pos
      distance - the distance
      maxKeepTicks - the max keep ticks
      reserved - the reserved
      返回:
      the max distance
    • setElasticDistanceScale

      boolean setElasticDistanceScale(net.minecraft.world.entity.Entity holder, Double scale)
      Sets elastic distance scale.
      参数:
      holder - the holder
      scale - the scale
      返回:
      the elastic distance scale
    • setElasticDistanceScale

      boolean setElasticDistanceScale(net.minecraft.world.entity.Entity holder, Double scale, int maxKeepTicks)
      Sets elastic distance scale.
      参数:
      holder - the holder
      scale - the scale
      maxKeepTicks - the max keep ticks
      返回:
      the elastic distance scale
    • setElasticDistanceScale

      boolean setElasticDistanceScale(net.minecraft.world.entity.Entity holder, Double scale, int maxKeepTicks, String reserved)
      Sets elastic distance scale.
      参数:
      holder - the holder
      scale - the scale
      maxKeepTicks - the max keep ticks
      reserved - the reserved
      返回:
      the elastic distance scale
    • setElasticDistanceScale

      boolean setElasticDistanceScale(UUID holderUUID, Double scale)
      Sets elastic distance scale.
      参数:
      holderUUID - the holder uuid
      scale - the scale
      返回:
      the elastic distance scale
    • setElasticDistanceScale

      boolean setElasticDistanceScale(UUID holderUUID, Double scale, int maxKeepTicks)
      Sets elastic distance scale.
      参数:
      holderUUID - the holder uuid
      scale - the scale
      maxKeepTicks - the max keep ticks
      返回:
      the elastic distance scale
    • setElasticDistanceScale

      boolean setElasticDistanceScale(UUID holderUUID, Double scale, int maxKeepTicks, String reserved)
      Sets elastic distance scale.
      参数:
      holderUUID - the holder uuid
      scale - the scale
      maxKeepTicks - the max keep ticks
      reserved - the reserved
      返回:
      the elastic distance scale
    • setElasticDistanceScale

      boolean setElasticDistanceScale(net.minecraft.core.BlockPos knotPos, Double scale)
      Sets elastic distance scale.
      参数:
      knotPos - the knot pos
      scale - the scale
      返回:
      the elastic distance scale
    • setElasticDistanceScale

      boolean setElasticDistanceScale(net.minecraft.core.BlockPos knotPos, Double scale, int maxKeepTicks)
      Sets elastic distance scale.
      参数:
      knotPos - the knot pos
      scale - the scale
      maxKeepTicks - the max keep ticks
      返回:
      the elastic distance scale
    • setElasticDistanceScale

      boolean setElasticDistanceScale(net.minecraft.core.BlockPos knotPos, Double scale, int maxKeepTicks, String reserved)
      Sets elastic distance scale.
      参数:
      knotPos - the knot pos
      scale - the scale
      maxKeepTicks - the max keep ticks
      reserved - the reserved
      返回:
      the elastic distance scale
    • applyLeashForces

      void applyLeashForces()
      Apply leash forces.
    • applyLeashForcesClientPlayer

      void applyLeashForcesClientPlayer()
      Apply leash forces client player.
    • transferLeash

      boolean transferLeash(net.minecraft.world.entity.Entity holder, net.minecraft.world.entity.Entity newHolder)
      Transfer leash boolean.
      参数:
      holder - the holder
      newHolder - the new holder
      返回:
      the boolean
    • transferLeash

      boolean transferLeash(net.minecraft.world.entity.Entity holder, net.minecraft.world.entity.Entity newHolder, String reserved)
      Transfer leash boolean.
      参数:
      holder - the holder
      newHolder - the new holder
      reserved - the reserved
      返回:
      the boolean
    • transferLeash

      boolean transferLeash(UUID holderUUID, net.minecraft.world.entity.Entity newHolder)
      Transfer leash boolean.
      参数:
      holderUUID - the holder uuid
      newHolder - the new holder
      返回:
      the boolean
    • transferLeash

      boolean transferLeash(UUID holderUUID, net.minecraft.world.entity.Entity newHolder, String reserved)
      Transfer leash boolean.
      参数:
      holderUUID - the holder uuid
      newHolder - the new holder
      reserved - the reserved
      返回:
      the boolean
    • transferLeash

      boolean transferLeash(net.minecraft.core.BlockPos knotPos, net.minecraft.world.entity.Entity newHolder)
      Transfer leash boolean.
      参数:
      knotPos - the knot pos
      newHolder - the new holder
      返回:
      the boolean
    • transferLeash

      boolean transferLeash(net.minecraft.core.BlockPos knotPos, net.minecraft.world.entity.Entity newHolder, String reserved)
      Transfer leash boolean.
      参数:
      knotPos - the knot pos
      newHolder - the new holder
      reserved - the reserved
      返回:
      the boolean
    • setMaxKeepTicks

      boolean setMaxKeepTicks(net.minecraft.world.entity.Entity holder, int maxKeepTicks)
      Sets max keep ticks.
      参数:
      holder - the holder
      maxKeepTicks - the max keep ticks
      返回:
      the max keep ticks
    • setMaxKeepTicks

      boolean setMaxKeepTicks(UUID holderUUID, int maxKeepTicks)
      Sets max keep ticks.
      参数:
      holderUUID - the holder uuid
      maxKeepTicks - the max keep ticks
      返回:
      the max keep ticks
    • setMaxKeepTicks

      boolean setMaxKeepTicks(net.minecraft.core.BlockPos knotPos, int maxKeepTicks)
      Sets max keep ticks.
      参数:
      knotPos - the knot pos
      maxKeepTicks - the max keep ticks
      返回:
      the max keep ticks
    • getMaxKeepTicks

      int getMaxKeepTicks(net.minecraft.world.entity.Entity holder)
      Gets max keep ticks.
      参数:
      holder - the holder
      返回:
      the max keep ticks
    • getMaxKeepTicks

      int getMaxKeepTicks(UUID holderUUID)
      Gets max keep ticks.
      参数:
      holderUUID - the holder uuid
      返回:
      the max keep ticks
    • getMaxKeepTicks

      int getMaxKeepTicks(net.minecraft.core.BlockPos knotPos)
      Gets max keep ticks.
      参数:
      knotPos - the knot pos
      返回:
      the max keep ticks
    • hasLeash

      boolean hasLeash()
      Has leash boolean.
      返回:
      the boolean
    • hasKnotLeash

      boolean hasKnotLeash()
      Has knot leash boolean.
      返回:
      the boolean
    • hasHolderLeash

      boolean hasHolderLeash()
      Has holder leash boolean.
      返回:
      the boolean
    • getAllLeashes

      Collection<LeashInfo> getAllLeashes()
      Gets all leashes.
      返回:
      the all leashes
    • getAllHolderLeashes

      Collection<LeashInfo> getAllHolderLeashes()
      Gets all leashes.
      返回:
      the all leashes
    • getAllKnotLeashes

      Collection<LeashInfo> getAllKnotLeashes()
      Gets all leashes.
      返回:
      the all leashes
    • isLeashedBy

      boolean isLeashedBy(net.minecraft.world.entity.Entity holder)
      Is leashed by boolean.
      参数:
      holder - the holder
      返回:
      the boolean
    • isLeashedBy

      boolean isLeashedBy(UUID holderUUID)
      Is leashed by boolean.
      参数:
      holderUUID - the holder uuid
      返回:
      the boolean
    • isLeashedBy

      boolean isLeashedBy(net.minecraft.core.BlockPos knotPos)
      Is leashed by boolean.
      参数:
      knotPos - the knot pos
      返回:
      the boolean
    • isInDelayedLeash

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

      Optional<LeashInfo> getLeashInfo(net.minecraft.world.entity.Entity holder)
      Gets leash info.
      参数:
      holder - the holder
      返回:
      the leash info
    • getLeashInfo

      Optional<LeashInfo> getLeashInfo(UUID holderUUID)
      Gets leash info.
      参数:
      holderUUID - the holder uuid
      返回:
      the leash info
    • getLeashInfo

      Optional<LeashInfo> getLeashInfo(net.minecraft.core.BlockPos knotPos)
      Gets leash info.
      参数:
      knotPos - the knot pos
      返回:
      the leash info
    • canBeLeashed

      boolean canBeLeashed()
      Can be leashed boolean.
      返回:
      the boolean
    • canBeAttachedTo

      boolean canBeAttachedTo(net.minecraft.world.entity.Entity entity)
      Can be attached to boolean.
      参数:
      entity - the entity
      返回:
      the boolean
    • occupyLeash

      Optional<UUID> occupyLeash()
      抢占位(已离线玩家)。 用于解决玩家下线后所持有对象会移除持有者的问题(实际上是占用个弱集合)
      返回:
      the optional
    • markForSync

      void markForSync()
      Mark for sync.
    • immediateSync

      void immediateSync()
      Immediate sync.
    • checkSync

      void checkSync()
      Check sync.