Tool tier added to getDrops

This commit is contained in:
Intyre 2015-10-11 00:52:44 +02:00
parent 958c3589c9
commit 94b79ac28a
No known key found for this signature in database
GPG Key ID: B06D41D26935005A
35 changed files with 35 additions and 37 deletions

View File

@ -71,7 +71,7 @@ class Anvil extends Fallable{
} }
public function getDrops(Item $item){ public function getDrops(Item $item){
if($item->isPickaxe() >= 1){ if($item->isPickaxe() >= Tool::TIER_WOODEN){
return [ return [
[$this->id, 0, 1], //TODO break level [$this->id, 0, 1], //TODO break level
]; ];

View File

@ -49,7 +49,7 @@ class Bricks extends Solid{
} }
public function getDrops(Item $item){ public function getDrops(Item $item){
if($item->isPickaxe() >= 1){ if($item->isPickaxe() >= Tool::TIER_WOODEN){
return [ return [
[Item::BRICKS_BLOCK, 0, 1], [Item::BRICKS_BLOCK, 0, 1],
]; ];

View File

@ -135,7 +135,7 @@ class BurningFurnace extends Solid{
public function getDrops(Item $item){ public function getDrops(Item $item){
$drops = []; $drops = [];
if($item->isPickaxe() >= 1){ if($item->isPickaxe() >= Tool::TIER_WOODEN){
$drops[] = [Item::FURNACE, 0, 1]; $drops[] = [Item::FURNACE, 0, 1];
} }

View File

@ -45,7 +45,7 @@ class Coal extends Solid{
} }
public function getDrops(Item $item){ public function getDrops(Item $item){
if($item->isPickaxe() >= 1){ if($item->isPickaxe() >= Tool::TIER_WOODEN){
return [ return [
[Item::COAL_BLOCK, 0, 1], [Item::COAL_BLOCK, 0, 1],
]; ];

View File

@ -45,7 +45,7 @@ class CoalOre extends Solid{
} }
public function getDrops(Item $item){ public function getDrops(Item $item){
if($item->isPickaxe() >= 1){ if($item->isPickaxe() >= Tool::TIER_WOODEN){
return [ return [
[Item::COAL, 0, 1], [Item::COAL, 0, 1],
]; ];

View File

@ -45,7 +45,7 @@ class Cobblestone extends Solid{
} }
public function getDrops(Item $item){ public function getDrops(Item $item){
if($item->isPickaxe() >= 1){ if($item->isPickaxe() >= Tool::TIER_WOODEN){
return [ return [
[Item::COBBLESTONE, 0, 1], [Item::COBBLESTONE, 0, 1],
]; ];

View File

@ -45,7 +45,7 @@ class Diamond extends Solid{
} }
public function getDrops(Item $item){ public function getDrops(Item $item){
if($item->isPickaxe() >= 4){ if($item->isPickaxe() >= Tool::TIER_IRON){
return [ return [
[Item::DIAMOND_BLOCK, 0, 1], [Item::DIAMOND_BLOCK, 0, 1],
]; ];

View File

@ -45,7 +45,7 @@ class DiamondOre extends Solid{
} }
public function getDrops(Item $item){ public function getDrops(Item $item){
if($item->isPickaxe() >= 4){ if($item->isPickaxe() >= Tool::TIER_IRON){
return [ return [
[Item::DIAMOND, 0, 1], [Item::DIAMOND, 0, 1],
]; ];

View File

@ -55,7 +55,7 @@ class DoubleSlab extends Solid{
} }
public function getDrops(Item $item){ public function getDrops(Item $item){
if($item->isPickaxe() >= 1){ if($item->isPickaxe() >= Tool::TIER_WOODEN){
return [ return [
[Item::SLAB, $this->meta & 0x07, 2], [Item::SLAB, $this->meta & 0x07, 2],
]; ];

View File

@ -45,7 +45,7 @@ class Emerald extends Solid{
} }
public function getDrops(Item $item){ public function getDrops(Item $item){
if($item->isPickaxe() >= 4){ if($item->isPickaxe() >= Tool::TIER_IRON){
return [ return [
[Item::EMERALD_BLOCK, 0, 1], [Item::EMERALD_BLOCK, 0, 1],
]; ];

View File

@ -45,7 +45,7 @@ class EmeraldOre extends Solid{
} }
public function getDrops(Item $item){ public function getDrops(Item $item){
if($item->isPickaxe() >= 4){ if($item->isPickaxe() >= Tool::TIER_IRON){
return [ return [
[Item::EMERALD, 0, 1], [Item::EMERALD, 0, 1],
]; ];

View File

@ -97,7 +97,7 @@ class EnchantingTable extends Transparent{
} }
public function getDrops(Item $item){ public function getDrops(Item $item){
if($item->isPickaxe() >= 1){ if($item->isPickaxe() >= Tool::TIER_WOODEN){
return [ return [
[$this->id, 0, 1], [$this->id, 0, 1],
]; ];

View File

@ -60,7 +60,7 @@ class GlowingRedstoneOre extends Solid{
} }
public function getDrops(Item $item){ public function getDrops(Item $item){
if($item->isPickaxe() >= 4){ if($item->isPickaxe() >= Tool::TIER_IRON){
return [ return [
[Item::REDSTONE_DUST, 0, mt_rand(4, 5)], [Item::REDSTONE_DUST, 0, mt_rand(4, 5)],
]; ];

View File

@ -45,7 +45,7 @@ class Gold extends Solid{
} }
public function getDrops(Item $item){ public function getDrops(Item $item){
if($item->isPickaxe() >= 4){ if($item->isPickaxe() >= Tool::TIER_IRON){
return [ return [
[Item::GOLD_BLOCK, 0, 1], [Item::GOLD_BLOCK, 0, 1],
]; ];

View File

@ -45,7 +45,7 @@ class GoldOre extends Solid{
} }
public function getDrops(Item $item){ public function getDrops(Item $item){
if($item->isPickaxe() >= 4){ if($item->isPickaxe() >= Tool::TIER_IRON){
return [ return [
[Item::GOLD_ORE, 0, 1], [Item::GOLD_ORE, 0, 1],
]; ];

View File

@ -45,7 +45,7 @@ class Iron extends Solid{
} }
public function getDrops(Item $item){ public function getDrops(Item $item){
if($item->isPickaxe() >= 3){ if($item->isPickaxe() >= Tool::TIER_STONE){
return [ return [
[Item::IRON_BLOCK, 0, 1], [Item::IRON_BLOCK, 0, 1],
]; ];

View File

@ -45,7 +45,7 @@ class IronBars extends Thin{
} }
public function getDrops(Item $item){ public function getDrops(Item $item){
if($item->isPickaxe() >= 1){ if($item->isPickaxe() >= Tool::TIER_WOODEN){
return [ return [
[Item::IRON_BARS, 0, 1], [Item::IRON_BARS, 0, 1],
]; ];

View File

@ -45,7 +45,7 @@ class IronDoor extends Door{
} }
public function getDrops(Item $item){ public function getDrops(Item $item){
if($item->isPickaxe() >= 1){ if($item->isPickaxe() >= Tool::TIER_WOODEN){
return [ return [
[Item::IRON_DOOR, 0, 1], [Item::IRON_DOOR, 0, 1],
]; ];

View File

@ -45,7 +45,7 @@ class IronOre extends Solid{
} }
public function getDrops(Item $item){ public function getDrops(Item $item){
if($item->isPickaxe() >= 3){ if($item->isPickaxe() >= Tool::TIER_STONE){
return [ return [
[Item::IRON_ORE, 0, 1], [Item::IRON_ORE, 0, 1],
]; ];

View File

@ -45,7 +45,7 @@ class Lapis extends Solid{
} }
public function getDrops(Item $item){ public function getDrops(Item $item){
if($item->isPickaxe() >= 3){ if($item->isPickaxe() >= Tool::TIER_STONE){
return [ return [
[Item::LAPIS_BLOCK, 0, 1], [Item::LAPIS_BLOCK, 0, 1],
]; ];

View File

@ -45,7 +45,7 @@ class LapisOre extends Solid{
} }
public function getDrops(Item $item){ public function getDrops(Item $item){
if($item->isPickaxe() >= 3){ if($item->isPickaxe() >= Tool::TIER_STONE){
return [ return [
[Item::DYE, 4, mt_rand(4, 8)], [Item::DYE, 4, mt_rand(4, 8)],
]; ];

View File

@ -45,7 +45,7 @@ class MossStone extends Solid{
} }
public function getDrops(Item $item){ public function getDrops(Item $item){
if($item->isPickaxe() >= 1){ if($item->isPickaxe() >= Tool::TIER_WOODEN){
return [ return [
[Item::MOSS_STONE, $this->meta, 1], [Item::MOSS_STONE, $this->meta, 1],
]; ];

View File

@ -45,7 +45,7 @@ class NetherBrick extends Solid{
} }
public function getDrops(Item $item){ public function getDrops(Item $item){
if($item->isPickaxe() >= 1){ if($item->isPickaxe() >= Tool::TIER_WOODEN){
return [ return [
[Item::NETHER_BRICKS, 0, 1], [Item::NETHER_BRICKS, 0, 1],
]; ];

View File

@ -47,7 +47,6 @@ class NetherBrickFence extends Transparent {
} }
public function getToolType(){ public function getToolType(){
//Different then the woodfences
return Tool::TYPE_PICKAXE; return Tool::TYPE_PICKAXE;
} }
@ -61,9 +60,9 @@ class NetherBrickFence extends Transparent {
} }
public function getDrops(Item $item){ public function getDrops(Item $item){
if($item->isPickaxe() >= Tool::TYPE_WOODEN){ if($item->isPickaxe() >= Tool::TIER_WOODEN){
return [ return [
[Item::NETHER_BRICK_FENCE, $this->meta, 1], [$this->id, $this->meta, 1],
]; ];
}else{ }else{
return []; return [];

View File

@ -45,7 +45,7 @@ class Netherrack extends Solid{
} }
public function getDrops(Item $item){ public function getDrops(Item $item){
if($item->isPickaxe() >= 1){ if($item->isPickaxe() >= Tool::TIER_WOODEN){
return [ return [
[Item::NETHERRACK, 0, 1], [Item::NETHERRACK, 0, 1],
]; ];

View File

@ -45,7 +45,7 @@ class Obsidian extends Solid{
} }
public function getDrops(Item $item){ public function getDrops(Item $item){
if($item->isPickaxe() >= 5){ if($item->isPickaxe() >= Tool::TIER_DIAMOND){
return [ return [
[Item::OBSIDIAN, 0, 1], [Item::OBSIDIAN, 0, 1],
]; ];

View File

@ -56,7 +56,7 @@ class Quartz extends Solid{
} }
public function getDrops(Item $item){ public function getDrops(Item $item){
if($item->isPickaxe() >= 1){ if($item->isPickaxe() >= Tool::TIER_WOODEN){
return [ return [
[Item::QUARTZ_BLOCK, $this->meta & 0x03, 1], [Item::QUARTZ_BLOCK, $this->meta & 0x03, 1],
]; ];

View File

@ -45,7 +45,7 @@ class Redstone extends Solid{
} }
public function getDrops(Item $item){ public function getDrops(Item $item){
if($item->isPickaxe() >= 1){ if($item->isPickaxe() >= Tool::TIER_WOODEN){
return [ return [
[Item::REDSTONE_BLOCK, 0, 1], [Item::REDSTONE_BLOCK, 0, 1],
]; ];

View File

@ -58,7 +58,7 @@ class RedstoneOre extends Solid{
} }
public function getDrops(Item $item){ public function getDrops(Item $item){
if($item->isPickaxe() >= 2){ if($item->isPickaxe() >= Tool::TIER_GOLD){
return [ return [
[Item::REDSTONE_DUST, 0, mt_rand(4, 5)], [Item::REDSTONE_DUST, 0, mt_rand(4, 5)],
]; ];

View File

@ -55,7 +55,7 @@ class Sandstone extends Solid{
} }
public function getDrops(Item $item){ public function getDrops(Item $item){
if($item->isPickaxe() >= 1){ if($item->isPickaxe() >= Tool::TIER_WOODEN){
return [ return [
[Item::SANDSTONE, $this->meta & 0x03, 1], [Item::SANDSTONE, $this->meta & 0x03, 1],
]; ];

View File

@ -133,7 +133,7 @@ class Slab extends Transparent{
} }
public function getDrops(Item $item){ public function getDrops(Item $item){
if($item->isPickaxe() >= 1){ if($item->isPickaxe() >= Tool::TIER_WOODEN){
return [ return [
[$this->id, $this->meta & 0x07, 1], [$this->id, $this->meta & 0x07, 1],
]; ];

View File

@ -143,7 +143,7 @@ abstract class Stair extends Transparent{
} }
public function getDrops(Item $item){ public function getDrops(Item $item){
if($item->isPickaxe() >= 1){ if($item->isPickaxe() >= Tool::TIER_WOODEN){
return [ return [
[$this->getId(), 0, 1], [$this->getId(), 0, 1],
]; ];

View File

@ -37,7 +37,6 @@ class Stone extends Solid{
public function __construct($meta = 0){ public function __construct($meta = 0){
$this->meta = $meta; $this->meta = $meta;
} }
public function getHardness(){ public function getHardness(){

View File

@ -55,7 +55,7 @@ class StoneBricks extends Solid{
} }
public function getDrops(Item $item){ public function getDrops(Item $item){
if($item->isPickaxe() >= 1){ if($item->isPickaxe() >= Tool::TIER_WOODEN){
return [ return [
[Item::STONE_BRICKS, $this->meta & 0x03, 1], [Item::STONE_BRICKS, $this->meta & 0x03, 1],
]; ];

View File

@ -55,7 +55,7 @@ class Stonecutter extends Solid{
} }
public function getDrops(Item $item){ public function getDrops(Item $item){
if($item->isPickaxe() >= 1){ if($item->isPickaxe() >= Tool::TIER_WOODEN){
return [ return [
[Item::STONECUTTER, 0, 1], [Item::STONECUTTER, 0, 1],
]; ];