Fixed ambiguous world checks
This commit is contained in:
@@ -87,6 +87,7 @@ public class EntityLocationTest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
EntityLocation firstLocation = new EntityLocation(10, 20, 30, 40, 50, dummyWorld);
|
EntityLocation firstLocation = new EntityLocation(10, 20, 30, 40, 50, dummyWorld);
|
||||||
|
Assert.assertSame("Lost world reference before cloning", dummyWorld, firstLocation.getWorld());
|
||||||
EntityLocation locationClone = firstLocation.clone();
|
EntityLocation locationClone = firstLocation.clone();
|
||||||
|
|
||||||
Assert.assertEquals("X mismatch", firstLocation.getX(), locationClone.getX(), 0);
|
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("Z mismatch", firstLocation.getZ(), locationClone.getZ(), 0);
|
||||||
Assert.assertEquals("Pitch mismatch", firstLocation.getPitch(), locationClone.getPitch(), 0);
|
Assert.assertEquals("Pitch mismatch", firstLocation.getPitch(), locationClone.getPitch(), 0);
|
||||||
Assert.assertEquals("Yaw mismatch", firstLocation.getYaw(), locationClone.getYaw(), 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());
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user