java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.entity.Entity
net.minecraft.world.entity.projectile.Projectile
net.minecraft.world.entity.projectile.AbstractArrow
net.minecraft.world.entity.projectile.Arrow
tech.anonymoushacker1279.immersiveweapons.entity.projectile.CustomArrowEntity
All Implemented Interfaces:
net.minecraft.core.component.DataComponentGetter, net.minecraft.network.syncher.SyncedDataHolder, net.minecraft.world.entity.TraceableEntity, net.minecraft.world.level.entity.EntityAccess, net.minecraft.world.level.entity.UniquelyIdentifyable, net.minecraft.world.Nameable, net.minecraft.world.scores.ScoreHolder, net.neoforged.neoforge.attachment.IAttachmentHolder, net.neoforged.neoforge.common.extensions.IEntityExtension, HitEffectUtils
Direct Known Subclasses:
BulletEntity

public class CustomArrowEntity extends net.minecraft.world.entity.projectile.Arrow implements HitEffectUtils
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     

    Nested classes/interfaces inherited from class net.minecraft.world.entity.projectile.AbstractArrow

    net.minecraft.world.entity.projectile.AbstractArrow.Pickup

    Nested classes/interfaces inherited from class net.minecraft.world.entity.projectile.Projectile

    net.minecraft.world.entity.projectile.Projectile.ProjectileFactory<T extends net.minecraft.world.entity.projectile.Projectile>

    Nested classes/interfaces inherited from class net.minecraft.world.entity.Entity

    net.minecraft.world.entity.Entity.MoveFunction, net.minecraft.world.entity.Entity.MovementEmission, net.minecraft.world.entity.Entity.RemovalReason

    Nested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder

    net.neoforged.neoforge.attachment.AttachmentHolder.AsField

    Nested classes/interfaces inherited from interface tech.anonymoushacker1279.immersiveweapons.item.tool.HitEffectUtils

    HitEffectUtils.HitEffect
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    int
     
     
    boolean
     
    net.minecraft.world.item.Item
     
     
    protected boolean
     
    protected static final byte
     

    Fields inherited from class net.minecraft.world.entity.projectile.AbstractArrow

    baseDamage, firedFromWeapon, inGroundTime, lastState, pickup, pickupItemStack, shakeTime

    Fields inherited from class net.minecraft.world.entity.projectile.Projectile

    owner

    Fields inherited from class net.minecraft.world.entity.Entity

    BASE_SAFE_FALL_DISTANCE, BASE_TICKS_REQUIRED_TO_FREEZE, blocksBuilding, BOARDING_COOLDOWN, boardingCooldown, CONTENTS_SLOT_INDEX, DATA_POSE, DATA_SHARED_FLAGS_ID, DEFAULT_BB_HEIGHT, DEFAULT_BB_WIDTH, DELTA_AFFECTED_BY_BLOCKS_BELOW_0_2, DELTA_AFFECTED_BY_BLOCKS_BELOW_0_5, DELTA_AFFECTED_BY_BLOCKS_BELOW_1_0, ENTITY_COUNTER, entityData, fallDistance, firstTick, FLAG_FALL_FLYING, FLAG_GLOWING, FLAG_ONFIRE, fluidHeight, flyDist, forgeFluidTypeHeight, FREEZE_HURT_FREQUENCY, hasImpulse, horizontalCollision, hurtMarked, invulnerableTime, isInPowderSnow, mainSupportingBlockPos, MAX_ENTITY_TAG_COUNT, MAX_MOVEMENTS_HANDELED_PER_TICK, minorHorizontalCollision, moveDist, noPhysics, portalProcess, random, stringUUID, stuckSpeedMultiplier, TAG_AIR, TAG_DATA, TAG_FALL_DISTANCE, TAG_FIRE, TAG_GLOWING, TAG_ID, TAG_INVULNERABLE, TAG_MOTION, TAG_NO_GRAVITY, TAG_ON_GROUND, TAG_PASSENGERS, TAG_PORTAL_COOLDOWN, TAG_POS, TAG_ROTATION, TAG_SILENT, TAG_UUID, tickCount, TOTAL_AIR_SUPPLY, uuid, verticalCollision, verticalCollisionBelow, wasEyeInWater, wasInPowderSnow, wasTouchingWater, xo, xOld, xRotO, yo, yOld, yRotO, zo, zOld

    Fields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder

    ATTACHMENTS_NBT_KEY

    Fields inherited from interface net.minecraft.world.scores.ScoreHolder

    WILDCARD, WILDCARD_NAME
  • Constructor Summary

    Constructors
    Constructor
    Description
    CustomArrowEntity(net.minecraft.world.entity.EntityType<? extends net.minecraft.world.entity.projectile.Arrow> type, net.minecraft.world.entity.LivingEntity shooter, net.minecraft.world.level.Level level, @Nullable net.minecraft.world.item.ItemStack weapon)
     
    CustomArrowEntity(net.minecraft.world.entity.EntityType<? extends net.minecraft.world.entity.projectile.Arrow> type, net.minecraft.world.level.Level level)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    doWhenHitEntity(net.minecraft.world.entity.Entity entity)
    Additional stuff to do when an entity is hit.
    protected void
    Additional stuff to do while ticking.
    protected void
    explode(float radius)
     
    net.minecraft.network.protocol.Packet<net.minecraft.network.protocol.game.ClientGamePacketListener>
    getAddEntityPacket(net.minecraft.server.level.ServerEntity entity)
     
    net.minecraft.world.damagesource.DamageSource
    getDamageSource(@Nullable net.minecraft.world.entity.Entity owner)
     
    net.minecraft.world.item.ItemStack
     
    protected void
    onHit(net.minecraft.world.phys.HitResult result)
     
    protected void
    onHitEntity(net.minecraft.world.phys.EntityHitResult result)
     
    void
    shoot(double x, double y, double z, float velocity, float inaccuracy)
     
    void
     

    Methods inherited from class net.minecraft.world.entity.projectile.Arrow

    addEffect, defineSynchedData, doPostHurtEffects, getColor, getDefaultPickupItem, handleEntityEvent, setPickupItemStack

    Methods inherited from class net.minecraft.world.entity.projectile.AbstractArrow

    addAdditionalSaveData, canHitEntity, doKnockback, findHitEntity, getDefaultGravity, getDefaultHitGroundSoundEvent, getHitGroundSoundEvent, getMovementEmission, getPickupItemStackOrigin, getPierceLevel, getSlot, getWaterInertia, getWeaponItem, hitBlockEnchantmentEffects, isAttackable, isCritArrow, isInGround, isNoPhysics, isPickable, isPushedByFluid, lerpMotion, move, onAboveBubbleColumn, onHitBlock, onInsideBubbleColumn, onItemBreak, onSyncedDataUpdated, playerTouch, push, readAdditionalSaveData, resetPiercedEntities, setBaseDamage, setBaseDamageFromMob, setCritArrow, setInGround, setNoPhysics, setOwner, setPierceLevel, setSoundEvent, shouldBounceOnWorldBorder, shouldRenderAtSqrDistance, tickDespawn, tryPickup

    Methods inherited from class net.minecraft.world.entity.projectile.Projectile

    applyOnProjectileSpawned, calculateHorizontalHurtKnockbackDirection, deflect, getDimensionChangingDelay, getEffectSource, getMovementToShoot, getOwner, getPickRadius, hitTargetOrDeflectSelf, hurtServer, lerpRotation, mayBreak, mayInteract, onDeflection, ownedBy, recreateFromPacket, restoreFrom, setOwner, shootFromRotation, spawnProjectile, spawnProjectile, spawnProjectileFromRotation, spawnProjectileUsingShoot, spawnProjectileUsingShoot, updateRotation

    Methods inherited from class net.minecraft.world.entity.Entity

    absSnapRotationTo, absSnapTo, absSnapTo, addDeltaMovement, addPassenger, addTag, adjustSpawnLocation, animateHurt, applyComponentsFromItemStack, applyEffectsFromBlocks, applyEffectsFromBlocks, applyGravity, applyImplicitComponent, applyImplicitComponentIfPresent, applyImplicitComponents, awardKillScore, baseTick, blockPosition, broadcastToPlayer, calculateUpVector, calculateViewVector, canAddPassenger, canBeCollidedWith, canBeHitByProjectile, canCollideWith, canControlVehicle, canFreeze, canRide, canSimulateMovement, canSpawnSprintParticle, canSprint, canTeleport, canTrample, canUsePortal, captureDrops, captureDrops, castComponentValue, causeFallDamage, checkBelowWorld, checkDespawn, checkFallDamage, checkFallDistanceAccumulation, checkSupportingBlock, chunkPosition, clearFire, clearFreeze, clearMovementThisTick, closerThan, closerThan, collideBoundingBox, collidedWithFluid, collidedWithShapeMovingFrom, considersEntityAsAlly, copyPosition, couldAcceptPassenger, countPlayerPassengers, createCommandSourceStackForNameResolution, createHoverEvent, damageSources, dampensVibrations, deflection, discard, dismountsUnderwater, dismountTo, displayFireAnimation, distanceTo, distanceToSqr, distanceToSqr, distanceToSqr, doCheckFallDamage, doWaterSplashEffect, dropAllLeashConnections, ejectPassengers, equals, extinguishFire, fillCrashReportCategory, fireImmune, fixupDimensions, forceSetRotation, fudgePositionAfterSizeChange, gameEvent, gameEvent, get, getAirSupply, getAttachments, getBbHeight, getBbWidth, getBlockExplosionResistance, getBlockJumpFactor, getBlockPosBelowThatAffectsMyMovement, getBlockSpeedFactor, getBlockStateOn, getBlockStateOnLegacy, getBlockX, getBlockY, getBlockZ, getBoundingBox, getCapability, getCapability, getCollisionHorizontalEscapeVector, getControlledVehicle, getControllingPassenger, getCustomName, getDefaultPassengerAttachmentPoint, getDeltaMovement, getDimensions, getDirection, getDismountLocationForPassenger, getDisplayName, getEncodeId, getEntityData, getEyeHeight, getEyeHeight, getEyeInFluidType, getEyePosition, getEyePosition, getEyeY, getFireImmuneTicks, getFirstPassenger, getFluidHeight, getFluidJumpThreshold, getFluidTypeHeight, getForward, getGravity, getHandHoldingItemAngle, getId, getInBlockState, getIndirectPassengers, getInputVector, getInterpolation, getKnownMovement, getLightLevelDependentMagicValue, getLightProbePosition, getLookAngle, getLootTable, getMaxAirSupply, getMaxFallDistance, getMaxHeightFluidType, getMotionDirection, getName, getNearestViewDirection, getOnPos, getOnPos, getOnPosLegacy, getPassengerAttachmentPoint, getPassengerRidingPosition, getPassengers, getPassengersAndSelf, getPercentFrozen, getPersistentData, getPickResult, getPistonPushReaction, getPortalCooldown, getPose, getPosition, getPositionCodec, getPreciseBodyRotation, getPrimaryStepSoundBlockPos, getQuadLeashHolderOffsets, getRandom, getRandomX, getRandomY, getRandomZ, getRelativePortalPosition, getRemainingFireTicks, getRemovalReason, getRequiresPrecisePosition, getRootVehicle, getRopeHoldPosition, getRotationVector, getScoreboardName, getSelfAndPassengers, getServer, getSharedFlag, getSoundSource, getStringUUID, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTags, getTeam, getTeamColor, getTicksFrozen, getTicksRequiredToFreeze, getType, getTypeName, getUpVector, getUUID, getVehicle, getVehicleAttachmentPoint, getViewScale, getViewVector, getViewXRot, getViewYRot, getVisualRotationYInDegrees, getX, getX, getXRot, getXRot, getY, getY, getYHeadRot, getYRot, getYRot, getZ, getZ, handleDamageEvent, handleOnAboveBubbleColumn, handleOnInsideBubbleColumn, handlePortal, hasControllingPassenger, hasCustomName, hasExactlyOnePlayerPassenger, hasGlowingTag, hashCode, hasIndirectPassenger, hasPassenger, hasPassenger, hasPose, hurt, hurtClient, hurtOrSimulate, igniteForSeconds, igniteForTicks, ignoreExplosion, interact, interactAt, is, isAddedToLevel, isAffectedByBlocks, isAlive, isAlliedTo, isAlliedTo, isAlwaysTicking, isClientAuthoritative, isColliding, isCrouching, isCurrentlyGlowing, isCustomNameVisible, isDescending, isDiscrete, isEffectiveAi, isEyeInFluid, isFlapping, isFlyingVehicle, isFree, isFreezing, isFullyFrozen, isHorizontalCollisionMinor, isIgnoringBlockTriggers, isInClouds, isInFluidType, isInFluidType, isInLava, isInLiquid, isInterpolating, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableToBase, isInWall, isInWater, isInWaterOrRain, isLocalClientAuthoritative, isLocalInstanceAuthoritative, isNoGravity, isOnFire, isOnPortalCooldown, isOnRails, isPassenger, isPassengerOfSameVehicle, isPushable, isRemoved, isShiftKeyDown, isSilent, isSpectator, isSprinting, isSteppingCarefully, isSupportedBy, isSuppressingBounce, isSwimming, isUnderWater, isVehicle, isVisuallyCrawling, isVisuallySwimming, kill, killedEntity, lavaHurt, lavaIgnite, lerpHeadTo, lerpPositionAndRotationStep, level, limitPistonMovement, load, lookAt, makeBoundingBox, makeBoundingBox, makeStuckInBlock, markHurt, maxUpStep, maybeBackOffFromEdge, mirror, moveOrInterpolateTo, moveRelative, moveTowardsClosestSpace, nextStep, notifyLeasheeRemoved, notifyLeashHolder, oldPosition, onAddedToLevel, onBelowWorld, onClientRemoval, onExplosionHit, onFlap, onGround, onInsideBlock, onPassengerTurned, onRemoval, onRemovedFromLevel, onSyncedDataUpdated, pick, placePortalTicket, playCombinationStepSounds, playEntityOnFireExtinguishedSound, playMuffledStepSound, playSound, playSound, playStepSound, playSwimSound, position, positionRider, positionRider, problemPath, processFlappingMovement, processPortalCooldown, propagateFallToPassengers, push, push, reapplyPosition, refreshDimensions, registryAccess, remove, removeAfterChangingDimensions, removeLatestMovementRecording, removePassenger, removeTag, removeVehicle, repositionEntityAfterLoad, resetFallDistance, revive, rideTick, rotate, save, saveAsPassenger, saveWithoutId, sendBubbleColumnParticles, setAirSupply, setAsInsidePortal, setBoundingBox, setComponent, setCustomName, setCustomNameVisible, setData, setDeltaMovement, setDeltaMovement, setFluidTypeHeight, setGlowingTag, setId, setInvisible, setInvulnerable, setIsInPowderSnow, setLevel, setLevelCallback, setNoGravity, setOldPos, setOldPosAndRot, setOldPosAndRot, setOldRot, setOnGround, setOnGroundWithMovement, setOnGroundWithMovement, setPortalCooldown, setPortalCooldown, setPos, setPos, setPose, setPosRaw, setRemainingFireTicks, setRemoved, setRequiresPrecisePosition, setRot, setSharedFlag, setSharedFlagOnFire, setShiftKeyDown, setSilent, setSprinting, setSwimming, setTicksFrozen, setUUID, setViewScale, setXRot, setYBodyRot, setYHeadRot, setYRot, shearOffAllLeashConnections, shouldBeSaved, shouldBlockExplode, shouldPlayLavaHurtSound, shouldRender, shouldShowName, showVehicleHealth, skipAttackInteraction, snapTo, snapTo, snapTo, snapTo, snapTo, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnSprintParticle, startRiding, startRiding, startSeenByPlayer, stopRiding, stopSeenByPlayer, supportQuadLeashAsHolder, syncData, syncPacketPositionCodec, teleport, teleportRelative, teleportSetPosition, teleportSpectators, teleportTo, teleportTo, thunderHit, toString, touchingUnloadedChunk, trackingPosition, turn, unRide, unsetRemoved, updateDynamicGameEventListener, updateFluidHeightAndDoFluidPushing, updateFluidHeightAndDoFluidPushing, updateInWaterStateAndDoFluidPushing, updateSwimming, waterSwimSound

    Methods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder

    deserializeAttachments, getData, getExistingDataOrNull, hasAttachments, hasData, removeData, serializeAttachments

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface net.minecraft.core.component.DataComponentGetter

    get, getOrDefault, getOrDefault, getTyped, has, has

    Methods inherited from interface tech.anonymoushacker1279.immersiveweapons.item.tool.HitEffectUtils

    addMoltenEffects, addTeslaEffects, addVentusEffects

    Methods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder

    getData, getExistingData, getExistingData, getExistingDataOrNull, hasData, removeData, setData, syncData

    Methods inherited from interface net.neoforged.neoforge.common.extensions.IEntityExtension

    canBeRiddenUnderFluidType, canFluidExtinguish, canHydrateInFluidType, canRiderInteract, canStartSwimming, canSwimInFluidType, copyAttachmentsFrom, getClassification, getFluidFallDistanceModifier, getFluidMotionScale, getParts, getSoundFromFluidType, hasCustomOutlineRendering, isEyeInFluidType, isInFluidType, isInFluidType, isInFluidType, isMultipartEntity, isPushedByFluid, sendPairingData, shouldRiderSit

    Methods inherited from interface net.minecraft.world.scores.ScoreHolder

    getFeedbackDisplayName
  • Field Details

    • VANILLA_IMPACT_STATUS_ID

      protected static final byte VANILLA_IMPACT_STATUS_ID
      See Also:
    • referenceItem

      public net.minecraft.world.item.Item referenceItem
    • shouldStopMoving

      protected boolean shouldStopMoving
    • shootingVectorInputs

      public List<Double> shootingVectorInputs
    • hitEffect

      public HitEffectUtils.HitEffect hitEffect
    • color

      public int color
    • isExplosive

      public boolean isExplosive
  • Constructor Details

    • CustomArrowEntity

      public CustomArrowEntity(net.minecraft.world.entity.EntityType<? extends net.minecraft.world.entity.projectile.Arrow> type, net.minecraft.world.level.Level level)
    • CustomArrowEntity

      public CustomArrowEntity(net.minecraft.world.entity.EntityType<? extends net.minecraft.world.entity.projectile.Arrow> type, net.minecraft.world.entity.LivingEntity shooter, net.minecraft.world.level.Level level, @Nullable @Nullable net.minecraft.world.item.ItemStack weapon)
  • Method Details

    • getPickupItem

      public net.minecraft.world.item.ItemStack getPickupItem()
      Overrides:
      getPickupItem in class net.minecraft.world.entity.projectile.AbstractArrow
    • getAddEntityPacket

      public net.minecraft.network.protocol.Packet<net.minecraft.network.protocol.game.ClientGamePacketListener> getAddEntityPacket(net.minecraft.server.level.ServerEntity entity)
      Overrides:
      getAddEntityPacket in class net.minecraft.world.entity.projectile.Projectile
    • tick

      public void tick()
      Overrides:
      tick in class net.minecraft.world.entity.projectile.Arrow
    • onHit

      protected void onHit(net.minecraft.world.phys.HitResult result)
      Overrides:
      onHit in class net.minecraft.world.entity.projectile.Projectile
    • onHitEntity

      protected void onHitEntity(net.minecraft.world.phys.EntityHitResult result)
      Overrides:
      onHitEntity in class net.minecraft.world.entity.projectile.AbstractArrow
    • shoot

      public void shoot(double x, double y, double z, float velocity, float inaccuracy)
      Overrides:
      shoot in class net.minecraft.world.entity.projectile.AbstractArrow
    • doWhileTicking

      protected void doWhileTicking()
      Additional stuff to do while ticking. Runs early in the tick method.
    • doWhenHitEntity

      protected void doWhenHitEntity(net.minecraft.world.entity.Entity entity)
      Additional stuff to do when an entity is hit.
      Parameters:
      entity - the Entity being hit
    • explode

      protected void explode(float radius)
    • getDamageSource

      public net.minecraft.world.damagesource.DamageSource getDamageSource(@Nullable @Nullable net.minecraft.world.entity.Entity owner)