Skip to content

Commit

Permalink
Setup mod
Browse files Browse the repository at this point in the history
  • Loading branch information
Treetrain1 committed Jul 15, 2024
1 parent 7f3043a commit ab302a9
Show file tree
Hide file tree
Showing 20 changed files with 118 additions and 266 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@ jobs:
- name: Capture Build Artifacts
uses: actions/upload-artifact@v3
with:
name: TemplateMod-Artifacts-${{ steps.ref.outputs.branch }}
name: Unforked-Artifacts-${{ steps.ref.outputs.branch }}
path: build/libs/
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing

By contributing to the Template Mod, you agree with the [Developer Certificate of Origin (DCO)][DCO].
By contributing to Unforked, you agree with the [Developer Certificate of Origin (DCO)][DCO].

## Conventions

Expand All @@ -22,7 +22,7 @@ than browsing files.

### Spelling

Use American English to keep consistency across Template Mod.
Use American English to keep consistency across Unforked.

If there is more than one acceptable spelling of the same word, first check if one word is already
being used in Wilder Wild, FrozenLib, or in Mojang's Mappings, and if not, use the spelling that is most commonly used.
Expand Down Expand Up @@ -52,22 +52,22 @@ Avoid the use of abbreviations in javadocs, except if they describe the name of
### Mixins

The `$` character can be used in mixins to mark a semantic separation in the name.
It allows to separate the actual name of the variable and the namespace, `frozenBlockTemplateMod`.
It allows to separate the actual name of the variable and the namespace, `Unforked`.

Fields marked as `@Unique` must be prefixed with `frozenBlockTemplateMod$` or `FROZENBLOCKTEMPLATEMOD$` if the field is static and final.
Fields marked as `@Unique` must be prefixed with `unforked$` or `UNFORKED$` if the field is static and final.
Methods marked with `@Unique` do not need prefixes.


## Licensing & DCO

FrozenBlock Template Mod is licensed under [LGPL 3.0][LICENSE], and it has a [Developer Certificate of Origin (DCO)][DCO], which you are required to agree with to contribute.
Unforked is licensed under [LGPL 3.0][LICENSE], and it has a [Developer Certificate of Origin (DCO)][DCO], which you are required to agree with to contribute.
Specifying the commit author may be sufficient, but a [sign-off can be also added](https://git-scm.com/docs/git-commit#Documentation/git-commit.txt--s).
Legal names are not required.

---

**Note: This document is currently incomplete.**

[LICENSE]: ./LICENSE "FrozenBlock Template Mod license file"
[LICENSE]: ./LICENSE "Unforked license file"

[DCO]: ./DEVELOPER_CERTIFICATE_OF_ORIGIN.md "Developer Certificate of Origin file"
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# FrozenBlock's Template Mod
# Unforked

## Setup

For setup instructions please see the [fabric wiki page](https://fabricmc.net/wiki/tutorial:setup) that relates to the IDE that you are using.

## Mod Branding

You must change all instances of "TemplateMod", "frozenblock_template_mod",
and "FrozenBlockTemplateMod" to the desired mod name.
123 changes: 10 additions & 113 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ buildscript {

plugins {
id("fabric-loom") version("+")
id("io.github.juuxel.loom-quiltflower") version("+")
id("org.quiltmc.gradle.licenser") version("+")
id("org.ajoberstar.grgit") version("+")
id("com.modrinth.minotaur") version("+")
Expand All @@ -35,7 +34,7 @@ plugins {
idea
`java-library`
java
kotlin("jvm") version("1.9.0")
kotlin("jvm") version("2.0.0")
}

val minecraft_version: String by project
Expand All @@ -54,35 +53,11 @@ val fabric_kotlin_version: String by project
val fabric_asm_version: String by project
val frozenlib_version: String by project

val betterend_version: String by project
val betternether_version: String by project
val modmenu_version: String by project
val cloth_config_version: String by project
val copperpipes_version: String by project
val nbtcrafting_version: String by project
val terrablender_version: String by project
val terralith_version: String by project
val tomsstorage_version: String by project

val sodium_version: String by project
val iris_version: String by project
val indium_version: String by project
val sodium_extra_version: String by project
val reeses_sodium_options_version: String by project
val lithium_version: String by project
val fastanim_version: String by project
val ferritecore_version: String by project
val lazydfu_version: String by project
val starlight_version: String by project
val entityculling_version: String by project
val memoryleakfix_version: String by project
val no_unused_chunks_version: String by project

base {
archivesName.set(archives_base_name)
}

version = getVersion()
version = getModVersion()
group = maven_group

val local_frozenlib = findProject(":FrozenLib") != null
Expand Down Expand Up @@ -214,8 +189,8 @@ dependencies {
minecraft("com.mojang:minecraft:${minecraft_version}")
mappings(loom.layered {
// please annoy treetrain if this doesnt work
mappings("org.quiltmc:quilt-mappings:${quilt_mappings}:intermediary-v2")
parchment("org.parchmentmc.data:parchment-${parchment_mappings}@zip")
//mappings("org.quiltmc:quilt-mappings:${quilt_mappings}:intermediary-v2")
//parchment("org.parchmentmc.data:parchment-${parchment_mappings}@zip")
officialMojangMappings {
nameSyntheticMembers = false
}
Expand All @@ -235,84 +210,6 @@ dependencies {
} else {
modImplementation("maven.modrinth:frozenlib:${frozenlib_version}")?.let { include(it) }
}

// CaffeineConfig
//include(modImplementation("net.caffeinemc:mixin-config:1.0.0+1.17"))

// Simple Copper Pipes
modCompileOnly("maven.modrinth:simple-copper-pipes:${copperpipes_version}")

// Mod Menu
modCompileOnly("com.terraformersmc:modmenu:${modmenu_version}")

// Cloth Config
modCompileOnly("me.shedaniel.cloth:cloth-config-fabric:${cloth_config_version}") {
exclude(group = "net.fabricmc.fabric-api")
exclude(group = "com.terraformersmc")
}

// Brush Extender
modImplementation("com.github.Treetrain1:BrushExtender:main-SNAPSHOT")?.let { include(it) }

// NBT Crafting
modImplementation("com.github.Treetrain1:nbt-crafting:jitpack-1.20-SNAPSHOT")?.let { include(it) }

// CaffeineConfig
modImplementation("net.caffeinemc:mixin-config:1.0.0+1.17")?.let { include(it) }

// TerraBlender
modCompileOnly("com.github.glitchfiend:TerraBlender-fabric:${terrablender_version}")

// Sodium
modCompileOnly("maven.modrinth:sodium:${sodium_version}")
modCompileOnly("org.anarres:jcpp:1.4.14")

// BetterEnd
modCompileOnly("maven.modrinth:betterend:${betterend_version}")

// BetterNether
modCompileOnly("maven.modrinth:betternether:${betternether_version}")
/*
// only affects runClient, does not affect gradlew build.
// add -PuseThirdPartyMods=false to not use these
if (findProperty("useThirdPartyMods") != "false") {
modRuntimeOnly("maven.modrinth:ferrite-core:${ferritecore_version}")
modRuntimeOnly("maven.modrinth:lazydfu:${lazydfu_version}")
modRuntimeOnly("maven.modrinth:starlight:${starlight_version}")
modRuntimeOnly("maven.modrinth:lithium:${lithium_version}")
modRuntimeOnly("maven.modrinth:fastanim:${fastanim_version}")
modRuntimeOnly("maven.modrinth:entityculling:${entityculling_version}")
modRuntimeOnly("maven.modrinth:memoryleakfix:${memoryleakfix_version}")
modRuntimeOnly("maven.modrinth:no-unused-chunks:${no_unused_chunks_version}")
//modRuntimeOnly("maven.modrinth:exordium:${exordium_version}")
//modRuntimeOnly("maven.modrinth:entity-collision-fps-fix:${entity_collision_fps_fix_version}")
//modRuntimeOnly("maven.modrinth:cull-less-leaves:${cull_less_leaves_version}")
//modRuntimeOnly("maven.modrinth:c2me-fabric:${c2me_version}")
//modRuntimeOnly("maven.modrinth:moreculling:${more_culling_version}")
//modRuntimeOnly("maven.modrinth:smoothboot-fabric:${smoothboot_version}")
}
// only affects runClient, does not affect gradlew build.
// add -PuseExperimentalThirdParty=true to the gradle runClient
// command to use these
if (findProperty("useExperimentalThirdParty") == "true") {
modRuntimeOnly("maven.modrinth:terralith:${terralith_version}")
modRuntimeOnly("maven.modrinth:sodium:${sodium_version}")
modRuntimeOnly("org.joml:joml:1.10.4")
modRuntimeOnly("org.anarres:jcpp:1.4.14")
//modRuntimeOnly "maven.modrinth:iris:${iris_version}"
modRuntimeOnly("maven.modrinth:indium:${indium_version}")
modRuntimeOnly("me.flashyreese.mods:reeses-sodium-options:${reeses_sodium_options_version}") {
exclude(group = "net.coderbot.iris_mc1_19", module = "iris")
}
modRuntimeOnly("me.flashyreese.mods:sodium-extra-fabric:${sodium_extra_version}")
modRuntimeOnly("io.github.douira:glsl-transformer:0.27.0")
}*/
}

quiltflower {
quiltflowerVersion.set("1.8.0")
}

tasks {
Expand Down Expand Up @@ -361,8 +258,8 @@ tasks {

withType(JavaCompile::class) {
options.encoding = "UTF-8"
// Minecraft 1.18 (1.18-pre2) upwards uses Java 17.
options.release.set(17)
// Minecraft 1.20.5 (24w14a) upwards uses Java 21.
options.release.set(21)
options.isFork = true
options.isIncremental = true
}
Expand All @@ -382,8 +279,8 @@ val sourcesJar: Task by tasks
val javadocJar: Task by tasks

java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21

// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
Expand All @@ -405,8 +302,8 @@ artifacts {
archives(javadocJar)
}

fun getVersion(): String {
var version = "$mod_version-$mod_loader+$minecraft_version"
fun getModVersion(): String {
var version = "$mod_version-mc$minecraft_version"

if (release != null && !release) {
version += "-unstable"
Expand Down
47 changes: 10 additions & 37 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,46 +8,19 @@

# Fabric Properties
# Get new versions at https://fabricmc.net/develop and https://lambdaurora.dev/tools/import_quilt.html
minecraft_version=1.20.1
quilt_mappings=1.20.1+build.13
parchment_mappings=1.19.3:2023.06.25
loader_version=0.14.21
minecraft_version=1.21
quilt_mappings=1.21+build.5
parchment_mappings=1.21:2024.07.07
loader_version=0.16.0

# Mod Properties
mod_id = frozenblock_template_mod
mod_version = 1.0.0
mod_id = unforked
mod_version = 1.0
mod_loader = Fabric
maven_group = net.frozenblock
archives_base_name = FrozenBlockTemplateMod
archives_base_name = Unforked

# Dependencies
fabric_version=0.85.0+1.20.1
fabric_kotlin_version=1.10.0+kotlin.1.9.0
fabric_asm_version=v2.3
frozenlib_version=1.3.2-mc1.20.1

# External Mods
betterend_version=3.1.2
betternether_version=7.1.2
modmenu_version=4.1.2
cloth_config_version=8.2.88
copperpipes_version=1.12
nbtcrafting_version=2.2.3+mc1.19
terrablender_version=1.19.2-2.0.1.130
terralith_version=2.3.5
tomsstorage_version=1.19-1.4.5-fabric

# Optimization
sodium_version=mc1.19.2-0.4.4
iris_version=1.19.x-v1.4.0
indium_version=1.0.9+mc1.19.2
sodium_extra_version=0.4.10+mc1.19.2-build.64
reeses_sodium_options_version=1.4.7+mc1.19.2-build.59
lithium_version=mc1.19.2-0.10.1
fastanim_version=1.5.6
ferritecore_version=5.0.0-fabric
lazydfu_version=0.1.3
starlight_version=1.1.1+1.19
entityculling_version=1.5.2-fabric-1.19
memoryleakfix_version=v0.7.0
no_unused_chunks_version=v1.3b
fabric_version=0.100.7+1.21
fabric_kotlin_version=1.11.0+kotlin.2.0.0
frozenlib_version=1.8-mc1.21
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
10 changes: 1 addition & 9 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,10 @@ pluginManagement {
name = "Quilt"
setUrl("https://maven.quiltmc.org/repository/release/")
}
maven {
name = "Quilt Snapshot"
setUrl("https://maven.quiltmc.org/repository/snapshot/")
}
maven {
name = "Fabric"
setUrl("https://maven.fabricmc.net/")
}
maven {
name = "Forge"
setUrl("https://files.minecraftforge.net/maven/")
}
maven {
name = "Jitpack"
setUrl("https://jitpack.io/")
Expand All @@ -25,7 +17,7 @@ pluginManagement {
}
}

rootProject.name = "Template Mod"
rootProject.name = "Unforked"

localRepository("FrozenLib", "maven.modrinth:frozenlib", true)

Expand Down
33 changes: 0 additions & 33 deletions src/main/java/net/frozenblock/template/TemplateMod.java

This file was deleted.

This file was deleted.

Loading

0 comments on commit ab302a9

Please sign in to comment.