Package net.minecraft.entity.projectile
Class ProjectileEntity
java.lang.Object
net.minecraft.entity.Entity
net.minecraft.entity.projectile.ProjectileEntity
- All Implemented Interfaces:
CommandOutput
,Nameable
,EntityLike
- Direct Known Subclasses:
ExplosiveProjectileEntity
,FireworkRocketEntity
,FishingBobberEntity
,LlamaSpitEntity
,PersistentProjectileEntity
,ShulkerBulletEntity
,ThrownEntity
- Mappings:
Namespace Name official btx
intermediary net/minecraft/class_1676
named net/minecraft/entity/projectile/ProjectileEntity
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.entity.Entity
Entity.MoveEffect, Entity.PositionUpdater, Entity.RemovalReason
-
Field Summary
Modifier and TypeFieldDescriptionprivate boolean
private boolean
Fields inherited from class net.minecraft.entity.Entity
age, collidedSoftly, dataTracker, DEFAULT_FRICTION, DEFAULT_MIN_FREEZE_DAMAGE_TICKS, DEFAULT_PORTAL_COOLDOWN, distanceTraveled, FALL_FLYING_FLAG_INDEX, fallDistance, field_29991, field_36331, firstUpdate, FLAGS, fluidHeight, FREEZING_DAMAGE_INTERVAL, GLOWING_FLAG_INDEX, horizontalCollision, horizontalSpeed, ID_KEY, ignoreCameraFrustum, inNetherPortal, inPowderSnow, intersectionChecked, lastNetherPortalPosition, lastRenderX, lastRenderY, lastRenderZ, MAX_RIDING_COOLDOWN, MAX_SCOREBOARD_TAGS, MIN_RISING_BUBBLE_COLUMN_SPEED, movementMultiplier, netherPortalTime, noClip, ON_FIRE_FLAG_INDEX, onGround, PASSENGERS_KEY, POSE, prevHorizontalSpeed, prevPitch, prevX, prevY, prevYaw, prevZ, random, ridingCooldown, speed, stepHeight, submergedInWater, timeUntilRegen, touchingWater, uuid, UUID_KEY, uuidString, VELOCITY_AFFECTING_POS_Y_OFFSET, velocityDirty, velocityModified, verticalCollision, wasInPowderSnow, wasOnFire, world
Fields inherited from interface net.minecraft.server.command.CommandOutput
DUMMY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
canModifyAt
(World world, BlockPos pos) Packet<?>
Returns the cause entity of any effect applied by this projectile.getOwner()
protected boolean
protected void
onBlockHit
(BlockHitResult blockHitResult) protected void
onCollision
(HitResult hitResult) protected void
onEntityHit
(EntityHitResult entityHitResult) void
onSpawnPacket
(EntitySpawnS2CPacket packet) protected void
void
void
setVelocity
(double x, double y, double z, float speed, float divergence) Sets velocity and updates rotation accordingly.void
setVelocity
(Entity shooter, float pitch, float yaw, float roll, float speed, float divergence) Sets velocity and updates rotation accordingly.void
setVelocityClient
(double x, double y, double z) private boolean
void
tick()
protected void
protected static float
updateRotation
(float prevRot, float newRot) protected void
Methods inherited from class net.minecraft.entity.Entity
addAirTravelEffects, addFlapEffects, addPassenger, addScoreboardTag, addVelocity, adjustMovementForCollisions, adjustMovementForPiston, adjustMovementForSneaking, animateDamage, applyDamageEffects, applyMirror, applyRotation, asMessageSender, attemptTickInVoid, baseTick, bypassesLandingEffects, bypassesSteppingEffects, calculateBoundingBox, calculateBoundsForPose, calculateDimensions, calculateNextStepSoundDistance, canAddPassenger, canAvoidTraps, canBeRiddenInWater, canBeSpectated, canExplosionDestroyBlock, canFreeze, canStartRiding, canUsePortals, changeLookDirection, checkBlockCollision, checkDespawn, collides, collidesWith, collidesWithStateAtPos, copyFrom, copyPositionAndRotation, damage, detach, discard, dismountVehicle, distanceTo, doesNotCollide, doesRenderOnFire, dropItem, dropItem, dropStack, dropStack, emitGameEvent, emitGameEvent, entityDataRequiresOperator, equals, equipStack, extinguish, fall, getAir, getArmorItems, getBlockPos, getBlockStateAtPos, getBlockX, getBlockY, getBlockZ, getBodyY, getBodyYaw, getBoundingBox, getBrightnessAtEyes, getBurningDuration, getCameraPosVec, getChunkPos, getClientCameraPosVec, getCommandSource, getCustomName, getDataTracker, getDefaultName, getDefaultNetherPortalCooldown, getDimensions, getDisplayName, getEffectiveExplosionResistance, getEntityName, getEntityWorld, getEventSource, getEyeHeight, getEyeHeight, getEyePos, getEyeY, getFireTicks, getFirstPassenger, getFlag, getFluidHeight, getFreezingScale, getFrozenTicks, getHandPosOffset, getHeadYaw, getHeight, getHeightOffset, getHighSpeedSplashSound, getHorizontalFacing, getHoverEvent, getId, getItemsEquipped, getItemsHand, getJumpVelocityMultiplier, getLandingBlockState, getLandingPos, getLeashOffset, getLeashPos, getLerpedPos, getMaxAir, getMaxNetherPortalTime, getMinFreezeDamageTicks, getMountedHeightOffset, getMoveEffect, getMovementDirection, getName, getOppositeRotationVector, getOppositeRotationVector, getParticleX, getParticleZ, getPassengerDismountOffset, getPassengerList, getPassengersDeep, getPermissionLevel, getPickBlockStack, getPistonBehavior, getPitch, getPitch, getPortalRect, getPos, getPose, getPrimaryPassenger, getRandomBodyY, getRemovalReason, getRenderDistanceMultiplier, getRootVehicle, getRotationClient, getRotationVec, getRotationVecClient, getRotationVector, getRotationVector, getSafeFallDistance, getSavedEntityId, getScoreboardTags, getScoreboardTeam, getServer, getSoundCategory, getSplashSound, getStackReference, getStandingEyeHeight, getSteppingBlockState, getSteppingPos, getSwimHeight, getSwimSound, getSyncedPos, getTargetingMargin, getTeamColorValue, getTeleportTarget, getTrackedPosition, getType, getUuid, getUuidAsString, getVehicle, getVelocity, getVelocityAffectingPos, getVelocityMultiplier, getVisibilityBoundingBox, getWidth, getWorld, getX, getY, getYaw, getYaw, getZ, handleAttack, handleFallDamage, handleStatus, hasCollidedSoftly, hasCustomName, hashCode, hasNetherPortalCooldown, hasNoGravity, hasPassenger, hasPassengerDeep, hasPassengers, hasPassengerType, hasPermissionLevel, hasPlayerRider, hasPrimaryPassenger, hasVehicle, hasWings, initDataTracker, interact, interactAt, isAlive, isAttackable, isCollidable, isConnectedThroughVehicle, isCustomNameVisible, isDescending, isFireImmune, isFrozen, isGlowing, isGlowingLocal, isImmuneToExplosion, isInLava, isInPose, isInRange, isInRange, isInsideWall, isInsideWaterOrBubbleColumn, isInSneakingPose, isInSwimmingPose, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableTo, isLiving, isLogicalSideForUpdatingMovement, isOnFire, isOnGround, isPartOf, isPlayer, isPushable, isPushedByFluids, isRegionUnloaded, isRemoved, isSilent, isSneaking, isSneaky, isSpectator, isSprinting, isSubmergedIn, isSubmergedInWater, isSwimming, isTeammate, isTeamPlayer, isTouchingWater, isTouchingWaterOrRain, isWet, kill, lookAt, move, moveToWorld, occludeVibrationSignals, offsetX, offsetZ, onBlockCollision, onBubbleColumnCollision, onBubbleColumnSurfaceCollision, onKilledOther, onLanding, onPassengerLookAround, onPlayerCollision, onRemoved, onStartedTrackingBy, onStoppedTrackingBy, onStruckByLightning, onSwimmingStart, onTrackedDataSet, playExtinguishSound, playSound, playSoundIfNotSilent, playStepSound, playSwimSound, populateCrashReport, positionInPortal, pushAwayFrom, pushOutOfBlocks, raycast, readNbt, refreshPosition, refreshPositionAfterTeleport, refreshPositionAfterTeleport, refreshPositionAndAngles, refreshPositionAndAngles, remove, removeAllPassengers, removeFromDimension, removePassenger, removeScoreboardTag, requestTeleport, requestTeleportAndDismount, resetNetherPortalCooldown, resetPosition, saveNbt, saveSelfNbt, scheduleVelocityUpdate, sendMessage, setAir, setBodyYaw, setBoundingBox, setChangeListener, setCustomName, setCustomNameVisible, setFireTicks, setFlag, setFrozenTicks, setGlowing, setHeadYaw, setId, setInNetherPortal, setInPowderSnow, setInvisible, setInvulnerable, setNoGravity, setOnFire, setOnFireFor, setOnFireFromLava, setOnGround, setPitch, setPos, setPose, setPosition, setPosition, setRemoved, setRenderDistanceMultiplier, setRotation, setSilent, setSneaking, setSprinting, setSwimming, setUuid, setVelocity, setVelocity, setYaw, shouldBroadcastConsoleToOps, shouldEscapePowderSnow, shouldLeaveSwimmingPose, shouldReceiveFeedback, shouldRender, shouldRender, shouldRenderName, shouldSave, shouldSetPositionOnLoad, shouldSpawnSprintingParticles, shouldTrackOutput, slowMovement, spawnSprintingParticles, squaredDistanceTo, squaredDistanceTo, squaredDistanceTo, startRiding, startRiding, stopRiding, streamPassengersAndSelf, streamSelfAndPassengers, teleport, tickInVoid, tickNetherPortal, tickNetherPortalCooldown, tickRiding, toNbtList, toNbtList, toString, tryCheckBlockCollision, unsetRemoved, updateEventHandler, updateKilledAdvancementCriterion, updateMovementInFluid, updatePassengerForDismount, updatePassengerPosition, updatePosition, updatePositionAndAngles, updateSwimming, updateTrackedHeadRotation, updateTrackedPosition, updateTrackedPositionAndAngles, updateVelocity, updateWaterState, wouldPoseNotCollide, writeNbt
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.server.command.CommandOutput
cannotBeSilenced
-
Field Details
-
ownerUuid
- Mappings:
Namespace Name Mixin selector official b
Lbtx;b:Ljava/util/UUID;
intermediary field_22478
Lnet/minecraft/class_1676;field_22478:Ljava/util/UUID;
named ownerUuid
Lnet/minecraft/entity/projectile/ProjectileEntity;ownerUuid:Ljava/util/UUID;
-
owner
- Mappings:
Namespace Name Mixin selector official c
Lbtx;c:Lbaq;
intermediary field_33399
Lnet/minecraft/class_1676;field_33399:Lnet/minecraft/class_1297;
named owner
Lnet/minecraft/entity/projectile/ProjectileEntity;owner:Lnet/minecraft/entity/Entity;
-
leftOwner
private boolean leftOwner- Mappings:
Namespace Name Mixin selector official d
Lbtx;d:Z
intermediary field_23740
Lnet/minecraft/class_1676;field_23740:Z
named leftOwner
Lnet/minecraft/entity/projectile/ProjectileEntity;leftOwner:Z
-
shot
private boolean shot- Mappings:
Namespace Name Mixin selector official e
Lbtx;e:Z
intermediary field_28646
Lnet/minecraft/class_1676;field_28646:Z
named shot
Lnet/minecraft/entity/projectile/ProjectileEntity;shot:Z
-
-
Constructor Details
-
ProjectileEntity
ProjectileEntity(EntityType<? extends ProjectileEntity> type, World world) - Mappings:
Namespace Name Mixin selector official <init>
Lbaq;<init>(Lbau;Lcga;)V
intermediary <init>
Lnet/minecraft/class_1297;<init>(Lnet/minecraft/class_1299;Lnet/minecraft/class_1937;)V
named <init>
Lnet/minecraft/entity/Entity;<init>(Lnet/minecraft/entity/EntityType;Lnet/minecraft/world/World;)V
-
-
Method Details
-
setOwner
- Mappings:
Namespace Name Mixin selector official b
Lbtx;b(Lbaq;)V
intermediary method_7432
Lnet/minecraft/class_1676;method_7432(Lnet/minecraft/class_1297;)V
named setOwner
Lnet/minecraft/entity/projectile/ProjectileEntity;setOwner(Lnet/minecraft/entity/Entity;)V
-
getOwner
- Mappings:
Namespace Name Mixin selector official x
Lbtx;x()Lbaq;
intermediary method_24921
Lnet/minecraft/class_1676;method_24921()Lnet/minecraft/class_1297;
named getOwner
Lnet/minecraft/entity/projectile/ProjectileEntity;getOwner()Lnet/minecraft/entity/Entity;
-
getEffectCause
Returns the cause entity of any effect applied by this projectile. If this projectile has an owner, the effect is attributed to the owner; otherwise, it is attributed to this projectile itself.- Returns:
- the cause entity of any effect applied by this projectile
- Mappings:
Namespace Name Mixin selector official y
Lbtx;y()Lbaq;
intermediary method_37225
Lnet/minecraft/class_1676;method_37225()Lnet/minecraft/class_1297;
named getEffectCause
Lnet/minecraft/entity/projectile/ProjectileEntity;getEffectCause()Lnet/minecraft/entity/Entity;
-
writeCustomDataToNbt
- Specified by:
writeCustomDataToNbt
in classEntity
- Mappings:
Namespace Name Mixin selector official b
Lbaq;b(Lpj;)V
intermediary method_5652
Lnet/minecraft/class_1297;method_5652(Lnet/minecraft/class_2487;)V
named writeCustomDataToNbt
Lnet/minecraft/entity/Entity;writeCustomDataToNbt(Lnet/minecraft/nbt/NbtCompound;)V
-
isOwner
- Mappings:
Namespace Name Mixin selector official d
Lbtx;d(Lbaq;)Z
intermediary method_34714
Lnet/minecraft/class_1676;method_34714(Lnet/minecraft/class_1297;)Z
named isOwner
Lnet/minecraft/entity/projectile/ProjectileEntity;isOwner(Lnet/minecraft/entity/Entity;)Z
-
readCustomDataFromNbt
- Specified by:
readCustomDataFromNbt
in classEntity
- Mappings:
Namespace Name Mixin selector official a
Lbaq;a(Lpj;)V
intermediary method_5749
Lnet/minecraft/class_1297;method_5749(Lnet/minecraft/class_2487;)V
named readCustomDataFromNbt
Lnet/minecraft/entity/Entity;readCustomDataFromNbt(Lnet/minecraft/nbt/NbtCompound;)V
-
tick
public void tick() -
shouldLeaveOwner
private boolean shouldLeaveOwner()- Mappings:
Namespace Name Mixin selector official i
Lbtx;i()Z
intermediary method_26961
Lnet/minecraft/class_1676;method_26961()Z
named shouldLeaveOwner
Lnet/minecraft/entity/projectile/ProjectileEntity;shouldLeaveOwner()Z
-
setVelocity
public void setVelocity(double x, double y, double z, float speed, float divergence) 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
.- Parameters:
x
- the X component of the direction vectory
- the Y component of the direction vectorz
- the Z component of the direction vectorspeed
- the speeddivergence
- 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 official c
Lbtx;c(DDDFF)V
intermediary method_7485
Lnet/minecraft/class_1676;method_7485(DDDFF)V
named setVelocity
Lnet/minecraft/entity/projectile/ProjectileEntity;setVelocity(DDDFF)V
-
setVelocity
public void setVelocity(Entity shooter, float pitch, float yaw, float roll, float speed, float divergence) Sets velocity and updates rotation accordingly.- Parameters:
shooter
- the entity who shot this projectile; used to add the shooter's velocity to this projectilepitch
- the pitchyaw
- the yawroll
- the rollspeed
- the speeddivergence
- 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 official a
Lbtx;a(Lbaq;FFFFF)V
intermediary method_24919
Lnet/minecraft/class_1676;method_24919(Lnet/minecraft/class_1297;FFFFF)V
named setVelocity
Lnet/minecraft/entity/projectile/ProjectileEntity;setVelocity(Lnet/minecraft/entity/Entity;FFFFF)V
-
onCollision
- Mappings:
Namespace Name Mixin selector official a
Lbtx;a(Ldvr;)V
intermediary method_7488
Lnet/minecraft/class_1676;method_7488(Lnet/minecraft/class_239;)V
named onCollision
Lnet/minecraft/entity/projectile/ProjectileEntity;onCollision(Lnet/minecraft/util/hit/HitResult;)V
-
onEntityHit
- Mappings:
Namespace Name Mixin selector official a
Lbtx;a(Ldvq;)V
intermediary method_7454
Lnet/minecraft/class_1676;method_7454(Lnet/minecraft/class_3966;)V
named onEntityHit
Lnet/minecraft/entity/projectile/ProjectileEntity;onEntityHit(Lnet/minecraft/util/hit/EntityHitResult;)V
-
onBlockHit
- Mappings:
Namespace Name Mixin selector official a
Lbtx;a(Ldvp;)V
intermediary method_24920
Lnet/minecraft/class_1676;method_24920(Lnet/minecraft/class_3965;)V
named onBlockHit
Lnet/minecraft/entity/projectile/ProjectileEntity;onBlockHit(Lnet/minecraft/util/hit/BlockHitResult;)V
-
setVelocityClient
public void setVelocityClient(double x, double y, double z) - Overrides:
setVelocityClient
in classEntity
- Mappings:
Namespace Name Mixin selector official k
Lbaq;k(DDD)V
intermediary method_5750
Lnet/minecraft/class_1297;method_5750(DDD)V
named setVelocityClient
Lnet/minecraft/entity/Entity;setVelocityClient(DDD)V
-
canHit
- Mappings:
Namespace Name Mixin selector official a
Lbtx;a(Lbaq;)Z
intermediary method_26958
Lnet/minecraft/class_1676;method_26958(Lnet/minecraft/class_1297;)Z
named canHit
Lnet/minecraft/entity/projectile/ProjectileEntity;canHit(Lnet/minecraft/entity/Entity;)Z
-
updateRotation
protected void updateRotation()- Mappings:
Namespace Name Mixin selector official z
Lbtx;z()V
intermediary method_26962
Lnet/minecraft/class_1676;method_26962()V
named updateRotation
Lnet/minecraft/entity/projectile/ProjectileEntity;updateRotation()V
-
updateRotation
protected static float updateRotation(float prevRot, float newRot) - Mappings:
Namespace Name Mixin selector official d
Lbtx;d(FF)F
intermediary method_26960
Lnet/minecraft/class_1676;method_26960(FF)F
named updateRotation
Lnet/minecraft/entity/projectile/ProjectileEntity;updateRotation(FF)F
-
createSpawnPacket
- Specified by:
createSpawnPacket
in classEntity
- Mappings:
Namespace Name Mixin selector official S
Lbaq;S()Lso;
intermediary method_18002
Lnet/minecraft/class_1297;method_18002()Lnet/minecraft/class_2596;
named createSpawnPacket
Lnet/minecraft/entity/Entity;createSpawnPacket()Lnet/minecraft/network/Packet;
-
onSpawnPacket
- Overrides:
onSpawnPacket
in classEntity
- Mappings:
Namespace Name Mixin selector official a
Lbaq;a(Lss;)V
intermediary method_31471
Lnet/minecraft/class_1297;method_31471(Lnet/minecraft/class_2604;)V
named onSpawnPacket
Lnet/minecraft/entity/Entity;onSpawnPacket(Lnet/minecraft/network/packet/s2c/play/EntitySpawnS2CPacket;)V
-
canModifyAt
- Overrides:
canModifyAt
in classEntity
- Mappings:
Namespace Name Mixin selector official a
Lbaq;a(Lcga;Lgt;)Z
intermediary method_36971
Lnet/minecraft/class_1297;method_36971(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)Z
named canModifyAt
Lnet/minecraft/entity/Entity;canModifyAt(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Z
-