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_WIDTHFields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidappendHoverText(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.ItemStackcreateStack(@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.ItemStackcreateStack(@Nullable PotionBundleString string, net.minecraft.world.item.alchemy.PotionContents potionContents) intgetBarColor(net.minecraft.world.item.ItemStack stack) intgetBarWidth(net.minecraft.world.item.ItemStack stack) net.minecraft.world.item.ItemStackintnet.minecraft.network.chat.ComponentgetName(net.minecraft.world.item.ItemStack stack) booleanisBarVisible(net.minecraft.world.item.ItemStack stack) Methods inherited from class net.minecraft.world.item.PotionItem
finishUsingItem, getDescriptionId, getUseAnimation, getUseDuration, use, useOnMethods 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, verifyComponentsAfterLoadMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.flag.FeatureElement
isEnabledMethods 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:
getDefaultInstancein classnet.minecraft.world.item.PotionItem
-
getMaxUses
@VisibleForTesting public int getMaxUses() -
getBarWidth
public int getBarWidth(net.minecraft.world.item.ItemStack stack) - Overrides:
getBarWidthin classnet.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:
appendHoverTextin classnet.minecraft.world.item.PotionItem
-
getBarColor
public int getBarColor(net.minecraft.world.item.ItemStack stack) - Overrides:
getBarColorin classnet.minecraft.world.item.Item
-
isBarVisible
public boolean isBarVisible(net.minecraft.world.item.ItemStack stack) - Overrides:
isBarVisiblein classnet.minecraft.world.item.Item
-
getName
public net.minecraft.network.chat.Component getName(net.minecraft.world.item.ItemStack stack) - Overrides:
getNamein classnet.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)
-