CrownItem

public class CrownItem extends VerticallyAttachableBlockItem implements 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
public CrownItem CrownItem(Block groundBlock, Block wallBlock, Item.Settings settings)

Inherited properties

Link copied to clipboard
@Deprecated(message = "Deprecated in Java")
private final Block block
Link copied to clipboard
private final ComponentMap components
Link copied to clipboard
@get:JvmName(name = "hasStaffHandler")
public final Boolean hasStaffHandler

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

Link copied to clipboard
@Nullable()
private final Item recipeRemainder
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 final Block wallBlock

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
public TypedActionResult<ItemStack> use(World world, PlayerEntity user, Hand hand)

Inherited functions

Link copied to clipboard
public Unit appendBlocks(Map<Block, Item> map, Item item)
Link copied to clipboard
public Unit appendTooltip(ItemStack stack, Item.TooltipContext context, List<Text> tooltip, TooltipType type)
Link copied to clipboard
public Item asItem()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
public Boolean canContinueUsing(ItemStack oldStack, ItemStack newStack)
Link copied to clipboard
public Boolean canDisableShield(ItemStack stack, ItemStack shield, LivingEntity entity, LivingEntity attacker)
Link copied to clipboard
public Boolean canElytraFly(ItemStack stack, LivingEntity entity)
Link copied to clipboard
public Boolean canEquip(ItemStack stack, EquipmentSlot armorType, Entity entity)
Link copied to clipboard
Link copied to clipboard
public Boolean canMine(BlockState state, World world, BlockPos pos, PlayerEntity miner)
Link copied to clipboard
public Boolean canPerformAction(ItemStack stack, ToolAction toolAction)
Link copied to clipboard
protected Boolean canPlace(ItemPlacementContext context, BlockState state)
Link copied to clipboard
protected Boolean canPlaceAt(WorldView world, BlockState state, BlockPos pos)
Link copied to clipboard
public Boolean canRepair(ItemStack stack, ItemStack ingredient)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@Nullable()
public @Nullable() Entity createEntity(World level, Entity location, ItemStack stack)
Link copied to clipboard
public Boolean doesSneakBypassUse(ItemStack stack, WorldView level, BlockPos pos, PlayerEntity player)
Link copied to clipboard
public Boolean elytraFlightTick(ItemStack stack, LivingEntity entity, Integer flightTicks)
Link copied to clipboard
public TypedActionResult<ItemStack> equipAndSwap(Item item, World world, PlayerEntity user, Hand hand)
Link copied to clipboard
public ItemStack finishUsing(ItemStack stack, World world, LivingEntity user)
Link copied to clipboard
@Nullable()
public @Nullable() Identifier getArmorTexture(ItemStack stack, Entity entity, EquipmentSlot slot, ArmorMaterial.Layer layer, Boolean inner)
Link copied to clipboard
@Deprecated(message = "Deprecated in Java")
public AttributeModifiersComponent getAttributeModifiers()
@Deprecated(message = "Deprecated in Java")
public AttributeModifiersComponent getAttributeModifiers(EquipmentSlot slot, ItemStack stack)
Link copied to clipboard
public Block getBlock()
Link copied to clipboard
public Float getBonusAttackDamage(Entity target, Float baseAttackDamage, DamageSource damageSource)
Link copied to clipboard
Link copied to clipboard
public Integer getBurnTime(ItemStack itemStack, @Nullable() @Nullable() RecipeType<?> recipeType)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@Nullable()
public @Nullable() String getCreatorModId(ItemStack itemStack)
Link copied to clipboard
Link copied to clipboard
public Integer getDefaultTooltipHideFlags(@NotNull() @NotNull() ItemStack stack)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
public Integer getEntityLifespan(ItemStack itemStack, World level)
Link copied to clipboard
@Nullable()
public @Nullable() EquipmentSlot getEquipmentSlot(ItemStack stack)
Link copied to clipboard
public Text getHighlightTip(ItemStack item, Text displayName)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
public Float getMiningSpeed(ItemStack stack, BlockState state)
Link copied to clipboard
public Text getName()
public Text getName(ItemStack stack)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@Nullable()
protected BlockState getPlacementState(ItemPlacementContext context)
Link copied to clipboard
@Deprecated(message = "Deprecated in Java")
protected SoundEvent getPlaceSound(BlockState state)
protected SoundEvent getPlaceSound(BlockState state, World world, BlockPos pos, PlayerEntity entity)
Link copied to clipboard
@Nullable()
@Deprecated(message = "Deprecated in Java")
public final Item getRecipeRemainder()
Link copied to clipboard
@Deprecated(message = "Deprecated in Java")
public RegistryEntry.Reference<Item> getRegistryEntry()
Link copied to clipboard
Link copied to clipboard
@NotNull()
public @NotNull() Box getSweepHitBox(@NotNull() @NotNull() ItemStack stack, @NotNull() @NotNull() PlayerEntity player, @NotNull() @NotNull() Entity target)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
public Boolean hasGlint(ItemStack stack)
Link copied to clipboard
@Deprecated(message = "Deprecated in Java")
public Boolean hasRecipeRemainder()
Link copied to clipboard
public Unit initializeClient(Consumer<IClientItemExtensions> consumer)
Link copied to clipboard
public Unit inventoryTick(ItemStack stack, World world, Entity entity, Integer slot, Boolean selected)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
public Boolean isEnabled(FeatureSet enabledFeatures)
Link copied to clipboard
Link copied to clipboard
public Boolean isEnderMask(ItemStack stack, PlayerEntity player, EndermanEntity endermanEntity)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
public Boolean isNotReplaceableByPickAction(ItemStack stack, PlayerEntity player, Integer inventorySlot)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
public Boolean onBlockStartBreak(ItemStack itemstack, BlockPos pos, PlayerEntity player)
Link copied to clipboard
public Boolean onClicked(ItemStack stack, ItemStack otherStack, Slot slot, ClickType clickType, PlayerEntity player, StackReference cursorStackReference)
Link copied to clipboard
public Unit onCraft(ItemStack stack, World world)
Link copied to clipboard
public Unit onCraftByPlayer(ItemStack stack, World world, PlayerEntity player)
Link copied to clipboard
public Unit onDestroyed(ItemEntity itemEntity, DamageSource damageSource)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
public Boolean onEntitySwing(ItemStack stack, LivingEntity entity)
Link copied to clipboard
public Unit onHorseArmorTick(ItemStack stack, World level, MobEntity horse)
Link copied to clipboard
public Unit onInventoryTick(ItemStack stack, World level, PlayerEntity player, Integer slotIndex, Integer selectedIndex)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
public Boolean onLeftClickEntity(ItemStack stack, PlayerEntity player, Entity entity)
Link copied to clipboard
public Boolean onStackClicked(ItemStack stack, Slot slot, ClickType clickType, PlayerEntity player)
Link copied to clipboard
public Unit onStoppedUsing(ItemStack stack, World world, LivingEntity user, Integer remainingUseTicks)
Link copied to clipboard
public Unit onStopUsing(ItemStack stack, LivingEntity entity, Integer count)
Link copied to clipboard
Link copied to clipboard
public Unit postDamageEntity(ItemStack stack, LivingEntity target, LivingEntity attacker)
Link copied to clipboard
public Boolean postHit(ItemStack stack, LivingEntity target, LivingEntity attacker)
Link copied to clipboard
public Boolean postMine(ItemStack stack, World world, BlockState state, BlockPos pos, LivingEntity miner)
Link copied to clipboard
protected Boolean postPlacement(BlockPos pos, World world, @Nullable() PlayerEntity player, ItemStack stack, BlockState state)
Link copied to clipboard
Link copied to clipboard
public Unit removeFromBlockToItemMap(Map<Block, Item> blockToItemMap, Item itemIn)
Link copied to clipboard
Link copied to clipboard
public Boolean shouldCauseReequipAnimation(ItemStack oldStack, ItemStack newStack, Boolean slotChanged)
Link copied to clipboard
public String toString()
Link copied to clipboard
public Unit usageTick(World world, LivingEntity user, ItemStack stack, Integer remainingUseTicks)
Link copied to clipboard
Link copied to clipboard
public ActionResult useOnEntity(ItemStack stack, PlayerEntity user, LivingEntity entity, Hand hand)