Targeters are used to determine what a skill targets when it is fired.
While targeters are technically optional (as the default targeter will usually be @trigger), forgetting a targeter is probably one of the most common mistakes people who are new to MythicMobs make.
When a targeter is used on the Skill mechanic, all of the skills inside of the meta-skill inherit the initial targeter. You can still overwrite the parent targeter for individual mechanics inside of the meta-skill by giving them their own targeter to use.
If entity targets are passed to a location-based mechanic, it will use the entity's location.
Additional Targeters
Links to targeters added by addon plugins. Any targeters from these links will not work without that plugin installed.
Targeters
Entity Targeters
Single-Entity Targeters
Targeter | Shorthand | Description |
---|---|---|
@Self | @Caster @Boss @Mob |
Targets the caster of the mechanic |
@Target | @T | Targets the caster's target |
@Trigger | Targets the entity that triggered the skill | |
@NearestPlayer | Targets the nearest player in radius | |
@WolfOwner | Targets the owner of the wolf | |
@Owner | Targets the owner of the mob | |
@Parent | @summoner | Targets the parent of the mob |
@Mount | Targets the entity that the mob is currently riding | |
@Father | @dad @daddy |
Targets the father of the casting mob. |
@Mother | @mom @mommy |
Targets the mother of the casting mob. |
@Passenger | Targets the rider of the casting mob. | |
@PlayerByName | @specificplayer | Targets a specific player by name. Supports placeholders. |
@UniqueIdentifier | @UUID | Targets a specific entity by their UUID, supports placeholders |
@Vehicle | Targets the caster's vehicle | |
@InteractionLastAttacker | @lastAttacker | Targets the last entity that attacked the casting INTERACTION entity |
@InteractionLastInteract | @lastInteract | Targets the last entity that interacted with the casting INTERACTION entity |
Multi-Entity Targeters
Targeter | Shorthand | Description |
---|---|---|
@LivingInCone | @entitiesInCone @livingEntitiesInCone @LEIC @EIC |
Targets all living entities in cone with a specified angle, length and rotation relative to facing direction |
@LivingInWorld | @EIW | Targets all living entities in the caster's world |
@NotLivingNearOrigin | @nonLivingNearOrigin @NLNO |
Targets all non living entities in a radius near the origin |
@PlayersInRadius | @PIR | Targets all players in the given radius |
@MobsInRadius | @MIR | Targets all mythicmobs or vanilla overrides of the given type in a radius |
@EntitiesInRadius | @livingEntitiesInRadius @livingInRadius @allInRadius @EIR |
Targets all entities in the given radius. |
@EntitiesInRing | @EIRR | Targets all entities in the given ring. |
@EntitiesInRingNearOrigin | @ERNO | Targets all entities in the given ring around the origin. |
@PlayersInWorld | @World | Targets all players in the current world. |
@PlayersOnServer | @Server @Everyone |
Targets all players in the server. |
@PlayersInRing | Target all players between the specified min and max radius. | |
@PlayersNearOrigin | Targets players near the origin of a meta-skill. | |
@TrackedPlayers | @tracked | Targets players that are within the render distance of the caster |
@MobsNearOrigin | Targets all MythicMobs or vanilla overrides of the given type(s) in a radius around the origin | |
@EntitiesNearOrigin | @ENO | Targets all entities near the origin of a meta-skill |
@Children | @child @summons |
Targets any child entities summoned by the caster. |
@Siblings | @sibling @brothers @sisters |
Targets any mobs that share the same parent as the caster. |
@ItemsNearOrigin | Targets item drops near the origin of a meta-skill. | |
@ItemsInRadius | @IIR | Targets all item drops in the given radius |
ThreatTable Targeters
These targeters only work if the mob has Threat Tables enabled.
Targeter | Shorthand | Description |
---|---|---|
@ThreatTable | @TT | Targets every entity on the casting mob's threat table |
@ThreatTablePlayers | Targets all the players on the casting mob's threat table | |
@RandomThreatTarget | @RTT | Targets a random entity on the casting mob's threat table |
@RandomThreatTargetLocation | @RTTL | Targets the location of a random entity on the casting mob's threat table |
Location Targeters
Single-Location Targeters
Targeter | Shorthand | Description |
---|---|---|
@SelfLocation | @casterLocation @bossLocation @mobLocation |
Targets the caster's location |
@SelfEyeLocation | @eyeDirection @casterEyeLocation @bossEyeLocation @mobEyeLocation |
Targets the caster's eye location |
@Forward | Targets a location in front of caster's facing direction | |
@ProjectileForward | Targets a location in front of the casting projectile, relative to its direction | |
@TargetLocation | @targetloc @TL |
Targets the caster's target's location |
@TriggerLocation | Targets the location of the entity that triggered the skill | |
@SpawnLocation | Targets the world's spawn location. | |
@CasterSpawnLocation | Targets the location the caster spawned at. | |
@Location | Targets the specified coordinates in the caster's world. | |
@Origin | @source | Targets the location of the "origin" or "source" of a meta-skill. While that is usually the casting mob, there are special cases where this is not true (such as with the Projectile Skill, where the "origin" is the location of the projectile). |
@ObstructingBlock | Tries to target the block in front of the caster that is obstructing it | |
@TargetBlock | Targets the block the casting player is looking at. | |
@TrackedLocation | Targets the mob's tracked location | |
@NearestStructure | Targets the nearest structure of the specified type within a radius in the caster's world | |
@VariableLocation | @varLocation | Targets the location stored in the specified variable |
@HighestBlock | Targets the highest block at the skill origin |
Multi-Location Targeters
Targeter | Shorthand | Description |
---|---|---|
@ForwardWall | Targets a plane in front of the caster | |
@PlayerLocationsInRadius | @PLIR | Targets all player locations in the given radius |
@Pin | Targets the location(s) of a pin. | |
@Ring | Target points to form a ring of locations | |
@RandomRingPoint | Targets random points in a ring around the caster | |
@Cone | Returns the # of points target locations that comprise a cone (Note: Cone is fixed on the y-axis, and cannot be rotated up or down) | |
@Sphere | Targets points in a sphere around the caster | |
@Rectangle | @cube @cuboid |
Returns the # of points target locations that comprise a rectangle |
@RandomLocationsNearCaster | @randomLocations @RLNC |
Targets random locations near the caster. |
@RandomLocationsNearOrigin | @RLO @randomLocationsOrigin @RLNO |
Targets random locations near the origin of a skill. |
@BlocksNearOrigin | @BNO | Targets all blocks in a radius around the origin of the metaskill. |
@RingAroundOrigin | @ringOrigin @RAO |
Targets locations in a specified ring around the origin. |
@Spawners | Targets the location of the specified spawners. | |
@BlocksInPinRegion | Targets the blocks in a region delimited by two pins | |
@ChunksInWERegion | @chunksInWGRegion | Targets the 0,0 chunk corners of the chunks in a specified WorldGuard region |
Meta Targeters
Meta Targeters targets relative to an inherited target. For example:
# Mob file
Laser:
Type: CREEPER
Display: 'Laser'
Health: 12
AITargetSelectors:
- 0 clear
- 1 players
Skills:
- skill{s=Laser} @target
# Skill file
Laser:
Skills:
- ignite @EntitiesInLine{r=1}
In the example skill above, the "ignite" mechanic will target entities between the caster and the targeter specified in - skill{s=Laser} @target
, i.e. a line between the caster and the caster's target.
Some meta targeters also allow the mechanic to be casted "fromOrigin". This will change the starting location of the meta-targeter to be @Origin rather than the caster, which can allow for some complex effects, particularly when used with Projectiles.
Meta-Entity Targeters
Targeter | Shorthand | Description |
---|---|---|
@LivingInLine | @entitiesInLine @livingEntitiesInLine @LEIL @EIL |
Targets any entities in a line between the inherited target and the casting mob. |
@LivingNearTargetLocation | @LNTL @ENTL @ENT |
Targets all living entities near the inherited target. |
@PlayersNearTargetLocations | @playersNearTargetLocation @PNTL |
Targets all players near the inherited targets. |
@TargetedTarget | @Targeted | Targets the inherited targeted entities. |
Meta-Location Targeters
Targeter | Shorthand | Description |
---|---|---|
@Line | Targets locations between the mob and the inherited targets. | |
@RandomLocationsNearTargets | @randomLocationsNearTarget @randomLocationsNearTargetEntities @randomLocationsNearTargetLocations @RLNT @RLNTE @RLNTL |
Targets random locations around the inherited targets. |
@FloorOfTargets | @FOT @floorsOfTarget |
Targets the blocks underneath the inherited targets. |
@LocationsOfTargets | @locationOfTarget @LOT |
Targets the location of the inherited target entities. |
@TargetedLocation | @targetedLocations @targetedLoc |
Targets the location of the inherited target locations. |
@BlocksInRadius | @BIR | Targets all blocks in a radius of the inherited targets. |
@BlocksInChunk | @BIC | Targets all blocks in a chunk relative to the inherited target. |
@BlockVein | @vein @bv |
Target all adjancent blocks that match the blocktype, starting from the origin of the skill. |
Special Targeters
Targeter | Shorthand | Description |
---|---|---|
@None | Provides no target. (Useful for mechanics with no target input.) | |
@Region | Special targeter to target a region. Only works with specific mechanics |
Common Attributes
There are some common attributes that can be used in most of the Targeters, depending on the targeter's returned value
All Targeters
Attribute | Aliases | Description | Default |
---|---|---|---|
targetconditions | conditions, cond, c | Inline Target Conditions |
Sudo Attributes
Attribute | Aliases | Description | Default |
---|---|---|---|
sudoparent | fromparent, ofparent, asparent, parent, ofparent | If this attribute is set to true , the targeter will be parsed as if it was the Parent of the casting entity executing the mechanic |
|
sudoowner | fromowner, ofowner, asowner, owner, ofowner | If this attribute is set to true , the targeter will be parsed as if it was the Owner of the casting entity executing the mechanic |
|
sudotrigger | fromtrigger, oftrigger, astrigger, trigger, oftrigger | If this attribute is set to true , the targeter will be parsed as if it was the Trigger of the skilltree executing the mechanic |
In this example, the mob will keep getting teleported in front of its owner, since the Forward
targeter is using the sudoowner
attribute, and is, as such, getting parsed as if it was the owner of the casting mob executing the mechanic
TestOwner:
Type: Wolf
Skills:
- setOwner @NearestPlayer{r=99} ~onSpawn
- tp @Forward{f=5;y=1;sudoowner=true} ~onTimer:1
Common Entity Targeters Attributes
Attribute | Aliases | Description | Default |
---|---|---|---|
useboundingbox | bb | If the targeter is performing a distance check, this option allows it to check against the bounding box of the target instead of the center of its hitbox | |
unique | u | The maximum number of times an entity can be targeted. Defaults to 1, disable with 0. This is mostly used for meg models with multiple hitboxes | |
nomegbb | nmb | Whether MEG sub hitboxes should be filtered out |
Common Location Targeters Attributes
Attribute | Aliases | Description | Default |
---|---|---|---|
xoffset | xo, x | Centers the offset on the x axis | |
yoffset | yo, y | Centers the offset on the y axis | |
zoffset | zo, z | Centers the offset on the z axis | |
forwardOffset | foffset, fo | Centers forward and backward offset, based on the caster's viewing angle | |
sideOffset | soffset, so | Centers left and right offset, based on the caster's viewing angle | |
rotatex | rotx | Rotation on the x axis | |
rotatey | roty | Rotation on the y axis | |
rotatez | rotz | Rotation on the z axis | |
coordinatex | cx | Sets the x axis coordinate | |
coordinatey | cy | Sets the y axis coordinate | |
coordinatez | cz | Sets the z axis coordinate | |
length | Multiplied the direction vector by the specified value | ||
blocktypes | blocktype, bt | Only targets selected block types. Multiple blocks can be listed by separating them using a , You can add a # at the front of the type to indicate that the block only needs to match part of the type, add @ to indicate that the block only needs to match the start of the typeYou can add a * at the front of the type to indicate that the one specified is not a block type, but a block tag (example: blocktype=*sculk_replaceable ) |
|
blockignores | blockignore, bi | Excludes selected block types from the targeter. Multiple blocks can be listed by separating them using a , Can use the special syntaxes specified in blocktype
|
|
coordinateyaw | cyaw | Sets the yaw value | |
coordinatepitch | cpitch | Sets the pitch value | |
blockcentered | centered | Boolean value. If set to true, the center of the block at the target location will be targeted, instead of the target location itself | |
faulty | Whether the mechanic should use the old vector formula. Defaults to true |
Targeter Options
Target Filters
Target Filters allow you to filter out certain targets, and makes targeters a lot more flexible.
They are used with two attributes (available on ANY entity-targeter):
Attribute | Aliases | Description | Default |
---|---|---|---|
target | The entity types to target | ||
ignore | The entity types to not target |
For example, to make a targeter that will ignore any players or non-hostile mobs, you'd use this:
- damage{a=20} @EntitiesInRadius{r=10;ignore=players,animals}
To make a targeter ONLY target players, you'd do something like this:
- skill{s=ASkill} @EntitiesInRadius{r=5;target=players}
You can set the default target filters in MythicMobs/config/config-skills.yml
Possible filters include:
Target Attribute
Target Filter | Aliases | Description |
---|---|---|
ground | Whether to target ground entities. Will ignore flying and water entities if used | |
water | Whether to target water entities. Will ignore flying and ground entities if used | |
flying | Whether to target flying entities. Will ignore ground and water entities if used | |
self | caster | Whether the caster of the mechanic can be targetd |
player | Whether players can be targeted | |
creative | Whether creative mode players can be targeted | |
spectator | Whether spectator mode players can be targeted | |
armorstand | armor_stand | Whether armor stands can be targeted |
marker | Whether markers can be targeted | |
npc | Whether Citizens NPCs can be targeted | |
animal | Whether animals can be targeted | |
creature | Whether creatures can be targeted | |
monster | Whether monsters can be targeted | |
villager | Whether villagers can be targeted |
If neither
ground
,water
andflying
are used and the default filters do not include any of them, thenPlayers
,ArmorStands
,Markers
,Creative
,Spectator
,CitizensNPCs
,Animals
,Creatures
,Monsters
andVillagers
will also be ignored
Ignore Attribute
Ignore Filter | Aliases | Description |
---|---|---|
player | Whether players shouldn't be targetd | |
creative | Whether creative mode players shouldn't be targeted | |
spectator | Whether spectator mode players shouldn't be targeted | |
armorstand | armor_stand | Whether armor stands shouldn't be targeted |
marker | Whether markers shouldn't be targeted | |
npc | Whether Citizens NPCs shouldn't be targeted | |
animal | Whether animals shouldn't be targeted | |
creature | Whether creatures shouldn't be targeted | |
monster | Whether monsters shouldn't be targeted | |
villager | Whether villagers shouldn't be targeted | |
faction | Whether entities in the same faction shouldn't be targeted | |
owner | Whether the caster's owner shouldn't be targeted | |
vanilla | Whether vanilla entities shouldn't be targeted |
Specific Filters
You can also specifically set whether to target a specific type of entity or not by using the attributes below. The effects of these attributes override the effects of the more generic target/ignore attributes for the specific entity type the attribute handles
Attribute | Aliases | Description | Default |
---|---|---|---|
targetself | Whether to target the caster of the mechanic | ||
targetplayers | Whether to target players | ||
targetcreative | Whether to target players in creative mode | ||
targetspectator | Whether to target players in spectator mode | ||
targetarmorstands | Whether to target armor stands | ||
targetmarkers | Whether to target markers | ||
targetnpcs | Whether to target Citizens NPCs | ||
targetanimals | Whether to target animals | ||
targetcreatures | Whether to target creatures | ||
targetsamefaction | Whether to target entities of the same faction | ||
targetowner | Whether to target the caster's owner | ||
targetvanilla | targetnonmythic | Whether to target non-Mythic entities | |
targetvillagers | Whether to target villagers |
- damage{a=20} @EntitiesInRadius{r=10;targetplayers=true;targetsamefaction=true;targetowner=false}
Use this to explicitly target players and entities in the same faction alongside any other valid target there may be, while also not targeting the owner of the caster
Target Limits
All entity and location targeters also support target limits (as of v5.0.4). With this you can limit how many entities/locations are targeted, including the order in which they are selected.
This is done with the attributes:
Attribute | Aliases | Description | Default |
---|---|---|---|
sort | sortby | How to sort the targeted entities/locations | |
limit | The limit to the targeted entities/locations after the sort is applied |
Lets say you want your ability to only target the 2 nearest players within 30 blocks. To do this, you'd simply set the limit 2 to and sort by nearest:
- @PlayersInRadius{r=30;limit=2;sort=NEAREST}
Currently, sort can have the following values:
General sorters:
- NONE (usually sorts by how long the entity has existed)
- RANDOM
- NEAREST
- FURTHEST
Entity Only Sorters
- HIGHEST_HEALTH
- LOWEST_HEALTH
- HIGHEST_THREAT
- LOWEST_THREAT