The Best Resource for Minecraft
The Best Resource for Minecraft

Bossbarها و titleها: وضعیت ماندگار، زمان‌بندی‌ها، و تفکیک مقدار/حداکثر

Bossbarها و titleها: وضعیت ماندگار، زمان‌بندی‌ها، و تفکیک مقدار/حداکثر

یک bossbar پس از ری‌استارت باقی می‌ماند ولی title نه. الگوی ایجاد و سپس ویرایش، زمان‌بندی‌های محو شدن که افراد برعکس تنظیم می‌کنند، و نحوه هدایت نوار پیشرفت در اینجا آمده است.

هر دو متن را روی صفحه رسم می‌کنند و شباهت آن‌ها در همین نقطه به پایان می‌رسد. Titleها یک‌باره هستند؛ bossbarها اشیاء ماندگاری هستند که باید آن‌ها را مدیریت کنید.

Bossbarها دارای وضعیت هستند

/bossbar add my:timer {"text":"Time left"}
/bossbar set my:timer players @a
/bossbar set my:timer max 600
/bossbar set my:timer value 600
/bossbar set my:timer color red
/bossbar set my:timer style notched_10

یک id، سپس دستوراتی که آن را ویرایش می‌کنند. نکاتی که افراد در آن دچار اشتباه می‌شوند:

  • نوار تا زمانی که بازیکنانی نداشته باشد نامرئی است. ایجاد یکی و هرگز اجرا نکردن

set ... players produces nothing, with no error.

  • در ذخیره جهان باقی می‌ماند. نواری که برای یک مینی‌گیم ساخته شده در

نشست بعدی همچنان وجود دارد. /bossbar remove when finished, or they accumulate.

  • value and max are separate، و نوار نشان می‌دهد value / max. Setting only

value on a bar whose max is still 100 gives nonsense fill.

رنگ‌ها: pink white red orange yellow green blue purple. Styles: progress notched_6 notched_10 notched_12 notched_20.

هدایت شمارش معکوس

/bossbar set my:timer value 599

یک بار در ثانیه از یک فانکشن تکرارشونده کل سازوکار است. هیچ تایمر داخلی وجود ندارد. خواندن مجدد آن نیز مفید است:

/execute store result score @s Left run bossbar get my:timer value

bossbar get supports value, max, players and visible, which makes a bossbar a workable global variable when you want the player to see it.

Titleها گذرا هستند

/title @a times 10 70 20
/title @a subtitle {"text":"Get ready"}
/title @a title {"text":"Round 2"}

سه مورد به همین ترتیب، و ترتیب مهم است:

  1. times first. تنظیم آن پس از title هیچ تاثیری روی title نمایش‌داده‌شده ندارد.
  2. subtitle before title. بخش subtitle به تنهایی چیزی نمایش نمی‌دهد؛ ارسال title

چیزی است که باعث نمایش هر دو می‌شود. برعکس، اولی بدون subtitle نمایش داده می‌شود.

times is fadeIn stay fadeOut بر حسب تیک — 20 تیک در ثانیه. 10 70 20 is half a second in, three and a half held, one out. People set 1 1 1 and wonder why nothing appears: three ticks total is a flash.

actionbar جداگانه است

/title @a actionbar {"text":"Saved"}

خط بالای hotbar. این نادیده می‌گیرد times entirely — it shows for a fixed couple of seconds and fades. Re-sending it every tick keeps it up permanently, which is the standard way to run a custom HUD.

پاک‌سازی

/title @a clear removes what is showing; /title @a reset also restores default timings. For bossbars, /bossbar set my:timer visible false hides without destroying state.

دستورات bossbar، title و بقیه دستورات کنترل و دیباگ را از طریق یک فرم بسازید در سازنده پیشرفته دستور — کنترل و دیباگ.

امتحان ابزار: Advanced Command Builder — Control & Debug →