public class class_5538 extends Item
Item.SettingsATTACK_DAMAGE_MODIFIER_ID, ATTACK_SPEED_MODIFIER_ID, BLOCK_ITEMS, group| Constructor and Description |
|---|
class_5538(Item.Settings settings) |
| Modifier and Type | Method and Description |
|---|---|
ItemStack |
finishUsing(ItemStack itemStack,
World world,
LivingEntity livingEntity) |
int |
getMaxUseTime(ItemStack itemStack) |
UseAction |
getUseAction(ItemStack itemStack) |
private void |
method_31582(LivingEntity livingEntity) |
void |
onStoppedUsing(ItemStack itemStack,
World world,
LivingEntity livingEntity,
int int2) |
TypedActionResult<ItemStack> |
use(World world,
PlayerEntity playerEntity,
Hand hand)
Called when an item is used by a player.
|
appendStacks, appendTooltip, asItem, byRawId, canMine, canRepair, damage, fromBlock, getAttributeModifiers, getDefaultStack, getDrinkSound, getEatSound, getEnchantability, getFoodComponent, getGroup, getMaxCount, getMaxDamage, getMiningSpeedMultiplier, getName, getName, getOrCreateTranslationKey, getRarity, getRawId, getRecipeRemainder, getTranslationKey, getTranslationKey, hasGlint, hasRecipeRemainder, inventoryTick, isDamageable, isEffectiveOn, isEnchantable, isFireproof, isFood, isIn, isNetworkSynced, isUsedOnRelease, method_31565, method_31566, method_31567, method_31568, method_31569, method_31570, method_31571, onCraft, postHit, postMine, postProcessTag, raycast, shouldSyncTagToClient, toString, usageTick, useOnBlock, useOnEntitypublic class_5538(Item.Settings settings)
public int getMaxUseTime(ItemStack itemStack)
getMaxUseTime in class Itempublic UseAction getUseAction(ItemStack itemStack)
getUseAction in class Itempublic TypedActionResult<ItemStack> use(World world, PlayerEntity playerEntity, Hand hand)
ItemThis method is called on both the logical client and logical server, so take caution when overriding this method.
The logical side can be checked using world.isClient().
use in class Itemworld - the world the item was used inplayerEntity - the player who used the itemhand - the hand usedpublic ItemStack finishUsing(ItemStack itemStack, World world, LivingEntity livingEntity)
finishUsing in class Itempublic void onStoppedUsing(ItemStack itemStack, World world, LivingEntity livingEntity, int int2)
onStoppedUsing in class Itemprivate void method_31582(LivingEntity livingEntity)