|
| __construct (Level $level, CompoundTag $nbt) |
|
| canAddItem (Item $item) |
|
| getItem () |
|
| setItem (Item $item) |
|
| removeItem () |
|
| isEmpty () |
|
| getSpawnCompound () |
|
| 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()
FlowerPot constructor.
- Parameters
-
Level | $level | |
CompoundTag | $nbt | |
40 if(!isset($nbt->item)){
41 $nbt->item =
new ShortTag(
"item", 0);
43 if(!isset($nbt->mData)){
44 $nbt->mData =
new IntTag(
"mData", 0);
46 parent::__construct(
$level, $nbt);
◆ canAddItem()
- Parameters
-
- Returns
- bool
PhpMissingBreakStatementInspection
58 switch($item->getId()){
61 if($item->getDamage() === 1){
◆ getItem()
- Returns
- Item
81 return Item::get((
int) ($this->namedtag[
"item"] ?? 0), (
int) ($this->namedtag[
"mData"] ?? 0), 1);
◆ getSpawnCompound()
- Returns
- CompoundTag
110 new IntTag(
"x", (
int) $this->x),
111 new IntTag(
"y", (
int) $this->y),
112 new IntTag(
"z", (
int) $this->z),
113 $this->namedtag->item,
114 $this->namedtag->mData
◆ isEmpty()
◆ removeItem()
◆ setItem()
- Parameters
-
88 $this->namedtag[
"item"] = $item->getId();
89 $this->namedtag[
"mData"] = $item->getDamage();
The documentation for this class was generated from the following file:
- src/pocketmine/tile/FlowerPot.php