Interface ItemAttribute
- All Known Implementing Classes:
AddedByAttribute,BookAuthorAttribute,BookCopyAttribute,ColorAttribute,EnchantAttribute,FluidContentsAttribute,InItemGroupAttribute,InTagAttribute,ItemNameAttribute,ShulkerFillLevelAttribute,SingletonItemAttribute
public interface ItemAttribute
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<ItemAttribute> static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, ItemAttribute> -
Method Summary
Modifier and TypeMethodDescriptionbooleanappliesTo(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level world) default net.minecraft.network.chat.MutableComponentformat(boolean inverted) static List<ItemAttribute> getAllAttributes(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level level) default Object[]getType()static @Nullable ItemAttributeloadStatic(net.minecraft.nbt.CompoundTag nbt, net.minecraft.core.HolderLookup.Provider registries) static net.minecraft.nbt.CompoundTagsaveStatic(ItemAttribute attribute, net.minecraft.core.HolderLookup.Provider registries)
-
Field Details
-
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
ItemAttributeType getType() -
format
default net.minecraft.network.chat.MutableComponent format(boolean inverted) -
getTranslationKey
String getTranslationKey() -
getTranslationParameters
-