ShearsVanillaBlocksToolHandler

public class ShearsVanillaBlocksToolHandler implements ToolManagerImpl.ToolHandler

This handler handles items that are registered in the SHEARS by using the vanilla isEffectiveOn using the vanilla shears or the item itself if the item is a subclass of ShearsItem.

Only applicable to items that are not a subclass of DynamicAttributeTool

Only applicable to blocks that are vanilla or share the material that is handled by their vanilla tool.

Functions

getMiningSpeedMultiplier
Link copied to clipboard
@NotNull()
TypedActionResult<FloatgetMiningSpeedMultiplier(Tag<Item> tag, BlockState state, ItemStack stack, LivingEntity user)
Determines the mining speed multiplier of the tools.
@NotNull()
TypedActionResult<FloatgetMiningSpeedMultiplier(Tag<Item> tag, BlockState state, ItemStack stack, @Nullable() LivingEntity user)
Determines the mining speed multiplier of the tools.
isEffectiveOn
Link copied to clipboard
@NotNull()
ActionResult isEffectiveOn(Tag<Item> tag, BlockState state, ItemStack stack, LivingEntity user)
Determines whether this handler is active and effective of the tools.
@NotNull()
ActionResult isEffectiveOn(Tag<Item> tag, BlockState state, ItemStack stack, @Nullable() LivingEntity user)
Determines whether this handler is active and effective of the tools.

Sources

jvm source
Link copied to clipboard