mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-19 08:47:29 +07:00
Fixed junction crash
This commit is contained in:
parent
0b09ca0817
commit
a496c8ae3e
@ -69,7 +69,7 @@ public class Junction extends Block{
|
|||||||
JunctionEntity entity = tile.entity();
|
JunctionEntity entity = tile.entity();
|
||||||
boolean x = tile.x == source.x;
|
boolean x = tile.x == source.x;
|
||||||
|
|
||||||
if((x && entity.bx.full()) || (!x && entity.by.full())) return false;
|
if(entity == null || entity.bx == null || entity.by == null || (x && entity.bx.full()) || (!x && entity.by.full())) return false;
|
||||||
int dir = source.relativeTo(tile.x, tile.y);
|
int dir = source.relativeTo(tile.x, tile.y);
|
||||||
if(dir == -1) return false;
|
if(dir == -1) return false;
|
||||||
Tile to = tile.getNearby(dir);
|
Tile to = tile.getNearby(dir);
|
||||||
|
Loading…
Reference in New Issue
Block a user