diff options
| author | Walker Selby <git@walkerselby.com> | 2022-02-22 21:17:19 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-23 04:17:19 +0100 |
| commit | e857e536d7dcea7c4e847ba598a0ed7dd20ed3e6 (patch) | |
| tree | 0c3798a8dc5ac720553033ac6028c0d16f77c161 /src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java | |
| parent | f035ce00967bce495390bf4d7bc8ad17ab74073a (diff) | |
| download | notenoughupdates-e857e536d7dcea7c4e847ba598a0ed7dd20ed3e6.tar.gz notenoughupdates-e857e536d7dcea7c4e847ba598a0ed7dd20ed3e6.tar.bz2 notenoughupdates-e857e536d7dcea7c4e847ba598a0ed7dd20ed3e6.zip | |
Add Custom Resource Pack Support to Mining in Profile Viewer (#86)
* Add createSkull Util
Add createSkull Util, makes it easier to make a custom skull when needed.
* Fix Gemstone Collection
Change displayName from "Gem stones" to "Gemstone"
Change displayItem from Red Stained Glass to Gemstone Item Head.
* Update GuiProfileViewer
Remove code remnant in comment
Add space to switch (potm) for consistent style
Add NBT data so that Custom Resource Packs work properly with the HOTM GUI.
Change tooltip logic to add third yellow color when in progress, matching Hypixel's HOTM display.
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java')
| -rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java index f09883eb..6fde1054 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java @@ -710,6 +710,31 @@ public class Utils { return itemStack; } + public static ItemStack createSkull(String displayName, String uuid, String value){ + ItemStack render = new ItemStack(Items.skull, 1, 3); + NBTTagCompound tag = new NBTTagCompound(); + NBTTagCompound skullOwner = new NBTTagCompound(); + NBTTagCompound properties = new NBTTagCompound(); + NBTTagList textures = new NBTTagList(); + NBTTagCompound textures_0 = new NBTTagCompound(); + NBTTagCompound display = new NBTTagCompound(); + + skullOwner.setString("Id", uuid); + skullOwner.setString("Name", uuid); + + textures_0.setString("Value", value); + textures.appendTag(textures_0); + + display.setString("Name", displayName); + tag.setTag("display",display); + + properties.setTag("textures", textures); + skullOwner.setTag("Properties", properties); + tag.setTag("SkullOwner", skullOwner); + render.setTagCompound(tag); + return render; + } + public static void drawStringF(String str, FontRenderer fr, float x, float y, boolean shadow, int colour) { fr.drawString(str, x, y, colour, shadow); } |
