diff options
author | nea <romangraef@gmail.com> | 2022-08-27 01:38:49 +0200 |
---|---|---|
committer | nea <romangraef@gmail.com> | 2022-08-27 01:38:49 +0200 |
commit | 973c13e84f8e091a6a920779103d96559dcd32a8 (patch) | |
tree | 95741faaa85509216a3a5130a3d8cd48b1b415fd /src/main/kotlin/moe/nea/notenoughupdates/rei | |
parent | 4c7bd601c4df4d03536e97e18e4b88d858330ad9 (diff) | |
download | Firmament-973c13e84f8e091a6a920779103d96559dcd32a8.tar.gz Firmament-973c13e84f8e091a6a920779103d96559dcd32a8.tar.bz2 Firmament-973c13e84f8e091a6a920779103d96559dcd32a8.zip |
Switch to yarn mappings
Diffstat (limited to 'src/main/kotlin/moe/nea/notenoughupdates/rei')
-rw-r--r-- | src/main/kotlin/moe/nea/notenoughupdates/rei/NEUReiPlugin.kt | 7 | ||||
-rw-r--r-- | src/main/kotlin/moe/nea/notenoughupdates/rei/SBItemEntryDefinition.kt | 20 |
2 files changed, 13 insertions, 14 deletions
diff --git a/src/main/kotlin/moe/nea/notenoughupdates/rei/NEUReiPlugin.kt b/src/main/kotlin/moe/nea/notenoughupdates/rei/NEUReiPlugin.kt index 624f5d8..475a5c9 100644 --- a/src/main/kotlin/moe/nea/notenoughupdates/rei/NEUReiPlugin.kt +++ b/src/main/kotlin/moe/nea/notenoughupdates/rei/NEUReiPlugin.kt @@ -8,19 +8,18 @@ import me.shedaniel.rei.api.common.entry.type.EntryTypeRegistry import me.shedaniel.rei.api.common.entry.type.VanillaEntryTypes import moe.nea.notenoughupdates.repo.ItemCache.asItemStack import moe.nea.notenoughupdates.repo.RepoManager -import net.minecraft.resources.ResourceLocation -import net.minecraft.world.item.ItemStack +import net.minecraft.item.ItemStack +import net.minecraft.util.Identifier class NEUReiPlugin : REIClientPlugin { companion object { - fun EntryStack<NEUItem>.asItemEntry(): EntryStack<ItemStack> { return EntryStack.of(VanillaEntryTypes.ITEM, value.asItemStack()) } - val SKYBLOCK_ITEM_TYPE_ID = ResourceLocation("notenoughupdates", "skyblockitems") + val SKYBLOCK_ITEM_TYPE_ID = Identifier("notenoughupdates", "skyblockitems") } override fun registerEntryTypes(registry: EntryTypeRegistry) { diff --git a/src/main/kotlin/moe/nea/notenoughupdates/rei/SBItemEntryDefinition.kt b/src/main/kotlin/moe/nea/notenoughupdates/rei/SBItemEntryDefinition.kt index 5ae154d..c851758 100644 --- a/src/main/kotlin/moe/nea/notenoughupdates/rei/SBItemEntryDefinition.kt +++ b/src/main/kotlin/moe/nea/notenoughupdates/rei/SBItemEntryDefinition.kt @@ -1,6 +1,5 @@ package moe.nea.notenoughupdates.rei -import com.mojang.blaze3d.vertex.PoseStack import io.github.moulberry.repo.data.NEUItem import me.shedaniel.math.Rectangle import me.shedaniel.rei.api.client.entry.renderer.EntryRenderer @@ -14,11 +13,12 @@ import me.shedaniel.rei.api.common.entry.type.EntryType import me.shedaniel.rei.api.common.entry.type.VanillaEntryTypes import moe.nea.notenoughupdates.rei.NEUReiPlugin.Companion.asItemEntry import moe.nea.notenoughupdates.repo.ItemCache.asItemStack -import moe.nea.notenoughupdates.repo.ItemCache.getResourceLocation -import net.minecraft.network.chat.Component -import net.minecraft.resources.ResourceLocation -import net.minecraft.tags.TagKey -import net.minecraft.world.item.ItemStack +import moe.nea.notenoughupdates.repo.ItemCache.getIdentifier +import net.minecraft.client.util.math.MatrixStack +import net.minecraft.item.ItemStack +import net.minecraft.tag.TagKey +import net.minecraft.text.Text +import net.minecraft.util.Identifier import java.util.stream.Stream object SBItemEntryDefinition : EntryDefinition<NEUItem> { @@ -37,7 +37,7 @@ object SBItemEntryDefinition : EntryDefinition<NEUItem> { override fun getRenderer(): EntryRenderer<NEUItem> = object : EntryRenderer<NEUItem> { override fun render( entry: EntryStack<NEUItem>, - matrices: PoseStack, + matrices: MatrixStack, bounds: Rectangle, mouseX: Int, mouseY: Int, @@ -65,7 +65,7 @@ object SBItemEntryDefinition : EntryDefinition<NEUItem> { return Stream.empty() } - override fun asFormattedText(entry: EntryStack<NEUItem>, value: NEUItem): Component { + override fun asFormattedText(entry: EntryStack<NEUItem>, value: NEUItem): Text { return VanillaEntryTypes.ITEM.definition.asFormattedText(entry.asItemEntry(), value.asItemStack()) } @@ -89,8 +89,8 @@ object SBItemEntryDefinition : EntryDefinition<NEUItem> { return false } - override fun getIdentifier(entry: EntryStack<NEUItem>?, value: NEUItem): ResourceLocation { - return value.getResourceLocation() + override fun getIdentifier(entry: EntryStack<NEUItem>?, value: NEUItem): Identifier { + return value.getIdentifier() } |