Enum Class MobCategory

java.lang.Object
java.lang.Enum<MobCategory>
net.minecraft.world.entity.MobCategory
所有已实现的接口:
Serializable, Comparable<MobCategory>, Constable, StringRepresentable, IExtensibleEnum

public enum MobCategory extends Enum<MobCategory> implements StringRepresentable, IExtensibleEnum
  • 枚举常量详细资料

    • MONSTER

      public static final MobCategory MONSTER
    • CREATURE

      public static final MobCategory CREATURE
    • AMBIENT

      public static final MobCategory AMBIENT
    • AXOLOTLS

      public static final MobCategory AXOLOTLS
    • UNDERGROUND_WATER_CREATURE

      public static final MobCategory UNDERGROUND_WATER_CREATURE
    • WATER_CREATURE

      public static final MobCategory WATER_CREATURE
    • WATER_AMBIENT

      public static final MobCategory WATER_AMBIENT
    • MISC

      public static final MobCategory MISC
  • 字段详细资料

    • CODEC

      public static final com.mojang.serialization.Codec<MobCategory> CODEC
    • BY_NAME

      private static final Map<String,MobCategory> BY_NAME
    • max

      private final int max
    • isFriendly

      private final boolean isFriendly
    • isPersistent

      private final boolean isPersistent
    • name

      private final String name
    • noDespawnDistance

      private final int noDespawnDistance
      另请参阅:
    • despawnDistance

      private final int despawnDistance
  • 构造器详细资料

    • MobCategory

      private MobCategory(String pName, int pMax, boolean pIsFriendly, boolean pIsPersistent, int pDespawnDistance)
  • 方法详细资料

    • values

      public static MobCategory[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      返回:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static MobCategory valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      参数:
      name - 要返回的枚举常量的名称。
      返回:
      返回带有指定名称的枚举常量
      抛出:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - 如果参数为空值
    • getName

      public String getName()
    • getSerializedName

      public String getSerializedName()
      指定者:
      getSerializedName 在接口中 StringRepresentable
    • getMaxInstancesPerChunk

      public int getMaxInstancesPerChunk()
    • isFriendly

      public boolean isFriendly()
    • isPersistent

      public boolean isPersistent()
    • create

      public static MobCategory create(String name, String id, int maxNumberOfCreatureIn, boolean isPeacefulCreatureIn, boolean isAnimalIn, int despawnDistance)
    • init

      @Deprecated public void init()
      已过时。
      从接口复制的说明: IExtensibleEnum
      Called by generated factory code to do any post-constructor setup required by the enum. Should not be called manually.
      指定者:
      init 在接口中 IExtensibleEnum
    • byName

      public static MobCategory byName(String name)
    • getDespawnDistance

      public int getDespawnDistance()
    • getNoDespawnDistance

      public int getNoDespawnDistance()