Class PackageItem

java.lang.Object
net.minecraft.world.item.Item
com.simibubi.create.content.logistics.box.PackageItem
All Implemented Interfaces:
net.minecraft.world.flag.FeatureElement, net.minecraft.world.level.ItemLike, net.neoforged.neoforge.common.extensions.IItemExtension

public class PackageItem extends net.minecraft.world.item.Item
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final record 
     

    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
    Modifier and Type
    Field
    Description
    static final int
     
     

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

    ABSOLUTE_MAX_STACK_SIZE, BASE_ATTACK_DAMAGE_ID, BASE_ATTACK_SPEED_ID, BY_BLOCK, canRepair, DEFAULT_MAX_STACK_SIZE, MAX_BAR_WIDTH

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

    FILTERED_REGISTRIES
  • Constructor Summary

    Constructors
    Constructor
    Description
    PackageItem(net.minecraft.world.item.Item.Properties properties, PackageStyles.PackageStyle style)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    addAddress(net.minecraft.world.item.ItemStack box, String address)
     
    static void
    addOrderContext(net.minecraft.world.item.ItemStack box, PackageOrderWithCrafts orderContext)
     
    void
    appendHoverText(net.minecraft.world.item.ItemStack stack, net.minecraft.world.item.Item.TooltipContext tooltipContext, List<net.minecraft.network.chat.Component> tooltipComponents, net.minecraft.world.item.TooltipFlag tooltipFlag)
     
    boolean
     
    static void
    clearAddress(net.minecraft.world.item.ItemStack box)
     
    static net.minecraft.world.item.ItemStack
    containing(List<net.minecraft.world.item.ItemStack> stacks)
     
    static net.minecraft.world.item.ItemStack
    containing(net.neoforged.neoforge.items.ItemStackHandler stacks)
     
    net.minecraft.world.entity.Entity
    createEntity(net.minecraft.world.level.Level world, net.minecraft.world.entity.Entity location, net.minecraft.world.item.ItemStack itemstack)
     
    static String
    getAddress(net.minecraft.world.item.ItemStack box)
     
    static net.neoforged.neoforge.items.ItemStackHandler
    getContents(net.minecraft.world.item.ItemStack box)
     
     
    static float
    getHeight(net.minecraft.world.item.ItemStack box)
     
    static float
    getHookDistance(net.minecraft.world.item.ItemStack box)
     
    static int
    getIndex(net.minecraft.world.item.ItemStack box)
     
    static int
    getLinkIndex(net.minecraft.world.item.ItemStack box)
     
    static @Nullable PackageOrderWithCrafts
    getOrderContext(net.minecraft.world.item.ItemStack box)
     
    static int
    getOrderId(net.minecraft.world.item.ItemStack box)
     
    static float
    getPackageVelocity(int p_185059_0_)
     
    net.minecraft.world.item.UseAnim
    getUseAnimation(net.minecraft.world.item.ItemStack pStack)
     
    int
    getUseDuration(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.LivingEntity entity)
     
    static float
    getWidth(net.minecraft.world.item.ItemStack box)
     
    boolean
    hasCustomEntity(net.minecraft.world.item.ItemStack stack)
     
    static boolean
    hasOrderData(net.minecraft.world.item.ItemStack box)
     
    static boolean
    isFinal(net.minecraft.world.item.ItemStack box)
     
    static boolean
    isFinalLink(net.minecraft.world.item.ItemStack box)
     
    static boolean
    isPackage(net.minecraft.world.item.ItemStack stack)
     
    static boolean
    matchAddress(String boxAddress, String address)
     
    static boolean
    matchAddress(net.minecraft.world.item.ItemStack box, String address)
     
    net.minecraft.world.InteractionResultHolder<net.minecraft.world.item.ItemStack>
    open(net.minecraft.world.level.Level worldIn, net.minecraft.world.entity.player.Player playerIn, net.minecraft.world.InteractionHand handIn)
     
    void
    releaseUsing(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level world, net.minecraft.world.entity.LivingEntity entity, int ticks)
     
    static void
    setOrder(net.minecraft.world.item.ItemStack box, int orderId, int linkIndex, boolean isFinalLink, int fragmentIndex, boolean isFinal, @Nullable PackageOrderWithCrafts orderContext)
     
    net.minecraft.world.InteractionResultHolder<net.minecraft.world.item.ItemStack>
    use(net.minecraft.world.level.Level world, net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand)
     
    net.minecraft.world.InteractionResult
    useOn(net.minecraft.world.item.context.UseOnContext context)
     

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

    asItem, builtInRegistryHolder, byBlock, byId, canAttackBlock, components, finishUsingItem, getAttackDamageBonus, getBarColor, getBarWidth, getBreakingSound, getCraftingRemainingItem, getDefaultAttributeModifiers, getDefaultInstance, getDefaultMaxStackSize, getDescription, getDescriptionId, getDestroySpeed, getDrinkingSound, getEatingSound, getEnchantmentValue, getId, getName, getOrCreateDescriptionId, getPlayerPOVHitResult, getTooltipImage, hasCraftingRemainingItem, hurtEnemy, initializeClient, interactLivingEntity, inventoryTick, isBarVisible, isComplex, isCorrectToolForDrops, isEnchantable, isFoil, isRepairable, isValidRepairItem, mineBlock, modifyDefaultComponentsFrom, onCraftedBy, onCraftedPostProcess, onDestroyed, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, postHurtEnemy, requiredFeatures, toString, useOnRelease, verifyComponentsAfterLoad

    Methods inherited from class java.lang.Object

    clone, equals, finalize, 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

    applyEnchantments, canBeHurtBy, canContinueUsing, canDisableShield, canElytraFly, canEquip, canFitInsideContainerItems, canGrindstoneRepair, canPerformAction, canWalkOnPowderedSnow, damageItem, doesSneakBypassUse, elytraFlightTick, getAllEnchantments, getArmorTexture, getBurnTime, getCraftingRemainingItem, getCreatorModId, getDamage, getDefaultAttributeModifiers, getEnchantmentLevel, getEnchantmentValue, getEntityLifespan, getEquipmentSlot, getFoodProperties, getHighlightTip, getMaxDamage, getMaxStackSize, getSweepHitBox, getXpRepairRatio, hasCraftingRemainingItem, isBookEnchantable, isDamageable, isDamaged, isEnderMask, isNotReplaceableByPickAction, isPiglinCurrency, isPrimaryItemFor, makesPiglinsNeutral, onAnimalArmorTick, onDestroyed, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onEntitySwing, onItemUseFirst, onLeftClickEntity, onStopUsing, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation, supportsEnchantment
  • Field Details

  • Constructor Details

  • Method Details

    • getDescriptionId

      public String getDescriptionId()
      Overrides:
      getDescriptionId in class net.minecraft.world.item.Item
    • isPackage

      public static boolean isPackage(net.minecraft.world.item.ItemStack stack)
    • canFitInsideContainerItems

      public boolean canFitInsideContainerItems()
      Overrides:
      canFitInsideContainerItems in class net.minecraft.world.item.Item
    • hasCustomEntity

      public boolean hasCustomEntity(net.minecraft.world.item.ItemStack stack)
    • createEntity

      public net.minecraft.world.entity.Entity createEntity(net.minecraft.world.level.Level world, net.minecraft.world.entity.Entity location, net.minecraft.world.item.ItemStack itemstack)
    • containing

      public static net.minecraft.world.item.ItemStack containing(List<net.minecraft.world.item.ItemStack> stacks)
    • containing

      public static net.minecraft.world.item.ItemStack containing(net.neoforged.neoforge.items.ItemStackHandler stacks)
    • clearAddress

      public static void clearAddress(net.minecraft.world.item.ItemStack box)
    • addAddress

      public static void addAddress(net.minecraft.world.item.ItemStack box, String address)
    • setOrder

      public static void setOrder(net.minecraft.world.item.ItemStack box, int orderId, int linkIndex, boolean isFinalLink, int fragmentIndex, boolean isFinal, @Nullable @Nullable PackageOrderWithCrafts orderContext)
    • getOrderId

      public static int getOrderId(net.minecraft.world.item.ItemStack box)
    • hasOrderData

      public static boolean hasOrderData(net.minecraft.world.item.ItemStack box)
    • getIndex

      public static int getIndex(net.minecraft.world.item.ItemStack box)
    • isFinal

      public static boolean isFinal(net.minecraft.world.item.ItemStack box)
    • getLinkIndex

      public static int getLinkIndex(net.minecraft.world.item.ItemStack box)
    • isFinalLink

      public static boolean isFinalLink(net.minecraft.world.item.ItemStack box)
    • getOrderContext

      @Nullable public static @Nullable PackageOrderWithCrafts getOrderContext(net.minecraft.world.item.ItemStack box)
    • addOrderContext

      public static void addOrderContext(net.minecraft.world.item.ItemStack box, PackageOrderWithCrafts orderContext)
    • matchAddress

      public static boolean matchAddress(net.minecraft.world.item.ItemStack box, String address)
    • matchAddress

      public static boolean matchAddress(String boxAddress, String address)
    • getAddress

      public static String getAddress(net.minecraft.world.item.ItemStack box)
    • getWidth

      public static float getWidth(net.minecraft.world.item.ItemStack box)
    • getHeight

      public static float getHeight(net.minecraft.world.item.ItemStack box)
    • getHookDistance

      public static float getHookDistance(net.minecraft.world.item.ItemStack box)
    • getContents

      public static net.neoforged.neoforge.items.ItemStackHandler getContents(net.minecraft.world.item.ItemStack box)
    • appendHoverText

      public void appendHoverText(net.minecraft.world.item.ItemStack stack, net.minecraft.world.item.Item.TooltipContext tooltipContext, List<net.minecraft.network.chat.Component> tooltipComponents, net.minecraft.world.item.TooltipFlag tooltipFlag)
      Overrides:
      appendHoverText in class net.minecraft.world.item.Item
    • getUseDuration

      public int getUseDuration(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.LivingEntity entity)
      Overrides:
      getUseDuration in class net.minecraft.world.item.Item
    • getUseAnimation

      public net.minecraft.world.item.UseAnim getUseAnimation(net.minecraft.world.item.ItemStack pStack)
      Overrides:
      getUseAnimation in class net.minecraft.world.item.Item
    • open

      public net.minecraft.world.InteractionResultHolder<net.minecraft.world.item.ItemStack> open(net.minecraft.world.level.Level worldIn, net.minecraft.world.entity.player.Player playerIn, net.minecraft.world.InteractionHand handIn)
    • useOn

      public net.minecraft.world.InteractionResult useOn(net.minecraft.world.item.context.UseOnContext context)
      Overrides:
      useOn in class net.minecraft.world.item.Item
    • use

      public net.minecraft.world.InteractionResultHolder<net.minecraft.world.item.ItemStack> use(net.minecraft.world.level.Level world, net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand)
      Overrides:
      use in class net.minecraft.world.item.Item
    • releaseUsing

      public void releaseUsing(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level world, net.minecraft.world.entity.LivingEntity entity, int ticks)
      Overrides:
      releaseUsing in class net.minecraft.world.item.Item
    • getPackageVelocity

      public static float getPackageVelocity(int p_185059_0_)