Fix 32-bit crash and incorrect use of IntTag for Time

This commit is contained in:
Dylan K. Taylor 2016-12-22 21:03:18 +00:00
parent acd141e5aa
commit 3dcfa7b3ce
2 changed files with 7 additions and 7 deletions

View File

@ -174,14 +174,14 @@ interface LevelProvider{
public function getName();
/**
* @return int
* @return int|string int, or the string numeric representation of a long in 32-bit systems
*/
public function getTime();
/**
* @param int $value
* @param int|string $value int, or the string numeric representation of a long in 32-bit systems
*/
public function setTime(int $value);
public function setTime($value);
/**
* @return int|string int, or the string numeric representation of a long in 32-bit systems
@ -189,7 +189,7 @@ interface LevelProvider{
public function getSeed();
/**
* @param int|string $value
* @param int|string $value int, or the string numeric representation of a long in 32-bit systems
*/
public function setSeed($value);

View File

@ -82,12 +82,12 @@ abstract class BaseLevelProvider implements LevelProvider{
return $this->levelData["LevelName"];
}
public function getTime() : int{
public function getTime(){
return $this->levelData["Time"];
}
public function setTime(int $value){
$this->levelData->Time = new IntTag("Time", (int) $value);
public function setTime($value){
$this->levelData->Time = new LongTag("Time", $value);
}
public function getSeed(){