类 SpawnerEntry
java.lang.Object
org.bukkit.block.spawner.SpawnerEntry
Represents a weighted spawn potential that can be added to a monster spawner.
-
嵌套类概要
嵌套类修饰符和类型类说明static classRepresents 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) -
方法概要
修饰符和类型方法说明Gets the equipment which will be applied to the spawned entity.Gets theEntitySnapshotfor this SpawnerEntry.Gets a copy of theSpawnRulefor this SpawnerEntry, or null if none has been set.intGets the weight for this SpawnerEntry, when added to a spawner entries with higher weight will spawn more often.voidsetEquipment(@Nullable SpawnerEntry.Equipment equipment) Sets the equipment which will be applied to the spawned entity.voidsetSnapshot(@NotNull EntitySnapshot snapshot) Sets theEntitySnapshotfor this SpawnerEntry.voidsetSpawnRule(@Nullable SpawnRule spawnRule) Sets theSpawnRulefor this SpawnerEntry, null may be used to clear the current spawn rule.voidsetSpawnWeight(int spawnWeight) Sets the weight for this SpawnerEntry, when added to a spawner entries with higher weight will spawn more often.
-
构造器详细资料
-
SpawnerEntry
-
SpawnerEntry
public SpawnerEntry(@NotNull @NotNull EntitySnapshot snapshot, int spawnWeight, @Nullable @Nullable SpawnRule spawnRule, @Nullable @Nullable SpawnerEntry.Equipment equipment)
-
-
方法详细资料
-
getSnapshot
Gets theEntitySnapshotfor this SpawnerEntry.- 返回:
- the snapshot
-
setSnapshot
Sets theEntitySnapshotfor 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
Gets a copy of theSpawnRulefor this SpawnerEntry, or null if none has been set.- 返回:
- a copy of the spawn rule or null
-
setSpawnRule
Sets theSpawnRulefor this SpawnerEntry, null may be used to clear the current spawn rule.- 参数:
spawnRule- the new spawn rule to use or null
-
getEquipment
Gets the equipment which will be applied to the spawned entity.- 返回:
- the equipment, or null
-
setEquipment
Sets the equipment which will be applied to the spawned entity.- 参数:
equipment- new equipment, or null
-