mirror of
https://github.com/GTNewHorizons/CraftTweaker.git
synced 2026-11-22 04:52:21 +00:00
- Mod integration can now specify a required version prefix
- Ingredients can now also be liquids - Added some checks that should fix #87 - Temporarily disabled BuildCraft support for BC 6.1 (BC 6.0 still has support) - Started work on BC 6.1 support (not yet functional and currently disabled)
This commit is contained in:
1 parent
cd322e04a7
commit
6500f03cda
37 files changed
+1153
-15
No files matched your search
@@ -6,6 +6,7 @@ import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
@@ -265,14 +266,18 @@ public class MineTweakerAPI {
|
||||
for (Annotation annotation : cls.getAnnotations()) {
|
||||
if (annotation instanceof ModOnly) {
|
||||
String[] value = ((ModOnly) annotation).value();
|
||||
String version = ((ModOnly) annotation).version();
|
||||
|
||||
for (String mod : value) {
|
||||
if (!loadedMods.contains(mod)) {
|
||||
continue outer; // skip this class
|
||||
}
|
||||
if (!loadedMods.contains(mod))
|
||||
continue outer;
|
||||
|
||||
if (!loadedMods.get(mod).getVersion().startsWith(version))
|
||||
continue outer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
MineTweakerAPI.registerClass(cls);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user