From 1cb53251ba9cef77433ed1387e44ff0342399333 Mon Sep 17 00:00:00 2001 From: Up Date: Mon, 11 Nov 2024 21:23:21 +0100 Subject: [PATCH] use custom item for lectern test --- .../dev/upcraft/sparkweave/testmod/SparkweaveTestmod.java | 4 ++-- .../sparkweave/testmod/client/SparkweaveTestmodClient.java | 3 ++- .../resources/data/minecraft/tags/item/lectern_books.json | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Common/src/testmod/java/dev/upcraft/sparkweave/testmod/SparkweaveTestmod.java b/Common/src/testmod/java/dev/upcraft/sparkweave/testmod/SparkweaveTestmod.java index 57ecc8a..fc7d54b 100644 --- a/Common/src/testmod/java/dev/upcraft/sparkweave/testmod/SparkweaveTestmod.java +++ b/Common/src/testmod/java/dev/upcraft/sparkweave/testmod/SparkweaveTestmod.java @@ -1,8 +1,8 @@ package dev.upcraft.sparkweave.testmod; import dev.upcraft.sparkweave.api.entrypoint.MainEntryPoint; -import dev.upcraft.sparkweave.api.event.RegisterCustomLecternMenuEvent; import dev.upcraft.sparkweave.api.event.ItemMenuInteractionEvent; +import dev.upcraft.sparkweave.api.event.RegisterCustomLecternMenuEvent; import dev.upcraft.sparkweave.api.platform.ModContainer; import dev.upcraft.sparkweave.api.platform.services.RegistryService; import dev.upcraft.sparkweave.testmod.init.TestCreativeTabs; @@ -54,7 +54,7 @@ public Component getDisplayName() { public @Nullable AbstractContainerMenu createMenu(int i, Inventory inventory, Player player) { return MenuType.GENERIC_3x3.create(i, inventory); } - }, Items.DIAMOND)); + }, TestItems.TEST_ITEM)); } public static ResourceLocation id(String path) { diff --git a/Common/src/testmod/java/dev/upcraft/sparkweave/testmod/client/SparkweaveTestmodClient.java b/Common/src/testmod/java/dev/upcraft/sparkweave/testmod/client/SparkweaveTestmodClient.java index c9366bd..a08fe49 100644 --- a/Common/src/testmod/java/dev/upcraft/sparkweave/testmod/client/SparkweaveTestmodClient.java +++ b/Common/src/testmod/java/dev/upcraft/sparkweave/testmod/client/SparkweaveTestmodClient.java @@ -10,6 +10,7 @@ import dev.upcraft.sparkweave.testmod.client.models.MageRobesModel; import dev.upcraft.sparkweave.testmod.client.renderers.DiamondLecternRenderer; import dev.upcraft.sparkweave.testmod.client.renderers.MageRobesRenderer; +import dev.upcraft.sparkweave.testmod.init.TestItems; import net.minecraft.client.Minecraft; import net.minecraft.world.item.Items; @@ -21,7 +22,7 @@ public class SparkweaveTestmodClient implements ClientEntryPoint { public void onInitializeClient(ModContainer mod) { RegisterLayerDefinitionsEvent.EVENT.register(event -> event.registerModelLayers(MageRobesModel.MODEL_LAYER, MageRobesModel::createBodyLayer)); RegisterCustomArmorRenderersEvent.EVENT.register(event -> event.register((entity, context, renderer) -> new MageRobesRenderer(context), Items.CHAINMAIL_HELMET, Items.CHAINMAIL_CHESTPLATE, Items.CHAINMAIL_LEGGINGS, Items.CHAINMAIL_BOOTS)); - RegisterLecternItemRendererEvent.EVENT.register(event -> event.registerRenderer(DiamondLecternRenderer::new, Items.DIAMOND)); + RegisterLecternItemRendererEvent.EVENT.register(event -> event.registerRenderer(DiamondLecternRenderer::new, TestItems.TEST_ITEM)); } public static void onClientTickStart(Minecraft client) { diff --git a/Common/src/testmod/resources/data/minecraft/tags/item/lectern_books.json b/Common/src/testmod/resources/data/minecraft/tags/item/lectern_books.json index 0b7f522..64bddb3 100644 --- a/Common/src/testmod/resources/data/minecraft/tags/item/lectern_books.json +++ b/Common/src/testmod/resources/data/minecraft/tags/item/lectern_books.json @@ -1,6 +1,6 @@ { "replace": false, "values": [ - "minecraft:diamond" + "sparkweave_testmod:test_item" ] }