aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java
diff options
context:
space:
mode:
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.java25
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);
}