PHP 클래스 pocketmine\block\Block

상속: extends pocketmine\level\Position, implements pocketmine\metadata\Metadatable
파일 보기 프로젝트 열기: iTXTech/Genisys 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$boundingBox pocketmine\math\AxisAlignedBB
$fullList SplFixedArray
$hardness SplFixedArray
$light SplFixedArray
$lightFilter SplFixedArray
$list SplFixedArray
$solid SplFixedArray
$transparent SplFixedArray

보호된 프로퍼티들

프로퍼티 타입 설명
$id
$meta

공개 메소드들

메소드 설명
__construct ( integer $id, integer $meta )
__toString ( ) : string
activate ( )
addVelocityToEntity ( Entity $entity, Vector3 $vector )
calculateIntercept ( Vector3 $pos1, Vector3 $pos2 ) : MovingObjectPosition
canBeActivated ( ) : boolean AKA: Block->isActivable
canBeBrokenWith ( Item $item )
canBeFlowedInto ( ) : boolean AKA: Block->isFlowable
canBePlaced ( ) : boolean AKA: Block->isPlaceable
canBeReplaced ( ) : boolean AKA: Block->canBeReplaced()
canNeighborBurn ( )
canPassThrough ( )
collidesWithBB ( AxisAlignedBB $bb ) : boolean Checks for collision against an AxisAlignedBB
deactivate ( )
get ( integer $id, integer $meta, Position $pos = null ) : Block
getBoundingBox ( ) : AxisAlignedBB
getBreakTime ( Item $item ) : float Returns the seconds that this block takes to be broken using an specific Item
getBurnAbility ( ) : integer
getBurnChance ( ) : integer
getDamage ( ) : integer
getDrops ( Item $item ) : array Returns an array of Item objects to be dropped
getFrictionFactor ( ) : float
getHardness ( ) : integer
getId ( ) : integer
getLightLevel ( ) : integer
getMetadata ( $metadataKey )
getName ( ) : string
getResistance ( ) : integer
getSide ( integer $side, integer $step = 1 ) : Block Returns the Block on the side $side, works like Vector3::side()
getToolType ( ) : integer
hasEntityCollision ( )
hasMetadata ( $metadataKey )
init ( )
isActivated ( Block $from = null )
isBreakable ( Item $item ) : boolean Returns if the item can be broken with an specific Item
isPlaceable ( )
isSolid ( )
isTopFacingSurfaceSolid ( )
isTransparent ( ) : boolean
onActivate ( Item $item, Player $player = null ) : boolean Do actions when activated by Item. Returns if it has done anything
onBreak ( Item $item ) : mixed Do the actions needed so the block is broken with the Item
onEntityCollide ( Entity $entity )
onUpdate ( integer $type ) : void Fires a block update on the Block
place ( Item $item, Block $block, Block $target, integer $face, float $fx, float $fy, float $fz, Player $player = null ) : boolean Places the Block, using block space and block target, and side. Returns if the block has been placed.
position ( Position $v ) Sets the block position to a new Position object
removeMetadata ( $metadataKey, pocketmine\plugin\Plugin $plugin )
setDamage ( integer $meta )
setMetadata ( $metadataKey, MetadataValue $metadataValue )
tickRate ( ) : integer

보호된 메소드들

메소드 설명
recalculateBoundingBox ( ) : AxisAlignedBB

메소드 상세

__construct() 공개 메소드

public __construct ( integer $id, integer $meta )
$id integer
$meta integer

__toString() 공개 메소드

public __toString ( ) : string
리턴 string

activate() 공개 메소드

public activate ( )

addVelocityToEntity() 공개 메소드

public addVelocityToEntity ( Entity $entity, Vector3 $vector )
$entity pocketmine\entity\Entity
$vector pocketmine\math\Vector3

calculateIntercept() 공개 메소드

public calculateIntercept ( Vector3 $pos1, Vector3 $pos2 ) : MovingObjectPosition
$pos1 pocketmine\math\Vector3
$pos2 pocketmine\math\Vector3
리턴 pocketmine\level\MovingObjectPosition

canBeActivated() 공개 메소드

AKA: Block->isActivable
public canBeActivated ( ) : boolean
리턴 boolean

canBeBrokenWith() 공개 메소드

public canBeBrokenWith ( Item $item )
$item pocketmine\item\Item

canBeFlowedInto() 공개 메소드

AKA: Block->isFlowable
public canBeFlowedInto ( ) : boolean
리턴 boolean

canBePlaced() 공개 메소드

AKA: Block->isPlaceable
public canBePlaced ( ) : boolean
리턴 boolean

canBeReplaced() 공개 메소드

AKA: Block->canBeReplaced()
public canBeReplaced ( ) : boolean
리턴 boolean

canNeighborBurn() 공개 메소드

public canNeighborBurn ( )

canPassThrough() 공개 메소드

public canPassThrough ( )

collidesWithBB() 공개 메소드

Checks for collision against an AxisAlignedBB
public collidesWithBB ( AxisAlignedBB $bb ) : boolean
$bb pocketmine\math\AxisAlignedBB
리턴 boolean

deactivate() 공개 메소드

public deactivate ( )

get() 공개 정적인 메소드

public static get ( integer $id, integer $meta, Position $pos = null ) : Block
$id integer
$meta integer
$pos pocketmine\level\Position
리턴 Block

getBoundingBox() 공개 메소드

public getBoundingBox ( ) : AxisAlignedBB
리턴 pocketmine\math\AxisAlignedBB

getBreakTime() 공개 메소드

Returns the seconds that this block takes to be broken using an specific Item
public getBreakTime ( Item $item ) : float
$item pocketmine\item\Item
리턴 float

getBurnAbility() 공개 메소드

public getBurnAbility ( ) : integer
리턴 integer

getBurnChance() 공개 메소드

public getBurnChance ( ) : integer
리턴 integer

getDamage() 최종 공개 메소드

final public getDamage ( ) : integer
리턴 integer

getDrops() 공개 메소드

Returns an array of Item objects to be dropped
public getDrops ( Item $item ) : array
$item pocketmine\item\Item
리턴 array

getFrictionFactor() 공개 메소드

public getFrictionFactor ( ) : float
리턴 float

getHardness() 공개 메소드

public getHardness ( ) : integer
리턴 integer

getId() 최종 공개 메소드

final public getId ( ) : integer
리턴 integer

getLightLevel() 공개 메소드

public getLightLevel ( ) : integer
리턴 integer 0-15

getMetadata() 공개 메소드

public getMetadata ( $metadataKey )

getName() 공개 메소드

public getName ( ) : string
리턴 string

getResistance() 공개 메소드

public getResistance ( ) : integer
리턴 integer

getSide() 공개 메소드

Returns the Block on the side $side, works like Vector3::side()
public getSide ( integer $side, integer $step = 1 ) : Block
$side integer
$step integer
리턴 Block

getToolType() 공개 메소드

public getToolType ( ) : integer
리턴 integer

hasEntityCollision() 공개 메소드

public hasEntityCollision ( )

hasMetadata() 공개 메소드

public hasMetadata ( $metadataKey )

init() 공개 정적인 메소드

public static init ( )

isActivated() 공개 메소드

public isActivated ( Block $from = null )
$from Block

isBreakable() 공개 메소드

Returns if the item can be broken with an specific Item
public isBreakable ( Item $item ) : boolean
$item pocketmine\item\Item
리턴 boolean

isPlaceable() 공개 메소드

public isPlaceable ( )

isSolid() 공개 메소드

public isSolid ( )

isTopFacingSurfaceSolid() 공개 메소드

isTransparent() 공개 메소드

public isTransparent ( ) : boolean
리턴 boolean

onActivate() 공개 메소드

Do actions when activated by Item. Returns if it has done anything
public onActivate ( Item $item, Player $player = null ) : boolean
$item pocketmine\item\Item
$player pocketmine\Player
리턴 boolean

onBreak() 공개 메소드

Do the actions needed so the block is broken with the Item
public onBreak ( Item $item ) : mixed
$item pocketmine\item\Item
리턴 mixed

onEntityCollide() 공개 메소드

public onEntityCollide ( Entity $entity )
$entity pocketmine\entity\Entity

onUpdate() 공개 메소드

Fires a block update on the Block
public onUpdate ( integer $type ) : void
$type integer
리턴 void

place() 공개 메소드

Places the Block, using block space and block target, and side. Returns if the block has been placed.
public place ( Item $item, Block $block, Block $target, integer $face, float $fx, float $fy, float $fz, Player $player = null ) : boolean
$item pocketmine\item\Item
$block Block
$target Block
$face integer
$fx float
$fy float
$fz float
$player pocketmine\Player = null
리턴 boolean

position() 최종 공개 메소드

Sets the block position to a new Position object
final public position ( Position $v )
$v pocketmine\level\Position

recalculateBoundingBox() 보호된 메소드

protected recalculateBoundingBox ( ) : AxisAlignedBB
리턴 pocketmine\math\AxisAlignedBB

removeMetadata() 공개 메소드

public removeMetadata ( $metadataKey, pocketmine\plugin\Plugin $plugin )
$plugin pocketmine\plugin\Plugin

setDamage() 최종 공개 메소드

final public setDamage ( integer $meta )
$meta integer

setMetadata() 공개 메소드

public setMetadata ( $metadataKey, MetadataValue $metadataValue )
$metadataValue pocketmine\metadata\MetadataValue

tickRate() 공개 메소드

public tickRate ( ) : integer
리턴 integer

프로퍼티 상세

$boundingBox 공개적으로 프로퍼티

public AxisAlignedBB,pocketmine\math $boundingBox
리턴 pocketmine\math\AxisAlignedBB

$fullList 공개적으로 정적으로 프로퍼티

public static SplFixedArray $fullList
리턴 SplFixedArray

$hardness 공개적으로 정적으로 프로퍼티

public static SplFixedArray $hardness
리턴 SplFixedArray

$id 보호되어 있는 프로퍼티

protected $id

$light 공개적으로 정적으로 프로퍼티

public static SplFixedArray $light
리턴 SplFixedArray

$lightFilter 공개적으로 정적으로 프로퍼티

public static SplFixedArray $lightFilter
리턴 SplFixedArray

$list 공개적으로 정적으로 프로퍼티

public static SplFixedArray $list
리턴 SplFixedArray

$meta 보호되어 있는 프로퍼티

protected $meta

$solid 공개적으로 정적으로 프로퍼티

public static SplFixedArray $solid
리턴 SplFixedArray

$transparent 공개적으로 정적으로 프로퍼티

public static SplFixedArray $transparent
리턴 SplFixedArray