Class InteractionEntity
- All Implemented Interfaces:
Attackable,Targeter,CommandOutput,Nameable,EntityLike
- Mappings:
Namespace Name official bftintermediary net/minecraft/class_8150named net/minecraft/entity/decoration/InteractionEntity
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class net.minecraft.entity.Entity
Entity.MoveEffect, Entity.PositionUpdater, Entity.RemovalReason -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate static final Loggerprivate static final TrackedData<Float>private static final Stringprivate static final Stringprivate static final TrackedData<Boolean>private static final Stringprivate static final TrackedData<Float>private static final StringFields 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_44870, field_44871, field_44872, firstUpdate, FLAGS, fluidHeight, FREEZING_DAMAGE_INTERVAL, GLOWING_FLAG_INDEX, groundCollision, 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, PASSENGERS_KEY, POSE, prevHorizontalSpeed, prevPitch, prevX, prevY, prevYaw, prevZ, random, ridingCooldown, speed, submergedInWater, supportingBlockPos, timeUntilRegen, touchingWater, uuid, UUID_KEY, uuidString, velocityDirty, velocityModified, verticalCollision, wasInPowderSnow, wasOnFireFields inherited from interface net.minecraft.server.command.CommandOutput
DUMMY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected BoxbooleanReturns whether the entity cannot trigger pressure plates or tripwires.booleanbooleancanHit()Returns whether the entity can be hit with a projectile or be targeted by the player crosshair.private EntityDimensionsgetDimensions(EntityPose pose) Returns the dimensions of the entity with the givenpose.private floatprivate floatReturns the behavior of the piston for this entity.booleanhandleAttack(Entity attacker) Handles a player attacking the entity.protected voidInitializes data tracker.interact(PlayerEntity player, Hand hand) Called when a player interacts with this entity.voidonTrackedDataSet(TrackedData<?> data) Called on the client when the tracked data is set.protected voidReads custom data fromnbt.private voidsetInteractionHeight(float height) private voidsetInteractionWidth(float width) private voidsetResponse(boolean response) private booleanvoidtick()Ticks this entity.protected voidWrites custom data tonbt.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, calculateBoundsForPose, calculateDimensions, calculateNextStepSoundDistance, canAddPassenger, canBeSpectated, canExplosionDestroyBlock, canFreeze, canModifyAt, canMoveVoluntarily, canSprintAsVehicle, canStartRiding, canUsePortals, changeLookDirection, checkBlockCollision, checkDespawn, collidesWith, collidesWithStateAtPos, copyFrom, copyPositionAndRotation, couldAcceptPassenger, createSpawnPacket, 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, 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, getNameLabelHeight, getOppositeRotationVector, getOppositeRotationVector, getParticleX, getParticleZ, getPassengerDismountOffset, getPassengerList, getPassengersDeep, getPermissionLevel, getPickBlockStack, getPitch, getPitch, getPortalCooldown, getPortalRect, getPos, getPose, getPosWithYOffset, getRandomBodyY, getRemovalReason, getRenderDistanceMultiplier, getRootVehicle, getRotationClient, getRotationVec, getRotationVecClient, getRotationVector, getRotationVector, getSafeFallDistance, getSavedEntityId, getScoreboardTeam, getServer, getSoundCategory, getSplashSound, getStackReference, getStandingEyeHeight, getStepHeight, getSteppingBlockState, getSteppingPos, getStepSoundPos, getSwimHeight, getSwimSound, getSyncedPos, getTargetingMargin, getTeamColorValue, getTeleportTarget, getTrackedPosition, getType, getUuid, getUuidAsString, getVehicle, getVelocity, getVelocityAffectingPos, getVelocityMultiplier, getVisibilityBoundingBox, getWidth, getWorld, getX, getY, getYaw, getYaw, getZ, handleFallDamage, handleStatus, hasCollidedSoftly, hasControllingPassenger, hasCustomName, hashCode, hasNoGravity, hasPassenger, hasPassenger, hasPassengerDeep, hasPassengers, hasPermissionLevel, hasPlayerRider, hasPortalCooldown, hasVehicle, 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, isOnRail, isPartOf, isPlayer, isPushable, isPushedByFluids, isRegionUnloaded, isRemoved, isSilent, isSneaking, isSneaky, isSpectator, isSprinting, isSubmergedIn, isSubmergedInWater, isSupportedBy, isSwimming, isTeammate, isTeamPlayer, isTouchingWater, isTouchingWaterOrRain, isWet, kill, limitFallDistance, lookAt, move, moveToWorld, occludeVibrationSignals, offsetX, offsetZ, onBlockCollision, onBubbleColumnCollision, onBubbleColumnSurfaceCollision, onDamaged, onDataTrackerUpdate, onKilledOther, onLanding, onPassengerLookAround, onPlayerCollision, onRemoved, onSpawnPacket, onStartedTrackingBy, onStoppedTrackingBy, onStruckByLightning, onSwimmingStart, playCombinationStepSounds, playExtinguishSound, playSecondaryStepSound, playSound, playSoundIfNotSilent, playStepSound, playSwimSound, 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, setPortalCooldown, setPos, setPose, setPosition, setPosition, setRemoved, setRenderDistanceMultiplier, setRotation, setSilent, setSneaking, setSprinting, setStepHeight, setSwimming, setUuid, setVelocity, setVelocity, setVelocityClient, setWorld, setYaw, shouldBroadcastConsoleToOps, shouldDismountUnderwater, shouldEscapePowderSnow, shouldReceiveFeedback, shouldRender, 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, updatePassengerPosition, updatePosition, updatePositionAndAngles, updateSupportingBlockPos, updateSwimming, updateTrackedHeadRotation, updateTrackedPosition, updateTrackedPositionAndAngles, updateVelocity, updateWaterState, wouldPoseNotCollide, writeNbtMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.server.command.CommandOutput
cannotBeSilenced
-
Field Details
-
field_42624
- Mappings:
Namespace Name Mixin selector official bLbft;b:Lorg/slf4j/Logger;intermediary field_42624Lnet/minecraft/class_8150;field_42624:Lorg/slf4j/Logger;named field_42624Lnet/minecraft/entity/decoration/InteractionEntity;field_42624:Lorg/slf4j/Logger;
-
WIDTH
- Mappings:
Namespace Name Mixin selector official cLbft;c:Laby;intermediary field_42625Lnet/minecraft/class_8150;field_42625:Lnet/minecraft/class_2940;named WIDTHLnet/minecraft/entity/decoration/InteractionEntity;WIDTH:Lnet/minecraft/entity/data/TrackedData;
-
HEIGHT
- Mappings:
Namespace Name Mixin selector official dLbft;d:Laby;intermediary field_42626Lnet/minecraft/class_8150;field_42626:Lnet/minecraft/class_2940;named HEIGHTLnet/minecraft/entity/decoration/InteractionEntity;HEIGHT:Lnet/minecraft/entity/data/TrackedData;
-
RESPONSE
- Mappings:
Namespace Name Mixin selector official eLbft;e:Laby;intermediary field_42627Lnet/minecraft/class_8150;field_42627:Lnet/minecraft/class_2940;named RESPONSELnet/minecraft/entity/decoration/InteractionEntity;RESPONSE:Lnet/minecraft/entity/data/TrackedData;
-
WIDTH_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector official fLbft;f:Ljava/lang/String;intermediary field_42628Lnet/minecraft/class_8150;field_42628:Ljava/lang/String;named WIDTH_KEYLnet/minecraft/entity/decoration/InteractionEntity;WIDTH_KEY:Ljava/lang/String;
-
HEIGHT_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector official gLbft;g:Ljava/lang/String;intermediary field_42629Lnet/minecraft/class_8150;field_42629:Ljava/lang/String;named HEIGHT_KEYLnet/minecraft/entity/decoration/InteractionEntity;HEIGHT_KEY:Ljava/lang/String;
-
ATTACK_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector official hLbft;h:Ljava/lang/String;intermediary field_42630Lnet/minecraft/class_8150;field_42630:Ljava/lang/String;named ATTACK_KEYLnet/minecraft/entity/decoration/InteractionEntity;ATTACK_KEY:Ljava/lang/String;
-
INTERACTION_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector official iLbft;i:Ljava/lang/String;intermediary field_42631Lnet/minecraft/class_8150;field_42631:Ljava/lang/String;named INTERACTION_KEYLnet/minecraft/entity/decoration/InteractionEntity;INTERACTION_KEY:Ljava/lang/String;
-
RESPONSE_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector official jLbft;j:Ljava/lang/String;intermediary field_42632Lnet/minecraft/class_8150;field_42632:Ljava/lang/String;named RESPONSE_KEYLnet/minecraft/entity/decoration/InteractionEntity;RESPONSE_KEY:Ljava/lang/String;
-
attack
- Mappings:
Namespace Name Mixin selector official kLbft;k:Lbft$a;intermediary field_42633Lnet/minecraft/class_8150;field_42633:Lnet/minecraft/class_8150$class_8151;named attackLnet/minecraft/entity/decoration/InteractionEntity;attack:Lnet/minecraft/entity/decoration/InteractionEntity$Interaction;
-
interaction
- Mappings:
Namespace Name Mixin selector official lLbft;l:Lbft$a;intermediary field_42634Lnet/minecraft/class_8150;field_42634:Lnet/minecraft/class_8150$class_8151;named interactionLnet/minecraft/entity/decoration/InteractionEntity;interaction:Lnet/minecraft/entity/decoration/InteractionEntity$Interaction;
-
-
Constructor Details
-
InteractionEntity
- Mappings:
Namespace Name Mixin selector official <init>Lbfi;<init>(Lbfm;Lcml;)Vintermediary <init>Lnet/minecraft/class_1297;<init>(Lnet/minecraft/class_1299;Lnet/minecraft/class_1937;)Vnamed <init>Lnet/minecraft/entity/Entity;<init>(Lnet/minecraft/entity/EntityType;Lnet/minecraft/world/World;)V
-
-
Method Details
-
initDataTracker
protected void initDataTracker()Initializes data tracker.- Specified by:
initDataTrackerin classEntity- Mappings:
Namespace Name Mixin selector official a_Lbfi;a_()Vintermediary method_5693Lnet/minecraft/class_1297;method_5693()Vnamed initDataTrackerLnet/minecraft/entity/Entity;initDataTracker()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.
nbtmight 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.- Specified by:
readCustomDataFromNbtin classEntity- See Also:
- Mappings:
Namespace Name Mixin selector official aLbfi;a(Lqr;)Vintermediary method_5749Lnet/minecraft/class_1297;method_5749(Lnet/minecraft/class_2487;)Vnamed readCustomDataFromNbtLnet/minecraft/entity/Entity;readCustomDataFromNbt(Lnet/minecraft/nbt/NbtCompound;)V
-
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.
- Specified by:
writeCustomDataToNbtin classEntity- See Also:
- Mappings:
Namespace Name Mixin selector official bLbfi;b(Lqr;)Vintermediary method_5652Lnet/minecraft/class_1297;method_5652(Lnet/minecraft/class_2487;)Vnamed writeCustomDataToNbtLnet/minecraft/entity/Entity;writeCustomDataToNbt(Lnet/minecraft/nbt/NbtCompound;)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:
onTrackedDataSetin classEntity- Mappings:
Namespace Name Mixin selector official aLbfi;a(Laby;)Vintermediary method_5674Lnet/minecraft/class_1297;method_5674(Lnet/minecraft/class_2940;)Vnamed onTrackedDataSetLnet/minecraft/entity/Entity;onTrackedDataSet(Lnet/minecraft/entity/data/TrackedData;)V
-
canBeHitByProjectile
public boolean canBeHitByProjectile()- Overrides:
canBeHitByProjectilein classEntity- Mappings:
Namespace Name Mixin selector official bnLbfi;bn()Zintermediary method_49108Lnet/minecraft/class_1297;method_49108()Znamed canBeHitByProjectileLnet/minecraft/entity/Entity;canBeHitByProjectile()Z
-
canHit
public boolean canHit()Returns whether the entity can be hit with a projectile or be targeted by the player crosshair.- Overrides:
canHitin classEntity- Returns:
- whether the entity can be hit with a projectile or be targeted by the player crosshair
- Mappings:
Namespace Name Mixin selector official boLbfi;bo()Zintermediary method_5863Lnet/minecraft/class_1297;method_5863()Znamed canHitLnet/minecraft/entity/Entity;canHit()Z
-
getPistonBehavior
Returns the behavior of the piston for this entity.This is
PistonBehavior.NORMALby default.AreaEffectCloudEntity,MarkerEntity, and markerArmorStandEntityreturnPistonBehavior.IGNORE, causing the piston to not affect the entity's position. Other piston behaviors are inapplicable to entities, and treated likePistonBehavior.NORMAL.- Overrides:
getPistonBehaviorin classEntity- Returns:
- the behavior of the piston for this entity
- Mappings:
Namespace Name Mixin selector official l_Lbfi;l_()Ldxh;intermediary method_5657Lnet/minecraft/class_1297;method_5657()Lnet/minecraft/class_3619;named getPistonBehaviorLnet/minecraft/entity/Entity;getPistonBehavior()Lnet/minecraft/block/piston/PistonBehavior;
-
canAvoidTraps
public boolean canAvoidTraps()Returns whether the entity cannot trigger pressure plates or tripwires.BatEntityis the only entity in vanilla that can avoid traps.- Overrides:
canAvoidTrapsin classEntity- Returns:
- whether the entity cannot trigger pressure plates or tripwires
- Mappings:
Namespace Name Mixin selector official c_Lbfi;c_()Zintermediary method_5696Lnet/minecraft/class_1297;method_5696()Znamed canAvoidTrapsLnet/minecraft/entity/Entity;canAvoidTraps()Z
-
handleAttack
Handles a player attacking the entity. This is called beforeEntity.damage(net.minecraft.entity.damage.DamageSource, float)and can be used to restrict players from attacking the entity by returningtrue.- Overrides:
handleAttackin classEntity- Returns:
- whether to stop handling the attack
- See Also:
- Mappings:
Namespace Name Mixin selector official rLbfi;r(Lbfi;)Zintermediary method_5698Lnet/minecraft/class_1297;method_5698(Lnet/minecraft/class_1297;)Znamed handleAttackLnet/minecraft/entity/Entity;handleAttack(Lnet/minecraft/entity/Entity;)Z
-
interact
Called when a player interacts with this entity.- Overrides:
interactin classEntity- Parameters:
player- the playerhand- the hand the player used to interact with this entity- Mappings:
Namespace Name Mixin selector official aLbfi;a(Lbyn;Lbdv;)Lbdw;intermediary method_5688Lnet/minecraft/class_1297;method_5688(Lnet/minecraft/class_1657;Lnet/minecraft/class_1268;)Lnet/minecraft/class_1269;named interactLnet/minecraft/entity/Entity;interact(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;)Lnet/minecraft/util/ActionResult;
-
tick
public void tick()Ticks this entity. -
getLastAttacker
- Specified by:
getLastAttackerin interfaceAttackable- Mappings:
Namespace Name Mixin selector official M_Lbfg;M_()Lbfy;intermediary method_49107Lnet/minecraft/class_8149;method_49107()Lnet/minecraft/class_1309;named getLastAttackerLnet/minecraft/entity/Attackable;getLastAttacker()Lnet/minecraft/entity/LivingEntity;
-
getTarget
-
setInteractionWidth
private void setInteractionWidth(float width) - Mappings:
Namespace Name Mixin selector official aLbft;a(F)Vintermediary method_49109Lnet/minecraft/class_8150;method_49109(F)Vnamed setInteractionWidthLnet/minecraft/entity/decoration/InteractionEntity;setInteractionWidth(F)V
-
getInteractionWidth
private float getInteractionWidth()- Mappings:
Namespace Name Mixin selector official kLbft;k()Fintermediary method_49116Lnet/minecraft/class_8150;method_49116()Fnamed getInteractionWidthLnet/minecraft/entity/decoration/InteractionEntity;getInteractionWidth()F
-
setInteractionHeight
private void setInteractionHeight(float height) - Mappings:
Namespace Name Mixin selector official sLbft;s(F)Vintermediary method_49113Lnet/minecraft/class_8150;method_49113(F)Vnamed setInteractionHeightLnet/minecraft/entity/decoration/InteractionEntity;setInteractionHeight(F)V
-
getInteractionHeight
private float getInteractionHeight()- Mappings:
Namespace Name Mixin selector official oLbft;o()Fintermediary method_49117Lnet/minecraft/class_8150;method_49117()Fnamed getInteractionHeightLnet/minecraft/entity/decoration/InteractionEntity;getInteractionHeight()F
-
setResponse
private void setResponse(boolean response) - Mappings:
Namespace Name Mixin selector official aLbft;a(Z)Vintermediary method_49112Lnet/minecraft/class_8150;method_49112(Z)Vnamed setResponseLnet/minecraft/entity/decoration/InteractionEntity;setResponse(Z)V
-
shouldRespond
private boolean shouldRespond()- Mappings:
Namespace Name Mixin selector official pLbft;p()Zintermediary method_49118Lnet/minecraft/class_8150;method_49118()Znamed shouldRespondLnet/minecraft/entity/decoration/InteractionEntity;shouldRespond()Z
-
getDimensions
- Mappings:
Namespace Name Mixin selector official qLbft;q()Lbfj;intermediary method_49119Lnet/minecraft/class_8150;method_49119()Lnet/minecraft/class_4048;named getDimensionsLnet/minecraft/entity/decoration/InteractionEntity;getDimensions()Lnet/minecraft/entity/EntityDimensions;
-
getDimensions
Returns the dimensions of the entity with the givenpose.- Overrides:
getDimensionsin classEntity- Returns:
- the dimensions of the entity with the given
pose - See Also:
- Mappings:
Namespace Name Mixin selector official aLbfi;a(Lbgk;)Lbfj;intermediary method_18377Lnet/minecraft/class_1297;method_18377(Lnet/minecraft/class_4050;)Lnet/minecraft/class_4048;named getDimensionsLnet/minecraft/entity/Entity;getDimensions(Lnet/minecraft/entity/EntityPose;)Lnet/minecraft/entity/EntityDimensions;
-
calculateBoundingBox
- Overrides:
calculateBoundingBoxin classEntity- Mappings:
Namespace Name Mixin selector official amLbfi;am()Ledw;intermediary method_33332Lnet/minecraft/class_1297;method_33332()Lnet/minecraft/class_238;named calculateBoundingBoxLnet/minecraft/entity/Entity;calculateBoundingBox()Lnet/minecraft/util/math/Box;
-