Class ShulkerBulletEntity
- All Implemented Interfaces:
CommandOutput
,Nameable
,EntityLike
- Mappings:
Namespace Name official bxj
intermediary net/minecraft/class_1678
named net/minecraft/entity/projectile/ShulkerBulletEntity
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.entity.Entity
Entity.MoveEffect, Entity.PositionUpdater, Entity.RemovalReason
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final double
private int
private double
private double
private double
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
ConstructorDescriptionShulkerBulletEntity
(EntityType<? extends ShulkerBulletEntity> type, World world) ShulkerBulletEntity
(World world, LivingEntity owner, Entity target, Direction.Axis axis) -
Method Summary
Modifier and TypeMethodDescriptionboolean
canHit()
Returns whether the entity can be hit with a projectile or be targeted by the player crosshair.protected boolean
private void
void
Checks whether the entity should be despawned.boolean
damage
(DamageSource source, float amount) Applies a damage to this entity.float
Returns the sound category for sounds from this entity.protected void
Initializes data tracker.boolean
isOnFire()
Returns whether the entity is on fire and is not fire immune.protected void
onBlockHit
(BlockHitResult blockHitResult) protected void
onCollision
(HitResult hitResult) protected void
onEntityHit
(EntityHitResult entityHitResult) void
onSpawnPacket
(EntitySpawnS2CPacket packet) Called on the client when the entity receives a spawn packet.protected void
Reads custom data fromnbt
.private void
setDirection
(@Nullable Direction direction) boolean
shouldRender
(double distance) void
tick()
Ticks this entity.protected void
Writes custom data tonbt
.Methods inherited from class net.minecraft.entity.projectile.ProjectileEntity
canModifyAt, createSpawnPacket, getEffectCause, getOwner, isOwner, setOwner, setVelocity, setVelocity, setVelocityClient, updateRotation, updateRotation
Methods inherited from class net.minecraft.entity.Entity
addAirTravelEffects, addFlapEffects, addPassenger, addScoreboardTag, addVelocity, addVelocity, adjustMovementForCollisions, adjustMovementForPiston, adjustMovementForSneaking, animateDamage, applyDamageEffects, applyMirror, applyRotation, attemptTickInVoid, baseTick, bypassesLandingEffects, bypassesSteppingEffects, calculateBoundingBox, calculateBoundsForPose, calculateDimensions, calculateNextStepSoundDistance, canAddPassenger, canAvoidTraps, canBeRiddenInWater, canBeSpectated, canExplosionDestroyBlock, canFreeze, canStartRiding, canUsePortals, changeLookDirection, checkBlockCollision, collidesWith, collidesWithStateAtPos, copyFrom, copyPositionAndRotation, detach, discard, dismountVehicle, distanceTo, doesNotCollide, doesRenderOnFire, dropItem, dropItem, dropStack, dropStack, emitGameEvent, emitGameEvent, entityDataRequiresOperator, equals, equipStack, extinguish, extinguishWithSound, fall, getAir, getArmorItems, getBlockPos, getBlockStateAtPos, getBlockX, getBlockY, getBlockZ, getBodyY, getBodyYaw, getBoundingBox, getBurningDuration, getCameraPosVec, getChunkPos, getClientCameraPosVec, getCommandSource, getCustomName, getDataTracker, getDefaultName, getDefaultPortalCooldown, getDimensions, getDisplayName, getEffectiveExplosionResistance, getEntityName, getEntityWorld, getEyeHeight, getEyeHeight, getEyePos, getEyeY, getFireTicks, getFirstPassenger, getFlag, getFluidHeight, getFreezingScale, getFrozenTicks, getHandItems, getHandPosOffset, getHeadYaw, getHeight, getHeightOffset, getHighSpeedSplashSound, getHorizontalFacing, getHoverEvent, getId, getItemsEquipped, getJumpVelocityMultiplier, getLandingBlockState, getLandingPos, getLeashOffset, 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, 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, hasNoGravity, hasPassenger, hasPassenger, hasPassengerDeep, hasPassengers, hasPermissionLevel, hasPlayerRider, hasPortalCooldown, hasPrimaryPassenger, hasVehicle, interact, interactAt, isAlive, isAttackable, isCollidable, isConnectedThroughVehicle, isCrawling, isCustomNameVisible, isDescending, isFireImmune, isFlappingWings, isFrozen, isGlowing, isGlowingLocal, isImmuneToExplosion, isInLava, isInPose, isInRange, isInRange, isInsideWall, isInsideWaterOrBubbleColumn, isInSneakingPose, isInSwimmingPose, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableTo, isLiving, isLogicalSideForUpdatingMovement, isOnGround, isPartOf, isPlayer, isPushable, isPushedByFluids, isRegionUnloaded, isRemoved, isSilent, isSneaking, isSneaky, isSpectator, isSprinting, isSubmergedIn, isSubmergedInWater, isSwimming, isTeammate, isTeamPlayer, isTouchingWater, isTouchingWaterOrRain, isWet, kill, limitFallDistance, lookAt, method_45320, 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, reinitDimensions, remove, removeAllPassengers, removeFromDimension, removePassenger, removeScoreboardTag, requestTeleport, requestTeleportAndDismount, requestTeleportOffset, resetPortalCooldown, 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, shouldReceiveFeedback, shouldRender, shouldRenderName, shouldSave, shouldSetPositionOnLoad, shouldSpawnSprintingParticles, shouldTrackOutput, slowMovement, spawnSprintingParticles, squaredDistanceTo, squaredDistanceTo, squaredDistanceTo, startRiding, startRiding, stopRiding, streamPassengersAndSelf, streamSelfAndPassengers, teleport, tickInVoid, tickPortal, tickPortalCooldown, 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
-
field_30666
private static final double field_30666- See Also:
- Mappings:
Namespace Name Mixin selector official b
Lbxj;b:D
intermediary field_30666
Lnet/minecraft/class_1678;field_30666:D
named field_30666
Lnet/minecraft/entity/projectile/ShulkerBulletEntity;field_30666:D
-
target
- Mappings:
Namespace Name Mixin selector official c
Lbxj;c:Lbdr;
intermediary field_7626
Lnet/minecraft/class_1678;field_7626:Lnet/minecraft/class_1297;
named target
Lnet/minecraft/entity/projectile/ShulkerBulletEntity;target:Lnet/minecraft/entity/Entity;
-
direction
- Mappings:
Namespace Name Mixin selector official d
Lbxj;d:Lgv;
intermediary field_7628
Lnet/minecraft/class_1678;field_7628:Lnet/minecraft/class_2350;
named direction
Lnet/minecraft/entity/projectile/ShulkerBulletEntity;direction:Lnet/minecraft/util/math/Direction;
-
stepCount
private int stepCount- Mappings:
Namespace Name Mixin selector official e
Lbxj;e:I
intermediary field_7627
Lnet/minecraft/class_1678;field_7627:I
named stepCount
Lnet/minecraft/entity/projectile/ShulkerBulletEntity;stepCount:I
-
targetX
private double targetX- Mappings:
Namespace Name Mixin selector official f
Lbxj;f:D
intermediary field_7635
Lnet/minecraft/class_1678;field_7635:D
named targetX
Lnet/minecraft/entity/projectile/ShulkerBulletEntity;targetX:D
-
targetY
private double targetY- Mappings:
Namespace Name Mixin selector official ao
Lbxj;ao:D
intermediary field_7633
Lnet/minecraft/class_1678;field_7633:D
named targetY
Lnet/minecraft/entity/projectile/ShulkerBulletEntity;targetY:D
-
targetZ
private double targetZ- Mappings:
Namespace Name Mixin selector official ap
Lbxj;ap:D
intermediary field_7625
Lnet/minecraft/class_1678;field_7625:D
named targetZ
Lnet/minecraft/entity/projectile/ShulkerBulletEntity;targetZ:D
-
targetUuid
- Mappings:
Namespace Name Mixin selector official aq
Lbxj;aq:Ljava/util/UUID;
intermediary field_7632
Lnet/minecraft/class_1678;field_7632:Ljava/util/UUID;
named targetUuid
Lnet/minecraft/entity/projectile/ShulkerBulletEntity;targetUuid:Ljava/util/UUID;
-
-
Constructor Details
-
ShulkerBulletEntity
- Mappings:
Namespace Name Mixin selector official <init>
Lbdr;<init>(Lbdv;Lcjw;)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
-
ShulkerBulletEntity
- Mappings:
Namespace Name Mixin selector official <init>
Lbxj;<init>(Lcjw;Lbeg;Lbdr;Lgv$a;)V
intermediary <init>
Lnet/minecraft/class_1678;<init>(Lnet/minecraft/class_1937;Lnet/minecraft/class_1309;Lnet/minecraft/class_1297;Lnet/minecraft/class_2350$class_2351;)V
named <init>
Lnet/minecraft/entity/projectile/ShulkerBulletEntity;<init>(Lnet/minecraft/world/World;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/Entity;Lnet/minecraft/util/math/Direction$Axis;)V
-
-
Method Details
-
getSoundCategory
Returns the sound category for sounds from this entity.This is used by
Entity.playSound(SoundEvent, float, float)
and defaults toSoundCategory.NEUTRAL
. Hostile entities should override this to returnSoundCategory.HOSTILE
.- Overrides:
getSoundCategory
in classEntity
- Returns:
- the sound category for sounds from this entity
- See Also:
- Mappings:
Namespace Name Mixin selector official cW
Lbdr;cW()Lalp;
intermediary method_5634
Lnet/minecraft/class_1297;method_5634()Lnet/minecraft/class_3419;
named getSoundCategory
Lnet/minecraft/entity/Entity;getSoundCategory()Lnet/minecraft/sound/SoundCategory;
-
writeCustomDataToNbt
Writes custom data tonbt
. Subclasses has 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 official b
Lbdr;b(Lqp;)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
-
readCustomDataFromNbt
Reads custom data fromnbt
. Subclasses has 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 official a
Lbdr;a(Lqp;)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
-
initDataTracker
protected void initDataTracker()Initializes data tracker.- Specified by:
initDataTracker
in classEntity
- Mappings:
Namespace Name Mixin selector official a_
Lbdr;a_()V
intermediary method_5693
Lnet/minecraft/class_1297;method_5693()V
named initDataTracker
Lnet/minecraft/entity/Entity;initDataTracker()V
-
getDirection
- Mappings:
Namespace Name Mixin selector official h
Lbxj;h()Lgv;
intermediary method_35208
Lnet/minecraft/class_1678;method_35208()Lnet/minecraft/class_2350;
named getDirection
Lnet/minecraft/entity/projectile/ShulkerBulletEntity;getDirection()Lnet/minecraft/util/math/Direction;
-
setDirection
- Mappings:
Namespace Name Mixin selector official a
Lbxj;a(Lgv;)V
intermediary method_7487
Lnet/minecraft/class_1678;method_7487(Lnet/minecraft/class_2350;)V
named setDirection
Lnet/minecraft/entity/projectile/ShulkerBulletEntity;setDirection(Lnet/minecraft/util/math/Direction;)V
-
changeTargetDirection
- Mappings:
Namespace Name Mixin selector official a
Lbxj;a(Lgv$a;)V
intermediary method_7486
Lnet/minecraft/class_1678;method_7486(Lnet/minecraft/class_2350$class_2351;)V
named changeTargetDirection
Lnet/minecraft/entity/projectile/ShulkerBulletEntity;changeTargetDirection(Lnet/minecraft/util/math/Direction$Axis;)V
-
checkDespawn
public void checkDespawn()Checks whether the entity should be despawned.To despawn this entity, call
Entity.discard()
.- Overrides:
checkDespawn
in classEntity
- See Also:
- Mappings:
Namespace Name Mixin selector official dr
Lbdr;dr()V
intermediary method_5982
Lnet/minecraft/class_1297;method_5982()V
named checkDespawn
Lnet/minecraft/entity/Entity;checkDespawn()V
-
tick
public void tick()Ticks this entity.- Overrides:
tick
in classProjectileEntity
- See Also:
- Mappings:
Namespace Name Mixin selector official l
Lbdr;l()V
intermediary method_5773
Lnet/minecraft/class_1297;method_5773()V
named tick
Lnet/minecraft/entity/Entity;tick()V
-
canHit
- Overrides:
canHit
in classProjectileEntity
- Mappings:
Namespace Name Mixin selector official a
Lbxh;a(Lbdr;)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
-
isOnFire
public boolean isOnFire()Returns whether the entity is on fire and is not fire immune. -
shouldRender
public boolean shouldRender(double distance) - Overrides:
shouldRender
in classEntity
- Mappings:
Namespace Name Mixin selector official a
Lbdr;a(D)Z
intermediary method_5640
Lnet/minecraft/class_1297;method_5640(D)Z
named shouldRender
Lnet/minecraft/entity/Entity;shouldRender(D)Z
-
getBrightnessAtEyes
public float getBrightnessAtEyes()- Overrides:
getBrightnessAtEyes
in classEntity
- Mappings:
Namespace Name Mixin selector official bj
Lbdr;bj()F
intermediary method_5718
Lnet/minecraft/class_1297;method_5718()F
named getBrightnessAtEyes
Lnet/minecraft/entity/Entity;getBrightnessAtEyes()F
-
onEntityHit
- Overrides:
onEntityHit
in classProjectileEntity
- Mappings:
Namespace Name Mixin selector official a
Lbxh;a(Leab;)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
- Overrides:
onBlockHit
in classProjectileEntity
- Mappings:
Namespace Name Mixin selector official a
Lbxh;a(Leaa;)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
-
onCollision
- Overrides:
onCollision
in classProjectileEntity
- Mappings:
Namespace Name Mixin selector official a
Lbxh;a(Leac;)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
-
canHit
public boolean canHit()Returns whether the entity can be hit with a projectile or be targeted by the player crosshair.- Overrides:
canHit
in classEntity
- Returns:
- whether the entity can be hit with a projectile or be targeted by the player crosshair
- Mappings:
Namespace Name Mixin selector official bn
Lbdr;bn()Z
intermediary method_5863
Lnet/minecraft/class_1297;method_5863()Z
named canHit
Lnet/minecraft/entity/Entity;canHit()Z
-
damage
Applies a damage to this entity. The exact implementation differs between subclasses.LivingEntity
has health value, and damaging the entity decreases it. This also handles shields, extra damage to helmets for falling blocks, setting the attacker, playing hurt sound, etc.Some entities like
ItemEntity
also have health value, which the overridden method decrements. There also exist several entities, likeEndCrystalEntity
, where any damage discards the entity (perhaps with an explosion).If this is overridden, it must check the result of
Entity.isInvulnerableTo(net.minecraft.entity.damage.DamageSource)
and return early.- Overrides:
damage
in classEntity
- Returns:
- whether the entity was actually damaged
- See Also:
- Mappings:
Namespace Name Mixin selector official a
Lbdr;a(Lbcz;F)Z
intermediary method_5643
Lnet/minecraft/class_1297;method_5643(Lnet/minecraft/class_1282;F)Z
named damage
Lnet/minecraft/entity/Entity;damage(Lnet/minecraft/entity/damage/DamageSource;F)Z
-
onSpawnPacket
Called on the client when the entity receives a spawn packet.This sets the entity's position, angles, ID, and UUID. Subclasses can override this to initialize additional fields.
- Overrides:
onSpawnPacket
in classProjectileEntity
- Mappings:
Namespace Name Mixin selector official a
Lbdr;a(Lul;)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
-