All Known Implementing Classes:
AddedByAttribute, BookAuthorAttribute, BookCopyAttribute, ColorAttribute, EnchantAttribute, FluidContentsAttribute, InItemGroupAttribute, InTagAttribute, ItemNameAttribute, ShulkerFillLevelAttribute, SingletonItemAttribute

public interface ItemAttribute
  • Field Details

    • CODEC

      static final com.mojang.serialization.Codec<ItemAttribute> CODEC
    • STREAM_CODEC

      static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,ItemAttribute> STREAM_CODEC
  • Method Details

    • saveStatic

      static net.minecraft.nbt.CompoundTag saveStatic(ItemAttribute attribute, net.minecraft.core.HolderLookup.Provider registries)
    • loadStatic

      @Nullable static @Nullable ItemAttribute loadStatic(net.minecraft.nbt.CompoundTag nbt, net.minecraft.core.HolderLookup.Provider registries)
    • getAllAttributes

      static List<ItemAttribute> getAllAttributes(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level level)
    • appliesTo

      boolean appliesTo(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level world)
    • getType

    • format

      default net.minecraft.network.chat.MutableComponent format(boolean inverted)
    • getTranslationKey

      String getTranslationKey()
    • getTranslationParameters

      default Object[] getTranslationParameters()