fix aw extension parsing
All checks were successful
Publish to snapshot maven / build (push) Successful in 28s
All checks were successful
Publish to snapshot maven / build (push) Successful in 28s
This commit is contained in:
parent
7ed5ed6f09
commit
d869085dd8
|
@ -7,7 +7,7 @@ plugins {
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "dev.frogmc"
|
group = "dev.frogmc"
|
||||||
version = "0.0.1-alpha.20"
|
version = "0.0.1-alpha.21"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[versions]
|
[versions]
|
||||||
|
|
||||||
thyroxine = "0.0.1-alpha.9"
|
thyroxine = "0.0.1-alpha.11"
|
||||||
nightconfig = "3.7.3"
|
nightconfig = "3.7.3"
|
||||||
mixin = "0.15.0+mixin.0.8.7"
|
mixin = "0.15.0+mixin.0.8.7"
|
||||||
annotations = "24.1.0"
|
annotations = "24.1.0"
|
||||||
|
|
|
@ -21,7 +21,8 @@ dependencies {
|
||||||
|
|
||||||
phytotelma {
|
phytotelma {
|
||||||
minecraft {
|
minecraft {
|
||||||
version = "1.21"
|
version = "1.21.1"
|
||||||
|
mappings = mojmap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ public class AWProcessor {
|
||||||
if (o instanceof Collection<?> c) {
|
if (o instanceof Collection<?> c) {
|
||||||
return c.stream().map(Object::toString);
|
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)
|
}).filter(Objects::nonNull).map(s -> "/" + s).map(AWProcessor.class::getResourceAsStream).filter(Objects::nonNull)
|
||||||
.map(InputStreamReader::new).map(BufferedReader::new).filter(r -> {
|
.map(InputStreamReader::new).map(BufferedReader::new).filter(r -> {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -139,7 +139,11 @@ public class MinecraftGamePlugin implements GamePlugin {
|
||||||
} else {
|
} else {
|
||||||
data = Files.readString(Paths.get(mappingPath));
|
data = Files.readString(Paths.get(mappingPath));
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
mappings = TinyV2Parser.parse(data);
|
mappings = TinyV2Parser.parse(data);
|
||||||
|
} catch (IllegalStateException e) {
|
||||||
|
throw new IllegalStateException("Failed to read intermediary mappings: " + data, e);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
mappings = MojmapProvider.get(version, remappedGamePath.resolveSibling("client-" + version + ".txt")).orElseGet(() -> {
|
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);
|
LOGGER.warn("Failed to retrieve/parse mojmap for {}! If it isn't available you will need to specify intermediary mappings yourself!", version);
|
||||||
|
|
Loading…
Reference in a new issue