类 SpawnerEntry

java.lang.Object
org.bukkit.block.spawner.SpawnerEntry

public class SpawnerEntry extends Object
表示一个可以添加到怪物生成器的加权生成潜力。 原文:Represents a weighted spawn potential that can be added to a monster spawner.
  • 构造器详细资料

  • 方法详细资料

    • getSnapshot

      @NotNull public @NotNull EntitySnapshot getSnapshot()
      获取此SpawnerEntry的EntitySnapshot。 原文:Gets the EntitySnapshot for this SpawnerEntry.
      返回:
      实体快照 原文:the snapshot
    • setSnapshot

      public void setSnapshot(@NotNull @NotNull EntitySnapshot snapshot)
      设置此SpawnerEntry的EntitySnapshot。 原文:Sets the EntitySnapshot for this SpawnerEntry.
      参数:
      snapshot - 实体快照 原文:the snapshot
    • getSpawnWeight

      public int getSpawnWeight()
      获取此SpawnerEntry的权重,当添加到生成器时,权重较高的条目会更频繁地生成。 原文:Gets the weight for this SpawnerEntry, when added to a spawner entries with higher weight will spawn more often.
      返回:
      权重值 原文:the weight
    • setSpawnWeight

      public void setSpawnWeight(int spawnWeight)
      设置此SpawnerEntry的权重,当添加到生成器时,权重较高的条目会更频繁地生成。 原文:Sets the weight for this SpawnerEntry, when added to a spawner entries with higher weight will spawn more often.
      参数:
      spawnWeight - 新的生成权重 原文:the new spawn weight
    • getSpawnRule

      @Nullable public @Nullable SpawnRule getSpawnRule()
      获取此SpawnerEntry的SpawnRule的副本,如果没有设置则返回null。 原文:Gets a copy of the SpawnRule for this SpawnerEntry, or null if none has been set.
      返回:
      生成规则的副本或null 原文:a copy of the spawn rule or null
    • setSpawnRule

      public void setSpawnRule(@Nullable @Nullable SpawnRule spawnRule)
      设置此SpawnerEntry的SpawnRule,可以使用null来清除当前的生成规则。 原文:Sets the SpawnRule for this SpawnerEntry, null may be used to clear the current spawn rule.
      参数:
      spawnRule - 要使用的新生成规则或null 原文:the new spawn rule to use or null
    • getEquipment

      获取将应用于生成实体的装备。 原文:Gets the equipment which will be applied to the spawned entity.
      返回:
      装备,或null 原文:the equipment, or null
    • setEquipment

      public void setEquipment(@Nullable @Nullable SpawnerEntry.Equipment equipment)
      设置将应用于生成实体的装备。 原文:Sets the equipment which will be applied to the spawned entity.
      参数:
      equipment - 新装备,或null 原文:new equipment, or null