-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
release(0.0.3): adds basic entity data tags, as well as mkdoc documen…
…tation
- Loading branch information
Showing
14 changed files
with
121 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
execute as @s[tag=effects] run function s255:effects/main | ||
execute as @s[tag=effects-extra] run function s255:effects/extra | ||
execute as @s[tag=entity-data,type=!player] run function s255:entity_data/main | ||
execute as @s[tag=helpers] run function s255:helpers/main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
execute as @s run function s255:entity_data/main/regular |
7 changes: 7 additions & 0 deletions
7
datapack/data/s255/functions/entity_data/main/functions/invulnerable.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Add entity tag | ||
data modify entity @s[tag=invulnerable,tag=!s255--invulnerable] Invulnerable set value 1b | ||
tag @s[tag=invulnerable,tag=!s255--invulnerable] add s255--invulnerable | ||
|
||
# Remove entity tag | ||
data modify entity @s[tag=s255--invulnerable,tag=!invulnerable] Invulnerable set value 0b | ||
tag @s[tag=s255--invulnerable,tag=!invulnerable] remove s255--invulnerable |
7 changes: 7 additions & 0 deletions
7
datapack/data/s255/functions/entity_data/main/functions/no_ai.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Add entity tag | ||
data modify entity @s[tag=no-ai,tag=!s255--no-ai] NoAI set value 1b | ||
tag @s[tag=no-ai,tag=!s255--no-ai] add s255--no-ai | ||
|
||
# Remove entity tag | ||
data modify entity @s[tag=s255--no-ai,tag=!no-ai] NoAI set value 0b | ||
tag @s[tag=s255--no-ai,tag=!no-ai] remove s255--no-ai |
7 changes: 7 additions & 0 deletions
7
datapack/data/s255/functions/entity_data/main/functions/no_gravity.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Add entity tag | ||
data modify entity @s[tag=no-gravity,tag=!s255--no-gravity] NoGravity set value 1b | ||
tag @s[tag=no-gravity,tag=!s255--no-gravity] add s255--no-gravity | ||
|
||
# Remove entity tag | ||
data modify entity @s[tag=s255--no-gravity,tag=!no-gravity] NoGravity set value 0b | ||
tag @s[tag=s255--no-gravity,tag=!no-gravity] remove s255--no-gravity |
7 changes: 7 additions & 0 deletions
7
datapack/data/s255/functions/entity_data/main/functions/silent.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Add entity tag | ||
data modify entity @s[tag=silent,tag=!s255--silent] Silent set value 1b | ||
tag @s[tag=silent,tag=!s255--silent] add s255--silent | ||
|
||
# Remove entity tag | ||
data modify entity @s[tag=s255--silent,tag=!silent] Silent set value 0b | ||
tag @s[tag=s255--silent,tag=!silent] remove s255--silent |
18 changes: 18 additions & 0 deletions
18
datapack/data/s255/functions/entity_data/main/regular.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
tag @s[tag=no-ai,tag=!s255--no-ai] add s255--check | ||
tag @s[tag=!no-ai,tag=s255--no-ai] add s255--check | ||
|
||
tag @s[tag=no-gravity,tag=!s255--no-gravity] add s255--check | ||
tag @s[tag=!no-gravity,tag=s255--no-gravity] add s255--check | ||
|
||
tag @s[tag=invulnerable,tag=!s255--invulnerable] add s255--check | ||
tag @s[tag=!invulnerable,tag=s255--invulnerable] add s255--check | ||
|
||
tag @s[tag=silent,tag=!s255--silent] add s255--check | ||
tag @s[tag=!silent,tag=s255--silent] add s255--check | ||
|
||
execute as @s[tag=s255--check] run function s255:entity_data/main/functions/no_ai | ||
execute as @s[tag=s255--check] run function s255:entity_data/main/functions/no_gravity | ||
execute as @s[tag=s255--check] run function s255:entity_data/main/functions/invulnerable | ||
execute as @s[tag=s255--check] run function s255:entity_data/main/functions/silent | ||
|
||
tag @s remove s255--check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: Entity Data | ||
--- | ||
## Overview | ||
**speed255** has tags for modifying the data of a given entity. | ||
|
||
Non-player entities with the tag `entity-data` have access to these tags. | ||
|
||
Removing an entity data tag from a player will revert the data modification. Eg. removing the tag `silent` will allow the entity to make sounds again. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
title: Invulnerable | ||
--- | ||
Invulnerable makes the targeted entity invulnerable to all damage, except damage from a creative mode player, or the void. | ||
|
||
## Using the invulnerable tag | ||
Any non-player entity that has the `entity-data` tag, will be able to use the `invulnerable` tag. | ||
|
||
To summon an entity with the invulnerable tag: | ||
`/summon villager ~ ~ ~ {Tags:["entity-data","invulnerable"]}` | ||
|
||
| Tag | Command | | ||
| --- | ------- | | ||
| invulnerable | `data modify entity @t Invulnerable set value 1b` | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
title: No AI | ||
--- | ||
No AI removes the AI from the targeted entity, leaving it in a statue-like state. | ||
|
||
## Using the no-ai tag | ||
Any non-player entity that has the `entity-data` tag, will be able to use the `no-ai` tag. | ||
|
||
To summon an entity with the no-ai tag: | ||
`/summon villager ~ ~ ~ {Tags:["entity-data","no-ai"]}` | ||
|
||
| Tag | Command | | ||
| --- | ------- | | ||
| no-ai | `data modify entity @t NoAI set value 1b` | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
title: No Gravity | ||
--- | ||
No Gravity makes the targeted entity uneffected by gravity. | ||
|
||
## Using the no-gravity tag | ||
Any non-player entity that has the `entity-data` tag, will be able to use the `no-gravity` tag. | ||
|
||
To summon an entity with the no-ai tag: | ||
`/summon villager ~ ~ ~ {Tags:["entity-data","no-gravity"]}` | ||
|
||
| Tag | Command | | ||
| --- | ------- | | ||
| no-gravity | `data modify entity @t NoGravity set value 1b` | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
title: Silent | ||
--- | ||
Silent makes the targeted entity not emit any in game sounds. | ||
|
||
## Using the silent tag | ||
Any non-player entity that has the `entity-data` tag, will be able to use the `silent` tag. | ||
|
||
To summon an entity with the no-ai tag: | ||
`/summon villager ~ ~ ~ {Tags:["entity-data","silent"]}` | ||
|
||
| Tag | Command | | ||
| --- | ------- | | ||
| silent | `data modify entity @t Silent set value 1b` | |