mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-24 00:51:34 +01:00
Complete test coverage (#761)
This commit is contained in:
parent
37a18eced5
commit
a7ca1a37bf
@ -621,6 +621,23 @@ public class EntityBlockPhysicsIntegrationTest {
|
|||||||
assertEqualsPoint(new Pos(1.07, 43, 1.08), res.newPosition());
|
assertEqualsPoint(new Pos(1.07, 43, 1.08), res.newPosition());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void entityPhysicsSmallMoveC2E(Env env) {
|
||||||
|
var instance = env.createFlatInstance();
|
||||||
|
instance.setBlock(1, 43, 1, Block.STONE);
|
||||||
|
|
||||||
|
BoundingBox bb = new BoundingBox(0, 0, 0);
|
||||||
|
|
||||||
|
var entity = new Entity(EntityType.ZOMBIE);
|
||||||
|
entity.setBoundingBox(bb);
|
||||||
|
|
||||||
|
entity.setInstance(instance, new Pos(0.51, 42.50, 0.51)).join();
|
||||||
|
assertEquals(instance, entity.getInstance());
|
||||||
|
|
||||||
|
PhysicsResult res = CollisionUtils.handlePhysics(entity, new Vec(0.57, 0.57, 0.57));
|
||||||
|
assertEqualsPoint(new Pos(1.08, 43, 1.08), res.newPosition());
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void entityPhysicsCheckNoCollision(Env env) {
|
public void entityPhysicsCheckNoCollision(Env env) {
|
||||||
var instance = env.createFlatInstance();
|
var instance = env.createFlatInstance();
|
||||||
|
Loading…
Reference in New Issue
Block a user