Package net.minecraft.item
Class PotionItem
java.lang.Object
net.minecraft.item.Item
net.minecraft.item.PotionItem
- All Implemented Interfaces:
ItemConvertible
- Direct Known Subclasses:
ThrowablePotionItem
public class PotionItem extends Item
-
Nested Class Summary
-
Field Summary
Fields inherited from class net.minecraft.item.Item
ATTACK_DAMAGE_MODIFIER_ID, ATTACK_SPEED_MODIFIER_ID, BLOCK_ITEMS, group, RANDOM -
Constructor Summary
Constructors Constructor Description PotionItem(Item.Settings settings) -
Method Summary
Modifier and Type Method Description voidappendStacks(ItemGroup group, DefaultedList<ItemStack> stacks)voidappendTooltip(ItemStack stack, World world, List<Text> tooltip, TooltipContext context)ItemStackfinishUsing(ItemStack stack, World world, LivingEntity user)intgetMaxUseTime(ItemStack stack)ItemStackgetStackForRender()StringgetTranslationKey(ItemStack stack)UseActiongetUseAction(ItemStack stack)booleanhasEnchantmentGlint(ItemStack stack)TypedActionResult<ItemStack>use(World world, PlayerEntity user, Hand hand)Methods inherited from class net.minecraft.item.Item
asItem, byRawId, canMine, canRepair, damage, fromBlock, getAttributeModifiers, getDrinkSound, getEatSound, getEnchantability, getFoodComponent, getGroup, getMaxCount, getMaxDamage, getMiningSpeedMultiplier, getName, getName, getOrCreateTranslationKey, getRarity, getRawId, getRecipeRemainder, getTranslationKey, hasRecipeRemainder, inventoryTick, isDamageable, isEffectiveOn, isEnchantable, isFireproof, isFood, isIn, isIn, isNetworkSynced, isUsedOnRelease, onCraft, onStoppedUsing, postHit, postMine, postProcessTag, rayTrace, shouldSyncTagToClient, toString, usageTick, useOnBlock, useOnEntity
-
Constructor Details
-
Method Details
-
getStackForRender
- Overrides:
getStackForRenderin classItem
-
finishUsing
- Overrides:
finishUsingin classItem
-
getMaxUseTime
- Overrides:
getMaxUseTimein classItem
-
getUseAction
- Overrides:
getUseActionin classItem
-
use
-
getTranslationKey
- Overrides:
getTranslationKeyin classItem
-
appendTooltip
@Environment(CLIENT) public void appendTooltip(ItemStack stack, @Nullable World world, List<Text> tooltip, TooltipContext context)- Overrides:
appendTooltipin classItem
-
hasEnchantmentGlint
- Overrides:
hasEnchantmentGlintin classItem
-
appendStacks
- Overrides:
appendStacksin classItem
-