Search in sources :

Example 96 with FakeWorld

use of com.builtbroken.mc.testing.junit.world.FakeWorld in project Engine by VoltzEngine-Project.

the class AbstractTileTest method testOnAdded.

@Test
public void testOnAdded() {
    FakeWorld world = FakeWorld.newWorld("TestOnAdded");
    world.setBlock(0, 0, 0, block);
    Tile tile = ((Tile) world.getTileEntity(0, 0, 0));
    tile.onAdded();
}
Also used : FakeWorld(com.builtbroken.mc.testing.junit.world.FakeWorld) PacketTile(com.builtbroken.mc.core.network.packet.PacketTile) BlockTile(com.builtbroken.mc.prefab.tile.BlockTile) Tile(com.builtbroken.mc.prefab.tile.Tile) Test(org.junit.Test)

Example 97 with FakeWorld

use of com.builtbroken.mc.testing.junit.world.FakeWorld 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());
}
Also used : SudoIconReg(com.builtbroken.mc.testing.junit.icons.SudoIconReg) FakeWorld(com.builtbroken.mc.testing.junit.world.FakeWorld) PacketTile(com.builtbroken.mc.core.network.packet.PacketTile) BlockTile(com.builtbroken.mc.prefab.tile.BlockTile) Tile(com.builtbroken.mc.prefab.tile.Tile) Test(org.junit.Test)

Example 98 with FakeWorld

use of com.builtbroken.mc.testing.junit.world.FakeWorld in project Engine by VoltzEngine-Project.

the class AbstractTileTest method testXi.

@Test
public void testXi() {
    FakeWorld world = FakeWorld.newWorld("TestXi");
    world.setBlock(0, 0, 0, block);
    TileEntity tile = world.getTileEntity(0, 0, 0);
    assertTrue(tile.getClass() == tileClazz);
    assertTrue(tile.xCoord == ((T) tile).xi());
}
Also used : TileEntity(net.minecraft.tileentity.TileEntity) FakeWorld(com.builtbroken.mc.testing.junit.world.FakeWorld) Test(org.junit.Test)

Example 99 with FakeWorld

use of com.builtbroken.mc.testing.junit.world.FakeWorld in project Engine by VoltzEngine-Project.

the class AbstractTileTest method testSendPacketToGuiUsers.

@Test
public void testSendPacketToGuiUsers() {
    FakeWorld world = FakeWorld.newWorld("TestSendpacketToGuiUsers");
    world.setBlock(0, 0, 0, block);
    Tile tile = ((Tile) world.getTileEntity(0, 0, 0));
    tile.sendPacketToGuiUsers(new PacketTile(tile));
}
Also used : PacketTile(com.builtbroken.mc.core.network.packet.PacketTile) FakeWorld(com.builtbroken.mc.testing.junit.world.FakeWorld) PacketTile(com.builtbroken.mc.core.network.packet.PacketTile) BlockTile(com.builtbroken.mc.prefab.tile.BlockTile) Tile(com.builtbroken.mc.prefab.tile.Tile) Test(org.junit.Test)

Example 100 with FakeWorld

use of com.builtbroken.mc.testing.junit.world.FakeWorld in project Engine by VoltzEngine-Project.

the class AbstractTileTest method testCanPlaceBlockAt.

@Test
public void testCanPlaceBlockAt() {
    FakeWorld world = FakeWorld.newWorld("TestCanplaceBlockAt");
    world.setBlock(0, 0, 0, block);
    Tile tile = ((Tile) world.getTileEntity(0, 0, 0));
    tile.canPlaceBlockAt();
}
Also used : FakeWorld(com.builtbroken.mc.testing.junit.world.FakeWorld) PacketTile(com.builtbroken.mc.core.network.packet.PacketTile) BlockTile(com.builtbroken.mc.prefab.tile.BlockTile) Tile(com.builtbroken.mc.prefab.tile.Tile) Test(org.junit.Test)

Aggregations

FakeWorld (com.builtbroken.mc.testing.junit.world.FakeWorld)114 Test (org.junit.Test)111 BlockTile (com.builtbroken.mc.prefab.tile.BlockTile)85 Tile (com.builtbroken.mc.prefab.tile.Tile)85 PacketTile (com.builtbroken.mc.core.network.packet.PacketTile)84 AbstractTest (com.builtbroken.mc.testing.junit.AbstractTest)21 TileEntity (net.minecraft.tileentity.TileEntity)11 InvocationTargetException (java.lang.reflect.InvocationTargetException)6 Method (java.lang.reflect.Method)6 Pos (com.builtbroken.mc.imp.transform.vector.Pos)4 SudoIconReg (com.builtbroken.mc.testing.junit.icons.SudoIconReg)4 ItemStack (net.minecraft.item.ItemStack)4 Cube (com.builtbroken.mc.imp.transform.region.Cube)3 NBTTagCompound (net.minecraft.nbt.NBTTagCompound)3 ForgeDirection (net.minecraftforge.common.util.ForgeDirection)3 Location (com.builtbroken.mc.imp.transform.vector.Location)1 Location (com.builtbroken.mc.lib.transform.vector.Location)1 Pos (com.builtbroken.mc.lib.transform.vector.Pos)1 TileConductor (com.builtbroken.mc.prefab.tile.TileConductor)1 ArrayList (java.util.ArrayList)1