From b33a75b2eba88c60280fcd441a5dd974cf763ab4 Mon Sep 17 00:00:00 2001 From: Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> Date: Sat, 6 Nov 2021 18:15:47 +0800 Subject: Added update notif, cosmetics, and unfinished museum overlay --- utils/utils.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'utils') 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 -- cgit