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

@ -11,7 +11,7 @@ class IronDoorBlock extends DoorBlock{
if(($player->gamemode & 0x01) === 0x01){
return 0.20;
}
switch($item->isPickaxe()){
switch($item->getPickaxeLevel()){
case 5:
return 0.95;
case 4:
@ -28,7 +28,7 @@ class IronDoorBlock extends DoorBlock{
}
public function getDrops(Item $item, Player $player){
if($item->isPickaxe() >= 1){
if($item->getPickaxeLevel() >= 1){
return array(
array(IRON_DOOR, 0, 1),
);

View file

@ -34,7 +34,7 @@ class RailBlock extends FlowableBlock{
}
private function checkRail($rail){//fixed
if(!($rail instanceof Rail)) return null;
if(!($rail instanceof RailBlock)) return null;
$damage = $rail->meta;
if ($damage < 0 || $damage > 10) return null;
$delta = array(

View file

@ -68,7 +68,7 @@ class SlabBlock extends TransparentBlock{
if(($player->gamemode & 0x01) === 0x01){
return 0.20;
}
switch($item->isPickaxe()){
switch($item->getPickaxeLevel()){
case 5:
return 0.4;
case 4:
@ -85,7 +85,7 @@ class SlabBlock extends TransparentBlock{
}
public function getDrops(Item $item, Player $player){
if($item->isPickaxe() >= 1){
if($item->getPickaxeLevel() >= 1){
return array(
array($this->id, $this->meta & 0x07, 1),
);