Documentation

EntityMetadataCollection
in package

Table of Contents

$dirtyProperties  : array<string|int, mixed>
$properties  : array<string|int, mixed>
__construct()  : mixed
clearDirtyProperties()  : void
Clears records of dirty properties.
getAll()  : array<string|int, MetadataProperty>
Returns all properties.
getDirty()  : array<string|int, MetadataProperty>
Returns properties that have changed and need to be broadcasted.
set()  : void
setAtomicBatch()  : void
Set a group of properties together. If any of them are changed, they will all be flagged as dirty.
setBlockPos()  : void
setByte()  : void
setCompoundTag()  : void
setFloat()  : void
setGenericFlag()  : void
setInt()  : void
setLong()  : void
setPlayerFlag()  : void
setShort()  : void
setString()  : void
setVector3()  : void

Properties

$dirtyProperties

private array<string|int, mixed> $dirtyProperties = []
Tags
phpstan-var

array<int, MetadataProperty>

$properties

private array<string|int, mixed> $properties = []
Tags
phpstan-var

array<int, MetadataProperty>

Methods

clearDirtyProperties()

Clears records of dirty properties.

public clearDirtyProperties() : void
Return values
void

setAtomicBatch()

Set a group of properties together. If any of them are changed, they will all be flagged as dirty.

public setAtomicBatch(array<string|int, MetadataProperty$properties[, bool $force = false ]) : void
Parameters
$properties : array<string|int, MetadataProperty>
$force : bool = false
Tags
phpstan-param

array<int, MetadataProperty> $properties

Return values
void

setByte()

public setByte(int $key, int $value[, bool $force = false ]) : void
Parameters
$key : int
$value : int
$force : bool = false
Return values
void

setCompoundTag()

public setCompoundTag(int $key, CacheableNbt $value[, bool $force = false ]) : void
Parameters
$key : int
$value : CacheableNbt
$force : bool = false
Tags
phpstan-param

CacheableNbt<\pocketmine\nbt\tag\CompoundTag> $value

Return values
void

setFloat()

public setFloat(int $key, float $value[, bool $force = false ]) : void
Parameters
$key : int
$value : float
$force : bool = false
Return values
void

setGenericFlag()

public setGenericFlag(int $flagId, bool $value) : void
Parameters
$flagId : int
$value : bool
Return values
void

setInt()

public setInt(int $key, int $value[, bool $force = false ]) : void
Parameters
$key : int
$value : int
$force : bool = false
Return values
void

setLong()

public setLong(int $key, int $value[, bool $force = false ]) : void
Parameters
$key : int
$value : int
$force : bool = false
Return values
void

setPlayerFlag()

public setPlayerFlag(int $flagId, bool $value) : void
Parameters
$flagId : int
$value : bool
Return values
void

setShort()

public setShort(int $key, int $value[, bool $force = false ]) : void
Parameters
$key : int
$value : int
$force : bool = false
Return values
void

setString()

public setString(int $key, string $value[, bool $force = false ]) : void
Parameters
$key : int
$value : string
$force : bool = false
Return values
void

setVector3()

public setVector3(int $key, Vector3|null $value[, bool $force = false ]) : void
Parameters
$key : int
$value : Vector3|null
$force : bool = false
Return values
void

Search results