Skip to content

Commit

Permalink
Support user-supplied access transformers when only using NeoForm (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
shartte authored Jun 18, 2024
1 parent 7821d76 commit cdd3eb1
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ protected void runWithNeoFormEngine(NeoFormEngine engine, List<AutoCloseable> cl

var transformSources = getOrAddTransformSourcesNode(engine);
transformSources.setAccessTransformersData(List.of("neoForgeAccessTransformers"));
transformSources.setAdditionalAccessTransformers(additionalAccessTransformers.stream().map(Paths::get).toList());

// Add NeoForge libraries to the list of libraries
transforms.add(new ModifyAction<>(
Expand Down Expand Up @@ -127,6 +126,11 @@ protected void runWithNeoFormEngine(NeoFormEngine engine, List<AutoCloseable> cl
engine.loadNeoFormData(MavenCoordinate.parse(sourceArtifacts.neoform), dist);
}

if (!additionalAccessTransformers.isEmpty()) {
var transformSources = getOrAddTransformSourcesNode(engine);
transformSources.setAdditionalAccessTransformers(additionalAccessTransformers.stream().map(Paths::get).toList());
}

if (parchmentData != null) {
var transformSources = getOrAddTransformSourcesNode(engine);
var parchmentDataFile = artifactManager.get(parchmentData);
Expand Down

0 comments on commit cdd3eb1

Please sign in to comment.