Class PaintingEntity
- All Implemented Interfaces:
VariantHolder<RegistryEntry<PaintingVariant>>
,CommandOutput
,Nameable
,EntityLike
- Mappings:
Namespace Name official btd
intermediary net/minecraft/class_1534
named net/minecraft/entity/decoration/painting/PaintingEntity
-
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 RegistryKey<PaintingVariant>
private static final TrackedData<RegistryEntry<PaintingVariant>>
Fields inherited from class net.minecraft.entity.decoration.AbstractDecorationEntity
attachmentPos, facing, PREDICATE
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
ModifierConstructorDescriptionPaintingEntity
(EntityType<? extends PaintingEntity> type, World world) private
PaintingEntity
(World world, BlockPos pos) PaintingEntity
(World world, BlockPos pos, Direction direction, RegistryEntry<PaintingVariant> variant) -
Method Summary
Modifier and TypeMethodDescriptionReturns a packet to notify the clients of the entity's spawning.private static RegistryEntry<PaintingVariant>
int
Returns the stack for creative "pick block" functionality, ornull
if there is none.private static int
getSize
(RegistryEntry<PaintingVariant> variant) Returns the position of the entity synced to clients.int
protected void
Initializes data tracker.void
void
onPlace()
void
onSpawnPacket
(EntitySpawnS2CPacket packet) Called on the client when the entity receives a spawn packet.void
onTrackedDataSet
(TrackedData<?> data) Called on the client when the tracked data is set.static Optional<PaintingEntity>
placePainting
(World world, BlockPos pos, Direction facing) void
Reads custom data fromnbt
.void
refreshPositionAndAngles
(double x, double y, double z, float yaw, float pitch) Sets the entity's position, yaw, and pitch, and refreshes several position-related fields.void
setVariant
(RegistryEntry<PaintingVariant> variant) void
updateTrackedPositionAndAngles
(double x, double y, double z, float yaw, float pitch, int interpolationSteps, boolean interpolate) void
Writes custom data tonbt
.Methods inherited from class net.minecraft.entity.decoration.AbstractDecorationEntity
addVelocity, applyMirror, applyRotation, calculateDimensions, canHit, canStayAttached, damage, dropStack, getDecorationBlockPos, getHorizontalFacing, handleAttack, move, onStruckByLightning, setFacing, setPosition, shouldSetPositionOnLoad, tick, updateAttachmentPosition
Methods inherited from class net.minecraft.entity.Entity
addAirTravelEffects, addFlapEffects, addPassenger, addScoreboardTag, addVelocity, adjustMovementForCollisions, adjustMovementForPiston, adjustMovementForSneaking, animateDamage, applyDamageEffects, attemptTickInVoid, baseTick, bypassesLandingEffects, bypassesSteppingEffects, calculateBoundingBox, calculateBoundsForPose, calculateNextStepSoundDistance, canAddPassenger, canAvoidTraps, canBeRiddenInWater, canBeSpectated, canExplosionDestroyBlock, canFreeze, canModifyAt, canStartRiding, canUsePortals, changeLookDirection, checkBlockCollision, checkDespawn, collidesWith, collidesWithStateAtPos, copyFrom, copyPositionAndRotation, detach, discard, dismountVehicle, distanceTo, doesNotCollide, doesRenderOnFire, dropItem, dropItem, 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, 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, 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, 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, getTargetingMargin, getTeamColorValue, getTeleportTarget, getTrackedPosition, getType, getUuid, getUuidAsString, getVehicle, getVelocity, getVelocityAffectingPos, getVelocityMultiplier, getVisibilityBoundingBox, getWidth, getWorld, getX, getY, getYaw, getYaw, getZ, 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, isOnFire, 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, moveToWorld, occludeVibrationSignals, offsetX, offsetZ, onBlockCollision, onBubbleColumnCollision, onBubbleColumnSurfaceCollision, onKilledOther, onLanding, onPassengerLookAround, onPlayerCollision, onRemoved, onStartedTrackingBy, onStoppedTrackingBy, onSwimmingStart, playExtinguishSound, playSound, playSoundIfNotSilent, playStepSound, playSwimSound, populateCrashReport, positionInPortal, pushAwayFrom, pushOutOfBlocks, raycast, readNbt, refreshPosition, refreshPositionAfterTeleport, refreshPositionAfterTeleport, 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, setRemoved, setRenderDistanceMultiplier, setRotation, setSilent, setSneaking, setSprinting, setSwimming, setUuid, setVelocity, setVelocity, setVelocityClient, setYaw, shouldBroadcastConsoleToOps, shouldEscapePowderSnow, shouldReceiveFeedback, shouldRender, shouldRender, shouldRenderName, shouldSave, 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, 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
-
VARIANT
- Mappings:
Namespace Name Mixin selector official e
Lbtd;e:Labn;
intermediary field_38941
Lnet/minecraft/class_1534;field_38941:Lnet/minecraft/class_2940;
named VARIANT
Lnet/minecraft/entity/decoration/painting/PaintingEntity;VARIANT:Lnet/minecraft/entity/data/TrackedData;
-
DEFAULT_VARIANT
- Mappings:
Namespace Name Mixin selector official f
Lbtd;f:Lace;
intermediary field_38942
Lnet/minecraft/class_1534;field_38942:Lnet/minecraft/class_5321;
named DEFAULT_VARIANT
Lnet/minecraft/entity/decoration/painting/PaintingEntity;DEFAULT_VARIANT:Lnet/minecraft/registry/RegistryKey;
-
-
Constructor Details
-
PaintingEntity
- 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
-
PaintingEntity
- Mappings:
Namespace Name Mixin selector official <init>
Lbtd;<init>(Lcjw;Lgp;)V
intermediary <init>
Lnet/minecraft/class_1534;<init>(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)V
named <init>
Lnet/minecraft/entity/decoration/painting/PaintingEntity;<init>(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)V
-
PaintingEntity
public PaintingEntity(World world, BlockPos pos, Direction direction, RegistryEntry<PaintingVariant> variant) - Mappings:
Namespace Name Mixin selector official <init>
Lbtd;<init>(Lcjw;Lgp;Lgv;Lgz;)V
intermediary <init>
Lnet/minecraft/class_1534;<init>(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2350;Lnet/minecraft/class_6880;)V
named <init>
Lnet/minecraft/entity/decoration/painting/PaintingEntity;<init>(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;Lnet/minecraft/registry/entry/RegistryEntry;)V
-
-
Method Details
-
getDefaultVariant
- Mappings:
Namespace Name Mixin selector official i
Lbtd;i()Lgz;
intermediary method_43405
Lnet/minecraft/class_1534;method_43405()Lnet/minecraft/class_6880;
named getDefaultVariant
Lnet/minecraft/entity/decoration/painting/PaintingEntity;getDefaultVariant()Lnet/minecraft/registry/entry/RegistryEntry;
-
initDataTracker
protected void initDataTracker()Initializes data tracker.- Overrides:
initDataTracker
in classAbstractDecorationEntity
- 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
-
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.
- Overrides:
onTrackedDataSet
in classEntity
- Mappings:
Namespace Name Mixin selector official a
Lbdr;a(Labn;)V
intermediary method_5674
Lnet/minecraft/class_1297;method_5674(Lnet/minecraft/class_2940;)V
named onTrackedDataSet
Lnet/minecraft/entity/Entity;onTrackedDataSet(Lnet/minecraft/entity/data/TrackedData;)V
-
setVariant
- Specified by:
setVariant
in interfaceVariantHolder<RegistryEntry<PaintingVariant>>
- Mappings:
Namespace Name Mixin selector official a
Lbtd;a(Lgz;)V
intermediary method_43402
Lnet/minecraft/class_1534;method_43402(Lnet/minecraft/class_6880;)V
named setVariant
Lnet/minecraft/entity/decoration/painting/PaintingEntity;setVariant(Lnet/minecraft/registry/entry/RegistryEntry;)V
-
getVariant
- Specified by:
getVariant
in interfaceVariantHolder<RegistryEntry<PaintingVariant>>
- Mappings:
Namespace Name Mixin selector official h
Lbtd;h()Lgz;
intermediary method_43404
Lnet/minecraft/class_1534;method_43404()Lnet/minecraft/class_6880;
named getVariant
Lnet/minecraft/entity/decoration/painting/PaintingEntity;getVariant()Lnet/minecraft/registry/entry/RegistryEntry;
-
placePainting
- Mappings:
Namespace Name Mixin selector official a
Lbtd;a(Lcjw;Lgp;Lgv;)Ljava/util/Optional;
intermediary method_43401
Lnet/minecraft/class_1534;method_43401(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2350;)Ljava/util/Optional;
named placePainting
Lnet/minecraft/entity/decoration/painting/PaintingEntity;placePainting(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;)Ljava/util/Optional;
-
getSize
- Mappings:
Namespace Name Mixin selector official b
Lbtd;b(Lgz;)I
intermediary method_43403
Lnet/minecraft/class_1534;method_43403(Lnet/minecraft/class_6880;)I
named getSize
Lnet/minecraft/entity/decoration/painting/PaintingEntity;getSize(Lnet/minecraft/registry/entry/RegistryEntry;)I
-
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 classAbstractDecorationEntity
- 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 classAbstractDecorationEntity
- 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
-
getWidthPixels
public int getWidthPixels()- Specified by:
getWidthPixels
in classAbstractDecorationEntity
- Mappings:
Namespace Name Mixin selector official s
Lbta;s()I
intermediary method_6897
Lnet/minecraft/class_1530;method_6897()I
named getWidthPixels
Lnet/minecraft/entity/decoration/AbstractDecorationEntity;getWidthPixels()I
-
getHeightPixels
public int getHeightPixels()- Specified by:
getHeightPixels
in classAbstractDecorationEntity
- Mappings:
Namespace Name Mixin selector official t
Lbta;t()I
intermediary method_6891
Lnet/minecraft/class_1530;method_6891()I
named getHeightPixels
Lnet/minecraft/entity/decoration/AbstractDecorationEntity;getHeightPixels()I
-
onBreak
- Specified by:
onBreak
in classAbstractDecorationEntity
- Mappings:
Namespace Name Mixin selector official a
Lbta;a(Lbdr;)V
intermediary method_6889
Lnet/minecraft/class_1530;method_6889(Lnet/minecraft/class_1297;)V
named onBreak
Lnet/minecraft/entity/decoration/AbstractDecorationEntity;onBreak(Lnet/minecraft/entity/Entity;)V
-
onPlace
public void onPlace()- Specified by:
onPlace
in classAbstractDecorationEntity
- Mappings:
Namespace Name Mixin selector official u
Lbta;u()V
intermediary method_6894
Lnet/minecraft/class_1530;method_6894()V
named onPlace
Lnet/minecraft/entity/decoration/AbstractDecorationEntity;onPlace()V
-
refreshPositionAndAngles
public void refreshPositionAndAngles(double x, double y, double z, float yaw, float pitch) Sets the entity's position, yaw, and pitch, and refreshes several position-related fields.This should be used over other methods for setting positions of mobs.
- Overrides:
refreshPositionAndAngles
in classEntity
- See Also:
- Mappings:
Namespace Name Mixin selector official b
Lbdr;b(DDDFF)V
intermediary method_5808
Lnet/minecraft/class_1297;method_5808(DDDFF)V
named refreshPositionAndAngles
Lnet/minecraft/entity/Entity;refreshPositionAndAngles(DDDFF)V
-
updateTrackedPositionAndAngles
public void updateTrackedPositionAndAngles(double x, double y, double z, float yaw, float pitch, int interpolationSteps, boolean interpolate) - Overrides:
updateTrackedPositionAndAngles
in classEntity
- Mappings:
Namespace Name Mixin selector official a
Lbdr;a(DDDFFIZ)V
intermediary method_5759
Lnet/minecraft/class_1297;method_5759(DDDFFIZ)V
named updateTrackedPositionAndAngles
Lnet/minecraft/entity/Entity;updateTrackedPositionAndAngles(DDDFFIZ)V
-
getSyncedPos
Returns the position of the entity synced to clients.This is the same as
Entity.getPos()
except for paintings which return the attachment position.- Overrides:
getSyncedPos
in classEntity
- Returns:
- the position of the entity synced to clients
- See Also:
- Mappings:
Namespace Name Mixin selector official de
Lbdr;de()Leae;
intermediary method_43390
Lnet/minecraft/class_1297;method_43390()Lnet/minecraft/class_243;
named getSyncedPos
Lnet/minecraft/entity/Entity;getSyncedPos()Lnet/minecraft/util/math/Vec3d;
-
createSpawnPacket
Returns a packet to notify the clients of the entity's spawning.- Overrides:
createSpawnPacket
in classEntity
- Returns:
- a packet to notify the clients of the entity's spawning
- Mappings:
Namespace Name Mixin selector official T
Lbdr;T()Luh;
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
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 classEntity
- 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
-
getPickBlockStack
Returns the stack for creative "pick block" functionality, ornull
if there is none.If the entity has an item representation (such as boats or minecarts), this should be overridden to return a new stack. Note that
MobEntity
handles the spawn eggs.ItemFrameEntity
instead returns the copy of the stack held in the frame.- Overrides:
getPickBlockStack
in classEntity
- Returns:
- the stack for creative "pick block" functionality, or
null
if there is none - Mappings:
Namespace Name Mixin selector official ds
Lbdr;ds()Lcdt;
intermediary method_31480
Lnet/minecraft/class_1297;method_31480()Lnet/minecraft/class_1799;
named getPickBlockStack
Lnet/minecraft/entity/Entity;getPickBlockStack()Lnet/minecraft/item/ItemStack;
-