fix looking at an old cleric impetus with a lens crashing

This commit is contained in:
yrsegal@gmail.com 2022-06-15 16:54:09 -04:00
parent 71a0b11d25
commit 13d97af5bf

View file

@ -85,9 +85,9 @@ public class BlockEntityStoredPlayerImpetus extends BlockEntityAbstractImpetus {
var name = this.getPlayerName();
if (name != null) {
var head = new ItemStack(Items.PLAYER_HEAD);
NBTHelper.put(head, "SkullOwner", NbtUtils.writeGameProfile(new CompoundTag(), storedPlayerProfile));
NBTHelper.put(head, "SkullOwner", NbtUtils.writeGameProfile(new CompoundTag(), name));
lines.add(
new Pair<>(head, new TranslatableComponent("hexcasting.tooltip.lens.impetus.storedplayer", name)));
new Pair<>(head, new TranslatableComponent("hexcasting.tooltip.lens.impetus.storedplayer", name.getName())));
} else {
lines.add(new Pair<>(new ItemStack(Items.BARRIER),
new TranslatableComponent("hexcasting.tooltip.lens.impetus.storedplayer.none")));