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 CoalOreBlock extends SolidBlock{
if(($player->gamemode & 0x01) === 0x01){
return 0.20;
}
switch($item->isPickaxe()){
switch($item->getPickaxeLevel()){
case 5:
return 0.6;
case 4:
@ -27,7 +27,7 @@ class CoalOreBlock extends SolidBlock{
}
public function getDrops(Item $item, Player $player){
if($item->isPickaxe() >= 1){
if($item->getPickaxeLevel() >= 1){
return array(
array(COAL, 0, 1),
);

View file

@ -10,7 +10,7 @@ class DiamondOreBlock 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 DiamondOreBlock extends SolidBlock{
}
public function getDrops(Item $item, Player $player){
if($item->isPickaxe() >= 4){
if($item->getPickaxeLevel() >= 4){
return array(
array(DIAMOND, 0, 1),
);

View file

@ -23,7 +23,7 @@ class GlowingRedstoneOreBlock extends SolidBlock implements LightingBlock{
if(($player->gamemode & 0x01) === 0x01){
return 0.20;
}
switch($item->isPickaxe()){
switch($item->getPickaxeLevel()){
case 5:
return 0.6;
case 4:
@ -34,7 +34,7 @@ class GlowingRedstoneOreBlock extends SolidBlock implements LightingBlock{
}
public function getDrops(Item $item, Player $player){
if($item->isPickaxe() >= 4){
if($item->getPickaxeLevel() >= 4){
return array(
array(REDSTONE_DUST, 0, mt_rand(4, 5)),
);

View file

@ -10,7 +10,7 @@ class GoldOreBlock 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 GoldOreBlock extends SolidBlock{
}
public function getDrops(Item $item, Player $player){
if($item->isPickaxe() >= 4){
if($item->getPickaxeLevel() >= 4){
return array(
array(GOLD_ORE, 0, 1),
);

View file

@ -10,7 +10,7 @@ class IronOreBlock 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 IronOreBlock extends SolidBlock{
}
public function getDrops(Item $item, Player $player){
if($item->isPickaxe() >= 3){
if($item->getPickaxeLevel() >= 3){
return array(
array(IRON_ORE, 0, 1),
);

View file

@ -10,7 +10,7 @@ class LapisOreBlock 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 LapisOreBlock extends SolidBlock{
}
public function getDrops(Item $item, Player $player){
if($item->isPickaxe() >= 3){
if($item->getPickaxeLevel() >= 3){
return array(
array(DYE, 4, mt_rand(4, 8)),
);

View file

@ -16,7 +16,7 @@ class RedstoneOreBlock extends SolidBlock{
}
public function getDrops(Item $item, Player $player){
if($item->isPickaxe() >= 2){
if($item->getPickaxeLevel() >= 2){
return array(
array(REDSTONE_DUST, 0, mt_rand(4, 5)),
);