-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fee0f41
commit 3ec84b5
Showing
33 changed files
with
404 additions
and
311 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
org.gradle.jvmargs=-Xmx3G | ||
org.gradle.daemon=false | ||
|
||
mod_version=1.4.3+3 | ||
mod_version=1.4.4+1 |
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
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
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
29 changes: 29 additions & 0 deletions
29
src/main/java/me/fengming/vaultpatcher_asm/core/transformers/TransformChecker.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,29 @@ | ||
package me.fengming.vaultpatcher_asm.core.transformers; | ||
|
||
import me.fengming.vaultpatcher_asm.config.TranslationInfo; | ||
import me.fengming.vaultpatcher_asm.core.utils.StringUtils; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
public class TransformChecker { | ||
|
||
public static Map<TranslationInfo, Boolean> transformed = new HashMap<>(); | ||
|
||
public static boolean isTransformed(String className) { | ||
for (Map.Entry<TranslationInfo, Boolean> entry : transformed.entrySet()) { | ||
TranslationInfo info = entry.getKey(); | ||
String rClassName = StringUtils.rawPackage(info.getTargetClassInfo().getName()); | ||
if (className.equals(rClassName) && !entry.getValue()) { | ||
return false; | ||
} | ||
} | ||
return true; | ||
} | ||
|
||
public static boolean setTransformed(TranslationInfo info) { | ||
if (!transformed.containsKey(info)) return false; | ||
transformed.put(info, true); | ||
return true; | ||
} | ||
} |
Oops, something went wrong.