mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Fix 805
This commit is contained in:
parent
58fce0e939
commit
386b2cb0ef
1 changed files with 12 additions and 0 deletions
|
|
@ -42,6 +42,18 @@ class LadderBlock extends TransparentBlock{
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public function onUpdate($type){
|
||||
if($type === BLOCK_UPDATE_NORMAL){
|
||||
if($this->getSide(0)->getID() === AIR){ //Replace with common break method
|
||||
ServerAPI::request()->api->entity->drop($this, BlockAPI::getItem(LADDER, 0, 1));
|
||||
$this->level->setBlock($this, new AirBlock(), true, true, true);
|
||||
return BLOCK_UPDATE_NORMAL;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getDrops(Item $item, Player $player){
|
||||
return array(
|
||||
array($this->id, 0, 1),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue