AXES_BREAK_LEAVES_INSTANTLY config option
This commit is contained in:
parent
89609b45f6
commit
d56cf36fb9
@ -237,6 +237,10 @@ object ServerConfig {
|
||||
}
|
||||
}
|
||||
|
||||
object Tools {
|
||||
val AXES_BREAK_LEAVES_INSTANTLY: Boolean by specBuilder.define("AXES_BREAK_LEAVES_INSTANTLY", true)
|
||||
}
|
||||
|
||||
init {
|
||||
// access instances so spec is built
|
||||
NanobotsRegeneration
|
||||
@ -244,6 +248,7 @@ object ServerConfig {
|
||||
AndroidJumpBoost
|
||||
AndroidItemMagnet
|
||||
Shockwave
|
||||
Tools
|
||||
|
||||
specBuilder.pop()
|
||||
|
||||
|
@ -5,10 +5,11 @@ import net.minecraft.world.item.ItemStack
|
||||
import net.minecraft.world.item.Tier
|
||||
import net.minecraft.world.level.block.state.BlockState
|
||||
import net.minecraft.world.level.material.Material
|
||||
import ru.dbotthepony.mc.otm.ServerConfig
|
||||
|
||||
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.material == Material.LEAVES)
|
||||
if (pState.material == Material.LEAVES && ServerConfig.Tools.AXES_BREAK_LEAVES_INSTANTLY)
|
||||
return 64f
|
||||
|
||||
return super.getDestroySpeed(pStack, pState)
|
||||
|
Loading…
Reference in New Issue
Block a user