类 SpawnerEntry
java.lang.Object
org.bukkit.block.spawner.SpawnerEntry
表示一个可以添加到怪物生成器的加权生成潜力。
原文:Represents a weighted spawn potential that can be added to a monster spawner.
-
嵌套类概要
嵌套类 -
构造器概要
构造器构造器说明SpawnerEntry(@NotNull EntitySnapshot snapshot, int spawnWeight, @Nullable SpawnRule spawnRule) SpawnerEntry(@NotNull EntitySnapshot snapshot, int spawnWeight, @Nullable SpawnRule spawnRule, @Nullable SpawnerEntry.Equipment equipment) -
方法概要
修饰符和类型方法说明获取将应用于生成实体的装备。获取此SpawnerEntry的EntitySnapshot。获取此SpawnerEntry的SpawnRule的副本,如果没有设置则返回null。int获取此SpawnerEntry的权重,当添加到生成器时,权重较高的条目会更频繁地生成。voidsetEquipment(@Nullable SpawnerEntry.Equipment equipment) 设置将应用于生成实体的装备。voidsetSnapshot(@NotNull EntitySnapshot snapshot) 设置此SpawnerEntry的EntitySnapshot。voidsetSpawnRule(@Nullable SpawnRule spawnRule) 设置此SpawnerEntry的SpawnRule,可以使用null来清除当前的生成规则。voidsetSpawnWeight(int spawnWeight) 设置此SpawnerEntry的权重,当添加到生成器时,权重较高的条目会更频繁地生成。
-
构造器详细资料
-
SpawnerEntry
-
SpawnerEntry
public SpawnerEntry(@NotNull @NotNull EntitySnapshot snapshot, int spawnWeight, @Nullable @Nullable SpawnRule spawnRule, @Nullable @Nullable SpawnerEntry.Equipment equipment)
-
-
方法详细资料
-
getSnapshot
获取此SpawnerEntry的EntitySnapshot。 原文:Gets theEntitySnapshotfor this SpawnerEntry.- 返回:
- 实体快照 原文:the snapshot
-
setSnapshot
设置此SpawnerEntry的EntitySnapshot。 原文:Sets theEntitySnapshotfor 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
获取此SpawnerEntry的SpawnRule的副本,如果没有设置则返回null。 原文:Gets a copy of theSpawnRulefor this SpawnerEntry, or null if none has been set.- 返回:
- 生成规则的副本或null 原文:a copy of the spawn rule or null
-
setSpawnRule
设置此SpawnerEntry的SpawnRule,可以使用null来清除当前的生成规则。 原文:Sets theSpawnRulefor 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
设置将应用于生成实体的装备。 原文:Sets the equipment which will be applied to the spawned entity.- 参数:
equipment- 新装备,或null 原文:new equipment, or null
-