类 LeashConfigManager
java.lang.Object
top.r3944realms.superleadrope.config.LeashConfigManager
The type Leash config manager.
-
字段概要
字段修饰符和类型字段说明static intThe constant cacheHash.static net.minecraft.nbt.CompoundTagThe constant cacheTag.The constant ELASTIC_DISTANCE_CHECK.static final DoubleThe constant ELASTIC_DISTANCE_CHECK.static final DoubleThe constant ELASTIC_DISTANCE_MIN_VALUE.The constant MAX_DISTANCE_CHECK.static final DoubleThe constant MAX_DISTANCE_CHECK.static final DoubleThe constant MAX_DISTANCE_MIN_VALUE. -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidBroad hash packet.int计算配置哈希值(用于快速比较配置是否变化)booleancanEntityAcceptMoreLeashes(net.minecraft.world.entity.Entity entity, int currentCount) Can entity accept more leashes boolean.voidclear()Clear.voiddeserializeFromNBT(net.minecraft.nbt.CompoundTag tag) 从NBT反序列化配置管理器状态Gets axis elasticity.Gets command prefix.net.minecraft.world.phys.Vec3getDefaultEntityOffset(@NotNull net.minecraft.world.entity.Entity entity) Gets default entity offset.net.minecraft.world.phys.Vec3getDefaultEntityOffset(@NotNull net.minecraft.world.entity.EntityType<?> type) Gets default entity offset.net.minecraft.world.phys.Vec3getDefaultHolderOffset(@NotNull net.minecraft.world.entity.Entity entity) Gets default holder offset.net.minecraft.world.phys.Vec3getDefaultHolderOffset(@NotNull net.minecraft.world.entity.EntityType<?> type) Gets default holder offset.doubleGets elastic distance scale.doubleGets extreme snap factor.getFullCommand(String subCommand) Gets full command.doubleGets max force.intGets max leashes per entity.doubleGets max leash length.doubleGets max movement.doubleGets mob spring factor.doubleGets player spring factor.doubleGets spring dampening.getStats()Gets stats.Gets teleport whitelist.doubleGets x elasticity.doubleGets y elasticity.doubleGets z elasticity.booleanIs command prefix enabled boolean.booleanIs enable true damping boolean.booleanisEntityTeleportAllowed(@NotNull net.minecraft.world.entity.Entity entity) Is entity teleport allowed boolean.booleanisEntityTeleportAllowed(@NotNull net.minecraft.world.entity.EntityType<?> type) Is entity teleport allowed boolean.static voidloading(@NotNull LeashConfigManager manager) Loading.voidParse offset config.voidReload all.static voidreloading(@NotNull LeashConfigManager manager) Reloading.net.minecraft.nbt.CompoundTag将配置管理器状态序列化为NBTstatic voidunloading(LeashConfigManager manager) Unloading.
-
字段详细资料
-
MAX_DISTANCE_MAX_VALUE
The constant MAX_DISTANCE_CHECK. -
MAX_DISTANCE_MIN_VALUE
The constant MAX_DISTANCE_MIN_VALUE. -
MAX_DISTANCE_CHECK
The constant MAX_DISTANCE_CHECK. -
ELASTIC_DISTANCE_MAX_VALUE
The constant ELASTIC_DISTANCE_CHECK. -
ELASTIC_DISTANCE_MIN_VALUE
The constant ELASTIC_DISTANCE_MIN_VALUE. -
ELASTIC_DISTANCE_CHECK
The constant ELASTIC_DISTANCE_CHECK. -
cacheTag
public static volatile net.minecraft.nbt.CompoundTag cacheTagThe constant cacheTag. -
cacheHash
public static volatile int cacheHashThe constant cacheHash.
-
-
构造器详细资料
-
LeashConfigManager
public LeashConfigManager()Instantiates a new Leash config manager.
-
-
方法详细资料
-
parseOffsetConfig
public void parseOffsetConfig()Parse offset config. -
getDefaultEntityOffset
public net.minecraft.world.phys.Vec3 getDefaultEntityOffset(@NotNull @NotNull net.minecraft.world.entity.EntityType<?> type) Gets default entity offset.- 参数:
type- the type- 返回:
- the default entity offset
-
getDefaultHolderOffset
public net.minecraft.world.phys.Vec3 getDefaultHolderOffset(@NotNull @NotNull net.minecraft.world.entity.EntityType<?> type) Gets default holder offset.- 参数:
type- the type- 返回:
- the default holder offset
-
getDefaultEntityOffset
public net.minecraft.world.phys.Vec3 getDefaultEntityOffset(@NotNull @NotNull net.minecraft.world.entity.Entity entity) Gets default entity offset.- 参数:
entity- the entity- 返回:
- the default entity offset
-
getDefaultHolderOffset
public net.minecraft.world.phys.Vec3 getDefaultHolderOffset(@NotNull @NotNull net.minecraft.world.entity.Entity entity) Gets default holder offset.- 参数:
entity- the entity- 返回:
- the default holder offset
-
getTeleportWhitelist
Gets teleport whitelist.- 返回:
- the teleport whitelist
-
isEntityTeleportAllowed
public boolean isEntityTeleportAllowed(@NotNull @NotNull net.minecraft.world.entity.EntityType<?> type) Is entity teleport allowed boolean.- 参数:
type- the type- 返回:
- the boolean
-
isEntityTeleportAllowed
public boolean isEntityTeleportAllowed(@NotNull @NotNull net.minecraft.world.entity.Entity entity) Is entity teleport allowed boolean.- 参数:
entity- the entity- 返回:
- the boolean
-
getCommandPrefix
Gets command prefix.- 返回:
- the command prefix
-
isCommandPrefixEnabled
public boolean isCommandPrefixEnabled()Is command prefix enabled boolean.- 返回:
- the boolean
-
getFullCommand
Gets full command.- 参数:
subCommand- the sub command- 返回:
- the full command
-
isEnableTrueDamping
public boolean isEnableTrueDamping()Is enable true damping boolean.- 返回:
- the boolean
-
getMaxForce
public double getMaxForce()Gets max force.- 返回:
- the max force
-
getPlayerSpringFactor
public double getPlayerSpringFactor()Gets player spring factor.- 返回:
- the player spring factor
-
getMobSpringFactor
public double getMobSpringFactor()Gets mob spring factor.- 返回:
- the mob spring factor
-
getMaxLeashLength
public double getMaxLeashLength()Gets max leash length.- 返回:
- the max leash length
-
getMaxMovement
public double getMaxMovement()Gets max movement.- 返回:
- the max movement
-
getElasticDistanceScale
public double getElasticDistanceScale()Gets elastic distance scale.- 返回:
- the elastic distance scale
-
getExtremeSnapFactor
public double getExtremeSnapFactor()Gets extreme snap factor.- 返回:
- the extreme snap factor
-
getSpringDampening
public double getSpringDampening()Gets spring dampening.- 返回:
- the spring dampening
-
getAxisElasticity
Gets axis elasticity.- 返回:
- the axis elasticity
-
getXElasticity
public double getXElasticity()Gets x elasticity.- 返回:
- the x elasticity
-
getYElasticity
public double getYElasticity()Gets y elasticity.- 返回:
- the y elasticity
-
getZElasticity
public double getZElasticity()Gets z elasticity.- 返回:
- the z elasticity
-
getMaxLeashesPerEntity
public int getMaxLeashesPerEntity()Gets max leashes per entity.- 返回:
- the max leashes per entity
-
canEntityAcceptMoreLeashes
public boolean canEntityAcceptMoreLeashes(net.minecraft.world.entity.Entity entity, int currentCount) Can entity accept more leashes boolean.- 参数:
entity- the entitycurrentCount- the current count- 返回:
- the boolean
-
reloadAll
public void reloadAll()Reload all. -
clear
public void clear()Clear. -
loading
Loading.- 参数:
manager- the manager
-
reloading
Reloading.- 参数:
manager- the manager
-
unloading
Unloading.- 参数:
manager- the manager
-
serializeToNBT
public net.minecraft.nbt.CompoundTag serializeToNBT()将配置管理器状态序列化为NBT- 返回:
- the compound tag
-
deserializeFromNBT
public void deserializeFromNBT(net.minecraft.nbt.CompoundTag tag) 从NBT反序列化配置管理器状态- 参数:
tag- the tag
-
calculateConfigHash
public int calculateConfigHash()计算配置哈希值(用于快速比较配置是否变化)- 返回:
- the int
-
broadHashPacket
public void broadHashPacket()Broad hash packet. -
getStats
Gets stats.- 返回:
- the stats
-