CapItem

open class CapItem(properties: Item.Properties, fallback: Item) : Item, PolymerItem(source)

Shared behavior for Mario caps.

Inheritors

Constructors

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

Properties

Link copied to clipboard
val craftingRemainder: ItemStack
Link copied to clipboard
open val defaultInstance: ItemStack
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val name: Component

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 fun appendHoverText(itemStack: ItemStack, tooltipContext: Item.TooltipContext, tooltipDisplay: TooltipDisplay, consumer: Consumer<Component>, tooltipFlag: TooltipFlag)
Link copied to clipboard
open fun asItem(): Item
Link copied to clipboard
open fun builtInRegistryHolder(): Holder.Reference<Item>
Link copied to clipboard
open fun canBeEnchantedWith(stack: ItemStack, enchantment: Holder<Enchantment>, context: EnchantingContext): Boolean
Link copied to clipboard
open fun canDestroyBlock(itemStack: ItemStack, blockState: BlockState, level: Level, blockPos: BlockPos, livingEntity: LivingEntity): Boolean
Link copied to clipboard
fun canEquip(stack: ItemStack, armorType: EquipmentSlot, entity: LivingEntity): Boolean
Link copied to clipboard
Link copied to clipboard
open fun canSynchronizeToPolymerClient(context: PacketContext?): Boolean
Link copied to clipboard
open fun canSyncRawToClient(context: PacketContext?): Boolean
Link copied to clipboard
open fun components(): DataComponentMap
Link copied to clipboard
open fun finishUsingItem(itemStack: ItemStack, level: Level, livingEntity: LivingEntity): ItemStack
Link copied to clipboard
open fun getAttackDamageBonus(entity: Entity, f: Float, damageSource: DamageSource): Float
Link copied to clipboard
open fun getBarColor(itemStack: ItemStack): Int
Link copied to clipboard
open fun getBarWidth(itemStack: ItemStack): Int
Link copied to clipboard
open fun getCreatorNamespace(stack: ItemStack): String
Link copied to clipboard
open fun getDestroySpeed(itemStack: ItemStack, blockState: BlockState): Float
Link copied to clipboard
open fun getItemDamageSource(livingEntity: LivingEntity): @Nullable DamageSource?
Link copied to clipboard
open override fun getPolymerItem(stack: ItemStack, context: PacketContext): Item
Link copied to clipboard
@Nullable
open fun getPolymerItemModel(stack: ItemStack?, context: PacketContext?): @Nullable Identifier?
Link copied to clipboard
open fun getPolymerItemStack(itemStack: ItemStack?, tooltipType: TooltipFlag?, context: PacketContext?): ItemStack?
Link copied to clipboard
open fun getPolymerReplacement(item: Item?, context: PacketContext?): Item?
Link copied to clipboard
open fun getRecipeRemainder(stack: ItemStack): ItemStack
Link copied to clipboard
open fun getTooltipImage(itemStack: ItemStack): Optional<TooltipComponent>
Link copied to clipboard
open fun getUseAnimation(itemStack: ItemStack): ItemUseAnimation
Link copied to clipboard
open fun getUseDuration(itemStack: ItemStack, livingEntity: LivingEntity): Int
Link copied to clipboard
open fun handleMiningOnServer(tool: ItemStack?, targetBlock: BlockState?, pos: BlockPos?, player: ServerPlayer?): Boolean
Link copied to clipboard
open fun hurtEnemy(itemStack: ItemStack, livingEntity: LivingEntity, livingEntity2: LivingEntity)
Link copied to clipboard
open fun interactLivingEntity(itemStack: ItemStack, player: Player, livingEntity: LivingEntity, interactionHand: InteractionHand): InteractionResult
Link copied to clipboard
open fun inventoryTick(itemStack: ItemStack, serverLevel: ServerLevel, entity: Entity, equipmentSlot: @Nullable EquipmentSlot?)
Link copied to clipboard
open fun isBarVisible(itemStack: ItemStack): Boolean
Link copied to clipboard
open fun isCorrectToolForDrops(itemStack: ItemStack, blockState: BlockState): Boolean
Link copied to clipboard
open fun isEnabled(featureFlagSet: FeatureFlagSet): Boolean
Link copied to clipboard
open fun isFoil(itemStack: ItemStack): Boolean
open fun isIgnoringBlockInteractionPlaySoundExceptedEntity(state: BlockState?, player: ServerPlayer?, hand: InteractionHand?, stack: ItemStack?, world: ServerLevel?, blockHitResult: BlockHitResult?): Boolean
open fun isIgnoringItemInteractionPlaySoundExceptedEntity(player: ServerPlayer?, hand: InteractionHand?, stack: ItemStack?, world: ServerLevel?): Boolean
Link copied to clipboard
open fun isPolymerBlockInteraction(state: BlockState?, player: ServerPlayer?, hand: InteractionHand?, stack: ItemStack?, world: ServerLevel?, blockHitResult: BlockHitResult?, actionResult: InteractionResult?): Boolean
Link copied to clipboard
open fun isPolymerEntityInteraction(player: ServerPlayer?, hand: InteractionHand?, stack: ItemStack?, world: ServerLevel?, entity: Entity?, actionResult: InteractionResult?): Boolean
Link copied to clipboard
open fun isPolymerItemInteraction(player: ServerPlayer?, hand: InteractionHand?, stack: ItemStack?, world: ServerLevel?, actionResult: InteractionResult?): Boolean
Link copied to clipboard
open fun mineBlock(itemStack: ItemStack, level: Level, blockState: BlockState, blockPos: BlockPos, livingEntity: LivingEntity): Boolean
Link copied to clipboard
open fun modifyBasePolymerItemStack(out: ItemStack?, stack: ItemStack?, context: PacketContext?)
Link copied to clipboard
open fun modifyClientTooltip(tooltip: List<Component?>?, stack: ItemStack?, context: PacketContext?)
Link copied to clipboard
open fun onCraftedBy(itemStack: ItemStack, player: Player)
Link copied to clipboard
open fun onCraftedPostProcess(itemStack: ItemStack, level: Level)
Link copied to clipboard
open fun onDestroyed(itemEntity: ItemEntity)
Link copied to clipboard
open fun onUseTick(level: Level, livingEntity: LivingEntity, itemStack: ItemStack, i: Int)
Link copied to clipboard
open fun overrideOtherStackedOnMe(itemStack: ItemStack, itemStack2: ItemStack, slot: Slot, clickAction: ClickAction, player: Player, slotAccess: SlotAccess): Boolean
Link copied to clipboard
open fun overrideStackedOnOther(itemStack: ItemStack, slot: Slot, clickAction: ClickAction, player: Player): Boolean
Link copied to clipboard
open fun postHurtEnemy(itemStack: ItemStack, livingEntity: LivingEntity, livingEntity2: LivingEntity)
Link copied to clipboard
open fun releaseUsing(itemStack: ItemStack, level: Level, livingEntity: LivingEntity, i: Int): Boolean
Link copied to clipboard
open fun requiredFeatures(): FeatureFlagSet
Link copied to clipboard
open fun shouldPrintOpWarning(itemStack: ItemStack, player: @Nullable Player?): Boolean
Link copied to clipboard
open override fun use(level: Level, player: Player, hand: InteractionHand): InteractionResult
Link copied to clipboard
open fun useOn(useOnContext: UseOnContext): InteractionResult
Link copied to clipboard
open fun useOnRelease(itemStack: ItemStack): Boolean