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){
if ($item->isSword()){
return array(
array(287, 0, 1),
);
return [
[STRING, 0, 1],
];
}
elseif ($item->isShears()){
return array(
array(COBWEB, 0, 1),
);
return [
array(COBWEB, 0, 1),
];
}
}
}

View file

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

View file

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

View file

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

View file

@ -30,7 +30,9 @@ class LitPumpkinBlock extends SolidBlock implements LightingBlock{
}
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){
if($item->isShovel() !== false){
return array(
array(SNOWBALL, 0, 4),
);
return [
[SNOWBALL, 0, 4],
];
}
return [];
}
}