Skip to content

Commit

Permalink
Fixed Item.playerHead(name) issues
Browse files Browse the repository at this point in the history
  • Loading branch information
LatvianModder committed Jul 19, 2024
1 parent 09a2a76 commit a44d171
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package dev.latvian.mods.kubejs.bindings;

import com.google.gson.JsonObject;
import com.mojang.authlib.GameProfile;
import com.mojang.authlib.properties.Property;
import com.mojang.authlib.properties.PropertyMap;
import com.mojang.serialization.MapCodec;
Expand Down Expand Up @@ -96,7 +95,7 @@ static boolean isItem(@Nullable Object o) {

static ItemStack playerHead(String name) {
var stack = new ItemStack(Items.PLAYER_HEAD);
stack.set(DataComponents.PROFILE, new ResolvableProfile(new GameProfile(Util.NIL_UUID, name)));
stack.set(DataComponents.PROFILE, new ResolvableProfile(Optional.of(name), Optional.empty(), new PropertyMap()));
return stack;
}

Expand Down

0 comments on commit a44d171

Please sign in to comment.