org.bukkit.entity.Turtle Java Examples
The following examples show how to use
org.bukkit.entity.Turtle.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EntityUtilTest.java From uSkyBlock with GNU General Public License v3.0 | 4 votes |
@Test public void testGetEntity() { List<Entity> testList = new ArrayList<>(); ArmorStand fakeArmorStand = mock(ArmorStand.class); Cow fakeCow = mock(Cow.class); Evoker fakeEvoker = mock(Evoker.class); Guardian fakeGuardian = mock(Guardian.class); Pig fakePig = mock(Pig.class); PigZombie fakePigZombie = mock(PigZombie.class); Pillager fakePillager = mock(Pillager.class); Sheep fakeSheep = mock(Sheep.class); Skeleton fakeSkeleton = mock(Skeleton.class); Turtle fakeTurtle = mock(Turtle.class); Villager fakeVillager = mock(Villager.class); WanderingTrader fakeWanderingTrader = mock(WanderingTrader.class); testList.add(fakeArmorStand); testList.add(fakeCow); testList.add(fakeEvoker); testList.add(fakeGuardian); testList.add(fakePig); testList.add(fakePigZombie); testList.add(fakePillager); testList.add(fakeSheep); testList.add(fakeSkeleton); testList.add(fakeTurtle); testList.add(fakeVillager); testList.add(fakeWanderingTrader); List<Sheep> sheepList = EntityUtil.getEntity(testList, Sheep.class); assertEquals(1, sheepList.size()); assertEquals(fakeSheep, sheepList.get(0)); List<Animals> animalsList = EntityUtil.getAnimals(testList); assertEquals(4, animalsList.size()); assertTrue(animalsList.contains(fakeCow)); assertTrue(animalsList.contains(fakePig)); assertTrue(animalsList.contains(fakeSheep)); assertTrue(animalsList.contains(fakeTurtle)); List<Monster> monsterList = EntityUtil.getMonsters(testList); assertEquals(5, monsterList.size()); assertTrue(monsterList.contains(fakeEvoker)); assertTrue(monsterList.contains(fakeGuardian)); assertTrue(monsterList.contains(fakePigZombie)); assertTrue(monsterList.contains(fakePillager)); assertTrue(monsterList.contains(fakeSkeleton)); List<NPC> npcList = EntityUtil.getNPCs(testList); assertEquals(2, npcList.size()); assertTrue(npcList.contains(fakeVillager)); assertTrue(npcList.contains(fakeWanderingTrader)); }