mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
Added Torches placement
This commit is contained in:
parent
3ecbe7dbf7
commit
399050fc4e
6 changed files with 163 additions and 129 deletions
|
|
@ -25,20 +25,27 @@ the Free Software Foundation, either version 3 of the License, or
|
|||
|
||||
*/
|
||||
|
||||
require_once("classes/material/IDs.php");
|
||||
|
||||
class Item{
|
||||
public static $class = array(
|
||||
|
||||
|
||||
);
|
||||
protected $block = false;
|
||||
protected $id;
|
||||
protected $meta;
|
||||
protected $count;
|
||||
protected $maxStackSize = 64;
|
||||
protected $durability = 0;
|
||||
protected $name = "Unknown";
|
||||
protected $name;
|
||||
|
||||
public function __construct($id, $meta = 0, $count = 1){
|
||||
public function __construct($id, $meta = 0, $count = 1, $name = "Unknown"){
|
||||
$this->id = (int) $id;
|
||||
$this->meta = (int) $meta;
|
||||
$this->count = (int) $count;
|
||||
if(isset(BlockAPI::$class[$this->id])){
|
||||
$this->name = $name;
|
||||
if(isset(Block::$class[$this->id])){
|
||||
$this->block = BlockAPI::get($this->id, $this->meta);
|
||||
$this->name = $this->block->getName();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue