Improved speed of some int arrays, fixed block metadata

This commit is contained in:
Shoghi Cervantes
2015-07-11 12:03:40 +02:00
parent 9f953fa675
commit 866fde5351
3 changed files with 15 additions and 20 deletions

View File

@ -862,6 +862,12 @@ class Block extends Position implements Metadatable{
);
}
/**
* @param Vector3 $pos1
* @param Vector3 $pos2
*
* @return MovingObjectPosition
*/
public function calculateIntercept(Vector3 $pos1, Vector3 $pos2){
$bb = $this->getBoundingBox();
if($bb === null){
@ -952,8 +958,10 @@ class Block extends Position implements Metadatable{
public function getMetadata($metadataKey){
if($this->getLevel() instanceof Level){
$this->getLevel()->getBlockMetadata()->getMetadata($this, $metadataKey);
return $this->getLevel()->getBlockMetadata()->getMetadata($this, $metadataKey);
}
return null;
}
public function hasMetadata($metadataKey){