net.minecraft.entity

public class ItemEntity

extends Entity implements Ownable

All mapped superinterfaces:

Nameable, EntityLike, UniquelyIdentifiable, ScoreHolder, DataTracked, ComponentsAccess, HeldItemContext, StackReferenceGetter, DebugTrackable, EntryConvertible, Ownable

net.minecraft.world.entity.item.ItemEntity
net.minecraft.class_1542
net.minecraft.entity.ItemEntity

Field summary

Modifier and TypeField
private static final TrackedData<ItemStack>
DATA_ITEM
field_7199
STACK
private static final float
FLOAT_HEIGHT
field_48703
field_48703
public static final float
EYE_HEIGHT
field_48702
field_48702
private static final int
LIFETIME
field_30456
DESPAWN_AGE
private static final int
INFINITE_PICKUP_DELAY
field_30457
CANNOT_PICK_UP_DELAY
private static final int
INFINITE_LIFETIME
field_30458
NEVER_DESPAWN_AGE
public static final int
DEFAULT_HEALTH
field_57660
DEFAULT_HEALTH
private static final short
DEFAULT_AGE
field_57661
DEFAULT_AGE
private static final short
DEFAULT_PICKUP_DELAY
field_57662
DEFAULT_PICKUP_DELAY
private int
age
field_7204
itemAge
private int
pickupDelay
field_7202
pickupDelay
private int
health
field_7201
health
private LazyEntityReference<Entity>
thrower
field_7200
thrower
private UUID
target
field_41893
owner
public final float
bobOffs
field_7203
uniqueOffset

Constructor summary

ModifierConstructor
public (EntityType<? extends ItemEntity> type, World level)
public (World level, double x, double y, double z, ItemStack itemStack)
public (World world, double x, double y, double z, ItemStack stack, double velocityX, double velocityY, double velocityZ)

Method summary

Modifier and TypeMethod
public boolean
dampensVibrations()
method_33189()
occludeVibrationSignals()
public Entity
getOwner()
method_24921()
getOwner()
public void
restoreFrom(Entity oldEntity)
method_5878(class_1297 arg0)
copyFrom(Entity arg0)
protected Entity$MoveEffect
getMovementEmission()
method_33570()
getMoveEffect()
protected void
defineSynchedData(SynchedEntityData$Builder entityData)
method_5693(class_2945$class_9222 arg0)
initDataTracker(DataTracker$Builder arg0)
protected double
getDefaultGravity()
method_7490()
getGravity()
public void
tick()
method_5773()
tick()
public BlockPos
getBlockPosBelowThatAffectsMyMovement()
method_23314()
getVelocityAffectingPos()
private void
setUnderwaterMovement()
method_6974()
applyWaterBuoyancy()
private void
setUnderLavaMovement()
method_24348()
applyLavaBuoyancy()
private void
setFluidMovement(double multiplier)
method_64460(double arg0)
applyBuoyancy(double horizontalMultiplier)
private void
mergeWithNeighbours()
method_6973()
tryMerge()
private boolean
isMergable()
method_20397()
canMerge()
private void
tryToMerge(ItemEntity other)
method_6972(class_1542 arg0)
tryMerge(ItemEntity other)
public static boolean
areMergable(ItemStack thisItemStack, ItemStack otherItemStack)
method_24017(class_1799 arg0, class_1799 arg1)
canMerge(ItemStack stack1, ItemStack stack2)
public static ItemStack
merge(ItemStack toStack, ItemStack fromStack, int maxCount)
method_24018(class_1799 arg0, class_1799 arg1, int arg2)
merge(ItemStack stack1, ItemStack stack2, int maxCount)
private static void
merge(ItemEntity toItem, ItemStack toStack, ItemStack fromStack)
method_24016(class_1542 arg0, class_1799 arg1, class_1799 arg2)
merge(ItemEntity targetEntity, ItemStack stack1, ItemStack stack2)
private static void
merge(ItemEntity toItem, ItemStack toStack, ItemEntity fromItem, ItemStack fromStack)
method_18006(class_1542 arg0, class_1799 arg1, class_1542 arg2, class_1799 arg3)
merge(ItemEntity targetEntity, ItemStack targetStack, ItemEntity sourceEntity, ItemStack sourceStack)
public boolean
fireImmune()
method_5753()
isFireImmune()
protected boolean
shouldPlayLavaHurtSound()
method_64270()
shouldPlayBurnSoundInLava()
public final boolean
hurtClient(DamageSource source)
method_5643(class_1282 arg0)
clientDamage(DamageSource arg0)
public final boolean
hurtServer(ServerLevel level, DamageSource source, float damage)
method_64397(class_3218 arg0, class_1282 arg1, float arg2)
damage(ServerWorld arg0, DamageSource arg1, float arg2)
public boolean
ignoreExplosion(Explosion explosion)
method_5659(class_1927 arg0)
isImmuneToExplosion(Explosion arg0)
protected void
addAdditionalSaveData(ValueOutput output)
method_5652(class_11372 arg0)
writeCustomData(WriteView arg0)
protected void
readAdditionalSaveData(ValueInput input)
method_5749(class_11368 arg0)
readCustomData(ReadView arg0)
public void
playerTouch(Player player)
method_5694(class_1657 arg0)
onPlayerCollision(PlayerEntity arg0)
public Text
getName()
method_5477()
getName()
public boolean
isAttackable()
method_5732()
isAttackable()
public Entity
teleport(TeleportTransition transition)
method_5731(class_5454 arg0)
teleportTo(TeleportTarget arg0)
public ItemStack
getItem()
method_6983()
getStack()
public void
setItem(ItemStack itemStack)
method_6979(class_1799 arg0)
setStack(ItemStack stack)
public void
setTarget(UUID target)
method_48349(UUID arg0)
setOwner(UUID owner)
public void
setThrower(Entity thrower)
method_6981(class_1297 arg0)
setThrower(Entity thrower)
public int
getAge()
method_6985()
getItemAge()
public void
setDefaultPickUpDelay()
method_6988()
setToDefaultPickupDelay()
public void
setNoPickUpDelay()
method_6975()
resetPickupDelay()
public void
setNeverPickUp()
method_6989()
setPickupDelayInfinite()
public void
setPickUpDelay(int ticks)
method_6982(int arg0)
setPickupDelay(int pickupDelay)
public boolean
hasPickUpDelay()
method_6977()
cannotPickup()
public void
setUnlimitedLifetime()
method_35190()
setNeverDespawn()
public void
setExtendedLifetime()
method_6976()
setCovetedItem()
public void
makeFakeItem()
method_6987()
setDespawnImmediately()
public static float
getSpin(float ageInTicks, float bobOffset)
method_27314(float arg0, float arg1)
getRotation(float arg0, float arg1)
public SoundCategory
getSoundSource()
method_5634()
getSoundCategory()
public float
getVisualRotationYInDegrees()
method_73188()
getBodyYaw()
public StackReference
getSlot(int slot)
method_32318(int arg0)
getStackReference(int arg0)
public boolean
canSimulateMovement()
method_66249()
canMoveVoluntarily()
private boolean
lambda$mergeWithNeighbours$0(ItemEntity arg0)
method_20396(class_1542 arg0)
method_20396(ItemEntity otherItemEntity)