mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-20 11:45:51 +00:00
Fixes a NumberFormatException when trying to read inexistant frequency of a CargoManager
Fixes https://github.com/TheBusyBiscuit/Slimefun4/issues/363 Fixes https://github.com/TheBusyBiscuit/Slimefun4/issues/161
This commit is contained in:
parent
7d02942180
commit
0b54f079e4
@ -37,7 +37,6 @@ import me.mrCookieSlime.Slimefun.holograms.CargoHologram;
|
|||||||
public class CargoNet {
|
public class CargoNet {
|
||||||
|
|
||||||
public enum Axis {
|
public enum Axis {
|
||||||
|
|
||||||
X_POSITIVE,
|
X_POSITIVE,
|
||||||
X_NEGATIVE,
|
X_NEGATIVE,
|
||||||
Y_POSITIVE,
|
Y_POSITIVE,
|
||||||
@ -462,7 +461,7 @@ public class CargoNet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static int getFrequency(Location l) {
|
private static int getFrequency(Location l) {
|
||||||
return Integer.parseInt(BlockStorage.getBlockInfo(l).getString("frequency"));
|
return BlockStorage.getBlockInfo(l).getInt("frequency"); // If no frequency is found, will automatically return 0.
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Set<Location> scan(Location source, Set<Location> blocks, List<Location> l1, List<Location> l2, Axis exclude, Map<Location, Integer> input, Map<Integer, List<Location>> output, Set<Location> terminals, Set<Location> providers, Set<Location> destinations, Set<Location> imports, Set<Location> exports) {
|
public static Set<Location> scan(Location source, Set<Location> blocks, List<Location> l1, List<Location> l2, Axis exclude, Map<Location, Integer> input, Map<Integer, List<Location>> output, Set<Location> terminals, Set<Location> providers, Set<Location> destinations, Set<Location> imports, Set<Location> exports) {
|
||||||
|
Loading…
Reference in New Issue
Block a user