Bugfix
This commit is contained in:
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
Before Width: | Height: | Size: 134 KiB After Width: | Height: | Size: 925 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 924 KiB After Width: | Height: | Size: 134 KiB |
@@ -39,8 +39,8 @@ public class LiquidJunction extends LiquidBlock{
|
|||||||
public Tile getLiquidDestination(Tile tile, Tile source, Liquid liquid){
|
public Tile getLiquidDestination(Tile tile, Tile source, Liquid liquid){
|
||||||
int dir = source.relativeTo(tile.x, tile.y);
|
int dir = source.relativeTo(tile.x, tile.y);
|
||||||
dir = (dir + 4) % 4;
|
dir = (dir + 4) % 4;
|
||||||
Tile next = tile.getNearby(dir).link();
|
Tile next = tile.getNearbyLink(dir);
|
||||||
if(!next.block().acceptLiquid(next, tile, liquid, 0f) && !(next.block() instanceof LiquidJunction)){
|
if(next == null || !next.block().acceptLiquid(next, tile, liquid, 0f) && !(next.block() instanceof LiquidJunction)){
|
||||||
return tile;
|
return tile;
|
||||||
}
|
}
|
||||||
return next.block().getLiquidDestination(next, tile, liquid);
|
return next.block().getLiquidDestination(next, tile, liquid);
|
||||||
|
|||||||
Reference in New Issue
Block a user