generated from FabricMC/fabric-example-mod
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4e1a122
commit d858112
Showing
25 changed files
with
600 additions
and
457 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,95 +1,71 @@ | ||
plugins { | ||
id 'fabric-loom' version '1.5-SNAPSHOT' | ||
id 'maven-publish' | ||
id 'dev.architectury.loom' version '1.6-SNAPSHOT' | ||
id 'maven-publish' | ||
} | ||
|
||
sourceCompatibility = JavaVersion.VERSION_17 | ||
targetCompatibility = JavaVersion.VERSION_17 | ||
|
||
archivesBaseName = project.archives_base_name | ||
version = project.mod_version | ||
group = project.maven_group | ||
version = project.mod_version | ||
|
||
repositories { | ||
maven { | ||
name = "Modrinth" | ||
url = "https://api.modrinth.com/maven" | ||
content { | ||
includeGroup "maven.modrinth" | ||
} | ||
} | ||
maven { | ||
url = "https://maven.terraformersmc.com" | ||
} | ||
maven { | ||
name = 'minelp' | ||
url = 'https://repo.minelittlepony-mod.com/maven/snapshot' | ||
} | ||
maven { | ||
name = 'minelp-release' | ||
url = 'https://repo.minelittlepony-mod.com/maven/release' | ||
} | ||
// Add repositories to retrieve artifacts from in here. | ||
// You should only use this when depending on other mods because | ||
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically. | ||
// See https://docs.gradle.org/current/userguide/declaring_repositories.html | ||
// for more information about repositories. | ||
base { | ||
archivesName = project.archives_name | ||
} | ||
|
||
dependencies { | ||
// To change the versions see the gradle.properties file | ||
minecraft "com.mojang:minecraft:${project.minecraft_version}" | ||
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2" | ||
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" | ||
loom { | ||
forge { | ||
mixinConfig 'cavedust.mixins.json' | ||
} | ||
} | ||
|
||
// Fabric API. This is technically optional, but you probably want it anyway. | ||
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" | ||
modImplementation "com.terraformersmc:modmenu:${project.modmenu_version}" | ||
modApi "com.minelittlepony:kirin:${project.kirin_version}" | ||
include "com.minelittlepony:kirin:${project.kirin_version}" | ||
repositories { | ||
// Add repositories to retrieve artifacts from in here. | ||
// You should only use this when depending on other mods because | ||
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically. | ||
// See https://docs.gradle.org/current/userguide/declaring_repositories.html | ||
// for more information about repositories. | ||
} | ||
|
||
modCompileOnly("com.terraformersmc:modmenu:${project.modmenu_version}") | ||
dependencies { | ||
minecraft "net.minecraft:minecraft:$project.minecraft_version" | ||
mappings "net.fabricmc:yarn:$project.yarn_mappings:v2" | ||
forge "net.minecraftforge:forge:$project.forge_version" | ||
modApi "dev.architectury:architectury-forge:${rootProject.architectury_version}" | ||
} | ||
|
||
processResources { | ||
inputs.property "version", project.version | ||
inputs.property 'version', project.version | ||
|
||
filesMatching("fabric.mod.json") { | ||
expand "version": project.version | ||
} | ||
} | ||
|
||
tasks.withType(JavaCompile).configureEach { | ||
// Minecraft 1.18 (1.18-pre2) upwards uses Java 17. | ||
it.options.release = 17 | ||
filesMatching('META-INF/mods.toml') { | ||
expand version: project.version | ||
} | ||
} | ||
|
||
java { | ||
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task | ||
// if it is present. | ||
// If you remove this line, sources will not be generated. | ||
withSourcesJar() | ||
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task | ||
// if it is present. | ||
// If you remove this line, sources will not be generated. | ||
withSourcesJar() | ||
|
||
sourceCompatibility = JavaVersion.VERSION_17 | ||
targetCompatibility = JavaVersion.VERSION_17 | ||
} | ||
|
||
jar { | ||
from("LICENSE") { | ||
rename { "${it}_${project.archivesBaseName}"} | ||
} | ||
tasks.withType(JavaCompile).configureEach { | ||
it.options.release = 17 | ||
} | ||
|
||
// configure the maven publication | ||
// Configure Maven publishing. | ||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
from components.java | ||
} | ||
} | ||
publications { | ||
mavenJava(MavenPublication) { | ||
from components.java | ||
} | ||
} | ||
|
||
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing. | ||
repositories { | ||
// Add repositories to publish to here. | ||
// Notice: This block does NOT have the same function as the block in the top level. | ||
// The repositories here will be used for publishing your artifact, not for | ||
// retrieving dependencies. | ||
} | ||
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing. | ||
repositories { | ||
// Add repositories to publish to here. | ||
// Notice: This block does NOT have the same function as the block in the top level. | ||
// The repositories here will be used for publishing your artifact, not for | ||
// retrieving dependencies. | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,16 @@ | ||
# Done to increase the memory available to gradle. | ||
# Done to increase the memory available to Gradle. | ||
org.gradle.jvmargs=-Xmx1G | ||
loom.platform = forge | ||
|
||
# Fabric Properties | ||
# check these on https://fabricmc.net/develop | ||
minecraft_version=1.20.4 | ||
yarn_mappings=1.20.4+build.3 | ||
loader_version=0.15.5 | ||
# Mod properties | ||
mod_version = 3.0.0 | ||
maven_group = net.lizistired | ||
archives_name = cavedust | ||
|
||
# Mod Properties | ||
mod_version=1.4.1 | ||
maven_group=com.lizistired | ||
archives_base_name=cave_dust | ||
# Minecraft properties | ||
minecraft_version = 1.20.4 | ||
yarn_mappings = 1.20.4+build.1 | ||
|
||
# Dependencies | ||
fabric_version=0.94.0+1.20.4 | ||
clothconfig_version=13.0.121 | ||
modmenu_version=9.0.0 | ||
kirin_version=1.17.0+1.20.4 | ||
forge_version = 1.20.4-49.0.50 | ||
architectury_version=11.1.17 |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip | ||
networkTimeout=10000 | ||
validateDistributionUrl=true | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
pluginManagement { | ||
repositories { | ||
maven { | ||
name = 'Fabric' | ||
url = 'https://maven.fabricmc.net/' | ||
} | ||
mavenCentral() | ||
maven { url "https://maven.fabricmc.net/" } | ||
maven { url "https://maven.architectury.dev/" } | ||
maven { url "https://files.minecraftforge.net/maven/" } | ||
gradlePluginPortal() | ||
} | ||
} | ||
|
||
rootProject.name = 'cavedust' |
10 changes: 10 additions & 0 deletions
10
src/main/java/net/lizistired/cavedust/ButtonWidgetMine.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package net.lizistired.cavedust; | ||
|
||
import net.minecraft.client.gui.widget.ButtonWidget; | ||
import net.minecraft.text.Text; | ||
|
||
public class ButtonWidgetMine extends ButtonWidget { | ||
protected ButtonWidgetMine(int x, int y, int width, int height, Text message, PressAction onPress, NarrationSupplier narrationSupplier) { | ||
super(x, y, width, height, message, onPress, narrationSupplier); | ||
} | ||
} |
Oops, something went wrong.