mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-14 13:13:53 +00:00
Move vectors to static creators, for caching
This commit is contained in:
@ -54,7 +54,7 @@ public class LocationTest {
|
||||
@Test
|
||||
public void testToVector() throws Exception {
|
||||
World world = mock(World.class);
|
||||
Vector3 position = new Vector3(1, 1, 1);
|
||||
Vector3 position = Vector3.at(1, 1, 1);
|
||||
Location location = new Location(world, position);
|
||||
assertEquals(position, location.toVector());
|
||||
}
|
||||
@ -62,14 +62,14 @@ public class LocationTest {
|
||||
@Test
|
||||
public void testGetX() throws Exception {
|
||||
World world = mock(World.class);
|
||||
Location location = new Location(world, new Vector3(TEST_VALUE, 0, 0));
|
||||
Location location = new Location(world, Vector3.at(TEST_VALUE, 0, 0));
|
||||
assertEquals(TEST_VALUE, location.getX(), EPSILON);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetBlockX() throws Exception {
|
||||
World world = mock(World.class);
|
||||
Location location = new Location(world, new Vector3(TEST_VALUE, 0, 0));
|
||||
Location location = new Location(world, Vector3.at(TEST_VALUE, 0, 0));
|
||||
assertEquals(TEST_VALUE, location.getBlockX());
|
||||
}
|
||||
|
||||
@ -87,14 +87,14 @@ public class LocationTest {
|
||||
@Test
|
||||
public void testGetY() throws Exception {
|
||||
World world = mock(World.class);
|
||||
Location location = new Location(world, new Vector3(0, TEST_VALUE, 0));
|
||||
Location location = new Location(world, Vector3.at(0, TEST_VALUE, 0));
|
||||
assertEquals(TEST_VALUE, location.getY(), EPSILON);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetBlockY() throws Exception {
|
||||
World world = mock(World.class);
|
||||
Location location = new Location(world, new Vector3(0, TEST_VALUE, 0));
|
||||
Location location = new Location(world, Vector3.at(0, TEST_VALUE, 0));
|
||||
assertEquals(TEST_VALUE, location.getBlockY());
|
||||
}
|
||||
|
||||
@ -112,14 +112,14 @@ public class LocationTest {
|
||||
@Test
|
||||
public void testGetZ() throws Exception {
|
||||
World world = mock(World.class);
|
||||
Location location = new Location(world, new Vector3(0, 0, TEST_VALUE));
|
||||
Location location = new Location(world, Vector3.at(0, 0, TEST_VALUE));
|
||||
assertEquals(TEST_VALUE, location.getZ(), EPSILON);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetBlockZ() throws Exception {
|
||||
World world = mock(World.class);
|
||||
Location location = new Location(world, new Vector3(0, 0, TEST_VALUE));
|
||||
Location location = new Location(world, Vector3.at(0, 0, TEST_VALUE));
|
||||
assertEquals(TEST_VALUE, location.getBlockZ());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user