Package net.minecraftforge.debug.item
Class CustomElytraTest.CustomElytra
java.lang.Object
net.minecraft.world.item.Item
net.minecraftforge.debug.item.CustomElytraTest.CustomElytra
- All Implemented Interfaces:
ItemLike
,IForgeItem
- Enclosing class:
- CustomElytraTest
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.item.Item
Item.Properties
-
Field Summary
Fields inherited from class net.minecraft.world.item.Item
BASE_ATTACK_DAMAGE_UUID, BASE_ATTACK_SPEED_UUID, BY_BLOCK, canRepair, category, EAT_DURATION, MAX_BAR_WIDTH, MAX_STACK_SIZE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canElytraFly
(ItemStack stack, LivingEntity entity) Used to determine if the player can use Elytra flight.boolean
elytraFlightTick
(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.@Nullable EquipmentSlot
getEquipmentSlot
(ItemStack stack) Override this to set a non-default armor slot for an ItemStack, but do not use this to get the armor slot of said stack; for that, useLivingEntity.getEquipmentSlotForItem(ItemStack)
..Methods inherited from class net.minecraft.world.item.Item
allowedIn, appendHoverText, asItem, builtInRegistryHolder, byBlock, byId, canAttackBlock, canBeDepleted, canBeHurtBy, canFitInsideContainerItems, fillItemCategory, finishUsingItem, getBarColor, getBarWidth, getCraftingRemainingItem, getDefaultAttributeModifiers, getDefaultInstance, getDescription, getDescriptionId, getDescriptionId, getDestroySpeed, getDrinkingSound, getEatingSound, getEnchantmentValue, getEquipSound, getFoodProperties, getId, getItemCategory, getMaxDamage, getMaxStackSize, getName, getOrCreateDescriptionId, getPlayerPOVHitResult, getRarity, getRenderPropertiesInternal, getTooltipImage, getUseAnimation, getUseDuration, hasCraftingRemainingItem, hurtEnemy, initializeClient, interactLivingEntity, inventoryTick, isBarVisible, isComplex, isCorrectToolForDrops, isEdible, isEnchantable, isFireResistant, isFoil, isRepairable, isValidRepairItem, mineBlock, onCraftedBy, onDestroyed, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, releaseUsing, shouldOverrideMultiplayerNbt, toString, use, useOn, useOnRelease, verifyTagAfterLoad
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraftforge.common.extensions.IForgeItem
canApplyAtEnchantingTable, canContinueUsing, canDisableShield, canEquip, canPerformAction, canWalkOnPowderedSnow, createEntity, damageItem, doesSneakBypassUse, getAllEnchantments, getArmorTexture, getAttributeModifiers, getBurnTime, getCraftingRemainingItem, getCreativeTabs, getCreatorModId, getDamage, getDefaultTooltipHideFlags, getEnchantmentLevel, getEnchantmentValue, getEntityLifespan, getFoodProperties, getHighlightTip, getMaxDamage, getMaxStackSize, getShareTag, getSweepHitBox, getXpRepairRatio, hasCraftingRemainingItem, hasCustomEntity, initCapabilities, isBookEnchantable, isCorrectToolForDrops, isDamageable, isDamaged, isEnderMask, isNotReplaceableByPickAction, isPiglinCurrency, makesPiglinsNeutral, onArmorTick, onBlockStartBreak, onDestroyed, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onHorseArmorTick, onItemUseFirst, onLeftClickEntity, onUsingTick, readShareTag, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation
-
Constructor Details
-
CustomElytra
-
-
Method Details
-
getEquipmentSlot
Description copied from interface:IForgeItem
Override this to set a non-default armor slot for an ItemStack, but do not use this to get the armor slot of said stack; for that, useLivingEntity.getEquipmentSlotForItem(ItemStack)
..- Parameters:
stack
- the ItemStack- Returns:
- the armor slot of the ItemStack, or
null
to let the default vanilla logic as perLivingEntity.getSlotForItemStack(stack)
decide
-
canElytraFly
Description copied from interface:IForgeItem
Used to determine if the player can use Elytra flight. This is called Client and Server side.- 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.
-
elytraFlightTick
Description copied from interface:IForgeItem
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. For example the Vanilla implementation of this, applies damage to the ItemStack every 20 ticks.- 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.
-