Archived
0

Fixed ambiguous world checks

This commit is contained in:
Daniil
2018-08-10 16:29:16 +07:00
parent 039b055260
commit 00aa03e423

View File

@@ -87,6 +87,7 @@ public class EntityLocationTest {
};
EntityLocation firstLocation = new EntityLocation(10, 20, 30, 40, 50, dummyWorld);
Assert.assertSame("Lost world reference before cloning", dummyWorld, firstLocation.getWorld());
EntityLocation locationClone = firstLocation.clone();
Assert.assertEquals("X mismatch", firstLocation.getX(), locationClone.getX(), 0);
@@ -94,7 +95,6 @@ public class EntityLocationTest {
Assert.assertEquals("Z mismatch", firstLocation.getZ(), locationClone.getZ(), 0);
Assert.assertEquals("Pitch mismatch", firstLocation.getPitch(), locationClone.getPitch(), 0);
Assert.assertEquals("Yaw mismatch", firstLocation.getYaw(), locationClone.getYaw(), 0);
Assert.assertEquals("World mismatch", firstLocation.getWorld(), locationClone.getWorld());
Assert.assertSame("World mismatch (accidental clone of the World object?)", firstLocation.getWorld(), locationClone.getWorld());
}
}