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 EventResult attackBlock(ItemStack staffStack, World world, LivingEntity attacker, BlockPos target, Direction side, Hand hand)
Link copied to clipboard
public EventResult 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
Link copied to clipboard
@Nullable()
public @Nullable() Identifier arch$registryName()
Link copied to clipboard
public Item asItem()
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 canRepair(ItemStack stack, ItemStack ingredient)
Link copied to clipboard
@Deprecated(message = "Deprecated in Java")
public AttributeModifiersComponent getAttributeModifiers()
Link copied to clipboard
public Float getBonusAttackDamage(Entity target, Float baseAttackDamage, DamageSource damageSource)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
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 Float getMiningSpeed(ItemStack stack, BlockState state)
Link copied to clipboard
public Text getName()
Link copied to clipboard
Link copied to clipboard
@Nullable()
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
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
public Boolean hasGlint(ItemStack stack)
Link copied to clipboard
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
public Boolean isEnabled(FeatureSet enabledFeatures)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
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 Boolean onStackClicked(ItemStack stack, Slot slot, ClickType clickType, PlayerEntity player)
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
public String toString()