Skip to content

Commit

Permalink
make testmod not use deprecated methods
Browse files Browse the repository at this point in the history
  • Loading branch information
UpcraftLP committed Oct 1, 2024
1 parent 2bd3eba commit 511d92e
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@
import dev.upcraft.sparkweave.api.registry.RegistrySupplier;
import dev.upcraft.sparkweave.testmod.SparkweaveTestmod;
import net.minecraft.core.registries.Registries;
import net.minecraft.network.chat.Component;
import net.minecraft.world.item.CreativeModeTab;

public class TestCreativeTabs {

public static final RegistryHandler<CreativeModeTab> TABS = RegistryHandler.create(Registries.CREATIVE_MODE_TAB, SparkweaveTestmod.MODID);

public static final RegistrySupplier<CreativeModeTab> ITEMS = TABS.register("items", () -> CreativeTabHelper.newBuilder()
.title(Component.translatable("itemGroup.sparkweave_testmod.items"))
public static final RegistrySupplier<CreativeModeTab> ITEMS = TABS.register("items", () -> CreativeTabHelper.newBuilder(SparkweaveTestmod.id("items"))
.icon(() -> TestItems.TEST_ITEM.get().getDefaultInstance())
.displayItems((itemDisplayParameters, output) -> CreativeTabHelper.addRegistryEntries(itemDisplayParameters, output, TestItems.ITEMS))
.build()
Expand Down

0 comments on commit 511d92e

Please sign in to comment.