接口 ILeashData
- 所有超级接口:
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.
-
方法概要
修饰符和类型方法说明voidaddDelayedLeash(UUID holderUUID) Add delayed leash.voidaddDelayedLeash(net.minecraft.world.entity.Entity holder) Add delayed leash.booleanaddLeash(net.minecraft.world.entity.Entity holder) Add leash boolean.booleanAdd leash boolean.booleanAdd leash boolean.booleanaddLeash(net.minecraft.world.entity.Entity holder, Double maxDistance, Double elasticDistanceScale, int maxKeepTicks) Add leash boolean.booleanaddLeash(net.minecraft.world.entity.Entity holder, Double maxDistance, Double elasticDistanceScale, int maxKeepTicks, String reserved) Add leash boolean.booleanaddLeash(net.minecraft.world.entity.Entity holder, Double maxDistance, Double elasticDistanceScale, String reserved) Add leash boolean.booleanAdd leash boolean.booleanAdd leash boolean.voidAdd leash.voidApply leash forces.voidApply leash forces client player.booleancanBeAttachedTo(net.minecraft.world.entity.Entity entity) Can be attached to boolean.booleanCan be leashed boolean.voidCheck sync.Gets all leashes.Gets all leashes.Gets all leashes.doubleGets current elastic distance scale.doubleGets current max distance.doubleGets default elastic distance scale.doubleGets default max distance.getLeashInfo(UUID holderUUID) Gets leash info.getLeashInfo(net.minecraft.core.BlockPos knotPos) Gets leash info.getLeashInfo(net.minecraft.world.entity.Entity holder) Gets leash info.intgetMaxKeepTicks(UUID holderUUID) Gets max keep ticks.intgetMaxKeepTicks(net.minecraft.core.BlockPos knotPos) Gets max keep ticks.intgetMaxKeepTicks(net.minecraft.world.entity.Entity holder) Gets max keep ticks.Gets static elastic distance scale.Gets static max distance.booleanHas holder leash boolean.booleanHas knot leash boolean.booleanhasLeash()Has leash boolean.voidImmediate sync.booleanisInDelayedLeash(UUID holderUUID) Is in delayed leash boolean.booleanisLeashedBy(UUID holderUUID) Is leashed by boolean.booleanisLeashedBy(net.minecraft.core.BlockPos knotPos) Is leashed by boolean.booleanisLeashedBy(net.minecraft.world.entity.Entity holder) Is leashed by boolean.voidMark for sync.抢占位(已离线玩家)。voidRemove all holder leashes.voidRemove all knot leashes.voidRemove all leashes.voidremoveDelayedLeash(UUID onceHolderPlayerUUID) Remove delayed leash.booleanremoveLeash(UUID holderUUID) Remove leash boolean.booleanremoveLeash(net.minecraft.core.BlockPos knotPos) Remove leash boolean.booleanremoveLeash(net.minecraft.world.entity.Entity holder) Remove leash boolean.net.minecraft.world.entity.Entityself()Self entity.booleansetElasticDistanceScale(UUID holderUUID, Double scale) Sets elastic distance scale.booleansetElasticDistanceScale(UUID holderUUID, Double scale, int maxKeepTicks) Sets elastic distance scale.booleansetElasticDistanceScale(UUID holderUUID, Double scale, int maxKeepTicks, String reserved) Sets elastic distance scale.booleansetElasticDistanceScale(net.minecraft.core.BlockPos knotPos, Double scale) Sets elastic distance scale.booleansetElasticDistanceScale(net.minecraft.core.BlockPos knotPos, Double scale, int maxKeepTicks) Sets elastic distance scale.booleansetElasticDistanceScale(net.minecraft.core.BlockPos knotPos, Double scale, int maxKeepTicks, String reserved) Sets elastic distance scale.booleansetElasticDistanceScale(net.minecraft.world.entity.Entity holder, Double scale) Sets elastic distance scale.booleansetElasticDistanceScale(net.minecraft.world.entity.Entity holder, Double scale, int maxKeepTicks) Sets elastic distance scale.booleansetElasticDistanceScale(net.minecraft.world.entity.Entity holder, Double scale, int maxKeepTicks, String reserved) Sets elastic distance scale.booleansetMaxDistance(UUID holderUUID, Double distance) Sets max distance.booleansetMaxDistance(UUID holderUUID, Double distance, int maxKeepTicks) Sets max distance.booleansetMaxDistance(UUID holderUUID, Double distance, int maxKeepTicks, String reserved) Sets max distance.booleansetMaxDistance(UUID holderUUID, Double distance, String reserved) Sets max distance.booleansetMaxDistance(net.minecraft.core.BlockPos knotPos, Double distance) Sets max distance.booleansetMaxDistance(net.minecraft.core.BlockPos knotPos, Double distance, int maxKeepTicks) Sets max distance.booleansetMaxDistance(net.minecraft.core.BlockPos knotPos, Double distance, int maxKeepTicks, String reserved) Sets max distance.booleansetMaxDistance(net.minecraft.core.BlockPos knotPos, Double distance, String reserved) Sets max distance.booleansetMaxDistance(net.minecraft.world.entity.Entity holder, Double distance) Sets max distance.booleansetMaxDistance(net.minecraft.world.entity.Entity holder, Double distance, int maxKeepTicks) Sets max distance.booleansetMaxDistance(net.minecraft.world.entity.Entity holder, Double distance, int maxKeepTicks, String reserved) Sets max distance.booleansetMaxDistance(net.minecraft.world.entity.Entity holder, Double distance, String reserved) Sets max distance.booleansetMaxKeepTicks(UUID holderUUID, int maxKeepTicks) Sets max keep ticks.booleansetMaxKeepTicks(net.minecraft.core.BlockPos knotPos, int maxKeepTicks) Sets max keep ticks.booleansetMaxKeepTicks(net.minecraft.world.entity.Entity holder, int maxKeepTicks) Sets max keep ticks.voidsetStaticElasticDistanceScale(Double distance) Sets static elastic distance scale.voidsetStaticMaxDistance(Double distance) Sets static max distance.booleantransferLeash(UUID holderUUID, net.minecraft.world.entity.Entity newHolder) Transfer leash boolean.booleantransferLeash(UUID holderUUID, net.minecraft.world.entity.Entity newHolder, String reserved) Transfer leash boolean.booleantransferLeash(net.minecraft.core.BlockPos knotPos, net.minecraft.world.entity.Entity newHolder) Transfer leash boolean.booleantransferLeash(net.minecraft.core.BlockPos knotPos, net.minecraft.world.entity.Entity newHolder, String reserved) Transfer leash boolean.booleantransferLeash(net.minecraft.world.entity.Entity holder, net.minecraft.world.entity.Entity newHolder) Transfer leash boolean.booleantransferLeash(net.minecraft.world.entity.Entity holder, net.minecraft.world.entity.Entity newHolder, String reserved) Transfer leash boolean.default voidUpdate all.voidUpdate all elastic distance scale.voidUpdate all max distance.从接口继承的方法 net.minecraftforge.common.util.INBTSerializable
deserializeNBT, serializeNBT
-
方法详细资料
-
self
net.minecraft.world.entity.Entity self()Self entity.- 返回:
- the entity
-
getStaticMaxDistance
Double getStaticMaxDistance()Gets static max distance.- 返回:
- the static max distance
-
setStaticMaxDistance
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
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
Add leash boolean.- 参数:
holder- the holderreserved- the reserved- 返回:
- the boolean
-
addLeash
Add leash boolean.- 参数:
holder- the holdermaxDistance- the max distance- 返回:
- the boolean
-
addLeash
boolean addLeash(net.minecraft.world.entity.Entity holder, Double maxDistance, Double elasticDistanceScale) Add leash boolean.- 参数:
holder- the holdermaxDistance- the max distanceelasticDistanceScale- 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 holdermaxDistance- the max distanceelasticDistanceScale- the elastic distance scalemaxKeepTicks- 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 holdermaxDistance- the max distanceelasticDistanceScale- the elastic distance scalereserved- the reserved- 返回:
- the boolean
-
addLeash
Add leash boolean.- 参数:
holder- the holdermaxDistance- the max distancereserved- 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 holdermaxDistance- the max distanceelasticDistanceScale- the elastic distance scalemaxKeepTicks- the max keep ticksreserved- the reserved- 返回:
- the boolean
-
addLeash
Add leash.- 参数:
holder- the holderinfo- the info
-
addDelayedLeash
void addDelayedLeash(net.minecraft.world.entity.Entity holder) Add delayed leash.- 参数:
holder- the holder player
-
addDelayedLeash
Add delayed leash.- 参数:
holderUUID- the holder uuid
-
removeDelayedLeash
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
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
Sets max distance.- 参数:
holder- the holderdistance- the distance- 返回:
- the max distance
-
setMaxDistance
Sets max distance.- 参数:
holder- the holderdistance- the distancereserved- the reserved- 返回:
- the max distance
-
setMaxDistance
Sets max distance.- 参数:
holder- the holderdistance- the distancemaxKeepTicks- 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 holderdistance- the distancemaxKeepTicks- the max keep ticksreserved- the reserved- 返回:
- the max distance
-
setMaxDistance
Sets max distance.- 参数:
holderUUID- the holder uuiddistance- the distance- 返回:
- the max distance
-
setMaxDistance
Sets max distance.- 参数:
holderUUID- the holder uuiddistance- the distancereserved- the reserved- 返回:
- the max distance
-
setMaxDistance
Sets max distance.- 参数:
holderUUID- the holder uuiddistance- the distancemaxKeepTicks- the max keep ticks- 返回:
- the max distance
-
setMaxDistance
Sets max distance.- 参数:
holderUUID- the holder uuiddistance- the distancemaxKeepTicks- the max keep ticksreserved- the reserved- 返回:
- the max distance
-
setMaxDistance
Sets max distance.- 参数:
knotPos- the knot posdistance- the distance- 返回:
- the max distance
-
setMaxDistance
Sets max distance.- 参数:
knotPos- the knot posdistance- the distancereserved- the reserved- 返回:
- the max distance
-
setMaxDistance
Sets max distance.- 参数:
knotPos- the knot posdistance- the distancemaxKeepTicks- 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 posdistance- the distancemaxKeepTicks- the max keep ticksreserved- the reserved- 返回:
- the max distance
-
setElasticDistanceScale
Sets elastic distance scale.- 参数:
holder- the holderscale- 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 holderscale- the scalemaxKeepTicks- 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 holderscale- the scalemaxKeepTicks- the max keep ticksreserved- the reserved- 返回:
- the elastic distance scale
-
setElasticDistanceScale
Sets elastic distance scale.- 参数:
holderUUID- the holder uuidscale- the scale- 返回:
- the elastic distance scale
-
setElasticDistanceScale
Sets elastic distance scale.- 参数:
holderUUID- the holder uuidscale- the scalemaxKeepTicks- the max keep ticks- 返回:
- the elastic distance scale
-
setElasticDistanceScale
Sets elastic distance scale.- 参数:
holderUUID- the holder uuidscale- the scalemaxKeepTicks- the max keep ticksreserved- the reserved- 返回:
- the elastic distance scale
-
setElasticDistanceScale
Sets elastic distance scale.- 参数:
knotPos- the knot posscale- 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 posscale- the scalemaxKeepTicks- 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 posscale- the scalemaxKeepTicks- the max keep ticksreserved- 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 holdernewHolder- 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 holdernewHolder- the new holderreserved- the reserved- 返回:
- the boolean
-
transferLeash
Transfer leash boolean.- 参数:
holderUUID- the holder uuidnewHolder- the new holder- 返回:
- the boolean
-
transferLeash
boolean transferLeash(UUID holderUUID, net.minecraft.world.entity.Entity newHolder, String reserved) Transfer leash boolean.- 参数:
holderUUID- the holder uuidnewHolder- the new holderreserved- the reserved- 返回:
- the boolean
-
transferLeash
boolean transferLeash(net.minecraft.core.BlockPos knotPos, net.minecraft.world.entity.Entity newHolder) Transfer leash boolean.- 参数:
knotPos- the knot posnewHolder- 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 posnewHolder- the new holderreserved- the reserved- 返回:
- the boolean
-
setMaxKeepTicks
boolean setMaxKeepTicks(net.minecraft.world.entity.Entity holder, int maxKeepTicks) Sets max keep ticks.- 参数:
holder- the holdermaxKeepTicks- the max keep ticks- 返回:
- the max keep ticks
-
setMaxKeepTicks
Sets max keep ticks.- 参数:
holderUUID- the holder uuidmaxKeepTicks- 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 posmaxKeepTicks- 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
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
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
Is in delayed leash boolean.- 参数:
holderUUID- the holder uuid- 返回:
- the boolean
-
getLeashInfo
Gets leash info.- 参数:
holder- the holder- 返回:
- the leash info
-
getLeashInfo
Gets leash info.- 参数:
holderUUID- the holder uuid- 返回:
- the leash info
-
getLeashInfo
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
抢占位(已离线玩家)。 用于解决玩家下线后所持有对象会移除持有者的问题(实际上是占用个弱集合)- 返回:
- the optional
-
markForSync
void markForSync()Mark for sync. -
immediateSync
void immediateSync()Immediate sync. -
checkSync
void checkSync()Check sync.
-