PocketMine-MP 5.21.2 git-b2aa6396c3cc2cafdd815eacc360e1ad89599899
Loading...
Searching...
No Matches
pocketmine\network\mcpe\StandardEntityEventBroadcaster Class Reference
+ Inheritance diagram for pocketmine\network\mcpe\StandardEntityEventBroadcaster:
+ Collaboration diagram for pocketmine\network\mcpe\StandardEntityEventBroadcaster:

Public Member Functions

 __construct (private PacketBroadcaster $broadcaster, private TypeConverter $typeConverter)
 
 onEmote (array $recipients, Human $from, string $emoteId)
 
 onEntityEffectAdded (array $recipients, Living $entity, EffectInstance $effect, bool $replacesOldEffect)
 
 onEntityEffectRemoved (array $recipients, Living $entity, EffectInstance $effect)
 
 onEntityRemoved (array $recipients, Entity $entity)
 
 onMobArmorChange (array $recipients, Living $mob)
 
 onMobMainHandItemChange (array $recipients, Human $mob)
 
 onMobOffHandItemChange (array $recipients, Human $mob)
 
 onPickUpItem (array $recipients, Entity $collector, Entity $pickedUp)
 
 syncActorData (array $recipients, Entity $entity, array $properties)
 
 syncAttributes (array $recipients, Living $entity, array $attributes)
 

Detailed Description

Definition at line 52 of file StandardEntityEventBroadcaster.php.

Constructor & Destructor Documentation

◆ __construct()

pocketmine\network\mcpe\StandardEntityEventBroadcaster::__construct ( private PacketBroadcaster $broadcaster,
private TypeConverter $typeConverter )

Definition at line 54 of file StandardEntityEventBroadcaster.php.

Member Function Documentation

◆ onEmote()

pocketmine\network\mcpe\StandardEntityEventBroadcaster::onEmote ( array $recipients,
Human $from,
string $emoteId )
Parameters
NetworkSession[]$recipients

Implements pocketmine\network\mcpe\EntityEventBroadcaster.

Definition at line 144 of file StandardEntityEventBroadcaster.php.

◆ onEntityEffectAdded()

pocketmine\network\mcpe\StandardEntityEventBroadcaster::onEntityEffectAdded ( array $recipients,
Living $entity,
EffectInstance $effect,
bool $replacesOldEffect )
Parameters
NetworkSession[]$recipients

Implements pocketmine\network\mcpe\EntityEventBroadcaster.

Definition at line 83 of file StandardEntityEventBroadcaster.php.

◆ onEntityEffectRemoved()

pocketmine\network\mcpe\StandardEntityEventBroadcaster::onEntityEffectRemoved ( array $recipients,
Living $entity,
EffectInstance $effect )
Parameters
NetworkSession[]$recipients

Implements pocketmine\network\mcpe\EntityEventBroadcaster.

Definition at line 96 of file StandardEntityEventBroadcaster.php.

◆ onEntityRemoved()

pocketmine\network\mcpe\StandardEntityEventBroadcaster::onEntityRemoved ( array $recipients,
Entity $entity )
Parameters
NetworkSession[]$recipients

Implements pocketmine\network\mcpe\EntityEventBroadcaster.

Definition at line 100 of file StandardEntityEventBroadcaster.php.

◆ onMobArmorChange()

pocketmine\network\mcpe\StandardEntityEventBroadcaster::onMobArmorChange ( array $recipients,
Living $mob )
Parameters
NetworkSession[]$recipients

Implements pocketmine\network\mcpe\EntityEventBroadcaster.

Definition at line 127 of file StandardEntityEventBroadcaster.php.

◆ onMobMainHandItemChange()

pocketmine\network\mcpe\StandardEntityEventBroadcaster::onMobMainHandItemChange ( array $recipients,
Human $mob )

TODO: expand this to more than just humans

Parameters
NetworkSession[]$recipients

Implements pocketmine\network\mcpe\EntityEventBroadcaster.

Definition at line 104 of file StandardEntityEventBroadcaster.php.

◆ onMobOffHandItemChange()

pocketmine\network\mcpe\StandardEntityEventBroadcaster::onMobOffHandItemChange ( array $recipients,
Human $mob )
Parameters
NetworkSession[]$recipients

Implements pocketmine\network\mcpe\EntityEventBroadcaster.

Definition at line 116 of file StandardEntityEventBroadcaster.php.

◆ onPickUpItem()

pocketmine\network\mcpe\StandardEntityEventBroadcaster::onPickUpItem ( array $recipients,
Entity $collector,
Entity $pickedUp )
Parameters
NetworkSession[]$recipients

Implements pocketmine\network\mcpe\EntityEventBroadcaster.

Definition at line 140 of file StandardEntityEventBroadcaster.php.

◆ syncActorData()

pocketmine\network\mcpe\StandardEntityEventBroadcaster::syncActorData ( array $recipients,
Entity $entity,
array $properties )
Parameters
NetworkSession[]$recipients
MetadataProperty[]$properties

@phpstan-param array<int, MetadataProperty> $properties

Implements pocketmine\network\mcpe\EntityEventBroadcaster.

Definition at line 76 of file StandardEntityEventBroadcaster.php.

◆ syncAttributes()

pocketmine\network\mcpe\StandardEntityEventBroadcaster::syncAttributes ( array $recipients,
Living $entity,
array $attributes )
Parameters
NetworkSession[]$recipients
Attribute[]$attributes

Implements pocketmine\network\mcpe\EntityEventBroadcaster.

Definition at line 66 of file StandardEntityEventBroadcaster.php.

References pocketmine\network\mcpe\protocol\UpdateAttributesPacket\create().

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: