use of com.builtbroken.mc.testing.junit.world.FakeWorld in project Engine by VoltzEngine-Project.
the class AbstractTileTest method testUpdate.
@Test
public void testUpdate() {
FakeWorld world = FakeWorld.newWorld("TestUpdate");
world.setBlock(0, 0, 0, block);
Tile tile = (Tile) world.getTileEntity(0, 0, 0);
// 5 Seconds of run time
for (int i = 0; i < 100; i++) {
tile.ticks = i;
tile.update();
}
}
use of com.builtbroken.mc.testing.junit.world.FakeWorld in project Engine by VoltzEngine-Project.
the class AbstractTileTest method testGetpickBlock.
@Test
public void testGetpickBlock() {
FakeWorld world = FakeWorld.newWorld("TestGetpickBlock");
world.setBlock(0, 0, 0, block);
Tile tile = ((Tile) world.getTileEntity(0, 0, 0));
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
for (int i = 0; i < 256; i++) {
tile.getPickBlock(new MovingObjectPosition(0, 0, 0, dir.ordinal(), getNextClick(dir, i).toVec3(), true));
}
}
}
use of com.builtbroken.mc.testing.junit.world.FakeWorld in project Engine by VoltzEngine-Project.
the class AbstractTileTest method testOpenGui.
@Test
public void testOpenGui() {
FakeWorld world = FakeWorld.newWorld("TestOpenGui");
world.setBlock(0, 0, 0, block);
Tile tile = ((Tile) world.getTileEntity(0, 0, 0));
tile.openGui(player, 0, Engine.instance);
}
use of com.builtbroken.mc.testing.junit.world.FakeWorld in project Engine by VoltzEngine-Project.
the class AbstractTileTest method testCanPlaceBlockOnSide.
@Test
public void testCanPlaceBlockOnSide() {
FakeWorld world = FakeWorld.newWorld("TestCanplaceBlockOnSide");
world.setBlock(0, 0, 0, block);
Tile tile = ((Tile) world.getTileEntity(0, 0, 0));
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
tile.canPlaceBlockOnSide(dir);
}
}
use of com.builtbroken.mc.testing.junit.world.FakeWorld in project Engine by VoltzEngine-Project.
the class AbstractTileEntityTest method testShouldRenderInPass.
@Test
public void testShouldRenderInPass() {
FakeWorld world = FakeWorld.newWorld("testShouldRenderInPass");
world.setBlock(10, 11, 12, block);
world.getTileEntity(10, 11, 12).shouldRenderInPass(0);
}
Aggregations