mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-02 14:38:26 +01:00
Fix EntityProjectile
This commit is contained in:
parent
87e4d84e4a
commit
aaa71f4e9a
@ -463,7 +463,7 @@ public class Entity implements Viewable, Tickable, TagHandler, PermissionHandler
|
|||||||
newVelocity = physicsResult.newVelocity();
|
newVelocity = physicsResult.newVelocity();
|
||||||
} else {
|
} else {
|
||||||
newVelocity = deltaPos;
|
newVelocity = deltaPos;
|
||||||
newPosition = position.add(currentVelocity).div(tps);
|
newPosition = position.add(currentVelocity.div(20));
|
||||||
}
|
}
|
||||||
|
|
||||||
// World border collision
|
// World border collision
|
||||||
|
@ -152,7 +152,7 @@ public class EntityProjectile extends Entity {
|
|||||||
} else {
|
} else {
|
||||||
pos = pos.add(direction);
|
pos = pos.add(direction);
|
||||||
}
|
}
|
||||||
Block block = instance.getBlock(pos.sub(0, 1, 0));
|
Block block = instance.getBlock(pos);
|
||||||
if (!block.isAir() && !block.isLiquid()) {
|
if (!block.isAir() && !block.isLiquid()) {
|
||||||
teleport(pos);
|
teleport(pos);
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user