diff --git a/gradle.properties b/gradle.properties index 334d1ed..7ecca48 100644 --- a/gradle.properties +++ b/gradle.properties @@ -53,7 +53,7 @@ mod_name=Zontreck Library Mod # The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default. mod_license=GPLv3 # The mod version. See https://semver.org/ -mod_version=1.10.010224.1909 +mod_version=1.10.010224.1940 # The group ID for the mod. It is only important when publishing as an artifact to a Maven repository. # This should match the base package used for the mod sources. # See https://maven.apache.org/guides/mini/guide-naming-conventions.html diff --git a/src/main/java/dev/zontreck/libzontreck/util/heads/HeadCache.java b/src/main/java/dev/zontreck/libzontreck/util/heads/HeadCache.java index 416a59f..1c06146 100644 --- a/src/main/java/dev/zontreck/libzontreck/util/heads/HeadCache.java +++ b/src/main/java/dev/zontreck/libzontreck/util/heads/HeadCache.java @@ -49,7 +49,7 @@ public class HeadCache private HeadCacheItem() {} - public ItemStack getAsItem() + public ItemStack getAsItem(String itemName) { ItemStack head = new ItemStack(Items.PLAYER_HEAD, 1); @@ -66,8 +66,14 @@ public class HeadCache skullOwner.put("Properties", properties); head.addTagElement(PlayerHeadItem.TAG_SKULL_OWNER, skullOwner); - Component headname = ChatHelpers.macro("[0]'s Head", name); - head.setHoverName(headname); + if(itemName == "") + { + + Component headname = ChatHelpers.macro("[0]'s Head", name); + head.setHoverName(headname); + }else { + head.setHoverName(ChatHelpers.macro(itemName)); + } return head; diff --git a/src/main/java/dev/zontreck/libzontreck/util/heads/HeadUtilities.java b/src/main/java/dev/zontreck/libzontreck/util/heads/HeadUtilities.java index d7275a7..adb9894 100644 --- a/src/main/java/dev/zontreck/libzontreck/util/heads/HeadUtilities.java +++ b/src/main/java/dev/zontreck/libzontreck/util/heads/HeadUtilities.java @@ -27,9 +27,9 @@ public class HeadUtilities { } } - public static ItemStack get(String playerName) + public static ItemStack get(String playerName, String itemName) { - return cachedLookup(playerName).getAsItem(); + return cachedLookup(playerName).getAsItem(itemName); } private static HeadCacheItem externalHeadRequest(String playerName)