mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
Correct drops for Snow and Cake
This commit is contained in:
parent
28f6a964d4
commit
ab3fcfc148
4 changed files with 30 additions and 2 deletions
|
|
@ -33,6 +33,10 @@ class CakeBlock extends TransparentBlock{
|
|||
$this->meta = $meta & 0x07;
|
||||
}
|
||||
|
||||
public function getDrops(Item $item, Player $player){
|
||||
return array();
|
||||
}
|
||||
|
||||
public function onActivate(Item $item, Player $player){
|
||||
if($player->entity->getHealth() < 20){
|
||||
++$this->meta;
|
||||
|
|
|
|||
|
|
@ -32,4 +32,11 @@ class SnowLayerBlock extends FlowableBlock{
|
|||
$this->isSolid = false;
|
||||
}
|
||||
|
||||
public function getDrops(Item $item, Player $player){
|
||||
if($item->isShovel() !== false){
|
||||
return array(
|
||||
array(SNOWBALL, 0, 1),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue