你可以帮助我们来翻译此条目,但请勿使用机器翻译。
这份教程会教你如何利用碰撞箱。
碰撞箱
“碰撞箱”是描述实体占用多少空间的区域,可以通过按{{按键|F3+B}键来显示。当它们显示出来时,会看到一个白色的轮廓,显示实体的位置和它所占的空间。在它的“眼睛”附近还有一个平坦的红色矩形。这是“视线”,这是它在游戏中的眼睛所在的位置,它可以独立于它们看起来的位置。注意视线是如何围绕着实体的。这就解释了为什么在没有看到玩家的情况下,生物是不可能从背后偷偷靠近你的。还有一条从视线之外延伸出来的直线蓝色线。这条线指向生物所面对的方向。
利用
碰撞箱能被利用在很多方面上。
伤害
碰撞箱是生物能被攻击的地方。这包括所有类型的伤害,除了掉落伤害,虚空伤害和负面效果伤害。它非常重要,因为它能帮助玩家攻击像恶魂这样的怪物。恶魂的碰撞箱不包括它的触须,所以攻击恶魂的触须是没用的。
末影龙
末影龙有一个独特的碰撞箱。它身体的各个部位都有绿色的碰撞箱,但是它也有一个包括它整体的白色碰撞箱和蓝色的视线。绿色的碰撞箱就是你能攻击到末影龙的地方。
Suffocation
The mechanics of suffocation is best explained using hitboxes. If a solid block enters the "head" of the mob, then it begins to suffocate. The location of the "head" is marked with its own white line, so that is where a mob can be suffocated. If the mob does not have a separate outline for its head, such as a ghast, then it is assumed that the entire mob is a head. Therefore, a player can easily suffocate a ghast by pushing a block anywhere into its hitbox.
Farms
Sizes of hitboxes can be used for farms. For example, the hitbox of a baby chicken is shorter than the hitbox of an adult chicken. If you wanted to build an automatic chicken farm, you must ensure that only the adult chicken will be killed, since baby chickens don't drop anything.
Blocks that are shorter than a full block are best to use for building a farm. These include enchanting tables, slabs, daylight sensors, and snow layers. These can be used to manipulate the line of sight, as was used in a wither skeleton farm shown in the video:
They can also be used to manipulate when mobs can see other mobs, which can help make vindicator-powered passive mob farms:
Ejecting Mobs
Since every entity has a visible hitbox, it can be used to more easily break a minecart or boat that is carrying another mob. By making hitboxes appear, you can see where the mob's hitbox starts. So, you can break a minecart or boat with a passenger without harming the passenger.
Line of Sight
Have you ever heard somebody telling you to "break line of sight"? They are referring to making it so the mob can no longer see the player. The player has their own line of sight (red rectangle). The "line of sight" between mobs exists when the red rectangle of the player is visible from the red rectangle of the mob, and they are in range. This range varies from 20 blocks for most hostile mobs to a hundred blocks for ghasts and blazes, and is affected by factors like the Blindness effect and wearing skulls.
Line of sight affects how mobs attack the player. If a hostile mob has a line of sight, it will begin attacking. For guardians, the player must maintain line of sight for the entire charge-up of the attacking beam for it to do any damage. If the player's blue line is aiming towards an enderman's red rectangle and not wearing a pumpkin, the enderman will get angry at the player.
Breaking Line of Sight
Breaking this line of sight can be done in a variety of ways. The first way is to place blocks between the player and the mob, thus preventing you from seeing the other mob's red rectangle. Most mobs cannot see through glass, so it can be used for these purposes. Another solution is to get out of range of the mob, so that it does not attack you. This is difficult to do for long-distance attackers, such as Blazes. Another solution is to kill the mob or unload the chunks that contain it.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||