attempt to fix fletchibng crash (#52)

This commit is contained in:
Danial authored and Daniel Ginovker committed 2019-10-11 21:06:30 -04:00
1 parent ae05e80a7c
commit 3e71d072f7
1 file changed
+4 -5
@@ -227,12 +227,11 @@ public class ItemDefinitions {
* Returns the weight of an item.
*/
public static double getWeight(int id) {
try {
if (id >= 0 && id < definitions.length)
return definitions[id].weight;
} catch (NullPointerException noId) {
System.out.println("WARNING: id " + id + " doesn't have a definition!");
return 0;
}
System.out.println("WARNING: id " + id + " doesn't have a definition!");
return 0.0;
}
/**