mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 20:19:44 +00:00
Send broken bed block directly [no cache]
This commit is contained in:
parent
bee3e7d67a
commit
71dd3fe3af
1 changed files with 9 additions and 9 deletions
|
|
@ -71,26 +71,26 @@ class BedBlock extends TransparentBlock{
|
||||||
|
|
||||||
if(($this->meta & 0x08) === 0x08){ //This is the Top part of bed
|
if(($this->meta & 0x08) === 0x08){ //This is the Top part of bed
|
||||||
if($blockNorth->getID() === $this->id and $blockNorth->meta !== 0x08){ //Checks if the block ID and meta are right
|
if($blockNorth->getID() === $this->id and $blockNorth->meta !== 0x08){ //Checks if the block ID and meta are right
|
||||||
$this->level->setBlock($blockNorth, new AirBlock());
|
$this->level->setBlock($blockNorth, new AirBlock(), true, false, true);
|
||||||
}elseif($blockSouth->getID() === $this->id and $blockSouth->meta !== 0x08){
|
}elseif($blockSouth->getID() === $this->id and $blockSouth->meta !== 0x08){
|
||||||
$this->level->setBlock($blockSouth, new AirBlock());
|
$this->level->setBlock($blockSouth, new AirBlock(), true, false, true);
|
||||||
}elseif($blockEast->getID() === $this->id and $blockEast->meta !== 0x08){
|
}elseif($blockEast->getID() === $this->id and $blockEast->meta !== 0x08){
|
||||||
$this->level->setBlock($blockEast, new AirBlock());
|
$this->level->setBlock($blockEast, new AirBlock(), true, false, true);
|
||||||
}elseif($blockWest->getID() === $this->id and $blockWest->meta !== 0x08){
|
}elseif($blockWest->getID() === $this->id and $blockWest->meta !== 0x08){
|
||||||
$this->level->setBlock($blockWest, new AirBlock());
|
$this->level->setBlock($blockWest, new AirBlock(), true, false, true);
|
||||||
}
|
}
|
||||||
}else{ //Bottom Part of Bed
|
}else{ //Bottom Part of Bed
|
||||||
if($blockNorth->getID() === $this->id and ($blockNorth->meta & 0x08) === 0x08){
|
if($blockNorth->getID() === $this->id and ($blockNorth->meta & 0x08) === 0x08){
|
||||||
$this->level->setBlock($blockNorth, new AirBlock());
|
$this->level->setBlock($blockNorth, new AirBlock(), true, false, true);
|
||||||
}elseif($blockSouth->getID() === $this->id and ($blockSouth->meta & 0x08) === 0x08){
|
}elseif($blockSouth->getID() === $this->id and ($blockSouth->meta & 0x08) === 0x08){
|
||||||
$this->level->setBlock($blockSouth, new AirBlock());
|
$this->level->setBlock($blockSouth, new AirBlock(), true, false, true);
|
||||||
}elseif($blockEast->getID() === $this->id and ($blockEast->meta & 0x08) === 0x08){
|
}elseif($blockEast->getID() === $this->id and ($blockEast->meta & 0x08) === 0x08){
|
||||||
$this->level->setBlock($blockEast, new AirBlock());
|
$this->level->setBlock($blockEast, new AirBlock(), true, false, true);
|
||||||
}elseif($blockWest->getID() === $this->id and ($blockWest->meta & 0x08) === 0x08){
|
}elseif($blockWest->getID() === $this->id and ($blockWest->meta & 0x08) === 0x08){
|
||||||
$this->level->setBlock($blockWest, new AirBlock());
|
$this->level->setBlock($blockWest, new AirBlock(), true, false, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->level->setBlock($this, new AirBlock());
|
$this->level->setBlock($this, new AirBlock(), true, false, true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue