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 ClassesNested classes/interfaces inherited from class net.minecraft.world.item.Item
net.minecraft.world.item.Item.Properties, net.minecraft.world.item.Item.TooltipContext -
Field Summary
FieldsFields 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_WIDTHFields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES -
Constructor Summary
ConstructorsConstructorDescriptionPackageItem(net.minecraft.world.item.Item.Properties properties, PackageStyles.PackageStyle style) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddAddress(net.minecraft.world.item.ItemStack box, String address) static voidaddOrderContext(net.minecraft.world.item.ItemStack box, PackageOrderWithCrafts orderContext) voidappendHoverText(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) booleanstatic voidclearAddress(net.minecraft.world.item.ItemStack box) static net.minecraft.world.item.ItemStackcontaining(List<net.minecraft.world.item.ItemStack> stacks) static net.minecraft.world.item.ItemStackcontaining(net.neoforged.neoforge.items.ItemStackHandler stacks) net.minecraft.world.entity.EntitycreateEntity(net.minecraft.world.level.Level world, net.minecraft.world.entity.Entity location, net.minecraft.world.item.ItemStack itemstack) static StringgetAddress(net.minecraft.world.item.ItemStack box) static net.neoforged.neoforge.items.ItemStackHandlergetContents(net.minecraft.world.item.ItemStack box) static floatgetHeight(net.minecraft.world.item.ItemStack box) static floatgetHookDistance(net.minecraft.world.item.ItemStack box) static intgetIndex(net.minecraft.world.item.ItemStack box) static intgetLinkIndex(net.minecraft.world.item.ItemStack box) static @Nullable PackageOrderWithCraftsgetOrderContext(net.minecraft.world.item.ItemStack box) static intgetOrderId(net.minecraft.world.item.ItemStack box) static floatgetPackageVelocity(int p_185059_0_) net.minecraft.world.item.UseAnimgetUseAnimation(net.minecraft.world.item.ItemStack pStack) intgetUseDuration(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.LivingEntity entity) static floatgetWidth(net.minecraft.world.item.ItemStack box) booleanhasCustomEntity(net.minecraft.world.item.ItemStack stack) static booleanhasOrderData(net.minecraft.world.item.ItemStack box) static booleanisFinal(net.minecraft.world.item.ItemStack box) static booleanisFinalLink(net.minecraft.world.item.ItemStack box) static booleanisPackage(net.minecraft.world.item.ItemStack stack) static booleanmatchAddress(String boxAddress, String address) static booleanmatchAddress(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) voidreleaseUsing(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level world, net.minecraft.world.entity.LivingEntity entity, int ticks) static voidsetOrder(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.InteractionResultuseOn(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, verifyComponentsAfterLoadMethods inherited from class java.lang.Object
clone, equals, finalize, 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
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
-
SLOTS
public static final int SLOTS- See Also:
-
style
-
-
Constructor Details
-
PackageItem
public PackageItem(net.minecraft.world.item.Item.Properties properties, PackageStyles.PackageStyle style)
-
-
Method Details
-
getDescriptionId
- Overrides:
getDescriptionIdin classnet.minecraft.world.item.Item
-
isPackage
public static boolean isPackage(net.minecraft.world.item.ItemStack stack) -
canFitInsideContainerItems
public boolean canFitInsideContainerItems()- Overrides:
canFitInsideContainerItemsin classnet.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
-
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
-
matchAddress
-
getAddress
-
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:
appendHoverTextin classnet.minecraft.world.item.Item
-
getUseDuration
public int getUseDuration(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.LivingEntity entity) - Overrides:
getUseDurationin classnet.minecraft.world.item.Item
-
getUseAnimation
public net.minecraft.world.item.UseAnim getUseAnimation(net.minecraft.world.item.ItemStack pStack) - Overrides:
getUseAnimationin classnet.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:
useOnin classnet.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:
usein classnet.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:
releaseUsingin classnet.minecraft.world.item.Item
-
getPackageVelocity
public static float getPackageVelocity(int p_185059_0_)
-