Skip to content

Commit

Permalink
Fix another stack overflow in getFriction
Browse files Browse the repository at this point in the history
  • Loading branch information
hlysine committed Jul 27, 2024
1 parent fe06802 commit 9104bf3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public float getFriction(BlockState state, LevelReader level, BlockPos pos, Enti
return super.getFriction(state, level, pos, entity);
copycatBE.getMaterialItemStorage().getAllMaterials().forEach(mat -> {
count.getAndIncrement();
bonus.accumulateAndGet(mat.is(Blocks.AIR) ? state.getFriction(level, pos, entity) : mat.getFriction(level, pos, entity), Float::sum);
bonus.accumulateAndGet(mat.is(Blocks.AIR) ? super.getFriction(state, level, pos, entity) : mat.getFriction(level, pos, entity), Float::sum);
});
return bonus.get() / count.get();
}
Expand Down

0 comments on commit 9104bf3

Please sign in to comment.