fix aw extension parsing
All checks were successful
Publish to snapshot maven / build (push) Successful in 28s

This commit is contained in:
moehreag 2024-08-20 15:12:48 +02:00
parent 7ed5ed6f09
commit d869085dd8
5 changed files with 10 additions and 5 deletions

View file

@ -7,7 +7,7 @@ plugins {
}
group = "dev.frogmc"
version = "0.0.1-alpha.20"
version = "0.0.1-alpha.21"
repositories {
maven {

View file

@ -1,6 +1,6 @@
[versions]
thyroxine = "0.0.1-alpha.9"
thyroxine = "0.0.1-alpha.11"
nightconfig = "3.7.3"
mixin = "0.15.0+mixin.0.8.7"
annotations = "24.1.0"

View file

@ -21,7 +21,8 @@ dependencies {
phytotelma {
minecraft {
version = "1.21"
version = "1.21.1"
mappings = mojmap()
}
}

View file

@ -34,7 +34,7 @@ public class AWProcessor {
if (o instanceof Collection<?> c) {
return c.stream().map(Object::toString);
}
return Stream.of(o.toString());
return o == null ? null : Stream.of(o.toString());
}).filter(Objects::nonNull).map(s -> "/" + s).map(AWProcessor.class::getResourceAsStream).filter(Objects::nonNull)
.map(InputStreamReader::new).map(BufferedReader::new).filter(r -> {
try {

View file

@ -139,7 +139,11 @@ public class MinecraftGamePlugin implements GamePlugin {
} else {
data = Files.readString(Paths.get(mappingPath));
}
try {
mappings = TinyV2Parser.parse(data);
} catch (IllegalStateException e) {
throw new IllegalStateException("Failed to read intermediary mappings: " + data, e);
}
} else {
mappings = MojmapProvider.get(version, remappedGamePath.resolveSibling("client-" + version + ".txt")).orElseGet(() -> {
LOGGER.warn("Failed to retrieve/parse mojmap for {}! If it isn't available you will need to specify intermediary mappings yourself!", version);