package ru.dbotthepony.mc.otm.item.tool

import net.minecraft.tags.BlockTags
import net.minecraft.world.item.AxeItem
import net.minecraft.world.item.ItemStack
import net.minecraft.world.item.Tier
import net.minecraft.world.level.block.state.BlockState
import ru.dbotthepony.mc.otm.config.ToolsConfig

class MatteryAxeItem(pTier: Tier, pAttackDamageModifier: Float, pAttackSpeedModifier: Float,  pProperties: Properties) : AxeItem(pTier, pAttackDamageModifier, pAttackSpeedModifier, pProperties) {
	override fun getDestroySpeed(pStack: ItemStack, pState: BlockState): Float {
		if (pState.`is`(BlockTags.LEAVES) && ToolsConfig.AXES_BREAK_LEAVES_INSTANTLY)
			return 64f

		return super.getDestroySpeed(pStack, pState)
	}
}
