CandyTooltipItem

class CandyTooltipItem(properties: Item.Properties, val candyTranslationString: CandyTranslationString) : Item(source)

Overridden Item class with a modified Hover Tooltip to show Hunger translation string, what tied Mob Effect, and always eat string

Constructors

Link copied to clipboard
constructor(properties: Item.Properties, candyTranslationString: CandyTranslationString)

Properties

Inherited properties

Link copied to clipboard
@Nullable
@get:Nullable
val craftingRemainingItem: Item?

Functions

Link copied to clipboard
open override fun appendHoverText(itemStack: ItemStack, tooltipContext: Item.TooltipContext, list: MutableList<Component>, tooltipFlag: TooltipFlag)

Overrides Item's appendHoverText to add more things in it, notably Hunger translation string, tied Mob Effect if there is one, and Always Eat string

Inherited functions

Link copied to clipboard
open fun allowComponentsUpdateAnimation(player: Player, hand: InteractionHand, oldStack: ItemStack, newStack: ItemStack): Boolean
Link copied to clipboard
open fun allowContinuingBlockBreaking(player: Player, oldStack: ItemStack, newStack: ItemStack): Boolean
Link copied to clipboard
open override fun asItem(): Item
Link copied to clipboard
open fun builtInRegistryHolder(): Holder.Reference<Item>
Link copied to clipboard
open fun canAttackBlock(state: BlockState, level: Level, pos: BlockPos, player: Player): Boolean
Link copied to clipboard
open fun canBeEnchantedWith(stack: ItemStack, enchantment: Holder<Enchantment>, context: EnchantingContext): Boolean
Link copied to clipboard
Link copied to clipboard
open fun components(): DataComponentMap
Link copied to clipboard
open fun finishUsingItem(stack: ItemStack, level: Level, livingEntity: LivingEntity): ItemStack
Link copied to clipboard
open fun getAttackDamageBonus(target: Entity, damage: Float, damageSource: DamageSource): Float
Link copied to clipboard
open fun getBarColor(stack: ItemStack): Int
Link copied to clipboard
open fun getBarWidth(stack: ItemStack): Int
Link copied to clipboard
open fun getBreakingSound(): SoundEvent
Link copied to clipboard
open fun getDefaultAttributeModifiers(): ItemAttributeModifiers
Link copied to clipboard
open fun getDefaultInstance(): ItemStack
Link copied to clipboard
Link copied to clipboard
open fun getDescription(): Component
Link copied to clipboard
open fun getDescriptionId(stack: ItemStack): String
Link copied to clipboard
open fun getDestroySpeed(stack: ItemStack, state: BlockState): Float
Link copied to clipboard
open fun getDrinkingSound(): SoundEvent
Link copied to clipboard
open fun getEatingSound(): SoundEvent
Link copied to clipboard
Link copied to clipboard
open fun getName(stack: ItemStack): Component
Link copied to clipboard
open fun getRecipeRemainder(stack: ItemStack): ItemStack
Link copied to clipboard
open fun getTooltipImage(stack: ItemStack): Optional<TooltipComponent>
Link copied to clipboard
open fun getUseAnimation(stack: ItemStack): UseAnim
Link copied to clipboard
open fun getUseDuration(stack: ItemStack, entity: LivingEntity): Int
Link copied to clipboard
Link copied to clipboard
open fun hurtEnemy(stack: ItemStack, target: LivingEntity, attacker: LivingEntity): Boolean
Link copied to clipboard
open fun interactLivingEntity(stack: ItemStack, player: Player, interactionTarget: LivingEntity, usedHand: InteractionHand): InteractionResult
Link copied to clipboard
open fun inventoryTick(stack: ItemStack, level: Level, entity: Entity, slotId: Int, isSelected: Boolean)
Link copied to clipboard
open fun isBarVisible(stack: ItemStack): Boolean
Link copied to clipboard
open fun isComplex(): Boolean
Link copied to clipboard
open fun isCorrectToolForDrops(stack: ItemStack, state: BlockState): Boolean
Link copied to clipboard
open fun isEnabled(enabledFeatures: FeatureFlagSet): Boolean
Link copied to clipboard
open fun isEnchantable(stack: ItemStack): Boolean
Link copied to clipboard
open fun isFoil(stack: ItemStack): Boolean
Link copied to clipboard
open fun isValidRepairItem(stack: ItemStack, repairCandidate: ItemStack): Boolean
Link copied to clipboard
open fun mineBlock(stack: ItemStack, level: Level, state: BlockState, pos: BlockPos, miningEntity: LivingEntity): Boolean
Link copied to clipboard
open fun onCraftedBy(stack: ItemStack, level: Level, player: Player)
Link copied to clipboard
open fun onCraftedPostProcess(stack: ItemStack, level: Level)
Link copied to clipboard
open fun onDestroyed(itemEntity: ItemEntity)
Link copied to clipboard
open fun onUseTick(level: Level, livingEntity: LivingEntity, stack: ItemStack, remainingUseDuration: Int)
Link copied to clipboard
open fun overrideOtherStackedOnMe(stack: ItemStack, other: ItemStack, slot: Slot, action: ClickAction, player: Player, access: SlotAccess): Boolean
Link copied to clipboard
open fun overrideStackedOnOther(stack: ItemStack, slot: Slot, action: ClickAction, player: Player): Boolean
Link copied to clipboard
open fun postHurtEnemy(stack: ItemStack, target: LivingEntity, attacker: LivingEntity)
Link copied to clipboard
open fun releaseUsing(stack: ItemStack, level: Level, livingEntity: LivingEntity, timeCharged: Int)
Link copied to clipboard
open override fun requiredFeatures(): FeatureFlagSet
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
open fun use(level: Level, player: Player, usedHand: InteractionHand): InteractionResultHolder<ItemStack>
Link copied to clipboard
open fun useOn(context: UseOnContext): InteractionResult
Link copied to clipboard
open fun useOnRelease(stack: ItemStack): Boolean
Link copied to clipboard
open fun verifyComponentsAfterLoad(stack: ItemStack)