use of com.builtbroken.mc.prefab.tile.Tile in project Engine by VoltzEngine-Project.
the class AbstractTileTest method testGetSpecialRenderer.
@Test
public void testGetSpecialRenderer() {
FakeWorld world = FakeWorld.newWorld("TestGetSpecialRenderer");
world.setBlock(0, 0, 0, block);
Tile tile = ((Tile) world.getTileEntity(0, 0, 0));
tile.getSpecialRenderer();
}
use of com.builtbroken.mc.prefab.tile.Tile in project Engine by VoltzEngine-Project.
the class AbstractTileTest method testGetAccess.
@Test
public void testGetAccess() {
FakeWorld world = FakeWorld.newWorld("TestGetAccess");
world.setBlock(0, 0, 0, block);
Tile tile = ((Tile) world.getTileEntity(0, 0, 0));
assertTrue(tile.getAccess() == world);
}
use of com.builtbroken.mc.prefab.tile.Tile in project Engine by VoltzEngine-Project.
the class AbstractTileTest method testSetBlockBoundsBasedOnState.
@Test
public void testSetBlockBoundsBasedOnState() {
FakeWorld world = FakeWorld.newWorld("TestSetBlockBoundsBasedOnState");
world.setBlock(0, 0, 0, block);
Tile tile = ((Tile) world.getTileEntity(0, 0, 0));
tile.setBlockBoundsBasedOnState();
}
use of com.builtbroken.mc.prefab.tile.Tile in project Engine by VoltzEngine-Project.
the class AbstractTileTest method testDistance.
@Test
public void testDistance() {
FakeWorld world = FakeWorld.newWorld("TestDistance");
world.setBlock(0, 0, 0, block);
Tile tile = ((Tile) world.getTileEntity(0, 0, 0));
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
Pos pos = new Pos(0.5).add(dir);
Pos center = tile.toPos();
double distance = tile.distance(pos.x(), pos.y(), pos.z());
assertTrue("Distance = " + distance + " Pos = " + pos + " Center = " + center, Math.abs(distance - 1) <= 0.01);
player.setLocationAndAngles(pos.x(), pos.y(), pos.z(), 0, 0);
distance = tile.distance(player);
assertTrue("Distance = " + distance + " Pos = " + pos + " Center = " + center, Math.abs(distance - 1) <= 0.01);
distance = tile.distance(pos);
assertTrue("Distance = " + distance + " Pos = " + pos + " Center = " + center, Math.abs(distance - 1) <= 0.01);
}
}
use of com.builtbroken.mc.prefab.tile.Tile in project Engine by VoltzEngine-Project.
the class AbstractTileTest method testRemoveByplayer.
@Test
public void testRemoveByplayer() {
FakeWorld world = FakeWorld.newWorld("TestRemoveByplayer");
world.setBlock(0, 0, 0, block);
Tile tile = ((Tile) world.getTileEntity(0, 0, 0));
tile.removeByPlayer(player, true);
world.setBlock(0, 0, 0, block);
tile = ((Tile) world.getTileEntity(0, 0, 0));
tile.removeByPlayer(player, false);
}
Aggregations