mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 10:22:56 +00:00
Added Mob Heads
Fixed duplicated items in JSON file
This commit is contained in:
@ -241,6 +241,7 @@ class Item{
|
||||
const WOODEN_BUTTON = 143;
|
||||
const MOB_HEAD_BLOCK = 144;
|
||||
const ANVIL = 145;
|
||||
const SKULL_BLOCK = 144;
|
||||
const TRAPPED_CHEST = 146;
|
||||
const WEIGHTED_PRESSURE_PLATE_LIGHT = 147;
|
||||
const WEIGHTED_PRESSURE_PLATE_HEAVY = 148;
|
||||
@ -449,6 +450,8 @@ class Item{
|
||||
const POISONOUS_POTATO = 394;
|
||||
const GOLDEN_CARROT = 396;
|
||||
const MOB_HEAD = 397;
|
||||
const SKULL = 397;
|
||||
|
||||
const PUMPKIN_PIE = 400;
|
||||
|
||||
const ENCHANTED_BOOK = 403;
|
||||
@ -608,6 +611,7 @@ class Item{
|
||||
self::$list[self::POTATO] = Potato::class;
|
||||
self::$list[self::BAKED_POTATO] = BakedPotato::class;
|
||||
self::$list[self::GOLDEN_CARROT] = GoldenCarrot::class;
|
||||
self::$list[self::MOB_HEAD] = MobHead::class;
|
||||
self::$list[self::PUMPKIN_PIE] = PumpkinPie::class;
|
||||
self::$list[self::NETHER_BRICK] = NetherBrick::class;
|
||||
self::$list[self::QUARTZ] = Quartz::class;
|
||||
@ -634,7 +638,7 @@ class Item{
|
||||
self::clearCreativeItems();
|
||||
|
||||
$creativeItems = new Config(Server::getInstance()->getFilePath() . "src/pocketmine/resources/creativeitems.json", Config::JSON, []);
|
||||
|
||||
|
||||
foreach($creativeItems->getAll() as $item){
|
||||
self::addCreativeItem(Item::get($item["ID"], $item["Damage"]));
|
||||
}
|
||||
|
35
src/pocketmine/item/MobHead.php
Normal file
35
src/pocketmine/item/MobHead.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
*
|
||||
* ____ _ _ __ __ _ __ __ ____
|
||||
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* @author PocketMine Team
|
||||
* @link http://www.pocketmine.net/
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
use pocketmine\block\Block;
|
||||
|
||||
class MobHead extends Item{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
$this->block = Block::get(Item::SKULL_BLOCK);
|
||||
parent::__construct(self::MOB_HEAD, $meta, $count, "Mob Head");
|
||||
}
|
||||
|
||||
public function getMaxStackSize(){
|
||||
return 1;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user