Как сделать боссбар игрока в майнкрафт
This Minecraft tutorial explains how to use the /bossbar command with screenshots and step-by-step instructions.
You can use the /bossbar command to add, configure or remove a custom bossbar in Minecraft. Let's explore how to use this cheat (game command).
Requirements
To run game commands in Minecraft, you have to turn cheats on in your world.
Minecraft Wiki
Из-за новой политики Microsoft в отношении сторонних ресурсов, Minecraft Wiki больше не является официальной. В связи с этим были внесены некоторые изменения, в том числе и обновлён логотип вики-проекта. Подробности на нашем Discord-сервере.
How to Enter the Command
1. Open the Chat Window
The easiest way to run a command in Minecraft is within the chat window. The game control to open the chat window depends on the version of Minecraft:
- For Java Edition (PC/Mac), press the T key to open the chat window.
2. Type the Command
We will cover examples of how to create a bossbar, show the bossbar to players, set the current value of the bossbar, and change the color of the bossbar.
Create a Bossbar
Let's start by showing how to create a new bossbar that has an ID of digminecraft:bossbar1 and "TheChallenge" as the text that appears above the bossbar with the following command:
Type the command in the chat window. As you are typing, you will see the command appear in the lower left corner of the game window. Press the Enter key to run the command.
Once the command has been entered, the bossbar will be created but it won't yet be visible on the screen. By default, no players have been set up to see the bossbar.
Show the Bossbar to Players
Next, let's update the settings for the bossbar so that the bossbar shows at the top of the game window for all players. We can show the bossbar called digminecraft:bossbar1 to all players with the following command:
Type the command and press the Enter key to run the command.
Once the command has been entered, you will see the new bossbar appear at the top of the screen. By default, the color of the bossbar is white, the current value of the bossbar is 0, and the max value of the bossbar is 100.
Set the Current Value of the Bossbar
Now, let's set the current value of the boss bar to 100 (so that the progress bar is full) with the following command:
Type the command and press the Enter key to run the command.
Once the command has been entered, you should see a full progress bar in white since now the current value for the bossbar is set to 100 and the maximum value for this bossbar is 100.
Change the Color of the Bossbar
Next, let's change the color of the bossbar to a different color instead of white. You can change the bossbar to blue, green, pink, purple, red, white or yellow.
Let's change the bossbar to yellow with the following command:
Type the command and press the Enter key to run the command.
Once the command has been entered, you should see both the bossbar's text and the progress bar appear in yellow.
Congratulations, you just learned how to use the /bossbar command in Minecraft!
Команды консоли/bossbar
Создаёт боссбар и позволяет изменннить его.
- Создаёт боссбар.
- Отображает значение запрошенного параметра боссбара в чате.
- Отображает список существующих боссбаров.
- Удаляет боссбар.
- Изменяет цвет боссбара и его названия (если он не указан в текстовом компоненте названия). По умолчанию white .
- Изменяет максимальное значение боссбара. По умолчанию 100 .
- Изменяет название боссбара.
- Задаёт цели, которым отображается боссбар. По умолчанию боссбар никому не отображается.
- Изменяет стиль боссбара. По умолчанию progress .
- Изменяет текущее значение боссбара. По умолчанию 0 .
- Изменяет видимость боссбара. По умолчанию true .
- blue — синий;
- green — зелёный;
- pink — розовый;
- purple — фиолетовый;
- red — красный;
- white — белый;
- yellow — жёлтый.
- Минимум: 1
- Минимум: 0
- Тип: игрок
- Количество: несколько
- notched_* — разделённый на указанное число сегментов.
- progress — сплошная линия.
Материалы сообщества доступны в соответствии с условиями лицензии CC BY-NC-SA 3.0, если не указано иное.
Examples
Example in Java Edition (PC/Mac)
To create a bossbar called digminecraft:bossbar1 with the text "TheChallenge":
To show the bossbar called digminecraft:bossbar1 to all players:
To set the current value of the bossbar called digminecraft:bossbar1 to 100:
To change the color of the bossbar called digminecraft:bossbar1 to yellow:
To list all bossbars:
To get the current value of the bossbar called digminecraft:bossbar1 :
To remove the bossbar called digminecraft:bossbar1 :
how to make bossbar to any specific minecraft mob in 1.13.1 minecraft version
You'll need a series of commands, but it can be done a bit easier than you showed. First some blatant self promotion: I wrote a blog about bossbars not too long ago, maybe a good read?
There is no "one" command for all mobs because mobs have different health values and if you want your bossbar to match that value exactly you'd have to tune it. Otherwise your bar will either display too little (already emptied a bit) or too much (players start fighting and the bar won't lower for a while).
Step one: determine the mobs max health. For example when checking a horse:
/data get entity @e[type=minecraft:horse,limit=1] Health
This shows me that a (healthy) horse has 25 health maximum.
Create the bossbar:
/bossbar add mob "Mobs health"
Set the maximum value to 25, so that it matches the horse:
/bossbar set minecraft:mob max 25
Now you're ready to check a horse. I would suggest to rely on tags, that makes it easier to pinpoint a specific horse which you want to check up on.
First you'll need a repeating command block which adds the mobs health into the bossbar, but only if that mob actually exists. Because I'm using tags I can use this
/execute if entity @e[tag=boss] store result bossbar minecraft:mob value run data get entity @e[tag=boss,limit=1]
So this would only run if there actually is an entity out there which is tagged as boss. When so it'll check its health and dump that into the bossbar. This makes the bossbar somewhat usable in a generic way.
Next step: making the bar visible to players. I'd suggest a range of 20 blocks around the mob?
Anyway, that can be done by adding a chain command block to the previously repeating command block. I'd set it to conditional though:
/execute at @e[tag=boss] run bossbar set minecraft:mob players @p[distance=..20]
So this would make the bossbar visible to all players who are within a 20 block radius around the mob.
And that should do it, hope this can still help.
(edit) Forgot to mention; you can activate this setup by actually tagging a mob. So, for example, to tag a horse next to me as boss I'd use something like:
Supported Platforms
The /bossbar command is available in the following versions of Minecraft:
Platform | Supported (Version*) |
---|---|
Java Edition (PC/Mac) | Yes (1.13) |
Pocket Edition (PE) | No |
Xbox 360 | No |
Xbox One | No |
PS3 | No |
PS4 | No |
Wii U | No |
Nintendo Switch | No |
Windows 10 Edition | No |
Education Edition | No |
* The version that it was added or removed, if applicable.
NOTE: Pocket Edition (PE), Xbox One, PS4, Nintendo Switch, and Windows 10 Edition are now called Bedrock Edition. We will continue to show them individually for version history.
Boss Bars Plus
Hello! This pack makes the boss bars themed more towards what boss they are for! On the Raid Bar, there are bells, but I don't know how I like that, so I might change that later.
This pack will not work if you simply drop the zipped file into your texture pack folder. You must unzip the folder, and then inside you will see two folders. One will be "Blue End", and the other will be "Default". If you would like the EnderDragon Boss Bar to be blue to go along with my Blue End pack, then open "Blue End". Inside Blue End you will find a folder called "Boss Bars +". That is the file you will drag to your texture pack folder. If you want the default purple bar, then simply open the "Default" folder and drag the "Boss Bars Plus" folder into your texture pack folder.
Bossbar Command
Bossbar Command in Minecraft Java Edition (PC/Mac)
In Minecraft Java Edition (PC/Mac), there are different syntaxes depending on what you would like to do with the bossbar.
To add a bossbar:
To set the text color of the bossbar (default is white):
To set the maximum value of the bossbar (default is 100):
To change the text that appears above the bossbar:
To specify which players can see the bossbar (by default, no players can see the bossbar):
To set the style of the bossbar:
To set the current value of the bossbar:
To set whether the bossbar is visible (default is true):
To list all bossbars:
To remove a bossbar:
To get an attribute of the bossbar:
Definitions
- id is the internal ID to use for the bossbar. It is formatted as namespace:name and will default to minecraft:name if no namespace is provided.
- name is the text that will display above the bossbar. This value must be enclosed in quotation marks. For example: "TheChallenge".
- max is the maximum value of the bossbar. The default is 100.
- targets is the name of the player (or a target selector) that will see the bossbar. By default, no players will see the bossbar, when a new bossbar is created.
- value is the current value of the bossbar. The default is 0.
Читайте также: