mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
StaticBlock class, entities performance boost(i think)
This commit is contained in:
parent
5d79c23c6a
commit
9cb7fbafaa
11 changed files with 232 additions and 58 deletions
|
|
@ -7,7 +7,7 @@ class Skeleton extends Monster{
|
|||
$this->setHealth(isset($this->data["Health"]) ? $this->data["Health"] : 10, "generic");
|
||||
$this->setName("Skeleton");
|
||||
$this->ai->removeTask("TaskAttackPlayer");
|
||||
$this->ai->addTask(new TaskDestroyServerPerformance());
|
||||
//$this->ai->addTask(new TaskDestroyServerPerformance());
|
||||
$this->setSpeed(0.25);
|
||||
$this->update();
|
||||
}
|
||||
|
|
@ -22,12 +22,12 @@ class Skeleton extends Monster{
|
|||
}
|
||||
|
||||
for($y = $this->y; $y < 129; $y++){
|
||||
$block = $this->level->getBlockWithoutVector($this->x, $y, $this->z);
|
||||
if($block->isSolid){
|
||||
$block = $this->level->level->getBlockID($this->x, $y, $this->z);
|
||||
if(StaticBlock::getIsSolid($block)){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if($block->getID() === AIR){
|
||||
if($block === AIR){
|
||||
$this->fire = 160; //Value from 0.8.1
|
||||
$this->updateMetadata();
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue