Skip to content

class ItemGround (server-side)

Available since version: 0.3.0

Represents a synchronized item placed in the world.

Properties

number id

Represents the unique ground item id.


string instance

Represents the Gothic item instance name.


ItemDefinition|nil definition

Represents the read-only registry item definition for this ground item.


number amount

Represents the item amount.


boolean physicsEnabled

Enables or disables client-side physics for this ground item.


string world

Represents the world name where this ground item exists.


number virtualWorld

Represents the virtual world id where this ground item exists.


Methods

getPosition

Returns the ground item world position.

{x, y, z} getPosition()

Returns {x, y, z}:

Position table.


setPosition

Sets the ground item world position and synchronizes it to relevant players.

void setPosition(number x, number y, number z)

Parameters:

  • number x: X coordinate.
  • number y: Y coordinate.
  • number z: Z coordinate.

getRotationDegrees

Returns the ground item Euler rotation.

{x, y, z} getRotationDegrees()

Returns {x, y, z}:

Rotation table.


setRotationDegrees

Sets the ground item Euler rotation and synchronizes it to relevant players.

void setRotationDegrees(number x, number y, number z)

Parameters:

  • number x: X rotation.
  • number y: Y rotation.
  • number z: Z rotation.

isValid

Checks whether this ground item still exists.

boolean isValid()

Returns boolean:

True while valid.


Callbacks

No callbacks.