Skip to content
Gregor Steiner edited this page May 6, 2014 · 1 revision

Shared

AddExplosion(Vector pos, [ Number size, Boolean flaming, Boolean smoking ])

  • Return value: nil
  • Adds an explosion to the world

AddLightning()

  • Return value: nil
  • Adds an lightning bolt to the world

CreateEntity(String classname)

  • Return value: Entity entity
  • Creates a new entity

EmitSound(Vector Position, String Sound name, [ Number Pitch, Number Volume ])

  • Return value: nil
  • Play a sound emitting from the position given

GetAnimalSpawning()

  • Return value: Boolean animals
  • Check if animals are spawning

GetBiome(Vector pos)

  • Return value: String biome
  • Returns the current biome of a position.

GetBlock(Vector position OR [ Number x, Number y, Number z ])

  • Return value: Block block
  • Get a block at position within the world

GetBlock(Vector position OR [ Number x, Number y ])

  • Return value: Block block
  • Gets the topmost block within the given X,Y coordinate

GetDifficulty()

  • Return value: Number diff
  • Returns the worlds difficulty

GetDimension()

  • Return value: Number dimension
  • Returns the worlds dimension number

GetEntities()

  • Return value: Table players
  • Get all entities within the world

GetEntitiesByClass(String classname)

  • Return value: Table entities
  • Get all entities that match the provided class

GetGamemode()

  • Return value: Number gamemode
  • Returns the worlds gamemode

GetMobSpawning()

  • Return value: Boolean mobs
  • Check if mobs are spawning

GetPlayerByName(String search)

  • Return value: Player player
  • Attempts to find a player using the provided string

GetPlayers()

  • Return value: Table players
  • Get all players within the world

GetSeed()

  • Return value: Number seed
  • Returns the worlds seed

GetSpawnPos()

  • Return value: Vector pos
  • Returns the worlds spawnposition

GetTime()

  • Return value: Number time
  • Returns the worlds time

IsDayTime()

  • Return value: Boolean day
  • Checks if the sun is up

IsNightTime()

  • Return value: Boolean night
  • Checks if the moon is up

IsRaining()

  • Return value: Boolean rain
  • Check if the rain is falling

IsStorming()

  • Return value: Boolean storm
  • Check if it is storming

SetAnimalSpawning(Boolean animals)

  • Return value: nil
  • Set animals spawning

SetDifficulty(Number diff)

  • Return value: nil
  • Sets the worlds difficulty

SetGamemode(Number gamemode)

  • Return value: nil
  • Set the worlds gamemode

SetMobSpawning(Boolean mobs)

  • Return value: nil
  • Set mobs spawning

SetRaining(Boolean rain)

  • Return value: nil
  • Set the weather to rainfall

SetSpawnPos(Vector pos)

  • Return value: nil
  • Sets the worlds spawnposition

SetStorming(Boolean storm)

  • Return value: nil
  • Set the weather to storm

SetTime(Number time)

  • Return value: nil
  • Sets the worlds time