diff options
Diffstat (limited to 'src/main/kotlin/moe/nea/notenoughupdates/rei/NEUItemEntrySerializer.kt')
-rw-r--r-- | src/main/kotlin/moe/nea/notenoughupdates/rei/NEUItemEntrySerializer.kt | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/main/kotlin/moe/nea/notenoughupdates/rei/NEUItemEntrySerializer.kt b/src/main/kotlin/moe/nea/notenoughupdates/rei/NEUItemEntrySerializer.kt deleted file mode 100644 index b6c81a7..0000000 --- a/src/main/kotlin/moe/nea/notenoughupdates/rei/NEUItemEntrySerializer.kt +++ /dev/null @@ -1,25 +0,0 @@ -package moe.nea.notenoughupdates.rei - -import io.github.moulberry.repo.data.NEUItem -import me.shedaniel.rei.api.common.entry.EntrySerializer -import me.shedaniel.rei.api.common.entry.EntryStack -import net.minecraft.nbt.NbtCompound -import moe.nea.notenoughupdates.repo.RepoManager -import moe.nea.notenoughupdates.util.SkyblockId - -object NEUItemEntrySerializer : EntrySerializer<NEUItem?> { - const val SKYBLOCK_ID_ENTRY = "SKYBLOCK_ID" - - override fun supportSaving(): Boolean = true - override fun supportReading(): Boolean = true - - override fun read(tag: NbtCompound): NEUItem? { - return RepoManager.getNEUItem(SkyblockId(tag.getString(SKYBLOCK_ID_ENTRY))) - } - - override fun save(entry: EntryStack<NEUItem?>, value: NEUItem?): NbtCompound { - return NbtCompound().apply { - putString(SKYBLOCK_ID_ENTRY, value?.skyblockItemId ?: "null") - } - } -} |