Options
All
  • Public
  • Public/Protected
  • All
Menu

Wrapper for the native Actor class to get access to the wide variety of the methods of any entity in the game.

since

1.0

Hierarchy

Implements

Index

Constructors

Properties

Methods

Constructors

  • new Actor(entity: number): Actor

Properties

class: Class<Object>

Methods

  • addRider(rider: Actor): void
  • attack(victim: Actor): void
  • breaksFallingBlocks(): boolean
  • calculateAttackDamage(victim: number | Actor): number
  • calculateAttackDamage(id: number, count: number, data: number, extra?: NativeItemInstanceExtra, victim?: number | Actor): number
  • canAttack(victim: Actor, someBool: boolean): boolean
  • canBeAffected(effectId: number): boolean
  • canBeAffected(effect: MobEffectInstance): boolean
  • canBePulledIntoVehicle(): boolean
  • canBeginOrContinueClimbingLadder(): boolean
  • canBreatheAir(): boolean
  • canBreatheLava(): boolean
  • canBreatheSolids(): boolean
  • canBreatheWater(): boolean
  • canChangeDimensions(): boolean
  • canClimb(): boolean
  • canCurrentlySwim(): boolean
  • canExistInPeaceful(): boolean
  • canFly(): boolean
  • canMakeStepSound(): boolean
  • canMate(mate: Actor): boolean
  • canPowerJump(): boolean
  • canSee(actor: Actor): boolean
  • canSee(x: number, y: number, z: number): boolean
  • since

    1.0

    Parameters

    Returns boolean

  • since

    1.0

    Parameters

    • x: number
    • y: number
    • z: number

    Returns boolean

  • canSeeInvisible(): boolean
  • canShowNameTag(): boolean
  • chorusFruitTeleport(x: number, y: number, z: number): void
  • since

    1.0

    Parameters

    • x: number
    • y: number
    • z: number

    Returns void

  • clone(): any
  • consumeTotem(): void
  • distanceTo(actor: Actor): number
  • distanceTo(x: number, y: number, z: number): number
  • since

    1.0

    Parameters

    Returns number

  • since

    1.0

    Parameters

    • x: number
    • y: number
    • z: number

    Returns number

  • doFireHurt(amount: number): void
  • since

    1.0

    Parameters

    • amount: number

    Returns void

  • doWaterSplashEffect(): void
  • dropTowards(x: number, y: number, z: number, id: number, count: number, data: number, extra?: NativeItemInstanceExtra): void
  • equals(param0: any): boolean
  • feed(amount: number): void
  • since

    1.0

    Parameters

    • amount: number

    Returns void

  • finalize(): void
  • generatesBubbles(): boolean
  • getActiveEffectCount(): number
  • getAirRegenPerTick(): number
  • getAirSupply(): number
  • getAlwaysShowNameTag(): boolean
  • getArmorMaterialTextureTypeInSlot(slot: number): number
  • since

    1.0

    Parameters

    • slot: number

    Returns number

  • getArmorMaterialTypeInSlot(slot: number): number
  • since

    1.0

    Parameters

    • slot: number

    Returns number

  • getCameraDistance(): number
  • getChainedDamageEffects(): boolean
  • getChestSlots(): number
  • getCollidableMobNear(): boolean
  • getColor(): number
  • getColor2(): number
  • getControllingSeat(): number
  • getDamageNearbyMobs(): boolean
  • getDimensionId(): number
  • getEquipSlots(): number
  • getEquipmentCount(): number
  • getHealth(): number
  • getHurtDir(): number
  • getInhaleTime(): number
  • getInterpolatedBodyYaw(partialTicks: number): number
  • since

    1.0

    Parameters

    • partialTicks: number

    Returns number

  • getInterpolatedWalkAnimSpeed(partialTicks: number): number
  • since

    1.0

    Parameters

    • partialTicks: number

    Returns number

  • getInventorySize(): number
  • getIsOnScreen(): boolean
  • getJumpDuration(): number
  • getLifeSpan(): number
  • getMarkVariant(): number
  • getMaxAirSupply(): number
  • getMaxHealth(): number
  • getOnDeathExperience(): number
  • getOutputSignal(): number
  • getPickRadius(): number
  • getPointer(): number
  • getPortalCooldown(): number
  • getPortalWaitTime(): number
  • getRadius(): number
  • getRiderYRotation(rider: Actor): number
  • getRidingHeight(): number
  • getShadowRadius(): number
  • getShakeTime(): number
  • getSkinID(): number
  • getSpeedInMetersPerSecond(): number
  • getStatusFlag(flag: number): boolean
  • since

    1.0

    Parameters

    • flag: number

    Returns boolean

  • getStrength(): number
  • getStrengthMax(): number
  • getStructuralIntegrity(): number
  • getSuffocateTime(): number
  • getTempted(): boolean
  • getTotalAirSupply(): number
  • getUniqueID(): number
  • getVariant(): number
  • getVerticalSpeedInMetersPerSecond(): number
  • getYawSpeedInDegreesPerSecond(): number
  • hasAnyEffects(): boolean
  • hasAnyVisibleEffects(): boolean
  • hasAttributeBuff(buffType: number): boolean
  • since

    1.0

    Parameters

    • buffType: number

    Returns boolean

  • hasCategory(category: number): boolean
  • since

    1.0

    Parameters

    • category: number

    Returns boolean

  • hasDimension(): boolean
  • hasEffect(effect: MobEffect): boolean
  • hasEffect(effectId: number): boolean
  • hasEnteredWater(): boolean
  • hasFishingHook(): boolean
  • hasHurt(): boolean
  • hasLevel(): boolean
  • hasOutputSignal(signal: number): boolean
  • since

    1.0

    Parameters

    • signal: number

    Returns boolean

  • hasPlayerRider(): boolean
  • hasPriorityAmmunition(): boolean
  • hasRider(): boolean
  • hasRuntimeID(): boolean
  • hasTeleported(): boolean
  • hasTickingArea(): boolean
  • hasTotemEquipped(): boolean
  • hasType(type: number): boolean
  • since

    1.0

    Parameters

    • type: number

    Returns boolean

  • hasUniqueID(): boolean
  • hashCode(): number
  • heal(amount: number): void
  • since

    1.0

    Parameters

    • amount: number

    Returns void

  • healEffects(value: number): void
  • since

    1.0

    Parameters

    • value: number

    Returns void

  • inCaravan(): boolean
  • inDownwardFlowingLiquid(): boolean
  • intersects(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number): boolean
  • since

    1.0

    Parameters

    • x1: number
    • y1: number
    • z1: number
    • x2: number
    • y2: number
    • z2: number

    Returns boolean

  • isAdventure(): boolean
  • isAlive(): boolean
  • isAngry(): boolean
  • isAutonomous(): boolean
  • isBaby(): boolean
  • isBlocking(): boolean
  • isBreakingObstruction(): boolean
  • isBribed(): boolean
  • isCharged(): boolean
  • isChested(): boolean
  • isClientSide(): boolean
  • isClimbing(): boolean
  • isControlledByLocalInstance(): boolean
  • isCreative(): boolean
  • isCreativeModeAllowed(): boolean
  • isDancing(): boolean
  • isDelayedAttacking(): boolean
  • isDoorBreaker(): boolean
  • isDoorOpener(): boolean
  • isElytraFlying(): boolean
  • isEnchanted(): boolean
  • isFireImmune(): boolean
  • isFishable(): boolean
  • isFree(x: number, y: number, z: number): boolean
  • isFree(x: number, y: number, z: number, someFloat: number): boolean
  • since

    1.0

    Parameters

    • x: number
    • y: number
    • z: number

    Returns boolean

  • since

    1.0

    Parameters

    • x: number
    • y: number
    • z: number
    • someFloat: number

    Returns boolean

  • isIgnited(): boolean
  • isImmersedInWater(): boolean
  • isImmobile(): boolean
  • isInClouds(): boolean
  • isInLava(): boolean
  • isInLove(): boolean
  • isInPrecipitation(): boolean
  • isInRain(): boolean
  • isInScaffolding(): boolean
  • isInSnow(): boolean
  • isInThunderstorm(): boolean
  • isInWall(): boolean
  • isInWater(): boolean
  • isInWaterOrRain(): boolean
  • isInWorld(): boolean
  • isInsidePortal(): boolean
  • isInvertedHealAndHarm(): boolean
  • isInvisible(): boolean
  • isJumping(): boolean
  • isLayingDown(): boolean
  • isLeashableType(): boolean
  • isLeashed(): boolean
  • isLocalPlayer(): boolean
  • isMob(): boolean
  • isMoving(): boolean
  • isOnFire(): boolean
  • isOnGround(): boolean
  • isOnHotBlock(): boolean
  • isOrphan(): boolean
  • isOutOfControl(): boolean
  • isOverScaffolding(): boolean
  • isOverWater(): boolean
  • isPacified(): boolean
  • isPersistent(): boolean
  • isPickable(): boolean
  • isPlayer(): boolean
  • isPowered(): boolean
  • isPredictedMovementEnabled(): boolean
  • isResting(): boolean
  • isRider(rider: Actor): boolean
  • isRiding(ridden: Actor): boolean
  • isRiding(): boolean
  • isSafeToSleepNear(): boolean
  • isScared(): boolean
  • isSheared(): boolean
  • isShootable(): boolean
  • isSilent(): boolean
  • isSitting(): boolean
  • isSleeping(): boolean
  • isSneaking(): boolean
  • isStackable(): boolean
  • isStanding(): boolean
  • isSurfaceMob(): boolean
  • isSwimmer(): boolean
  • isSwimming(): boolean
  • isTame(): boolean
  • isTargetable(): boolean
  • isTrading(): boolean
  • isTrusting(): boolean
  • isType(type: number): boolean
  • since

    1.0

    Parameters

    • type: number

    Returns boolean

  • isUnderLiquid(materialType: number): boolean
  • since

    1.0

    Parameters

    • materialType: number

    Returns boolean

  • isValidTarget(potentialTarget: Actor): boolean
  • isWASDControlled(): boolean
  • isWalker(): boolean
  • isWorldBuilder(): boolean
  • kill(): void
  • lerpMotion(x: number, y: number, z: number): void
  • since

    1.0

    Parameters

    • x: number
    • y: number
    • z: number

    Returns void

  • lerpTo(x: number, y: number, z: number, rotX: number, rotY: number): void
  • since

    1.0

    Parameters

    • x: number
    • y: number
    • z: number
    • rotX: number
    • rotY: number

    Returns void

  • moveRelative(strafe: number, up: number, forward: number, friction: number): void
  • since

    1.0

    Parameters

    • strafe: number
    • up: number
    • forward: number
    • friction: number

    Returns void

  • notify(): void
  • notifyAll(): void
  • onLightningHit(): void
  • outOfWorld(): boolean
  • performRangedAttack(victim: Actor, distanceFactor: number): void
  • since

    1.0

    Parameters

    • victim: Actor
    • distanceFactor: number

    Returns void

  • pushOutOfBlocks(x: number, y: number, z: number): void
  • since

    1.0

    Parameters

    • x: number
    • y: number
    • z: number

    Returns void

  • removeAllEffects(): void
  • removeAllRiders(b1: boolean, b2: boolean): void
  • since

    1.0

    Parameters

    • b1: boolean
    • b2: boolean

    Returns void

  • removeEffect(id: number): void
  • since

    1.0

    Parameters

    • id: number

    Returns void

  • removeEffectNoUpdate(id: number): void
  • since

    1.0

    Parameters

    • id: number

    Returns void

  • removeEffects(harmful: boolean, harmless: boolean): void
  • since

    2.0

    Parameters

    • harmful: boolean
    • harmless: boolean

    Returns void

  • removeEntity(): void
  • setAABB(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number): void
  • since

    1.0

    Parameters

    • x1: number
    • y1: number
    • z1: number
    • x2: number
    • y2: number
    • z2: number

    Returns void

  • setAirSupply(supply: number): void
  • since

    2.0

    Parameters

    • supply: number

    Returns void

  • setAutonomous(auto: boolean): void
  • since

    1.0

    Parameters

    • auto: boolean

    Returns void

  • setAuxValue(aux: number): void
  • since

    1.0

    Parameters

    • aux: number

    Returns void

  • setBlockTarget(x: number, y: number, z: number): void
  • since

    1.0

    Parameters

    • x: number
    • y: number
    • z: number

    Returns void

  • setBreakingObstruction(breaking: boolean): void
  • since

    1.0

    Parameters

    • breaking: boolean

    Returns void

  • setCameraDistance(distance: number): void
  • since

    1.0

    Parameters

    • distance: number

    Returns void

  • setCanClimb(canClimb: boolean): void
  • since

    1.0

    Parameters

    • canClimb: boolean

    Returns void

  • setCanFly(canFly: boolean): void
  • since

    1.0

    Parameters

    • canFly: boolean

    Returns void

  • setCanPowerJump(canPowerJump: boolean): void
  • since

    1.0

    Parameters

    • canPowerJump: boolean

    Returns void

  • setChainedDamageEffects(chained: boolean): void
  • since

    1.0

    Parameters

    • chained: boolean

    Returns void

  • setCharged(charged: boolean): void
  • since

    1.0

    Parameters

    • charged: boolean

    Returns void

  • setClimbing(climbing: boolean): void
  • since

    1.0

    Parameters

    • climbing: boolean

    Returns void

  • setCollidableMob(collidable: boolean): void
  • since

    1.0

    Parameters

    • collidable: boolean

    Returns void

  • setCollidableMobNear(collidable: boolean): void
  • since

    1.0

    Parameters

    • collidable: boolean

    Returns void

  • setColor(color: number): void
  • since

    1.0

    Parameters

    • color: number

    Returns void

  • setColor2(color: number): void
  • since

    1.0

    Parameters

    • color: number

    Returns void

  • setControllingSeat(seat: number): void
  • since

    1.0

    Parameters

    • seat: number

    Returns void

  • setDamageNearbyMobs(damage: boolean): void
  • since

    1.0

    Parameters

    • damage: boolean

    Returns void

  • setDancing(dancing: boolean): void
  • since

    1.0

    Parameters

    • dancing: boolean

    Returns void

  • setDelayedAttacking(delayed: boolean): void
  • since

    1.0

    Parameters

    • delayed: boolean

    Returns void

  • setDoorBreaker(breaker: boolean): void
  • since

    1.0

    Parameters

    • breaker: boolean

    Returns void

  • setDoorOpener(opener: boolean): void
  • since

    1.0

    Parameters

    • opener: boolean

    Returns void

  • setEnchanted(enchanted: boolean): void
  • since

    1.0

    Parameters

    • enchanted: boolean

    Returns void

  • setHurtDir(hurtDir: number): void
  • since

    1.0

    Parameters

    • hurtDir: number

    Returns void

  • setInLove(lover: Actor): void
  • setInvisible(invisible: boolean): void
  • since

    1.0

    Parameters

    • invisible: boolean

    Returns void

  • setIsOnScreen(onScreen: boolean): void
  • since

    1.0

    Parameters

    • onScreen: boolean

    Returns void

  • setJumpDuration(dur: number): void
  • since

    1.0

    Parameters

    • dur: number

    Returns void

  • setLayingDown(laying: boolean): void
  • since

    1.0

    Parameters

    • laying: boolean

    Returns void

  • setLimitedLife(life: number): void
  • since

    1.0

    Parameters

    • life: number

    Returns void

  • setMarkVariant(variant: number): void
  • since

    1.0

    Parameters

    • variant: number

    Returns void

  • setMaxAirSupply(supply: number): void
  • since

    2.0

    Parameters

    • supply: number

    Returns void

  • setMoving(moving: boolean): void
  • since

    1.0

    Parameters

    • moving: boolean

    Returns void

  • setNameTagVisible(visible: boolean): void
  • since

    1.0

    Parameters

    • visible: boolean

    Returns void

  • setOnFire(fireTicks: number): void
  • since

    1.0

    Parameters

    • fireTicks: number

    Returns void

  • setPowered(powered: boolean): void
  • since

    1.0

    Parameters

    • powered: boolean

    Returns void

  • setResting(resting: boolean): void
  • since

    1.0

    Parameters

    • resting: boolean

    Returns void

  • setScared(scared: boolean): void
  • since

    1.0

    Parameters

    • scared: boolean

    Returns void

  • setShakeTime(time: number): void
  • since

    1.0

    Parameters

    • time: number

    Returns void

  • setSitting(sitting: boolean): void
  • since

    1.0

    Parameters

    • sitting: boolean

    Returns void

  • setSkinID(id: number): void
  • since

    1.0

    Parameters

    • id: number

    Returns void

  • setSneaking(sneaking: boolean): void
  • since

    1.0

    Parameters

    • sneaking: boolean

    Returns void

  • setStanding(standing: boolean): void
  • since

    1.0

    Parameters

    • standing: boolean

    Returns void

  • setStrength(strength: number): void
  • since

    1.0

    Parameters

    • strength: number

    Returns void

  • setStrengthMax(strength: number): void
  • since

    1.0

    Parameters

    • strength: number

    Returns void

  • setStructuralIntegrity(integrity: number): void
  • since

    1.0

    Parameters

    • integrity: number

    Returns void

  • setStunned(stunned: boolean): void
  • since

    1.0

    Parameters

    • stunned: boolean

    Returns void

  • setSwimmer(swimmer: boolean): void
  • since

    1.0

    Parameters

    • swimmer: boolean

    Returns void

  • setTarget(target: Actor): void
  • setTempted(tempted: boolean): void
  • since

    1.0

    Parameters

    • tempted: boolean

    Returns void

  • setVariant(variant: number): void
  • since

    1.0

    Parameters

    • variant: number

    Returns void

  • setWASDControlled(wasd: boolean): void
  • since

    1.0

    Parameters

    • wasd: boolean

    Returns void

  • setWalker(walker: boolean): void
  • since

    1.0

    Parameters

    • walker: boolean

    Returns void

  • shouldTryMakeStepSound(): boolean
  • spawnTrailBubbles(): void
  • startRiding(ridden: Actor): void
  • startSpinAttack(): void
  • stopSpinAttack(): void
  • swing(): void
  • toString(): string
  • wait(): void
  • wait(param0: number): void
  • wait(param0: number, param1: number): void
  • wasLastHitByPlayer(): boolean
  • wobble(): void
  • isValid(entityUID: number): boolean
  • since

    1.0

    Parameters

    • entityUID: number

    Returns boolean

    whether the entity with given unique ID currently exists in the world. Use it when you construct Actor and its subclasses, otherwise you will get a java.lang.IllegalArgumentException telling you there is no entity with given id.

Generated using TypeDoc