net.minecraft.component.type

public record ToolComponent

net.minecraft.world.item.component.Tool
net.minecraft.world.item.component.Tool
net.minecraft.class_9424
net.minecraft.component.type.ToolComponent

Field summary

Modifier and TypeField
private final List<ToolComponent$Rule>
rules
rules
comp_2498
rules
private final float
defaultMiningSpeed
defaultMiningSpeed
comp_2499
defaultMiningSpeed
private final int
damagePerBlock
damagePerBlock
comp_2500
damagePerBlock
private final boolean
canDestroyBlocksInCreative
canDestroyBlocksInCreative
comp_3480
canDestroyBlocksInCreative
public static final com.mojang.serialization.Codec<ToolComponent>
CODEC
CODEC
field_50009
CODEC
public static final PacketCodec<RegistryByteBuf, ToolComponent>
STREAM_CODEC
STREAM_CODEC
field_50010
PACKET_CODEC

Constructor summary

ModifierConstructor
public (List<ToolComponent$Rule> rules, float defaultMiningSpeed, int damagePerBlock, boolean canDestroyBlocksInCreative)

Method summary

Modifier and TypeMethod
public float
getMiningSpeed(BlockState state)
getMiningSpeed(BlockState state)
method_58425(class_2680 arg0)
getSpeed(BlockState state)
public boolean
isCorrectForDrops(BlockState state)
isCorrectForDrops(BlockState state)
method_58426(class_2680 arg0)
isCorrectForDrops(BlockState state)
public List<ToolComponent$Rule>
rules()
rules()
comp_2498()
rules()
public float
defaultMiningSpeed()
defaultMiningSpeed()
comp_2499()
defaultMiningSpeed()
public int
damagePerBlock()
damagePerBlock()
comp_2500()
damagePerBlock()
public boolean
canDestroyBlocksInCreative()
canDestroyBlocksInCreative()
comp_3480()
canDestroyBlocksInCreative()