mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-11-05 17:46:21 +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
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user