Class ItemEntity
- All Implemented Interfaces:
DataTracked,Ownable,ScoreHolder,CommandOutput,Nameable,EntityLike
- Mappings:
Namespace Name named net/minecraft/entity/ItemEntityintermediary net/minecraft/class_1542official cig
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.entity.Entity
Entity.MoveEffect, Entity.PositionUpdater, Entity.RemovalReason -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate static final intstatic final floatprivate static final floatprivate intprivate intThe number of ticks since this item entity has been created.private static final intprivate intprivate static final TrackedData<ItemStack> final floatFields 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_44870, field_44871, field_44872, field_49073, field_49791, 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
DUMMYFields inherited from interface net.minecraft.scoreboard.ScoreHolder
WILDCARD, WILDCARD_NAME -
Constructor Summary
ConstructorsModifierConstructorDescriptionItemEntity(EntityType<? extends ItemEntity> type, World world) privateItemEntity(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 voidprivate voidprivate booleancanMerge()static booleanbooleanReturns whether the pickup delay of this item entity is greater than 0.copy()voidCopies serializable data and nether portal data fromoriginal.booleandamage(DamageSource source, float amount) Applies a damage to this entity.floatReturns the body yaw of the entity.protected doubleintReturns the number of ticks since this item entity has been created.protected Entity.MoveEffectReturns the possible effect(s) of an entity moving.getName()Returns the name of this object.getOwner()floatgetRotation(float tickDelta) 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 BlockPosprotected voidinitDataTracker(DataTracker.Builder builder) Initializes data tracker.booleanReturns whether the entity can be attacked by players.booleanReturns whether the entity is immune to fire damage.private static voidmerge(ItemEntity targetEntity, ItemStack targetStack, ItemEntity sourceEntity, ItemStack sourceStack) private static voidmerge(ItemEntity targetEntity, ItemStack stack1, ItemStack stack2) static ItemStackmoveToWorld(ServerWorld destination) Moves this entity to another world.booleanReturns whether the entity should not emit vibrations.voidonPlayerCollision(PlayerEntity player) Called when a player collides with the entity.voidonTrackedDataSet(TrackedData<?> data) voidReads custom data fromnbt.voidSets the number of ticks before this item entity can be picked up to 0.voidvoidvoidvoidvoidsetPickupDelay(int pickupDelay) Sets the number of ticks before this item entity can be picked up topickupDelay.voidMakes this item entity impossible to be picked up by setting its pickup delay to 32767.voidSets the item stack contained in this item entity tostack.voidsetThrower(Entity thrower) Sets the thrower of this item entity tothrower.voidSets the number of ticks before this item entity can be picked up to the default value of 10.voidtick()Ticks this entity.private voidtryMerge()private voidtryMerge(ItemEntity other) voidWrites custom data tonbt.Methods inherited from class net.minecraft.entity.Entity
addAirTravelEffects, addCommandTag, addFlapEffects, addPassenger, addVelocity, addVelocity, adjustMovementForCollisions, adjustMovementForPiston, adjustMovementForSneaking, animateDamage, applyDamageEffects, applyGravity, applyMirror, applyRotation, attemptTickInVoid, baseTick, bypassesLandingEffects, bypassesSteppingEffects, calculateBoundingBox, calculateDimensions, calculateNextStepSoundDistance, canAddPassenger, canAvoidTraps, canBeHitByProjectile, canBeSpectated, canExplosionDestroyBlock, canFreeze, canHit, canModifyAt, canMoveVoluntarily, canSprintAsVehicle, canStartRiding, canUsePortals, changeLookDirection, checkBlockCollision, 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, getLeashOffset, getLeashOffset, getLeashPos, getLerpedPos, getLerpTargetPitch, getLerpTargetX, getLerpTargetY, getLerpTargetYaw, getLerpTargetZ, getMaxAir, getMaxNetherPortalTime, getMinFreezeDamageTicks, getMovementDirection, getNameForScoreboard, getOppositeRotationVector, getOppositeRotationVector, getParticleX, getParticleZ, getPassengerAttachmentPos, getPassengerAttachmentPos, getPassengerDismountOffset, getPassengerList, getPassengerRidingPos, getPassengersDeep, getPermissionLevel, getPickBlockStack, getPistonBehavior, getPitch, getPitch, getPlayerPassengers, getPortalCooldown, getPortalRect, getPos, getPose, getPosWithYOffset, getProjectileDeflector, 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, getTeleportTarget, getTrackedPosition, getType, getUuid, getUuidAsString, getVehicle, getVehicleAttachmentPos, getVelocity, getVelocityMultiplier, getVisibilityBoundingBox, 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, isCollidable, isConnectedThroughVehicle, isCrawling, isCustomNameVisible, isDescending, isFlappingWings, isFrozen, isGlowing, isGlowingLocal, isImmuneToExplosion, isInFluid, 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, lerpPosAndRotation, limitFallDistance, lookAt, move, offsetX, offsetZ, onBlockCollision, onBubbleColumnCollision, onBubbleColumnSurfaceCollision, onDamaged, onDataTrackerUpdate, onExplodedBy, onKilledOther, onLanding, onPassengerLookAround, 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, removeCommandTag, removeFromDimension, removePassenger, 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, setOnFireForTicks, setOnFireFromLava, setOnGround, setOnGround, setPitch, setPortalCooldown, setPos, setPose, setPosition, setPosition, setRemoved, setRenderDistanceMultiplier, setRotation, setSilent, setSneaking, setSprinting, setSwimming, setUuid, setVelocity, setVelocity, setVelocityClient, setWorld, setYaw, shouldBroadcastConsoleToOps, shouldControlVehicles, 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, writeNbtMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.server.command.CommandOutput
cannotBeSilencedMethods inherited from interface net.minecraft.scoreboard.ScoreHolder
getStyledDisplayName
-
Field Details
-
STACK
- Mappings:
Namespace Name Mixin selector named STACKLnet/minecraft/entity/ItemEntity;STACK:Lnet/minecraft/entity/data/TrackedData;intermediary field_7199Lnet/minecraft/class_1542;field_7199:Lnet/minecraft/class_2940;official dLcig;d:Lajr;
-
field_48703
private static final float field_48703- See Also:
- Mappings:
Namespace Name Mixin selector named field_48703Lnet/minecraft/entity/ItemEntity;field_48703:Fintermediary field_48703Lnet/minecraft/class_1542;field_48703:Fofficial eLcig;e:F
-
field_48702
public static final float field_48702- See Also:
- Mappings:
Namespace Name Mixin selector named field_48702Lnet/minecraft/entity/ItemEntity;field_48702:Fintermediary field_48702Lnet/minecraft/class_1542;field_48702:Fofficial bLcig;b:F
-
DESPAWN_AGE
private static final int DESPAWN_AGE- See Also:
- Mappings:
Namespace Name Mixin selector named DESPAWN_AGELnet/minecraft/entity/ItemEntity;DESPAWN_AGE:Iintermediary field_30456Lnet/minecraft/class_1542;field_30456:Iofficial fLcig;f:I
-
CANNOT_PICK_UP_DELAY
private static final int CANNOT_PICK_UP_DELAY- See Also:
- Mappings:
Namespace Name Mixin selector named CANNOT_PICK_UP_DELAYLnet/minecraft/entity/ItemEntity;CANNOT_PICK_UP_DELAY:Iintermediary field_30457Lnet/minecraft/class_1542;field_30457:Iofficial gLcig;g:I
-
NEVER_DESPAWN_AGE
private static final int NEVER_DESPAWN_AGE- See Also:
- Mappings:
Namespace Name Mixin selector named NEVER_DESPAWN_AGELnet/minecraft/entity/ItemEntity;NEVER_DESPAWN_AGE:Iintermediary field_30458Lnet/minecraft/class_1542;field_30458:Iofficial hLcig;h:I
-
itemAge
private int itemAgeThe number of ticks since this item entity has been created. It is a short value with keyAgein the NBT structure.It differs from
Entity.age.- Mappings:
Namespace Name Mixin selector named itemAgeLnet/minecraft/entity/ItemEntity;itemAge:Iintermediary field_7204Lnet/minecraft/class_1542;field_7204:Iofficial iLcig;i:I
-
pickupDelay
private int pickupDelay- Mappings:
Namespace Name Mixin selector named pickupDelayLnet/minecraft/entity/ItemEntity;pickupDelay:Iintermediary field_7202Lnet/minecraft/class_1542;field_7202:Iofficial jLcig;j:I
-
health
private int health- Mappings:
Namespace Name Mixin selector named healthLnet/minecraft/entity/ItemEntity;health:Iintermediary field_7201Lnet/minecraft/class_1542;field_7201:Iofficial kLcig;k:I
-
throwerUuid
- Mappings:
Namespace Name Mixin selector named throwerUuidLnet/minecraft/entity/ItemEntity;throwerUuid:Ljava/util/UUID;intermediary field_7200Lnet/minecraft/class_1542;field_7200:Ljava/util/UUID;official lLcig;l:Ljava/util/UUID;
-
thrower
- Mappings:
Namespace Name Mixin selector named throwerLnet/minecraft/entity/ItemEntity;thrower:Lnet/minecraft/entity/Entity;intermediary field_46653Lnet/minecraft/class_1542;field_46653:Lnet/minecraft/class_1297;official mLcig;m:Lbru;
-
owner
- Mappings:
Namespace Name Mixin selector named ownerLnet/minecraft/entity/ItemEntity;owner:Ljava/util/UUID;intermediary field_41893Lnet/minecraft/class_1542;field_41893:Ljava/util/UUID;official nLcig;n:Ljava/util/UUID;
-
uniqueOffset
public final float uniqueOffset- Mappings:
Namespace Name Mixin selector named uniqueOffsetLnet/minecraft/entity/ItemEntity;uniqueOffset:Fintermediary field_7203Lnet/minecraft/class_1542;field_7203:Fofficial cLcig;c:F
-
-
Constructor Details
-
ItemEntity
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/entity/Entity;<init>(Lnet/minecraft/entity/EntityType;Lnet/minecraft/world/World;)Vintermediary <init>Lnet/minecraft/class_1297;<init>(Lnet/minecraft/class_1299;Lnet/minecraft/class_1937;)Vofficial <init>Lbru;<init>(Lbsa;Ldax;)V
-
ItemEntity
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/entity/ItemEntity;<init>(Lnet/minecraft/world/World;DDDLnet/minecraft/item/ItemStack;)Vintermediary <init>Lnet/minecraft/class_1542;<init>(Lnet/minecraft/class_1937;DDDLnet/minecraft/class_1799;)Vofficial <init>Lcig;<init>(Ldax;DDDLcto;)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)Vintermediary <init>Lnet/minecraft/class_1542;<init>(Lnet/minecraft/class_1937;DDDLnet/minecraft/class_1799;DDD)Vofficial <init>Lcig;<init>(Ldax;DDDLcto;DDD)V
-
ItemEntity
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/entity/ItemEntity;<init>(Lnet/minecraft/entity/ItemEntity;)Vintermediary <init>Lnet/minecraft/class_1542;<init>(Lnet/minecraft/class_1542;)Vofficial <init>Lcig;<init>(Lcig;)V
-
-
Method Details
-
occludeVibrationSignals
public boolean occludeVibrationSignals()Returns whether the entity should not emit vibrations.By default, wool or carpet item entities, and
WardenEntitydo not emit vibrations.- Overrides:
occludeVibrationSignalsin classEntity- Returns:
- whether the entity should not emit vibrations
- Mappings:
Namespace Name Mixin selector named occludeVibrationSignalsLnet/minecraft/entity/Entity;occludeVibrationSignals()Zintermediary method_33189Lnet/minecraft/class_1297;method_33189()Zofficial bcLbru;bc()Z
-
getOwner
-
copyFrom
Copies serializable data and nether portal data fromoriginal. -
getMoveEffect
Returns the possible effect(s) of an entity moving.- Overrides:
getMoveEffectin 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 getMoveEffectLnet/minecraft/entity/Entity;getMoveEffect()Lnet/minecraft/entity/Entity$MoveEffect;intermediary method_33570Lnet/minecraft/class_1297;method_33570()Lnet/minecraft/class_1297$class_5799;official bbLbru;bb()Lbru$b;
-
initDataTracker
Initializes data tracker.- Specified by:
initDataTrackerin 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 initDataTrackerLnet/minecraft/entity/Entity;initDataTracker(Lnet/minecraft/entity/data/DataTracker$Builder;)Vintermediary method_5693Lnet/minecraft/class_1297;method_5693(Lnet/minecraft/class_2945$class_9222;)Vofficial aLbru;a(Lajv$a;)V
-
getGravity
protected double getGravity()- Overrides:
getGravityin classEntity- Mappings:
Namespace Name Mixin selector named getGravityLnet/minecraft/entity/Entity;getGravity()Dintermediary method_7490Lnet/minecraft/class_1297;method_7490()Dofficial aYLbru;aY()D
-
tick
public void tick()Ticks this entity.- Overrides:
tickin 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 tickLnet/minecraft/entity/Entity;tick()Vintermediary method_5773Lnet/minecraft/class_1297;method_5773()Vofficial lLbru;l()V
-
getVelocityAffectingPos
- Overrides:
getVelocityAffectingPosin classEntity- Mappings:
Namespace Name Mixin selector named getVelocityAffectingPosLnet/minecraft/entity/Entity;getVelocityAffectingPos()Lnet/minecraft/util/math/BlockPos;intermediary method_23314Lnet/minecraft/class_1297;method_23314()Lnet/minecraft/class_2338;official aKLbru;aK()Lio;
-
applyWaterBuoyancy
private void applyWaterBuoyancy()- Mappings:
Namespace Name Mixin selector named applyWaterBuoyancyLnet/minecraft/entity/ItemEntity;applyWaterBuoyancy()Vintermediary method_6974Lnet/minecraft/class_1542;method_6974()Vofficial DLcig;D()V
-
applyLavaBuoyancy
private void applyLavaBuoyancy()- Mappings:
Namespace Name Mixin selector named applyLavaBuoyancyLnet/minecraft/entity/ItemEntity;applyLavaBuoyancy()Vintermediary method_24348Lnet/minecraft/class_1542;method_24348()Vofficial ELcig;E()V
-
tryMerge
private void tryMerge()- Mappings:
Namespace Name Mixin selector named tryMergeLnet/minecraft/entity/ItemEntity;tryMerge()Vintermediary method_6973Lnet/minecraft/class_1542;method_6973()Vofficial GLcig;G()V
-
canMerge
private boolean canMerge()- Mappings:
Namespace Name Mixin selector named canMergeLnet/minecraft/entity/ItemEntity;canMerge()Zintermediary method_20397Lnet/minecraft/class_1542;method_20397()Zofficial HLcig;H()Z
-
tryMerge
- Mappings:
Namespace Name Mixin selector named tryMergeLnet/minecraft/entity/ItemEntity;tryMerge(Lnet/minecraft/entity/ItemEntity;)Vintermediary method_6972Lnet/minecraft/class_1542;method_6972(Lnet/minecraft/class_1542;)Vofficial aLcig;a(Lcig;)V
-
canMerge
- Mappings:
Namespace Name Mixin selector named canMergeLnet/minecraft/entity/ItemEntity;canMerge(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;)Zintermediary method_24017Lnet/minecraft/class_1542;method_24017(Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;)Zofficial aLcig;a(Lcto;Lcto;)Z
-
merge
- Mappings:
Namespace Name Mixin selector named mergeLnet/minecraft/entity/ItemEntity;merge(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;I)Lnet/minecraft/item/ItemStack;intermediary method_24018Lnet/minecraft/class_1542;method_24018(Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;I)Lnet/minecraft/class_1799;official aLcig;a(Lcto;Lcto;I)Lcto;
-
merge
- Mappings:
Namespace Name Mixin selector named mergeLnet/minecraft/entity/ItemEntity;merge(Lnet/minecraft/entity/ItemEntity;Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;)Vintermediary method_24016Lnet/minecraft/class_1542;method_24016(Lnet/minecraft/class_1542;Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;)Vofficial aLcig;a(Lcig;Lcto;Lcto;)V
-
merge
private static void merge(ItemEntity targetEntity, ItemStack targetStack, ItemEntity sourceEntity, ItemStack sourceStack) - Mappings:
Namespace Name Mixin selector named mergeLnet/minecraft/entity/ItemEntity;merge(Lnet/minecraft/entity/ItemEntity;Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/ItemEntity;Lnet/minecraft/item/ItemStack;)Vintermediary method_18006Lnet/minecraft/class_1542;method_18006(Lnet/minecraft/class_1542;Lnet/minecraft/class_1799;Lnet/minecraft/class_1542;Lnet/minecraft/class_1799;)Vofficial aLcig;a(Lcig;Lcto;Lcig;Lcto;)V
-
isFireImmune
public boolean isFireImmune()Returns whether the entity is immune to fire damage.- Overrides:
isFireImmunein classEntity- Returns:
- whether the entity is immune to fire damage
- See Also:
- Mappings:
Namespace Name Mixin selector named isFireImmuneLnet/minecraft/entity/Entity;isFireImmune()Zintermediary method_5753Lnet/minecraft/class_1297;method_5753()Zofficial bdLbru;bd()Z
-
damage
Applies a damage to this entity. The exact implementation differs between subclasses.LivingEntityhas 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
ItemEntityalso 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
Entity.isInvulnerableTo(net.minecraft.entity.damage.DamageSource)and return early.- Overrides:
damagein classEntity- Returns:
- whether the entity was actually damaged
- See Also:
- Mappings:
Namespace Name Mixin selector named damageLnet/minecraft/entity/Entity;damage(Lnet/minecraft/entity/damage/DamageSource;F)Zintermediary method_5643Lnet/minecraft/class_1297;method_5643(Lnet/minecraft/class_1282;F)Zofficial aLbru;a(Lbqn;F)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:
writeCustomDataToNbtin classEntity- See Also:
- Mappings:
Namespace Name Mixin selector named writeCustomDataToNbtLnet/minecraft/entity/Entity;writeCustomDataToNbt(Lnet/minecraft/nbt/NbtCompound;)Vintermediary method_5652Lnet/minecraft/class_1297;method_5652(Lnet/minecraft/class_2487;)Vofficial bLbru;b(Lud;)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.
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 named readCustomDataFromNbtLnet/minecraft/entity/Entity;readCustomDataFromNbt(Lnet/minecraft/nbt/NbtCompound;)Vintermediary method_5749Lnet/minecraft/class_1297;method_5749(Lnet/minecraft/class_2487;)Vofficial aLbru;a(Lud;)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:
onPlayerCollisionin classEntity- Mappings:
Namespace Name Mixin selector named onPlayerCollisionLnet/minecraft/entity/Entity;onPlayerCollision(Lnet/minecraft/entity/player/PlayerEntity;)Vintermediary method_5694Lnet/minecraft/class_1297;method_5694(Lnet/minecraft/class_1657;)Vofficial b_Lbru;b_(Lclw;)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:
getNamein interfaceNameable- Overrides:
getNamein classEntity- Returns:
- the name of this object
- Mappings:
Namespace Name Mixin selector named getNameLnet/minecraft/util/Nameable;getName()Lnet/minecraft/text/Text;intermediary method_5477Lnet/minecraft/class_1275;method_5477()Lnet/minecraft/class_2561;official afLbpz;af()Lwx;
-
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
ItemEntityandExperienceOrbEntity) as trying to attack them kicks the player.- Overrides:
isAttackablein classEntity- Returns:
- whether the entity can be attacked by players
- See Also:
- Mappings:
Namespace Name Mixin selector named isAttackableLnet/minecraft/entity/Entity;isAttackable()Zintermediary method_5732Lnet/minecraft/class_1297;method_5732()Zofficial ctLbru;ct()Z
-
moveToWorld
Moves this entity to another world.Note all entities except server player entities are completely recreated at the destination.
- Overrides:
moveToWorldin classEntity- Returns:
- the entity in the other world
- Mappings:
Namespace Name Mixin selector named moveToWorldLnet/minecraft/entity/Entity;moveToWorld(Lnet/minecraft/server/world/ServerWorld;)Lnet/minecraft/entity/Entity;intermediary method_5731Lnet/minecraft/class_1297;method_5731(Lnet/minecraft/class_3218;)Lnet/minecraft/class_1297;official bLbru;b(Laqm;)Lbru;
-
getStack
Returns the item stack contained in this item entity.- Mappings:
Namespace Name Mixin selector named getStackLnet/minecraft/entity/ItemEntity;getStack()Lnet/minecraft/item/ItemStack;intermediary method_6983Lnet/minecraft/class_1542;method_6983()Lnet/minecraft/class_1799;official pLcig;p()Lcto;
-
setStack
Sets the item stack contained in this item entity tostack.- Mappings:
Namespace Name Mixin selector named setStackLnet/minecraft/entity/ItemEntity;setStack(Lnet/minecraft/item/ItemStack;)Vintermediary method_6979Lnet/minecraft/class_1542;method_6979(Lnet/minecraft/class_1799;)Vofficial aLcig;a(Lcto;)V
-
onTrackedDataSet
- Specified by:
onTrackedDataSetin interfaceDataTracked- Overrides:
onTrackedDataSetin classEntity- Mappings:
Namespace Name Mixin selector named onTrackedDataSetLnet/minecraft/entity/data/DataTracked;onTrackedDataSet(Lnet/minecraft/entity/data/TrackedData;)Vintermediary method_5674Lnet/minecraft/class_9221;method_5674(Lnet/minecraft/class_2940;)Vofficial aLaju;a(Lajr;)V
-
setOwner
- Mappings:
Namespace Name Mixin selector named setOwnerLnet/minecraft/entity/ItemEntity;setOwner(Ljava/util/UUID;)Vintermediary method_48349Lnet/minecraft/class_1542;method_48349(Ljava/util/UUID;)Vofficial bLcig;b(Ljava/util/UUID;)V
-
setThrower
Sets the thrower of this item entity tothrower.- Mappings:
Namespace Name Mixin selector named setThrowerLnet/minecraft/entity/ItemEntity;setThrower(Lnet/minecraft/entity/Entity;)Vintermediary method_6981Lnet/minecraft/class_1542;method_6981(Lnet/minecraft/class_1297;)Vofficial bLcig;b(Lbru;)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 getItemAgeLnet/minecraft/entity/ItemEntity;getItemAge()Iintermediary method_6985Lnet/minecraft/class_1542;method_6985()Iofficial uLcig;u()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 setToDefaultPickupDelayLnet/minecraft/entity/ItemEntity;setToDefaultPickupDelay()Vintermediary method_6988Lnet/minecraft/class_1542;method_6988()Vofficial vLcig;v()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 resetPickupDelayLnet/minecraft/entity/ItemEntity;resetPickupDelay()Vintermediary method_6975Lnet/minecraft/class_1542;method_6975()Vofficial wLcig;w()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 setPickupDelayInfiniteLnet/minecraft/entity/ItemEntity;setPickupDelayInfinite()Vintermediary method_6989Lnet/minecraft/class_1542;method_6989()Vofficial xLcig;x()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 setPickupDelayLnet/minecraft/entity/ItemEntity;setPickupDelay(I)Vintermediary method_6982Lnet/minecraft/class_1542;method_6982(I)Vofficial bLcig;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 cannotPickupLnet/minecraft/entity/ItemEntity;cannotPickup()Zintermediary method_6977Lnet/minecraft/class_1542;method_6977()Zofficial yLcig;y()Z
-
setNeverDespawn
public void setNeverDespawn()- Mappings:
Namespace Name Mixin selector named setNeverDespawnLnet/minecraft/entity/ItemEntity;setNeverDespawn()Vintermediary method_35190Lnet/minecraft/class_1542;method_35190()Vofficial zLcig;z()V
-
setCovetedItem
public void setCovetedItem()- Mappings:
Namespace Name Mixin selector named setCovetedItemLnet/minecraft/entity/ItemEntity;setCovetedItem()Vintermediary method_6976Lnet/minecraft/class_1542;method_6976()Vofficial ALcig;A()V
-
setDespawnImmediately
public void setDespawnImmediately()- Mappings:
Namespace Name Mixin selector named setDespawnImmediatelyLnet/minecraft/entity/ItemEntity;setDespawnImmediately()Vintermediary method_6987Lnet/minecraft/class_1542;method_6987()Vofficial BLcig;B()V
-
getRotation
public float getRotation(float tickDelta) - Mappings:
Namespace Name Mixin selector named getRotationLnet/minecraft/entity/ItemEntity;getRotation(F)Fintermediary method_27314Lnet/minecraft/class_1542;method_27314(F)Fofficial aLcig;a(F)F
-
copy
- Mappings:
Namespace Name Mixin selector named copyLnet/minecraft/entity/ItemEntity;copy()Lnet/minecraft/entity/ItemEntity;intermediary method_29271Lnet/minecraft/class_1542;method_29271()Lnet/minecraft/class_1542;official CLcig;C()Lcig;
-
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:
getSoundCategoryin classEntity- Returns:
- the sound category for sounds from this entity
- See Also:
- Mappings:
Namespace Name Mixin selector named getSoundCategoryLnet/minecraft/entity/Entity;getSoundCategory()Lnet/minecraft/sound/SoundCategory;intermediary method_5634Lnet/minecraft/class_1297;method_5634()Lnet/minecraft/class_3419;official deLbru;de()Lavi;
-
getBodyYaw
public float getBodyYaw()Returns the body yaw of the entity.- Overrides:
getBodyYawin classEntity- Returns:
- the body yaw of the entity
- See Also:
- Mappings:
Namespace Name Mixin selector named getBodyYawLnet/minecraft/entity/Entity;getBodyYaw()Fintermediary method_43078Lnet/minecraft/class_1297;method_43078()Fofficial dGLbru;dG()F
-
getStackReference
Obtains a stack reference to be modified. Used by commands like/lootor/item.- Overrides:
getStackReferencein classEntity- Parameters:
mappedIndex- the mapped index as given by the item slot argument- See Also:
- Mappings:
Namespace Name Mixin selector named getStackReferenceLnet/minecraft/entity/Entity;getStackReference(I)Lnet/minecraft/inventory/StackReference;intermediary method_32318Lnet/minecraft/class_1297;method_32318(I)Lnet/minecraft/class_5630;official a_Lbru;a_(I)Lbtg;
-