use of com.builtbroken.mc.testing.junit.icons.SudoIconReg in project Engine by VoltzEngine-Project.
the class AbstractTileTest method testGetIcon.
@Test
public void testGetIcon() {
FakeWorld world = FakeWorld.newWorld("TestGetIcon");
world.setBlock(0, 0, 0, block);
Tile tile = ((Tile) world.getTileEntity(0, 0, 0));
tile.registerIcons(new SudoIconReg());
tile.getIcon();
for (int i = 0; i < 6; i++) {
tile.getIcon(i);
tile.getIcon(i, 0);
}
tile.getIcon(tile.name);
}
use of com.builtbroken.mc.testing.junit.icons.SudoIconReg in project Engine by VoltzEngine-Project.
the class AbstractTileTest method testGetSideIcon.
@Test
public void testGetSideIcon() {
FakeWorld world = FakeWorld.newWorld("TestGetSideIcon");
world.setBlock(0, 0, 0, block);
Tile tile = ((Tile) world.getTileEntity(0, 0, 0));
tile.registerIcons(new SudoIconReg());
try {
Method method = Tile.class.getDeclaredMethod("getSideIcon", Integer.TYPE, Integer.TYPE);
method.setAccessible(true);
for (int i = 0; i < 6; i++) {
method.invoke(tile, 0, i);
}
} catch (NoSuchMethodException e) {
fail("Could not find method getTextureName");
} catch (InvocationTargetException e) {
e.printStackTrace();
fail("Failed to invoke method getTextureName");
} catch (IllegalAccessException e) {
fail("Couldn't access method getTextureName");
}
}
use of com.builtbroken.mc.testing.junit.icons.SudoIconReg in project Engine by VoltzEngine-Project.
the class AbstractTileTest method testRegisterIcons.
@Test
public void testRegisterIcons() {
FakeWorld world = FakeWorld.newWorld("TestRegisterIcons");
world.setBlock(0, 0, 0, block);
Tile tile = ((Tile) world.getTileEntity(0, 0, 0));
tile.registerIcons(new SudoIconReg());
}
use of com.builtbroken.mc.testing.junit.icons.SudoIconReg in project Engine by VoltzEngine-Project.
the class AbstractTileTest method testRegisterSideTextureSet.
@Test
public void testRegisterSideTextureSet() {
FakeWorld world = FakeWorld.newWorld("TestRegisterSideTextureSet");
world.setBlock(0, 0, 0, block);
Tile tile = ((Tile) world.getTileEntity(0, 0, 0));
SudoIconReg reg = new SudoIconReg();
// TODO check to see if the texture exists
tile.registerSideTextureSet(reg);
}
Aggregations