Fixed time

This commit is contained in:
PEMapModder 2016-03-09 19:13:20 +08:00
parent 8e909f05ca
commit 8a0c2b7c4a

View File

@ -23,9 +23,6 @@ namespace pocketmine\network\protocol;
#include <rules/DataPacket.h> #include <rules/DataPacket.h>
use pocketmine\level\Level;
class SetTimePacket extends DataPacket{ class SetTimePacket extends DataPacket{
const NETWORK_ID = Info::SET_TIME_PACKET; const NETWORK_ID = Info::SET_TIME_PACKET;
@ -38,7 +35,7 @@ class SetTimePacket extends DataPacket{
public function encode(){ public function encode(){
$this->reset(); $this->reset();
$this->putInt((int) (($this->time / Level::TIME_FULL) * 19200)); $this->putInt($this->time);
$this->putByte($this->started ? 1 : 0); $this->putByte($this->started ? 1 : 0);
} }