File tree Expand file tree Collapse file tree 3 files changed +22
-10
lines changed
src/main/java/com/example Expand file tree Collapse file tree 3 files changed +22
-10
lines changed Original file line number Diff line number Diff line change 1+ val moduleName by extra(" dev.faststats.fabric" )
2+
3+ plugins {
4+ id(" fabric-loom" ) version (" 1.15-SNAPSHOT" )
5+ }
6+
7+ dependencies {
8+ api(project(" :core" ))
9+ mappings(loom.officialMojangMappings())
10+ minecraft(" com.mojang:minecraft:1.21.11" )
11+ modCompileOnly(" net.fabricmc.fabric-api:fabric-api:0.139.4+1.21.11" )
12+ modImplementation(" net.fabricmc:fabric-loader:0.18.4" )
13+ }
Original file line number Diff line number Diff line change 11plugins {
2- id(" net.fabricmc.fabric-loom-remap" ) version " 1.14-SNAPSHOT"
3- }
4-
5- loom {
6- splitEnvironmentSourceSets()
2+ id(" fabric-loom" )
73}
84
95dependencies {
106 implementation(project(" :fabric" ))
117 mappings(loom.officialMojangMappings())
128 minecraft(" com.mojang:minecraft:1.21.11" )
13- modImplementation (" net.fabricmc:fabric-loader:0.18.4" )
9+ modCompileOnly (" net.fabricmc:fabric-loader:0.18.4" )
1410}
1511
1612tasks.jar {
17- from(project(" :fabric" ).tasks.jar)
18- from(project(" :core" ).tasks.jar)
13+ duplicatesStrategy = DuplicatesStrategy .EXCLUDE
14+ from(project(" :fabric" ).sourceSets[" main" ].output)
15+ from(project(" :core" ).sourceSets[" main" ].output)
1916}
Original file line number Diff line number Diff line change 66import dev .faststats .fabric .FabricMetrics ;
77import net .fabricmc .api .ModInitializer ;
88
9+ import java .net .URI ;
10+
911public class ExampleMod implements ModInitializer {
1012 // context-aware error tracker, automatically tracks errors in the same class loader
1113 public static final ErrorTracker ERROR_TRACKER = ErrorTracker .contextAware ();
@@ -14,7 +16,7 @@ public class ExampleMod implements ModInitializer {
1416 public static final ErrorTracker CONTEXT_UNAWARE_ERROR_TRACKER = ErrorTracker .contextUnaware ();
1517
1618 private final Metrics metrics = FabricMetrics .factory ()
17- // .url(URI.create("https://metrics.example.com/v1/collect")) // For self-hosted metrics servers only
19+ .url (URI .create ("https://metrics.example.com/v1/collect" )) // For self-hosted metrics servers only
1820
1921 // Custom example charts
2022 // For this to work you have to create a corresponding data source in your project settings first
@@ -31,7 +33,7 @@ public class ExampleMod implements ModInitializer {
3133
3234 .debug (true ) // Enable debug mode for development and testing
3335
34- .token ("sadlskmsldmkfglsdkmfgksjdfhngkjd " ) // required -> token can be found in the settings of your project
36+ .token ("YOUR_TOKEN_HERE " ) // required -> token can be found in the settings of your project
3537 .create ("example-mod" ); // your mod id as defined in fabric.mod.json
3638
3739 public void doSomethingWrong () {
You can’t perform that action at this time.
0 commit comments