|
| spawnTo (Player $player) |
|
| __construct (Level $level, CompoundTag $nbt) |
|
| spawnToAll () |
|
| getSpawnCompound () |
|
| updateCompoundTag (CompoundTag $nbt, Player $player) |
|
| getSaveId () |
|
| __construct (Level $level, CompoundTag $nbt) |
|
| getId () |
|
| saveNBT () |
|
| getBlock () |
|
| onUpdate () |
|
| scheduleUpdate () |
|
| __destruct () |
|
| close () |
|
| getName () |
|
| __construct ($x=0, $y=0, $z=0, Level $level=null) |
|
| asPosition () |
|
| add ($x, $y=0, $z=0) |
|
| getLevel () |
|
| setLevel (Level $level=null) |
|
| isValid () |
|
| getSide ($side, $step=1) |
|
| __toString () |
|
| setComponents ($x, $y, $z) |
|
| fromObjectAdd (Vector3 $pos, $x, $y, $z) |
|
| __construct ($x=0, $y=0, $z=0) |
|
| getX () |
|
| getY () |
|
| getZ () |
|
| getFloorX () |
|
| getFloorY () |
|
| getFloorZ () |
|
| getRight () |
|
| getUp () |
|
| getForward () |
|
| getSouth () |
|
| getWest () |
|
| add ($x, $y=0, $z=0) |
|
| subtract ($x=0, $y=0, $z=0) |
|
| multiply ($number) |
|
| divide ($number) |
|
| ceil () |
|
| floor () |
|
| round () |
|
| abs () |
|
| getSide ($side, $step=1) |
|
| asVector3 () |
|
| distance (Vector3 $pos) |
|
| distanceSquared (Vector3 $pos) |
|
| maxPlainDistance ($x=0, $z=0) |
|
| length () |
|
| lengthSquared () |
|
| normalize () |
|
| dot (Vector3 $v) |
|
| cross (Vector3 $v) |
|
| equals (Vector3 $v) |
|
| getIntermediateWithXValue (Vector3 $v, $x) |
|
| getIntermediateWithYValue (Vector3 $v, $y) |
|
| getIntermediateWithZValue (Vector3 $v, $z) |
|
| setComponents ($x, $y, $z) |
|
| fromObjectAdd (Vector3 $pos, $x, $y, $z) |
|
| __toString () |
|
◆ __construct()
Spawnable constructor.
- Parameters
-
Level | $level | |
CompoundTag | $nbt | |
61 parent::__construct(
$level, $nbt);
◆ getSpawnCompound()
◆ onChanged()
80 if($this->chunk !== null){
81 $this->chunk->setChanged();
82 $this->level->clearChunkCache($this->chunk->getX(), $this->chunk->getZ());
◆ spawnTo()
- Parameters
-
- Returns
- bool
44 $pk =
new BlockEntityDataPacket();
48 $pk->namedtag = $nbt->write(
true);
49 $player->dataPacket($pk);
◆ spawnToAll()
70 foreach($this->
getLevel()->getChunkPlayers($this->chunk->getX(), $this->chunk->getZ()) as $player){
71 if($player->spawned ===
true){
◆ updateCompoundTag()
Called when a player updates a block entity's NBT data for example when writing on a sign.
- Parameters
-
- Returns
- bool indication of success, will respawn the tile to the player if false.
The documentation for this class was generated from the following file:
- src/pocketmine/tile/Spawnable.php