Blocks now save their bounding box, fixed entity block collision check

This commit is contained in:
Shoghi Cervantes
2014-10-29 15:43:23 +01:00
parent 6f64af3066
commit 289bc56b4b
26 changed files with 64 additions and 30 deletions

View File

@ -517,10 +517,6 @@ class Level implements ChunkManager, Metadatable{
$this->tickChunks();
$this->timings->doTickTiles->stopTiming();
if(($currentTick % 200) === 0){
$this->blockCache = [];
}
if(count($this->changedCount) > 0){
if(count($this->players) > 0){
foreach($this->changedCount as $index => $mini){
@ -571,6 +567,10 @@ class Level implements ChunkManager, Metadatable{
$this->timings->doTick->stopTiming();
}
public function clearCache(){
$this->blockCache = [];
}
private function tickChunks(){
if($this->chunksPerTick <= 0 or count($this->players) === 0){
return;