mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-05 09:39:56 +00:00
Updated for MCPE 0.9.0 build 7
This commit is contained in:
parent
38a958ed08
commit
22533458ed
@ -1186,12 +1186,19 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
|
|||||||
$pk->status = 0;
|
$pk->status = 0;
|
||||||
$this->directDataPacket($pk);
|
$this->directDataPacket($pk);
|
||||||
|
|
||||||
|
if(($level = $this->server->getLevelByName($this->namedtag["SpawnLevel"])) instanceof Level){
|
||||||
|
$this->spawnPosition = new Position($this->namedtag["SpawnX"], $this->namedtag["SpawnY"], $this->namedtag["SpawnZ"], $level);
|
||||||
|
}
|
||||||
|
|
||||||
$pk = new StartGamePacket;
|
$pk = new StartGamePacket;
|
||||||
$pk->seed = $this->getLevel()->getSeed();
|
$pk->seed = $this->getLevel()->getSeed();
|
||||||
$pk->x = $this->x;
|
$pk->x = $this->x;
|
||||||
$pk->y = $this->y;
|
$pk->y = $this->y;
|
||||||
$pk->z = $this->z;
|
$pk->z = $this->z;
|
||||||
$pk->generator = 2; //0 ??, 1 ??, 2 infinite
|
$pk->spawnX = (int) $this->spawnPosition->x;
|
||||||
|
$pk->spawnY = (int) $this->spawnPosition->y;
|
||||||
|
$pk->spawnZ = (int) $this->spawnPosition->z;
|
||||||
|
$pk->generator = 1; //0 old, 1 infinite, 2 flat
|
||||||
$pk->gamemode = $this->gamemode & 0x01;
|
$pk->gamemode = $this->gamemode & 0x01;
|
||||||
$pk->eid = 0; //Always use EntityID as zero for the actual player
|
$pk->eid = 0; //Always use EntityID as zero for the actual player
|
||||||
$this->directDataPacket($pk);
|
$this->directDataPacket($pk);
|
||||||
@ -1200,17 +1207,6 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
|
|||||||
$pk->time = $this->getLevel()->getTime();
|
$pk->time = $this->getLevel()->getTime();
|
||||||
$this->directDataPacket($pk);
|
$this->directDataPacket($pk);
|
||||||
|
|
||||||
|
|
||||||
if(($level = $this->server->getLevelByName($this->namedtag["SpawnLevel"])) instanceof Level){
|
|
||||||
$this->spawnPosition = new Position($this->namedtag["SpawnX"], $this->namedtag["SpawnY"], $this->namedtag["SpawnZ"], $level);
|
|
||||||
|
|
||||||
$pk = new SetSpawnPositionPacket;
|
|
||||||
$pk->x = (int) $this->spawnPosition->x;
|
|
||||||
$pk->y = (int) $this->spawnPosition->y;
|
|
||||||
$pk->z = (int) $this->spawnPosition->z;
|
|
||||||
$this->dataPacket($pk);
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->server->getLogger()->info(TextFormat::AQUA . $this->username . TextFormat::WHITE . "[/" . $this->ip . ":" . $this->port . "] logged in with entity id " . $this->id . " at (" . $this->getLevel()->getName() . ", " . round($this->x, 4) . ", " . round($this->y, 4) . ", " . round($this->z, 4) . ")");
|
$this->server->getLogger()->info(TextFormat::AQUA . $this->username . TextFormat::WHITE . "[/" . $this->ip . ":" . $this->port . "] logged in with entity id " . $this->id . " at (" . $this->getLevel()->getName() . ", " . round($this->x, 4) . ", " . round($this->y, 4) . ", " . round($this->z, 4) . ")");
|
||||||
|
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ namespace pocketmine {
|
|||||||
const VERSION = "Alpha_1.4dev";
|
const VERSION = "Alpha_1.4dev";
|
||||||
const API_VERSION = "1.0.0";
|
const API_VERSION = "1.0.0";
|
||||||
const CODENAME = "絶好(Zekkou)ケーキ(Cake)";
|
const CODENAME = "絶好(Zekkou)ケーキ(Cake)";
|
||||||
const MINECRAFT_VERSION = "v0.9.0 alpha build 6";
|
const MINECRAFT_VERSION = "v0.9.0 alpha build 7";
|
||||||
const PHP_VERSION = "5.5";
|
const PHP_VERSION = "5.5";
|
||||||
|
|
||||||
if(\Phar::running(true) !== ""){
|
if(\Phar::running(true) !== ""){
|
||||||
|
@ -30,7 +30,7 @@ interface Info{
|
|||||||
/**
|
/**
|
||||||
* Actual Minecraft: PE protocol version
|
* Actual Minecraft: PE protocol version
|
||||||
*/
|
*/
|
||||||
const CURRENT_PROTOCOL = 15;
|
const CURRENT_PROTOCOL = 16;
|
||||||
|
|
||||||
|
|
||||||
const LOGIN_PACKET = 0x82;
|
const LOGIN_PACKET = 0x82;
|
||||||
|
@ -27,6 +27,9 @@ class StartGamePacket extends DataPacket{
|
|||||||
public $generator;
|
public $generator;
|
||||||
public $gamemode;
|
public $gamemode;
|
||||||
public $eid;
|
public $eid;
|
||||||
|
public $spawnX;
|
||||||
|
public $spawnY;
|
||||||
|
public $spawnZ;
|
||||||
public $x;
|
public $x;
|
||||||
public $y;
|
public $y;
|
||||||
public $z;
|
public $z;
|
||||||
@ -45,6 +48,9 @@ class StartGamePacket extends DataPacket{
|
|||||||
$this->putInt($this->generator);
|
$this->putInt($this->generator);
|
||||||
$this->putInt($this->gamemode);
|
$this->putInt($this->gamemode);
|
||||||
$this->putInt($this->eid);
|
$this->putInt($this->eid);
|
||||||
|
$this->putInt($this->spawnX);
|
||||||
|
$this->putInt($this->spawnY);
|
||||||
|
$this->putInt($this->spawnZ);
|
||||||
$this->putFloat($this->x);
|
$this->putFloat($this->x);
|
||||||
$this->putFloat($this->y);
|
$this->putFloat($this->y);
|
||||||
$this->putFloat($this->z);
|
$this->putFloat($this->z);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user