Class TItemUtils

java.lang.Object
com.thecsdev.commonmc.api.world.item.TItemUtils

public final class TItemUtils extends Object
Utility methods related to Items.
  • Method Summary

    Modifier and Type
    Method
    Description
    static final @Nullable net.minecraft.world.item.CreativeModeTab
    getCreativeModeTab(@NotNull net.minecraft.world.item.Item item)
    Returns the CreativeModeTab a given Item likely belongs to.
    static final void
    ApiStatus.Internal method that keeps track of Items and their corresponding CreativeModeTabs.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • rebuildI2TMap

      @Internal public static final void rebuildI2TMap()
      ApiStatus.Internal method that keeps track of Items and their corresponding CreativeModeTabs.

      Automatically called by CreativeModeTabEvent.REBUILD_CONTENTS.

      Do not call this yourself!

    • getCreativeModeTab

      @Nullable public static final @Nullable net.minecraft.world.item.CreativeModeTab getCreativeModeTab(@NotNull @NotNull net.minecraft.world.item.Item item)
      Returns the CreativeModeTab a given Item likely belongs to.
      Parameters:
      item - The target Item.