Update WoodDoor.php

This commit is contained in:
ArkQuark 2022-05-04 21:17:31 +03:00 • committed by GitHub
parent 5139245927
commit 230357a82c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,7 +27,7 @@ class WoodDoorBlock extends DoorBlock{
}
public function onUpdate($type){
if($type === BLOCK_UPDATE_NORMAL){
if($type === BLOCK_UPDATE_NORMAL and $meta == 0x8){
if($this->getSide(0)->getID() === AIR){ //Replace with common break method
ServerAPI::request()->api->entity->drop($this, BlockAPI::getItem($this->id, $this->meta, 1));
$this->level->setBlock($this, new AirBlock(), true, false, true);