mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
onUpdate is now static, disabled rail, water and lava updates to rework.
This commit is contained in:
parent
3c37dc446e
commit
ee989ef556
38 changed files with 329 additions and 367 deletions
|
|
@ -64,12 +64,11 @@ class LeavesBlock extends TransparentBlock{
|
|||
}
|
||||
}
|
||||
}
|
||||
public function onUpdate($type){
|
||||
if($type === BLOCK_UPDATE_NORMAL){
|
||||
if(($this->meta & 0b00001100) === 0){
|
||||
$this->meta |= 0x08;
|
||||
$this->level->fastSetBlockUpdate($this->x, $this->y, $this->z, $this->id, $this->meta);
|
||||
}
|
||||
public static function onUpdate(Level $level, $x, $y, $z, $type){
|
||||
[$id, $meta] = $level->level->getBlock($x, $y, $z);
|
||||
if(($meta & 0b00001100) === 0){
|
||||
$meta |= 0x08;
|
||||
$level->fastSetBlockUpdate($x, $y, $z, $id, $meta); //TODO maybe use $level->level->setBlock directly, the client doesnt need to know thism info.
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue