CrownItem

open class CrownItem(groundBlock: Block, wallBlock: Block, settings: Item.Settings) : VerticallyAttachableBlockItem, Equipment(source)

A crown, which makes piglins neutral when worn, just like gold armor.

Parameters

groundBlock

The crown block placed on the ground

wallBlock

The crown block placed on the wall

settings

The item settings to pass to the parent constructor

Constructors

Link copied to clipboard
constructor(groundBlock: Block, wallBlock: Block, settings: Item.Settings)

Inherited properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@get:JvmName(name = "hasStaffHandler")
val Item.hasStaffHandler: Boolean

Returns if the given item has a registered handler when inserted into a staff.

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

Returns the registered staff handler of the given item if available.

Link copied to clipboard

Returns the registered staff handler of the given item if available, StaffHandler.Default otherwise.

Link copied to clipboard
protected val wallBlock: Block

Functions

Link copied to clipboard
open override fun getEquipSound(): RegistryEntry<SoundEvent>
Link copied to clipboard
open override fun getSlotType(): EquipmentSlot
Link copied to clipboard
open override fun use(world: World, user: PlayerEntity, hand: Hand): TypedActionResult<ItemStack>

Inherited functions

Link copied to clipboard
open override fun appendBlocks(map: MutableMap<Block, Item>, item: Item)
Link copied to clipboard
open override fun appendTooltip(stack: ItemStack, context: Item.TooltipContext, tooltip: MutableList<Text>, type: TooltipType)
Link copied to clipboard
open override fun asItem(): Item
Link copied to clipboard
open fun canApplyAtEnchantingTable(stack: ItemStack, enchantment: Enchantment): Boolean
Link copied to clipboard
open override fun canBeNested(): Boolean
Link copied to clipboard
open fun canContinueUsing(oldStack: ItemStack, newStack: ItemStack): Boolean
Link copied to clipboard
open fun canDisableShield(stack: ItemStack, shield: ItemStack, entity: LivingEntity, attacker: LivingEntity): Boolean
Link copied to clipboard
open fun canElytraFly(stack: ItemStack, entity: LivingEntity): Boolean
Link copied to clipboard
open fun canEquip(stack: ItemStack, armorType: EquipmentSlot, entity: Entity): Boolean
Link copied to clipboard
Link copied to clipboard
open fun canMine(state: BlockState, world: World, pos: BlockPos, miner: PlayerEntity): Boolean
Link copied to clipboard
open fun canPerformAction(stack: ItemStack, toolAction: ToolAction): Boolean
Link copied to clipboard
protected open fun canPlace(context: ItemPlacementContext, state: BlockState): Boolean
Link copied to clipboard
protected open fun canPlaceAt(world: WorldView, state: BlockState, pos: BlockPos): Boolean
Link copied to clipboard
open fun canRepair(stack: ItemStack, ingredient: ItemStack): Boolean
Link copied to clipboard
Link copied to clipboard
protected open fun checkStatePlacement(): Boolean
Link copied to clipboard
@Nullable
open fun createEntity(level: World, location: Entity, stack: ItemStack): @Nullable Entity?
Link copied to clipboard
open fun doesSneakBypassUse(stack: ItemStack, level: WorldView, pos: BlockPos, player: PlayerEntity): Boolean
Link copied to clipboard
open fun elytraFlightTick(stack: ItemStack, entity: LivingEntity, flightTicks: Int): Boolean
Link copied to clipboard
open fun equipAndSwap(item: Item, world: World, user: PlayerEntity, hand: Hand): TypedActionResult<ItemStack>
Link copied to clipboard
open fun finishUsing(stack: ItemStack, world: World, user: LivingEntity): ItemStack
Link copied to clipboard
@Nullable
open fun getArmorTexture(stack: ItemStack, entity: Entity, slot: EquipmentSlot, layer: ArmorMaterial.Layer, inner: Boolean): @Nullable Identifier?
Link copied to clipboard
open fun getBonusAttackDamage(target: Entity, baseAttackDamage: Float, damageSource: DamageSource): Float
Link copied to clipboard
Link copied to clipboard
open fun getBurnTime(itemStack: ItemStack, @Nullable recipeType: @Nullable RecipeType<*>?): Int
Link copied to clipboard
Link copied to clipboard
@Nullable
open fun getCreatorModId(itemStack: ItemStack): @Nullable String?
Link copied to clipboard
Link copied to clipboard
open fun getDefaultTooltipHideFlags(@NotNull stack: @NotNull ItemStack): Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun getEntityLifespan(itemStack: ItemStack, level: World): Int
Link copied to clipboard
@Nullable
open fun getEquipmentSlot(stack: ItemStack): @Nullable EquipmentSlot?
Link copied to clipboard
open fun getHighlightTip(item: ItemStack, displayName: Text): Text
Link copied to clipboard
open fun getItemBarColor(stack: ItemStack): Int
Link copied to clipboard
open fun getItemBarStep(stack: ItemStack): Int
Link copied to clipboard
open fun getMaxCount(): Int
Link copied to clipboard
open fun getMaxUseTime(stack: ItemStack, user: LivingEntity): Int
Link copied to clipboard
open fun getMiningSpeed(stack: ItemStack, state: BlockState): Float
Link copied to clipboard
open fun getName(): Text
open fun getName(stack: ItemStack): Text
Link copied to clipboard
protected open fun getOrCreateTranslationKey(): String
Link copied to clipboard
Link copied to clipboard
@Nullable
protected open override fun getPlacementState(context: ItemPlacementContext): BlockState?
Link copied to clipboard
protected open fun getPlaceSound(state: BlockState): SoundEvent
protected open fun getPlaceSound(state: BlockState, world: World, pos: BlockPos, entity: PlayerEntity): SoundEvent
Link copied to clipboard
Link copied to clipboard
@NotNull
open fun getSweepHitBox(@NotNull stack: @NotNull ItemStack, @NotNull player: @NotNull PlayerEntity, @NotNull target: @NotNull Entity): @NotNull Box
Link copied to clipboard
Link copied to clipboard
open override fun getTranslationKey(): String
Link copied to clipboard
open fun getUseAction(stack: ItemStack): UseAction
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun hasGlint(stack: ItemStack): Boolean
Link copied to clipboard
Link copied to clipboard
open fun initializeClient(consumer: Consumer<IClientItemExtensions>)
Link copied to clipboard
open fun inventoryTick(stack: ItemStack, world: World, entity: Entity, slot: Int, selected: Boolean)
Link copied to clipboard
open fun isBookEnchantable(stack: ItemStack, book: ItemStack): Boolean
Link copied to clipboard
open fun isCorrectForDrops(stack: ItemStack, state: BlockState): Boolean
Link copied to clipboard
open fun isEnabled(enabledFeatures: FeatureSet): Boolean
Link copied to clipboard
open fun isEnchantable(stack: ItemStack): Boolean
Link copied to clipboard
open fun isEnderMask(stack: ItemStack, player: PlayerEntity, endermanEntity: EndermanEntity): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun isNotReplaceableByPickAction(stack: ItemStack, player: PlayerEntity, inventorySlot: Int): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun onBlockStartBreak(itemstack: ItemStack, pos: BlockPos, player: PlayerEntity): Boolean
Link copied to clipboard
open fun onClicked(stack: ItemStack, otherStack: ItemStack, slot: Slot, clickType: ClickType, player: PlayerEntity, cursorStackReference: StackReference): Boolean
Link copied to clipboard
open fun onCraft(stack: ItemStack, world: World)
Link copied to clipboard
open fun onCraftByPlayer(stack: ItemStack, world: World, player: PlayerEntity)
Link copied to clipboard
open fun onDestroyed(itemEntity: ItemEntity, damageSource: DamageSource)
Link copied to clipboard
Link copied to clipboard
open fun onEntityItemUpdate(stack: ItemStack, entity: ItemEntity): Boolean
Link copied to clipboard
open fun onEntitySwing(stack: ItemStack, entity: LivingEntity): Boolean
Link copied to clipboard
open fun onHorseArmorTick(stack: ItemStack, level: World, horse: MobEntity)
Link copied to clipboard
open fun onInventoryTick(stack: ItemStack, level: World, player: PlayerEntity, slotIndex: Int, selectedIndex: Int)
Link copied to clipboard
open override fun onItemEntityDestroyed(entity: ItemEntity)
Link copied to clipboard
Link copied to clipboard
open fun onLeftClickEntity(stack: ItemStack, player: PlayerEntity, entity: Entity): Boolean
Link copied to clipboard
open fun onStackClicked(stack: ItemStack, slot: Slot, clickType: ClickType, player: PlayerEntity): Boolean
Link copied to clipboard
open fun onStoppedUsing(stack: ItemStack, world: World, user: LivingEntity, remainingUseTicks: Int)
Link copied to clipboard
open fun onStopUsing(stack: ItemStack, entity: LivingEntity, count: Int)
Link copied to clipboard
protected open fun place(context: ItemPlacementContext, state: BlockState): Boolean
Link copied to clipboard
open fun postDamageEntity(stack: ItemStack, target: LivingEntity, attacker: LivingEntity)
Link copied to clipboard
open fun postHit(stack: ItemStack, target: LivingEntity, attacker: LivingEntity): Boolean
Link copied to clipboard
open fun postMine(stack: ItemStack, world: World, state: BlockState, pos: BlockPos, miner: LivingEntity): Boolean
Link copied to clipboard
protected open fun postPlacement(pos: BlockPos, world: World, @Nullable player: PlayerEntity?, stack: ItemStack, state: BlockState): Boolean
Link copied to clipboard
Link copied to clipboard
open override fun removeFromBlockToItemMap(blockToItemMap: MutableMap<Block, Item>, itemIn: Item)
Link copied to clipboard
open fun shouldCauseBlockBreakReset(oldStack: ItemStack, newStack: ItemStack): Boolean
Link copied to clipboard
open fun shouldCauseReequipAnimation(oldStack: ItemStack, newStack: ItemStack, slotChanged: Boolean): Boolean
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
open fun usageTick(world: World, user: LivingEntity, stack: ItemStack, remainingUseTicks: Int)
Link copied to clipboard
open override fun useOnBlock(context: ItemUsageContext): ActionResult
Link copied to clipboard
open fun useOnEntity(stack: ItemStack, user: PlayerEntity, entity: LivingEntity, hand: Hand): ActionResult