use of com.builtbroken.mc.prefab.tile.Tile in project Engine by VoltzEngine-Project.
the class AbstractTileTest method testSetAccess.
@Test
public void testSetAccess() {
FakeWorld world = FakeWorld.newWorld("TestSetAccess");
world.setBlock(0, 0, 0, block);
Tile tile = ((Tile) world.getTileEntity(0, 0, 0));
tile.setAccess(world);
}
use of com.builtbroken.mc.prefab.tile.Tile in project Engine by VoltzEngine-Project.
the class AbstractTileTest method testGetDrops.
@Test
public void testGetDrops() {
FakeWorld world = FakeWorld.newWorld("TestGetDrops");
world.setBlock(0, 0, 0, block);
Tile tile = ((Tile) world.getTileEntity(0, 0, 0));
List<ItemStack> items = tile.getDrops(0, 0);
for (ItemStack stack : items) {
assertTrue(stack != null);
assertTrue(stack.getItem() != null);
//TODO check for creative mod only items
}
}
use of com.builtbroken.mc.prefab.tile.Tile 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.prefab.tile.Tile in project Engine by VoltzEngine-Project.
the class AbstractTileTest method testGetTextureName.
@Test
public void testGetTextureName() {
FakeWorld world = FakeWorld.newWorld("TestGetTextureName");
world.setBlock(0, 0, 0, block);
try {
Method method = Tile.class.getDeclaredMethod("getTextureName");
method.setAccessible(true);
Tile tile = ((Tile) world.getTileEntity(0, 0, 0));
assertTrue(method.invoke(tile) != null);
} catch (NoSuchMethodException e) {
fail("Could not find method getTextureName");
} catch (InvocationTargetException e) {
fail("Failed to invoke method getTextureName");
} catch (IllegalAccessException e) {
fail("Couldn't access method getTextureName");
}
}
use of com.builtbroken.mc.prefab.tile.Tile in project Engine by VoltzEngine-Project.
the class AbstractTileTest method testOnCollide.
@Test
public void testOnCollide() {
FakeWorld world = FakeWorld.newWorld("TestOnCollide");
world.setBlock(0, 0, 0, block);
Tile tile = ((Tile) world.getTileEntity(0, 0, 0));
tile.onCollide(player);
}
Aggregations