diff options
author | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2021-11-06 18:15:47 +0800 |
---|---|---|
committer | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2021-11-06 18:15:47 +0800 |
commit | b33a75b2eba88c60280fcd441a5dd974cf763ab4 (patch) | |
tree | 53bd51697f69596fdcc388cdc71cc91b745f8f67 /utils | |
parent | bae481562a9186cafebdde2be9ac53b93cb98885 (diff) | |
download | SoopyV2-b33a75b2eba88c60280fcd441a5dd974cf763ab4.tar.gz SoopyV2-b33a75b2eba88c60280fcd441a5dd974cf763ab4.tar.bz2 SoopyV2-b33a75b2eba88c60280fcd441a5dd974cf763ab4.zip |
Added update notif, cosmetics, and unfinished museum overlay
Diffstat (limited to 'utils')
-rw-r--r-- | utils/utils.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/utils/utils.js b/utils/utils.js index b8569d9..8aa2ad0 100644 --- a/utils/utils.js +++ b/utils/utils.js @@ -1,7 +1,7 @@ const NBTTagList = Java.type('net.minecraft.nbt.NBTTagList'); const NBTTagString = Java.type('net.minecraft.nbt.NBTTagString'); -let functions = { +let utils = { addLore: function(item, prefix, value){ const list = item @@ -30,6 +30,9 @@ let functions = { .getRawNBT() .func_74782_a("Lore", list); }, + getSBID: function(item){ + return item.getNBT()?.getCompoundTag("tag")?.getCompoundTag("ExtraAttributes")?.getString("id") || null + }, calculateDistance: function(p1, p2) { var a = p2[0] - p1[0]; var b = p2[1] - p1[1]; @@ -113,4 +116,4 @@ let functions = { } } -module.exports = functions
\ No newline at end of file +export default utils
\ No newline at end of file |