move forced overflow of SetTimePacket to SetTimePacket::create()

This commit is contained in:
Dylan K. Taylor
2019-08-20 16:24:47 +01:00
parent 794c7b2469
commit 3a41a798ad
2 changed files with 2 additions and 2 deletions

View File

@@ -691,7 +691,7 @@ class World implements ChunkManager{
* @param Player ...$targets If empty, will send to all players in the world.
*/
public function sendTime(Player ...$targets){
$pk = SetTimePacket::create($this->time & 0xffffffff); //avoid overflowing the field, since the packet uses an int32
$pk = SetTimePacket::create($this->time);
if(empty($targets)){
$this->broadcastGlobalPacket($pk);