Search in sources :

Example 11 with SolidHitBox

use of net.countercraft.movecraft.util.hitboxes.SolidHitBox in project Movecraft by APDevTeam.

the class TreeHitBoxTest method testCloneBounds.

@Test
public void testCloneBounds() {
    SolidHitBox solid = new SolidHitBox(new MovecraftLocation(-3, -3, -3), new MovecraftLocation(3, 3, 3));
    SetHitBox box = new SetHitBox(solid);
    assertEquals(-3, box.getMinX(), "X");
    assertEquals(-3, box.getMinY(), "Y");
    assertEquals(-3, box.getMinZ(), "Z");
    assertEquals(3, box.getMaxX());
    assertEquals(3, box.getMaxY());
    assertEquals(3, box.getMaxZ());
}
Also used : SolidHitBox(net.countercraft.movecraft.util.hitboxes.SolidHitBox) SetHitBox(net.countercraft.movecraft.util.hitboxes.SetHitBox) Test(org.junit.Test)

Aggregations

SolidHitBox (net.countercraft.movecraft.util.hitboxes.SolidHitBox)11 SetHitBox (net.countercraft.movecraft.util.hitboxes.SetHitBox)10 MovecraftLocation (net.countercraft.movecraft.MovecraftLocation)6 HashSet (java.util.HashSet)5 HitBox (net.countercraft.movecraft.util.hitboxes.HitBox)4 Material (org.bukkit.Material)4 Test (org.junit.Test)4 Logger (java.util.logging.Logger)3 Location (org.bukkit.Location)3 LinkedList (java.util.LinkedList)2 Movecraft (net.countercraft.movecraft.Movecraft)2 WorldHandler (net.countercraft.movecraft.WorldHandler)2 Craft (net.countercraft.movecraft.craft.Craft)2 SinkingCraft (net.countercraft.movecraft.craft.SinkingCraft)2 CraftType (net.countercraft.movecraft.craft.type.CraftType)2 MutableHitBox (net.countercraft.movecraft.util.hitboxes.MutableHitBox)2 Waterlogged (org.bukkit.block.data.Waterlogged)2 NotNull (org.jetbrains.annotations.NotNull)2 Lists (com.google.common.collect.Lists)1 Sets (com.google.common.collect.Sets)1