mirror of
https://github.com/GTNewHorizons/Baubles-Expanded.git
synced 2026-10-25 20:22:26 +00:00
Compatibility fix for badly written mods
Stops Traveler's Gear from crashing
This commit is contained in:
1 parent
f1104ff796
commit
124d2b5f4d
1 file changed
+6
@@ -14,6 +14,9 @@ public class BaubleExpandedSlots {
|
||||
public static final int slotLimit = 20;
|
||||
|
||||
//The type used in place of null.
|
||||
public static final String invalidType = "";
|
||||
|
||||
//The type used for unassigned slots.
|
||||
public static final String unknownType = "unknown";
|
||||
|
||||
//Pre-registered types.
|
||||
@@ -286,6 +289,9 @@ public class BaubleExpandedSlots {
|
||||
* @return The type matching the BaubleType or unknown.
|
||||
*/
|
||||
public static String getTypeFromBaubleType(BaubleType type) {
|
||||
if(type == null) {
|
||||
return invalidType;
|
||||
}
|
||||
switch(type) {
|
||||
case RING:
|
||||
return ringType;
|
||||
|
||||
Reference in new issue
Block a user