Package com.jackdaw.chatwithnpc.npc
Class TextBubbleEntity
java.lang.Object
net.minecraft.entity.Entity
net.minecraft.entity.decoration.DisplayEntity
net.minecraft.entity.decoration.DisplayEntity.TextDisplayEntity
com.jackdaw.chatwithnpc.npc.TextBubbleEntity
- All Implemented Interfaces:
net.minecraft.server.command.CommandOutput
,net.minecraft.util.Nameable
,net.minecraft.world.entity.EntityLike
public class TextBubbleEntity
extends net.minecraft.entity.decoration.DisplayEntity.TextDisplayEntity
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class net.minecraft.entity.decoration.DisplayEntity.TextDisplayEntity
net.minecraft.entity.decoration.DisplayEntity.TextDisplayEntity.LineSplitter, net.minecraft.entity.decoration.DisplayEntity.TextDisplayEntity.TextAlignment, net.minecraft.entity.decoration.DisplayEntity.TextDisplayEntity.TextLine, net.minecraft.entity.decoration.DisplayEntity.TextDisplayEntity.TextLines
Nested classes/interfaces inherited from class net.minecraft.entity.decoration.DisplayEntity
net.minecraft.entity.decoration.DisplayEntity.BillboardMode, net.minecraft.entity.decoration.DisplayEntity.BlockDisplayEntity, net.minecraft.entity.decoration.DisplayEntity.ItemDisplayEntity, net.minecraft.entity.decoration.DisplayEntity.TextDisplayEntity
Nested classes/interfaces inherited from class net.minecraft.entity.Entity
net.minecraft.entity.Entity.MoveEffect, net.minecraft.entity.Entity.PositionUpdater, net.minecraft.entity.Entity.RemovalReason
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate long
private net.minecraft.util.math.ChunkPos
private net.minecraft.world.World
private final TextBubbleEntity.TextBackgroundColor
private final String
private final long
private final double
private long
private final net.minecraft.entity.Entity
private long
Fields inherited from class net.minecraft.entity.decoration.DisplayEntity.TextDisplayEntity
DEFAULT_BACKGROUND_FLAG, INITIAL_BACKGROUND, LEFT_ALIGNMENT_FLAG, RIGHT_ALIGNMENT_FLAG, SEE_THROUGH_FLAG, SHADOW_FLAG, TEXT_NBT_KEY
Fields inherited from class net.minecraft.entity.decoration.DisplayEntity
BILLBOARD_NBT_KEY, BRIGHTNESS_NBT_KEY, field_42384, GLOW_COLOR_OVERRIDE_NBT_KEY, HEIGHT_NBT_KEY, INTERPOLATION_DURATION_NBT_KEY, interpolators, SHADOW_RADIUS_NBT_KEY, SHADOW_STRENGTH_NBT_KEY, START_INTERPOLATION_KEY, TRANSFORMATION_NBT_KEY, VIEW_RANGE_NBT_KEY, WIDTH_NBT_KEY
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_COMMAND_TAGS, MAX_RIDING_COOLDOWN, 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, 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate long
bubbleLastingTime
(String message) private boolean
private void
onChunkUnload
(net.minecraft.server.world.ServerWorld world, net.minecraft.world.chunk.WorldChunk chunk) void
setTextBackgroundColor
(TextBubbleEntity.TextBackgroundColor textBackgroundColor) void
setTimeLastingPerChar
(long timeLastingPerChar) private net.minecraft.text.Text
textBuilder
(String message, TextBubbleEntity.TextBackgroundColor textBackgroundColor) void
tick()
void
private void
updateAllNbt
(String message) private void
Methods inherited from class net.minecraft.entity.decoration.DisplayEntity.TextDisplayEntity
getAlignment, getDisplayFlags, getLineWidth, getText, initDataTracker, lerpBackground, lerpTextOpacity, onTrackedDataSet, readCustomDataFromNbt, splitLines, writeCustomDataToNbt
Methods inherited from class net.minecraft.entity.decoration.DisplayEntity
createSpawnPacket, getBillboardMode, getBrightness, getFixedRotation, getLerpProgress, getPistonBehavior, getTeamColorValue, getVisibilityBoundingBox, lerpShadowRadius, lerpShadowStrength, lerpTransformation, onDataTrackerUpdate, setPitch, setPosition, setYaw, shouldRender
Methods inherited from class net.minecraft.entity.Entity
addAirTravelEffects, addCommandTag, addFlapEffects, addPassenger, addVelocity, addVelocity, adjustMovementForCollisions, adjustMovementForPiston, adjustMovementForSneaking, animateDamage, applyDamageEffects, applyMirror, applyRotation, attemptTickInVoid, baseTick, bypassesLandingEffects, bypassesSteppingEffects, calculateBoundingBox, calculateBoundsForPose, calculateDimensions, calculateNextStepSoundDistance, canAddPassenger, canAvoidTraps, canBeHitByProjectile, canBeSpectated, canExplosionDestroyBlock, canFreeze, canHit, canModifyAt, canMoveVoluntarily, canSprintAsVehicle, canStartRiding, canUsePortals, changeLookDirection, checkBlockCollision, checkDespawn, collidesWith, collidesWithStateAtPos, copyFrom, copyPositionAndRotation, couldAcceptPassenger, damage, 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, getBrightnessAtEyes, getBurningDuration, getCameraPosVec, getChunkPos, getClientCameraPosVec, getCommandSource, getCommandTags, getControllingPassenger, getControllingVehicle, getCustomName, getDamageSources, 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, getPitch, getPitch, getPortalRect, getPos, getPose, getRandomBodyY, getRemovalReason, getRenderDistanceMultiplier, getRootVehicle, getRotationClient, getRotationVec, getRotationVecClient, getRotationVector, getRotationVector, getSafeFallDistance, getSavedEntityId, getScoreboardTeam, getServer, getSoundCategory, getSplashSound, getStackReference, getStandingEyeHeight, getStepHeight, getSteppingBlockState, getSteppingPos, getSwimHeight, getSwimSound, getSyncedPos, getTargetingMargin, getTeleportTarget, getTrackedPosition, getType, getUuid, getUuidAsString, getVehicle, getVelocity, getVelocityAffectingPos, getVelocityMultiplier, getWidth, getWorld, getX, getY, getYaw, getYaw, getZ, handleAttack, handleFallDamage, handleStatus, hasCollidedSoftly, hasControllingPassenger, hasCustomName, hashCode, hasNoGravity, hasPassenger, hasPassenger, hasPassengerDeep, hasPassengers, hasPermissionLevel, hasPlayerRider, hasPortalCooldown, 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, isOnFire, isOnGround, isPartOf, isPlayer, isPushable, isPushedByFluids, isRegionUnloaded, isRemoved, isSilent, isSneaking, isSneaky, isSpectator, isSprinting, isSubmergedIn, isSubmergedInWater, isSwimming, isTeammate, isTeamPlayer, isTouchingWater, isTouchingWaterOrRain, isWet, kill, limitFallDistance, lookAt, move, moveToWorld, occludeVibrationSignals, offsetX, offsetZ, onBlockCollision, onBubbleColumnCollision, onBubbleColumnSurfaceCollision, onDamaged, onKilledOther, onLanding, onPassengerLookAround, onPlayerCollision, onRemoved, onSpawnPacket, onStartedTrackingBy, onStoppedTrackingBy, onStruckByLightning, onSwimmingStart, 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, setPos, setPose, setPosition, setRemoved, setRenderDistanceMultiplier, setRotation, setSilent, setSneaking, setSprinting, setStepHeight, setSwimming, setUuid, setVelocity, setVelocity, setVelocityClient, shouldBroadcastConsoleToOps, shouldDismountUnderwater, shouldEscapePowderSnow, shouldReceiveFeedback, shouldRender, shouldRenderName, shouldSave, shouldSetPositionOnLoad, shouldSpawnSprintingParticles, shouldTrackOutput, slowMovement, spawnSprintingParticles, squaredDistanceTo, squaredDistanceTo, squaredDistanceTo, startRiding, startRiding, stopRiding, streamPassengersAndSelf, streamSelfAndPassengers, teleport, 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
-
speaker
private final net.minecraft.entity.Entity speaker -
heightOffset
private final double heightOffset- See Also:
-
defaultColor
-
defaultTimePerChar
private final long defaultTimePerChar- See Also:
-
defaultText
- See Also:
-
currentWorld
private net.minecraft.world.World currentWorld -
currentChunkPos
private net.minecraft.util.math.ChunkPos currentChunkPos -
lastUpdateTime
private long lastUpdateTime -
timeLastingPerChar
private long timeLastingPerChar -
bubbleLastingTime
private long bubbleLastingTime -
textBackgroundColor
-
-
Constructor Details
-
TextBubbleEntity
public TextBubbleEntity(@NotNull @NotNull net.minecraft.entity.Entity speaker)
-
-
Method Details
-
tick
public void tick()- Overrides:
tick
in classnet.minecraft.entity.decoration.DisplayEntity
-
updateNbtSeeThrough
private void updateNbtSeeThrough() -
onChunkUnload
private void onChunkUnload(net.minecraft.server.world.ServerWorld world, net.minecraft.world.chunk.WorldChunk chunk) -
setTimeLastingPerChar
public void setTimeLastingPerChar(long timeLastingPerChar) -
setTextBackgroundColor
-
update
-
updateAllNbt
-
textBuilder
private net.minecraft.text.Text textBuilder(String message, TextBubbleEntity.TextBackgroundColor textBackgroundColor) -
bubbleLastingTime
-
isSeeThroughBlock
private boolean isSeeThroughBlock()
-