Fixed #9445
This commit is contained in:
@@ -33,11 +33,11 @@ public class Fires{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static @Nullable Fire get(Tile tile){
|
public static @Nullable Fire get(Tile tile){
|
||||||
return world.tiles.getFire(tile.array());
|
return tile == null ? null : world.tiles.getFire(tile.array());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static @Nullable Fire get(int x, int y){
|
public static @Nullable Fire get(int x, int y){
|
||||||
return world.tiles.getFire(world.packArray(x, y));
|
return Structs.inBounds(x, y, world.width(), world.height()) ? world.tiles.getFire(world.packArray(x, y)) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void set(Tile tile, Fire fire){
|
private static void set(Tile tile, Fire fire){
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ public class Puddles{
|
|||||||
|
|
||||||
/** Returns the Puddle on the specified tile. May return null. */
|
/** Returns the Puddle on the specified tile. May return null. */
|
||||||
public static @Nullable Puddle get(Tile tile){
|
public static @Nullable Puddle get(Tile tile){
|
||||||
return world.tiles.getPuddle(tile.array());
|
return tile == null ? null : world.tiles.getPuddle(tile.array());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void deposit(Tile tile, Tile source, Liquid liquid, float amount, boolean initial){
|
public static void deposit(Tile tile, Tile source, Liquid liquid, float amount, boolean initial){
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ public class Tiles implements Iterable<Tile>{
|
|||||||
puddles[pos] = p;
|
puddles[pos] = p;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Fire getFire(int pos){
|
public @Nullable Fire getFire(int pos){
|
||||||
return fires[pos];
|
return fires[pos];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user