public class HoeItem extends MiningToolItem
Item.Settings| Modifier and Type | Field and Description |
|---|---|
private static Set<Block> |
EFFECTIVE_BLOCKS |
protected static Map<Block,BlockState> |
TILLED_BLOCKS |
miningSpeedATTACK_DAMAGE_MODIFIER_ID, ATTACK_SPEED_MODIFIER_ID, BLOCK_ITEMS, group, RANDOM| Modifier | Constructor and Description |
|---|---|
protected |
HoeItem(ToolMaterial material,
int attackDamage,
float attackSpeed,
Item.Settings settings) |
| Modifier and Type | Method and Description |
|---|---|
ActionResult |
useOnBlock(ItemUsageContext context)
Called when an item is used on a block.
|
getAttackDamage, getAttributeModifiers, getMiningSpeedMultiplier, postHit, postMinecanRepair, getEnchantability, getMaterialappendStacks, appendTooltip, asItem, byRawId, canMine, damage, finishUsing, fromBlock, getDefaultStack, getDrinkSound, getEatSound, getFoodComponent, getGroup, getMaxCount, getMaxDamage, getMaxUseTime, getName, getName, getOrCreateTranslationKey, getRarity, getRawId, getRecipeRemainder, getTranslationKey, getTranslationKey, getUseAction, hasGlint, hasRecipeRemainder, inventoryTick, isDamageable, isEffectiveOn, isEnchantable, isFireproof, isFood, isIn, isIn, isNetworkSynced, isUsedOnRelease, onCraft, onStoppedUsing, postProcessTag, raycast, shouldSyncTagToClient, toString, usageTick, use, useOnEntityprotected static final Map<Block,BlockState> TILLED_BLOCKS
protected HoeItem(ToolMaterial material, int attackDamage, float attackSpeed, Item.Settings settings)
public ActionResult useOnBlock(ItemUsageContext context)
This method is called on both the logical client and logical server, so take caution when using this method.
The logical side can be checked using context.getWorld().isClient().
useOnBlock in class Itemcontext - the usage context