isPickaxe replaced with getPickaxeLevel, reactor drops correct block now

This commit is contained in:
GameHerobrine 2022-09-06 18:33:08 +03:00
parent 81d46e71aa
commit df0db01425
38 changed files with 73 additions and 60 deletions

View file

@ -10,7 +10,7 @@ class BricksBlock extends SolidBlock{
if(($player->gamemode & 0x01) === 0x01){
return 0.20;
}
switch($item->isPickaxe()){
switch($item->getPickaxeLevel()){
case 5:
return 0.4;
case 4:
@ -27,7 +27,7 @@ class BricksBlock extends SolidBlock{
}
public function getDrops(Item $item, Player $player){
if($item->isPickaxe() >= 1){
if($item->getPickaxeLevel() >= 1){
return array(
array(BRICKS_BLOCK, 0, 1),
);

View file

@ -55,7 +55,7 @@ class BurningFurnaceBlock extends SolidBlock implements LightingBlock{
if(($player->gamemode & 0x01) === 0x01){
return 0.20;
}
switch($item->isPickaxe()){
switch($item->getPickaxeLevel()){
case 5:
return 0.7;
case 4:
@ -73,7 +73,7 @@ class BurningFurnaceBlock extends SolidBlock implements LightingBlock{
public function getDrops(Item $item, Player $player){
$drops = array();
if($item->isPickaxe() >= 1){
if($item->getPickaxeLevel() >= 1){
$drops[] = array(FURNACE, 0, 1);
}
$t = ServerAPI::request()->api->tile->get($this);

View file

@ -10,7 +10,7 @@ class CoalBlock extends SolidBlock{
if(($player->gamemode & 0x01) === 0x01){
return 0.20;
}
switch($item->isPickaxe()){
switch($item->getPickaxeLevel()){
case 5:
return 0.95;
case 4:
@ -27,7 +27,7 @@ class CoalBlock extends SolidBlock{
}
public function getDrops(Item $item, Player $player){
if($item->isPickaxe() >= 1){
if($item->getPickaxeLevel() >= 1){
return array(
array(COAL_BLOCK, 0, 1),
);

View file

@ -10,7 +10,7 @@ class CobblestoneBlock extends SolidBlock{
if(($player->gamemode & 0x01) === 0x01){
return 0.20;
}
switch($item->isPickaxe()){
switch($item->getPickaxeLevel()){
case 5:
return 0.4;
case 4:
@ -27,7 +27,7 @@ class CobblestoneBlock extends SolidBlock{
}
public function getDrops(Item $item, Player $player){
if($item->isPickaxe() >= 1){
if($item->getPickaxeLevel() >= 1){
return array(
array(COBBLESTONE, 0, 1),
);

View file

@ -10,7 +10,7 @@ class DiamondBlock extends SolidBlock{
if(($player->gamemode & 0x01) === 0x01){
return 0.20;
}
switch($item->isPickaxe()){
switch($item->getPickaxeLevel()){
case 5:
return 0.95;
case 4:
@ -21,7 +21,7 @@ class DiamondBlock extends SolidBlock{
}
public function getDrops(Item $item, Player $player){
if($item->isPickaxe() >= 4){
if($item->getPickaxeLevel() >= 4){
return array(
array(DIAMOND_BLOCK, 0, 1),
);

View file

@ -21,7 +21,7 @@ class DoubleSlabBlock extends SolidBlock{
if(($player->gamemode & 0x01) === 0x01){
return 0.20;
}
switch($item->isPickaxe()){
switch($item->getPickaxeLevel()){
case 5:
return 0.4;
case 4:
@ -38,7 +38,7 @@ class DoubleSlabBlock extends SolidBlock{
}
public function getDrops(Item $item, Player $player){
if($item->isPickaxe() >= 1){
if($item->getPickaxeLevel() >= 1){
return array(
array(SLAB, $this->meta & 0x07, 2),
);

View file

@ -10,7 +10,7 @@ class GoldBlock extends SolidBlock{
if(($player->gamemode & 0x01) === 0x01){
return 0.20;
}
switch($item->isPickaxe()){
switch($item->getPickaxeLevel()){
case 5:
return 0.6;
case 4:
@ -21,7 +21,7 @@ class GoldBlock extends SolidBlock{
}
public function getDrops(Item $item, Player $player){
if($item->isPickaxe() >= 4){
if($item->getPickaxeLevel() >= 4){
return array(
array(GOLD_BLOCK, 0, 1),
);

View file

@ -54,7 +54,7 @@ class IceBlock extends TransparentBlock{
if(($player->gamemode & 0x01) === 0x01){
return 0.20;
}
switch($item->isPickaxe()){
switch($item->getPickaxeLevel()){
case 5:
return 0.1;
case 4:

View file

@ -10,7 +10,7 @@ class IronBlock extends SolidBlock{
if(($player->gamemode & 0x01) === 0x01){
return 0.20;
}
switch($item->isPickaxe()){
switch($item->getPickaxeLevel()){
case 5:
return 0.95;
case 4:
@ -23,7 +23,7 @@ class IronBlock extends SolidBlock{
}
public function getDrops(Item $item, Player $player){
if($item->isPickaxe() >= 3){
if($item->getPickaxeLevel() >= 3){
return array(
array(IRON_BLOCK, 0, 1),
);

View file

@ -10,7 +10,7 @@ class LapisBlock extends SolidBlock{
if(($player->gamemode & 0x01) === 0x01){
return 0.20;
}
switch($item->isPickaxe()){
switch($item->getPickaxeLevel()){
case 5:
return 0.6;
case 4:
@ -23,7 +23,7 @@ class LapisBlock extends SolidBlock{
}
public function getDrops(Item $item, Player $player){
if($item->isPickaxe() >= 3){
if($item->getPickaxeLevel() >= 3){
return array(
array(LAPIS_BLOCK, 0, 1),
);

View file

@ -10,7 +10,7 @@ class MossStoneBlock extends SolidBlock{
if(($player->gamemode & 0x01) === 0x01){
return 0.20;
}
switch($item->isPickaxe()){
switch($item->getPickaxeLevel()){
case 5:
return 0.4;
case 4:
@ -27,7 +27,7 @@ class MossStoneBlock extends SolidBlock{
}
public function getDrops(Item $item, Player $player){
if($item->isPickaxe() >= 1){
if($item->getPickaxeLevel() >= 1){
return array(
array(MOSS_STONE, 0, 1),
);

View file

@ -10,7 +10,7 @@ class NetherBricksBlock extends SolidBlock{
if(($player->gamemode & 0x01) === 0x01){
return 0.20;
}
switch($item->isPickaxe()){
switch($item->getPickaxeLevel()){
case 5:
return 0.4;
case 4:
@ -27,7 +27,7 @@ class NetherBricksBlock extends SolidBlock{
}
public function getDrops(Item $item, Player $player){
if($item->isPickaxe() >= 1){
if($item->getPickaxeLevel() >= 1){
return array(
array(NETHER_BRICKS, 0, 1),
);

View file

@ -10,7 +10,7 @@ class NetherrackBlock extends SolidBlock{
if(($player->gamemode & 0x01) === 0x01){
return 0.20;
}
switch($item->isPickaxe()){
switch($item->getPickaxeLevel()){
case 5:
return 0.1;
case 4:
@ -27,7 +27,7 @@ class NetherrackBlock extends SolidBlock{
}
public function getDrops(Item $item, Player $player){
if($item->isPickaxe() >= 1){
if($item->getPickaxeLevel() >= 1){
return array(
array(NETHERRACK, 0, 1),
);

View file

@ -10,7 +10,7 @@ class ObsidianBlock extends SolidBlock{
if(($player->gamemode & 0x01) === 0x01){
return 0.20;
}
if($item->isPickaxe() >= 5){
if($item->getPickaxeLevel() >= 5){
return 3.5;//from wiki
}else{
return 250;
@ -18,7 +18,7 @@ class ObsidianBlock extends SolidBlock{
}
public function getDrops(Item $item, Player $player){
if($item->isPickaxe() >= 5){
if($item->getPickaxeLevel() >= 5){
return array(
array(OBSIDIAN, 0, 1),
);

View file

@ -16,7 +16,7 @@ class QuartzBlock extends SolidBlock{
if(($player->gamemode & 0x01) === 0x01){
return 0.20;
}
switch($item->isPickaxe()){
switch($item->getPickaxeLevel()){
case 5:
return 0.15;
case 4:
@ -33,7 +33,7 @@ class QuartzBlock extends SolidBlock{
}
public function getDrops(Item $item, Player $player){
if($item->isPickaxe() >= 1){
if($item->getPickaxeLevel() >= 1){
return array(
array(QUARTZ_BLOCK, $this->meta & 0x03, 1),
);

View file

@ -16,7 +16,7 @@ class SandstoneBlock extends SolidBlock{
if(($player->gamemode & 0x01) === 0x01){
return 0.20;
}
switch($item->isPickaxe()){
switch($item->getPickaxeLevel()){
case 5:
return 0.15;
case 4:
@ -33,7 +33,7 @@ class SandstoneBlock extends SolidBlock{
}
public function getDrops(Item $item, Player $player){
if($item->isPickaxe() >= 1){
if($item->getPickaxeLevel() >= 1){
return array(
array(SANDSTONE, $this->meta & 0x03, 1),
);

View file

@ -10,7 +10,7 @@ class StoneBlock extends SolidBlock{
if(($player->gamemode & 0x01) === 0x01){
return 0.20;
}
switch($item->isPickaxe()){
switch($item->getPickaxeLevel()){
case 5:
return 0.4;
case 4:
@ -27,7 +27,7 @@ class StoneBlock extends SolidBlock{
}
public function getDrops(Item $item, Player $player){
if($item->isPickaxe() >= 1){
if($item->getPickaxeLevel() >= 1){
return array(
array(COBBLESTONE, 0, 1),
);

View file

@ -17,7 +17,7 @@ class StoneBricksBlock extends SolidBlock{
if(($player->gamemode & 0x01) === 0x01){
return 0.20;
}
switch($item->isPickaxe()){
switch($item->getPickaxeLevel()){
case 5:
return 0.4;
case 4:
@ -34,7 +34,7 @@ class StoneBricksBlock extends SolidBlock{
}
public function getDrops(Item $item, Player $player){
if($item->isPickaxe() >= 1){
if($item->getPickaxeLevel() >= 1){
return array(
array(STONE_BRICKS, $this->meta & 0x03, 1),
);