Class AbstractPotionBundle

java.lang.Object
net.minecraft.world.item.Item
net.minecraft.world.item.PotionItem
com.github.minecraftschurlimods.potionbundles.AbstractPotionBundle
All Implemented Interfaces:
net.minecraft.world.flag.FeatureElement, net.minecraft.world.level.ItemLike, net.neoforged.neoforge.common.extensions.IItemExtension
Direct Known Subclasses:
AbstractThrowablePotionBundle, PotionBundle

public abstract class AbstractPotionBundle extends net.minecraft.world.item.PotionItem
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraft.world.item.Item

    net.minecraft.world.item.Item.Properties, net.minecraft.world.item.Item.TooltipContext
  • Field Summary

    Fields inherited from class net.minecraft.world.item.Item

    ABSOLUTE_MAX_STACK_SIZE, BASE_ATTACK_DAMAGE_UUID, BASE_ATTACK_SPEED_UUID, BY_BLOCK, DEFAULT_MAX_STACK_SIZE, MAX_BAR_WIDTH

    Fields inherited from interface net.minecraft.world.flag.FeatureElement

    FILTERED_REGISTRIES
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    appendHoverText(net.minecraft.world.item.ItemStack stack, net.minecraft.world.item.Item.TooltipContext context, List<net.minecraft.network.chat.Component> tooltip, net.minecraft.world.item.TooltipFlag flag)
     
    net.minecraft.world.item.ItemStack
    createStack(@Nullable PotionBundleString string, net.minecraft.core.Holder<net.minecraft.world.item.alchemy.Potion> potion, List<net.minecraft.world.effect.MobEffectInstance> customEffects, @Nullable Integer customColor)
     
    net.minecraft.world.item.ItemStack
    createStack(@Nullable PotionBundleString string, net.minecraft.world.item.alchemy.PotionContents potionContents)
     
    int
    getBarColor(net.minecraft.world.item.ItemStack stack)
     
    int
    getBarWidth(net.minecraft.world.item.ItemStack stack)
     
    net.minecraft.world.item.ItemStack
     
    int
     
    net.minecraft.network.chat.Component
    getName(net.minecraft.world.item.ItemStack stack)
     
    boolean
    isBarVisible(net.minecraft.world.item.ItemStack stack)
     

    Methods inherited from class net.minecraft.world.item.PotionItem

    finishUsingItem, getDescriptionId, getUseAnimation, getUseDuration, use, useOn

    Methods inherited from class net.minecraft.world.item.Item

    asItem, builtInRegistryHolder, byBlock, byId, canAttackBlock, canFitInsideContainerItems, components, getAttackDamageBonus, getBreakingSound, getCraftingRemainingItem, getDefaultAttributeModifiers, getDefaultMaxStackSize, getDescription, getDescriptionId, getDestroySpeed, getDrinkingSound, getEatingSound, getEnchantmentValue, getId, getRenderPropertiesInternal, getTooltipImage, hasCraftingRemainingItem, hurtEnemy, initializeClient, interactLivingEntity, inventoryTick, isComplex, isCorrectToolForDrops, isEnchantable, isFoil, isRepairable, isValidRepairItem, mineBlock, modifyDefaultComponentsFrom, onCraftedBy, onCraftedPostProcess, onDestroyed, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, releaseUsing, requiredFeatures, toString, useOnRelease, verifyComponentsAfterLoad

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface net.minecraft.world.flag.FeatureElement

    isEnabled

    Methods inherited from interface net.neoforged.neoforge.common.extensions.IItemExtension

    canApplyAtEnchantingTable, canContinueUsing, canDisableShield, canElytraFly, canEquip, canGrindstoneRepair, canPerformAction, canWalkOnPowderedSnow, createEntity, damageItem, doesSneakBypassUse, elytraFlightTick, getAllEnchantments, getArmorTexture, getAttributeModifiers, getBurnTime, getCraftingRemainingItem, getCreatorModId, getDamage, getEnchantmentLevel, getEnchantmentValue, getEntityLifespan, getEquipmentSlot, getFoodProperties, getHighlightTip, getMaxDamage, getMaxStackSize, getSweepHitBox, getXpRepairRatio, hasCraftingRemainingItem, hasCustomEntity, isBookEnchantable, isDamageable, isDamaged, isEnderMask, isNotReplaceableByPickAction, isPiglinCurrency, makesPiglinsNeutral, onAnimalArmorTick, onArmorTick, onDestroyed, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onItemUseFirst, onLeftClickEntity, onStopUsing, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation
  • Constructor Details

    • AbstractPotionBundle

      public AbstractPotionBundle()
  • Method Details

    • getDefaultInstance

      public net.minecraft.world.item.ItemStack getDefaultInstance()
      Overrides:
      getDefaultInstance in class net.minecraft.world.item.PotionItem
    • getMaxUses

      @VisibleForTesting public int getMaxUses()
    • getBarWidth

      public int getBarWidth(net.minecraft.world.item.ItemStack stack)
      Overrides:
      getBarWidth in class net.minecraft.world.item.Item
    • appendHoverText

      public void appendHoverText(net.minecraft.world.item.ItemStack stack, net.minecraft.world.item.Item.TooltipContext context, List<net.minecraft.network.chat.Component> tooltip, net.minecraft.world.item.TooltipFlag flag)
      Overrides:
      appendHoverText in class net.minecraft.world.item.PotionItem
    • getBarColor

      public int getBarColor(net.minecraft.world.item.ItemStack stack)
      Overrides:
      getBarColor in class net.minecraft.world.item.Item
    • isBarVisible

      public boolean isBarVisible(net.minecraft.world.item.ItemStack stack)
      Overrides:
      isBarVisible in class net.minecraft.world.item.Item
    • getName

      public net.minecraft.network.chat.Component getName(net.minecraft.world.item.ItemStack stack)
      Overrides:
      getName in class net.minecraft.world.item.Item
    • createStack

      @VisibleForTesting public net.minecraft.world.item.ItemStack createStack(@Nullable @Nullable PotionBundleString string, net.minecraft.core.Holder<net.minecraft.world.item.alchemy.Potion> potion, List<net.minecraft.world.effect.MobEffectInstance> customEffects, @Nullable @Nullable Integer customColor)
    • createStack

      @VisibleForTesting public net.minecraft.world.item.ItemStack createStack(@Nullable @Nullable PotionBundleString string, net.minecraft.world.item.alchemy.PotionContents potionContents)