枚举 EntityType
- 所有已实现的接口:
Serializable
,Comparable<EntityType>
,java.lang.constant.Constable
-
嵌套类概要
从类继承的嵌套类/接口 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.An item resting on the ground.A flying chicken egg.A flying ender pearl.An ender eye signal.An experience orb.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 frame on a wall.A leash attached to a fencepost.A bolt of lightning.A flying lingering potionA painting on a wall.Primed TNT that is about to explode.Bullet fired bySHULKER
.A flying small fireball, such as thrown by a Blaze or player.A flying snowball.LikeTIPPED_ARROW
but causes thePotionEffectType.GLOWING
effect on all team members.A flying splash potion.A flying experience bottle.LikeARROW
but tipped with a specific potion which is applied on contact.An unknown entity without an Entity ClassA flying wither skull projectile. -
方法概要
修饰符和类型方法说明static EntityType
fromId
(int id) 已过时。Magic valuestatic EntityType
已过时。Magic valuegetName()
已过时。Magic valueshort
已过时。Magic valueboolean
isAlive()
boolean
Some entities cannot be spawned usingWorld.spawnEntity(Location, EntityType)
orWorld.spawn(Location, Class)
, usually because they require additional information in order to spawn.static EntityType
返回带有指定名称的该类型的枚举常量。static EntityType[]
values()
按照声明该枚举类型的常量的顺序, 返回一个包含这些常量的数组。
-
枚举常量详细资料
-
DROPPED_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_HITCH
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. -
ENDER_SIGNAL
An ender eye signal. -
SPLASH_POTION
A flying splash potion. -
THROWN_EXP_BOTTLE
A flying experience bottle. -
ITEM_FRAME
An item frame on a wall. -
WITHER_SKULL
A flying wither skull projectile. -
PRIMED_TNT
Primed TNT that is about to explode. -
FALLING_BLOCK
A block that is going to or is about to fall. -
FIREWORK
Internal representation of a Firework once it has been launched. -
HUSK
- 另请参阅:
-
SPECTRAL_ARROW
LikeTIPPED_ARROW
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
- 另请参阅:
-
MINECART_COMMAND
- 另请参阅:
-
BOAT
A placed boat. -
MINECART
- 另请参阅:
-
MINECART_CHEST
- 另请参阅:
-
MINECART_FURNACE
- 另请参阅:
-
MINECART_TNT
- 另请参阅:
-
MINECART_HOPPER
- 另请参阅:
-
MINECART_MOB_SPAWNER
- 另请参阅:
-
CREEPER
-
SKELETON
-
SPIDER
-
GIANT
-
ZOMBIE
-
SLIME
-
GHAST
-
PIG_ZOMBIE
-
ENDERMAN
-
CAVE_SPIDER
-
SILVERFISH
-
BLAZE
-
MAGMA_CUBE
-
ENDER_DRAGON
-
WITHER
-
BAT
-
WITCH
-
ENDERMITE
-
GUARDIAN
-
SHULKER
-
PIG
-
SHEEP
-
COW
-
CHICKEN
-
SQUID
-
WOLF
-
MUSHROOM_COW
-
SNOWMAN
-
OCELOT
-
IRON_GOLEM
-
HORSE
-
RABBIT
-
POLAR_BEAR
-
LLAMA
-
LLAMA_SPIT
-
PARROT
-
VILLAGER
-
ENDER_CRYSTAL
-
LINGERING_POTION
A flying lingering potion -
FISHING_HOOK
A fishing line and bobber. -
LIGHTNING
A bolt of lightning.Spawn with
World.strikeLightning(Location)
. -
WEATHER
-
PLAYER
-
COMPLEX_PART
-
TIPPED_ARROW
LikeARROW
but tipped with a specific potion which is applied on contact. -
UNKNOWN
An unknown entity without an Entity Class
-
-
方法详细资料
-
values
按照声明该枚举类型的常量的顺序, 返回一个包含这些常量的数组。- 返回:
- 按照声明该枚举类型的常量的顺序返回的包含这些常量的数组
-
valueOf
返回带有指定名称的该类型的枚举常量。 字符串必须与用于声明该类型的枚举常量的 标识符完全匹配。(不允许有多余 的空格字符。)- 参数:
name
- 要返回的枚举常量的名称。- 返回:
- 返回带有指定名称的枚举常量
- 抛出:
IllegalArgumentException
- 如果该枚举类型没有带有指定名称的常量NullPointerException
- 如果参数为空值
-
getName
已过时。Magic value- 返回:
- the entity type's name
-
getEntityClass
-
getTypeId
已过时。Magic value- 返回:
- the raw type id
-
fromName
已过时。Magic value- 参数:
name
- the entity type's name- 返回:
- the matching entity type or null
-
fromId
已过时。Magic value- 参数:
id
- the raw type id- 返回:
- the matching entity type or null
-
isSpawnable
public boolean isSpawnable()Some entities cannot be spawned usingWorld.spawnEntity(Location, EntityType)
orWorld.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()
-