mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
Correct Ice drop
This commit is contained in:
parent
47b54cfd28
commit
228075851c
3 changed files with 20 additions and 14 deletions
|
|
@ -60,20 +60,19 @@ class DoorBlock extends TransparentBlock{
|
|||
}
|
||||
|
||||
public function onBreak(Item $item, Player $player){
|
||||
if(($this->meta & 0x08) === 0x08){
|
||||
$down = $this->getSide(0);
|
||||
if($down->getID() === $this->id){
|
||||
$this->level->setBlock($down, new AirBlock());
|
||||
}
|
||||
}else{
|
||||
$up = $this->getSide(1);
|
||||
if($up->getID() === $this->id){
|
||||
$this->level->setBlock($up, new AirBlock());
|
||||
}
|
||||
if(($this->meta & 0x08) === 0x08){
|
||||
$down = $this->getSide(0);
|
||||
if($down->getID() === $this->id){
|
||||
$this->level->setBlock($down, new AirBlock());
|
||||
}
|
||||
$this->level->setBlock($this, new AirBlock());
|
||||
return true;
|
||||
return false;
|
||||
}else{
|
||||
$up = $this->getSide(1);
|
||||
if($up->getID() === $this->id){
|
||||
$this->level->setBlock($up, new AirBlock());
|
||||
}
|
||||
}
|
||||
$this->level->setBlock($this, new AirBlock());
|
||||
return true;
|
||||
}
|
||||
|
||||
public function onActivate(Item $item, Player $player){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue