Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WorldMock#isDayTime() always returning false #853

Open
2 tasks done
thelooter opened this issue Sep 19, 2023 · 2 comments
Open
2 tasks done

WorldMock#isDayTime() always returning false #853

thelooter opened this issue Sep 19, 2023 · 2 comments
Labels
bug-behaviour Issue describes a behaviour of MockBukkit that does not correctly mimick the behaviour of Bukkit

Comments

@thelooter
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Are you using the latest version of MockBukkit?

  • I am using the latest version of MockBukkit.

Minecraft Version

1.2

Describe the bug

WorldMock#isDayTime() always returns false. This is most likely due to it being missed while Stubbing and therefore just receiving the default Implementation by the IDE

Reproducible Test

@Test
void testIsDayTime()
{
	WorldMock world = new WorldMock(Material.DIRT, 3);
	world.setTime(1000);
	assertTrue(world.isDayTime());
}

Anything else?

No response

@thelooter thelooter added the bug-behaviour Issue describes a behaviour of MockBukkit that does not correctly mimick the behaviour of Bukkit label Sep 19, 2023
@Nirbose
Copy link
Contributor

Nirbose commented Sep 21, 2023

True

public boolean isDayTime()
{
return false;
}

@Thorinwasher
Copy link
Contributor

One easy fix is to just throw UnimplementedOperationException for this. Otherwise we could link this to the scheduler or something? I really don't know exactly how this works though, is the daytime linked to a time in the world or one in the server/scheduler?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-behaviour Issue describes a behaviour of MockBukkit that does not correctly mimick the behaviour of Bukkit
Projects
None yet
Development

No branches or pull requests

3 participants