Skip to content

Commit

Permalink
allow custom tiny tree
Browse files Browse the repository at this point in the history
Signed-off-by: Devan-Kerman <[email protected]>
  • Loading branch information
Devan-Kerman committed Jan 20, 2021
1 parent 1c91df5 commit 120dcfe
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ plugins {
apply plugin: net.minecrell.gradle.licenser.Licenser

group 'io.github.astrarre'
version '0.0.8'
version '0.0.10'

sourceCompatibility = 1.8

Expand Down
17 changes: 10 additions & 7 deletions src/main/java/net/fabricmc/mappingpoet/RemappingMappingsStore.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,9 @@ public class RemappingMappingsStore implements MappingsStore {
private final Remapper remapper;
private final String namespace = "named";

/**
* (map from abstracter output -> minecraft)
* @param remapper source -> mapping
*/
public RemappingMappingsStore(Path tinyFile, Remapper remapper) {
public RemappingMappingsStore(TinyTree tree, Remapper remapper) {
this.remapper = remapper;
final TinyTree mappings = readMappings(tinyFile);
for (ClassDef classDef : mappings.getClasses()) {
for (ClassDef classDef : tree.getClasses()) {
final String className = classDef.getName(namespace);

classes.put(className, classDef);
Expand All @@ -68,6 +63,14 @@ public RemappingMappingsStore(Path tinyFile, Remapper remapper) {
}
}

/**
* (map from abstracter output -> minecraft)
* @param remapper source -> mapping
*/
public RemappingMappingsStore(Path tinyFile, Remapper remapper) {
this(readMappings(tinyFile), remapper);
}

public RemappingMappingsStore(Path tinyFile, Map<String, String> manifest) {
this(tinyFile, new ManifestRemapper(manifest));
}
Expand Down

0 comments on commit 120dcfe

Please sign in to comment.