接口 SpawnEggMeta
代表刷怪蛋和它刷出的实体的类型.
-
方法概要
修饰符和类型方法说明clone()获取此刷怪蛋将会生成的EntitySnapshot, 如果未设置实体则返回 null.已过时。不同实体类型对应不同的刷怪蛋物品voidsetSpawnedEntity(@NotNull EntitySnapshot snapshot) 设置此刷怪蛋将会生成的EntitySnapshot.voidsetSpawnedType(EntityType type) 已过时。不同实体类型对应不同的刷怪蛋物品从接口继承的方法 org.bukkit.configuration.serialization.ConfigurationSerializable
serialize从接口继承的方法 org.bukkit.inventory.meta.ItemMeta
addAttributeModifier, addEnchant, addItemFlags, getAdditionalTradeCost, getAsComponentString, getAsString, getAttackRange, getAttributeModifiers, getAttributeModifiers, getAttributeModifiers, getBlocksAttacks, getBreakSound, getConsumable, getCustomModelData, getCustomModelDataComponent, getCustomTagContainer, getDamageResistances, getDamageResistant, getDamageType, getDamageTypeKey, getDisplayName, getEnchantable, getEnchantLevel, getEnchantmentGlintOverride, getEnchants, getEquippable, getFood, getItemFlags, getItemModel, getItemName, getJukeboxPlayable, getKineticWeapon, getLocalizedName, getLore, getMaxStackSize, getMinimumAttackCharge, getPiercingWeapon, getRarity, getSwingAnimation, getTool, getTooltipStyle, getUseCooldown, getUseEffects, getUseRemainder, getWeapon, hasAdditionalTradeCost, hasAttackRange, hasAttributeModifiers, hasBlocksAttacks, hasBreakSound, hasConflictingEnchant, hasConsumable, hasCustomModelData, hasCustomModelDataComponent, hasDamageResistant, hasDamageType, hasDisplayName, hasEnchant, hasEnchantable, hasEnchantmentGlintOverride, hasEnchants, hasEquippable, hasFood, hasItemFlag, hasItemModel, hasItemName, hasJukeboxPlayable, hasKineticWeapon, hasLocalizedName, hasLore, hasMaxStackSize, hasMinimumAttackCharge, hasPiercingWeapon, hasRarity, hasSwingAnimation, hasTool, hasTooltipStyle, hasUseCooldown, hasUseEffects, hasUseRemainder, hasWeapon, isFireResistant, isGlider, isHideTooltip, isUnbreakable, removeAttributeModifier, removeAttributeModifier, removeAttributeModifier, removeEnchant, removeEnchantments, removeItemFlags, setAdditionalTradeCost, setAttackRange, setAttributeModifiers, setBlocksAttacks, setBreakSound, setConsumable, setCustomModelData, setCustomModelDataComponent, setDamageResistant, setDamageResistant, setDamageType, setDamageTypeKey, setDisplayName, setEnchantable, setEnchantmentGlintOverride, setEquippable, setFireResistant, setFood, setGlider, setHideTooltip, setItemModel, setItemName, setJukeboxPlayable, setKineticWeapon, setLocalizedName, setLore, setMaxStackSize, setMinimumAttackCharge, setPiercingWeapon, setRarity, setSwingAnimation, setTool, setTooltipStyle, setUnbreakable, setUseCooldown, setUseEffects, setUseRemainder, setVersion, setWeapon从接口继承的方法 org.bukkit.persistence.PersistentDataHolder
getPersistentDataContainer
-
方法详细资料
-
getSpawnedType
已过时。不同实体类型对应不同的刷怪蛋物品获取刷怪蛋生成的实体的类型.原文: Get the type of entity this egg will spawn.
- 返回:
- 实体类型. 根据实现指定的默认值, 可能为 null
-
setSpawnedType
已过时。不同实体类型对应不同的刷怪蛋物品设置刷怪蛋生成的实体的类型.原文: Set the type of entity this egg will spawn.
- 参数:
type- 实体类型. 根据实现指定的默认值, 可能为 null
-
getSpawnedEntity
获取此刷怪蛋将会生成的EntitySnapshot, 如果未设置实体则返回 null.蛋中所有适用的数据都会被复制, 例如自定义名称、生命值和速度.
原文:Gets the
EntitySnapshotthat will be spawned by this spawn egg or null if no entity has been set. All applicable data from the egg will be copied, such as custom name, health, and velocity.- 返回:
- 实体快照, 如果未设置实体则返回 null
-
setSpawnedEntity
设置此刷怪蛋将会生成的EntitySnapshot.实体中所有适用的数据都会被复制, 例如自定义名称、生命值和速度.
原文:Sets the
EntitySnapshotthat will be spawned by this spawn egg. All applicable data from the entity will be copied, such as custom name, health, and velocity.- 参数:
snapshot- 实体快照
-
clone
-