StaffItem

public abstract class StaffItem extends Item(source)

Staff item dispatching functionality to StaffHandler without loader specific functionality. Implementing loader-specific interfaces is highly recommended when extending the class to pass loader-specific functionality to StaffHandler.

Constructors

Link copied to clipboard
public StaffItem StaffItem(Item.Settings settings)

Inherited properties

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.

Functions

Link copied to clipboard
public Unit attack(ItemStack staffStack, World world, LivingEntity attacker, Hand hand)
Link copied to clipboard
public ActionResult attackBlock(ItemStack staffStack, World world, LivingEntity attacker, BlockPos target, Direction side, Hand hand)
Link copied to clipboard
public ActionResult attackEntity(ItemStack staffStack, World world, LivingEntity attacker, Entity target, Hand hand)
Link copied to clipboard
public Boolean canSwingHand(ItemStack staffStack, World world, LivingEntity holder, Hand hand)
Link copied to clipboard
public Boolean disablesShield(ItemStack staffStack, World world, LivingEntity attacker, Hand hand)
Link copied to clipboard
public ItemStack finishUsing(ItemStack stack, World world, LivingEntity user)
Link copied to clipboard
Link copied to clipboard
public Text getName(ItemStack stack)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
public Unit onStoppedUsing(ItemStack stack, World world, LivingEntity user, Integer remainingUseTicks)
Link copied to clipboard
Link copied to clipboard
public Unit usageTick(World world, LivingEntity user, ItemStack stack, Integer remainingUseTicks)
Link copied to clipboard
public TypedActionResult<ItemStack> use(World world, PlayerEntity user, Hand hand)
Link copied to clipboard
Link copied to clipboard
public ActionResult useOnEntity(ItemStack stack, PlayerEntity user, LivingEntity entity, Hand hand)

Inherited functions

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
public Boolean canRepair(ItemStack stack, ItemStack ingredient)
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
@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 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
public Float getMiningSpeed(ItemStack stack, BlockState state)
Link copied to clipboard
public Text getName()
Link copied to clipboard
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
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 onStopUsing(ItemStack stack, LivingEntity entity, Integer count)
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
Link copied to clipboard
public Boolean shouldCauseReequipAnimation(ItemStack oldStack, ItemStack newStack, Boolean slotChanged)
Link copied to clipboard
public String toString()