New way to spawn entities/tiles using a global register table, allow overriding default entity/tile classes via classes

This commit is contained in:
Shoghi Cervantes
2014-10-28 13:09:27 +01:00
parent a5b85c549a
commit 34ae760def
18 changed files with 154 additions and 94 deletions

View File

@ -191,7 +191,7 @@ class Explosion{
if($block instanceof TNT){
$mot = (new Random())->nextSignedFloat() * M_PI * 2;
$tnt = new PrimedTNT($this->level->getChunk($block->x >> 4, $block->z >> 4), new Compound("", [
$tnt = Entity::createEntity("PrimedTNT", $this->level->getChunk($block->x >> 4, $block->z >> 4), new Compound("", [
"Pos" => new Enum("Pos", [
new Double("", $block->x + 0.5),
new Double("", $block->y),