mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Low level PMF level interface
This commit is contained in:
parent
1abe7626bf
commit
275e27f7a9
3 changed files with 95 additions and 11 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue