mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Fish items, block of redstone!
This commit is contained in:
33
src/pocketmine/item/CookedFish.php
Normal file
33
src/pocketmine/item/CookedFish.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?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;
|
||||
|
||||
|
||||
class CookedFish extends Item{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
parent::__construct(self::RAW_FISH, $meta, $count, "Cooked Fish");
|
||||
if($this->meta === 1){
|
||||
$this->name = "Cooked Salmon";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
37
src/pocketmine/item/Fish.php
Normal file
37
src/pocketmine/item/Fish.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?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;
|
||||
|
||||
|
||||
class Fish extends Item{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
parent::__construct(self::RAW_FISH, $meta, $count, "Raw Fish");
|
||||
if($this->meta === 1){
|
||||
$this->name = "Raw Salmon";
|
||||
}elseif($this->meta === 2){
|
||||
$this->name = "Clownfish";
|
||||
}elseif($this->meta === 3){
|
||||
$this->name = "Pufferfish";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -192,6 +192,8 @@ class Item{
|
||||
const CARROT_BLOCK = 141;
|
||||
const POTATO_BLOCK = 142;
|
||||
|
||||
const REDSTONE_BLOCK = 152;
|
||||
|
||||
const QUARTZ_BLOCK = 155;
|
||||
const QUARTZ_STAIRS = 156;
|
||||
const DOUBLE_WOOD_SLAB = 157;
|
||||
@ -339,8 +341,8 @@ class Item{
|
||||
|
||||
const CLOCK = 347;
|
||||
const GLOWSTONE_DUST = 348;
|
||||
//const RAW_FISH = 349;
|
||||
//const COOKED_FISH = 350;
|
||||
const RAW_FISH = 349;
|
||||
const COOKED_FISH = 350;
|
||||
const DYE = 351;
|
||||
const BONE = 352;
|
||||
const SUGAR = 353;
|
||||
@ -348,7 +350,7 @@ class Item{
|
||||
const BED = 355;
|
||||
|
||||
|
||||
//const COOKIE = 357;
|
||||
const COOKIE = 357;
|
||||
|
||||
|
||||
const SHEARS = 359;
|
||||
@ -479,6 +481,9 @@ class Item{
|
||||
self::$list[self::SHEARS] = Shears::class;
|
||||
self::$list[self::BOW] = Bow::class;
|
||||
|
||||
self::$list[self::RAW_FISH] = Fish::class;
|
||||
self::$list[self::COOKED_FISH] = CookedFish::class;
|
||||
|
||||
for($i = 0; $i < 256; ++$i){
|
||||
if(Block::$list[$i] !== null){
|
||||
self::$list[$i] = Block::$list[$i];
|
||||
|
Reference in New Issue
Block a user