Merge remote-tracking branch 'origin/mcpe-0.12' into php7

This commit is contained in:
Shoghi Cervantes
2015-09-12 01:03:09 +02:00
7 changed files with 50 additions and 10 deletions

View File

@ -105,14 +105,22 @@ class BinaryStream extends \stdClass{
$this->buffer .= Binary::writeLInt($v);
}
public function getShort($signed = true){
return $signed ? Binary::readSignedShort($this->get(2)) : Binary::readShort($this->get(2));
public function getSignedShort(){
return Binary::readSignedShort($this->get(2));
}
public function putShort($v){
$this->buffer .= Binary::writeShort($v);
}
public function getShort(){
return Binary::readShort($this->get(2));
}
public function putSignedShort($v){
$this->buffer .= Binary::writeShort($v);
}
public function getFloat(){
return Binary::readFloat($this->get(4));
}
@ -188,7 +196,7 @@ class BinaryStream extends \stdClass{
}
public function getSlot(){
$id = $this->getShort(true);
$id = $this->getSignedShort();
if($id <= 0){
return Item::get(0, 0, 0);

View File

@ -33,11 +33,11 @@ class ServerKiller extends Thread{
public function run(){
sleep($this->time);
echo "\nTook to long to stop, server was killed forcefully!\n";
echo "\nTook too long to stop, server was killed forcefully!\n";
@\pocketmine\kill(getmypid());
}
public function getThreadName(){
return "Server Killer";
}
}
}