Package net.minecraft.world.entity.item
Class ItemEntity
java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<Entity>
net.minecraft.world.entity.Entity
net.minecraft.world.entity.item.ItemEntity
- All Implemented Interfaces:
CommandSource
,EntityAccess
,Nameable
,ICapabilityProvider
,ICapabilitySerializable<CompoundTag>
,IForgeEntity
,INBTSerializable<CompoundTag>
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.entity.Entity
Entity.MoveFunction, Entity.MovementEmission, Entity.RemovalReason
-
Field Summary
Modifier and TypeFieldDescriptionprivate int
float
private static EntityDataAccessor<ItemStack>
private int
private static int
private static int
int
The maximum age of this EntityItem.private static int
private UUID
private int
private UUID
Fields inherited from class net.minecraft.world.entity.Entity
BASE_TICKS_REQUIRED_TO_FREEZE, blocksBuilding, BOARDING_COOLDOWN, boardingCooldown, BREATHING_DISTANCE_BELOW_EYES, DATA_POSE, DATA_SHARED_FLAGS_ID, DEFAULT_BB_HEIGHT, DEFAULT_BB_WIDTH, DELTA_AFFECTED_BY_BLOCKS_BELOW, entityData, fallDistance, firstTick, FLAG_FALL_FLYING, FLAG_GLOWING, FLAG_ONFIRE, fluidHeight, fluidOnEyes, flyDist, FREEZE_HURT_FREQUENCY, hasImpulse, horizontalCollision, hurtMarked, ID_TAG, invulnerableTime, isInPowderSnow, isInsidePortal, level, LOGGER, MAX_ENTITY_TAG_COUNT, maxUpStep, moveDist, noCulling, noPhysics, onGround, PASSENGERS_TAG, portalEntrancePos, portalTime, random, stringUUID, stuckSpeedMultiplier, tickCount, TOTAL_AIR_SUPPLY, uuid, UUID_TAG, verticalCollision, walkDist, walkDistO, wasEyeInWater, wasInPowderSnow, wasOnFire, wasTouchingWater, xo, xOld, xRotO, yo, yOld, yRotO, zo, zOld
Fields inherited from interface net.minecraft.commands.CommandSource
NULL
-
Constructor Summary
ModifierConstructorDescriptionItemEntity(EntityType<? extends ItemEntity> p_31991_, Level p_31992_)
private
ItemEntity(ItemEntity p_31994_)
ItemEntity(Level p_32001_, double p_32002_, double p_32003_, double p_32004_, ItemStack p_32005_)
ItemEntity(Level p_149663_, double p_149664_, double p_149665_, double p_149666_, ItemStack p_149667_, double p_149668_, double p_149669_, double p_149670_)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAdditionalSaveData(CompoundTag p_32050_)
static boolean
areMergable(ItemStack p_32027_, ItemStack p_32028_)
changeDimension(ServerLevel p_32042_, ITeleporter teleporter)
copy()
protected void
boolean
Packet<?>
int
getAge()
getItem()
protected Entity.MovementEmission
getName()
getOwner()
float
getSpin(float p_32009_)
boolean
boolean
hurt(DamageSource p_32013_, float p_32014_)
boolean
private boolean
void
private static void
merge(ItemEntity p_32018_, ItemStack p_32019_, ItemEntity p_32020_, ItemStack p_32021_)
private static void
merge(ItemEntity p_32023_, ItemStack p_32024_, ItemStack p_32025_)
static ItemStack
private void
boolean
void
onSyncedDataUpdated(EntityDataAccessor<?> p_32036_)
void
playerTouch(Player p_32040_)
void
readAdditionalSaveData(CompoundTag p_32034_)
void
void
void
void
void
void
void
setPickUpDelay(int p_32011_)
void
setThrower(UUID p_32053_)
private void
private void
void
void
tick()
private void
tryToMerge(ItemEntity p_32016_)
Methods inherited from class net.minecraft.world.entity.Entity
absMoveTo, absMoveTo, acceptsFailure, acceptsSuccess, addPassenger, addTag, animateHurt, awardKillScore, baseTick, blockPosition, broadcastToPlayer, calculateUpVector, calculateViewVector, canAddPassenger, canBeCollidedWith, canChangeDimensions, canCollideWith, canEnterPose, canFreeze, canRide, canSpawnSprintParticle, canTrample, canUpdate, canUpdate, captureDrops, captureDrops, causeFallDamage, changeDimension, checkDespawn, checkFallDamage, checkInsideBlocks, checkOutOfWorld, chunkPosition, clearFire, closerThan, collideBoundingBox, collideBoundingBoxHeuristically, collideBoundingBoxLegacy, copyPosition, createCommandSourceStack, createHoverEvent, discard, dismountTo, displayFireAnimation, distanceTo, distanceToSqr, distanceToSqr, distanceToSqr, doEnchantDamageEffects, doWaterSplashEffect, ejectPassengers, equals, eyeBlockPosition, fillCrashReportCategory, findDimensionEntryPoint, gameEvent, gameEvent, gameEvent, gameEvent, getAirSupply, getAllSlots, getArmorSlots, getBbHeight, getBbWidth, getBlockExplosionResistance, getBlockJumpFactor, getBlockPosBelowThatAffectsMyMovement, getBlockSpeedFactor, getBlockStateOn, getBlockX, getBlockY, getBlockZ, getBoundingBox, getBoundingBoxForCulling, getBoundingBoxForPose, getBrightness, getCollisionHorizontalEscapeVector, getCommandSenderWorld, getControllingPassenger, getCustomName, getDeltaMovement, getDimensionChangingDelay, getDimensions, getDirection, getDismountLocationForPassenger, getDisplayName, getEncodeId, getEntityData, getExitPortal, getEyeHeight, getEyeHeight, getEyeHeight, getEyeHeightAccess, getEyePosition, getEyePosition, getEyeY, getFeetBlockState, getFireImmuneTicks, getFirstPassenger, getFluidHeight, getFluidJumpThreshold, getForward, getGameEventListenerRegistrar, getHandSlots, getId, getIndirectPassengers, getLeashOffset, getLightProbePosition, getLookAngle, getMaxAirSupply, getMaxFallDistance, getMotionDirection, getMyRidingOffset, getOnPos, getPacketCoordinates, getPassengers, getPassengersAndSelf, getPassengersRidingOffset, getPercentFrozen, getPermissionLevel, getPersistentData, getPickRadius, getPickResult, getPistonPushReaction, getPortalWaitTime, getPose, getPosition, getRandomX, getRandomY, getRandomZ, getRelativePortalPosition, getRemainingFireTicks, getRemovalReason, getRootVehicle, getRopeHoldPosition, getRotationVector, getScoreboardName, getSelfAndPassengers, getServer, getSharedFlag, getSlot, getStringUUID, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTags, getTeam, getTeamColor, getTicksFrozen, getTicksRequiredToFreeze, getType, getTypeName, getUpVector, getUUID, getVehicle, getViewScale, getViewVector, getViewXRot, getViewYRot, getX, getX, getXRot, getY, getY, getYHeadRot, getYRot, getZ, getZ, handleEntityEvent, handleInsidePortal, handleNetherPortal, hasCustomName, hasExactlyOnePlayerPassenger, hasGlowingTag, hashCode, hasIndirectPassenger, hasPassenger, hasPassenger, hasPermissions, ignoreExplosion, interact, interactAt, is, isAddedToWorld, isAlive, isAlliedTo, isAlliedTo, isAlwaysTicking, isColliding, isControlledByLocalInstance, isCrouching, isCurrentlyGlowing, isCustomNameVisible, isDescending, isDiscrete, isEyeInFluid, isFlapping, isFree, isFullyFrozen, isIgnoringBlockTriggers, isInLava, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableTo, isInWall, isInWater, isInWaterOrBubble, isInWaterOrRain, isInWaterRainOrBubble, isNoGravity, isOnFire, isOnGround, isOnPortalCooldown, isPassenger, isPassengerOfSameVehicle, isPickable, isPushable, isPushedByFluid, isRemoved, isShiftKeyDown, isSilent, isSpectator, isSprinting, isSteppingCarefully, isSuppressingBounce, isSwimming, isUnderWater, isVehicle, isVisuallyCrawling, isVisuallySwimming, kill, killed, lavaHurt, lerpHeadTo, lerpMotion, lerpTo, limitPistonMovement, load, lookAt, makeBoundingBox, makeStuckInBlock, markHurt, maybeBackOffFromEdge, mayInteract, mirror, move, moveRelative, moveTo, moveTo, moveTo, moveTo, moveTowardsClosestSpace, newDoubleList, newFloatList, nextStep, onAboveBubbleCol, onAddedToWorld, onClientRemoval, onFlap, onInsideBlock, onInsideBubbleColumn, onlyOpCanSetNbt, onPassengerTurned, onRemovedFromWorld, outOfWorld, pick, playEntityOnFireExtinguishedSound, playSound, playStepSound, playSwimSound, position, positionRider, processFlappingMovement, processPortalCooldown, push, push, reapplyPosition, recreateFromPacket, refreshDimensions, remove, removeAfterChangingDimensions, removePassenger, removeTag, removeVehicle, repositionEntityAfterLoad, restoreFrom, revive, rideableUnderWater, rideTick, rotate, save, saveAsPassenger, saveWithoutId, sendMessage, setAirSupply, setBoundingBox, setCustomName, setCustomNameVisible, setDeltaMovement, setDeltaMovement, setGlowingTag, setId, setInvisible, setInvulnerable, setIsInPowderSnow, setItemSlot, setLevelCallback, setNoGravity, setOldPosAndRot, setOnGround, setPacketCoordinates, setPacketCoordinates, setPortalCooldown, setPos, setPos, setPose, setPosRaw, setRemainingFireTicks, setRemoved, setRot, setSecondsOnFire, setSharedFlag, setSharedFlagOnFire, setShiftKeyDown, setSilent, setSprinting, setSwimming, setTicksFrozen, setUUID, setViewScale, setXRot, setYBodyRot, setYHeadRot, setYRot, shouldBeSaved, shouldBlockExplode, shouldInformAdmins, shouldRender, shouldRenderAtSqrDistance, shouldShowName, showVehicleHealth, skipAttackInteraction, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnSprintParticle, startRiding, startRiding, startSeenByPlayer, stopRiding, stopSeenByPlayer, teleportTo, teleportToWithTicket, thunderHit, toString, touchingUnloadedChunk, tryCheckInsideBlocks, turn, unRide, unsetRemoved, updateFluidHeightAndDoFluidPushing, updateInWaterStateAndDoFluidPushing, updateSwimming
Methods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCaps
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.commands.CommandSource
alwaysAccepts
Methods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability, getCapability
Methods inherited from interface net.minecraftforge.common.extensions.IForgeEntity
canBeRiddenInWater, canRiderInteract, deserializeNBT, getClassification, getParts, getPickedResult, isMultipartEntity, serializeNBT, shouldRiderSit
-
Field Details
-
DATA_ITEM
-
LIFETIME
private static final int LIFETIME- See Also:
- Constant Field Values
-
INFINITE_PICKUP_DELAY
private static final int INFINITE_PICKUP_DELAY- See Also:
- Constant Field Values
-
INFINITE_LIFETIME
private static final int INFINITE_LIFETIME- See Also:
- Constant Field Values
-
age
private int age -
pickupDelay
private int pickupDelay -
health
private int health -
thrower
-
owner
-
bobOffs
public final float bobOffs -
lifespan
public int lifespanThe maximum age of this EntityItem. The item is expired once this is reached.
-
-
Constructor Details
-
ItemEntity
-
ItemEntity
-
ItemEntity
-
ItemEntity
-
-
Method Details
-
occludesVibrations
public boolean occludesVibrations()- Overrides:
occludesVibrations
in classEntity
-
getMovementEmission
- Overrides:
getMovementEmission
in classEntity
-
defineSynchedData
protected void defineSynchedData()- Specified by:
defineSynchedData
in classEntity
-
tick
public void tick() -
setUnderwaterMovement
private void setUnderwaterMovement() -
setUnderLavaMovement
private void setUnderLavaMovement() -
mergeWithNeighbours
private void mergeWithNeighbours() -
isMergable
private boolean isMergable() -
tryToMerge
-
areMergable
-
merge
-
merge
-
merge
private static void merge(ItemEntity p_32018_, ItemStack p_32019_, ItemEntity p_32020_, ItemStack p_32021_) -
fireImmune
public boolean fireImmune()- Overrides:
fireImmune
in classEntity
-
hurt
-
addAdditionalSaveData
- Specified by:
addAdditionalSaveData
in classEntity
-
readAdditionalSaveData
- Specified by:
readAdditionalSaveData
in classEntity
-
playerTouch
- Overrides:
playerTouch
in classEntity
-
getName
-
isAttackable
public boolean isAttackable()- Overrides:
isAttackable
in classEntity
-
changeDimension
- Overrides:
changeDimension
in classEntity
-
getItem
-
setItem
-
onSyncedDataUpdated
- Overrides:
onSyncedDataUpdated
in classEntity
-
getOwner
-
setOwner
-
getThrower
-
setThrower
-
getAge
public int getAge() -
setDefaultPickUpDelay
public void setDefaultPickUpDelay() -
setNoPickUpDelay
public void setNoPickUpDelay() -
setNeverPickUp
public void setNeverPickUp() -
setPickUpDelay
public void setPickUpDelay(int p_32011_) -
hasPickUpDelay
public boolean hasPickUpDelay() -
setUnlimitedLifetime
public void setUnlimitedLifetime() -
setExtendedLifetime
public void setExtendedLifetime() -
makeFakeItem
public void makeFakeItem() -
getSpin
public float getSpin(float p_32009_) -
getAddEntityPacket
- Specified by:
getAddEntityPacket
in classEntity
-
copy
-
getSoundSource
- Overrides:
getSoundSource
in classEntity
-