Package commoble.looot.loot

# Class NameEnchantedItem

java.lang.Object
net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
commoble.looot.loot.NameEnchantedItem

All Implemented Interfaces:
  `BiFunction<net.minecraft.world.item.ItemStack,net.minecraft.world.level.storage.loot.LootContext,net.minecraft.world.item.ItemStack>`, `net.minecraft.world.level.storage.loot.functions.LootItemFunction`, `net.minecraft.world.level.storage.loot.LootContextUser`

public class NameEnchantedItem extends net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static class`
`NameEnchantedItem.Serializer`

## Nested classes/interfaces inherited from class net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction

`net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction.Builder<T extends net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction.Builder<T>>`

## Field Summary

Fields
Modifier and Type
Field
Description
`static final net.minecraft.resources.ResourceLocation`
`ALL`
`static final net.minecraft.network.chat.Style`
`DEFAULT_MAJOR_STYLE`
`static final net.minecraft.network.chat.Style`
`DEFAULT_MINOR_STYLE`
`static final net.minecraft.resources.ResourceLocation`
`ID`
`protected final boolean`
`ignoreEnchantments`
`protected final Optional<net.minecraft.network.chat.Style>`
`majorStyle`
`protected final Optional<net.minecraft.network.chat.Style>`
`minorStyle`
`static final net.minecraft.world.level.storage.loot.functions.LootItemFunctionType`
`TYPE`
`static final net.minecraft.network.chat.TranslatableComponent`
`UNKNOWN_DESCRIPTOR`
`static final net.minecraft.resources.ResourceLocation`
`UNKNOWN_ENCHANTMENT`
`static final net.minecraft.network.chat.TranslatableComponent`
`VERY_UNKNOWN_ENCHANTMENT_PREFIX`
`static final net.minecraft.network.chat.TranslatableComponent`
`VERY_UNKNOWN_ENCHANTMENT_SUFFIX`

### Fields inherited from class net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction

`predicates`

## Constructor Summary

Constructors
Constructor
Description
`NameEnchantedItem(net.minecraft.world.level.storage.loot.predicates.LootItemCondition[] conditionsIn, Optional<net.minecraft.network.chat.Style> minorStyle, Optional<net.minecraft.network.chat.Style> majorStyle, boolean ignoreEnchantments)`

## Method Summary

Modifier and Type
Method
Description
`static net.minecraft.network.chat.MutableComponent`
`getEpicName(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.storage.loot.LootContext context)`
`static net.minecraft.network.chat.MutableComponent`
`getNameForEnchantment(boolean isPrefix, net.minecraft.world.item.enchantment.Enchantment enchantment, int level, Random rand)`
`static org.apache.commons.lang3.tuple.Pair<net.minecraft.network.chat.MutableComponent,net.minecraft.network.chat.MutableComponent>`
`getRandomWords(net.minecraft.world.item.ItemStack stack, Random rand)`
`net.minecraft.world.level.storage.loot.functions.LootItemFunctionType`
`getType()`
`protected net.minecraft.world.item.ItemStack`
`run(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.storage.loot.LootContext context)`

### Methods inherited from class net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction

`apply, simpleBuilder, validate`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface java.util.function.BiFunction

`andThen`

### Methods inherited from interface net.minecraft.world.level.storage.loot.LootContextUser

`getReferencedContextParams`

## Field Details

### ID

public static final net.minecraft.resources.ResourceLocation ID

### TYPE

public static final net.minecraft.world.level.storage.loot.functions.LootItemFunctionType TYPE

### ALL

public static final net.minecraft.resources.ResourceLocation ALL

### UNKNOWN_ENCHANTMENT

public static final net.minecraft.resources.ResourceLocation UNKNOWN_ENCHANTMENT

### VERY_UNKNOWN_ENCHANTMENT_PREFIX

public static final net.minecraft.network.chat.TranslatableComponent VERY_UNKNOWN_ENCHANTMENT_PREFIX

### VERY_UNKNOWN_ENCHANTMENT_SUFFIX

public static final net.minecraft.network.chat.TranslatableComponent VERY_UNKNOWN_ENCHANTMENT_SUFFIX

### UNKNOWN_DESCRIPTOR

public static final net.minecraft.network.chat.TranslatableComponent UNKNOWN_DESCRIPTOR

### DEFAULT_MINOR_STYLE

public static final net.minecraft.network.chat.Style DEFAULT_MINOR_STYLE

### DEFAULT_MAJOR_STYLE

public static final net.minecraft.network.chat.Style DEFAULT_MAJOR_STYLE

### ignoreEnchantments

protected final boolean ignoreEnchantments

### minorStyle

protected final Optional<net.minecraft.network.chat.Style> minorStyle

### majorStyle

protected final Optional<net.minecraft.network.chat.Style> majorStyle

## Constructor Details

### NameEnchantedItem

public NameEnchantedItem(net.minecraft.world.level.storage.loot.predicates.LootItemCondition[] conditionsIn, Optional<net.minecraft.network.chat.Style> minorStyle, Optional<net.minecraft.network.chat.Style> majorStyle, boolean ignoreEnchantments)

## Method Details

### getType

public net.minecraft.world.level.storage.loot.functions.LootItemFunctionType getType()

### getNameForEnchantment

public static net.minecraft.network.chat.MutableComponent getNameForEnchantment(boolean isPrefix, net.minecraft.world.item.enchantment.Enchantment enchantment, int level, Random rand)

### run

protected net.minecraft.world.item.ItemStack run(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.storage.loot.LootContext context)

Specified by:
  `run` in class `net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction`

### getEpicName

public static net.minecraft.network.chat.MutableComponent getEpicName(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.storage.loot.LootContext context)

### getRandomWords

public static org.apache.commons.lang3.tuple.Pair<net.minecraft.network.chat.MutableComponent,net.minecraft.network.chat.MutableComponent> getRandomWords(net.minecraft.world.item.ItemStack stack, Random rand)