mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-09 11:31:49 +00:00
Updated for Minecraft: PE 0.7.2
This commit is contained in:
parent
03b4e40bf4
commit
1727e18e31
@ -454,7 +454,8 @@ class Player{
|
|||||||
case "player.armor":
|
case "player.armor":
|
||||||
if($data["player"]->level === $this->level){
|
if($data["player"]->level === $this->level){
|
||||||
if($data["eid"] === $this->eid){
|
if($data["eid"] === $this->eid){
|
||||||
$data["eid"] = 0;
|
$this->sendArmor($this);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
$this->dataPacket(MC_PLAYER_ARMOR_EQUIPMENT, $data);
|
$this->dataPacket(MC_PLAYER_ARMOR_EQUIPMENT, $data);
|
||||||
}
|
}
|
||||||
@ -1709,7 +1710,15 @@ class Player{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if($player instanceof 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{
|
}else{
|
||||||
$this->server->api->dhandle("player.armor", $data);
|
$this->server->api->dhandle("player.armor", $data);
|
||||||
}
|
}
|
||||||
|
@ -476,6 +476,7 @@ class PocketMinecraftServer{
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
switch($packet["pid"]){
|
switch($packet["pid"]){
|
||||||
|
case 0x01:
|
||||||
case 0x02:
|
case 0x02:
|
||||||
if($this->invisible === true){
|
if($this->invisible === true){
|
||||||
$this->send(0x1c, array(
|
$this->send(0x1c, array(
|
||||||
|
@ -65,8 +65,8 @@ set_include_path(get_include_path() . PATH_SEPARATOR . FILE_PATH);
|
|||||||
ini_set("memory_limit", "128M"); //Default
|
ini_set("memory_limit", "128M"); //Default
|
||||||
define("LOG", true);
|
define("LOG", true);
|
||||||
define("START_TIME", microtime(true));
|
define("START_TIME", microtime(true));
|
||||||
define("MAJOR_VERSION", "Alpha_1.3.3dev");
|
define("MAJOR_VERSION", "Alpha_1.3.3");
|
||||||
define("CURRENT_MINECRAFT_VERSION", "0.7.1 alpha");
|
define("CURRENT_MINECRAFT_VERSION", "0.7.3 alpha");
|
||||||
define("CURRENT_API_VERSION", 9);
|
define("CURRENT_API_VERSION", 9);
|
||||||
define("CURRENT_PHP_VERSION", "5.5");
|
define("CURRENT_PHP_VERSION", "5.5");
|
||||||
$gitsha1 = false;
|
$gitsha1 = false;
|
||||||
|
@ -69,7 +69,7 @@ class BurningFurnaceBlock extends SolidBlock{
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
$player->windowCnt++;
|
$player->windowCnt++;
|
||||||
$player->windowCnt = $id = max(2, $player->windowCnt % 255);
|
$player->windowCnt = $id = max(2, $player->windowCnt % 16);
|
||||||
$player->windows[$id] = $furnace;
|
$player->windows[$id] = $furnace;
|
||||||
$player->dataPacket(MC_CONTAINER_OPEN, array(
|
$player->dataPacket(MC_CONTAINER_OPEN, array(
|
||||||
"windowid" => $id,
|
"windowid" => $id,
|
||||||
|
@ -87,7 +87,7 @@ class ChestBlock extends TransparentBlock{
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
$player->windowCnt++;
|
$player->windowCnt++;
|
||||||
$player->windowCnt = $id = max(2, $player->windowCnt % 255);
|
$player->windowCnt = $id = max(2, $player->windowCnt % 16);
|
||||||
$player->windows[$id] = $chest;
|
$player->windows[$id] = $chest;
|
||||||
$player->dataPacket(MC_CONTAINER_OPEN, array(
|
$player->dataPacket(MC_CONTAINER_OPEN, array(
|
||||||
"windowid" => $id,
|
"windowid" => $id,
|
||||||
|
@ -171,6 +171,7 @@ class Protocol{
|
|||||||
);
|
);
|
||||||
|
|
||||||
public static $packetName = array(
|
public static $packetName = array(
|
||||||
|
0x01 => "ID_CONNECTED_PING_OPEN_CONNECTIONS", //RakNet
|
||||||
0x02 => "ID_UNCONNECTED_PING_OPEN_CONNECTIONS", //RakNet
|
0x02 => "ID_UNCONNECTED_PING_OPEN_CONNECTIONS", //RakNet
|
||||||
0x05 => "ID_OPEN_CONNECTION_REQUEST_1", //RakNet
|
0x05 => "ID_OPEN_CONNECTION_REQUEST_1", //RakNet
|
||||||
0x06 => "ID_OPEN_CONNECTION_REPLY_1", //RakNet
|
0x06 => "ID_OPEN_CONNECTION_REPLY_1", //RakNet
|
||||||
@ -188,6 +189,10 @@ class Protocol{
|
|||||||
);
|
);
|
||||||
|
|
||||||
public static $raknet = array(
|
public static $raknet = array(
|
||||||
|
0x01 => array(
|
||||||
|
"long", //Ping ID
|
||||||
|
"magic",
|
||||||
|
),
|
||||||
0x02 => array(
|
0x02 => array(
|
||||||
"long", //Ping ID
|
"long", //Ping ID
|
||||||
"magic",
|
"magic",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user