Tile field encapsulation

This commit is contained in:
Anuken
2018-07-27 10:52:14 -04:00
parent 23bd9a989b
commit 01f6904f82
7 changed files with 27 additions and 18 deletions
@@ -179,7 +179,7 @@ public class Puddle extends BaseEntity implements SaveTrait, Poolable, DrawTrait
float deposited = Math.min((amount - maxLiquid / 1.5f) / 4f, 0.3f) * Timers.delta();
for(GridPoint2 point : Geometry.d4){
Tile other = world.tile(tile.x + point.x, tile.y + point.y);
if(other.block() == Blocks.air && other.cliffs == 0){
if(other.block() == Blocks.air && !other.hasCliffs()){
deposit(other, tile, liquid, deposited, generation + 1);
amount -= deposited / 2f; //tweak to speed up/slow down puddle propagation
}