Package net.minecraft.world.item
Class ElytraItem
java.lang.Object
net.minecraft.world.item.Item
net.minecraft.world.item.ElytraItem
- All Implemented Interfaces:
- FeatureElement,- Equipable,- Vanishable,- ItemLike,- IItemExtension
- 
Nested Class SummaryNested classes/interfaces inherited from class net.minecraft.world.item.ItemItem.Properties
- 
Field SummaryFields inherited from class net.minecraft.world.item.ItemBASE_ATTACK_DAMAGE_UUID, BASE_ATTACK_SPEED_UUID, BY_BLOCK, canRepair, EAT_DURATION, MAX_BAR_WIDTH, MAX_STACK_SIZEFields inherited from interface net.minecraft.world.flag.FeatureElementFILTERED_REGISTRIES
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleancanElytraFly(ItemStack stack, LivingEntity entity) Used to determine if the player can use Elytra flight.booleanelytraFlightTick(ItemStack stack, LivingEntity entity, int flightTicks) Used to determine if the player can continue Elytra flight, this is called each tick, and can be used to apply ItemStack damage, consume Energy, or what have you.static booleanisFlyEnabled(ItemStack p_41141_) booleanisValidRepairItem(ItemStack p_41134_, ItemStack p_41135_) use(Level p_41137_, Player p_41138_, InteractionHand p_41139_) Methods inherited from class net.minecraft.world.item.ItemappendHoverText, asItem, builtInRegistryHolder, byBlock, byId, canAttackBlock, canBeDepleted, canBeHurtBy, canFitInsideContainerItems, finishUsingItem, getBarColor, getBarWidth, getCraftingRemainingItem, getDefaultAttributeModifiers, getDefaultInstance, getDescription, getDescriptionId, getDescriptionId, getDestroySpeed, getDrinkingSound, getEatingSound, getEnchantmentValue, getFoodProperties, getId, getMaxDamage, getMaxStackSize, getName, getOrCreateDescriptionId, getPlayerPOVHitResult, getRarity, getRenderPropertiesInternal, getTooltipImage, getUseAnimation, getUseDuration, hasCraftingRemainingItem, hurtEnemy, initializeClient, interactLivingEntity, inventoryTick, isBarVisible, isComplex, isCorrectToolForDrops, isEdible, isEnchantable, isFireResistant, isFoil, isRepairable, mineBlock, onCraftedBy, onCraftedPostProcess, onDestroyed, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, releaseUsing, requiredFeatures, shouldOverrideMultiplayerNbt, toString, useOn, useOnRelease, verifyTagAfterLoadMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.item.EquipableswapWithEquipmentSlotMethods inherited from interface net.minecraft.world.flag.FeatureElementisEnabledMethods inherited from interface net.neoforged.neoforge.common.extensions.IItemExtensioncanApplyAtEnchantingTable, canContinueUsing, canDisableShield, canEquip, canGrindstoneRepair, canPerformAction, canWalkOnPowderedSnow, createEntity, damageItem, doesSneakBypassUse, getAllEnchantments, getArmorTexture, getAttributeModifiers, getBurnTime, getCraftingRemainingItem, getCreatorModId, getDamage, getDefaultTooltipHideFlags, getEnchantmentLevel, getEnchantmentValue, getEntityLifespan, getEquipmentSlot, getFoodProperties, getHighlightTip, getMaxDamage, getMaxStackSize, getSweepHitBox, getXpRepairRatio, hasCraftingRemainingItem, hasCustomEntity, isBookEnchantable, isCorrectToolForDrops, isDamageable, isDamaged, isEnderMask, isNotReplaceableByPickAction, isPiglinCurrency, makesPiglinsNeutral, onArmorTick, onBlockStartBreak, onDestroyed, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onHorseArmorTick, onItemUseFirst, onLeftClickEntity, onStopUsing, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation
- 
Constructor Details- 
ElytraItem
 
- 
- 
Method Details- 
isFlyEnabled
- 
isValidRepairItem- Overrides:
- isValidRepairItemin class- Item
 
- 
usepublic InteractionResultHolder<ItemStack> use(Level p_41137_, Player p_41138_, InteractionHand p_41139_) 
- 
canElytraFlyDescription copied from interface:IItemExtensionUsed to determine if the player can use Elytra flight. This is called Client and Server side.- Specified by:
- canElytraFlyin interface- IItemExtension
- Parameters:
- stack- The ItemStack in the Chest slot of the entity.
- entity- The entity trying to fly.
- Returns:
- True if the entity can use Elytra flight.
 
- 
elytraFlightTickDescription copied from interface:IItemExtensionUsed to determine if the player can continue Elytra flight, this is called each tick, and can be used to apply ItemStack damage, consume Energy, or what have you. For example the Vanilla implementation of this, applies damage to the ItemStack every 20 ticks.- Specified by:
- elytraFlightTickin interface- IItemExtension
- Parameters:
- stack- ItemStack in the Chest slot of the entity.
- entity- The entity currently in Elytra flight.
- flightTicks- The number of ticks the entity has been Elytra flying for.
- Returns:
- True if the entity should continue Elytra flight or False to stop.
 
- 
getEquipSound- Specified by:
- getEquipSoundin interface- Equipable
 
- 
getEquipmentSlot- Specified by:
- getEquipmentSlotin interface- Equipable
 
 
-