User:Aeldrion/Projects/AESTD

AESTD is a utility datapack written by Aeldrion for Minecraft vanilla 1.14 that adds useful functions and tools to help making complex command systems easier. Its development started in July 2018.

AESTD function library
The AESTD function library is the biggest feature of AESTD. It is divided in seven folders:,  ,  ,  ,  ,   and. Every function contains a comment documentation stating in what snapshot or version the function was last tested.

It contains over sixty functions that can do, among other things, the following:
 * Biome/weather detection
 * Precise entity damaging
 * Player inventory manipulation
 * Generating random numbers
 * Getting the name or head of a player

Useful tags
AESTD also features several item, block and entity tags.

Summary of item tags
,,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,

Summary of entity type flags
,,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,

Summary of block tags
,,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,

TPS calculator
The TPS calculator is a tool of the  namespace. It evaluates the ticks per second on a ten second period. To use the TPS calculator, use the command.

It uses the shrinking of the world border to compare ticks and actual time. When a TPS test has started, it must end before another TPS test starts.

Save chunk
The save chunk (positioned at x=1519204, z=0) is a chunk that AESTD uses to save data used by other functions. When AESTD is loaded for the first time in a new world, it will ask players to run a /forceload command to mark that chunk for force loading. Its loading is essential for many functions to work.

Merging AESTD with your data pack
If you want to share your data pack and use AESTD but don't want to tell people to download two data packs, you can merge AESTD into yuour data pack by going through the following steps:


 * 1) Copy namespaces to your data pack. Open the AESTD data pack. Copy the ,  ,   and   namespaces and move them to your data pack's   folder.
 * 2) Move loot tables to your data pack. Open the AESTD data pack. Go in   and copy the yellow shulker box loot table to your data pack, under the   namespace.
 * 3) Merge  . Open your data pack. Go in   and add the following function:  . If there is no such file or directory, create it and copy from.
 * 4) Merge  . Open your data pack. Go in   and add the following function:  . If there is no such file or directory, create it and copy from.

High range pick block
https://streamable.com/m3qge

main.mcfunction (called every tick by tick.json) execute as @a[scores={rightClick=1..}] run function pick_block
 * 1) rightClick detects the use of a carrot on a stick

pick_block.mcfunction function aestd:player/get_block_looking_at function aestd:world/add_marker execute at @e[tag=aestd.marker] run function aestd:block/get_block_id scoreboard players set @s aestd.item_slot -1 function aestd:item/set_block_id scoreboard players reset @s rightClick

Area of damage
The following function will cause all players to have a 1% chance of damaging nearby mobs every tick

main.mcfunction scoreboard players set @a aestd.random.max 100 execute as @a run function aestd:math/random execute as @a[scores={aestd.random=0}] at @s run function damage

damage.mcfunction tag @e[type=!player,distance=..5] add damaged scoreboard players set @e[tag=damaged] aestd.damage 400 tag @e[tag=damaged] add aestd.damage.hurt_by_player execute as @e[tag=damaged] run function aestd:entity/damage tag @e remove damaged
 * 1) Damage by 4HP

Links
GitHub repository

Official AESTD Discord server

“Aeldrion Creations” Discord server