# S2CPacketSpawnGlobalEntity

Represents a packet that is sent when a global entity (like lightning) is spawned

### Extends

* [`Packet`](https://scripting.breeze.rip/api/net/minecraft/network/packet)

### Methods

#### getEntityId()

> **getEntityId**(): `number`

Gets the ID of the spawned global entity

**Returns**

`number`

The entity ID

***

#### getPacketID()

> **getPacketID**(): `string`

Get the ID of the packet.

**Returns**

`string`

The ID of the packet.

**Inherited from**

[`Packet`](https://scripting.breeze.rip/api/net/minecraft/network/packet).[`getPacketID`](https://scripting.breeze.rip/api/net/minecraft/packet#getpacketid)

***

#### getType()

> **getType**(): `number`

Gets the type ID of the global entity (1 = thunderbolt)

**Returns**

`number`

The global entity type ID

***

#### getX()

> **getX**(): `number`

Gets the X position of the global entity

**Returns**

`number`

The X coordinate

***

#### getY()

> **getY**(): `number`

Gets the Y position of the global entity

**Returns**

`number`

The Y coordinate

***

#### getZ()

> **getZ**(): `number`

Gets the Z position of the global entity

**Returns**

`number`

The Z coordinate
