File tree Expand file tree Collapse file tree
src/main/java/io/papermc/codebook Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3232import dev .denwav .hypo .core .HypoContext ;
3333import io .papermc .codebook .config .CodeBookContext ;
3434import io .papermc .codebook .config .CodeBookJarInput ;
35- import io .papermc .codebook .config .CodeBookResource ;
3635import io .papermc .codebook .exceptions .UnexpectedException ;
3736import io .papermc .codebook .exceptions .UserErrorException ;
3837import io .papermc .codebook .pages .CodeBookPage ;
@@ -104,11 +103,6 @@ private static Injector injector(final Module module) {
104103 }
105104
106105 private Module createInitialModule (final Path tempDir ) {
107- final @ Nullable CodeBookResource mappings = this .ctx .input ().resolveMappings (this .ctx , tempDir );
108- if (mappings == null ) {
109- throw new IllegalStateException ("No mappings file could be determined for the given configuration" );
110- }
111-
112106 final Path inputJar = this .ctx .input ().resolveInputFile (tempDir );
113107 final @ Nullable List <Path > classpathJars ;
114108 if (this .ctx .input () instanceof final CodeBookJarInput input ) {
Original file line number Diff line number Diff line change 2323package io .papermc .codebook .config ;
2424
2525import java .nio .file .Path ;
26- import org .checkerframework .checker .nullness .qual .Nullable ;
2726
2827public sealed interface CodeBookInput permits CodeBookVersionInput , CodeBookJarInput {
2928
@@ -36,9 +35,4 @@ static CodeBookJarInputBuilder ofJar() {
3635 }
3736
3837 Path resolveInputFile (final Path tempDir );
39-
40- // It's a bit odd for mappings to be here, but the MC version input can specify its own mappings
41- default @ Nullable CodeBookResource resolveMappings (final CodeBookContext ctx , final Path tempDir ) {
42- return null ;
43- }
4438}
Original file line number Diff line number Diff line change 2323package io .papermc .codebook .config ;
2424
2525import io .papermc .codebook .mojangapi .MinecraftManifest ;
26- import io .papermc .codebook .mojangapi .MinecraftVersionDownload ;
2726import io .papermc .codebook .mojangapi .MinecraftVersionManifest ;
2827import io .papermc .codebook .util .Downloader ;
2928import java .nio .file .Path ;
30- import org .checkerframework .checker .nullness .qual .Nullable ;
3129
3230public record CodeBookVersionInput (String mcVersion ) implements CodeBookInput {
3331
@@ -44,18 +42,4 @@ public Path resolveInputFile(final Path tempDir) {
4442 Downloader .downloadFile (versionManifest .serverDownload (), targetJar );
4543 return targetJar ;
4644 }
47-
48- @ Override
49- public CodeBookResource resolveMappings (final CodeBookContext ctx , final Path tempDir ) {
50- final @ Nullable CodeBookResource mappings = CodeBookInput .super .resolveMappings (ctx , tempDir );
51- if (mappings != null ) {
52- return mappings ;
53- }
54-
55- final var manifest = MinecraftManifest .getManifest ();
56- final var versionManifest = MinecraftVersionManifest .getManifestForVersion (manifest , this .mcVersion );
57-
58- final MinecraftVersionDownload mappingsDownload = versionManifest .serverMappingsDownload ();
59- return new CodeBookUriResource ("server_mappings.txt" , mappingsDownload .uri (), mappingsDownload .sha1 ());
60- }
6145}
You can’t perform that action at this time.
0 commit comments