Low level PMF level interface

This commit is contained in:
Shoghi Cervantes 2013-09-08 01:21:40 +02:00
parent 1abe7626bf
commit 275e27f7a9
3 changed files with 95 additions and 11 deletions

View file

@ -167,12 +167,11 @@ class BlockAPI{
}
public static function get($id, $meta = 0, $v = false){
$id = (int) $id;
if(isset(Block::$class[$id])){
$classname = Block::$class[$id];
$b = new $classname($meta);
}else{
$b = new GenericBlock($id, $meta);
$b = new GenericBlock((int) $id, $meta);
}
if($v instanceof Position){
$b->position($v);