Entities are things in the Minecraft world which are not blocks or other objects which fit in the cubical grid. Everything which can move around freely is an entity.
Minecraft also has tile entities[1], which are blocks which have extra information beyond the 4-bit data field described in the data values article, such as signs and chests. Tile entities are unrelated to the entities discussed on this page.
General behavior
All entities have these properties:
- A position, velocity, and rotation (as according to ordinary Newtonian physics).
- A specific volume they occupy, which is a 3-dimensional box with a fixed height and width (square when viewed from the top, and not rotating).
- Current health.
- Whether they are on fire. Fire reduces health gradually and displays flames covering the entity.
Entities can be pushed around by water currents.
Entities cannot pass through solid blocks. Most types of entities prevent blocks from being placed in the space they occupy, except for resources (dropped items) which are automatically pushed out of the block to open air. Also, if an entity does overlap a block, such as due to falling sand or a door being swung, then it is free to move out of the solid block but not back in. (For example, if a door is closed on you, you can jump up and stand on top of the bottom half-door block, if there is air above the door.)
Entities are lit according to the light level of the block their position is in. For example, if a minecart runs over a non-straight track directly into a solid block, it will turn black (since solid blocks always have a light level of 0), and arrows are sometimes seen to turn black (especially if fired shallowly into the ceiling).
实体的种类
以下是目前Minecraft中的实体。
| 种类 | 是否固体 | 当被攻击或杀死 掉落 |
消失 | 生命值 | 宽×高 | 备注 |
|---|---|---|---|---|---|---|
| 玩家 | 是 | 他们的物品栏内的物品 | 不 | 20( |
0.6×1.8 | 特别的情况:Notch会掉落红苹果。 |
| 生物 | 是 | 多种 | 查阅生成 | 多种 | 多种 | |
| 船 | 是 | 2个木棍,3个木板 | 不 | 6( |
1.5×0.6 | 随着时间的推移迅速恢复生命值。 高速碰撞到方块或实体会受到伤害。 |
| 矿车 | 是(除非是其他实体) | 1个矿车 | 不 | 6( |
0.98×0.7 | 随着时间的推移迅速恢复生命值。 会接上其所处位置的铁轨。 |
| 物品 | 仅限船和矿车 | 无 | 5分钟 | 0( |
0.25×0.25 | 会被爆炸/火/岩浆/仙人掌摧毁,但是不能被攻击。 |
| 经验珠 | 不 | 无 | 5分钟 | 1( |
? | 与掉落的物品具有相同的行为;也会被玩家吸引。 |
| 掷出的箭 | 是(对于在水中的船) | 不可用 | 1分钟 | ∞ | 0.5×0.5 | 在移动中伤害其他实体;当卡在一个方块里时不具有伤害能力。 |
| 掷出的雪球,鸡蛋 | 撞击后碎裂 | 不可用 | 不可用 | ∞ | 0.25×0.25 | 鸡蛋有一定概率在受到撞击后生成鸡。 |
| 掷出的末影珍珠 | 撞击后碎裂 | 不可用 | 不可用 | ∞ | 0.25×0.25 | 撞击后传送玩家。 |
| 掷出的末影之眼 | 不 | 不可用 | 不可用 | ∞ | 0.25×0.25 | 会飞向最近的要塞。 |
| 激活的TNT | 不 | 不可用 | 4秒或更少 (爆炸) |
∞ | 0.98×0.98 | |
| 正在下落的沙子/沙砾/龙蛋 | 不 | 本身作为物品 (除非撞到地面) | 直到撞击到地面或大约4秒 | ∞ | 0.98×0.98 | 当掉落到非固体方块(例如火把)上时会沙子/沙砾。 |
| 钓鱼竿的浮标 | 仅对于矿车和船 | 不可用 | 1分钟 | ∞ | ? | |
| 闪电 | 不 | 不可用 | 0.5秒 | ∞ | ? | |
| 画 | 不 | 1个画 | 不可用 | ∞ | 多种 | |
| 恶魂和烈焰人的火球 | 受到撞击后爆炸/受到攻击后反射 | 不可用 | 1分钟 | ∞ | 1.0×1.0(恶魂), 0.3125×0.3125(烈焰人) | 只有恶魂的火球可以反射,烈焰人的不可以。 |
| 末影水晶 | 是 | 无 | 不可用 | 1( |
当被摧毁时会爆炸 |
被列为“固体”的实体会阻碍其他实体的通过。
尺寸以方块边长为单位(通常被认为是1米),并且是X,Y,Z方向有着特定的长度的最小边界框的单位。这个框并不像物品那样发生可见的旋转。
数据值页面列出了所有实体的编号。
Further notes
Paintings are entities, but they are unusual in that they are aligned to the block grid and completely immobile. Doors, portals and beds, the other objects larger than a single block, are actually groups of adjacent blocks.
Arrows, TNT, sand, and gravel are assumed to have infinite health because they are not destroyed by multiple TNT explosions (they can be fired out of cannons), nor by being on fire for long periods.
Boats and Minecarts
- See also: Transportation (contains information about speeds)
Boats and minecarts appear to recover health over time. For example, they can be broken by two arrows but only in quick succession, and minecarts never break as a result of being on fire (though they will break if they remain in contact with lava). (Boats are quickly destroyed by fire.) The amount of wobbling displayed by boats and minecarts when struck appears to indicate their current health.
Sand and Gravel
The following description refers to sand for brevity, but gravel behaves in exactly the same way.
Sand normally exists as a block. When a sand block's support is removed, it turns into a sand entity and falls down until it hits another object, at which point it places itself as a block in the nearest on-grid position, or turns into a sand resource if that position is occupied (such as by a torch). While sand ordinarily falls straight down, it can be redirected while falling by explosions.
If there is a boat or minecart in the way of falling sand, it will place itself as a block above the vehicle, but then immediately fall down again, producing a 'hopping' effect. This can be used in the construction of a sand cannon. (Patched in Beta 1.6 and no longer works)
If when the world is created, a cave is generated underneath sand, Minecraft will fail to update the block and the sand will remain floating until a block is removed from under, above, or beside it. This latter fact means that a single falling sand block can trigger the collapse of an entire region of sand; therefore, sand ceilings should not be disturbed unless one is outside the area, standing over a torch, or prepared to dig out quickly once the sand has fallen.
Right-clicking
Entities with right-click actions (boats, minecarts, and wolves), unlike blocks with right-click actions (such as chests), do not stop the right-click action of a tool you are holding. For example, if you right-click on a tamed wolf with a water bucket in your hand, the wolf will sit, but you will also empty the bucket at the wolf.
Feeding food items to a wolf does not stop your eating action, despite the appearance otherwise. When tested by hacking a stack of 2 raw porkchop, and feeding them to the wolf, the wolf ate one and the player ate the other (edit: food is now stackable, but you would need to hold down the right mouse button to eat the food yourself). When using just a stack of one, the wolf gets the food before the player can, and the eating is canceled without a food item in that slot.
Riding
Entities may be riding on, or attached to, other entities. When this is the case, only the lower/"outer" entity's volume collides with other things, and only that entity can control movement. The currently possible combinations are:
- A mob or player in a minecart or boat.
- A player on a saddled pig.
- A skeleton on a spider (Spider Jockey).
- An arrow lodged in a mob.
It is possible to have multiple levels, such as a player on a pig in a minecart. Technically, it is possible to ride any entity (using mods), such as a creeper or an arrow.
Bugs
- In Creative mode (Minecraft 1.0 and later), the player can interact entities (attack or 'right-click' action) from far away — even if there are blocks in the way. This can be very annoying. For example, when you try to break a stone block, and there is a painting on the other side of the block, the stone will not break, but the painting will. Also, when you try to place a block on a wall, and there is a minecart behind that wall, you will enter the minecart, as if you had clicked it directly, instead of placing the block.
- On some computers, it may occur that entities apear very dark in colour, like it's night time. Even at day or when the brightness is up to 'Bright'.