Class CustomArrowItem<T extends CustomArrowEntity>
java.lang.Object
net.minecraft.world.item.Item
net.minecraft.world.item.ArrowItem
tech.anonymoushacker1279.immersiveweapons.item.projectile.CustomArrowItem<T>
- All Implemented Interfaces:
net.minecraft.world.flag.FeatureElement,net.minecraft.world.level.ItemLike,net.neoforged.neoforge.common.extensions.IItemExtension
public class CustomArrowItem<T extends CustomArrowEntity>
extends net.minecraft.world.item.ArrowItem
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classNested classes/interfaces inherited from class net.minecraft.world.item.Item
net.minecraft.world.item.Item.Properties -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal intdoubleFields inherited from class net.minecraft.world.item.Item
BASE_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.FeatureElement
FILTERED_REGISTRIES -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCustomArrowItem(net.minecraft.world.item.Item.Properties properties, double damage, Supplier<net.minecraft.world.entity.EntityType<T>> arrowEntity, int pierceLevel, boolean canBeInfinite, double gravityModifier, List<Double> shootingVectorInputs, int knockbackStrength, HitEffectUtils.HitEffect hitEffect, int color) -
Method Summary
Modifier and TypeMethodDescriptionbooleannet.minecraft.world.entity.projectile.AbstractArrowcreateArrow(net.minecraft.world.level.Level level) net.minecraft.world.entity.projectile.AbstractArrowcreateArrow(net.minecraft.world.level.Level level, net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.LivingEntity shooter) booleanisInfinite(net.minecraft.world.item.ItemStack arrow, net.minecraft.world.item.ItemStack bow, net.minecraft.world.entity.player.Player player) Check if the arrow is infinite.Methods inherited from class net.minecraft.world.item.Item
appendHoverText, 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, isValidRepairItem, mineBlock, onCraftedBy, onDestroyed, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, releaseUsing, requiredFeatures, shouldOverrideMultiplayerNbt, toString, use, useOn, useOnRelease, verifyTagAfterLoadMethods 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
canApplyAtEnchantingTable, canContinueUsing, canDisableShield, canElytraFly, canEquip, canGrindstoneRepair, canPerformAction, canWalkOnPowderedSnow, createEntity, damageItem, doesSneakBypassUse, elytraFlightTick, getAllEnchantments, getArmorTexture, getAttributeModifiers, getBurnTime, getCraftingRemainingItem, getCreatorModId, getDamage, getDefaultTooltipHideFlags, getEnchantmentLevel, getEnchantmentValue, getEntityLifespan, getEquipmentSlot, 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, onStopUsing, readShareTag, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation
-
Field Details
-
entitySupplier
public final Supplier<net.minecraft.world.entity.EntityType<T extends CustomArrowEntity>> entitySupplier -
damage
public double damage -
color
public final int color
-
-
Constructor Details
-
CustomArrowItem
protected CustomArrowItem(net.minecraft.world.item.Item.Properties properties, double damage, Supplier<net.minecraft.world.entity.EntityType<T>> arrowEntity, int pierceLevel, boolean canBeInfinite, double gravityModifier, List<Double> shootingVectorInputs, int knockbackStrength, HitEffectUtils.HitEffect hitEffect, int color)
-
-
Method Details
-
canBeInfinite
public boolean canBeInfinite() -
createArrow
public net.minecraft.world.entity.projectile.AbstractArrow createArrow(net.minecraft.world.level.Level level, net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.LivingEntity shooter) - Overrides:
createArrowin classnet.minecraft.world.item.ArrowItem
-
createArrow
public net.minecraft.world.entity.projectile.AbstractArrow createArrow(net.minecraft.world.level.Level level) -
isInfinite
public boolean isInfinite(net.minecraft.world.item.ItemStack arrow, net.minecraft.world.item.ItemStack bow, net.minecraft.world.entity.player.Player player) Check if the arrow is infinite. A more flexible check than Vanilla provides. Restricts the ability to lower level arrows, for balance.- Overrides:
isInfinitein classnet.minecraft.world.item.ArrowItem- Parameters:
arrow- the arrow being checkedbow- the bow firing the arrowplayer- the player firing the bow- Returns:
- boolean
-