Skip to content

Tags (Old System, Before 1.7.10)

crudedragos edited this page Mar 14, 2015 · 4 revisions

JAS uses a Tag system to allow end users to customize their spawns. There are two types of tags: parent and property. A property tag is always attached to a single parent tag which interprets how its to be used.

Each parent tag is alone enclosed by {spawn} on either side. Property tags are added by suffixing them to the parent tag and prefixing the property tag with a :. This can be done indefinitely. Though needlessly large checks will impact performance. Each property tag has its own format, but each starts with a :tagName where additional values are provided as necessary such as a minHeight tag providing the value :minSpawnHeight,61. Certain tags can be prefixed with &, |, or ! to specify additional interpretations (such as inverting). These should be done after the : (or { in case or parent tags) but before the tag name. They are discussed in detail below.

The property tags should be read as a restriction of the parent tag. As an example, the tag string {spawn} simple means the entity should spawn with no restrictions. By attaching the :sky tag {spawn:sky} we restrict spawning by saying "spawn with no interruptions unless you see sky, then don't". The entity should now only spawn "underground".

There are three JAS entries that accept tags; entity Categories (such as ambient or Monster), entity Living Handlers (such as Bat or Zombie), and spawn list entries(entity biome pairs).

Valid Tags.

Not all tags are valid for all combinations of category and parent tags. For example, entity categories do not accept the {despawn} tag. Also, while it accepts the {spawn} tag it does not accept :cap while living handler {spawn} would.

Entity Category

Tags Entity Category
Parent Tags spawn
Spawn Tags light, block, blockRange, blockFoot, spawnRange, sky, minSpawnHeight, maxSpawnHeight, liquid, opaque, normal, solidSide, difficulty, torchLight, ground, top, fill, origin, players, entities, dimension, random

Living Handler

Tags Living Handler
Parent Tags spawn, despawn
Spawn Tags light, block, blockRange, blockFoot, spawnRange, sky, cap, minSpawnHeight, maxSpawnHeight, liquid, opaque, normal, solidSide, difficulty, torchLight, ground, top, fill, modspawn, origin, players, entities, dimension, random, writenbt
Despawn Tags light, block, blockFoot, blockRange, spawnRange, spawnRate, sky, despawnAge, maxSpawnRange, minSpawnHeight, maxSpawnHeight, liquid, opaque, normal, solidSide, difficulty, torchLight, ground, top, fill, origin, players, entities, dimension, random

Spawn List Entry

Tags Spawn List Entry
Parent Tags spawn
Spawn Tags spawn, light, block, blockRange, blockFoot, spawnRange, sky, minSpawnHeight, maxSpawnHeight, liquid, opaque, normal, solidSide, difficulty, torchLight, ground, top, fill, modspawn, origin, players, entities, dimension, random, writenbt

Tags Modifiers

There are currently two types of tag modifiers; inverters and chaining.

Invertible Tags

Invertible tags are the simplest modifier. As their names imply they reverse the output. They are formatted by prefixing the relevent tag with a !. See property tags below for invertible tags.

# Example Tag Interpretation
1 {spawn} Entity should spawn.
2 {!spawn} Entity should not spawn.
3 {spawn:sky} Entity should spawn unless it can see sky.
4 {spawn:!sky} Entity should spawn unless it can see not sky.
5 {!spawn:sky} Entity should not spawn unless it can see the sky.

Chainable Tags

Tags that are Chainable take the previous tags into account during evaluation. They "link" with the previous tag by either a Boolean operators AND or OR. Tags are formatted identically as before, except they can be prefixed by | or & to set their behaviour. By default all tags are parsed as OR if no explicit operator is detected.

Chainable tags are parsed left to right, irrespective of the any non-chainable tags inbetween. There is no practival limit to the number of chainable tags.

Examples

# Example Tag Interpretation
1 {!spawn:sky:block,12} Don't Spawn this entity unless it can see sky OR it is on a sand block. So this will spawn on the surface anywhere (such as plains), and anywhere there is sand (such as deserts, possibly underground if sand is there)
2 {!spawn:sky:&block,12} Don't Spawn this entity unless it can see sky AND it is on a sand block. So this will spawn on the surface anywhere (such as plains) ONLY IF there is also sand (such as deserts)
3 {spawn:sky:light,7,15} The entity will spawn UNLESS it can see sky or the light level is above 7
4 {!spawn:sky:cap,10:&block,12} Equivalent to 2 but with entity cap of 10.
5 {!spawn:sky:&block,2:block,87} This entity has two valid cases it will spawn. First, if it is on sand and can see sky. The Second is if it on netherack.

Property Tags

Property tag formats and descriptions. Chaninable tags are appended with a [&] and invertible with a [!].

Tag Modifiers Format & Description
sky [&]``[!] Uses the height map to check if the current entity height is greater than the top block
          |           | `:sky`

ground |[&]``[!] | Similar to sky, except that it iterates downward ignoring leaves, wood, foliage, and blocks the player can move through. | | :ground blockFoot |[&] | Checks the block the entity is standing on | | Identical to block tag, substituting blockfoot for block top |[&]``[!] | Checks that the block below the entity is the same as the terrain "top" block used in world generation. | | :top fill |[&]``[!] | Checks that the block below the entity is the same as the terrain "filler" block used in world generation. | | :fill block |[&] | Searches nearby area for block, default range is 3. Can be customized with blockRange tag | | - separates blockID from Meta. > separates min and max range of ids. , separates multiple entries. | | Block with Meta :1-2 | | Block Without Meta (assumes 0) :block,1 | | Range of BlockIDS (inclusive) (every block meta is 0) :block,1>20
| | Range of BlockIDS (inclusive) (every block meta is 2) :block,1>20-2 | | Range of BlockIDS (inclusive) (every block meta is 2 and 3) :block,1>20-2>3 | | Multiple Block-Meta Range :block,1>20-2>4,30-1,30-3>4,25 blockRange | | Specifies the range used by the block tag. | | :blockRange,isotropicRange | | :blockRange,rangeX, rangeY, rangeZ light |[&]``[!] | Checks the current light level. Light is minecraft varies from 0 to 15. | | :light,minLightLevel,maxLightLevel torchLight |[&]``[!] | Checks the current light level ignoring time of day. Light is minecraft varies from 0 to 15. | | :torchLight,minLightLevel,maxLightLevel entitycap | | Restricts the maximum number of the entity that can exist. Zero is interpreted as no cap. | | :cap,maxNumber spawnRange | | Marks the minimum distance an entity will be eligible for despawning. Entities within minimum will never despawn. | | :spawnRange,range maxSpawnRange | | Marks the maximum distance an entity will be eligible for despawning. Entities outside maximum is istant despawning. | | :maxSpawnRange,range despawnAge | | Marks the minimum age an entity is elibible for despawning. Age is in ticks. | | :despawnAge,ageInTicks spawnRate | | Marks the minimum age an entity is elibible for despawning. | | :spawnRange,range spawnRate | | Marks the minimum age an entity is elibible for despawning. | | :spawnRange,range minSpawnHeight|[&]``[!] | Checks that the height is above the provided value. Restricts when entity is below height. | | :minSpawnHeight,height maxSpawnHeight|[&]``[!] | Checks that the height is below the provided value. Restricts when entity is above height. | | :maxSpawnHeight,height modSpawn |[&]``[!] | Checks using the default entities getCanSpawnHere method. | | :modSpawn origin |[&]``[!] | Checks if distance to spawn is within range. | | :origin,minRange,maxRange players |[&]``[!] | Checks if the specified number of players are withing the specified distance. | | :player,minSearch,maxSearch,min#,max# entities |[&]``[!] | Checks if the specified number of entities with provided name are withing the specified distance. | | :entities,searchName,minSearch,maxSearch,min#,max# normal |[&]``[!] | Checks that the block(s) is(are) a NormalCube. | | general form :normal,searchRange,searchOffset | | searchOffset is optional, assumed to be 0 unless specified :normal,searchRange | | searchRange can be isotropic by providing a single parameter i.e. :normal,1 | | Individual directions for each are provided by seperating using / | | i.e. Search range of 2 from two block below :normal,2,0/-2/0 liquid |[&]``[!] | Checks that the block(s) is(are) a liquid. | | general form :liquid,searchRange,searchOffset | | searchOffset is optional, assumed to be 0 unless specified :liquid,searchRange | | searchRange can be isotropic by providing a single parameter i.e. :liquid,1 | | Individual directions for each are provided by seperating using / | | i.e. Search range of 2 from two block below :liquid,2,0/-2/0 opaque |[&]``[!] | Checks that the block(s) is(are) opaque. | | general form :opaque,searchRange,searchOffset | | searchOffset is optional, assumed to be 0 unless specified :opaque,searchRange | | searchRange can be isotropic by providing a single parameter i.e. :opaque,1 | | Individual directions for each are provided by seperating using / | | i.e. Search range of 2 from two block below :opaque,2,0/-2/0 solidSide |[&]``[!] | Checks that the block(s) is(are) solid on the side provided. There are six sides to a cube. | | general form :solidside,side,searchRange,searchOffset | | searchOffset is optional, assumed to be 0 unless specified :solidside,side,searchRange | | searchRange can be isotropic by providing a single parameter i.e. :solidside,0,1 | | Individual directions for each are provided by seperating using / | | i.e. Search range of 2 from two block below :solidside,0,2,0/-2/0 writeNBT |[&] | Attempts to getOrSet a tag. Cotnainer tags getOrSet the specified child tag. Value tags set the target tag. | | Format is as many tag operations as desired seperated by ',' | | container tag operation format targetTag/targetTagID | | value tag operation format targetTag/targetTagID/value | | array value tag operation format targetTag/targetTagID/value1/value2/value3/... isTamed |[&]``[!] | Checks if entity is tamed | | :isTamed | | Compatible with entities that extend the vanilla class hierarchy. Other entities may implement the jas.api.ITameable interface. isTameable |[&]``[!] | Checks if entity is tameable | | :isTameable | | Compatible with entities that extend the vanilla class hierarchy. Other entities may implement the jas.api.ITameable interface. location |[&]``[!] | Evalutes if spawn location is within target bound. | | :location,targetX,targetY,targetZ,varX,varY,varZ | | Note that the range in along a coordinate specifiecd by a target and variance is from (min = targetX - varX -to-> max = targetX + varX) dim |[&]``[!] | Evaluates if the current dimensionID matched the one provided. Overworld=0, Nether=-1, End=1 | | :dim,interger_of_desired_dimensionID random |[&]``[!] | Restricts when (random number + offset) <= maxValue | | :random,range,offset,maxvalue