FakePlayer

open class FakePlayer(level: ClientLevel, gameProfile: GameProfile, var onRemoval: Consumer<in FakePlayer>? = null) : RemotePlayer, MinecraftShortcuts

This class represents a Fake Player implementing attackability and assured totem pops instead of death into RemotePlayer.

Inheritors

Constructors

Link copied to clipboard
constructor(level: ClientLevel, gameProfile: GameProfile, onRemoval: Consumer<in FakePlayer>? = null)

Properties

Link copied to clipboard
open val abilities: Abilities
Link copied to clipboard
Link copied to clipboard
open val activeEffects: Collection<MobEffectInstance>
Link copied to clipboard
open val activeEffectsMap: Map<Holder<MobEffect>, MobEffectInstance>
Link copied to clipboard
open val activeItem: ItemStack
Link copied to clipboard
open val ageScale: Float
Link copied to clipboard
open var airSupply: Int
Link copied to clipboard
Link copied to clipboard
val LivingEntity.armorItems: Array<ItemStack>
Link copied to clipboard
val DataComponentGetter.armorKnockbackResistance: Double
Link copied to clipboard
val DataComponentGetter.armorToughness: Double
Link copied to clipboard
open val armorValue: Int
Link copied to clipboard
val DataComponentGetter.armorValue: Double
Link copied to clipboard
Link copied to clipboard
val attachments: EntityAttachments
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val attributes: AttributeMap
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val bedOrientation: @Nullable Direction?
Link copied to clipboard
Link copied to clipboard
val DataComponentGetter.blocksAttacksComponent: @Nullable BlocksAttacks?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val blockStateOn: BlockState
Link copied to clipboard
val blockX: Int
Link copied to clipboard
val blockY: Int
Link copied to clipboard
val blockZ: Int
Link copied to clipboard
var boundingBox: AABB
Link copied to clipboard
val Entity.box: AABB
Link copied to clipboard
open val brain: Brain<*>
Link copied to clipboard
open val combatTracker: CombatTracker
Link copied to clipboard
Link copied to clipboard
var containerMenu: AbstractContainerMenu
Link copied to clipboard
open val controlledVehicle: @Nullable Entity?
Link copied to clipboard
open val controllingPassenger: @Nullable LivingEntity?
Link copied to clipboard
open val cooldowns: ItemCooldowns
Link copied to clipboard
var currentExplosionCause: @Nullable Entity?
Link copied to clipboard
var currentImpulseImpactPos: @Nullable Vec3?
Link copied to clipboard
open var customName: @Nullable Component?
Link copied to clipboard
Link copied to clipboard
open var deltaMovement: Vec3
Link copied to clipboard
Link copied to clipboard
var dimensions: EntityDimensions
Link copied to clipboard
open val direction: Direction
Link copied to clipboard
open val dismountPoses: ImmutableList<Pose>
Link copied to clipboard
open val displayName: Component
Link copied to clipboard
val elytraAnimationState: ElytraAnimationState
Link copied to clipboard
Link copied to clipboard
open val enderChestInventory: PlayerEnderChestContainer
Link copied to clipboard
open val entityData: SynchedEntityData
Link copied to clipboard
val DataComponentGetter.equipmentSlot: EquipmentSlot?
Link copied to clipboard
val DataComponentGetter.equippableComponent: @Nullable Equippable?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val eyePosition: Vec3
Link copied to clipboard
open val eyeY: Double
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val fallSounds: LivingEntity.Fallsounds
Link copied to clipboard
open val feedbackDisplayName: Component
Link copied to clipboard
open val firstPassenger: @Nullable Entity?
Link copied to clipboard
var fishing: @Nullable FishingHook?
Link copied to clipboard
var fluidHeight: Object2DoubleMap<TagKey<Fluid>>
Link copied to clipboard
Link copied to clipboard
val fluidOnEyes: Set<TagKey<Fluid>>
Link copied to clipboard
Link copied to clipboard
val DataComponentGetter.foodComponent: FoodProperties?
Link copied to clipboard
open val foodData: FoodData
Link copied to clipboard
open val forward: Vec3
Link copied to clipboard
open val gameProfile: GameProfile
Link copied to clipboard
open val gpuDevice: GpuDevice
Link copied to clipboard
Link copied to clipboard
val LivingEntity.handItems: Array<ItemStack>
Link copied to clipboard
open val headLookAngle: Vec3
Link copied to clipboard
open var health: Float
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val hurtDir: Float
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open var id: Int
Link copied to clipboard
open val inBlockState: BlockState
Link copied to clipboard
open val indirectPassengers: Iterable<Entity>
Link copied to clipboard
open val interaction: MultiPlayerGameMode
Link copied to clipboard
open val interpolation: InterpolationHandler
Link copied to clipboard
open val inventory: Inventory
Link copied to clipboard
val inventoryMenu: InventoryMenu
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val isAlive: Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val isBaby: Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val isHurt: Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val isInLava: Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val isInWall: Boolean
Link copied to clipboard
open val isInWater: Boolean
Link copied to clipboard
Link copied to clipboard
open var isJumping: Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val isOnFire: Boolean
Link copied to clipboard
Link copied to clipboard
open val isOnRails: Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val isScoping: Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open var isSilent: Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val isVehicle: Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val itemBlockingWith: @Nullable ItemStack?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val jumpPower: Float
Link copied to clipboard
open val killCredit: @Nullable LivingEntity?
Link copied to clipboard
open val knownMovement: Vec3
Link copied to clipboard
open val knownSpeed: Vec3
Link copied to clipboard
open val lastAttacker: LivingEntity
Link copied to clipboard
open val lastClimbablePos: Optional<BlockPos>
Link copied to clipboard
open val lastDamageSource: @Nullable DamageSource?
Link copied to clipboard
open var lastDeathLocation: Optional<GlobalPos>
Link copied to clipboard
open var lastHurtByMob: @Nullable LivingEntity?
Link copied to clipboard
Link copied to clipboard
open val lastHurtByPlayer: @Nullable Player?
Link copied to clipboard
Link copied to clipboard
open val lastHurtMob: @Nullable LivingEntity?
Link copied to clipboard
Link copied to clipboard
val Entity.lastPos: Vec3
Link copied to clipboard
open val livingEntity: LivingEntity
Link copied to clipboard
open val lookAngle: Vec3
Link copied to clipboard
open val lootTable: Optional<ResourceKey<LootTable>>
Link copied to clipboard
Link copied to clipboard
open val luck: Float
Link copied to clipboard
open var mainArm: HumanoidArm
Link copied to clipboard
open val mainHandItem: ItemStack
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val maxAirSupply: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val mc: Minecraft
Link copied to clipboard
open val motionDirection: Direction
Link copied to clipboard
Link copied to clipboard
open val name: Component
Link copied to clipboard
open val nearestViewDirection: Direction
Link copied to clipboard
Link copied to clipboard
val Entity.netherPosition: Vec3
Link copied to clipboard
open val network: ClientPacketListener
Link copied to clipboard
open var noActionTime: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val offhandItem: ItemStack
Link copied to clipboard
open val onPos: BlockPos
Link copied to clipboard
open val onPosLegacy: BlockPos
Link copied to clipboard
Link copied to clipboard
val passengers: List<Entity>
Link copied to clipboard
open val passengersAndSelf: Stream<Entity>
Link copied to clipboard
Link copied to clipboard
open val pickRadius: Float
Link copied to clipboard
open val pickResult: @Nullable ItemStack?
Link copied to clipboard
val Player.ping: Int
Link copied to clipboard
open val pistonPushReaction: PushReaction
Link copied to clipboard
Link copied to clipboard
open val player: LocalPlayer
Link copied to clipboard
open val playerInfo: @Nullable PlayerInfo?
Link copied to clipboard
Link copied to clipboard
var portalProcess: @Nullable PortalProcessor?
Link copied to clipboard
open var pose: Pose
Link copied to clipboard
open val positionCodec: VecDeltaCodec
Link copied to clipboard
open val quadLeashHolderOffsets: Array<out Vec3>
Link copied to clipboard
open val random: RandomSource
Link copied to clipboard
open val randomY: Double
Link copied to clipboard
Link copied to clipboard
open val removalReason: Entity.RemovalReason
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val rootVehicle: Entity
Link copied to clipboard
val Entity.rotation: Rotation
Link copied to clipboard
open val rotationVector: Vec2
Link copied to clipboard
Link copied to clipboard
open var score: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val selfAndPassengers: Stream<Entity>
Link copied to clipboard
open var shoulderParrotLeft: Optional<Parrot.Variant>
Link copied to clipboard
open var shoulderParrotRight: Optional<Parrot.Variant>
Link copied to clipboard
open val skin: PlayerSkin
Link copied to clipboard
open val sleepingPos: Optional<BlockPos>
Link copied to clipboard
open val sleepTimer: Int
Link copied to clipboard
open val soundSource: SoundSource
Link copied to clipboard
open var speed: Float
Link copied to clipboard
Link copied to clipboard
open val stringUUID: String
Link copied to clipboard
Link copied to clipboard
var swingingArm: InteractionHand
Link copied to clipboard
Link copied to clipboard
open val tags: Set<String>
Link copied to clipboard
Link copied to clipboard
open val team: @Nullable PlayerTeam?
Link copied to clipboard
open val teamColor: Int
Link copied to clipboard
Link copied to clipboard
open var ticksFrozen: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val DataComponentGetter.toolComponent: Tool?
Link copied to clipboard
Link copied to clipboard
open val type: EntityType<*>
Link copied to clipboard
open val usedItemHand: InteractionHand
Link copied to clipboard
open val useItem: ItemStack
Link copied to clipboard
Link copied to clipboard
open var uuid: UUID
Link copied to clipboard
open val vehicle: @Nullable Entity?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val voicePitch: Float
Link copied to clipboard
val walkAnimation: WalkAnimationState
Link copied to clipboard
open val wardenSpawnTracker: Optional<WardenSpawnTracker>
Link copied to clipboard
Link copied to clipboard
open val weaponItem: ItemStack
Link copied to clipboard
open val world: ClientLevel
Link copied to clipboard
val LivingEntity.wouldBlockHit: Boolean
Link copied to clipboard
val x: Double
Link copied to clipboard
var xo: Double
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open var xRot: Float
Link copied to clipboard
Link copied to clipboard
var xxa: Float
Link copied to clipboard
val y: Double
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open var yHeadRot: Float
Link copied to clipboard
Link copied to clipboard
var yo: Double
Link copied to clipboard
Link copied to clipboard
open var yRot: Float
Link copied to clipboard
Link copied to clipboard
var yya: Float
Link copied to clipboard
val z: Double
Link copied to clipboard
var zo: Double
Link copied to clipboard
Link copied to clipboard
var zza: Float

Functions

Link copied to clipboard
open fun absSnapRotationTo(yRot: Float, xRot: Float)
Link copied to clipboard
open fun absSnapTo(x: Double, y: Double, z: Double)
open fun absSnapTo(x: Double, y: Double, z: Double, yRot: Float, xRot: Float)
Link copied to clipboard
open fun activeLocationDependentEnchantments(slot: EquipmentSlot): Map<Enchantment, Set<EnchantmentLocationBasedEffect>>
Link copied to clipboard
open fun addDeltaMovement(addend: Vec3)
Link copied to clipboard
fun addEffect(effectInstance: MobEffectInstance): Boolean
open fun addEffect(effectInstance: MobEffectInstance, entity: @Nullable Entity?): Boolean
Link copied to clipboard
open fun addItem(stack: ItemStack): Boolean
Link copied to clipboard
open fun addTag(tag: String): Boolean
Link copied to clipboard
open fun adjustSpawnLocation(level: ServerLevel, pos: BlockPos): BlockPos
Link copied to clipboard
open fun aiStep()
Link copied to clipboard
open fun animateHurt(yaw: Float)
Link copied to clipboard
fun applyComponentsFromItemStack(stack: ItemStack)
Link copied to clipboard
open fun applyEffectsFromBlocks(oldPosition: Vec3, position: Vec3)
Link copied to clipboard
open fun applyItemBlocking(level: ServerLevel, damageSource: DamageSource, damageAmount: Float): Float
Link copied to clipboard
Link copied to clipboard
open fun asLivingEntity(): @Nullable LivingEntity?
Link copied to clipboard
open fun attack(target: Entity)
Link copied to clipboard
open fun attackable(): Boolean
Link copied to clipboard
open fun avatarState(): ClientAvatarState
Link copied to clipboard
open fun awardKillScore(entity: Entity, damageSource: DamageSource)
Link copied to clipboard
open fun awardRecipes(recipes: Collection<RecipeHolder<*>>): Int
Link copied to clipboard
open fun awardRecipesByKey(recipes: List<ResourceKey<Recipe<*>>>)
Link copied to clipboard
open fun awardStat(statKey: Identifier)
open fun awardStat(stat: Stat<*>)
open fun awardStat(stat: Identifier, increment: Int)
open fun awardStat(stat: Stat<*>, increment: Int)
Link copied to clipboard
open fun baseTick()
Link copied to clipboard
open fun belowNameDisplay(): @Nullable Component?
Link copied to clipboard
open fun blockActionRestricted(level: Level, pos: BlockPos, gameMode: GameType): Boolean
Link copied to clipboard
fun LivingEntity.blockedByShield(source: DamageSource): Boolean
Link copied to clipboard
Link copied to clipboard
open fun blockPosition(): BlockPos
Link copied to clipboard
fun Entity.boxedDistanceTo(entity: Entity): Double

Allows to calculate the distance between the current entity and entity from the nearest corner of the bounding box

Link copied to clipboard
open fun broadcastToPlayer(player: ServerPlayer): Boolean
Link copied to clipboard
open fun calculateEntityAnimation(includeHeight: Boolean)
Link copied to clipboard
open fun calculateFallDamage(fallDistance: Double, damageMultiplier: Float): Int
Link copied to clipboard
fun calculateViewVector(xRot: Float, yRot: Float): Vec3
Link copied to clipboard
open fun canAddPassenger(passenger: Entity): Boolean
Link copied to clipboard
open fun canAttack(target: LivingEntity): Boolean
Link copied to clipboard
open fun canAttackType(entityType: EntityType<*>): Boolean
Link copied to clipboard
open fun canBeAffected(effectInstance: MobEffectInstance): Boolean
Link copied to clipboard
open fun canBeCollidedWith(entity: @Nullable Entity?): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun canCollideWith(entity: Entity): Boolean
Link copied to clipboard
Link copied to clipboard
open fun canDropItems(): Boolean
Link copied to clipboard
open fun canEat(canAlwaysEat: Boolean): Boolean
Link copied to clipboard
fun canEquipWithDispenser(stack: ItemStack): Boolean
Link copied to clipboard
open fun canFreeze(): Boolean
Link copied to clipboard
open fun canHarmPlayer(other: Player): Boolean
Link copied to clipboard
Link copied to clipboard
open fun cannotAttackWithItem(stack: ItemStack, adjustTicks: Int): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun canSprint(): Boolean
Link copied to clipboard
open fun canStandOnFluid(fluidState: FluidState): Boolean
Link copied to clipboard
open fun canTeleport(fromLevel: Level, toLevel: Level): Boolean
Link copied to clipboard
Link copied to clipboard
open fun canUsePortal(allowPassengers: Boolean): Boolean
Link copied to clipboard
open fun canUseSlot(slot: EquipmentSlot): Boolean
Link copied to clipboard
Link copied to clipboard
open fun causeExtraKnockback(entity: Entity, knockback: Float, deltaMovement: Vec3)
Link copied to clipboard
open fun causeFallDamage(fallDistance: Double, damageMultiplier: Float, damageSource: DamageSource): Boolean
Link copied to clipboard
open fun causeFoodExhaustion(exhaustion: Float)
Link copied to clipboard
open fun checkBelowWorld()
Link copied to clipboard
open fun checkDespawn()
Link copied to clipboard
Link copied to clipboard
open fun chunkPosition(): ChunkPos
Link copied to clipboard
open fun clearFire()
Link copied to clipboard
open fun clearFreeze()
Link copied to clipboard
open fun clearSleepingPos()
Link copied to clipboard
open fun closerThan(entity: Entity, distance: Double): Boolean
open fun closerThan(entity: Entity, horizontalDistance: Double, verticalDistance: Double): Boolean
Link copied to clipboard
open fun collidedWithFluid(fluid: FluidState, pos: BlockPos, from: Vec3, to: Vec3): Boolean
Link copied to clipboard
open fun collidedWithShapeMovingFrom(from: Vec3, to: Vec3, boxes: List<AABB>): Boolean
Link copied to clipboard
open fun copyPosition(entity: Entity)
Link copied to clipboard
open fun createCommandSourceStackForNameResolution(level: ServerLevel): CommandSourceStack
Link copied to clipboard
open fun crit(entityHit: Entity)
Link copied to clipboard
open fun damageSources(): DamageSources
Link copied to clipboard
Link copied to clipboard
open fun debugInfo(): String
Link copied to clipboard
open fun deflection(projectile: Projectile): ProjectileDeflection
Link copied to clipboard
open fun die(damageSource: DamageSource)
Link copied to clipboard
fun discard()
Link copied to clipboard
Link copied to clipboard
open fun dismountTo(x: Double, y: Double, z: Double)
Link copied to clipboard
open fun displayClientMessage(chatComponent: Component, actionBar: Boolean)
Link copied to clipboard
Link copied to clipboard
open fun distanceTo(entity: Entity): Float
Link copied to clipboard
open fun distanceToSqr(entity: Entity): Double
open fun distanceToSqr(vec: Vec3): Double
open fun distanceToSqr(x: Double, y: Double, z: Double): Double
Link copied to clipboard
fun doCheckFallDamage(x: Double, y: Double, z: Double, onGround: Boolean)
Link copied to clipboard
fun Entity.doesCollideAt(pos: Vec3 = player.position()): Boolean

Check if the entity box collides with any block in the world at the given pos.

Link copied to clipboard
fun Entity.doesNotCollideBelow(until: Double = -64.0): Boolean

Check if the entity collides with anything below his bounding box.

Link copied to clipboard
open fun doHurtTarget(level: ServerLevel, source: Entity): Boolean
Link copied to clipboard
open fun drop(stack: ItemStack, randomizeMotion: Boolean, includeThrower: Boolean): @Nullable ItemEntity?
open fun drop(itemStack: ItemStack, includeThrowerName: Boolean): @Nullable ItemEntity?
Link copied to clipboard
open fun dropAllLeashConnections(player: @Nullable Player?): Boolean
Link copied to clipboard
open fun dropFromEntityInteractLootTable(level: ServerLevel, lootTable: ResourceKey<LootTable>, entity: @Nullable Entity?, tool: ItemStack, dropConsumer: BiConsumer<ServerLevel, ItemStack>): Boolean
Link copied to clipboard
open fun dropFromGiftLootTable(level: ServerLevel, lootTable: ResourceKey<LootTable>, dropConsumer: BiConsumer<ServerLevel, ItemStack>): Boolean
Link copied to clipboard
open fun dropFromLootTable(level: ServerLevel, damageSource: DamageSource, playerKill: Boolean, lootTable: ResourceKey<LootTable>)
open fun dropFromLootTable(level: ServerLevel, damageSource: DamageSource, playerKill: Boolean, lootTable: ResourceKey<LootTable>, dropConsumer: Consumer<ItemStack>)
Link copied to clipboard
open fun ejectPassengers()
Link copied to clipboard
open fun entityAttackRange(): AttackRange
Link copied to clipboard
Link copied to clipboard
open fun equipmentHasChanged(oldItem: ItemStack, newItem: ItemStack): Boolean
Link copied to clipboard
open fun extinguishFire()
Link copied to clipboard
open fun fillCrashReportCategory(category: CrashReportCategory)
Link copied to clipboard
fun Entity.findEntityInCrosshair(range: Double, rotation: Rotation, predicate: Predicate<Entity>? = null): EntityHitResult?
Link copied to clipboard
open fun fireImmune(): Boolean
Link copied to clipboard
open fun forceAddEffect(instance: MobEffectInstance, entity: @Nullable Entity?)
Link copied to clipboard
open fun forceSetRotation(yRot: Float, yRelative: Boolean, xRot: Float, xRelative: Boolean)
Link copied to clipboard
open fun fudgePositionAfterSizeChange(dimensions: EntityDimensions): Boolean
Link copied to clipboard
open fun gameEvent(gameEvent: Holder<GameEvent>)
open fun gameEvent(gameEvent: Holder<GameEvent>, entity: @Nullable Entity?)
Link copied to clipboard
open fun gameMode(): @Nullable GameType?
Link copied to clipboard
open operator fun <T : Any> get(component: DataComponentType<out T>): @Nullable T?
Link copied to clipboard
fun LivingEntity.getActualHealth(fromScoreboard: Boolean = true): Float

Sometimes the server does not publish the actual entity health with its metadata. This function incorporates other sources to get the actual value.

Link copied to clipboard
open fun getAddEntityPacket(entity: ServerEntity): Packet<ClientGamePacketListener>
Link copied to clipboard
open fun <A : Any> getAttached(type: AttachmentType<A>): @Nullable A?
Link copied to clipboard
open fun <A : Any> getAttachedOrCreate(type: AttachmentType<A>): A
open fun <A : Any> getAttachedOrCreate(type: AttachmentType<A>, initializer: Supplier<A>): A
Link copied to clipboard
@Contract(value = "_, !null -> !null")
open fun <A : Any> getAttachedOrElse(type: AttachmentType<A>, defaultValue: @Nullable A?): A
Link copied to clipboard
open fun <A : Any> getAttachedOrGet(type: AttachmentType<A>, defaultValue: Supplier<A>): A
Link copied to clipboard
open fun <A : Any> getAttachedOrSet(type: AttachmentType<A>, defaultValue: A): A
Link copied to clipboard
open fun <A : Any> getAttachedOrThrow(type: AttachmentType<A>): A
Link copied to clipboard
open fun getAttackAnim(partialTick: Float): Float
Link copied to clipboard
open fun getAttackStrengthScale(adjustTicks: Float): Float
Link copied to clipboard
open fun getAttribute(attribute: Holder<Attribute>): @Nullable AttributeInstance?
Link copied to clipboard
open fun getAttributeBaseValue(attribute: Holder<Attribute>): Double
Link copied to clipboard
open fun getAttributeValue(attribute: Holder<Attribute>): Double
Link copied to clipboard
fun DataComponentGetter.getAttributeValue(attribute: Holder<Attribute>, slot: EquipmentSlot? = null, baseValue: Double = attribute.value().defaultValue): Double
Link copied to clipboard
open fun getAvailableSpaceBelow(distance: Double): Double
Link copied to clipboard
open fun getBlockExplosionResistance(explosion: Explosion, level: BlockGetter, pos: BlockPos, blockState: BlockState, fluidState: FluidState, explosionPower: Float): Float
Link copied to clipboard
fun Entity.getBoundingBoxAt(pos: Vec3): AABB
Link copied to clipboard
open fun getDamageAfterArmorAbsorb(damageSource: DamageSource, damageAmount: Float): Float
Link copied to clipboard
open fun getDamageAfterMagicAbsorb(damageSource: DamageSource, damageAmount: Float): Float
Link copied to clipboard
fun LivingEntity.getDamageFromExplosion(pos: Vec3, power: Float = 6.0f, explosionRange: Float = power * 2f, damageDistance: Float = explosionRange * explosionRange, exclude: Array<BlockPos>? = null, include: BlockPos? = null, maxBlastResistance: Float? = null, entityBoundingBox: AABB? = null): Float

See ExplosionDamageCalculator.getEntityDamageAmount.

Link copied to clipboard
open fun getDefaultDimensions(pose: Pose): EntityDimensions
Link copied to clipboard
open fun getDestroySpeed(state: BlockState): Float
Link copied to clipboard
fun getDimensions(pose: Pose): EntityDimensions
Link copied to clipboard
open fun getDismountLocationForPassenger(passenger: LivingEntity): Vec3
Link copied to clipboard
open fun getEffect(effect: Holder<MobEffect>): @Nullable MobEffectInstance?
Link copied to clipboard
open fun getEffectBlendFactor(effect: Holder<MobEffect>, partialTick: Float): Float
Link copied to clipboard
fun LivingEntity.getEffectiveDamage(source: DamageSource, damage: Float, ignoreShield: Boolean = false): Float

Applies armor, enchantments, effects, etc. to the damage and returns the damage that is actually applied. This function is so damn ugly that I turned off code smell analysis for it.

Link copied to clipboard
open fun getEnchantedDamage(entity: Entity, damage: Float, damageSource: DamageSource): Float
Link copied to clipboard
fun getEquipmentSlotForItem(stack: ItemStack): EquipmentSlot
Link copied to clipboard
fun getExperienceReward(level: ServerLevel, killer: @Nullable Entity?): Int
Link copied to clipboard
fun LivingEntity.getExplosionDamageFromEntity(entity: Entity): Float
Link copied to clipboard
fun LivingEntity.getExposureToExplosion(source: Vec3, exclude: Array<BlockPos>?, include: BlockPos?, maxBlastResistance: Float?, entityBoundingBox: AABB?): Float

Basically ServerExplosion.getSeenPercent but this method allows us to exclude blocks using exclude.

Link copied to clipboard
open fun getFieldOfViewModifier(isFirstPerson: Boolean, fovEffectScale: Float): Float
Link copied to clipboard
open fun getFluidFallingAdjustedMovement(gravity: Double, isFalling: Boolean, deltaMovement: Vec3): Vec3
Link copied to clipboard
open fun getFluidHeight(fluidTag: TagKey<Fluid>): Double
Link copied to clipboard
open fun getHandHoldingItemAngle(item: Item): Vec3
Link copied to clipboard
open fun getItemBySlot(slot: EquipmentSlot): ItemStack
Link copied to clipboard
open fun getItemHeldByArm(arm: HumanoidArm): ItemStack
Link copied to clipboard
open fun getItemInHand(hand: InteractionHand): ItemStack
Link copied to clipboard
open fun getItemSwapScale(adjustTicks: Float): Float
Link copied to clipboard
open fun getLightProbePosition(partialTick: Float): Vec3
Link copied to clipboard
open fun getLocalBoundsForPose(pose: Pose): AABB
Link copied to clipboard
open fun <T : Any> getOrDefault(component: DataComponentType<out T>, defaultValue: T): T
Link copied to clipboard
open fun getParrotVariantOnShoulder(left: Boolean): Parrot.Variant
Link copied to clipboard
open fun getPassengerRidingPosition(entity: Entity): Vec3
Link copied to clipboard
fun getPosition(partialTick: Float): Vec3
Link copied to clipboard
open fun getPreciseBodyRotation(partialTick: Float): Float
Link copied to clipboard
open fun getProjectile(weaponStack: ItemStack): ItemStack
Link copied to clipboard
open fun getRandomX(scale: Double): Double
Link copied to clipboard
open fun getRandomZ(scale: Double): Double
Link copied to clipboard
open fun getRelativePortalPosition(axis: Direction.Axis, rectangle: BlockUtil.FoundRectangle): Vec3
Link copied to clipboard
open fun getRopeHoldPosition(partialTicks: Float): Vec3
Link copied to clipboard
open fun getSlot(index: Int): @Nullable SlotAccess?
Link copied to clipboard
open fun getSlotsFromRange(range: IntList): SlotCollection
Link copied to clipboard
open fun getSwimAmount(partialTicks: Float): Float
Link copied to clipboard
Link copied to clipboard
open fun <T : Any> getTyped(component: DataComponentType<T>): @Nullable TypedDataComponent<T>?
Link copied to clipboard
fun getUpVector(partialTick: Float): Vec3
Link copied to clipboard
open fun getVehicleAttachmentPoint(entity: Entity): Vec3
Link copied to clipboard
fun getViewVector(partialTick: Float): Vec3
Link copied to clipboard
open fun getViewXRot(partialTick: Float): Float
Link copied to clipboard
open fun getViewYRot(partialTick: Float): Float
Link copied to clipboard
open fun getVisibilityPercent(lookingEntity: @Nullable Entity?): Double
Link copied to clipboard
open fun giveExperienceLevels(levels: Int)
Link copied to clipboard
open fun giveExperiencePoints(xpPoints: Int)
Link copied to clipboard
open fun handleCreativeModeItemDrop(stack: ItemStack)
Link copied to clipboard
open fun handleDamageEvent(damageSource: DamageSource)
Link copied to clipboard
open fun handleEntityEvent(id: Byte)
Link copied to clipboard
open fun handleExtraItemsCreatedOnUse(stack: ItemStack)
Link copied to clipboard
Link copied to clipboard
open fun hasAttached(type: AttachmentType<*>): Boolean
Link copied to clipboard
open fun hasContainerOpen(openCounter: ContainerOpenersCounter, pos: BlockPos): Boolean
Link copied to clipboard
Link copied to clipboard
open fun hasCorrectToolForDrops(state: BlockState): Boolean
Link copied to clipboard
Link copied to clipboard
open fun hasEffect(effect: Holder<MobEffect>): Boolean
Link copied to clipboard
Link copied to clipboard
fun LivingEntity.hasHealthScoreboard(): Boolean
Link copied to clipboard
open fun hasIndirectPassenger(entity: Entity): Boolean
Link copied to clipboard
Link copied to clipboard
open fun hasItemInSlot(slot: EquipmentSlot): Boolean
Link copied to clipboard
Link copied to clipboard
open fun hasLineOfSight(entity: Entity): Boolean
open fun hasLineOfSight(entity: Entity, block: ClipContext.Block, fluid: ClipContext.Fluid, y: Double): Boolean
Link copied to clipboard
open fun hasPassenger(predicate: Predicate<Entity>): Boolean
open fun hasPassenger(entity: Entity): Boolean
Link copied to clipboard
open fun hasPose(pose: Pose): Boolean
Link copied to clipboard
open fun heal(healAmount: Float)
Link copied to clipboard
fun hurt(damageSource: DamageSource, amount: Float)
Link copied to clipboard
open fun hurtClient(damageSource: DamageSource): Boolean
Link copied to clipboard
fun hurtOrSimulate(damageSource: DamageSource, amount: Float): Boolean
Link copied to clipboard
open fun hurtServer(level: ServerLevel, damageSource: DamageSource, amount: Float): Boolean
Link copied to clipboard
fun igniteForSeconds(seconds: Float)
Link copied to clipboard
open fun igniteForTicks(ticks: Int)
Link copied to clipboard
open fun ignoreExplosion(explosion: Explosion): Boolean
Link copied to clipboard
open fun increaseScore(score: Int)
Link copied to clipboard
open fun indicateDamage(xDistance: Double, zDistance: Double)
Link copied to clipboard
open fun interact(player: Player, hand: InteractionHand): InteractionResult
Link copied to clipboard
open fun interactAt(player: Player, vec: Vec3, hand: InteractionHand): InteractionResult
Link copied to clipboard
open fun interactOn(entityToInteractOn: Entity, hand: InteractionHand): InteractionResult
Link copied to clipboard
fun Entity.interpolateCurrentPosition(tickDelta: Float): Vec3
Link copied to clipboard
fun Entity.interpolateCurrentRotation(tickDelta: Float): Rotation
Link copied to clipboard
open fun is(entity: Entity): Boolean
Link copied to clipboard
fun isAlliedTo(entity: @Nullable Entity?): Boolean
open fun isAlliedTo(team: @Nullable Team?): Boolean
Link copied to clipboard
open fun isColliding(pos: BlockPos, state: BlockState): Boolean
Link copied to clipboard
fun isEquippableInSlot(stack: ItemStack, slot: EquipmentSlot): Boolean
Link copied to clipboard
open fun isEyeInFluid(fluidTag: TagKey<Fluid>): Boolean
Link copied to clipboard
fun Entity.isFacingBlock(eyes: Vec3 = this.eyePosition, targetPoint: Vec3, blockPos: BlockPos, expectedSide: Direction? = null, expectedMaxRange: Double? = null): Boolean

Allows you to check if a point is behind a wall

Link copied to clipboard
open fun isFree(x: Double, y: Double, z: Double): Boolean
Link copied to clipboard
open fun isHolding(predicate: Predicate<ItemStack>): Boolean
open fun isHolding(item: Item): Boolean
Link copied to clipboard
open fun isInvisibleTo(player: Player): Boolean
Link copied to clipboard
open fun isInvulnerableTo(level: ServerLevel, damageSource: DamageSource): Boolean
Link copied to clipboard
fun isInvulnerableToBase(damageSource: DamageSource): Boolean
Link copied to clipboard
open fun isLookingAtMe(entity: LivingEntity, tolerance: Double, scaleByDistance: Boolean, visual: Boolean, vararg yValues: Double): Boolean
Link copied to clipboard
open fun isModelPartShown(part: PlayerModelPart): Boolean
Link copied to clipboard
open fun isPassengerOfSameVehicle(entity: Entity): Boolean
Link copied to clipboard
open fun isSupportedBy(pos: BlockPos): Boolean
Link copied to clipboard
open fun isWithinAttackRange(box: AABB, range: Double): Boolean
Link copied to clipboard
open fun isWithinBlockInteractionRange(pos: BlockPos, range: Double): Boolean
Link copied to clipboard
open fun isWithinEntityInteractionRange(entity: Entity, range: Double): Boolean
open fun isWithinEntityInteractionRange(box: AABB, range: Double): Boolean
Link copied to clipboard
open fun jumpFromGround()
Link copied to clipboard
open fun kill(level: ServerLevel)
Link copied to clipboard
open fun killedEntity(level: ServerLevel, entity: LivingEntity, damageSource: DamageSource): Boolean
Link copied to clipboard
open override fun knockback(strength: Double, x: Double, z: Double)

The fake player takes no knockback.

Link copied to clipboard
fun Entity.lastRenderPos(): Vec3
Link copied to clipboard
open fun lavaHurt()
Link copied to clipboard
open fun lavaIgnite()
Link copied to clipboard
open fun lerpHeadTo(yaw: Float, pitch: Int)
Link copied to clipboard
open fun lerpMotion(deltaMovement: Vec3)
Link copied to clipboard
open fun level(): Level
Link copied to clipboard
open fun load(input: ValueInput)
Link copied to clipboard

Loads the attributes from the player into the fake player.

Link copied to clipboard
open fun lookAt(anchor: EntityAnchorArgument.Anchor, target: Vec3)
Link copied to clipboard
Link copied to clipboard
open fun magicCrit(entityHit: Entity)
Link copied to clipboard
Link copied to clipboard
open fun makeSound(sound: @Nullable SoundEvent?)
Link copied to clipboard
open fun makeStuckInBlock(state: BlockState, motionMultiplier: Vec3)
Link copied to clipboard
open fun makeWaypointConnectionWith(player: ServerPlayer): Optional<WaypointTransmitter.Connection>
Link copied to clipboard
open fun maxUpStep(): Float
Link copied to clipboard
open fun mayBuild(): Boolean
Link copied to clipboard
open fun mayInteract(level: ServerLevel, pos: BlockPos): Boolean
Link copied to clipboard
open fun mayUseItemAt(pos: BlockPos, facing: Direction, stack: ItemStack): Boolean
Link copied to clipboard
open fun mirror(transformMirror: Mirror): Float
Link copied to clipboard
open fun <A : Any> modifyAttached(type: AttachmentType<A>, modifier: UnaryOperator<A>): @Nullable A?
Link copied to clipboard
open fun move(type: MoverType, movement: Vec3)
Link copied to clipboard
fun moveOrInterpolateTo(pos: Vec3)
fun moveOrInterpolateTo(yRot: Float, xRot: Float)
fun moveOrInterpolateTo(pos: Optional<Vec3>, yRot: Optional<Float>, xRot: Optional<Float>)
fun moveOrInterpolateTo(pos: Vec3, yRot: Float, xRot: Float)
Link copied to clipboard
open fun moveRelative(amount: Float, relative: Vec3)
Link copied to clipboard
open fun nameAndId(): NameAndId
Link copied to clipboard
open fun notifyLeasheeRemoved(leashHolder: Leashable)
Link copied to clipboard
open fun notifyLeashHolder(leashHolder: Leashable)
Link copied to clipboard
fun oldPosition(): Vec3
Link copied to clipboard
open fun onAboveBubbleColumn(downwards: Boolean, pos: BlockPos)
Link copied to clipboard
open fun <A : Any> onAttachedSet(type: AttachmentType<A>): Event<AttachmentTarget.OnAttachedSet<A>>
Link copied to clipboard
open fun onAttack()
Link copied to clipboard
open fun onClientRemoval()
Link copied to clipboard
open fun onClimbable(): Boolean
Link copied to clipboard
open fun onEnchantmentPerformed(enchantedItem: ItemStack, levelCost: Int)
Link copied to clipboard
open fun onEnterCombat()
Link copied to clipboard
open fun onEquipItem(slot: EquipmentSlot, oldItem: ItemStack, newItem: ItemStack)
Link copied to clipboard
open fun onEquippedItemBroken(item: Item, slot: EquipmentSlot)
Link copied to clipboard
open fun onExplosionHit(entity: @Nullable Entity?)
Link copied to clipboard
open fun onGround(): Boolean
Link copied to clipboard
open fun onInsideBubbleColumn(downwards: Boolean)
Link copied to clipboard
open fun onItemPickup(itemEntity: ItemEntity)
Link copied to clipboard
open fun onLeaveCombat()
Link copied to clipboard
open fun onPassengerTurned(entityToUpdate: Entity)
Link copied to clipboard
open fun onRemoval(reason: Entity.RemovalReason)
Link copied to clipboard
open fun onSyncedDataUpdated(newData: List<SynchedEntityData.DataValue<*>>)
open fun onSyncedDataUpdated(dataAccessor: EntityDataAccessor<*>)
Link copied to clipboard
Link copied to clipboard
open fun openCommandBlock(commandBlockEntity: CommandBlockEntity)
Link copied to clipboard
open fun openDialog(dialog: Holder<Dialog>)
Link copied to clipboard
open fun openHorseInventory(horse: AbstractHorse, inventory: Container)
Link copied to clipboard
open fun openItemGui(stack: ItemStack, hand: InteractionHand)
Link copied to clipboard
open fun openJigsawBlock(jigsawBlockEntity: JigsawBlockEntity)
Link copied to clipboard
open fun openMenu(menu: @Nullable MenuProvider?): OptionalInt
Link copied to clipboard
open fun openMinecartCommandBlock(commandBlock: MinecartCommandBlock)
Link copied to clipboard
open fun openNautilusInventory(nautilus: AbstractNautilus, inventory: Container)
Link copied to clipboard
open fun openStructureBlock(structureEntity: StructureBlockEntity)
Link copied to clipboard
open fun openTestBlock(testBlockEntity: TestBlockEntity)
Link copied to clipboard
open fun openTestInstanceBlock(testInstanceBlockEntity: TestInstanceBlockEntity)
Link copied to clipboard
open fun openTextEdit(signEntity: SignBlockEntity, isFrontText: Boolean)
Link copied to clipboard
open fun permissions(): PermissionSet
Link copied to clipboard
open fun pick(hitDistance: Double, partialTick: Float, hitFluids: Boolean): HitResult
Link copied to clipboard
open fun placePortalTicket(pos: BlockPos)
Link copied to clipboard
open fun playerTouch(player: Player)
Link copied to clipboard
open fun playSound(sound: SoundEvent)
open fun playSound(sound: SoundEvent, volume: Float, pitch: Float)
Link copied to clipboard
open fun position(): Vec3
Link copied to clipboard
fun positionRider(passenger: Entity)
Link copied to clipboard
Link copied to clipboard
open fun problemPath(): ProblemReporter.PathElement
Link copied to clipboard
open fun push(entity: Entity)
open fun push(vector: Vec3)
open fun push(x: Double, y: Double, z: Double)
Link copied to clipboard
open fun randomTeleport(x: Double, y: Double, z: Double, broadcastTeleport: Boolean): Boolean
Link copied to clipboard
open fun recreateFromPacket(packet: ClientboundAddEntityPacket)
Link copied to clipboard
Link copied to clipboard
open fun registerDebugValues(level: ServerLevel, registration: DebugValueSource.Registration)
Link copied to clipboard
open fun registryAccess(): RegistryAccess
Link copied to clipboard
open fun releaseUsingItem()
Link copied to clipboard
open fun rememberStabbedEntity(entity: Entity)
Link copied to clipboard
open override fun remove(reason: Entity.RemovalReason)
Link copied to clipboard
Link copied to clipboard
open fun <A : Any> removeAttached(type: AttachmentType<A>): @Nullable A?
Link copied to clipboard
open fun removeEffect(effect: Holder<MobEffect>): Boolean
Link copied to clipboard
fun removeEffectNoUpdate(effect: Holder<MobEffect>): @Nullable MobEffectInstance?
Link copied to clipboard
Link copied to clipboard
open fun removeTag(tag: String): Boolean
Link copied to clipboard
open fun removeVehicle()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun resetRecipes(recipes: Collection<RecipeHolder<*>>): Int
Link copied to clipboard
open fun resetStat(stat: Stat<*>)
Link copied to clipboard
open fun restoreFrom(entity: Entity)
Link copied to clipboard
open fun rideTick()
Link copied to clipboard
open fun rotate(transformRotation: Rotation): Float
Link copied to clipboard
open fun save(output: ValueOutput): Boolean
Link copied to clipboard
open fun saveAsPassenger(output: ValueOutput): Boolean
Link copied to clipboard
open fun saveWithoutId(output: ValueOutput)
Link copied to clipboard
open fun sendEffectToPassengers(effectInstance: MobEffectInstance)
Link copied to clipboard
open fun sendMerchantOffers(containerId: Int, offers: MerchantOffers, villagerLevel: Int, villagerXp: Int, showProgress: Boolean, canRestock: Boolean)
Link copied to clipboard
open fun setAsInsidePortal(portal: Portal, pos: BlockPos)
Link copied to clipboard
open fun <A : Any> setAttached(type: AttachmentType<A>, value: @Nullable A?): @Nullable A?
Link copied to clipboard
open fun <T : Any> setComponent(component: DataComponentType<T>, value: T)
Link copied to clipboard
open fun setDiscardFriction(discardFriction: Boolean)
Link copied to clipboard
fun setGlowingTag(hasGlowingTag: Boolean)
Link copied to clipboard
open override fun setHealth(health: Float)
Link copied to clipboard
open fun setIgnoreFallDamageFromCurrentImpulse(ignoreFallDamageFromCurrentImpulse: Boolean)
Link copied to clipboard
open fun setIsInPowderSnow(isInPowderSnow: Boolean)
Link copied to clipboard
open fun setItemInHand(hand: InteractionHand, stack: ItemStack)
Link copied to clipboard
open fun setItemSlot(slot: EquipmentSlot, stack: ItemStack)
Link copied to clipboard
open fun setLastHurtByPlayer(uuid: UUID, memoryTime: Int)
open fun setLastHurtByPlayer(player: Player, memoryTime: Int)
Link copied to clipboard
open fun setLastHurtMob(entity: Entity)
Link copied to clipboard
open fun setLevelCallback(levelCallback: EntityInLevelCallback)
Link copied to clipboard
fun setOldPosAndRot(pos: Vec3, yRot: Float, xRot: Float)
Link copied to clipboard
open fun setOldRot()
Link copied to clipboard
open fun setOnGround(onGround: Boolean)
Link copied to clipboard
open fun setOnGroundWithMovement(onGround: Boolean, movement: Vec3)
open fun setOnGroundWithMovement(onGround: Boolean, horizontalCollision: Boolean, movement: Vec3)
Link copied to clipboard
fun setPos(pos: Vec3)
open fun setPos(x: Double, y: Double, z: Double)
Link copied to clipboard
fun setPosRaw(x: Double, y: Double, z: Double)
Link copied to clipboard
open fun setRecordPlayingNearby(jukebox: BlockPos, partyParrot: Boolean)
Link copied to clipboard
fun setRemoved(removalReason: Entity.RemovalReason)
Link copied to clipboard
open fun setSharedFlagOnFire(isOnFire: Boolean)
Link copied to clipboard
open fun setSleepingPos(pos: BlockPos)
Link copied to clipboard
open fun setYBodyRot(yBodyRot: Float)
Link copied to clipboard
open fun shearOffAllLeashConnections(player: @Nullable Player?): Boolean
Link copied to clipboard
fun Entity?.shouldBeAttacked(enemyConf: Set<Targets> = GlobalSettingsTarget.combat): Boolean
Link copied to clipboard
Link copied to clipboard
fun Entity.shouldBeShown(enemyConf: Set<Targets> = GlobalSettingsTarget.visual): Boolean
Link copied to clipboard
open fun shouldBlockExplode(explosion: Explosion, level: BlockGetter, pos: BlockPos, blockState: BlockState, explosionPower: Float): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun shouldRender(x: Double, y: Double, z: Double): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun skipAttackInteraction(entity: Entity): Boolean
Link copied to clipboard
Link copied to clipboard
open fun snapTo(pos: Vec3)
open fun snapTo(x: Double, y: Double, z: Double)
open fun snapTo(pos: BlockPos, yRot: Float, xRot: Float)
open fun snapTo(pos: Vec3, yRot: Float, xRot: Float)
open fun snapTo(x: Double, y: Double, z: Double, yRot: Float, xRot: Float)
Link copied to clipboard
open fun spawnAtLocation(level: ServerLevel, stack: ItemStack): @Nullable ItemEntity?
open fun spawnAtLocation(level: ServerLevel, item: ItemLike): @Nullable ItemEntity?
open fun spawnAtLocation(level: ServerLevel, stack: ItemStack, yOffset: Float): @Nullable ItemEntity?
open fun spawnAtLocation(level: ServerLevel, stack: ItemStack, offset: Vec3): @Nullable ItemEntity?
Link copied to clipboard
open fun spawnItemParticles(stack: ItemStack, amount: Int)
Link copied to clipboard
fun Entity.squareBoxedDistanceTo(entity: Entity, offsetPos: Vec3): Double
Link copied to clipboard
fun Entity.squaredBoxedDistanceTo(entity: Entity): Double
fun Entity.squaredBoxedDistanceTo(otherPos: Vec3): Double
Link copied to clipboard
open fun stabAttack(slot: EquipmentSlot, entity: Entity, damageAmount: Float, damage: Boolean, knockback: Boolean, dismount: Boolean): Boolean
Link copied to clipboard
open fun stabbedEntities(predicate: Predicate<Entity>): Int
Link copied to clipboard
open fun startAutoSpinAttack(ticks: Int, damage: Float, itemStack: ItemStack)
Link copied to clipboard
open fun startFallFlying()
Link copied to clipboard
fun startRiding(vehicle: Entity): Boolean
open fun startRiding(vehicle: Entity, force: Boolean, sendGameEvent: Boolean): Boolean
Link copied to clipboard
open fun startSeenByPlayer(serverPlayer: ServerPlayer)
Link copied to clipboard
open fun startSleepInBed(bedPos: BlockPos): Either<Player.BedSleepingProblem, Unit>
Link copied to clipboard
open fun startSleeping(pos: BlockPos)
Link copied to clipboard
open fun startUsingItem(hand: InteractionHand)
Link copied to clipboard
open fun stopFallFlying()
Link copied to clipboard
open fun stopRiding()
Link copied to clipboard
open fun stopSeenByPlayer(serverPlayer: ServerPlayer)
Link copied to clipboard
open fun stopSleepInBed(wakeImmediately: Boolean, updateLevelForSleepingPlayers: Boolean)
Link copied to clipboard
open fun stopSleeping()
Link copied to clipboard
open fun stopUsingItem()
Link copied to clipboard
Link copied to clipboard
open fun swing(hand: InteractionHand)
open fun swing(hand: InteractionHand, updateSelf: Boolean)
Link copied to clipboard
Link copied to clipboard
open fun take(entity: Entity, amount: Int)
Link copied to clipboard
open fun teleport(teleportTransition: TeleportTransition): @Nullable Entity?
Link copied to clipboard
open fun teleportRelative(dx: Double, dy: Double, dz: Double)
Link copied to clipboard
open fun teleportSetPosition(positionMovementRotation: PositionMoveRotation, relatives: Set<Relative>)
open fun teleportSetPosition(from: PositionMoveRotation, to: PositionMoveRotation, relatives: Set<Relative>)
Link copied to clipboard
open fun teleportTo(x: Double, y: Double, z: Double)
open fun teleportTo(level: ServerLevel, x: Double, y: Double, z: Double, relativeMovements: Set<Relative>, yaw: Float, pitch: Float, setCamera: Boolean): Boolean
Link copied to clipboard
open fun thunderHit(level: ServerLevel, lightning: LightningBolt)
Link copied to clipboard
open override fun tick()

The fake player constantly checks for removal.

Link copied to clipboard
Link copied to clipboard
open fun trackingPosition(): Vec3
Link copied to clipboard
open fun travel(travelVector: Vec3)
Link copied to clipboard
open fun triggerRecipeCrafted(recipe: RecipeHolder<*>, items: List<ItemStack>)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun turn(yRot: Double, xRot: Double)
Link copied to clipboard
fun unRide()
Link copied to clipboard
open fun unsetRemoved()
Link copied to clipboard
Link copied to clipboard
open fun updateDynamicGameEventListener(listenerConsumer: BiConsumer<DynamicGameEventListener<*>, ServerLevel>)
Link copied to clipboard
open fun updateFluidHeightAndDoFluidPushing(fluidTag: TagKey<Fluid>, motionScale: Double): Boolean
Link copied to clipboard
open fun updateSwimming()
Link copied to clipboard
open fun updateTutorialInventoryAction(carried: ItemStack, clicked: ItemStack, action: ClickAction)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun wasRecentlyStabbed(entity: Entity, contactCooldownTicks: Int): Boolean
Link copied to clipboard
open fun waypointIcon(): Waypoint.Icon
Link copied to clipboard
fun Player.wouldBeCloseToFallOff(position: Vec3): Boolean
Link copied to clipboard
fun Entity.wouldFallIntoVoid(pos: Vec3, voidLevel: Double = -64.0, safetyExpand: Double = 0.0): Boolean

Check if the entity is likely falling to the void based on the given position and bounding box.