Skip to content

Commit

Permalink
Update: README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
xfl03 committed Jan 27, 2023
1 parent e06d71a commit 3e6d0df
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public Stream<Path> scanCandidates() {
Path modFolder = FMLPaths.MODSDIR.get();
logger.debug("Mod folder {}", modFolder);
visitModDir(modFolder);
logger.info("Core path {}", modPath);
logger.debug("Core path {}", modPath);
if (modPath == null) {
return Stream.empty();
}
Expand All @@ -178,6 +178,7 @@ public Stream<Path> scanCandidates() {
Path mapped = gameFolder.resolve(
String.format("tmp/MoreCrashInfo-Core-%s.jar", VersionUtil.getMinecraftVersion()));
remapper.processJar(modPath, mapped);
logger.info("MoreCrashInfo ModLocator: {}", mapped);
return Stream.of(mapped);
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public void onLoad(IEnvironment env, Set<String> otherServices) throws Incompati
logger.debug("We are now at MoreCrashInfo TransformationService");
}

public static Path corePath;
// public static Path corePath;

private Path gameDir;

Expand All @@ -57,6 +57,7 @@ public void initialize(IEnvironment environment) {
String.format("tmp/MoreCrashInfo-Locator-%s.jar", VersionUtil.getMinecraftVersion()));
JarRemapper remapper = new JarRemapper();
remapper.processJar(modPath, mapped);
logger.info("MoreCrashInfo TransformationService: {}", mapped);
if (VersionUtil.getMinecraftMajorVersion() < 17) {
//Before 1.17, we can add jar to AppClassLoader
try {
Expand Down Expand Up @@ -119,11 +120,11 @@ private void visitModFile(Path path) {
modPath = gameDir.resolve("tmp/MoreCrashInfo-Locator.jar");
unzip(zip, ze, modPath);
}
ze = zip.getEntry("MoreCrashInfo-Core.jar");
if (ze != null) {
corePath = gameDir.resolve("tmp/MoreCrashInfo-Core.jar");
unzip(zip, ze, corePath);
}
// ze = zip.getEntry("MoreCrashInfo-Core.jar");
// if (ze != null) {
// corePath = gameDir.resolve("tmp/MoreCrashInfo-Core.jar");
// unzip(zip, ze, corePath);
// }
} catch (Exception e) {
logger.warn("Error while loading {}", path);
logger.warn(e);
Expand Down

This file was deleted.

4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Error Info:
```

## Compatibility
- Minecraft 1.13.2~1.16.5 & 1.18~1.19.3 with Forge
- Minecraft 1.13.2~1.19.3 with Forge
- Java 8~19

### Tested Environment
Expand All @@ -63,6 +63,7 @@ Error Info:
|:---------:|:--------:|:----:|
| 1.19.3 | 44.1.2 | 17 |
| 1.18.2 | 40.2.0 | 17 |
| 1.17.1 | 37.1.1 | 17 |
| 1.16.5 | 36.2.39 | 8 |
| 1.15.2 | 31.2.57 | 8 |
| 1.14.4 | 28.2.26 | 8 |
Expand All @@ -77,6 +78,7 @@ Please use Java 17+ in development or building environment.
**Build(Gradle `Task`) -> Loader(ModLauncher `ITransformerService`) -> Locator(ForgeSPI `IModLocator`) -> Base(Forge `Mod`)**

In every `->`(3 times), our mod use ASM to operate bytecode in class file.
Loader will try to add Locator into classpath, which will make `IModLocator` could be found by ServiceLoader. Our method can suite Java 8-19 and Module Layer with ModLauncher.

### Build
```shell
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/me/xfl03/morecrashinfo/MoreCrashInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@
public class MoreCrashInfo
{
public static Logger logger = LogManager.getLogger("MoreCrashInfo");
static {
logger.info("MoreCrashInfo Mod Loaded");
}
}

0 comments on commit 3e6d0df

Please sign in to comment.