Class ItemEntity
- All Implemented Interfaces:
DataTracked
,Ownable
,ScoreHolder
,Nameable
,EntityLike
- Mappings:
Namespace Name named net/minecraft/entity/ItemEntity
intermediary net/minecraft/class_1542
official cma
-
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 int
private static final int
static final float
private static final float
private int
private int
The number of ticks since this item entity has been created.private static final int
private int
private static final TrackedData
<ItemStack> final float
Fields inherited from class net.minecraft.entity.Entity
age, collidedSoftly, dataTracker, DEFAULT_FRICTION, DEFAULT_MIN_FREEZE_DAMAGE_TICKS, DEFAULT_PORTAL_COOLDOWN, distanceTraveled, fallDistance, field_44870, field_44871, field_44872, field_49073, field_49791, firstUpdate, FLAGS, fluidHeight, FREEZING_DAMAGE_INTERVAL, GLIDING_FLAG_INDEX, GLOWING_FLAG_INDEX, groundCollision, horizontalCollision, ID_KEY, inPowderSnow, intersectionChecked, lastRenderX, lastRenderY, lastRenderZ, MAX_COMMAND_TAGS, MAX_RIDING_COOLDOWN, MIN_RISING_BUBBLE_COLUMN_SPEED, movementMultiplier, noClip, ON_FIRE_FLAG_INDEX, PASSENGERS_KEY, portalManager, POSE, prevPitch, prevX, prevY, prevYaw, prevZ, random, ridingCooldown, speed, submergedInWater, supportingBlockPos, timeUntilRegen, touchingWater, uuid, UUID_KEY, uuidString, velocityDirty, velocityModified, verticalCollision, wasInPowderSnow
Fields inherited from interface net.minecraft.scoreboard.ScoreHolder
WILDCARD, WILDCARD_NAME
-
Constructor Summary
ModifierConstructorDescriptionItemEntity
(EntityType<? extends ItemEntity> type, World world) private
ItemEntity
(ItemEntity entity) ItemEntity
(World world, double x, double y, double z, ItemStack stack) ItemEntity
(World world, double x, double y, double z, ItemStack stack, double velocityX, double velocityY, double velocityZ) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
applyBuoyancy
(double horizontalMultiplier) private void
private void
private boolean
canMerge()
static boolean
boolean
Returns whether the pickup delay of this item entity is greater than 0.final boolean
clientDamage
(DamageSource source) copy()
void
Copies serializable data and nether portal data fromoriginal
.final boolean
damage
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.float
Returns the body yaw of the entity.protected double
int
Returns the number of ticks since this item entity has been created.protected Entity.MoveEffect
Returns the possible effect(s) of an entity moving.getName()
Returns the name of this object.getOwner()
static float
getRotation
(float float2, float float3) Returns the sound category for sounds from this entity.getStack()
Returns the item stack contained in this item entity.getStackReference
(int mappedIndex) Obtains a stack reference to be modified.protected void
initDataTracker
(DataTracker.Builder builder) Initializes data tracker.boolean
Returns whether the entity can be attacked by players.boolean
Returns whether the entity is immune to fire damage.boolean
isImmuneToExplosion
(Explosion explosion) Returns whether the entity is immune from explosion knockback and damage.private static void
merge
(ItemEntity targetEntity, ItemStack targetStack, ItemEntity sourceEntity, ItemStack sourceStack) private static void
merge
(ItemEntity targetEntity, ItemStack stack1, ItemStack stack2) static ItemStack
boolean
Returns whether the entity should not emit vibrations.void
onPlayerCollision
(PlayerEntity player) Called when a player collides with the entity.void
onTrackedDataSet
(TrackedData<?> data) Called on the client when the tracked data is set.void
Reads custom data fromnbt
.void
Sets the number of ticks before this item entity can be picked up to 0.void
void
void
void
void
setPickupDelay
(int pickupDelay) Sets the number of ticks before this item entity can be picked up topickupDelay
.void
Makes this item entity impossible to be picked up by setting its pickup delay to 32767.void
Sets the item stack contained in this item entity tostack
.void
setThrower
(Entity thrower) Sets the thrower of this item entity tothrower
.void
Sets the number of ticks before this item entity can be picked up to the default value of 10.protected boolean
teleportTo
(TeleportTarget teleportTarget) Teleports this entity to another location, potentially in another world.void
tick()
Ticks this entity.private void
tryMerge()
private void
tryMerge
(ItemEntity other) void
Writes custom data tonbt
.Methods inherited from class net.minecraft.entity.Entity
addAirTravelEffects, addCommandTag, addFlapEffects, addPassenger, addPortalChunkTicketAt, addVelocity, addVelocity, addVelocityInternal, adjustMovementForCollisions, adjustMovementForPiston, adjustMovementForSneaking, animateDamage, applyGravity, applyMirror, applyRotation, attemptTickInVoid, baseTick, bypassesLandingEffects, bypassesSteppingEffects, calculateBoundingBox, calculateDimensions, calculateNextStepSoundDistance, canAddPassenger, canAvoidTraps, canBeHitByProjectile, canBeSpectated, canExplosionDestroyBlock, canFreeze, canHit, canModifyAt, canMoveVoluntarily, canSprintAsVehicle, canStartRiding, canTeleportBetween, canUsePortals, changeLookDirection, checkDespawn, checkWaterState, collidesWith, collidesWithStateAtPos, copyPositionAndRotation, couldAcceptPassenger, createSpawnPacket, detach, discard, dismountVehicle, distanceTo, doesNotCollide, doesRenderOnFire, dropItem, dropItem, dropStack, dropStack, emitGameEvent, emitGameEvent, entityDataRequiresOperator, equals, extinguish, extinguishWithSound, fall, getAir, getAttachments, getBlockPos, getBlockStateAtPos, getBlockX, getBlockY, getBlockZ, getBodyY, getBoundingBox, getBrightnessAtEyes, getBurningDuration, getCameraPosVec, getChunkPos, getClientCameraPosVec, getCommandSource, getCommandTags, getControllingPassenger, getControllingVehicle, getCustomName, getDamageSources, getDataTracker, getDefaultName, getDefaultPortalCooldown, getDimensions, getDisplayName, getEffectiveExplosionResistance, getEntityWorld, getEyeHeight, getEyePos, getEyeY, getFacing, getFinalGravity, getFireTicks, getFirstPassenger, getFlag, getFluidHeight, getFreezingScale, getFrozenTicks, getHandPosOffset, getHeadYaw, getHeight, getHighSpeedSplashSound, getHorizontalFacing, getHoverEvent, getId, getJumpVelocityMultiplier, getLandingBlockState, getLandingPos, getLastRenderPos, getLeashOffset, getLeashOffset, getLeashPos, getLerpedPitch, getLerpedPos, getLerpedYaw, getLerpTargetPitch, getLerpTargetX, getLerpTargetY, getLerpTargetYaw, getLerpTargetZ, getLootTableKey, getMaxAir, getMinFreezeDamageTicks, getMovement, getMovementDirection, getNameForScoreboard, getOppositeRotationVector, getOppositeRotationVector, getParticleX, getParticleZ, getPassengerAttachmentPos, getPassengerAttachmentPos, getPassengerDismountOffset, getPassengerList, getPassengerRidingPos, getPassengersDeep, getPickBlockStack, getPistonBehavior, getPitch, getPitch, getPlayerPassengers, getPortalCooldown, getPos, getPose, getPosWithYOffset, getProjectileDeflection, getRandom, getRandomBodyY, getRegistryManager, getRemovalReason, getRenderDistanceMultiplier, getRootVehicle, getRotationClient, getRotationVec, getRotationVecClient, getRotationVector, getRotationVector, getSafeFallDistance, getSavedEntityId, getScoreboardTeam, getServer, getSplashSound, getStandingEyeHeight, getStepHeight, getSteppingBlockState, getSteppingPos, getStepSoundPos, getSwimHeight, getSwimSound, getSyncedPos, getTargetingMargin, getTeamColorValue, getTrackedPosition, getType, getUuid, getUuidAsString, getVehicle, getVehicleAttachmentPos, getVelocity, getVelocityMultiplier, getWeaponStack, getWidth, getWorld, getWorldSpawnPos, getX, getY, getYaw, getYaw, getZ, handleAttack, handleFallDamage, handleStatus, hasCollidedSoftly, hasControllingPassenger, hasCustomName, hashCode, hasNoGravity, hasPassenger, hasPassenger, hasPassengerDeep, hasPassengers, hasPlayerRider, hasPortalCooldown, hasVehicle, interact, interactAt, isAlive, isAlwaysInvulnerableTo, isCollidable, isConnectedThroughVehicle, isControlledByPlayer, isCrawling, isCustomNameVisible, isDescending, isFlappingWings, isFrozen, isGlowing, isGlowingLocal, isInFluid, isInLava, isInPose, isInRange, isInRange, isInSameTeam, isInsideWall, isInsideWaterOrBubbleColumn, isInSneakingPose, isInSwimmingPose, isInvisible, isInvisibleTo, isInvulnerable, isLiving, isLocalPlayerOrLogicalSideForUpdatingMovement, 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, lerpPosAndRotation, lerpYaw, limitFallDistance, lookAt, move, movementInputToVelocity, offsetX, offsetZ, onBlockCollision, onBubbleColumnCollision, onBubbleColumnSurfaceCollision, onDamaged, onDataTrackerUpdate, onExplodedBy, onKilledOther, onLanding, onPassengerLookAround, onRemove, onRemoved, onSpawnPacket, onStartedTrackingBy, onStoppedTrackingBy, onStruckByLightning, onSwimmingStart, playCombinationStepSounds, playExtinguishSound, playSecondaryStepSound, playSound, playSoundIfNotSilent, playStepSound, playSwimSound, playSwimSound, populateCrashReport, positionInPortal, pushAwayFrom, pushOutOfBlocks, queueBlockCollisionCheck, raycast, readNbt, recalculateDimensions, refreshPosition, refreshPositionAfterTeleport, refreshPositionAfterTeleport, refreshPositionAndAngles, refreshPositionAndAngles, refreshPositionAndAngles, reinitDimensions, remove, removeAllPassengers, removeCommandTag, removeFromDimension, removePassenger, requestTeleport, requestTeleportAndDismount, requestTeleportOffset, resetLerp, resetPortalCooldown, resetPosition, rotate, saveNbt, saveSelfNbt, scheduleVelocityUpdate, serverDamage, setAir, setAngles, setBodyYaw, setBoundingBox, setChangeListener, setCustomName, setCustomNameVisible, setFireTicks, setFlag, setFrozenTicks, setGlowing, setHeadYaw, setId, setInPowderSnow, setInvisible, setInvulnerable, setMovement, setNoGravity, setOnFire, setOnFireFor, setOnFireForTicks, setOnFireFromLava, setOnGround, setPitch, setPortalCooldown, setPos, setPose, setPosition, setPosition, setPosition, setPrevPositionAndAngles, setRemoved, setRenderDistanceMultiplier, setRotation, setSilent, setSneaking, setSprinting, setSwimming, setUuid, setVelocity, setVelocity, setVelocityClient, setWorld, setYaw, shouldControlVehicles, shouldDismountUnderwater, shouldEscapePowderSnow, shouldRender, shouldRender, shouldRenderName, shouldSave, shouldSetPositionOnLoad, shouldSpawnSprintingParticles, shouldTickBlockCollision, sidedDamage, slowMovement, spawnSprintingParticles, squaredDistanceTo, squaredDistanceTo, squaredDistanceTo, startRiding, startRiding, stopRiding, streamPassengersAndSelf, streamSelfAndPassengers, teleport, tickBlockCollision, tickBlockCollision, tickInVoid, tickPortalCooldown, tickPortalTeleportation, tickRiding, toNbtList, toNbtList, toString, tryUsePortal, unsetRemoved, updateEventHandler, updateKilledAdvancementCriterion, updateMovementInFluid, updatePassengerForDismount, updatePassengerPosition, updatePassengerPosition, updatePosition, updatePositionAndAngles, updatePrevAngles, updatePrevPosition, updateSupportingBlockPos, updateSwimming, updateTrackedHeadRotation, updateTrackedPosition, updateTrackedPositionAndAngles, updateVelocity, updateWaterState, writeNbt
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.scoreboard.ScoreHolder
getStyledDisplayName
-
Field Details
-
STACK
- Mappings:
Namespace Name Mixin selector named STACK
Lnet/minecraft/entity/ItemEntity;STACK:Lnet/minecraft/entity/data/TrackedData;
intermediary field_7199
Lnet/minecraft/class_1542;field_7199:Lnet/minecraft/class_2940;
official c
Lcma;c:Lalc;
-
field_48703
private static final float field_48703- See Also:
- Mappings:
Namespace Name Mixin selector named field_48703
Lnet/minecraft/entity/ItemEntity;field_48703:F
intermediary field_48703
Lnet/minecraft/class_1542;field_48703:F
official d
Lcma;d:F
-
field_48702
public static final float field_48702- See Also:
- Mappings:
Namespace Name Mixin selector named field_48702
Lnet/minecraft/entity/ItemEntity;field_48702:F
intermediary field_48702
Lnet/minecraft/class_1542;field_48702:F
official a
Lcma;a:F
-
DESPAWN_AGE
private static final int DESPAWN_AGE- See Also:
- Mappings:
Namespace Name Mixin selector named DESPAWN_AGE
Lnet/minecraft/entity/ItemEntity;DESPAWN_AGE:I
intermediary field_30456
Lnet/minecraft/class_1542;field_30456:I
official e
Lcma;e:I
-
CANNOT_PICK_UP_DELAY
private static final int CANNOT_PICK_UP_DELAY- See Also:
- Mappings:
Namespace Name Mixin selector named CANNOT_PICK_UP_DELAY
Lnet/minecraft/entity/ItemEntity;CANNOT_PICK_UP_DELAY:I
intermediary field_30457
Lnet/minecraft/class_1542;field_30457:I
official f
Lcma;f:I
-
NEVER_DESPAWN_AGE
private static final int NEVER_DESPAWN_AGE- See Also:
- Mappings:
Namespace Name Mixin selector named NEVER_DESPAWN_AGE
Lnet/minecraft/entity/ItemEntity;NEVER_DESPAWN_AGE:I
intermediary field_30458
Lnet/minecraft/class_1542;field_30458:I
official g
Lcma;g:I
-
itemAge
private int itemAgeThe number of ticks since this item entity has been created. It is a short value with keyAge
in the NBT structure.It differs from
Entity.age
.- Mappings:
Namespace Name Mixin selector named itemAge
Lnet/minecraft/entity/ItemEntity;itemAge:I
intermediary field_7204
Lnet/minecraft/class_1542;field_7204:I
official h
Lcma;h:I
-
pickupDelay
private int pickupDelay- Mappings:
Namespace Name Mixin selector named pickupDelay
Lnet/minecraft/entity/ItemEntity;pickupDelay:I
intermediary field_7202
Lnet/minecraft/class_1542;field_7202:I
official i
Lcma;i:I
-
health
private int health- Mappings:
Namespace Name Mixin selector named health
Lnet/minecraft/entity/ItemEntity;health:I
intermediary field_7201
Lnet/minecraft/class_1542;field_7201:I
official j
Lcma;j:I
-
throwerUuid
- Mappings:
Namespace Name Mixin selector named throwerUuid
Lnet/minecraft/entity/ItemEntity;throwerUuid:Ljava/util/UUID;
intermediary field_7200
Lnet/minecraft/class_1542;field_7200:Ljava/util/UUID;
official k
Lcma;k:Ljava/util/UUID;
-
thrower
- Mappings:
Namespace Name Mixin selector named thrower
Lnet/minecraft/entity/ItemEntity;thrower:Lnet/minecraft/entity/Entity;
intermediary field_46653
Lnet/minecraft/class_1542;field_46653:Lnet/minecraft/class_1297;
official l
Lcma;l:Lbvj;
-
owner
- Mappings:
Namespace Name Mixin selector named owner
Lnet/minecraft/entity/ItemEntity;owner:Ljava/util/UUID;
intermediary field_41893
Lnet/minecraft/class_1542;field_41893:Ljava/util/UUID;
official m
Lcma;m:Ljava/util/UUID;
-
uniqueOffset
public final float uniqueOffset- Mappings:
Namespace Name Mixin selector named uniqueOffset
Lnet/minecraft/entity/ItemEntity;uniqueOffset:F
intermediary field_7203
Lnet/minecraft/class_1542;field_7203:F
official b
Lcma;b:F
-
-
Constructor Details
-
ItemEntity
- Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/entity/Entity;<init>(Lnet/minecraft/entity/EntityType;Lnet/minecraft/world/World;)V
intermediary <init>
Lnet/minecraft/class_1297;<init>(Lnet/minecraft/class_1299;Lnet/minecraft/class_1937;)V
official <init>
Lbvj;<init>(Lbvq;Ldhh;)V
-
ItemEntity
- Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/entity/ItemEntity;<init>(Lnet/minecraft/world/World;DDDLnet/minecraft/item/ItemStack;)V
intermediary <init>
Lnet/minecraft/class_1542;<init>(Lnet/minecraft/class_1937;DDDLnet/minecraft/class_1799;)V
official <init>
Lcma;<init>(Ldhh;DDDLcxo;)V
-
ItemEntity
public ItemEntity(World world, double x, double y, double z, ItemStack stack, double velocityX, double velocityY, double velocityZ) - Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/entity/ItemEntity;<init>(Lnet/minecraft/world/World;DDDLnet/minecraft/item/ItemStack;DDD)V
intermediary <init>
Lnet/minecraft/class_1542;<init>(Lnet/minecraft/class_1937;DDDLnet/minecraft/class_1799;DDD)V
official <init>
Lcma;<init>(Ldhh;DDDLcxo;DDD)V
-
ItemEntity
- Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/entity/ItemEntity;<init>(Lnet/minecraft/entity/ItemEntity;)V
intermediary <init>
Lnet/minecraft/class_1542;<init>(Lnet/minecraft/class_1542;)V
official <init>
Lcma;<init>(Lcma;)V
-
-
Method Details
-
occludeVibrationSignals
public boolean occludeVibrationSignals()Returns whether the entity should not emit vibrations.By default, wool or carpet item entities, and
WardenEntity
do not emit vibrations.- Overrides:
occludeVibrationSignals
in classEntity
- Returns:
- whether the entity should not emit vibrations
- Mappings:
Namespace Name Mixin selector named occludeVibrationSignals
Lnet/minecraft/entity/Entity;occludeVibrationSignals()Z
intermediary method_33189
Lnet/minecraft/class_1297;method_33189()Z
official bh
Lbvj;bh()Z
-
getOwner
-
copyFrom
Copies serializable data and nether portal data fromoriginal
. -
getMoveEffect
Returns the possible effect(s) of an entity moving.- Overrides:
getMoveEffect
in classEntity
- Implementation Note:
- If an entity does not emit game events or play move sounds, this method should be overridden as returning a value other than ALL allows skipping some movement logic and boost ticking performance.
- Mappings:
Namespace Name Mixin selector named getMoveEffect
Lnet/minecraft/entity/Entity;getMoveEffect()Lnet/minecraft/entity/Entity$MoveEffect;
intermediary method_33570
Lnet/minecraft/class_1297;method_33570()Lnet/minecraft/class_1297$class_5799;
official bg
Lbvj;bg()Lbvj$c;
-
initDataTracker
Initializes data tracker.- Specified by:
initDataTracker
in classEntity
- API Note:
- Subclasses should override this and add to the builder any data that needs to be tracked.
- Mappings:
Namespace Name Mixin selector named initDataTracker
Lnet/minecraft/entity/Entity;initDataTracker(Lnet/minecraft/entity/data/DataTracker$Builder;)V
intermediary method_5693
Lnet/minecraft/class_1297;method_5693(Lnet/minecraft/class_2945$class_9222;)V
official a
Lbvj;a(Lalg$a;)V
-
getGravity
protected double getGravity()- Overrides:
getGravity
in classEntity
- Mappings:
Namespace Name Mixin selector named getGravity
Lnet/minecraft/entity/Entity;getGravity()D
intermediary method_7490
Lnet/minecraft/class_1297;method_7490()D
official bd
Lbvj;bd()D
-
tick
public void tick()Ticks this entity.- Overrides:
tick
in classEntity
- See Also:
- API Note:
- This can be overridden to add additional logics.
super.tick();
should be called in those cases. - Implementation Note:
- By default, this delegates all logics to
Entity.baseTick()
. - Mappings:
Namespace Name Mixin selector named tick
Lnet/minecraft/entity/Entity;tick()V
intermediary method_5773
Lnet/minecraft/class_1297;method_5773()V
official h
Lbvj;h()V
-
getVelocityAffectingPos
- Overrides:
getVelocityAffectingPos
in classEntity
- Mappings:
Namespace Name Mixin selector named getVelocityAffectingPos
Lnet/minecraft/entity/Entity;getVelocityAffectingPos()Lnet/minecraft/util/math/BlockPos;
intermediary method_23314
Lnet/minecraft/class_1297;method_23314()Lnet/minecraft/class_2338;
official aQ
Lbvj;aQ()Ljh;
-
applyWaterBuoyancy
private void applyWaterBuoyancy()- Mappings:
Namespace Name Mixin selector named applyWaterBuoyancy
Lnet/minecraft/entity/ItemEntity;applyWaterBuoyancy()V
intermediary method_6974
Lnet/minecraft/class_1542;method_6974()V
official A
Lcma;A()V
-
applyLavaBuoyancy
private void applyLavaBuoyancy()- Mappings:
Namespace Name Mixin selector named applyLavaBuoyancy
Lnet/minecraft/entity/ItemEntity;applyLavaBuoyancy()V
intermediary method_24348
Lnet/minecraft/class_1542;method_24348()V
official B
Lcma;B()V
-
applyBuoyancy
private void applyBuoyancy(double horizontalMultiplier) - Mappings:
Namespace Name Mixin selector named applyBuoyancy
Lnet/minecraft/entity/ItemEntity;applyBuoyancy(D)V
intermediary method_64460
Lnet/minecraft/class_1542;method_64460(D)V
official h
Lcma;h(D)V
-
tryMerge
private void tryMerge()- Mappings:
Namespace Name Mixin selector named tryMerge
Lnet/minecraft/entity/ItemEntity;tryMerge()V
intermediary method_6973
Lnet/minecraft/class_1542;method_6973()V
official C
Lcma;C()V
-
canMerge
private boolean canMerge()- Mappings:
Namespace Name Mixin selector named canMerge
Lnet/minecraft/entity/ItemEntity;canMerge()Z
intermediary method_20397
Lnet/minecraft/class_1542;method_20397()Z
official D
Lcma;D()Z
-
tryMerge
- Mappings:
Namespace Name Mixin selector named tryMerge
Lnet/minecraft/entity/ItemEntity;tryMerge(Lnet/minecraft/entity/ItemEntity;)V
intermediary method_6972
Lnet/minecraft/class_1542;method_6972(Lnet/minecraft/class_1542;)V
official a
Lcma;a(Lcma;)V
-
canMerge
- Mappings:
Namespace Name Mixin selector named canMerge
Lnet/minecraft/entity/ItemEntity;canMerge(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;)Z
intermediary method_24017
Lnet/minecraft/class_1542;method_24017(Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;)Z
official a
Lcma;a(Lcxo;Lcxo;)Z
-
merge
- Mappings:
Namespace Name Mixin selector named merge
Lnet/minecraft/entity/ItemEntity;merge(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;I)Lnet/minecraft/item/ItemStack;
intermediary method_24018
Lnet/minecraft/class_1542;method_24018(Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;I)Lnet/minecraft/class_1799;
official a
Lcma;a(Lcxo;Lcxo;I)Lcxo;
-
merge
- Mappings:
Namespace Name Mixin selector named merge
Lnet/minecraft/entity/ItemEntity;merge(Lnet/minecraft/entity/ItemEntity;Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;)V
intermediary method_24016
Lnet/minecraft/class_1542;method_24016(Lnet/minecraft/class_1542;Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;)V
official a
Lcma;a(Lcma;Lcxo;Lcxo;)V
-
merge
private static void merge(ItemEntity targetEntity, ItemStack targetStack, ItemEntity sourceEntity, ItemStack sourceStack) - Mappings:
Namespace Name Mixin selector named merge
Lnet/minecraft/entity/ItemEntity;merge(Lnet/minecraft/entity/ItemEntity;Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/ItemEntity;Lnet/minecraft/item/ItemStack;)V
intermediary method_18006
Lnet/minecraft/class_1542;method_18006(Lnet/minecraft/class_1542;Lnet/minecraft/class_1799;Lnet/minecraft/class_1542;Lnet/minecraft/class_1799;)V
official a
Lcma;a(Lcma;Lcxo;Lcma;Lcxo;)V
-
isFireImmune
public boolean isFireImmune()Returns whether the entity is immune to fire damage.- Overrides:
isFireImmune
in classEntity
- Returns:
- whether the entity is immune to fire damage
- See Also:
- Mappings:
Namespace Name Mixin selector named isFireImmune
Lnet/minecraft/entity/Entity;isFireImmune()Z
intermediary method_5753
Lnet/minecraft/class_1297;method_5753()Z
official bi
Lbvj;bi()Z
-
shouldPlayBurnSoundInLava
protected boolean shouldPlayBurnSoundInLava()- Overrides:
shouldPlayBurnSoundInLava
in classEntity
- Mappings:
Namespace Name Mixin selector named shouldPlayBurnSoundInLava
Lnet/minecraft/entity/Entity;shouldPlayBurnSoundInLava()Z
intermediary method_64270
Lnet/minecraft/class_1297;method_64270()Z
official aF
Lbvj;aF()Z
-
clientDamage
- Overrides:
clientDamage
in classEntity
- Mappings:
Namespace Name Mixin selector named clientDamage
Lnet/minecraft/entity/Entity;clientDamage(Lnet/minecraft/entity/damage/DamageSource;)Z
intermediary method_5643
Lnet/minecraft/class_1297;method_5643(Lnet/minecraft/class_1282;)Z
official b
Lbvj;b(Lbtz;)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
invalid reference
#isInvulnerableTo
- Specified by:
damage
in classEntity
- Returns:
- whether the entity was actually damaged
- See Also:
- Mappings:
Namespace Name Mixin selector named damage
Lnet/minecraft/entity/Entity;damage(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/damage/DamageSource;F)Z
intermediary method_64397
Lnet/minecraft/class_1297;method_64397(Lnet/minecraft/class_3218;Lnet/minecraft/class_1282;F)Z
official a
Lbvj;a(Lash;Lbtz;F)Z
-
isImmuneToExplosion
Returns whether the entity is immune from explosion knockback and damage.Invisible
ArmorStandEntity
and emerging or diggingWardenEntity
are immune from explosions.- Overrides:
isImmuneToExplosion
in classEntity
- Returns:
- whether the entity is immune from explosion knockback and damage
- Mappings:
Namespace Name Mixin selector named isImmuneToExplosion
Lnet/minecraft/entity/Entity;isImmuneToExplosion(Lnet/minecraft/world/explosion/Explosion;)Z
intermediary method_5659
Lnet/minecraft/class_1297;method_5659(Lnet/minecraft/class_1927;)Z
official a
Lbvj;a(Ldgz;)Z
-
writeCustomDataToNbt
Writes custom data tonbt
. Subclasses have 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:
writeCustomDataToNbt
in classEntity
- See Also:
- Mappings:
Namespace Name Mixin selector named writeCustomDataToNbt
Lnet/minecraft/entity/Entity;writeCustomDataToNbt(Lnet/minecraft/nbt/NbtCompound;)V
intermediary method_5652
Lnet/minecraft/class_1297;method_5652(Lnet/minecraft/class_2487;)V
official b
Lbvj;b(Lux;)V
-
readCustomDataFromNbt
Reads custom data fromnbt
. Subclasses have 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.- Specified by:
readCustomDataFromNbt
in classEntity
- See Also:
- Mappings:
Namespace Name Mixin selector named readCustomDataFromNbt
Lnet/minecraft/entity/Entity;readCustomDataFromNbt(Lnet/minecraft/nbt/NbtCompound;)V
intermediary method_5749
Lnet/minecraft/class_1297;method_5749(Lnet/minecraft/class_2487;)V
official a
Lbvj;a(Lux;)V
-
onPlayerCollision
Called when a player collides with the entity. Does nothing by default.This should be overridden if the collision logic is specific to players, such as picking up item entities, experience orbs, or arrows.
- Overrides:
onPlayerCollision
in classEntity
- Mappings:
Namespace Name Mixin selector named onPlayerCollision
Lnet/minecraft/entity/Entity;onPlayerCollision(Lnet/minecraft/entity/player/PlayerEntity;)V
intermediary method_5694
Lnet/minecraft/class_1297;method_5694(Lnet/minecraft/class_1657;)V
official a_
Lbvj;a_(Lcpw;)V
-
getName
Returns the name of this object.This should return the custom name if it exists, otherwise the default name. This should not have styling applied.
- Specified by:
getName
in interfaceNameable
- Overrides:
getName
in classEntity
- Returns:
- the name of this object
- Mappings:
Namespace Name Mixin selector named getName
Lnet/minecraft/util/Nameable;getName()Lnet/minecraft/text/Text;
intermediary method_5477
Lnet/minecraft/class_1275;method_5477()Lnet/minecraft/class_2561;
official al
Lbtl;al()Lxv;
-
isAttackable
public boolean isAttackable()Returns whether the entity can be attacked by players.Note that this is not called for most entities defined in vanilla as unattackable (such as
ItemEntity
andExperienceOrbEntity
) as trying to attack them kicks the player.- Overrides:
isAttackable
in classEntity
- Returns:
- whether the entity can be attacked by players
- See Also:
- Mappings:
Namespace Name Mixin selector named isAttackable
Lnet/minecraft/entity/Entity;isAttackable()Z
intermediary method_5732
Lnet/minecraft/class_1297;method_5732()Z
official cB
Lbvj;cB()Z
-
teleportTo
Teleports this entity to another location, potentially in another world.Note if teleported to a different world, entities (excluding server player entities) are completely recreated at the destination.
- Overrides:
teleportTo
in classEntity
- Returns:
- the entity after teleporting
- Mappings:
Namespace Name Mixin selector named teleportTo
Lnet/minecraft/entity/Entity;teleportTo(Lnet/minecraft/world/TeleportTarget;)Lnet/minecraft/entity/Entity;
intermediary method_5731
Lnet/minecraft/class_1297;method_5731(Lnet/minecraft/class_5454;)Lnet/minecraft/class_1297;
official b
Lbvj;b(Leuw;)Lbvj;
-
getStack
Returns the item stack contained in this item entity.- Mappings:
Namespace Name Mixin selector named getStack
Lnet/minecraft/entity/ItemEntity;getStack()Lnet/minecraft/item/ItemStack;
intermediary method_6983
Lnet/minecraft/class_1542;method_6983()Lnet/minecraft/class_1799;
official l
Lcma;l()Lcxo;
-
setStack
Sets the item stack contained in this item entity tostack
.- Mappings:
Namespace Name Mixin selector named setStack
Lnet/minecraft/entity/ItemEntity;setStack(Lnet/minecraft/item/ItemStack;)V
intermediary method_6979
Lnet/minecraft/class_1542;method_6979(Lnet/minecraft/class_1799;)V
official a
Lcma;a(Lcxo;)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.
- Specified by:
onTrackedDataSet
in interfaceDataTracked
- Overrides:
onTrackedDataSet
in classEntity
- Mappings:
Namespace Name Mixin selector named onTrackedDataSet
Lnet/minecraft/entity/data/DataTracked;onTrackedDataSet(Lnet/minecraft/entity/data/TrackedData;)V
intermediary method_5674
Lnet/minecraft/class_9221;method_5674(Lnet/minecraft/class_2940;)V
official a
Lalf;a(Lalc;)V
-
setOwner
- Mappings:
Namespace Name Mixin selector named setOwner
Lnet/minecraft/entity/ItemEntity;setOwner(Ljava/util/UUID;)V
intermediary method_48349
Lnet/minecraft/class_1542;method_48349(Ljava/util/UUID;)V
official b
Lcma;b(Ljava/util/UUID;)V
-
setThrower
Sets the thrower of this item entity tothrower
.- Mappings:
Namespace Name Mixin selector named setThrower
Lnet/minecraft/entity/ItemEntity;setThrower(Lnet/minecraft/entity/Entity;)V
intermediary method_6981
Lnet/minecraft/class_1542;method_6981(Lnet/minecraft/class_1297;)V
official b
Lcma;b(Lbvj;)V
-
getItemAge
public int getItemAge()Returns the number of ticks since this item entity has been created.Increases every tick. When it equals to 6000 ticks (5 minutes), this item entity disappears.
Unlike Entity.age, it is persistent and not synchronized between the client and the server.
- See Also:
- Mappings:
Namespace Name Mixin selector named getItemAge
Lnet/minecraft/entity/ItemEntity;getItemAge()I
intermediary method_6985
Lnet/minecraft/class_1542;method_6985()I
official m
Lcma;m()I
-
setToDefaultPickupDelay
public void setToDefaultPickupDelay()Sets the number of ticks before this item entity can be picked up to the default value of 10.- Mappings:
Namespace Name Mixin selector named setToDefaultPickupDelay
Lnet/minecraft/entity/ItemEntity;setToDefaultPickupDelay()V
intermediary method_6988
Lnet/minecraft/class_1542;method_6988()V
official s
Lcma;s()V
-
resetPickupDelay
public void resetPickupDelay()Sets the number of ticks before this item entity can be picked up to 0.- Mappings:
Namespace Name Mixin selector named resetPickupDelay
Lnet/minecraft/entity/ItemEntity;resetPickupDelay()V
intermediary method_6975
Lnet/minecraft/class_1542;method_6975()V
official t
Lcma;t()V
-
setPickupDelayInfinite
public void setPickupDelayInfinite()Makes this item entity impossible to be picked up by setting its pickup delay to 32767.- Mappings:
Namespace Name Mixin selector named setPickupDelayInfinite
Lnet/minecraft/entity/ItemEntity;setPickupDelayInfinite()V
intermediary method_6989
Lnet/minecraft/class_1542;method_6989()V
official u
Lcma;u()V
-
setPickupDelay
public void setPickupDelay(int pickupDelay) Sets the number of ticks before this item entity can be picked up topickupDelay
.- Mappings:
Namespace Name Mixin selector named setPickupDelay
Lnet/minecraft/entity/ItemEntity;setPickupDelay(I)V
intermediary method_6982
Lnet/minecraft/class_1542;method_6982(I)V
official b
Lcma;b(I)V
-
cannotPickup
public boolean cannotPickup()Returns whether the pickup delay of this item entity is greater than 0.- Mappings:
Namespace Name Mixin selector named cannotPickup
Lnet/minecraft/entity/ItemEntity;cannotPickup()Z
intermediary method_6977
Lnet/minecraft/class_1542;method_6977()Z
official v
Lcma;v()Z
-
setNeverDespawn
public void setNeverDespawn()- Mappings:
Namespace Name Mixin selector named setNeverDespawn
Lnet/minecraft/entity/ItemEntity;setNeverDespawn()V
intermediary method_35190
Lnet/minecraft/class_1542;method_35190()V
official w
Lcma;w()V
-
setCovetedItem
public void setCovetedItem()- Mappings:
Namespace Name Mixin selector named setCovetedItem
Lnet/minecraft/entity/ItemEntity;setCovetedItem()V
intermediary method_6976
Lnet/minecraft/class_1542;method_6976()V
official x
Lcma;x()V
-
setDespawnImmediately
public void setDespawnImmediately()- Mappings:
Namespace Name Mixin selector named setDespawnImmediately
Lnet/minecraft/entity/ItemEntity;setDespawnImmediately()V
intermediary method_6987
Lnet/minecraft/class_1542;method_6987()V
official y
Lcma;y()V
-
getRotation
public static float getRotation(float float2, float float3) - Mappings:
Namespace Name Mixin selector named getRotation
Lnet/minecraft/entity/ItemEntity;getRotation(FF)F
intermediary method_27314
Lnet/minecraft/class_1542;method_27314(FF)F
official f
Lcma;f(FF)F
-
copy
- Mappings:
Namespace Name Mixin selector named copy
Lnet/minecraft/entity/ItemEntity;copy()Lnet/minecraft/entity/ItemEntity;
intermediary method_29271
Lnet/minecraft/class_1542;method_29271()Lnet/minecraft/class_1542;
official z
Lcma;z()Lcma;
-
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 named getSoundCategory
Lnet/minecraft/entity/Entity;getSoundCategory()Lnet/minecraft/sound/SoundCategory;
intermediary method_5634
Lnet/minecraft/class_1297;method_5634()Lnet/minecraft/class_3419;
official dn
Lbvj;dn()Laxg;
-
getBodyYaw
public float getBodyYaw()Returns the body yaw of the entity.- Overrides:
getBodyYaw
in classEntity
- Returns:
- the body yaw of the entity
- See Also:
- Mappings:
Namespace Name Mixin selector named getBodyYaw
Lnet/minecraft/entity/Entity;getBodyYaw()F
intermediary method_43078
Lnet/minecraft/class_1297;method_43078()F
official dN
Lbvj;dN()F
-
getStackReference
Obtains a stack reference to be modified. Used by commands like/loot
or/item
.- Overrides:
getStackReference
in classEntity
- Parameters:
mappedIndex
- the mapped index as given by the item slot argument- See Also:
- Mappings:
Namespace Name Mixin selector named getStackReference
Lnet/minecraft/entity/Entity;getStackReference(I)Lnet/minecraft/inventory/StackReference;
intermediary method_32318
Lnet/minecraft/class_1297;method_32318(I)Lnet/minecraft/class_5630;
official a_
Lbvj;a_(I)Lbwx;
-