类 SpawnRule

java.lang.Object
org.bukkit.block.spawner.SpawnRule
所有已实现的接口:
Cloneable, ConfigurationSerializable

public class SpawnRule extends Object implements Cloneable, ConfigurationSerializable
Represents a spawn rule that controls what conditions an entity from a monster spawner can spawn.
  • 构造器详细资料

    • SpawnRule

      public SpawnRule(int minBlockLight, int maxBlockLight, int minSkyLight, int maxSkyLight)
      Constructs a new SpawnRule.
      参数:
      minBlockLight - The minimum (inclusive) block light required for spawning to succeed.
      maxBlockLight - The maximum (inclusive) block light required for spawning to succeed.
      minSkyLight - The minimum (inclusive) sky light required for spawning to succeed.
      maxSkyLight - The maximum (inclusive) sky light required for spawning to succeed.
  • 方法详细资料

    • getMinBlockLight

      public int getMinBlockLight()
      Gets the minimum (inclusive) block light required for spawning to succeed.
      返回:
      minimum block light
    • setMinBlockLight

      public void setMinBlockLight(int minBlockLight)
      Sets the minimum (inclusive) block light required for spawning to succeed.
      参数:
      minBlockLight - minimum block light
    • getMaxBlockLight

      public int getMaxBlockLight()
      Gets the maximum (inclusive) block light required for spawning to succeed.
      返回:
      maximum block light
    • setMaxBlockLight

      public void setMaxBlockLight(int maxBlockLight)
      Sets the maximum (inclusive) block light required for spawning to succeed.
      参数:
      maxBlockLight - maximum block light
    • getMinSkyLight

      public int getMinSkyLight()
      Gets the minimum (inclusive) sky light required for spawning to succeed.
      返回:
      minimum sky light
    • setMinSkyLight

      public void setMinSkyLight(int minSkyLight)
      Sets the minimum (inclusive) sky light required for spawning to succeed.
      参数:
      minSkyLight - minimum sky light
    • getMaxSkyLight

      public int getMaxSkyLight()
      Gets the maximum (inclusive) sky light required for spawning to succeed.
      返回:
      maximum sky light
    • setMaxSkyLight

      public void setMaxSkyLight(int maxSkyLight)
      Sets the maximum (inclusive) sky light required for spawning to succeed.
      参数:
      maxSkyLight - maximum sky light
    • equals

      public boolean equals(Object obj)
      覆盖:
      equals 在类中 Object
    • hashCode

      public int hashCode()
      覆盖:
      hashCode 在类中 Object
    • clone

      @NotNull public @NotNull SpawnRule clone()
      覆盖:
      clone 在类中 Object
    • serialize

      @NotNull public @NotNull Map<String,Object> serialize()
      从接口复制的说明: ConfigurationSerializable
      Creates a Map representation of this class.

      This class must provide a method to restore this class, as defined in the ConfigurationSerializable interface javadocs.

      指定者:
      serialize 在接口中 ConfigurationSerializable
      返回:
      Map containing the current state of this class
    • deserialize

      @NotNull public static @NotNull SpawnRule deserialize(@NotNull @NotNull Map<String,Object> args)