枚举 EntityType
- 所有已实现的接口:
Serializable
,Comparable<EntityType>
,Constable
,Keyed
,Translatable
-
嵌套类概要
从类继承的嵌套类/接口 java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
枚举常量概要
枚举常量说明Mechanical entity with an inventory for placing weapons / armor into.An arrow projectile; may get stuck in the ground.A placed boat.LikeFIREBALL
but with added effects.A flying chicken egg.A flying ender pearl.A flying experience bottle.An experience orb.An ender eye signal.A block that is going to or is about to fall.A flying large fireball, as thrown by a Ghast for example.Internal representation of a Firework once it has been launched.A fishing line and bobber.An item resting on the ground.An item frame on a wall.A leash attached to a fencepost.A bolt of lightning.A painting on a wall.A flying splash potion.Bullet fired bySHULKER
.A flying small fireball, such as thrown by a Blaze or player.A flying snowball.LikeARROW
but causes thePotionEffectType.GLOWING
effect on all team members.Primed TNT that is about to explode.An unknown entity without an Entity ClassA flying wither skull projectile. -
方法概要
修饰符和类型方法说明static @Nullable EntityType
fromId
(int id) 已过时。不安全的参数static @Nullable EntityType
已过时。不安全的参数getKey()
返回用于此对象的命名空间标识符.getName()
已过时。不安全的参数Get the translation key, suitable for use in a translation component.short
已过时。不安全的参数boolean
isAlive()
boolean
isEnabledByFeature
(@NotNull World world) Gets if this EntityType is enabled by feature in a world.boolean
Some entities cannot be spawned usingRegionAccessor.spawnEntity(Location, EntityType)
orRegionAccessor.spawn(Location, Class)
, usually because they require additional information in order to spawn.static EntityType
返回带有指定名称的该类型的枚举常量。static EntityType[]
values()
按照声明该枚举类型的常量的顺序, 返回一个包含这些常量的数组。
-
枚举常量详细资料
-
ITEM
An item resting on the ground.Spawn with
World.dropItem(Location, ItemStack)
orWorld.dropItemNaturally(Location, ItemStack)
-
EXPERIENCE_ORB
An experience orb. -
AREA_EFFECT_CLOUD
- 另请参阅:
-
ELDER_GUARDIAN
- 另请参阅:
-
WITHER_SKELETON
- 另请参阅:
-
STRAY
- 另请参阅:
-
EGG
A flying chicken egg. -
LEASH_KNOT
A leash attached to a fencepost. -
PAINTING
A painting on a wall. -
ARROW
An arrow projectile; may get stuck in the ground. -
SNOWBALL
A flying snowball. -
FIREBALL
A flying large fireball, as thrown by a Ghast for example. -
SMALL_FIREBALL
A flying small fireball, such as thrown by a Blaze or player. -
ENDER_PEARL
A flying ender pearl. -
EYE_OF_ENDER
An ender eye signal. -
POTION
A flying splash potion. -
EXPERIENCE_BOTTLE
A flying experience bottle. -
ITEM_FRAME
An item frame on a wall. -
WITHER_SKULL
A flying wither skull projectile. -
TNT
Primed TNT that is about to explode. -
FALLING_BLOCK
A block that is going to or is about to fall. -
FIREWORK_ROCKET
Internal representation of a Firework once it has been launched. -
HUSK
- 另请参阅:
-
SPECTRAL_ARROW
LikeARROW
but causes thePotionEffectType.GLOWING
effect on all team members. -
SHULKER_BULLET
Bullet fired bySHULKER
. -
DRAGON_FIREBALL
LikeFIREBALL
but with added effects. -
ZOMBIE_VILLAGER
- 另请参阅:
-
SKELETON_HORSE
- 另请参阅:
-
ZOMBIE_HORSE
- 另请参阅:
-
ARMOR_STAND
Mechanical entity with an inventory for placing weapons / armor into. -
DONKEY
- 另请参阅:
-
MULE
- 另请参阅:
-
EVOKER_FANGS
- 另请参阅:
-
EVOKER
- 另请参阅:
-
VEX
- 另请参阅:
-
VINDICATOR
- 另请参阅:
-
ILLUSIONER
- 另请参阅:
-
COMMAND_BLOCK_MINECART
- 另请参阅:
-
BOAT
A placed boat. -
MINECART
- 另请参阅:
-
CHEST_MINECART
- 另请参阅:
-
FURNACE_MINECART
- 另请参阅:
-
TNT_MINECART
- 另请参阅:
-
HOPPER_MINECART
- 另请参阅:
-
SPAWNER_MINECART
- 另请参阅:
-
CREEPER
-
SKELETON
-
SPIDER
-
GIANT
-
ZOMBIE
-
SLIME
-
GHAST
-
ZOMBIFIED_PIGLIN
-
ENDERMAN
-
CAVE_SPIDER
-
SILVERFISH
-
BLAZE
-
MAGMA_CUBE
-
ENDER_DRAGON
-
WITHER
-
BAT
-
WITCH
-
ENDERMITE
-
GUARDIAN
-
SHULKER
-
PIG
-
SHEEP
-
COW
-
CHICKEN
-
SQUID
-
WOLF
-
MOOSHROOM
-
SNOW_GOLEM
-
OCELOT
-
IRON_GOLEM
-
HORSE
-
RABBIT
-
POLAR_BEAR
-
LLAMA
-
LLAMA_SPIT
-
PARROT
-
VILLAGER
-
END_CRYSTAL
-
TURTLE
-
PHANTOM
-
TRIDENT
-
COD
-
SALMON
-
PUFFERFISH
-
TROPICAL_FISH
-
DROWNED
-
DOLPHIN
-
CAT
-
PANDA
-
PILLAGER
-
RAVAGER
-
TRADER_LLAMA
-
WANDERING_TRADER
-
FOX
-
BEE
-
HOGLIN
-
PIGLIN
-
STRIDER
-
ZOGLIN
-
PIGLIN_BRUTE
-
AXOLOTL
-
GLOW_ITEM_FRAME
-
GLOW_SQUID
-
GOAT
-
MARKER
-
ALLAY
-
CHEST_BOAT
-
FROG
-
TADPOLE
-
WARDEN
-
CAMEL
-
BLOCK_DISPLAY
-
INTERACTION
-
ITEM_DISPLAY
-
SNIFFER
-
TEXT_DISPLAY
-
BREEZE
-
WIND_CHARGE
-
BREEZE_WIND_CHARGE
-
ARMADILLO
-
BOGGED
-
OMINOUS_ITEM_SPAWNER
-
FISHING_BOBBER
A fishing line and bobber. -
LIGHTNING_BOLT
A bolt of lightning.Spawn with
World.strikeLightning(Location)
. -
PLAYER
-
UNKNOWN
An unknown entity without an Entity Class
-
-
方法详细资料
-
values
按照声明该枚举类型的常量的顺序, 返回一个包含这些常量的数组。- 返回:
- 按照声明该枚举类型的常量的顺序返回的包含这些常量的数组
-
valueOf
返回带有指定名称的该类型的枚举常量。 字符串必须与用于声明该类型的枚举常量的 标识符完全匹配。(不允许有多余 的空格字符。)- 参数:
name
- 要返回的枚举常量的名称。- 返回:
- 返回带有指定名称的枚举常量
- 抛出:
IllegalArgumentException
- 如果该枚举类型没有带有指定名称的常量NullPointerException
- 如果参数为空值
-
getName
已过时。不安全的参数获取实体种类名.原文:Gets the entity type name.
- 返回:
- the entity type's name
-
getKey
从接口复制的说明:Keyed
返回用于此对象的命名空间标识符.原文:Return the namespaced identifier for this object.
-
getEntityClass
-
getTypeId
已过时。不安全的参数获取实体种类id.原文:Gets the entity type id.
- 返回:
- 种类id
-
fromName
@Deprecated @Contract("null -> null") @Nullable public static @Nullable EntityType fromName(@Nullable @Nullable String name) 已过时。不安全的参数以给定名称获取对应实体种类.原文:Gets an entity type from its name.
- 参数:
name
- 实体种类名- 返回:
- 匹配的实体种类, 找不到为null
-
fromId
已过时。不安全的参数以给定id获取实体种类.原文:Gets an entity from its id.
- 参数:
id
- 实体种类id- 返回:
- 匹配的实体种类或null
-
isSpawnable
public boolean isSpawnable()Some entities cannot be spawned usingRegionAccessor.spawnEntity(Location, EntityType)
orRegionAccessor.spawn(Location, Class)
, usually because they require additional information in order to spawn.- 返回:
- False if the entity type cannot be spawned
-
isAlive
public boolean isAlive() -
getTranslationKey
从接口复制的说明:Translatable
Get the translation key, suitable for use in a translation component.- 指定者:
getTranslationKey
在接口中Translatable
- 返回:
- the translation key
-
isEnabledByFeature
Gets if this EntityType is enabled by feature in a world.- 参数:
world
- the world to check- 返回:
- true if this EntityType can be used to spawn an Entity for this World.
-