Updated for Minecraft: PE 0.7.2

This commit is contained in:
Shoghi Cervantes 2013-07-04 20:24:13 +02:00
parent 03b4e40bf4
commit 1727e18e31
6 changed files with 21 additions and 6 deletions

View File

@ -454,7 +454,8 @@ class Player{
case "player.armor":
if($data["player"]->level === $this->level){
if($data["eid"] === $this->eid){
$data["eid"] = 0;
$this->sendArmor($this);
break;
}
$this->dataPacket(MC_PLAYER_ARMOR_EQUIPMENT, $data);
}
@ -1709,7 +1710,15 @@ class Player{
}
}
if($player instanceof Player){
$player->dataPacket(MC_PLAYER_ARMOR_EQUIPMENT, $data);
if($player === $this){
$this->dataPacket(MC_CONTAINER_SET_CONTENT, array(
"windowid" => 0x78,
"count" => 4,
"slots" => $this->armor,
));
}else{
$player->dataPacket(MC_PLAYER_ARMOR_EQUIPMENT, $data);
}
}else{
$this->server->api->dhandle("player.armor", $data);
}

View File

@ -476,6 +476,7 @@ class PocketMinecraftServer{
return;
}
switch($packet["pid"]){
case 0x01:
case 0x02:
if($this->invisible === true){
$this->send(0x1c, array(

View File

@ -65,8 +65,8 @@ set_include_path(get_include_path() . PATH_SEPARATOR . FILE_PATH);
ini_set("memory_limit", "128M"); //Default
define("LOG", true);
define("START_TIME", microtime(true));
define("MAJOR_VERSION", "Alpha_1.3.3dev");
define("CURRENT_MINECRAFT_VERSION", "0.7.1 alpha");
define("MAJOR_VERSION", "Alpha_1.3.3");
define("CURRENT_MINECRAFT_VERSION", "0.7.3 alpha");
define("CURRENT_API_VERSION", 9);
define("CURRENT_PHP_VERSION", "5.5");
$gitsha1 = false;

View File

@ -69,7 +69,7 @@ class BurningFurnaceBlock extends SolidBlock{
return true;
}
$player->windowCnt++;
$player->windowCnt = $id = max(2, $player->windowCnt % 255);
$player->windowCnt = $id = max(2, $player->windowCnt % 16);
$player->windows[$id] = $furnace;
$player->dataPacket(MC_CONTAINER_OPEN, array(
"windowid" => $id,

View File

@ -87,7 +87,7 @@ class ChestBlock extends TransparentBlock{
return true;
}
$player->windowCnt++;
$player->windowCnt = $id = max(2, $player->windowCnt % 255);
$player->windowCnt = $id = max(2, $player->windowCnt % 16);
$player->windows[$id] = $chest;
$player->dataPacket(MC_CONTAINER_OPEN, array(
"windowid" => $id,

View File

@ -171,6 +171,7 @@ class Protocol{
);
public static $packetName = array(
0x01 => "ID_CONNECTED_PING_OPEN_CONNECTIONS", //RakNet
0x02 => "ID_UNCONNECTED_PING_OPEN_CONNECTIONS", //RakNet
0x05 => "ID_OPEN_CONNECTION_REQUEST_1", //RakNet
0x06 => "ID_OPEN_CONNECTION_REPLY_1", //RakNet
@ -188,6 +189,10 @@ class Protocol{
);
public static $raknet = array(
0x01 => array(
"long", //Ping ID
"magic",
),
0x02 => array(
"long", //Ping ID
"magic",