ModdedToolsModdedBlocksToolHandler

public class ModdedToolsModdedBlocksToolHandler implements ToolManagerImpl.ToolHandler

This handler handles items that are an subclass of DynamicAttributeTool by comparing their mining level using getMiningLevel and the block mining level.

Only applicable to modded blocks that are registered, as only they have the registered required mining level.

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