ModdedToolsVanillaBlocksToolHandler

public class ModdedToolsVanillaBlocksToolHandler implements ToolManagerImpl.ToolHandler

This handler handles items that are a subclass of DynamicAttributeTool by using the vanilla isEffectiveOn with a custom fake tool material to use the mining level from getMiningLevel.

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

Constructors

ModdedToolsVanillaBlocksToolHandler
Link copied to clipboard
void ModdedToolsVanillaBlocksToolHandler(List<Item> vanillaItems)

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