mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-28 05:35:40 +00:00
Fixed time
This commit is contained in:
parent
8e909f05ca
commit
8a0c2b7c4a
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user