This repository has been archived by the owner on Apr 28, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Load classpath mods first, use LinkedHashMap to preserve order - Use MethodHandles rather than sun.reflect.ConstructorAccessor in ReflectionUtils (Java 9 compatibility) - Move Side class out of ModInfo - Change RiftLoader.isClient to RiftLoader.getSide()
- Loading branch information
Showing
12 changed files
with
132 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/main/java/org/dimdev/riftloader/DuplicateModException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package org.dimdev.riftloader; | ||
|
||
public class DuplicateModException extends RuntimeException { | ||
private final ModInfo mod1; | ||
private final ModInfo mod2; | ||
|
||
public DuplicateModException(ModInfo mod1, ModInfo mod2) { | ||
if (!mod1.id.equals(mod2.id)) { | ||
throw new IllegalArgumentException(); | ||
} | ||
|
||
this.mod1 = mod1; | ||
this.mod2 = mod2; | ||
} | ||
|
||
public String getMessage() { | ||
return "Duplicate mod " + mod1.id + ":\r\n - " + mod1.source + "\r\n - " + mod2.source; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 0 additions & 7 deletions
7
src/main/java/org/dimdev/riftloader/ModConflictException.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package org.dimdev.riftloader; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
|
||
public enum Side { | ||
@SerializedName("client") CLIENT, | ||
@SerializedName("server") SERVER, | ||
@SerializedName("both") BOTH; | ||
|
||
public boolean includes(Side side) { | ||
return this == BOTH || this == side; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.