Fish items, block of redstone!

This commit is contained in:
Shoghi Cervantes
2015-04-08 15:34:50 +02:00
parent 3cae81c01b
commit 76767294bf
8 changed files with 176 additions and 8 deletions

View File

@ -200,6 +200,8 @@ class Block extends Position implements Metadatable{
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;
@ -351,6 +353,7 @@ class Block extends Position implements Metadatable{
[Item::LAPIS_BLOCK, 0],
[Item::COAL_BLOCK, 0],
[Item::EMERALD_BLOCK, 0],
[Item::REDSTONE_BLOCK, 0],
[Item::SNOW_LAYER, 0],
[Item::GLASS, 0],
[Item::GLOWSTONE_BLOCK, 0],
@ -504,6 +507,12 @@ class Block extends Position implements Metadatable{
[Item::POTATO, 0],
[Item::BEETROOT_SEEDS, 0],
[Item::EGG, 0],
[Item::RAW_FISH, 0],
[Item::RAW_FISH, 1],
[Item::RAW_FISH, 2],
[Item::RAW_FISH, 3],
[Item::COOKED_FISH, 0],
[Item::COOKED_FISH, 1],
[Item::DYE, 0],
[Item::DYE, 7],
[Item::DYE, 6],

View File

@ -0,0 +1,68 @@
<?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\block;
use pocketmine\item\Item;
class Redstone extends Transparent{
protected $id = self::REDSTONE_BLOCK;
public function __construct(){
}
public function getHardness(){
return 30;
}
public function getName(){
return "Redstone Block";
}
public function getBreakTime(Item $item){
switch($item->isPickaxe()){
case 5:
return 0.95;
case 4:
return 1.25;
case 3:
return 1.9;
case 2:
return 0.65;
case 1:
return 3.75;
default:
return 25;
}
}
public function getDrops(Item $item){
if($item->isPickaxe() >= 1){
return [
[Item::REDSTONE_BLOCK, 0, 1],
];
}else{
return [];
}
}
}