Entity

From LuaCraft
Jump to: navigation, search

Client

GetEyePos()

  • Information: Returns the entitys eye position
  • Return value: Vector pos

GetPos()

  • Information: Returns the entity position
  • Return value: Vector pos

Shared

AddVelocity(Vector vel)

  • Information: Adds to the entitys current velocity
  • Return value: nil

AttackFrom(DamageSource source, Number damage)

  • Information: Attack an entity using a DamageSource
  • Return value: nil

EntIndex()

  • Information: Returns the entity index
  • Return value: Number index

Explode(Number size)

  • Information: Explodes the entity
  • Return value: nil

Extinguish()

  • Information: Extinguish the entity
  • Return value: nil

GetAir()

  • Information: Return the entitys air volume
  • Return value: Number air

GetAngles()

  • Information: Returns the entity angles
  • Return value: Angle ang

GetClass()

  • Information: Returns the class the entity is a part of
  • Return value: Boolean classname

GetDataWatcher()

  • Information: Returns a DataWatcher which can be used to control the entities networked data
  • Return value: DataWatcher networkdata

GetDimensionID()

  • Information: Return the dimension number the entity is currently in
  • Return value: Number dimension

GetEyeHeight()

  • Information: Returns the entitys eye height
  • Return value: Number height

GetEyePos()

  • Information: Returns the entitys eye position
  • Return value: Vector pos

GetFireResistance()

  • Information: The amount of ticks you have to stand inside in fire before be set on fire
  • Return value: Number res

GetHeight()

  • Information: Get the height of the entity
  • Return value: Number height

GetItem()

GetMount()

  • Information: Get the entity that is being ridden
  • Return value: Entity riding

GetNBTTag()

  • Information: Returns the entities NBTTag compound
  • Return value: NBTTag nbttag

GetNoClip()

  • Information: Get whether or not the entity is in noclip mode
  • Return value: Boolean noclipping

GetPos()

  • Information: Returns the entity position
  • Return value: Vector pos

GetSize()

  • Information: Get the width and the height of the entity
  • Return value: Number width, Number height

GetStepSize()

  • Information: Returns the entity step size
  • Return value: Number stepsize

GetUniqueID()

  • Information: Get the entities unique ID that will be persistent. If used on a player in online-mode, it will return the Minecraft UUID for the player
  • Return value: String id

GetVelocity()

  • Information: Returns the entitys current velocity
  • Return value: Vector vel

GetWidth()

  • Information: Get the width of the entity
  • Return value: Number width

GetWorld()

  • Information: Get the world object in which the entity resides in
  • Return value: World world

Ignite([ Number duration ])

  • Information: Set the entity on fire
  • Return value: nil

IsAlive()

  • Information: Returns if the entity is alive
  • Return value: Boolean alive

IsBurning()

  • Information: Check if the entity is burning
  • Return value: Boolean burning

IsInAir()

  • Information: Returns if the entity is airborne
  • Return value: Boolean inair

IsInWater()

  • Information: Check if the entity is in water
  • Return value: Boolean inwater

IsInWeb()

  • Information: Checks if the entity is in a web
  • Return value: Boolean web

IsInvisible()

  • Information: Returns if the entity is invisible
  • Return value: Boolean invisible

IsMounted()

  • Information: Check if the entity is mounted by another entity
  • Return value: Boolean mounted

IsOnGround()

  • Information: Check if the entity stands on ground
  • Return value: Boolean onground

IsSilent()

  • Information: Returns if the player is silent or not
  • Return value: Boolean silent

IsSneaking()

  • Information: Check if the entity is sneaking
  • Return value: Boolean sneak

IsSprinting()

  • Information: Check if the entity is sprinting
  • Return value: Boolean sprinting

IsWet()

  • Information: Check if the entity is wet
  • Return value: Boolean wet

LocalToWorld(Vector local)

  • Information: Get the world vector of a local vector in relation to the entity
  • Return value: Vector world

Move(Vector pos)

  • Information: Try to move the entity to the given position
  • Return value: nil

OBBMaxs()

  • Information: Gets the entitys maximum bound
  • Return value: Vector maxs

OBBMins()

  • Information: Gets the entitys minimum bound
  • Return value: Vector mins

PlaySound(String Sound name, [ Number Volume, Number Pitch ])

  • Information: Play a sound emitting from the entity
  • Return value: nil

Remove()

  • Information: Remove the entity
  • Return value: nil

SetAir(Number air)

  • Information: Set the entitys air volume
  • Return value: nil

SetAngles(Angle ang)

  • Information: Sets the entity angles
  • Return value: nil

SetFireResistance(Number resistance)

  • Information: Sets the entitys resistance to fire
  • Return value: nil

SetInvisible(Boolean invisible)

  • Information: Sets if the entity is invisible or not
  • Return value: nil

SetMount(Entity ent)

  • Information: Mount the entity to another entity
  • Return value: nil

SetNoClip(Boolean noclip)

  • Information: Set the entity into noclip mode
  • Return value: nil

SetPos(Vector pos)

  • Information: Sets the entity position
  • Return value: nil

SetSilent(Boolean silent)

  • Information: Sets if the player is silent or not
  • Return value: nil

SetSize(Number width, Number height)

  • Information: Set the width and the height of the entity
  • Return value: nil

SetSprinting(Boolean sprinting)

  • Information: Set the entity to sprint
  • Return value: nil This onls works if the forward movement is not zero

SetStepSize(Number stepsize)

  • Information: Sets the entity step size
  • Return value: nil

SetVelocity(Vector vel)

  • Information: Sets the entitys current velocity
  • Return value: nil

SetWorld(World world)

  • Information: Set the world object in which the entity resides in
  • Return value: nil

Spawn([ Boolean force ])

  • Information: Spawn an entity in the world
  • Return value: Boolean success

TravelToWorld(World world)

  • Information: Moves the entity to another world
  • Return value: nil

WorldToLocal(Vector world)

  • Information: Get the local vector of a world vector in relation to the entity
  • Return value: Vector local