Skip to content

Commit

Permalink
chores: add a FIXME
Browse files Browse the repository at this point in the history
  • Loading branch information
smartcmd committed Feb 1, 2025
1 parent 447db73 commit 8f0b6a4
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ public void tick() {
return;
}

// FIXME: fix bug caused by floating point number error here: 1.3f - 0.3f = 0.99999994
var collidedBlocks = dimension.getCollidingBlockStates(entity.getOffsetAABB());
if (collidedBlocks == null) {
// 1. The entity is not stuck in the block
Expand Down Expand Up @@ -270,7 +271,7 @@ protected boolean computeLiquidMotion(Entity entity) {
if (!(block.getBehavior() instanceof BlockLiquidBehaviorImpl liquidBehavior)) {
return;
}

var flowVector = ((BlockLiquidBaseComponentImpl) liquidBehavior.getBaseComponent()).calculateFlowVector(dimension, x, y, z, block);
if (flowVector.lengthSquared() <= 0) {
return;
Expand Down

0 comments on commit 8f0b6a4

Please sign in to comment.