public class EnchantedBookItem extends Item
Item.Settings
ATTACK_DAMAGE_MODIFIER_ID, ATTACK_SPEED_MODIFIER_ID, BLOCK_ITEMS, group, RANDOM
Constructor and Description |
---|
EnchantedBookItem(Item.Settings settings) |
Modifier and Type | Method and Description |
---|---|
static void |
addEnchantment(ItemStack stack,
EnchantmentLevelEntry entry) |
void |
appendStacks(ItemGroup group,
DefaultedList<ItemStack> stacks) |
void |
appendTooltip(ItemStack stack,
World world,
List<Text> tooltip,
TooltipContext context) |
static ItemStack |
forEnchantment(EnchantmentLevelEntry info) |
static ListTag |
getEnchantmentTag(ItemStack stack) |
boolean |
hasGlint(ItemStack stack)
Checks if the glint effect should be applied when the item is rendered.
|
boolean |
isEnchantable(ItemStack stack) |
asItem, byRawId, canMine, canRepair, damage, finishUsing, fromBlock, getAttributeModifiers, getDefaultStack, getDrinkSound, getEatSound, getEnchantability, getFoodComponent, getGroup, getMaxCount, getMaxDamage, getMaxUseTime, getMiningSpeedMultiplier, getName, getName, getOrCreateTranslationKey, getRarity, getRawId, getRecipeRemainder, getTranslationKey, getTranslationKey, getUseAction, hasRecipeRemainder, inventoryTick, isDamageable, isEffectiveOn, isFireproof, isFood, isIn, isIn, isNetworkSynced, isUsedOnRelease, onCraft, onStoppedUsing, postHit, postMine, postProcessTag, raycast, shouldSyncTagToClient, toString, usageTick, use, useOnBlock, useOnEntity
public EnchantedBookItem(Item.Settings settings)
public boolean hasGlint(ItemStack stack)
By default, returns true if the item has enchantments.
public boolean isEnchantable(ItemStack stack)
isEnchantable
in class Item
@Environment(value=CLIENT) public void appendTooltip(ItemStack stack, @Nullable World world, List<Text> tooltip, TooltipContext context)
appendTooltip
in class Item
public static void addEnchantment(ItemStack stack, EnchantmentLevelEntry entry)
public static ItemStack forEnchantment(EnchantmentLevelEntry info)
public void appendStacks(ItemGroup group, DefaultedList<ItemStack> stacks)
appendStacks
in class Item