-
-
Notifications
You must be signed in to change notification settings - Fork 28
popups
popups are extremely extensible.
it's not a lie to say that almost every deep functionality you can think of comes from popups.
buff icon, skill hud, etc.
monster_health:
triggers:
1:
class: entity_attack
group: mob_group
unique: true # default: false
queue: true # default: false
#push: true
always-check-condition: false # default: true
sort: first # types: last/first , default: last
duration: 60 #tick
key-mapping: true #default: false
x: 10
y: 35
move:
duration: 3
pixel:
x-equation: 0
y-equation: 20t
layouts:
1:
name: monster_health
There are several ways to run a popup.
- run it as a command
- register it in config.yml as a default-popup to display the popup when a condition is met. (in this case, you should not set a duration.)
- can use a trigger
monster_health:
triggers:
1:
class: entity_attack
trigger is a feature that fires a popup when a specific action is triggered.
list of triggers is as follows and provides its own PAPI.
entity_attack : when player attacks an entity.
entity_damage : when player is damaged by an entity.
entity_kill : when player killed the entity
entity_dead : when player dies
trigger-only papi
(listener)
entity_health
(return string)
entity_name
entity_custom_name
entity_type
(return number)
entity_max_health
entity_health
entity_health_percentage
entity_vehicle_health_percentage
mythicmobs_aura_duration_reversed:arg
mythicmobs_entity_current_cooldown:arg
mythicmobs_entity_aura_stack:arg
mythicmobs_entity_aura_max_duration:arg
mythicmobs_entity_aura_duration:arg
mythicmobs_entity_aura_duration_reversed:arg
(return boolean)
entity_dead
has_off_hand
has_main_hand
mythicmobs_entity_has_aura:arg
create multiple popups as a group.
default: none
ex. group: skill
Avoid duplicate popups.
default: false
whether to save out-of-queue popups
default: false
By default, when set to move.duration: 4
, popups can only be displayed for a maximum of four,
and any further requests for popups will be ignored due to lack of space.
when you use queue: true
, it works like this
for example, after sending a total of 6 popups in 1 tick increments, after 1 tick, we see the following structure
will still see up to four popups, but will start to see a fifth popup after the first one ends.
waiting popups will also have a reduced duration. to prevent this, the following options are used
whether popups outside of the queue should also have animated ticks.
default: true
always-check-condition: false
, waiting popups will not decrease in duration.
When popup requests reach a maximum, push the oldest popup immediately
default: false
options for how you want to arrange the popups.
default: last
sort: first
is performed in a stack fashion,
sort: last
is performed using queue fashion.
determine the duration of the popup.
the unit is tick and will last indefinitely if not entered.
default: 0
(infinite)
mapping popups with a specific key as the unique key.
this is needed, for example, to display the health bar of an entity or another player.
default: false
in the same way as the hud, you define where to divide the player screen into percentages.
set rules for placing popups when displaying multiple popups.
move:
duration: 3
pixel:
x-equation: 0
y-equation: 20t
maximum number of popups you want to display on the screen.
define how it should be moved pixel by pixel in the same way as layout.
it has a very close relationship with the operations documentation
for example, if you simply want to offset to the right by 20 pixels, you can do something like x-equation: 20t
To do something like this photo
buff_absorption:
group: buff
unique: true
layouts:
1:
name: buff_absorption
x: 90
y: 10
conditions:
1:
first: potion_effect_duration:absorption
second: 0
operation: ">"
move:
duration: 33
pixel:
x-equation: -floor((t - 1) / 8) * 40
y-equation: (((t - 1) % 8) + 1) * 40
in this way, some math knowledge is required.