Skip to content

WeavingEffect 5.46.0 ​

class · pocketmine\entity\effect\WeavingEffect · source

Extends Effect

Weaving (https://minecraft.wiki/w/Weaving): the entity leaves 2-3 cobwebs around where it dies.

Like Java's WeavingMobEffect, up to 15 random spots in the 3x3x3 cube around the entity are tried, and a cobweb goes into each empty one that stands on a full top face. The lower slowdown inside cobwebs is client-side movement.

Methods ​

onEntityDeath() ​

php
public function onEntityDeath(\pocketmine\entity\Living $entity, \pocketmine\entity\effect\EffectInstance $instance) : void

spreadCobwebs() ​

php
public static function spreadCobwebs(\pocketmine\world\World $world, int $x, int $y, int $z, int $max) : int

Places up to $max cobwebs around the given block, returning how many were placed.

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.