|
| | __construct (Level $level, CompoundTag $nbt) |
| |
| | hasItem () |
| |
| | getItem () |
| |
| | setItem (Item $item=null) |
| |
| | getItemRotation () |
| |
| | setItemRotation (int $rotation) |
| |
| | getItemDropChance () |
| |
| | setItemDropChance (float $chance) |
| |
| | SetMapID (string $mapid) |
| |
| | getMapID () |
| |
| | 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()
ItemFrame constructor.
- Parameters
-
| Level | $level | |
| CompoundTag | $nbt | |
43 if(!isset($nbt->ItemRotation)){
44 $nbt->ItemRotation =
new ByteTag(
"ItemRotation", 0);
47 if(!isset($nbt->ItemDropChance)){
48 $nbt->ItemDropChance =
new FloatTag(
"ItemDropChance", 1.0);
51 parent::__construct(
$level, $nbt);
◆ getItem()
- Returns
- Item
65 if(isset($this->namedtag->Item)){
◆ getItemDropChance()
- Returns
- float
103 return $this->namedtag->ItemDropChance->getValue();
◆ getItemRotation()
- Returns
- int
88 return $this->namedtag->ItemRotation->getValue();
◆ getMapID()
◆ getSpawnCompound()
- Returns
- CompoundTag
136 new IntTag(
"x", (
int) $this->x),
137 new IntTag(
"y", (
int) $this->y),
138 new IntTag(
"z", (
int) $this->z),
139 $this->namedtag->ItemDropChance,
140 $this->namedtag->ItemRotation,
143 $tag->Item = $this->namedtag->Item;
145 if(isset($this->namedtag->Map_UUID)){
146 $tag->Map_UUID = $this->namedtag->Map_UUID;
◆ hasItem()
◆ setItem()
| setItem |
( |
Item |
$item = null | ) |
|
- Parameters
-
76 if($item !== null and $item->getId() !==
Item::AIR){
77 $this->namedtag->Item = $item->nbtSerialize(-1,
"Item");
79 unset($this->namedtag->Item);
◆ setItemDropChance()
| setItemDropChance |
( |
float |
$chance | ) |
|
- Parameters
-
110 $this->namedtag->ItemDropChance =
new FloatTag(
"ItemDropChance", $chance);
◆ setItemRotation()
| setItemRotation |
( |
int |
$rotation | ) |
|
- Parameters
-
95 $this->namedtag->ItemRotation =
new ByteTag(
"ItemRotation", $rotation);
◆ SetMapID()
| SetMapID |
( |
string |
$mapid | ) |
|
- Parameters
-
118 $this->map_uuid = $mapid;
119 $this->namedtag->Map_UUID =
new StringTag(
"map_uuid", $mapid);
◆ $map_uuid
The documentation for this class was generated from the following file:
- src/pocketmine/tile/ItemFrame.php