Package net.minecraft.entity.projectile
Class TridentEntity
java.lang.Object
net.minecraft.entity.Entity
net.minecraft.entity.projectile.ProjectileEntity
net.minecraft.entity.projectile.PersistentProjectileEntity
net.minecraft.entity.projectile.TridentEntity
- All Implemented Interfaces:
class_5568
,CommandOutput
,Nameable
public class TridentEntity extends PersistentProjectileEntity
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.entity.projectile.PersistentProjectileEntity
PersistentProjectileEntity.PickupPermission
Nested classes/interfaces inherited from class net.minecraft.entity.Entity
Entity.PositionUpdater, Entity.RemovalReason
-
Field Summary
Fields Modifier and Type Field Description private boolean
dealtDamage
private static TrackedData<Boolean>
ENCHANTED
private static TrackedData<Byte>
LOYALTY
int
returnTimer
private ItemStack
tridentStack
Fields inherited from class net.minecraft.entity.projectile.PersistentProjectileEntity
inGround, inGroundTime, pickupType, shake
Fields inherited from class net.minecraft.entity.Entity
age, dataTracker, distanceTraveled, fallDistance, field_25599, firstUpdate, FLAGS, fluidHeight, glowing, horizontalCollision, horizontalSpeed, ignoreCameraFrustum, inanimate, inNetherPortal, inPowderSnow, lastNetherPortalPosition, lastRenderX, lastRenderY, lastRenderZ, LOGGER, movementMultiplier, netherPortalTime, noClip, onGround, pitch, POSE, prevHorizontalSpeed, prevPitch, prevX, prevY, prevYaw, prevZ, pushSpeedReduction, random, ridingCooldown, stepHeight, submergedInWater, timeUntilRegen, touchingWater, uuid, uuidString, velocityDirty, velocityModified, verticalCollision, world, yaw
Fields inherited from interface net.minecraft.server.command.CommandOutput
DUMMY
-
Constructor Summary
Constructors Constructor Description TridentEntity(EntityType<? extends TridentEntity> type, World world)
TridentEntity(World world, LivingEntity owner, ItemStack stack)
-
Method Summary
Modifier and Type Method Description void
age()
protected ItemStack
asItemStack()
protected float
getDragInWater()
protected EntityHitResult
getEntityCollision(Vec3d currentPosition, Vec3d nextPosition)
protected SoundEvent
getHitSound()
boolean
hasChanneling()
protected void
initDataTracker()
boolean
isEnchanted()
private boolean
isOwnerAlive()
protected void
onEntityHit(EntityHitResult entityHitResult)
void
onPlayerCollision(PlayerEntity player)
void
readCustomDataFromTag(CompoundTag tag)
boolean
shouldRender(double cameraX, double cameraY, double cameraZ)
void
tick()
void
writeCustomDataToTag(CompoundTag tag)
Methods inherited from class net.minecraft.entity.projectile.PersistentProjectileEntity
applyEnchantmentEffects, canClimb, getDamage, getEyeHeight, getPierceLevel, getSound, isAttackable, isCritical, isNoClip, isShotFromCrossbow, method_26958, move, onBlockHit, onHit, setCritical, setDamage, setNoClip, setOwner, setPierceLevel, setPunch, setShotFromCrossbow, setSound, setVelocity, setVelocityClient, shouldRender, updateTrackedPositionAndAngles
Methods inherited from class net.minecraft.entity.projectile.ProjectileEntity
createSpawnPacket, getOwner, method_26962, onCollision, onSpawnPacket, setProperties, updateRotation
Methods inherited from class net.minecraft.entity.Entity
addPassenger, addScoreboardTag, addVelocity, adjustMovementForCollisions, adjustMovementForCollisions, adjustMovementForPiston, adjustMovementForSneaking, adjustSingleAxisMovementForCollisions, afterSpawn, animateDamage, applyMirror, applyRotation, baseTick, bypassesLandingEffects, bypassesSteppingEffects, calculateBoundsForPose, calculateDimensions, calculateNextStepSoundDistance, canAddPassenger, canAvoidTraps, canBeRiddenInWater, canBeSpectated, canExplosionDestroyBlock, canFly, canFreeze, canStartRiding, canUsePortals, changeLookDirection, checkBlockCollision, checkDespawn, collides, collidesWith, copyFrom, copyPositionAndRotation, damage, dealDamage, destroy, detach, discard, dismountVehicle, distanceTo, doesNotCollide, doesRenderOnFire, dropItem, dropItem, dropStack, dropStack, emitGameEvent, entityDataRequiresOperator, equals, equipStack, extinguish, fall, fromTag, getAir, getArmorItems, getBlockPos, getBlockX, getBlockY, getBlockZ, getBodyY, getBoundingBox, getBrightnessAtEyes, getBurningDuration, getCameraPosVec, getChunkPos, getCommandSource, getCustomName, getDataTracker, getDefaultName, getDefaultNetherPortalCooldown, getDimensions, getDisplayName, getEffectiveExplosionResistance, getEntityId, getEntityName, getEntityWorld, getEyeHeight, getEyeY, getFireTicks, getFirstPassenger, getFlag, getFluidHeight, getFreezingScale, getFrozenTicks, getHeadYaw, getHeight, getHeightOffset, getHighSpeedSplashSound, getHorizontalFacing, getHoverEvent, getItemsEquipped, getItemsHand, getJumpVelocityMultiplier, getLandingBlockState, getLandingPos, getMaxAir, getMaxNetherPortalTime, getMinFreezeDamageTicks, getMountedHeightOffset, getMovementDirection, getName, getOppositeRotationVector, getOppositeRotationVector, getParticleX, getParticleZ, getPassengerDismountOffset, getPassengerList, getPassengersDeep, getPermissionLevel, getPickBlockStack, getPistonBehavior, getPitch, getPos, getPose, getPrimaryPassenger, getRandomBodyY, getRenderDistanceMultiplier, getRootVehicle, getRotationClient, getRotationVec, getRotationVecClient, getRotationVector, getRotationVector, getSafeFallDistance, getSavedEntityId, getScoreboardTags, getScoreboardTeam, getServer, getSoundCategory, getSplashSound, getStandingEyeHeight, getSwimSound, getTargetingMargin, getTeamColorValue, getTeleportTarget, getTrackedPosition, getType, getUuid, getUuidAsString, getVehicle, getVelocity, getVelocityAffectingPos, getVelocityMultiplier, getVisibilityBoundingBox, getWidth, getX, getY, getYaw, getZ, handleAttack, handleFallDamage, handleStatus, hasCustomName, hashCode, hasNetherPortalCooldown, hasNoGravity, hasPassenger, hasPassengerDeep, hasPassengers, hasPassengerType, hasPermissionLevel, hasPlayerRider, hasVehicle, hasWings, interact, interactAt, isAlive, isCollidable, isConnectedThroughVehicle, isCustomNameVisible, isDescending, isFireImmune, isFreezing, isGlowing, isImmuneToExplosion, isInLava, isInRange, isInsideWall, isInsideWaterOrBubbleColumn, isInSneakingPose, isInSwimmingPose, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableTo, isLiving, isLogicalSideForUpdatingMovement, isOnFire, isOnGround, isPartOf, isPlayer, isPushable, isRemoved, isSilent, isSneaking, isSneaky, isSpectator, isSprinting, isSubmergedIn, isSubmergedInWater, isSwimming, isTeammate, isTeamPlayer, isTouchingWater, isTouchingWaterOrRain, isWet, kill, lookAt, method_29241, method_29919, method_30076, method_30330, method_30632, method_30633, method_30634, method_30950, method_30951, method_31166, method_31473, method_31744, method_31746, method_31748, method_32318, method_32875, method_32877, method_33189, moveToBoundingBoxCenter, moveToWorld, offsetX, offsetZ, onBlockCollision, onBubbleColumnCollision, onBubbleColumnSurfaceCollision, onKilledOther, onPassengerLookAround, onStartedTrackingBy, onStoppedTrackingBy, onStruckByLightning, onSwimmingStart, onTrackedDataSet, playFlySound, playSound, playStepSound, playSwimSound, populateCrashReport, pushAwayFrom, pushOutOfBlocks, raycast, refreshPosition, refreshPositionAfterTeleport, refreshPositionAfterTeleport, refreshPositionAndAngles, refreshPositionAndAngles, remove, removeAllPassengers, removePassenger, removeScoreboardTag, requestTeleport, resetNetherPortalCooldown, resetPosition, saveSelfToTag, saveToTag, scheduleVelocityUpdate, sendSystemMessage, setAir, setBoundingBox, setCustomName, setCustomNameVisible, setEntityId, setFireTicks, setFlag, setFrozenTicks, setGlowing, setHeadYaw, setInNetherPortal, setInPowderSnow, setInvisible, setInvulnerable, setNoGravity, setOnFireFor, setOnFireFromLava, setOnGround, setPos, setPose, setRemoved, setRenderDistanceMultiplier, setRotation, setSilent, setSneaking, setSprinting, setSwimming, setUuid, setVelocity, setVelocity, setYaw, shouldBroadcastConsoleToOps, shouldLeaveSwimmingPose, shouldReceiveFeedback, shouldRenderName, shouldSetPositionOnLoad, shouldSpawnSprintingParticles, shouldTrackOutput, slowMovement, spawnSprintingParticles, squaredDistanceTo, squaredDistanceTo, squaredDistanceTo, squaredHorizontalLength, startRiding, startRiding, stopRiding, streamPassengersRecursively, teleport, tickNetherPortal, tickNetherPortalCooldown, tickRiding, toListTag, toListTag, toString, toTag, unsetRemoved, updateKilledAdvancementCriterion, updateMovementInFluid, updatePassengerForDismount, updatePassengerPosition, updatePosition, updatePositionAndAngles, updateSwimming, updateTrackedHeadRotation, updateTrackedPosition, updateTrackedPosition, updateVelocity, updateWaterState, wouldPoseNotCollide
-
Field Details
-
LOYALTY
-
ENCHANTED
-
tridentStack
-
dealtDamage
private boolean dealtDamage -
returnTimer
public int returnTimer
-
-
Constructor Details
-
TridentEntity
-
TridentEntity
-
-
Method Details
-
initDataTracker
protected void initDataTracker()- Overrides:
initDataTracker
in classPersistentProjectileEntity
-
tick
public void tick()- Overrides:
tick
in classPersistentProjectileEntity
-
isOwnerAlive
private boolean isOwnerAlive() -
asItemStack
- Specified by:
asItemStack
in classPersistentProjectileEntity
-
isEnchanted
@Environment(CLIENT) public boolean isEnchanted() -
getEntityCollision
- Overrides:
getEntityCollision
in classPersistentProjectileEntity
-
onEntityHit
- Overrides:
onEntityHit
in classPersistentProjectileEntity
-
hasChanneling
public boolean hasChanneling() -
getHitSound
- Overrides:
getHitSound
in classPersistentProjectileEntity
-
onPlayerCollision
- Overrides:
onPlayerCollision
in classPersistentProjectileEntity
-
readCustomDataFromTag
- Overrides:
readCustomDataFromTag
in classPersistentProjectileEntity
-
writeCustomDataToTag
- Overrides:
writeCustomDataToTag
in classPersistentProjectileEntity
-
age
public void age()- Overrides:
age
in classPersistentProjectileEntity
-
getDragInWater
protected float getDragInWater()- Overrides:
getDragInWater
in classPersistentProjectileEntity
-
shouldRender
@Environment(CLIENT) public boolean shouldRender(double cameraX, double cameraY, double cameraZ)- Overrides:
shouldRender
in classEntity
-