diff --git a/src/PocketMinecraftServer.php b/src/PocketMinecraftServer.php index 4683c4c8..8374b37a 100644 --- a/src/PocketMinecraftServer.php +++ b/src/PocketMinecraftServer.php @@ -71,8 +71,8 @@ class PocketMinecraftServer{ $this->extraprops = new Config(DATA_PATH . "extra.properties", CONFIG_PROPERTIES, [ "version" => "5", "experemental-mob-features" => true, - "enable-mob-ai" => false, - "enable-nether-reactor" => true, + "enable-mob-ai" => false, + "enable-nether-reactor" => true, "enable-explosions" => true, "enable-rail-connection" => false, "save-player-data" => true, diff --git a/src/entity/Creature.php b/src/entity/Creature.php index 6c45076a..822229ce 100644 --- a/src/entity/Creature.php +++ b/src/entity/Creature.php @@ -12,10 +12,10 @@ abstract class Creature extends Living{ $this->inPanic = false; //force for now parent::__construct($level, $eid, $class, $type, $data); $this->setHealth(isset($this->data["Health"]) ? $this->data["Health"] : 1, "generic"); - // $this->setName((isset($mobs[$this->type]) ? $mobs[$this->type]:$this->type)); - $this->ai->addTask(new TaskLookAround()); - $this->ai->addTask(new TaskRandomWalk()); - $this->ai->addTask(new TaskLookAtPlayer()); + // $this->setName((isset($mobs[$this->type]) ? $mobs[$this->type]:$this->type)); + $this->ai->addTask(new TaskLookAround()); + $this->ai->addTask(new TaskRandomWalk()); + $this->ai->addTask(new TaskLookAtPlayer()); } diff --git a/src/entity/registry/EntityList.php b/src/entity/registry/EntityList.php index 3d7caa05..615c5820 100644 --- a/src/entity/registry/EntityList.php +++ b/src/entity/registry/EntityList.php @@ -1,14 +1,14 @@ entities; - } - public function addEntity(PropertyEntity $property){ - $this->entities[$property->getEntityType()] = $property; - } - public function getEntityFromTypeAndClass($type, $class){ - return isset($this->entities[$type]) && $this->entities[$type]->getEntityClass() === $class ? $this->entities[$type] : 0; - } - private $entities = []; + public function getEntities(){ + return $this->entities; + } + public function addEntity(PropertyEntity $property){ + $this->entities[$property->getEntityType()] = $property; + } + public function getEntityFromTypeAndClass($type, $class){ + return isset($this->entities[$type]) && $this->entities[$type]->getEntityClass() === $class ? $this->entities[$type] : 0; + } + private $entities = []; } diff --git a/src/entity/registry/PropertyEntity.php b/src/entity/registry/PropertyEntity.php index 530b8080..d2cf972b 100644 --- a/src/entity/registry/PropertyEntity.php +++ b/src/entity/registry/PropertyEntity.php @@ -1,21 +1,21 @@ class = $class; - $this->type = $type; - $this->name = $name; - } - - public function getEntityClass(){ - return $this->class; - } - public function getEntityType(){ - return $this->type; - } - public function getEntityName(){ - return $this->name; - } + private $class,$type,$name; + + function __construct($class, $type, $name){ + $this->class = $class; + $this->type = $type; + $this->name = $name; + } + + public function getEntityClass(){ + return $this->class; + } + public function getEntityType(){ + return $this->type; + } + public function getEntityName(){ + return $this->name; + } } \ No newline at end of file diff --git a/src/material/block/misc/NetherReactorBlock.php b/src/material/block/misc/NetherReactorBlock.php index cb534907..ce79a033 100644 --- a/src/material/block/misc/NetherReactorBlock.php +++ b/src/material/block/misc/NetherReactorBlock.php @@ -188,7 +188,7 @@ class NetherReactorBlock extends SolidBlock{ foreach($this->core as $yOffset => $layer){ foreach($layer as $line){ foreach(str_split($line) as $char){ - $b = $this->level->getBlockWithoutVector(new Vector3($x + $offsetX, $y + $yOffset, $z + $offsetZ)); + $b = $this->level->getBlockWithoutVector(new Vector3($x + $offsetX, $y + $yOffset, $z + $offsetZ)); switch($char){ case "G": if($b === GOLD_BLOCK){ //TODO make it use structure class @@ -196,17 +196,17 @@ class NetherReactorBlock extends SolidBlock{ } return false; case "C": - if($b === COBBLESTONE){ + if($b === COBBLESTONE){ break; } return false; case "R": - if($b === NETHER_REACTOR){ + if($b === NETHER_REACTOR){ break; } return false; case " ": - if($b->getID() === 0){ + if($b->getID() === 0){ break; } return false; diff --git a/src/network/raknet/RakNetDataPacket.php b/src/network/raknet/RakNetDataPacket.php index 48acd734..b9d842b3 100755 --- a/src/network/raknet/RakNetDataPacket.php +++ b/src/network/raknet/RakNetDataPacket.php @@ -20,9 +20,9 @@ abstract class RakNetDataPacket extends stdClass{ public function getBuffer(){ return $this->buffer; } - + public function getOffset(){ - return $this->offset; + return $this->offset; } public function setBuffer($buffer = ""){ diff --git a/src/plugin/DummyPlugin.php b/src/plugin/DummyPlugin.php index da2cfbef..34d8abcc 100644 --- a/src/plugin/DummyPlugin.php +++ b/src/plugin/DummyPlugin.php @@ -1,13 +1,13 @@ > 32; }else{ diff --git a/src/world/generator/SuperflatGenerator.php b/src/world/generator/SuperflatGenerator.php index 8a317c43..587b90a8 100644 --- a/src/world/generator/SuperflatGenerator.php +++ b/src/world/generator/SuperflatGenerator.php @@ -35,7 +35,7 @@ class SuperflatGenerator implements LevelGenerator{ $this->populators[] = new MineshaftPopulator(isset($this->options["mineshaft"]["chance"]) ? floatval($this->options["mineshaft"]["chance"]) : 0.01); }*/ } - + public function parsePreset($preset){ $this->preset = $preset; $preset = explode(";", $preset);