程序包 org.bukkit.block.spawner

# 类 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.

- ## 嵌套类概要

  嵌套类
  修饰符和类型
  类
  说明
  `static class`
  `SpawnerEntry.Equipment`
  Represents the equipment loot table applied to a spawned entity.

- ## 构造器概要

  构造器
  构造器
  说明
  `SpawnerEntry(@NotNull EntitySnapshot snapshot, int spawnWeight, @Nullable SpawnRule spawnRule)`
  `SpawnerEntry(@NotNull EntitySnapshot snapshot, int spawnWeight, @Nullable SpawnRule spawnRule, @Nullable SpawnerEntry.Equipment equipment)`

- ## 方法概要

  修饰符和类型
  方法
  说明
  `@Nullable SpawnerEntry.Equipment`
  `getEquipment()`
  Gets the equipment which will be applied to the spawned entity.
  `@NotNull EntitySnapshot`
  `getSnapshot()`
  Gets the `EntitySnapshot` for this SpawnerEntry.
  `@Nullable SpawnRule`
  `getSpawnRule()`
  Gets a copy of the `SpawnRule` for this SpawnerEntry, or null if none has been set.
  `int`
  `getSpawnWeight()`
  Gets the weight for this SpawnerEntry, when added to a spawner entries with higher weight will spawn more often.
  `void`
  `setEquipment(@Nullable SpawnerEntry.Equipment equipment)`
  Sets the equipment which will be applied to the spawned entity.
  `void`
  `setSnapshot(@NotNull EntitySnapshot snapshot)`
  Sets the `EntitySnapshot` for this SpawnerEntry.
  `void`
  `setSpawnRule(@Nullable SpawnRule spawnRule)`
  Sets the `SpawnRule` for this SpawnerEntry, null may be used to clear the current spawn rule.
  `void`
  `setSpawnWeight(int spawnWeight)`
  Sets the weight for this SpawnerEntry, when added to a spawner entries with higher weight will spawn more often.

  ### 从类继承的方法 java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 构造器详细资料

  - ### SpawnerEntry

    public SpawnerEntry(@NotNull @NotNull EntitySnapshot snapshot, int spawnWeight, @Nullable @Nullable SpawnRule spawnRule)

  - ### SpawnerEntry

    public SpawnerEntry(@NotNull @NotNull EntitySnapshot snapshot, int spawnWeight, @Nullable @Nullable SpawnRule spawnRule, @Nullable @Nullable SpawnerEntry.Equipment equipment)

- ## 方法详细资料

  - ### getSnapshot

    @NotNull public @NotNull EntitySnapshot getSnapshot()
    Gets the `EntitySnapshot` for this SpawnerEntry.
    返回:
      the snapshot

  - ### setSnapshot

    public void setSnapshot(@NotNull @NotNull EntitySnapshot snapshot)
    Sets the `EntitySnapshot` for this SpawnerEntry.
    参数:
      `snapshot` - the snapshot

  - ### getSpawnWeight

    public int getSpawnWeight()
    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)
    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()
    Gets a copy of the `SpawnRule` for this SpawnerEntry, or null if none has been set.
    返回:
      a copy of the spawn rule or null

  - ### setSpawnRule

    public void setSpawnRule(@Nullable @Nullable SpawnRule spawnRule)
    Sets the `SpawnRule` for this SpawnerEntry, null may be used to clear the current spawn rule.
    参数:
      `spawnRule` - the new spawn rule to use or null

  - ### getEquipment

    @Nullable public @Nullable SpawnerEntry.Equipment getEquipment()
    Gets the equipment which will be applied to the spawned entity.
    返回:
      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` - new equipment, or null