File tree Expand file tree Collapse file tree
java/pl/olafcio/avoid_platform Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5353 it. quilt = quilt
5454}
5555
56- if (sponge) {
56+ if (sponge || paper ) {
5757 apply plugin : ' com.gradleup.shadow'
5858}
5959
@@ -150,6 +150,11 @@ if (sponge) {
150150 relocate(" com.llamalad7.mixinextras" , " pl.olafcio.avoid.__shadow__.mixinextras" )
151151 mergeServiceFiles() // Very important!
152152 }
153+ } else if (paper) {
154+ shadowJar {
155+ configurations = [project. configurations. shadow]
156+ relocate(" org.objectweb.asm" , " pl.olafcio.avoid.__shadow__.asm" )
157+ }
153158}
154159
155160code {
@@ -199,6 +204,12 @@ dependencies {
199204 compileOnly " io.github.llamalad7:mixinextras-fabric:0.5.4"
200205 } else if (paper) {
201206 implementation (" omit_mappings" in project. getProperties() ? " io.papermc.paper:paper-api:${ project.minecraft_version} .build.+" : " io.papermc.paper:paper-api:${ project.minecraft_version} -R0.1-SNAPSHOT" )
207+
208+ // TODO Why not download this at runtime with Spigot library-downloader?
209+ // Are they inherited into Paper?
210+
211+ append(compileOnly(" org.ow2.asm:asm:9.8" )) // Used in API
212+ append(compileOnly(" org.ow2.asm:asm-tree:9.8" )) // Used in API
202213 } else if (quilt) {
203214 implementation " net.fabricmc:sponge-mixin:0.17.3+mixin.0.8.7"
204215 implementation " io.github.llamalad7:mixinextras-fabric:0.5.4"
Original file line number Diff line number Diff line change 1+ java/pl/olafcio/avoid/Util.java == main
Original file line number Diff line number Diff line change 1+ fabric
Original file line number Diff line number Diff line change 1- package pl .olafcio .avoid_impl ;
1+ package pl .olafcio .avoid_platform ;
22
33import org .bukkit .Bukkit ;
44import org .jetbrains .annotations .ApiStatus ;
5- import pl .olafcio .avoid .RunningEnv ;
6- import pl .olafcio .avoid .mods .ModEnvironment ;
7- import pl .olafcio .avoid .platform .PlatformContact ;
8- import pl .olafcio .avoid .platform .PlatformContributor ;
9- import pl .olafcio .avoid .platform .PlatformDependency ;
10- import pl .olafcio .avoid .platform .PlatformMod ;
5+ import pl .olafcio .avoid .platform . RunningEnv ;
6+ import pl .olafcio .avoid .util .ModEnvironment ;
7+ import pl .olafcio .avoid .platform .mod . PlatformContact ;
8+ import pl .olafcio .avoid .platform .mod . PlatformContributor ;
9+ import pl .olafcio .avoid .platform .mod . PlatformDependency ;
10+ import pl .olafcio .avoid .platform .mod . PlatformMod ;
1111
1212import java .nio .file .Path ;
1313import java .util .*;
Original file line number Diff line number Diff line change 1+ package pl .olafcio .avoid_platform ;
2+
3+ import org .jetbrains .annotations .ApiStatus ;
4+ import pl .olafcio .avoid_loader .subloaders .ITransformer ;
5+
6+ import java .lang .invoke .MethodHandles ;
7+ import java .nio .file .Path ;
8+ import java .util .List ;
9+
10+ @ ApiStatus .Internal
11+ public final class PMLImpl {
12+ private PMLImpl () {}
13+
14+ public static void addToClasspath (Path path , String ... startupPackages ) {
15+ throw new RuntimeException ("[PreModLoader#addToClasspath] Not implemented on Sponge" );
16+ }
17+
18+ public static void addTransformer (ITransformer transformer ) {
19+ throw new RuntimeException ("[PreModLoader#addToClasspath] Not implemented on Sponge" );
20+ }
21+ }
You can’t perform that action at this time.
0 commit comments