1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-12-14 04:00:30 +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:
Jonathan Coates 2019-08-19 15:34:20 +01:00 committed by GitHub
commit 7e8559278e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -311,13 +311,13 @@ public class ServerComputer extends ServerTerminal implements IComputer, IComput
@Override
public double getTimeOfDay()
{
return (m_world.getGameTime() + 6000) % 24000 / 1000.0;
return (m_world.getDayTime() + 6000) % 24000 / 1000.0;
}
@Override
public int getDay()
{
return (int) ((m_world.getGameTime() + 6000) / 24000) + 1;
return (int) ((m_world.getDayTime() + 6000) / 24000) + 1;
}
@Override