tweaked drop

This commit is contained in:
GameHerobrine 2023-10-25 17:41:22 +03:00
parent 46ec8a5068
commit ef4b991374
6 changed files with 23 additions and 21 deletions

View file

@ -9,14 +9,14 @@ class CobwebBlock extends FlowableBlock{
} }
public function getDrops(Item $item, Player $player){ public function getDrops(Item $item, Player $player){
if ($item->isSword()){ if ($item->isSword()){
return array( return [
array(287, 0, 1), [STRING, 0, 1],
); ];
} }
elseif ($item->isShears()){ elseif ($item->isShears()){
return array( return [
array(COBWEB, 0, 1), array(COBWEB, 0, 1),
); ];
} }
} }
} }

View file

@ -34,5 +34,7 @@ class SnowLayerBlock extends FlowableBlock{
array(SNOWBALL, 0, 1), array(SNOWBALL, 0, 1),
); );
} }
return array();
} }
} }

View file

@ -28,9 +28,11 @@ class DeadBushBlock extends FlowableBlock{
public function getDrops(Item $item, Player $player){ public function getDrops(Item $item, Player $player){
if($item->isShears()){ if($item->isShears()){
return array( return [
array(DEAD_BUSH, 0, 1), [DEAD_BUSH, 0, 1],
); ];
} }
return [];
} }
} }

View file

@ -7,14 +7,9 @@ class GravelBlock extends FallableBlock{
} }
public function getDrops(Item $item, Player $player){ public function getDrops(Item $item, Player $player){
if(mt_rand(1,10) === 1){ return [
return array( [mt_rand(1,10) ? FLINT : GRAVEL, 0, 1],
array(FLINT, 0, 1), ];
);
}
return array(
array(GRAVEL, 0, 1),
);
} }
} }

View file

@ -30,7 +30,9 @@ class LitPumpkinBlock extends SolidBlock implements LightingBlock{
} }
public function getDrops(Item $item, Player $player){ public function getDrops(Item $item, Player $player){
return [[JACK_O_LANTERN, 0]]; return [
[JACK_O_LANTERN, 0]
];
} }

View file

@ -8,10 +8,11 @@ class SnowBlock extends SolidBlock{
public function getDrops(Item $item, Player $player){ public function getDrops(Item $item, Player $player){
if($item->isShovel() !== false){ if($item->isShovel() !== false){
return array( return [
array(SNOWBALL, 0, 4), [SNOWBALL, 0, 4],
); ];
} }
return [];
} }
} }