Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinthegreat1 authored May 5, 2024
1 parent 0b3a393 commit 7652da3
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/main/java/de/hysky/skyblocker/utils/ItemUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,7 @@ public static PropertyMap propertyMapWithTexture(String textureValue) {
public static String getHeadTexture(ItemStack stack) {
if (!stack.isOf(Items.PLAYER_HEAD) || !stack.contains(DataComponentTypes.PROFILE)) return "";

ProfileComponent profile = stack.get(DataComponentTypes.PROFILE);
if (profile == null) return "";

return profile.properties().get("textures").stream()
return stack.get(DataComponentTypes.PROFILE).properties().get("textures").stream()
.map(Property::value)
.findFirst()
.orElse("");
Expand Down

0 comments on commit 7652da3

Please sign in to comment.