mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-11-18 15:54:54 +00:00
Merge pull request #291 from parly/patch-1.14.x-1
Fix os.time() and os.day() behavior on 1.14
This commit is contained in:
commit
7e8559278e
@ -311,13 +311,13 @@ public class ServerComputer extends ServerTerminal implements IComputer, IComput
|
|||||||
@Override
|
@Override
|
||||||
public double getTimeOfDay()
|
public double getTimeOfDay()
|
||||||
{
|
{
|
||||||
return (m_world.getGameTime() + 6000) % 24000 / 1000.0;
|
return (m_world.getDayTime() + 6000) % 24000 / 1000.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getDay()
|
public int getDay()
|
||||||
{
|
{
|
||||||
return (int) ((m_world.getGameTime() + 6000) / 24000) + 1;
|
return (int) ((m_world.getDayTime() + 6000) / 24000) + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user