PocketMine-MP  1.4 - API 1.10.0
 All Classes Namespaces Functions Variables Pages
pocketmine\block\Solid Class Reference

Inherits pocketmine\block\Block.

Inherited by pocketmine\block\Bedrock, pocketmine\block\Bookshelf, pocketmine\block\Bricks, pocketmine\block\BurningFurnace, pocketmine\block\Clay, pocketmine\block\Coal, pocketmine\block\CoalOre, pocketmine\block\Cobblestone, pocketmine\block\Diamond, pocketmine\block\DiamondOre, pocketmine\block\Dirt, pocketmine\block\DoubleSlab, pocketmine\block\DoubleWoodSlab, pocketmine\block\Emerald, pocketmine\block\EmeraldOre, pocketmine\block\EndPortalFrame, pocketmine\block\EndStone, pocketmine\block\Fallable, pocketmine\block\Farmland, pocketmine\block\GlowingObsidian, pocketmine\block\GlowingRedstoneOre, pocketmine\block\Gold, pocketmine\block\GoldOre, pocketmine\block\Grass, pocketmine\block\HardenedClay, pocketmine\block\HayBale, pocketmine\block\Iron, pocketmine\block\IronOre, pocketmine\block\Lapis, pocketmine\block\LapisOre, pocketmine\block\LitPumpkin, pocketmine\block\MonsterSpawner, pocketmine\block\MossStone, pocketmine\block\Mycelium, pocketmine\block\NetherBrick, pocketmine\block\Netherrack, pocketmine\block\NetherReactor, pocketmine\block\Obsidian, pocketmine\block\Planks, pocketmine\block\Podzol, pocketmine\block\Pumpkin, pocketmine\block\Quartz, pocketmine\block\RedstoneOre, pocketmine\block\Sandstone, pocketmine\block\Snow, pocketmine\block\SoulSand, pocketmine\block\Sponge, pocketmine\block\StainedClay, pocketmine\block\Stone, pocketmine\block\StoneBricks, pocketmine\block\Stonecutter, pocketmine\block\TNT, pocketmine\block\Wood, pocketmine\block\Wool, and pocketmine\block\Workbench.

+ Collaboration diagram for pocketmine\block\Solid:

Public Member Functions

 isSolid ()
 
 __get ($key)
 
 place (Item $item, Block $block, Block $target, $face, $fx, $fy, $fz, Player $player=null)
 
 isBreakable (Item $item)
 
 onBreak (Item $item)
 
 onUpdate ($type)
 
 onActivate (Item $item, Player $player=null)
 
 getHardness ()
 
 getFrictionFactor ()
 
 getLightLevel ()
 
 canBePlaced ()
 
 canBeReplaced ()
 
 isTransparent ()
 
 canBeFlowedInto ()
 
 canBeActivated ()
 
 hasEntityCollision ()
 
 getName ()
 
 getId ()
 
 addVelocityToEntity (Entity $entity, Vector3 $vector)
 
 getDamage ()
 
 setDamage ($meta)
 
 position (Position $v)
 
 getDrops (Item $item)
 
 getBreakTime (Item $item)
 
 getSide ($side, $step=1)
 
 __toString ()
 
 collidesWithBB (AxisAlignedBB $bb, &$list=[])
 
 onEntityCollide (Entity $entity)
 
 getBoundingBox ()
 
 calculateIntercept (Vector3 $pos1, Vector3 $pos2)
 
 setMetadata ($metadataKey, MetadataValue $metadataValue)
 
 getMetadata ($metadataKey)
 
 hasMetadata ($metadataKey)
 
 removeMetadata ($metadataKey, Plugin $plugin)
 
 getLevel ()
 
 setLevel (Level $level)
 
 isValid ()
 
 setStrong ()
 
 setWeak ()
 
 setComponents ($x, $y, $z)
 
 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 ()
 
 distance (Vector3 $pos)
 
 distanceSquared (Vector3 $pos)
 
 maxPlainDistance ($x=0, $z=0)
 
 length ()
 
 lengthSquared ()
 
 normalize ()
 
 dot (Vector3 $v)
 
 cross (Vector3 $v)
 
 getIntermediateWithXValue (Vector3 $v, $x)
 
 getIntermediateWithYValue (Vector3 $v, $y)
 
 getIntermediateWithZValue (Vector3 $v, $z)
 

Static Public Member Functions

static get ($id, $meta=0, Position $pos=null)
 
static fromObject (Vector3 $pos, Level $level=null)
 
static getOppositeSide ($side)
 

Public Attributes

const AIR = 0
 
const STONE = 1
 
const GRASS = 2
 
const DIRT = 3
 
const COBBLESTONE = 4
 
const COBBLE = 4
 
const PLANK = 5
 
const PLANKS = 5
 
const WOODEN_PLANK = 5
 
const WOODEN_PLANKS = 5
 
const SAPLING = 6
 
const SAPLINGS = 6
 
const BEDROCK = 7
 
const WATER = 8
 
const STILL_WATER = 9
 
const LAVA = 10
 
const STILL_LAVA = 11
 
const SAND = 12
 
const GRAVEL = 13
 
const GOLD_ORE = 14
 
const IRON_ORE = 15
 
const COAL_ORE = 16
 
const WOOD = 17
 
const TRUNK = 17
 
const LOG = 17
 
const LEAVES = 18
 
const LEAVE = 18
 
const SPONGE = 19
 
const GLASS = 20
 
const LAPIS_ORE = 21
 
const LAPIS_BLOCK = 22
 
const SANDSTONE = 24
 
const BED_BLOCK = 26
 
const COBWEB = 30
 
const TALL_GRASS = 31
 
const BUSH = 32
 
const DEAD_BUSH = 32
 
const WOOL = 35
 
const DANDELION = 37
 
const ROSE = 38
 
const POPPY = 38
 
const BROWN_MUSHROOM = 39
 
const RED_MUSHROOM = 40
 
const GOLD_BLOCK = 41
 
const IRON_BLOCK = 42
 
const DOUBLE_SLAB = 43
 
const DOUBLE_SLABS = 43
 
const SLAB = 44
 
const SLABS = 44
 
const BRICKS = 45
 
const BRICKS_BLOCK = 45
 
const TNT = 46
 
const BOOKSHELF = 47
 
const MOSS_STONE = 48
 
const MOSSY_STONE = 48
 
const OBSIDIAN = 49
 
const TORCH = 50
 
const FIRE = 51
 
const MONSTER_SPAWNER = 52
 
const WOOD_STAIRS = 53
 
const WOODEN_STAIRS = 53
 
const OAK_WOOD_STAIRS = 53
 
const OAK_WOODEN_STAIRS = 53
 
const CHEST = 54
 
const DIAMOND_ORE = 56
 
const DIAMOND_BLOCK = 57
 
const CRAFTING_TABLE = 58
 
const WORKBENCH = 58
 
const WHEAT_BLOCK = 59
 
const FARMLAND = 60
 
const FURNACE = 61
 
const BURNING_FURNACE = 62
 
const LIT_FURNACE = 62
 
const SIGN_POST = 63
 
const DOOR_BLOCK = 64
 
const WOODEN_DOOR_BLOCK = 64
 
const WOOD_DOOR_BLOCK = 64
 
const LADDER = 65
 
const COBBLE_STAIRS = 67
 
const COBBLESTONE_STAIRS = 67
 
const WALL_SIGN = 68
 
const IRON_DOOR_BLOCK = 71
 
const REDSTONE_ORE = 73
 
const GLOWING_REDSTONE_ORE = 74
 
const LIT_REDSTONE_ORE = 74
 
const SNOW = 78
 
const SNOW_LAYER = 78
 
const ICE = 79
 
const SNOW_BLOCK = 80
 
const CACTUS = 81
 
const CLAY_BLOCK = 82
 
const REEDS = 83
 
const SUGARCANE_BLOCK = 83
 
const FENCE = 85
 
const FENCE_OAK = 85
 
const PUMPKIN = 86
 
const NETHERRACK = 87
 
const SOUL_SAND = 88
 
const GLOWSTONE = 89
 
const GLOWSTONE_BLOCK = 89
 
const LIT_PUMPKIN = 91
 
const JACK_O_LANTERN = 91
 
const CAKE_BLOCK = 92
 
const TRAPDOOR = 96
 
const STONE_BRICKS = 98
 
const STONE_BRICK = 98
 
const IRON_BAR = 101
 
const IRON_BARS = 101
 
const GLASS_PANE = 102
 
const GLASS_PANEL = 102
 
const MELON_BLOCK = 103
 
const PUMPKIN_STEM = 104
 
const MELON_STEM = 105
 
const VINE = 106
 
const VINES = 106
 
const FENCE_GATE = 107
 
const BRICK_STAIRS = 108
 
const STONE_BRICK_STAIRS = 109
 
const MYCELIUM = 110
 
const NETHER_BRICKS = 112
 
const NETHER_BRICK_BLOCK = 112
 
const NETHER_BRICKS_STAIRS = 114
 
const END_PORTAL_FRAME = 120
 
const END_STONE = 121
 
const SANDSTONE_STAIRS = 128
 
const EMERALD_ORE = 129
 
const EMERALD_BLOCK = 133
 
const SPRUCE_WOOD_STAIRS = 134
 
const SPRUCE_WOODEN_STAIRS = 134
 
const BIRCH_WOOD_STAIRS = 135
 
const BIRCH_WOODEN_STAIRS = 135
 
const JUNGLE_WOOD_STAIRS = 136
 
const JUNGLE_WOODEN_STAIRS = 136
 
const COBBLE_WALL = 139
 
const STONE_WALL = 139
 
const COBBLESTONE_WALL = 139
 
const CARROT_BLOCK = 141
 
const POTATO_BLOCK = 142
 
const QUARTZ_BLOCK = 155
 
const QUARTZ_STAIRS = 156
 
const DOUBLE_WOOD_SLAB = 157
 
const DOUBLE_WOODEN_SLAB = 157
 
const DOUBLE_WOOD_SLABS = 157
 
const DOUBLE_WOODEN_SLABS = 157
 
const WOOD_SLAB = 158
 
const WOODEN_SLAB = 158
 
const WOOD_SLABS = 158
 
const WOODEN_SLABS = 158
 
const STAINED_CLAY = 159
 
const STAINED_HARDENED_CLAY = 159
 
const LEAVES2 = 161
 
const LEAVE2 = 161
 
const WOOD2 = 162
 
const TRUNK2 = 162
 
const LOG2 = 162
 
const ACACIA_WOOD_STAIRS = 163
 
const ACACIA_WOODEN_STAIRS = 163
 
const DARK_OAK_WOOD_STAIRS = 164
 
const DARK_OAK_WOODEN_STAIRS = 164
 
const HAY_BALE = 170
 
const CARPET = 171
 
const HARDENED_CLAY = 172
 
const COAL_BLOCK = 173
 
const DOUBLE_PLANT = 175
 
const FENCE_GATE_SPRUCE = 183
 
const FENCE_GATE_BIRCH = 184
 
const FENCE_GATE_JUNGLE = 185
 
const FENCE_GATE_DARK_OAK = 186
 
const FENCE_GATE_ACACIA = 187
 
const FENCE_SPRUCE = 188
 
const FENCE_BIRCH = 189
 
const FENCE_JUNGLE = 190
 
const FENCE_DARK_OAK = 191
 
const FENCE_ACACIA = 192
 
const PODZOL = 243
 
const BEETROOT_BLOCK = 244
 
const STONECUTTER = 245
 
const GLOWING_OBSIDIAN = 246
 
const NETHER_REACTOR = 247
 
 $level = null
 
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
 

Static Public Attributes

static $creative
 
static $list = null
 
static $fullList = null
 
static $light = null
 
static $lightFilter = null
 
static $solid = null
 
static $hardness = null
 
static $transparent = null
 

Protected Member Functions

 recalculateBoundingBox ()
 

Protected Attributes

 $id
 
 $meta = 0
 
 $boundingBox = null
 

Detailed Description

Definition at line 24 of file Solid.php.

Member Function Documentation

pocketmine\block\Block::__get (   $key)
inherited

Backwards-compatibility with old way to define block properties

Deprecated:
Parameters
string$key
Returns
mixed

Definition at line 562 of file Block.php.

pocketmine\block\Block::__toString ( )
inherited
Returns
string

Definition at line 1039 of file Block.php.

References pocketmine\block\Block\getName().

+ Here is the call graph for this function:

pocketmine\math\Vector3::add (   $x,
  $y = 0,
  $z = 0 
)
inherited
Parameters
Vector3 | int$x
int$y
int$z
Returns
Vector3

Definition at line 94 of file Vector3.php.

Referenced by pocketmine\math\Vector3\subtract(), and pocketmine\level\Level\useBreakOn().

+ Here is the caller graph for this function:

pocketmine\block\Block::canBeActivated ( )
inherited

AKA: Block->isActivable

Returns
bool

Definition at line 940 of file Block.php.

pocketmine\block\Block::canBeFlowedInto ( )
inherited

AKA: Block->isFlowable

Returns
bool

Definition at line 931 of file Block.php.

pocketmine\block\Block::canBePlaced ( )
inherited

AKA: Block->isPlaceable

Returns
bool

Definition at line 902 of file Block.php.

pocketmine\block\Block::canBeReplaced ( )
inherited

AKA: Block->canBeReplaced()

Returns
bool

Definition at line 911 of file Block.php.

pocketmine\block\Block::collidesWithBB ( AxisAlignedBB  $bb,
$list = [] 
)
inherited

Checks for collision against an AxisAlignedBB

Parameters
AxisAlignedBB$bb
Block[]$list

Definition at line 1049 of file Block.php.

References pocketmine\block\Block\getBoundingBox().

+ Here is the call graph for this function:

static pocketmine\block\Block::get (   $id,
  $meta = 0,
Position  $pos = null 
)
staticinherited
Parameters
int$id
int$meta
Position$pos
Returns
Block

Definition at line 782 of file Block.php.

Referenced by pocketmine\block\Block\getSide().

+ Here is the caller graph for this function:

pocketmine\block\Block::getBoundingBox ( )
inherited
Returns
AxisAlignedBB

Definition at line 1066 of file Block.php.

References pocketmine\block\Block\recalculateBoundingBox().

Referenced by pocketmine\block\Block\collidesWithBB().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

pocketmine\block\Block::getBreakTime ( Item  $item)
inherited

Returns the seconds that this block takes to be broken using an specific Item

Parameters
Item$item
Returns
float

Definition at line 1016 of file Block.php.

pocketmine\block\Block::getDamage ( )
finalinherited
Returns
int

Definition at line 969 of file Block.php.

Referenced by pocketmine\level\Level\setBlock().

+ Here is the caller graph for this function:

pocketmine\block\Block::getDrops ( Item  $item)
inherited

Returns an array of Item objects to be dropped

Parameters
Item$item
Returns
array

Definition at line 999 of file Block.php.

pocketmine\block\Block::getFrictionFactor ( )
inherited
Returns
float

Definition at line 886 of file Block.php.

pocketmine\block\Block::getHardness ( )
inherited
Returns
int

Definition at line 879 of file Block.php.

pocketmine\block\Block::getId ( )
finalinherited
Returns
int

Definition at line 958 of file Block.php.

Referenced by pocketmine\level\Level\setBlock().

+ Here is the caller graph for this function:

pocketmine\math\Vector3::getIntermediateWithXValue ( Vector3  $v,
  $x 
)
inherited

Returns a new vector with x value equal to the second parameter, along the line between this vector and the passed in vector, or null if not possible.

Parameters
Vector3$v
float$x
Returns
Vector3

Definition at line 241 of file Vector3.php.

pocketmine\math\Vector3::getIntermediateWithYValue ( Vector3  $v,
  $y 
)
inherited

Returns a new vector with y value equal to the second parameter, along the line between this vector and the passed in vector, or null if not possible.

Parameters
Vector3$v
float$y
Returns
Vector3

Definition at line 268 of file Vector3.php.

pocketmine\math\Vector3::getIntermediateWithZValue ( Vector3  $v,
  $z 
)
inherited

Returns a new vector with z value equal to the second parameter, along the line between this vector and the passed in vector, or null if not possible.

Parameters
Vector3$v
float$z
Returns
Vector3

Definition at line 295 of file Vector3.php.

pocketmine\block\Block::getLightLevel ( )
inherited
Returns
int 0-15

Definition at line 893 of file Block.php.

pocketmine\block\Block::getMetadata (   $metadataKey)
inherited

Returns a list of previously set metadata values from the implementing object's metadata store.

Parameters
string$metadataKey
Returns
MetadataValue[]

Implements pocketmine\metadata\Metadatable.

Definition at line 1176 of file Block.php.

References pocketmine\level\Position\getLevel().

+ Here is the call graph for this function:

pocketmine\block\Block::getName ( )
inherited
Returns
string

Definition at line 951 of file Block.php.

Referenced by pocketmine\block\Block\__toString().

+ Here is the caller graph for this function:

pocketmine\block\Block::getSide (   $side,
  $step = 1 
)
inherited

Returns the Block on the side $side, works like Vector3::side()

Parameters
int$side
int$step
Returns
Block

Definition at line 1028 of file Block.php.

References pocketmine\block\Block\get(), pocketmine\level\Position\getLevel(), and pocketmine\level\Position\isValid().

+ Here is the call graph for this function:

pocketmine\block\Block::hasMetadata (   $metadataKey)
inherited

Tests to see whether the implementing object contains the given metadata value in its metadata store.

Parameters
string$metadataKey
Returns
boolean

Implements pocketmine\metadata\Metadatable.

Definition at line 1182 of file Block.php.

References pocketmine\level\Position\getLevel().

+ Here is the call graph for this function:

pocketmine\block\Block::isBreakable ( Item  $item)
inherited

Returns if the item can be broken with an specific Item

Parameters
Item$item
Returns
bool

Definition at line 838 of file Block.php.

pocketmine\block\Block::isTransparent ( )
inherited
Returns
bool

Definition at line 918 of file Block.php.

pocketmine\level\Position::isValid ( )
inherited

Checks if this object has a valid reference to a Level

Returns
bool

Definition at line 66 of file Position.php.

Referenced by pocketmine\level\Position\getSide(), and pocketmine\block\Block\getSide().

+ Here is the caller graph for this function:

pocketmine\math\Vector3::normalize ( )
inherited
Returns
Vector3

Definition at line 211 of file Vector3.php.

pocketmine\block\Block::onActivate ( Item  $item,
Player  $player = null 
)
inherited

Do actions when activated by Item. Returns if it has done anything

Parameters
Item$item
Player$player
Returns
bool

Definition at line 872 of file Block.php.

pocketmine\block\Block::onBreak ( Item  $item)
inherited

Do the actions needed so the block is broken with the Item

Parameters
Item$item
Returns
mixed

Definition at line 849 of file Block.php.

References pocketmine\level\Position\getLevel().

+ Here is the call graph for this function:

pocketmine\block\Block::onEntityCollide ( Entity  $entity)
inherited
Parameters
Entity$entity

Definition at line 1059 of file Block.php.

pocketmine\block\Block::onUpdate (   $type)
inherited

Fires a block update on the Block

Parameters
int$type
Returns
void

Definition at line 860 of file Block.php.

pocketmine\block\Block::place ( Item  $item,
Block  $block,
Block  $target,
  $face,
  $fx,
  $fy,
  $fz,
Player  $player = null 
)
inherited

Places the Block, using block space and block target, and side. Returns if the block has been placed.

Parameters
Item$item
Block$block
Block$target
int$face
float$fx
float$fy
float$fz
Player$player= null
Returns
bool

Definition at line 827 of file Block.php.

References pocketmine\level\Position\getLevel().

+ Here is the call graph for this function:

pocketmine\block\Block::position ( Position  $v)
finalinherited

Sets the block position to a new Position object

Parameters
Position$v

Definition at line 985 of file Block.php.

Referenced by pocketmine\level\Level\setBlock().

+ Here is the caller graph for this function:

pocketmine\block\Block::recalculateBoundingBox ( )
protectedinherited
Returns
AxisAlignedBB

Definition at line 1077 of file Block.php.

Referenced by pocketmine\block\Block\getBoundingBox().

+ Here is the caller graph for this function:

pocketmine\block\Block::removeMetadata (   $metadataKey,
Plugin  $owningPlugin 
)
inherited

Removes the given metadata value from the implementing object's metadata store.

Parameters
string$metadataKey
Plugin$owningPlugin
Returns
void

Implements pocketmine\metadata\Metadatable.

Definition at line 1188 of file Block.php.

References pocketmine\level\Position\getLevel().

+ Here is the call graph for this function:

pocketmine\level\Position::setComponents (   $x,
  $y,
  $z 
)
inherited
Parameters
$x
$y
$z
Returns
Position

Definition at line 123 of file Position.php.

pocketmine\block\Block::setDamage (   $meta)
finalinherited
Parameters
int$meta

Definition at line 976 of file Block.php.

pocketmine\block\Block::setMetadata (   $metadataKey,
MetadataValue  $newMetadataValue 
)
inherited

Sets a metadata value in the implementing object's metadata store.

Parameters
string$metadataKey
MetadataValue$newMetadataValue
Returns
void

Implements pocketmine\metadata\Metadatable.

Definition at line 1170 of file Block.php.

References pocketmine\level\Position\getLevel().

+ Here is the call graph for this function:

pocketmine\level\Position::setStrong ( )
inherited

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

Deprecated:
Returns
bool

Definition at line 78 of file Position.php.

pocketmine\level\Position::setWeak ( )
inherited

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

Deprecated:
Returns
bool

Definition at line 90 of file Position.php.

pocketmine\math\Vector3::subtract (   $x = 0,
  $y = 0,
  $z = 0 
)
inherited
Parameters
Vector3 | int$x
int$y
int$z
Returns
Vector3

Definition at line 109 of file Vector3.php.

References pocketmine\math\Vector3\add().

+ Here is the call graph for this function:


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