Skip to content

Commit

Permalink
Fixed formatting and some build warnings
Browse files Browse the repository at this point in the history
Signed-off-by: TreyRuffy <[email protected]>
  • Loading branch information
TreyRuffy committed Nov 14, 2021
1 parent 832b78a commit 53ad0e2
Show file tree
Hide file tree
Showing 12 changed files with 473 additions and 489 deletions.
514 changes: 257 additions & 257 deletions .checkstyle/checkstyle.xml

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ In order to effectively contribute to our project, you need to follow these requ
### Compiling
You can compile the source code here:
1. Clone this project to your local machine
2. This project is split into three parts.
1. `common` holds all the common files between Forge and Fabric
2. `fabric` holds all the files for only Fabric
3. `forge` holds all the files for only Forge
3. Type `./gradlew build` in a terminal to build the project. On Windows, leave out `./` at the beginning for all
2. This project is split into three parts.
1. `common` holds all the common files between Forge and Fabric
2. `fabric` holds all the files for only Fabric
3. `forge` holds all the files for only Forge
3. Type `./gradlew build` in a terminal to build the project. On Windows, leave out `./` at the beginning for all
`gradlew` commands if nothing works.
4. `cd` into either the `fabric` or `forge` directory, then `cd` to `build/libs` and the compiled mod will be in the
4. `cd` into either the `fabric` or `forge` directory, then `cd` to `build/libs` and the compiled mod will be in the
format `betterf3-{version}-{modloader}.jar` (subject to change).

### Pull Requests
Expand Down
82 changes: 41 additions & 41 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,55 +1,55 @@
plugins {
id "architectury-plugin" version "3.4-SNAPSHOT" // Uses Architectury plugin https://github.com/architectury/architectury-plugin
id "dev.architectury.loom" version "0.10.0-SNAPSHOT" apply false // Uses Architectury Loom
// (fork of Fabric Loom) https://github.com/architectury/architectury-loom - does not apply to root project
id "net.kyori.indra.git" version "2.0.6" // Uses Indra Git plugin
id "net.kyori.indra.checkstyle" version "2.0.6" // Uses Indra Checkstyle plugin
id "architectury-plugin" version "3.4-SNAPSHOT" // Uses Architectury plugin https://github.com/architectury/architectury-plugin
id "dev.architectury.loom" version "0.10.0-SNAPSHOT" apply false // Uses Architectury Loom
// (fork of Fabric Loom) https://github.com/architectury/architectury-loom - does not apply to root project
id "net.kyori.indra" version "2.0.6" // Uses Indra plugin
id "net.kyori.indra.git" version "2.0.6" // Uses Indra Git plugin
id "net.kyori.indra.checkstyle" version "2.0.6" // Uses Indra Checkstyle plugin
}

architectury {
minecraft = rootProject.minecraft_version // Sets Minecraft version from gradle.properties
minecraft = rootProject.minecraft_version // Sets Minecraft version from gradle.properties
}


subprojects {
apply plugin: "dev.architectury.loom" // Applies Architectury Loom to subprojects
apply plugin: "dev.architectury.loom" // Applies Architectury Loom to subprojects

loom {
silentMojangMappingsLicense() // Silences the annoying as hell Mojang License text
}
loom {
silentMojangMappingsLicense() // Silences the annoying as hell Mojang License text
}

dependencies {
minecraft "com.mojang:minecraft:${rootProject.minecraft_version}" // Minecraft dependency
//mappings loom.officialMojangMappings() // Maps Minecraft so we can tell what classes are what - official mappings
mappings "net.fabricmc:yarn:${rootProject.yarn_version}:v2" // Alternative, open, mappings from Fabric
}
dependencies {
minecraft "com.mojang:minecraft:${rootProject.minecraft_version}" // Minecraft dependency
//mappings loom.officialMojangMappings() // Maps Minecraft so we can tell what classes are what - official mappings
mappings "net.fabricmc:yarn:${rootProject.yarn_version}:v2" // Alternative, open, mappings from Fabric
}
}

allprojects {
apply plugin: "java"
apply plugin: "architectury-plugin" // Applies architectury plugin to all projects
apply plugin: "maven-publish"
apply plugin: "net.kyori.indra" // Applies Indra to all projects
apply plugin: "net.kyori.indra.git" // Applies Indra Git to all projects
apply plugin: "net.kyori.indra.checkstyle" // Applies Indra Checkstyle to all projects

archivesBaseName = rootProject.archives_base_name // sets the archive name from gradle.properties
version = rootProject.mod_version // sets the version from gradle.properties
group = rootProject.maven_group // sets the maven group from gradle.properties
indra {
checkstyle("8.41.1")
javaVersions {
target(16)
testWith(16)
}
}

java {
withSourcesJar()
}

compileJava {
options.compilerArgs += "-Xlint:-processing" // Fixes "no processor claimed any of these annotations" warning
}
apply plugin: "java"
apply plugin: "architectury-plugin" // Applies architectury plugin to all projects
apply plugin: "maven-publish"
apply plugin: "net.kyori.indra" // Applies Indra to all projects
apply plugin: "net.kyori.indra.git" // Applies Indra Git to all projects
apply plugin: "net.kyori.indra.checkstyle" // Applies Indra Checkstyle to all projects

archivesBaseName = rootProject.archives_base_name // sets the archive name from gradle.properties
version = rootProject.mod_version // sets the version from gradle.properties
group = rootProject.maven_group // sets the maven group from gradle.properties
indra {
checkstyle("8.41.1")
javaVersions {
target(16)
testWith(16)
}
}

java {
withSourcesJar()
}

compileJava {
options.compilerArgs += "-Xlint:-processing" // Fixes "no processor claimed any of these annotations" warning
}

}
65 changes: 31 additions & 34 deletions common/build.gradle
Original file line number Diff line number Diff line change
@@ -1,59 +1,56 @@
repositories {
maven { url "https://maven.shedaniel.me/" } // cloth-config repository
mavenCentral()
maven { url "https://maven.shedaniel.me/" } // cloth-config repository
mavenCentral()
}

configurations {
shadowCommon // Don"t use shadow from the shadow plugin because we don"t want IDEA to index this.
shadowCommon // Don"t use shadow from the shadow plugin because we don"t want IDEA to index this.
}

dependencies {
// We depend on fabric loader here to use the fabric @Environment annotations and get the mixin dependencies
// Do NOT use other classes from fabric loader
modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}"
// We depend on fabric loader here to use the fabric @Environment annotations and get the mixin dependencies
// Do NOT use other classes from fabric loader
modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}"

modImplementation "me.shedaniel.cloth:cloth-config:${project.cloth_version}", {
exclude module: "fabric-api"
}
modImplementation "me.shedaniel.cloth:cloth-config:${project.cloth_version}", {
exclude module: "fabric-api"
}

implementation "com.electronwill.night-config:json:3.6.4"
shadowCommon "com.electronwill.night-config:json:3.6.4"
implementation "com.electronwill.night-config:json:3.6.4"
shadowCommon "com.electronwill.night-config:json:3.6.4"
}

loom {
accessWidenerPath.set(file("src/main/resources/betterf3.accesswidener"))
/*common {
mixinConfig "betterf3.mixins.json"
}*/
accessWidenerPath.set(file("src/main/resources/betterf3.accesswidener"))
/*common {
mixinConfig "betterf3.mixins.json"
}*/
}

architectury {
if (rootProject.forge_enabled.toBoolean()) {
common()
} else {
common(false)
}
if (rootProject.forge_enabled.toBoolean()) {
common()
} else {
common(false)
}
}

afterEvaluate {
remapJar {
remapAccessWidener = false
}
remapJar {
remapAccessWidener.set(false)
}
}

java {
withSourcesJar()
withSourcesJar()
}

publishing {
publications {
mavenCommon(MavenPublication) {
artifactId = rootProject.archives_base_name
// add all the jars that should be included when publishing to maven
artifact remapJar
artifact(sourcesJar) {
builtBy remapSourcesJar
}
}
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ private ModConfigFile() {

}


final List<Config> configsRight = new ArrayList<>();

for (final BaseModule module : BaseModule.modulesRight) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
@Mixin(ClientChunkManager.class)
public interface ClientChunkManagerAccessor {


/**
* Gets the chunk cache storage.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
@Mixin(WorldRenderer.class)
public interface WorldRendererAccessor {


/**
* Gets the world renderer view area.
*
Expand Down
6 changes: 3 additions & 3 deletions common/src/main/resources/assets/betterf3/lang/ja_jp.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@
"config.betterf3.modules.delete_button": "モジュール削除",
"config.betterf3.modules.done_button": "完了",
"config.betterf3.add_button.module_name": "モジュール名",
"config.bettef3.order_left_button": "左モジュール",
"config.bettef3.order_right_button": "右モジュール",
"config.bettef3.general_settings": "一般設定",
"config.betterf3.order_left_button": "左モジュール",
"config.betterf3.order_right_button": "右モジュール",
"config.betterf3.general_settings": "一般設定",

"text.betterf3.module.minecraft": "Minecraft",
"text.betterf3.module.fps": "FPS",
Expand Down
14 changes: 7 additions & 7 deletions docs/developers/CreateModule.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
### It's actually relatively easy to create a new BetterF3 module.

### Steps
1. Open the [Help Module](../../common/src/main/java/me/cominixo/betterf3/modules/HelpModule.java) while reading
this in order to get a better understanding of what is happening.
1. Open the [Help Module](../../common/src/main/java/me/cominixo/betterf3/modules/HelpModule.java) while reading
this in order to get a better understanding of what is happening.
2. Create a class which extends `(me.cominixo.betterf3.modules.BaseModule)`
3. Instantiate the class
1. Set `defaultNameColor` and `defaultValueColor`
2. Set `nameColor` and `valueColor` to the same values
3. Add lines to the `lines` list
1. `lines.add(new me.cominixo.betterf3.utils.DebugLine({line name}));`
1. Set `defaultNameColor` and `defaultValueColor`
2. Set `nameColor` and `valueColor` to the same values
3. Add lines to the `lines` list
1. `lines.add(new me.cominixo.betterf3.utils.DebugLine({line name}));`
4. Create a `private void update(MinecraftClient)` method
1. Place line information in here
1. Place line information in here
5. In your mod startup class, include `new {your module class}.init()` to initialize your module
6. For every line you have added, add `text.betterf3.line.{line name}` with the name of the line in your language file
Loading

0 comments on commit 53ad0e2

Please sign in to comment.