类 LeashConfigManager

java.lang.Object
top.r3944realms.superleadrope.config.LeashConfigManager

public class LeashConfigManager extends Object
The type Leash config manager.
  • 字段详细资料

    • MAX_DISTANCE_MAX_VALUE

      public static final Double MAX_DISTANCE_MAX_VALUE
      The constant MAX_DISTANCE_CHECK.
    • MAX_DISTANCE_MIN_VALUE

      public static final Double MAX_DISTANCE_MIN_VALUE
      The constant MAX_DISTANCE_MIN_VALUE.
    • MAX_DISTANCE_CHECK

      public static final Predicate<Double> MAX_DISTANCE_CHECK
      The constant MAX_DISTANCE_CHECK.
    • ELASTIC_DISTANCE_MAX_VALUE

      public static final Double ELASTIC_DISTANCE_MAX_VALUE
      The constant ELASTIC_DISTANCE_CHECK.
    • ELASTIC_DISTANCE_MIN_VALUE

      public static final Double ELASTIC_DISTANCE_MIN_VALUE
      The constant ELASTIC_DISTANCE_MIN_VALUE.
    • ELASTIC_DISTANCE_CHECK

      public static final Predicate<Double> ELASTIC_DISTANCE_CHECK
      The constant ELASTIC_DISTANCE_CHECK.
    • cacheTag

      public static volatile net.minecraft.nbt.CompoundTag cacheTag
      The constant cacheTag.
    • cacheHash

      public static volatile int cacheHash
      The 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

      public List<String> 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

      public String getCommandPrefix()
      Gets command prefix.
      返回:
      the command prefix
    • isCommandPrefixEnabled

      public boolean isCommandPrefixEnabled()
      Is command prefix enabled boolean.
      返回:
      the boolean
    • getFullCommand

      public String getFullCommand(String subCommand)
      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

      public List<Double> 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 entity
      currentCount - the current count
      返回:
      the boolean
    • reloadAll

      public void reloadAll()
      Reload all.
    • clear

      public void clear()
      Clear.
    • loading

      public static void loading(@NotNull @NotNull LeashConfigManager manager)
      Loading.
      参数:
      manager - the manager
    • reloading

      public static void reloading(@NotNull @NotNull LeashConfigManager manager)
      Reloading.
      参数:
      manager - the manager
    • unloading

      public static void unloading(LeashConfigManager manager)
      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

      public String getStats()
      Gets stats.
      返回:
      the stats