Class PersistentProjectileEntity
- All Implemented Interfaces:
DataTracked
,Ownable
,ScoreHolder
,Nameable
,EntityLike
- Direct Known Subclasses:
ArrowEntity
,SpectralArrowEntity
,TridentEntity
- Mappings:
Namespace Name named net/minecraft/entity/projectile/PersistentProjectileEntity
intermediary net/minecraft/class_1665
official cqd
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.entity.projectile.ProjectileEntity
ProjectileEntity.ProjectileCreator<T extends ProjectileEntity>
Nested classes/interfaces inherited from class net.minecraft.entity.Entity
Entity.MoveEffect, Entity.PositionUpdater, Entity.RemovalReason
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final int
private double
private static final double
static final int
private static final TrackedData
<Boolean> private @Nullable BlockState
protected int
private int
private static final int
private static final TrackedData
<Byte> private @Nullable IntOpenHashSet
private static final TrackedData
<Byte> int
private SoundEvent
private ItemStack
Fields inherited from class net.minecraft.entity.Entity
age, collidedSoftly, dataTracker, DEFAULT_FRICTION, DEFAULT_MIN_FREEZE_DAMAGE_TICKS, DEFAULT_PORTAL_COOLDOWN, distanceTraveled, fallDistance, field_44870, field_44871, field_44872, field_49073, field_49791, firstUpdate, FLAGS, fluidHeight, FREEZING_DAMAGE_INTERVAL, GLIDING_FLAG_INDEX, GLOWING_FLAG_INDEX, groundCollision, horizontalCollision, ID_KEY, inPowderSnow, intersectionChecked, lastRenderX, lastRenderY, lastRenderZ, MAX_COMMAND_TAGS, MAX_RIDING_COOLDOWN, MIN_RISING_BUBBLE_COLUMN_SPEED, movementMultiplier, noClip, ON_FIRE_FLAG_INDEX, PASSENGERS_KEY, portalManager, POSE, prevPitch, prevX, prevY, prevYaw, prevZ, random, ridingCooldown, speed, submergedInWater, supportingBlockPos, timeUntilRegen, touchingWater, uuid, UUID_KEY, uuidString, velocityDirty, velocityModified, verticalCollision, wasInPowderSnow
Fields inherited from interface net.minecraft.scoreboard.ScoreHolder
WILDCARD, WILDCARD_NAME
-
Constructor Summary
ModifierConstructorDescriptionprotected
PersistentProjectileEntity
(EntityType<? extends PersistentProjectileEntity> type, double x, double y, double z, World world, ItemStack stack, @Nullable ItemStack weapon) protected
PersistentProjectileEntity
(EntityType<? extends PersistentProjectileEntity> type, LivingEntity owner, World world, ItemStack stack, @Nullable ItemStack shotFrom) protected
PersistentProjectileEntity
(EntityType<? extends PersistentProjectileEntity> type, World world) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
age()
private void
applyCollision
(BlockHitResult blockHitResult) void
applyDamageModifier
(float damageModifier) private void
protected ItemStack
boolean
canHit()
Returns whether the entity can be hit with a projectile or be targeted by the player crosshair.protected boolean
private void
protected boolean
private void
fall()
double
protected abstract ItemStack
protected float
protected @Nullable EntityHitResult
getEntityCollision
(Vec3d currentPosition, Vec3d nextPosition) protected double
protected SoundEvent
Returns the read-only item stack representing the projectile.protected Entity.MoveEffect
Returns the possible effect(s) of an entity moving.byte
protected final SoundEvent
getSound()
getStackReference
(int mappedIndex) Obtains a stack reference to be modified.protected void
initDataTracker
(DataTracker.Builder builder) Initializes data tracker.boolean
Returns whether the entity can be attacked by players.boolean
protected boolean
boolean
isNoClip()
protected void
knockback
(LivingEntity target, DamageSource source) void
move
(MovementType type, Vec3d movement) protected void
onBlockHit
(BlockHitResult blockHitResult) protected void
onBlockHitEnchantmentEffects
(ServerWorld world, BlockHitResult blockHitResult, ItemStack weaponStack) protected void
protected void
onEntityHit
(EntityHitResult entityHitResult) protected void
onHit
(LivingEntity target) void
onPlayerCollision
(PlayerEntity player) Called when a player collides with the entity.void
onTrackedDataSet
(TrackedData<?> data) Called on the client when the tracked data is set.void
Reads custom data fromnbt
.void
setCritical
(boolean critical) void
setDamage
(double damage) protected void
setInGround
(boolean inGround) void
setNoClip
(boolean noClip) void
private void
setPierceLevel
(byte level) private void
setProjectileFlag
(int index, boolean flag) void
setSound
(SoundEvent sound) protected void
void
setVelocity
(double x, double y, double z, float power, float uncertainty) Sets velocity and updates rotation accordingly.void
setVelocityClient
(double x, double y, double z) private boolean
boolean
shouldRender
(double distance) private void
void
tick()
Ticks this entity.protected boolean
tryPickup
(PlayerEntity player) void
updateTrackedPositionAndAngles
(double x, double y, double z, float yaw, float pitch, int interpolationSteps) void
Writes custom data tonbt
.Methods inherited from class net.minecraft.entity.projectile.ProjectileEntity
calculateVelocity, canBreakBlocks, canModifyAt, copyFrom, createSpawnPacket, damage, deflect, getDefaultPortalCooldown, getEffectCause, getEntity, getKnockback, getOwner, getTargetingMargin, hitOrDeflect, isOwner, onCollision, onDeflected, onSpawnPacket, setOwner, setVelocity, spawn, spawn, spawnWithVelocity, spawnWithVelocity, spawnWithVelocity, triggerProjectileSpawned, updateRotation, updateRotation
Methods inherited from class net.minecraft.entity.Entity
addAirTravelEffects, addCommandTag, addFlapEffects, addPassenger, addPortalChunkTicketAt, addVelocity, addVelocity, addVelocityInternal, adjustMovementForCollisions, adjustMovementForPiston, adjustMovementForSneaking, animateDamage, applyGravity, applyMirror, applyRotation, attemptTickInVoid, baseTick, bypassesLandingEffects, bypassesSteppingEffects, calculateBoundingBox, calculateDimensions, calculateNextStepSoundDistance, canAddPassenger, canAvoidTraps, canBeHitByProjectile, canBeSpectated, canExplosionDestroyBlock, canFreeze, canMoveVoluntarily, canSprintAsVehicle, canStartRiding, canTeleportBetween, canUsePortals, changeLookDirection, checkDespawn, clientDamage, collidesWith, collidesWithStateAtPos, copyPositionAndRotation, couldAcceptPassenger, detach, discard, dismountVehicle, distanceTo, doesNotCollide, doesRenderOnFire, dropItem, dropItem, dropStack, dropStack, emitGameEvent, emitGameEvent, entityDataRequiresOperator, equals, extinguish, extinguishWithSound, fall, getAir, getAttachments, getBlockPos, getBlockStateAtPos, getBlockX, getBlockY, getBlockZ, getBodyY, getBodyYaw, getBoundingBox, getBrightnessAtEyes, getBurningDuration, getCameraPosVec, getChunkPos, getClientCameraPosVec, getCommandSource, getCommandTags, getControllingPassenger, getControllingVehicle, getCustomName, getDamageSources, getDataTracker, getDefaultName, getDimensions, getDisplayName, getEffectiveExplosionResistance, getEntityWorld, getEyeHeight, getEyePos, getEyeY, getFacing, getFinalGravity, getFireTicks, getFirstPassenger, getFlag, getFluidHeight, getFreezingScale, getFrozenTicks, getHandPosOffset, getHeadYaw, getHeight, getHighSpeedSplashSound, getHorizontalFacing, getHoverEvent, getId, getJumpVelocityMultiplier, getLandingBlockState, getLandingPos, getLastRenderPos, getLeashOffset, getLeashOffset, getLeashPos, getLerpedPitch, getLerpedPos, getLerpedYaw, getLerpTargetPitch, getLerpTargetX, getLerpTargetY, getLerpTargetYaw, getLerpTargetZ, getLootTableKey, getMaxAir, getMinFreezeDamageTicks, getMovement, getMovementDirection, getName, getNameForScoreboard, getOppositeRotationVector, getOppositeRotationVector, getParticleX, getParticleZ, getPassengerAttachmentPos, getPassengerAttachmentPos, getPassengerDismountOffset, getPassengerList, getPassengerRidingPos, getPassengersDeep, getPickBlockStack, getPistonBehavior, getPitch, getPitch, getPlayerPassengers, getPortalCooldown, getPos, getPose, getPosWithYOffset, getProjectileDeflection, getRandom, getRandomBodyY, getRegistryManager, getRemovalReason, getRenderDistanceMultiplier, getRootVehicle, getRotationClient, getRotationVec, getRotationVecClient, getRotationVector, getRotationVector, getSafeFallDistance, getSavedEntityId, getScoreboardTeam, getServer, getSoundCategory, getSplashSound, getStandingEyeHeight, getStepHeight, getSteppingBlockState, getSteppingPos, getStepSoundPos, getSwimHeight, getSwimSound, getSyncedPos, getTeamColorValue, getTrackedPosition, getType, getUuid, getUuidAsString, getVehicle, getVehicleAttachmentPos, getVelocity, getVelocityAffectingPos, getVelocityMultiplier, getWidth, getWorld, getWorldSpawnPos, getX, getY, getYaw, getYaw, getZ, handleAttack, handleFallDamage, handleStatus, hasCollidedSoftly, hasControllingPassenger, hasCustomName, hashCode, hasNoGravity, hasPassenger, hasPassenger, hasPassengerDeep, hasPassengers, hasPlayerRider, hasPortalCooldown, hasVehicle, interact, interactAt, isAlive, isAlwaysInvulnerableTo, isCollidable, isConnectedThroughVehicle, isControlledByPlayer, isCrawling, isCustomNameVisible, isDescending, isFireImmune, isFlappingWings, isFrozen, isGlowing, isGlowingLocal, isImmuneToExplosion, isInFluid, isInLava, isInPose, isInRange, isInRange, isInSameTeam, isInsideWall, isInsideWaterOrBubbleColumn, isInSneakingPose, isInSwimmingPose, isInvisible, isInvisibleTo, isInvulnerable, isLiving, isLocalPlayerOrLogicalSideForUpdatingMovement, isLogicalSideForUpdatingMovement, isOnFire, isOnGround, isOnRail, isPartOf, isPlayer, isPushable, isPushedByFluids, isRegionUnloaded, isRemoved, isSilent, isSneaking, isSneaky, isSpectator, isSprinting, isSubmergedIn, isSubmergedInWater, isSupportedBy, isSwimming, isTeammate, isTeamPlayer, isTouchingWater, isTouchingWaterOrRain, isWet, kill, lerpPosAndRotation, lerpYaw, limitFallDistance, lookAt, movementInputToVelocity, occludeVibrationSignals, offsetX, offsetZ, onBlockCollision, onBubbleColumnCollision, onBubbleColumnSurfaceCollision, onDamaged, onDataTrackerUpdate, onExplodedBy, onKilledOther, onLanding, onPassengerLookAround, onRemove, onRemoved, onStartedTrackingBy, onStoppedTrackingBy, onStruckByLightning, onSwimmingStart, playCombinationStepSounds, playExtinguishSound, playSecondaryStepSound, playSound, playSoundIfNotSilent, playStepSound, playSwimSound, playSwimSound, populateCrashReport, positionInPortal, pushAwayFrom, pushOutOfBlocks, queueBlockCollisionCheck, raycast, readNbt, recalculateDimensions, refreshPosition, refreshPositionAfterTeleport, refreshPositionAfterTeleport, refreshPositionAndAngles, refreshPositionAndAngles, refreshPositionAndAngles, reinitDimensions, remove, removeAllPassengers, removeCommandTag, removeFromDimension, removePassenger, requestTeleport, requestTeleportAndDismount, requestTeleportOffset, resetLerp, resetPortalCooldown, resetPosition, rotate, saveNbt, saveSelfNbt, scheduleVelocityUpdate, serverDamage, setAir, setAngles, setBodyYaw, setBoundingBox, setChangeListener, setCustomName, setCustomNameVisible, setFireTicks, setFlag, setFrozenTicks, setGlowing, setHeadYaw, setId, setInPowderSnow, setInvisible, setInvulnerable, setMovement, setNoGravity, setOnFire, setOnFireFor, setOnFireForTicks, setOnFireFromLava, setOnGround, setPitch, setPortalCooldown, setPos, setPose, setPosition, setPosition, setPosition, setPrevPositionAndAngles, setRemoved, setRenderDistanceMultiplier, setRotation, setSilent, setSneaking, setSprinting, setSwimming, setUuid, setVelocity, setVelocity, setWorld, setYaw, shouldControlVehicles, shouldDismountUnderwater, shouldEscapePowderSnow, shouldPlayBurnSoundInLava, shouldRender, shouldRenderName, shouldSave, shouldSetPositionOnLoad, shouldSpawnSprintingParticles, shouldTickBlockCollision, sidedDamage, slowMovement, spawnSprintingParticles, squaredDistanceTo, squaredDistanceTo, squaredDistanceTo, startRiding, startRiding, stopRiding, streamPassengersAndSelf, streamSelfAndPassengers, teleport, teleportTo, tickBlockCollision, tickBlockCollision, tickInVoid, tickPortalCooldown, tickPortalTeleportation, tickRiding, toNbtList, toNbtList, toString, tryUsePortal, unsetRemoved, updateEventHandler, updateKilledAdvancementCriterion, updateMovementInFluid, updatePassengerForDismount, updatePassengerPosition, updatePassengerPosition, updatePosition, updatePositionAndAngles, updatePrevAngles, updatePrevPosition, updateSupportingBlockPos, updateSwimming, updateTrackedHeadRotation, updateTrackedPosition, updateVelocity, updateWaterState, writeNbt
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.scoreboard.ScoreHolder
getStyledDisplayName
-
Field Details
-
field_30657
private static final double field_30657- See Also:
- Mappings:
Namespace Name Mixin selector named field_30657
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;field_30657:D
intermediary field_30657
Lnet/minecraft/class_1665;field_30657:D
official e
Lcqd;e:D
-
field_54968
public static final int field_54968- See Also:
- Mappings:
Namespace Name Mixin selector named field_54968
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;field_54968:I
intermediary field_54968
Lnet/minecraft/class_1665;field_54968:I
official a
Lcqd;a:I
-
PROJECTILE_FLAGS
- Mappings:
Namespace Name Mixin selector named PROJECTILE_FLAGS
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;PROJECTILE_FLAGS:Lnet/minecraft/entity/data/TrackedData;
intermediary field_7573
Lnet/minecraft/class_1665;field_7573:Lnet/minecraft/class_2940;
official f
Lcqd;f:Lalc;
-
PIERCE_LEVEL
- Mappings:
Namespace Name Mixin selector named PIERCE_LEVEL
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;PIERCE_LEVEL:Lnet/minecraft/entity/data/TrackedData;
intermediary field_7589
Lnet/minecraft/class_1665;field_7589:Lnet/minecraft/class_2940;
official g
Lcqd;g:Lalc;
-
IN_GROUND
- Mappings:
Namespace Name Mixin selector named IN_GROUND
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;IN_GROUND:Lnet/minecraft/entity/data/TrackedData;
intermediary field_54969
Lnet/minecraft/class_1665;field_54969:Lnet/minecraft/class_2940;
official h
Lcqd;h:Lalc;
-
CRITICAL_FLAG
private static final int CRITICAL_FLAG- See Also:
- Mappings:
Namespace Name Mixin selector named CRITICAL_FLAG
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;CRITICAL_FLAG:I
intermediary field_30654
Lnet/minecraft/class_1665;field_30654:I
official i
Lcqd;i:I
-
NO_CLIP_FLAG
private static final int NO_CLIP_FLAG- See Also:
- Mappings:
Namespace Name Mixin selector named NO_CLIP_FLAG
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;NO_CLIP_FLAG:I
intermediary field_30655
Lnet/minecraft/class_1665;field_30655:I
official j
Lcqd;j:I
-
inBlockState
- Mappings:
Namespace Name Mixin selector named inBlockState
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;inBlockState:Lnet/minecraft/block/BlockState;
intermediary field_7586
Lnet/minecraft/class_1665;field_7586:Lnet/minecraft/class_2680;
official k
Lcqd;k:Ldxu;
-
inGroundTime
protected int inGroundTime- Mappings:
Namespace Name Mixin selector named inGroundTime
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;inGroundTime:I
intermediary field_7576
Lnet/minecraft/class_1665;field_7576:I
official b
Lcqd;b:I
-
pickupType
- Mappings:
Namespace Name Mixin selector named pickupType
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;pickupType:Lnet/minecraft/entity/projectile/PersistentProjectileEntity$PickupPermission;
intermediary field_7572
Lnet/minecraft/class_1665;field_7572:Lnet/minecraft/class_1665$class_1666;
official c
Lcqd;c:Lcqd$a;
-
shake
public int shake- Mappings:
Namespace Name Mixin selector named shake
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;shake:I
intermediary field_7574
Lnet/minecraft/class_1665;field_7574:I
official d
Lcqd;d:I
-
life
private int life- Mappings:
Namespace Name Mixin selector named life
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;life:I
intermediary field_7578
Lnet/minecraft/class_1665;field_7578:I
official l
Lcqd;l:I
-
damage
private double damage- Mappings:
Namespace Name Mixin selector named damage
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;damage:D
intermediary field_7571
Lnet/minecraft/class_1665;field_7571:D
official m
Lcqd;m:D
-
sound
- Mappings:
Namespace Name Mixin selector named sound
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;sound:Lnet/minecraft/sound/SoundEvent;
intermediary field_7584
Lnet/minecraft/class_1665;field_7584:Lnet/minecraft/class_3414;
official n
Lcqd;n:Laxe;
-
piercedEntities
- Mappings:
Namespace Name Mixin selector named piercedEntities
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;piercedEntities:Lit/unimi/dsi/fastutil/ints/IntOpenHashSet;
intermediary field_7590
Lnet/minecraft/class_1665;field_7590:Lit/unimi/dsi/fastutil/ints/IntOpenHashSet;
official o
Lcqd;o:Lit/unimi/dsi/fastutil/ints/IntOpenHashSet;
-
piercingKilledEntities
- Mappings:
Namespace Name Mixin selector named piercingKilledEntities
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;piercingKilledEntities:Ljava/util/List;
intermediary field_7579
Lnet/minecraft/class_1665;field_7579:Ljava/util/List;
official p
Lcqd;p:Ljava/util/List;
-
stack
- Mappings:
Namespace Name Mixin selector named stack
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;stack:Lnet/minecraft/item/ItemStack;
intermediary field_46970
Lnet/minecraft/class_1665;field_46970:Lnet/minecraft/class_1799;
official q
Lcqd;q:Lcxo;
-
weapon
- Mappings:
Namespace Name Mixin selector named weapon
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;weapon:Lnet/minecraft/item/ItemStack;
intermediary field_51620
Lnet/minecraft/class_1665;field_51620:Lnet/minecraft/class_1799;
official r
Lcqd;r:Lcxo;
-
-
Constructor Details
-
PersistentProjectileEntity
protected PersistentProjectileEntity(EntityType<? extends PersistentProjectileEntity> type, World world) - Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/entity/Entity;<init>(Lnet/minecraft/entity/EntityType;Lnet/minecraft/world/World;)V
intermediary <init>
Lnet/minecraft/class_1297;<init>(Lnet/minecraft/class_1299;Lnet/minecraft/class_1937;)V
official <init>
Lbvj;<init>(Lbvq;Ldhh;)V
-
PersistentProjectileEntity
protected PersistentProjectileEntity(EntityType<? extends PersistentProjectileEntity> type, double x, double y, double z, World world, ItemStack stack, @Nullable @Nullable ItemStack weapon) - Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;<init>(Lnet/minecraft/entity/EntityType;DDDLnet/minecraft/world/World;Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;)V
intermediary <init>
Lnet/minecraft/class_1665;<init>(Lnet/minecraft/class_1299;DDDLnet/minecraft/class_1937;Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;)V
official <init>
Lcqd;<init>(Lbvq;DDDLdhh;Lcxo;Lcxo;)V
-
PersistentProjectileEntity
protected PersistentProjectileEntity(EntityType<? extends PersistentProjectileEntity> type, LivingEntity owner, World world, ItemStack stack, @Nullable @Nullable ItemStack shotFrom) - Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;<init>(Lnet/minecraft/entity/EntityType;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/world/World;Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;)V
intermediary <init>
Lnet/minecraft/class_1665;<init>(Lnet/minecraft/class_1299;Lnet/minecraft/class_1309;Lnet/minecraft/class_1937;Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;)V
official <init>
Lcqd;<init>(Lbvq;Lbwf;Ldhh;Lcxo;Lcxo;)V
-
-
Method Details
-
setSound
- Mappings:
Namespace Name Mixin selector named setSound
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;setSound(Lnet/minecraft/sound/SoundEvent;)V
intermediary method_7444
Lnet/minecraft/class_1665;method_7444(Lnet/minecraft/class_3414;)V
official b
Lcqd;b(Laxe;)V
-
shouldRender
public boolean shouldRender(double distance) - Overrides:
shouldRender
in classEntity
- Mappings:
Namespace Name Mixin selector named shouldRender
Lnet/minecraft/entity/Entity;shouldRender(D)Z
intermediary method_5640
Lnet/minecraft/class_1297;method_5640(D)Z
official a
Lbvj;a(D)Z
-
initDataTracker
Initializes data tracker.- Specified by:
initDataTracker
in classEntity
- API Note:
- Subclasses should override this and add to the builder any data that needs to be tracked.
- Mappings:
Namespace Name Mixin selector named initDataTracker
Lnet/minecraft/entity/Entity;initDataTracker(Lnet/minecraft/entity/data/DataTracker$Builder;)V
intermediary method_5693
Lnet/minecraft/class_1297;method_5693(Lnet/minecraft/class_2945$class_9222;)V
official a
Lbvj;a(Lalg$a;)V
-
setVelocity
public void setVelocity(double x, double y, double z, float power, float uncertainty) Sets velocity and updates rotation accordingly.The velocity and rotation will be set to the same direction.
The direction is calculated as follows: Based on the direction vector
(x, y, z)
, a random vector is added, then multiplied by thespeed
.- Overrides:
setVelocity
in classProjectileEntity
- Parameters:
x
- the X component of the direction vectory
- the Y component of the direction vectorz
- the Z component of the direction vectorpower
- the speeduncertainty
- the fuzziness added to the direction; player usages have 1.0 and other mobs/tools have higher values; some mobs have difficulty-adjusted values- Mappings:
Namespace Name Mixin selector named setVelocity
Lnet/minecraft/entity/projectile/ProjectileEntity;setVelocity(DDDFF)V
intermediary method_7485
Lnet/minecraft/class_1676;method_7485(DDDFF)V
official c
Lcqp;c(DDDFF)V
-
updateTrackedPositionAndAngles
public void updateTrackedPositionAndAngles(double x, double y, double z, float yaw, float pitch, int interpolationSteps) - Overrides:
updateTrackedPositionAndAngles
in classEntity
- Mappings:
Namespace Name Mixin selector named updateTrackedPositionAndAngles
Lnet/minecraft/entity/Entity;updateTrackedPositionAndAngles(DDDFFI)V
intermediary method_5759
Lnet/minecraft/class_1297;method_5759(DDDFFI)V
official a
Lbvj;a(DDDFFI)V
-
setVelocityClient
public void setVelocityClient(double x, double y, double z) - Overrides:
setVelocityClient
in classProjectileEntity
- Mappings:
Namespace Name Mixin selector named setVelocityClient
Lnet/minecraft/entity/Entity;setVelocityClient(DDD)V
intermediary method_5750
Lnet/minecraft/class_1297;method_5750(DDD)V
official l
Lbvj;l(DDD)V
-
onTrackedDataSet
Called on the client when the tracked data is set.This can be overridden to refresh other fields when the tracked data is set or changed.
- Specified by:
onTrackedDataSet
in interfaceDataTracked
- Overrides:
onTrackedDataSet
in classEntity
- Mappings:
Namespace Name Mixin selector named onTrackedDataSet
Lnet/minecraft/entity/data/DataTracked;onTrackedDataSet(Lnet/minecraft/entity/data/TrackedData;)V
intermediary method_5674
Lnet/minecraft/class_9221;method_5674(Lnet/minecraft/class_2940;)V
official a
Lalf;a(Lalc;)V
-
tick
public void tick()Ticks this entity.- Overrides:
tick
in classProjectileEntity
- See Also:
- API Note:
- This can be overridden to add additional logics.
super.tick();
should be called in those cases. - Implementation Note:
- By default, this delegates all logics to
Entity.baseTick()
. - Mappings:
Namespace Name Mixin selector named tick
Lnet/minecraft/entity/Entity;tick()V
intermediary method_5773
Lnet/minecraft/class_1297;method_5773()V
official h
Lbvj;h()V
-
applyCollision
- Mappings:
Namespace Name Mixin selector named applyCollision
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;applyCollision(Lnet/minecraft/util/hit/BlockHitResult;)V
intermediary method_63670
Lnet/minecraft/class_1665;method_63670(Lnet/minecraft/class_3965;)V
official b
Lcqd;b(Lfbt;)V
-
applyDrag
private void applyDrag()- Mappings:
Namespace Name Mixin selector named applyDrag
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;applyDrag()V
intermediary method_63669
Lnet/minecraft/class_1665;method_63669()V
official D
Lcqd;D()V
-
spawnBubbleParticles
- Mappings:
Namespace Name Mixin selector named spawnBubbleParticles
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;spawnBubbleParticles(Lnet/minecraft/util/math/Vec3d;)V
intermediary method_64646
Lnet/minecraft/class_1665;method_64646(Lnet/minecraft/class_243;)V
official a
Lcqd;a(Lfbx;)V
-
getGravity
protected double getGravity()- Overrides:
getGravity
in classEntity
- Mappings:
Namespace Name Mixin selector named getGravity
Lnet/minecraft/entity/Entity;getGravity()D
intermediary method_7490
Lnet/minecraft/class_1297;method_7490()D
official bd
Lbvj;bd()D
-
shouldFall
private boolean shouldFall()- Mappings:
Namespace Name Mixin selector named shouldFall
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;shouldFall()Z
intermediary method_26351
Lnet/minecraft/class_1665;method_26351()Z
official G
Lcqd;G()Z
-
fall
private void fall()- Mappings:
Namespace Name Mixin selector named fall
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;fall()V
intermediary method_26352
Lnet/minecraft/class_1665;method_26352()V
official H
Lcqd;H()V
-
isInGround
protected boolean isInGround()- Mappings:
Namespace Name Mixin selector named isInGround
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;isInGround()Z
intermediary method_65059
Lnet/minecraft/class_1665;method_65059()Z
official l
Lcqd;l()Z
-
setInGround
protected void setInGround(boolean inGround) - Mappings:
Namespace Name Mixin selector named setInGround
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;setInGround(Z)V
intermediary method_65058
Lnet/minecraft/class_1665;method_65058(Z)V
official a
Lcqd;a(Z)V
-
move
- Overrides:
move
in classEntity
- Mappings:
Namespace Name Mixin selector named move
Lnet/minecraft/entity/Entity;move(Lnet/minecraft/entity/MovementType;Lnet/minecraft/util/math/Vec3d;)V
intermediary method_5784
Lnet/minecraft/class_1297;method_5784(Lnet/minecraft/class_1313;Lnet/minecraft/class_243;)V
official a
Lbvj;a(Lbwj;Lfbx;)V
-
age
protected void age()- Mappings:
Namespace Name Mixin selector named age
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;age()V
intermediary method_7446
Lnet/minecraft/class_1665;method_7446()V
official m
Lcqd;m()V
-
clearPiercingStatus
private void clearPiercingStatus()- Mappings:
Namespace Name Mixin selector named clearPiercingStatus
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;clearPiercingStatus()V
intermediary method_7453
Lnet/minecraft/class_1665;method_7453()V
official I
Lcqd;I()V
-
onBroken
- Overrides:
onBroken
in classProjectileEntity
- Mappings:
Namespace Name Mixin selector named onBroken
Lnet/minecraft/entity/projectile/ProjectileEntity;onBroken(Lnet/minecraft/item/Item;)V
intermediary method_61544
Lnet/minecraft/class_1676;method_61544(Lnet/minecraft/class_1792;)V
official b
Lcqp;b(Lcxk;)V
-
onEntityHit
- Overrides:
onEntityHit
in classProjectileEntity
- Mappings:
Namespace Name Mixin selector named onEntityHit
Lnet/minecraft/entity/projectile/ProjectileEntity;onEntityHit(Lnet/minecraft/util/hit/EntityHitResult;)V
intermediary method_7454
Lnet/minecraft/class_1676;method_7454(Lnet/minecraft/class_3966;)V
official a
Lcqp;a(Lfbu;)V
-
knockback
- Mappings:
Namespace Name Mixin selector named knockback
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;knockback(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/damage/DamageSource;)V
intermediary method_59957
Lnet/minecraft/class_1665;method_59957(Lnet/minecraft/class_1309;Lnet/minecraft/class_1282;)V
official a
Lcqd;a(Lbwf;Lbtz;)V
-
onBlockHit
- Overrides:
onBlockHit
in classProjectileEntity
- Mappings:
Namespace Name Mixin selector named onBlockHit
Lnet/minecraft/entity/projectile/ProjectileEntity;onBlockHit(Lnet/minecraft/util/hit/BlockHitResult;)V
intermediary method_24920
Lnet/minecraft/class_1676;method_24920(Lnet/minecraft/class_3965;)V
official a
Lcqp;a(Lfbt;)V
-
onBlockHitEnchantmentEffects
protected void onBlockHitEnchantmentEffects(ServerWorld world, BlockHitResult blockHitResult, ItemStack weaponStack) - Mappings:
Namespace Name Mixin selector named onBlockHitEnchantmentEffects
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;onBlockHitEnchantmentEffects(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/hit/BlockHitResult;Lnet/minecraft/item/ItemStack;)V
intermediary method_59956
Lnet/minecraft/class_1665;method_59956(Lnet/minecraft/class_3218;Lnet/minecraft/class_3965;Lnet/minecraft/class_1799;)V
official a
Lcqd;a(Lash;Lfbt;Lcxo;)V
-
getWeaponStack
- Overrides:
getWeaponStack
in classEntity
- Mappings:
Namespace Name Mixin selector named getWeaponStack
Lnet/minecraft/entity/Entity;getWeaponStack()Lnet/minecraft/item/ItemStack;
intermediary method_59958
Lnet/minecraft/class_1297;method_59958()Lnet/minecraft/class_1799;
official ea
Lbvj;ea()Lcxo;
-
getHitSound
- Mappings:
Namespace Name Mixin selector named getHitSound
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;getHitSound()Lnet/minecraft/sound/SoundEvent;
intermediary method_7440
Lnet/minecraft/class_1665;method_7440()Lnet/minecraft/class_3414;
official s
Lcqd;s()Laxe;
-
getSound
- Mappings:
Namespace Name Mixin selector named getSound
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;getSound()Lnet/minecraft/sound/SoundEvent;
intermediary method_20011
Lnet/minecraft/class_1665;method_20011()Lnet/minecraft/class_3414;
official t
Lcqd;t()Laxe;
-
onHit
- Mappings:
Namespace Name Mixin selector named onHit
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;onHit(Lnet/minecraft/entity/LivingEntity;)V
intermediary method_7450
Lnet/minecraft/class_1665;method_7450(Lnet/minecraft/class_1309;)V
official a
Lcqd;a(Lbwf;)V
-
getEntityCollision
@Nullable protected @Nullable EntityHitResult getEntityCollision(Vec3d currentPosition, Vec3d nextPosition) - Mappings:
Namespace Name Mixin selector named getEntityCollision
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;getEntityCollision(Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/math/Vec3d;)Lnet/minecraft/util/hit/EntityHitResult;
intermediary method_7434
Lnet/minecraft/class_1665;method_7434(Lnet/minecraft/class_243;Lnet/minecraft/class_243;)Lnet/minecraft/class_3966;
official c
Lcqd;c(Lfbx;Lfbx;)Lfbu;
-
canHit
- Overrides:
canHit
in classProjectileEntity
- Mappings:
Namespace Name Mixin selector named canHit
Lnet/minecraft/entity/projectile/ProjectileEntity;canHit(Lnet/minecraft/entity/Entity;)Z
intermediary method_26958
Lnet/minecraft/class_1676;method_26958(Lnet/minecraft/class_1297;)Z
official b
Lcqp;b(Lbvj;)Z
-
writeCustomDataToNbt
Writes custom data tonbt
. Subclasses have to implement this.NBT is a storage format; therefore, a data from NBT is loaded to an entity instance's fields, which are used for other operations instead of the NBT. The data is written back to NBT when saving the entity.
- Overrides:
writeCustomDataToNbt
in classProjectileEntity
- See Also:
- Mappings:
Namespace Name Mixin selector named writeCustomDataToNbt
Lnet/minecraft/entity/Entity;writeCustomDataToNbt(Lnet/minecraft/nbt/NbtCompound;)V
intermediary method_5652
Lnet/minecraft/class_1297;method_5652(Lnet/minecraft/class_2487;)V
official b
Lbvj;b(Lux;)V
-
readCustomDataFromNbt
Reads custom data fromnbt
. Subclasses have to implement this.NBT is a storage format; therefore, a data from NBT is loaded to an entity instance's fields, which are used for other operations instead of the NBT. The data is written back to NBT when saving the entity.
nbt
might not have all expected keys, or might have a key whose value does not meet the requirement (such as the type or the range). This method should fall back to a reasonable default value instead of throwing an exception.- Overrides:
readCustomDataFromNbt
in classProjectileEntity
- See Also:
- Mappings:
Namespace Name Mixin selector named readCustomDataFromNbt
Lnet/minecraft/entity/Entity;readCustomDataFromNbt(Lnet/minecraft/nbt/NbtCompound;)V
intermediary method_5749
Lnet/minecraft/class_1297;method_5749(Lnet/minecraft/class_2487;)V
official a
Lbvj;a(Lux;)V
-
setOwner
- Overrides:
setOwner
in classProjectileEntity
- Mappings:
Namespace Name Mixin selector named setOwner
Lnet/minecraft/entity/projectile/ProjectileEntity;setOwner(Lnet/minecraft/entity/Entity;)V
intermediary method_7432
Lnet/minecraft/class_1676;method_7432(Lnet/minecraft/class_1297;)V
official c
Lcqp;c(Lbvj;)V
-
onPlayerCollision
Called when a player collides with the entity. Does nothing by default.This should be overridden if the collision logic is specific to players, such as picking up item entities, experience orbs, or arrows.
- Overrides:
onPlayerCollision
in classEntity
- Mappings:
Namespace Name Mixin selector named onPlayerCollision
Lnet/minecraft/entity/Entity;onPlayerCollision(Lnet/minecraft/entity/player/PlayerEntity;)V
intermediary method_5694
Lnet/minecraft/class_1297;method_5694(Lnet/minecraft/class_1657;)V
official a_
Lbvj;a_(Lcpw;)V
-
tryPickup
- Mappings:
Namespace Name Mixin selector named tryPickup
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;tryPickup(Lnet/minecraft/entity/player/PlayerEntity;)Z
intermediary method_34713
Lnet/minecraft/class_1665;method_34713(Lnet/minecraft/class_1657;)Z
official a
Lcqd;a(Lcpw;)Z
-
asItemStack
- Mappings:
Namespace Name Mixin selector named asItemStack
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;asItemStack()Lnet/minecraft/item/ItemStack;
intermediary method_7445
Lnet/minecraft/class_1665;method_7445()Lnet/minecraft/class_1799;
official u
Lcqd;u()Lcxo;
-
getDefaultItemStack
- Mappings:
Namespace Name Mixin selector named getDefaultItemStack
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;getDefaultItemStack()Lnet/minecraft/item/ItemStack;
intermediary method_57314
Lnet/minecraft/class_1665;method_57314()Lnet/minecraft/class_1799;
official v
Lcqd;v()Lcxo;
-
getMoveEffect
Returns the possible effect(s) of an entity moving.- Overrides:
getMoveEffect
in classEntity
- Implementation Note:
- If an entity does not emit game events or play move sounds, this method should be overridden as returning a value other than ALL allows skipping some movement logic and boost ticking performance.
- Mappings:
Namespace Name Mixin selector named getMoveEffect
Lnet/minecraft/entity/Entity;getMoveEffect()Lnet/minecraft/entity/Entity$MoveEffect;
intermediary method_33570
Lnet/minecraft/class_1297;method_33570()Lnet/minecraft/class_1297$class_5799;
official bg
Lbvj;bg()Lbvj$c;
-
getItemStack
Returns the read-only item stack representing the projectile.This is the original stack used to spawn the projectile.
asItemStack()
returns a copy of that stack which can be safely changed. Additionally,asItemStack()
reflects changes to the entity data, such as custom potion ID.- Returns:
- the read-only item stack representing the projectile
- Mappings:
Namespace Name Mixin selector named getItemStack
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;getItemStack()Lnet/minecraft/item/ItemStack;
intermediary method_54759
Lnet/minecraft/class_1665;method_54759()Lnet/minecraft/class_1799;
official w
Lcqd;w()Lcxo;
-
setDamage
public void setDamage(double damage) - Mappings:
Namespace Name Mixin selector named setDamage
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;setDamage(D)V
intermediary method_7438
Lnet/minecraft/class_1665;method_7438(D)V
official h
Lcqd;h(D)V
-
getDamage
public double getDamage()- Mappings:
Namespace Name Mixin selector named getDamage
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;getDamage()D
intermediary method_7448
Lnet/minecraft/class_1665;method_7448()D
official x
Lcqd;x()D
-
isAttackable
public boolean isAttackable()Returns whether the entity can be attacked by players.Note that this is not called for most entities defined in vanilla as unattackable (such as
ItemEntity
andExperienceOrbEntity
) as trying to attack them kicks the player.- Overrides:
isAttackable
in classEntity
- Returns:
- whether the entity can be attacked by players
- See Also:
- Mappings:
Namespace Name Mixin selector named isAttackable
Lnet/minecraft/entity/Entity;isAttackable()Z
intermediary method_5732
Lnet/minecraft/class_1297;method_5732()Z
official cB
Lbvj;cB()Z
-
setCritical
public void setCritical(boolean critical) - Mappings:
Namespace Name Mixin selector named setCritical
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;setCritical(Z)V
intermediary method_7439
Lnet/minecraft/class_1665;method_7439(Z)V
official b
Lcqd;b(Z)V
-
setPierceLevel
private void setPierceLevel(byte level) - Mappings:
Namespace Name Mixin selector named setPierceLevel
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;setPierceLevel(B)V
intermediary method_7451
Lnet/minecraft/class_1665;method_7451(B)V
official a
Lcqd;a(B)V
-
setProjectileFlag
private void setProjectileFlag(int index, boolean flag) - Mappings:
Namespace Name Mixin selector named setProjectileFlag
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;setProjectileFlag(IZ)V
intermediary method_7455
Lnet/minecraft/class_1665;method_7455(IZ)V
official a
Lcqd;a(IZ)V
-
setStack
- Mappings:
Namespace Name Mixin selector named setStack
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;setStack(Lnet/minecraft/item/ItemStack;)V
intermediary method_57313
Lnet/minecraft/class_1665;method_57313(Lnet/minecraft/class_1799;)V
official a
Lcqd;a(Lcxo;)V
-
isCritical
public boolean isCritical()- Mappings:
Namespace Name Mixin selector named isCritical
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;isCritical()Z
intermediary method_7443
Lnet/minecraft/class_1665;method_7443()Z
official y
Lcqd;y()Z
-
getPierceLevel
public byte getPierceLevel()- Mappings:
Namespace Name Mixin selector named getPierceLevel
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;getPierceLevel()B
intermediary method_7447
Lnet/minecraft/class_1665;method_7447()B
official z
Lcqd;z()B
-
applyDamageModifier
public void applyDamageModifier(float damageModifier) - Mappings:
Namespace Name Mixin selector named applyDamageModifier
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;applyDamageModifier(F)V
intermediary method_59955
Lnet/minecraft/class_1665;method_59955(F)V
official a
Lcqd;a(F)V
-
getDragInWater
protected float getDragInWater()- Mappings:
Namespace Name Mixin selector named getDragInWater
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;getDragInWater()F
intermediary method_7436
Lnet/minecraft/class_1665;method_7436()F
official A
Lcqd;A()F
-
setNoClip
public void setNoClip(boolean noClip) - Mappings:
Namespace Name Mixin selector named setNoClip
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;setNoClip(Z)V
intermediary method_7433
Lnet/minecraft/class_1665;method_7433(Z)V
official r
Lcqd;r(Z)V
-
isNoClip
public boolean isNoClip()- Mappings:
Namespace Name Mixin selector named isNoClip
Lnet/minecraft/entity/projectile/PersistentProjectileEntity;isNoClip()Z
intermediary method_7441
Lnet/minecraft/class_1665;method_7441()Z
official B
Lcqd;B()Z
-
canHit
public boolean canHit()Returns whether the entity can be hit with a projectile or be targeted by the player crosshair.- Overrides:
canHit
in classProjectileEntity
- Returns:
- whether the entity can be hit with a projectile or be targeted by the player crosshair
- Mappings:
Namespace Name Mixin selector named canHit
Lnet/minecraft/entity/Entity;canHit()Z
intermediary method_5863
Lnet/minecraft/class_1297;method_5863()Z
official bH
Lbvj;bH()Z
-
getStackReference
Obtains a stack reference to be modified. Used by commands like/loot
or/item
.- Overrides:
getStackReference
in classEntity
- Parameters:
mappedIndex
- the mapped index as given by the item slot argument- See Also:
- Mappings:
Namespace Name Mixin selector named getStackReference
Lnet/minecraft/entity/Entity;getStackReference(I)Lnet/minecraft/inventory/StackReference;
intermediary method_32318
Lnet/minecraft/class_1297;method_32318(I)Lnet/minecraft/class_5630;
official a_
Lbvj;a_(I)Lbwx;
-
deflectsAgainstWorldBorder
protected boolean deflectsAgainstWorldBorder()- Overrides:
deflectsAgainstWorldBorder
in classProjectileEntity
- Mappings:
Namespace Name Mixin selector named deflectsAgainstWorldBorder
Lnet/minecraft/entity/projectile/ProjectileEntity;deflectsAgainstWorldBorder()Z
intermediary method_62823
Lnet/minecraft/class_1676;method_62823()Z
official C
Lcqp;C()Z
-