Interface Custom

All Superinterfaces:
net.minecraft.item.ItemConvertible, Registered, Registered.Common
All Known Subinterfaces:
Sprayed
All Known Implementing Classes:
AstralArmorItem, AstralBlockItem, AstralItem, AstralPotionItem, BottleItem, BowlItem, ChocolateMilkItem, CloudyArmorItem, CloudyItem, DyeableCloudyArmorItem, DyedAmethystShardItem, MirrorItem, PlaceholderItem, PlaceholderMimicItem, RandomEffectItem, SprayBottleItem, SprayPotionItem

public interface Custom extends Registered.Common, net.minecraft.item.ItemConvertible
Implements common functionality for all item extensions.

When creating a new item extension, this interface should be implemented.

This type is automatically registered.

Since:
2.0.0
  • Method Details

    • getItemGroup

      default Optional<net.minecraft.registry.RegistryKey<net.minecraft.item.ItemGroup>> getItemGroup()
      Returns this item's preferred item group.
      Returns:
      A reference to an item group.
      Since:
      2.0.0
    • registerCommon

      default void registerCommon()
      Description copied from interface: Registered.Common
      Registers this value on both the client and server environments.

      The contained code will run for both environments. If you only want one or the other, see its sister interfaces.

      Specified by:
      registerCommon in interface Registered.Common
      See Also: