diff options
Diffstat (limited to 'src/main/kotlin/features/debug/itemeditor')
| -rw-r--r-- | src/main/kotlin/features/debug/itemeditor/ExportRecipe.kt | 3 | ||||
| -rw-r--r-- | src/main/kotlin/features/debug/itemeditor/LegacyItemExporter.kt | 6 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/main/kotlin/features/debug/itemeditor/ExportRecipe.kt b/src/main/kotlin/features/debug/itemeditor/ExportRecipe.kt index 9356dd3..b3dc69a 100644 --- a/src/main/kotlin/features/debug/itemeditor/ExportRecipe.kt +++ b/src/main/kotlin/features/debug/itemeditor/ExportRecipe.kt @@ -6,6 +6,7 @@ import kotlinx.serialization.json.JsonObject import kotlinx.serialization.json.JsonPrimitive import net.minecraft.client.network.AbstractClientPlayerEntity import net.minecraft.entity.decoration.ArmorStandEntity +import net.minecraft.util.AssetInfo import moe.nea.firmament.Firmament import moe.nea.firmament.annotations.Subscribe import moe.nea.firmament.events.HandledScreenKeyPressedEvent @@ -67,7 +68,7 @@ object ExportRecipe { val id = generateName(reply) ItemExporter.exportStub(id, "ยง9$reply") { val playerEntity = entity as? AbstractClientPlayerEntity - val textureUrl = playerEntity?.skinTextures?.textureUrl + val textureUrl = (playerEntity?.skin?.body as? AssetInfo.SkinAssetInfo)?.url if (textureUrl != null) it.setSkullOwner(playerEntity.uuid, textureUrl) } diff --git a/src/main/kotlin/features/debug/itemeditor/LegacyItemExporter.kt b/src/main/kotlin/features/debug/itemeditor/LegacyItemExporter.kt index f06eb43..65f9fa1 100644 --- a/src/main/kotlin/features/debug/itemeditor/LegacyItemExporter.kt +++ b/src/main/kotlin/features/debug/itemeditor/LegacyItemExporter.kt @@ -291,12 +291,10 @@ class LegacyItemExporter private constructor(var itemStack: ItemStack) { fun copyLegacySkullNbt() { val profile = itemStack.get(DataComponentTypes.PROFILE) ?: return legacyNbt.put("SkullOwner", NbtCompound().apply { - profile.uuid.ifPresent { - putString("Id", it.toString()) - } + putString("Id", profile.gameProfile.id.toString()) putBoolean("hypixelPopulated", true) put("Properties", NbtCompound().apply { - profile.properties().forEach { prop, value -> + profile.gameProfile.properties().forEach { prop, value -> val list = getListOrEmpty(prop) put(prop, list) list.add(NbtCompound().apply { |
