public class ItemEntity extends Entity
Entity.PositionUpdater
Modifier and Type | Field and Description |
---|---|
private int |
age |
private int |
health |
float |
hoverHeight |
private UUID |
owner |
private int |
pickupDelay |
private static TrackedData<ItemStack> |
STACK |
private UUID |
thrower |
chunkX, chunkY, chunkZ, dataTracker, distanceTraveled, fallDistance, field_25599, firstUpdate, FLAGS, fluidHeight, glowing, horizontalCollision, horizontalSpeed, ignoreCameraFrustum, inanimate, inNetherPortal, lastNetherPortalPosition, lastRenderX, lastRenderY, lastRenderZ, LOGGER, movementMultiplier, netherPortalTime, noClip, onGround, pitch, POSE, prevHorizontalSpeed, prevPitch, prevX, prevY, prevYaw, prevZ, pushSpeedReduction, random, removed, ridingCooldown, stepHeight, submergedInWater, teleporting, timeUntilRegen, touchingWater, updateNeeded, uuid, uuidString, velocityDirty, velocityModified, verticalCollision, world, yaw
DUMMY
Modifier | Constructor and Description |
---|---|
|
ItemEntity(EntityType<? extends ItemEntity> type,
World world) |
private |
ItemEntity(ItemEntity itemEntity) |
|
ItemEntity(World world,
double x,
double y,
double z) |
|
ItemEntity(World world,
double x,
double y,
double z,
ItemStack stack) |
addPassenger, addScoreboardTag, addVelocity, adjustMovementForCollisions, adjustMovementForCollisions, adjustMovementForPiston, adjustMovementForSneaking, adjustSingleAxisMovementForCollisions, afterSpawn, animateDamage, applyMirror, applyRotation, baseTick, bypassesLandingEffects, bypassesSteppingEffects, calculateBoundsForPose, calculateDimensions, calculateNextStepSoundDistance, canAddPassenger, canAvoidTraps, canBeRiddenInWater, canBeSpectated, canExplosionDestroyBlock, canFly, canStartRiding, canUsePortals, changeLookDirection, checkBlockCollision, checkDespawn, checkWaterState, collides, collidesWith, copyFrom, copyPositionAndRotation, dealDamage, destroy, detach, distanceTo, doesNotCollide, doesRenderOnFire, dropItem, dropItem, dropStack, dropStack, entityDataRequiresOperator, equals, equip, equipStack, extinguish, fall, fromTag, getAir, getArmorItems, getBlockPos, getBodyY, getBoundingBox, getBrightnessAtEyes, getBurningDuration, getCameraPosVec, getCommandSource, getCustomName, getDataTracker, getDefaultName, getDefaultNetherPortalCooldown, getDimensions, getDisplayName, getEffectiveExplosionResistance, getEntityId, getEntityName, getEntityWorld, getEyeHeight, getEyeHeight, getEyeY, getFireTicks, getFlag, getFluidHeight, getHeadYaw, getHeight, getHeightOffset, getHighSpeedSplashSound, getHorizontalFacing, getHoverEvent, getItemsEquipped, getItemsHand, getJumpVelocityMultiplier, getLandingBlockState, getLandingPos, getMaxAir, getMaxNetherPortalTime, getMountedHeightOffset, getMovementDirection, getOppositeRotationVector, getOppositeRotationVector, getParticleX, getParticleZ, getPassengerDismountOffset, getPassengerList, getPassengersDeep, getPermissionLevel, getPistonBehavior, getPitch, getPos, getPose, getPrimaryPassenger, getRandomBodyY, getRenderDistanceMultiplier, getRootVehicle, getRotationClient, getRotationVec, getRotationVecClient, getRotationVector, getRotationVector, getSafeFallDistance, getSavedEntityId, getScoreboardTags, getScoreboardTeam, getServer, getSoundCategory, getSplashSound, getStandingEyeHeight, getSwimSound, getTargetingMargin, getTeamColorValue, getTeleportTarget, getTrackedPosition, getType, getUuid, getUuidAsString, getVehicle, getVelocity, getVelocityAffectingPos, getVelocityMultiplier, getVisibilityBoundingBox, getWidth, getX, getY, getYaw, getZ, handleAttack, handleFallDamage, handleStatus, hasCustomName, hashCode, hasNetherPortalCooldown, hasNoGravity, hasPassenger, hasPassengerDeep, hasPassengers, hasPassengerType, hasPermissionLevel, hasPlayerRider, hasVehicle, hasWings, interact, interactAt, isAlive, isChunkPosUpdateRequested, isCollidable, isConnectedThroughVehicle, isCustomNameVisible, isDescending, isGlowing, isImmuneToExplosion, isInLava, isInRange, isInsideWall, isInsideWaterOrBubbleColumn, isInSneakingPose, isInSwimmingPose, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableTo, isLiving, isLogicalSideForUpdatingMovement, isOnFire, isOnGround, isPartOf, isPushable, isSilent, isSneaking, isSneaky, isSpectator, isSprinting, isSubmergedIn, isSubmergedInWater, isSwimming, isTeammate, isTeamPlayer, isTouchingWater, isTouchingWaterOrRain, isWet, kill, lookAt, method_29239, method_29241, method_29919, method_30076, method_30330, method_30632, method_30633, method_30634, method_30950, method_30951, method_31166, move, moveToBoundingBoxCenter, offsetX, offsetZ, onBlockCollision, onBubbleColumnCollision, onBubbleColumnSurfaceCollision, onKilledOther, onPassengerLookAround, onStartedTrackingBy, onStoppedTrackingBy, onStruckByLightning, onSwimmingStart, playFlySound, playSound, playStepSound, playSwimSound, populateCrashReport, pushAwayFrom, pushOutOfBlocks, raycast, refreshPosition, refreshPositionAfterTeleport, refreshPositionAfterTeleport, refreshPositionAndAngles, refreshPositionAndAngles, remove, removeAllPassengers, removePassenger, removeScoreboardTag, requestTeleport, resetNetherPortalCooldown, resetPosition, saveSelfToTag, saveToTag, scheduleVelocityUpdate, sendSystemMessage, setAir, setBoundingBox, setCustomName, setCustomNameVisible, setEntityId, setFireTicks, setFlag, setGlowing, setHeadYaw, setInNetherPortal, setInvisible, setInvulnerable, setNoGravity, setOnFireFor, setOnFireFromLava, setOnGround, setPos, setPose, setRenderDistanceMultiplier, setRotation, setSilent, setSneaking, setSprinting, setSwimming, setUuid, setVelocity, setVelocity, setVelocityClient, setWorld, setYaw, shouldBroadcastConsoleToOps, shouldLeaveSwimmingPose, shouldReceiveFeedback, shouldRender, shouldRender, shouldRenderName, shouldSetPositionOnLoad, shouldSpawnSprintingParticles, shouldTrackOutput, slowMovement, spawnSprintingParticles, squaredDistanceTo, squaredDistanceTo, squaredDistanceTo, squaredHorizontalLength, startRiding, startRiding, stopRiding, streamPassengersRecursively, teleport, teleportRequested, tickNetherPortal, tickNetherPortalCooldown, tickRiding, toListTag, toListTag, toString, toTag, updateKilledAdvancementCriterion, updateMovementInFluid, updatePassengerForDismount, updatePassengerPosition, updatePosition, updatePositionAndAngles, updateSwimming, updateTrackedHeadRotation, updateTrackedPosition, updateTrackedPosition, updateTrackedPositionAndAngles, updateVelocity, updateWaterState, wouldPoseNotCollide
private static final TrackedData<ItemStack> STACK
private int age
private int pickupDelay
private int health
private UUID thrower
private UUID owner
public final float hoverHeight
public ItemEntity(EntityType<? extends ItemEntity> type, World world)
public ItemEntity(World world, double x, double y, double z)
@Environment(value=CLIENT) private ItemEntity(ItemEntity itemEntity)
protected void initDataTracker()
initDataTracker
in class Entity
private void applyBuoyancy()
private void method_24348()
private void tryMerge()
private boolean canMerge()
private void tryMerge(ItemEntity other)
private static void merge(ItemEntity targetEntity, ItemStack stack1, ItemStack stack2)
private static void merge(ItemEntity targetEntity, ItemStack targetStack, ItemEntity sourceEntity, ItemStack sourceStack)
public boolean isFireImmune()
isFireImmune
in class Entity
public boolean damage(DamageSource source, float amount)
public void writeCustomDataToTag(CompoundTag tag)
writeCustomDataToTag
in class Entity
public void readCustomDataFromTag(CompoundTag tag)
readCustomDataFromTag
in class Entity
public void onPlayerCollision(PlayerEntity player)
onPlayerCollision
in class Entity
public Text getName()
public boolean isAttackable()
isAttackable
in class Entity
@Nullable public Entity moveToWorld(ServerWorld destination)
Note all entities except server player entities are completely recreated at the destination.
moveToWorld
in class Entity
public ItemStack getStack()
public void setStack(ItemStack stack)
public void onTrackedDataSet(TrackedData<?> data)
onTrackedDataSet
in class Entity
@Environment(value=CLIENT) public int getAge()
public void setToDefaultPickupDelay()
public void resetPickupDelay()
public void setPickupDelayInfinite()
public void setPickupDelay(int pickupDelay)
public boolean cannotPickup()
public void setCovetedItem()
public void setDespawnImmediately()
@Environment(value=CLIENT) public float method_27314(float float2)
public Packet<?> createSpawnPacket()
createSpawnPacket
in class Entity
@Environment(value=CLIENT) public ItemEntity method_29271()