diff options
Diffstat (limited to 'common/src/main/kotlin/moe/nea/notenoughupdates')
4 files changed, 8 insertions, 7 deletions
diff --git a/common/src/main/kotlin/moe/nea/notenoughupdates/NotEnoughUpdates.kt b/common/src/main/kotlin/moe/nea/notenoughupdates/NotEnoughUpdates.kt index b55c5d8..3526bc4 100644 --- a/common/src/main/kotlin/moe/nea/notenoughupdates/NotEnoughUpdates.kt +++ b/common/src/main/kotlin/moe/nea/notenoughupdates/NotEnoughUpdates.kt @@ -3,11 +3,11 @@ package moe.nea.notenoughupdates import dev.architectury.registry.registries.Registries import io.github.moulberry.repo.NEURepository import java.nio.file.Path +import java.util.logging.Logger object NotEnoughUpdates { val REGISTRIES by lazy { Registries.get(MOD_ID) } - const val MOD_ID = "notenoughupdates" val neuRepo = NEURepository.of(Path.of("NotEnoughUpdates-REPO")).also { diff --git a/common/src/main/kotlin/moe/nea/notenoughupdates/rei/NEUReiPlugin.kt b/common/src/main/kotlin/moe/nea/notenoughupdates/rei/NEUReiPlugin.kt index 6d960e3..cc4b0f1 100644 --- a/common/src/main/kotlin/moe/nea/notenoughupdates/rei/NEUReiPlugin.kt +++ b/common/src/main/kotlin/moe/nea/notenoughupdates/rei/NEUReiPlugin.kt @@ -28,6 +28,7 @@ class NEUReiPlugin : REIClientPlugin { registry.register(SKYBLOCK_ITEM_TYPE_ID, SBItemEntryDefinition) } + override fun registerEntries(registry: EntryRegistry) { neuRepo.items.items.values.forEach { if (!it.isVanilla) diff --git a/common/src/main/kotlin/moe/nea/notenoughupdates/rei/SBItemEntryDefinition.kt b/common/src/main/kotlin/moe/nea/notenoughupdates/rei/SBItemEntryDefinition.kt index 6612113..6726b4f 100644 --- a/common/src/main/kotlin/moe/nea/notenoughupdates/rei/SBItemEntryDefinition.kt +++ b/common/src/main/kotlin/moe/nea/notenoughupdates/rei/SBItemEntryDefinition.kt @@ -6,6 +6,7 @@ import me.shedaniel.math.Point import me.shedaniel.math.Rectangle import me.shedaniel.rei.api.client.entry.renderer.EntryRenderer import me.shedaniel.rei.api.client.gui.widgets.Tooltip +import me.shedaniel.rei.api.client.gui.widgets.TooltipContext import me.shedaniel.rei.api.common.entry.EntrySerializer import me.shedaniel.rei.api.common.entry.EntryStack import me.shedaniel.rei.api.common.entry.comparison.ComparisonContext @@ -50,9 +51,9 @@ object SBItemEntryDefinition : EntryDefinition<NEUItem> { ) } - override fun getTooltip(entry: EntryStack<NEUItem>, mouse: Point): Tooltip? { + override fun getTooltip(entry: EntryStack<NEUItem>, tooltipContext: TooltipContext): Tooltip? { return VanillaEntryTypes.ITEM.definition.renderer - .getTooltip(entry.asItemEntry(), mouse) + .getTooltip(entry.asItemEntry(), tooltipContext) } } diff --git a/common/src/main/kotlin/moe/nea/notenoughupdates/repo/ItemCache.kt b/common/src/main/kotlin/moe/nea/notenoughupdates/repo/ItemCache.kt index 8b3939e..aa93fec 100644 --- a/common/src/main/kotlin/moe/nea/notenoughupdates/repo/ItemCache.kt +++ b/common/src/main/kotlin/moe/nea/notenoughupdates/repo/ItemCache.kt @@ -8,7 +8,7 @@ import moe.nea.notenoughupdates.util.LegacyTagParser import moe.nea.notenoughupdates.util.appendLore import net.minecraft.nbt.CompoundTag import net.minecraft.nbt.NbtOps -import net.minecraft.network.chat.TextComponent +import net.minecraft.network.chat.Component import net.minecraft.resources.ResourceLocation import net.minecraft.util.datafix.DataFixers import net.minecraft.util.datafix.fixes.References @@ -46,8 +46,8 @@ object ItemCache : IReloadable { val oldItemTag = get10809CompoundTag() val modernItemTag = oldItemTag.transformFrom10809ToModern() ?: return ItemStack(Items.PAINTING).apply { - setHoverName(TextComponent(this@asItemStackNow.displayName)) - appendLore(listOf(TextComponent("Exception rendering item: $skyblockItemId"))) + setHoverName(Component.literal(this@asItemStackNow.displayName)) + appendLore(listOf(Component.literal("Exception rendering item: $skyblockItemId"))) } val itemInstance = ItemStack.of(modernItemTag) if (itemInstance.tag?.contains("Enchantments") == true) { @@ -69,7 +69,6 @@ object ItemCache : IReloadable { ResourceLocation("skyblockitem", skyblockItemId.lowercase().replace(";", "__")) - override fun reload(repository: NEURepository) { cache.clear() } |