PocketMine
Position Class Reference
Inheritance diagram for Position:
Vector3 Block FakeBlockMenu Location Tile Solid Transparent Entity Furnace Spawnable Bedrock Bookshelf Bricks BurningFurnace Clay Coal CoalOre Cobblestone Diamond DiamondOre Dirt DoubleSlab DoubleWoodSlab Emerald EmeraldOre EndPortalFrame EndStone Fallable Farmland GlowingObsidian GlowingRedstoneOre Gold GoldOre Grass HardenedClay HayBale Iron IronOre Lapis LapisOre LitPumpkin MonsterSpawner MossStone Mycelium NetherBrick Netherrack Obsidian PackedIce Planks Podzol Pumpkin Quartz Redstone RedstoneOre Sandstone Snow SoulSand Sponge StainedClay Stone StoneBricks Stonecutter TNT Wood Wool Workbench Air Bed BrewingStand Cactus Cake Chest Door EnchantingTable Fence FenceGate Flowable FlowerPot Glass Glowstone GrassPath Ice IronTrapdoor Ladder Leaves Liquid Melon NetherBrickFence SignPost Slab Stair StoneWall Thin Trapdoor TrappedChest Vine WoodSlab FallingSand Hanging Item Living PrimedTNT Projectile Vehicle Chest EnchantTable Sign

Public Member Functions

 __construct ($x=0, $y=0, $z=0, Level $level=null)
 
 getLevel ()
 
 setLevel (Level $level)
 
 isValid ()
 
 setStrong ()
 
 setWeak ()
 
 getSide ($side, $step=1)
 
 __toString ()
 
 setComponents ($x, $y, $z)
 
- Public Member Functions inherited from Vector3
 __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)
 
 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)
 
 __toString ()
 

Static Public Member Functions

static fromObject (Vector3 $pos, Level $level=null)
 
- Static Public Member Functions inherited from Vector3
static getOppositeSide ($side)
 

Data Fields

 $level = null
 
- Data Fields inherited from Vector3
const SIDE_DOWN = 0
 
const SIDE_UP = 1
 
const SIDE_NORTH = 2
 
const SIDE_SOUTH = 3
 
const SIDE_WEST = 4
 
const SIDE_EAST = 5
 
 $x
 
 $y
 
 $z
 

Constructor & Destructor Documentation

__construct (   $x = 0,
  $y = 0,
  $z = 0,
Level  $level = null 
)
Parameters
int$x
int$y
int$z
Level$level

Member Function Documentation

getLevel ( )
Returns
Level
getSide (   $side,
  $step = 1 
)

Returns a side Vector

Parameters
int$side
int$step
Returns
Position
Exceptions
LevelException
isValid ( )

Checks if this object has a valid reference to a Level

Returns
bool
setComponents (   $x,
  $y,
  $z 
)
Parameters
$x
$y
$z
Returns
Position
setStrong ( )

Marks the level reference as strong so it won't be collected by the garbage collector.

Deprecated:
Returns
bool
setWeak ( )

Marks the level reference as weak so it won't have effect against the garbage collector decision.

Deprecated:
Returns
bool

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