/
Welcome to the initial alpha release of Tiny DataLib! This version focuses on providing essential, robust utility functions for your datapack development.
# data modify storage tiny_datalib:temp distance.UUID1 set from entity <Entity1> UUID ## Entity 1
# data modify storage tiny_datalib:temp distance.UUID2 set from entity <Entity2> UUID ## Entity 2
# function tiny_datalib:calc/distance with storage tiny_datalib:temp distance ## Make sure that both UUID's are valid.
# data modify storage tiny_datalib:temp distance set value {} ## Use if you want to reset function.
## Return types:
# Any -- Sucessful (NO ERROR)
# None/Fail -- Something went wrong (ERROR - PLEASE CHECK IF YOU HAVE EVERYTHING CORRECT)
# function tiny_datalib:database/save/add
## DATABASE ADD SAVE FUNCTION
#
## Example:
# function tiny_datalib:database/save/add with entity @s ## Adds a new save to database with key as a players UUID
##
#
## Return types:
# -1 -- UUID already exists (NO ERROR - UUID ALREADY EXISTS INSIDE OF SAVES)
# 1 -- Sucessful (NO ERROR)
# None/Fail -- Something went wrong (ERROR - PLEASE CHECK IF YOU HAVE EVERYTHING CORRECT)
##
# function tiny_datalib:database/save/remove
## DATABASE REMOVE SAVE FUNCTION
#
## Example:
# function tiny_datalib:database/save/remove with entity @s ## Removes save from database with key as a players UUID
##
#
## Return types:
# -1 -- UUID doesnt exists (NO ERROR - PLAYER ISNT INSIDE OF SAVES)
# 1 -- Sucessful (NO ERROR)
# None/Fail -- Something went wrong (ERROR - PLEASE CHECK IF YOU HAVE EVERYTHING CORRECT)
##
# function tiny_datalib:database/data/get
## DATABASE GET SAVE FUNCTION
#
## Example:
# function tiny_datalib:database/data/get with entity @s ## Gets save from UUID and puts it inside storage tiny_datalib:database output
##
#
## Return types:
# -1 -- UUID doesnt exists (NO ERROR - UUID ISNT INSIDE OF SAVES)
# 1 -- Sucessful (NO ERROR)
# None/Fail -- Something went wrong (ERROR - PLEASE CHECK IF YOU HAVE EVERYTHING CORRECT)
##
# function tiny_datalib:database/data/set
## DATABASE SET SAVE FUNCTION
#
## Example:
# function tiny_datalib:database/data/set with entity @s ## Sets save from UUID to data from storage tiny_datalib:database save
##
#
## Return types:
# -1 -- UUID doesnt exists (NO ERROR - UUID ISNT INSIDE OF SAVES)
# 1 -- Sucessful (NO ERROR)
# None/Fail -- Something went wrong (ERROR - PLEASE CHECK IF YOU HAVE EVERYTHING CORRECT)
##
# function tiny_datalib:database/var/get
## DATABASE GET VAR FUNCTION
#
## Example:
# function tiny_datalib:database/var/get {with:"entity @s",var:"",none:0} ## Gets variable from player. var must be valid and none is the value that you will get if it doesnt exist.
##
#
## Return types:
# Any -- Sucessful (NO ERROR)
# None/Fail -- Something went wrong (ERROR - PLEASE CHECK IF YOU HAVE EVERYTHING CORRECT)
##
# function tiny_datalib:database/var/set
## DATABASE SET VAR FUNCTION
#
## Example:
# function tiny_datalib:database/var/set {with:"entity @s",var:"",value:0} ## Sets/Creates variable for player. Value must be number!
##
#
## Return types:
# -1 -- UUID doesnt exists (NO ERROR - UUID ISNT INSIDE OF SAVES)
# 1 -- Sucessful (NO ERROR)
# None/Fail -- Something went wrong (ERROR - PLEASE CHECK IF YOU HAVE EVERYTHING CORRECT)
##
# function tiny_datalib:give/item
## CUSTOM GIVE FUNCTION
#
## Example:
# data modify storage tiny_datalib:temp item set from entity @s SelectedItem ## Data item can be anything as long as it has id and count specified...
# function tiny_datalib:give/item ## No macro isnt used and storage cannot be changed, This function MUST be run as a player.
# data modify storage tiny_datalib:temp item set value {} ## Use if you want to reset function.
##
#
## Return types:
# -1 -- Wrong id (ERROR - MAYBE WRONG ITEM)
# -2 -- Wrong count (ERROR - MAYBE WRONG ITEM)
# -3 -- Wrong UUID (ERROR - FUNCTION MUST BE RUN AS A PLAYER)
# 1 -- Sucessful (NO ERROR)
# None/Fail -- Something went wrong (ERROR - PLEASE CHECK IF YOU HAVE EVERYTHING CORRECT)
##
# function tiny_datalib:give/item/macro
## CUSTOM MACRO GIVE FUNCTION
#
## Example:
# function tiny_datalib:give/item/macro {with:"entity @s", data:"SelectedItem"} ## Make sure that its all valid, Function must be runned as a player
##
#
## Return types:
# -1 -- Wrong id (ERROR - MAYBE WRONG ITEM)
# -2 -- Wrong count (ERROR - MAYBE WRONG ITEM)
# -3 -- Wrong UUID (ERROR - FUNCTION MUST BE RUN AS A PLAYER)
# 1 -- Sucessful (NO ERROR)
# None/Fail -- Something went wrong (ERROR - PLEASE CHECK IF YOU HAVE EVERYTHING CORRECT)
##
# function tiny_datalib:raycast/block
## RAYCAST BLOCK FUNCTION
#
## Example:
# function tiny_datalib:raycast/block ## Maximum range - 32, Custom range will be added in future updates...
##
#
## Return types:
# Any -- Sucessful (NO ERROR)
# None/Fail -- Something went wrong (ERROR - PLEASE CHECK IF YOU HAVE EVERYTHING CORRECT)
##
We are already working on the next set of features to improve performance and add utility:

This project is a library with useful utilities such as a database system and more.