Skip to content

Commit

Permalink
Merge branch 'mc/1.20.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelHillcox committed Dec 28, 2023
2 parents ef7b89f + 8faf967 commit 19bd8b6
Show file tree
Hide file tree
Showing 15 changed files with 213 additions and 31 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ classes/
.metadata
.vscode
.settings
*.launch
*.launch

.DS_Store
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## [3.0.1]
## [84.0.0]

### Changed

- Improved multi-threading safety and performance thanks to [(#7)](https://github.com/ErrorMikey/AcceleratedDecay/pull/7) [BumbleTree](https://github.com/BumbleTree)
- Ported to 1.20.4
33 changes: 27 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id "architectury-plugin" version "3.4-SNAPSHOT"
id "dev.architectury.loom" version "1.3-SNAPSHOT" apply false
id "me.modmuss50.mod-publish-plugin" version "0.3.5"
id "dev.architectury.loom" version "1.4-SNAPSHOT" apply false
id "me.modmuss50.mod-publish-plugin" version "0.4.5"
}

architectury {
Expand Down Expand Up @@ -45,7 +45,7 @@ allprojects {
apply plugin: "maven-publish"

archivesBaseName = rootProject.archives_base_name
version = "${rootProject.mod_version}+mc${rootProject.minecraft_version}"
version = "${rootProject.mod_version}"
group = rootProject.maven_group


Expand All @@ -67,13 +67,19 @@ publishMods {

def fabricOptions = publishOptions {
file = project.provider { project(":fabric").tasks.remapJar }.flatMap { it.archiveFile }
displayName = "${project.name} Fabric ${mod_version}+mc${minecraft_version}"
displayName = "[FABRIC][${rootProject.minecraft_version}] ${project.name} ${mod_version}"
modLoaders.add("fabric")
}

def neoforgeOptions = publishOptions {
file = project.provider { project(":neoforge").tasks.remapJar }.flatMap { it.archiveFile }
displayName = "[NEOFORGE][${rootProject.minecraft_version}] ${project.name} ${mod_version}"
modLoaders.add("forge")
}

def forgeOptions = publishOptions {
file = project.provider { project(":forge").tasks.remapJar }.flatMap { it.archiveFile }
displayName = "${project.name} Forge ${mod_version}+mc${minecraft_version}"
displayName = "[FORGE][${rootProject.minecraft_version}] ${project.name} ${mod_version}"
modLoaders.add("neoforge")
}

Expand All @@ -97,6 +103,13 @@ publishMods {
}
}

curseforge("curseforgeNeoforge") {
from(curseForgeOptions, neoforgeOptions)
requires {
slug = "architectury-api"
}
}

curseforge("curseforgeForge") {
from(curseForgeOptions, forgeOptions)
requires {
Expand All @@ -113,15 +126,23 @@ publishMods {
}

modrinth("modrinthForge") {
from(modrinthOptions, neoforgeOptions)
requires {
slug = "architectury-api"
}
}

modrinth("modrinthNeoforge") {
from(modrinthOptions, forgeOptions)
requires {
slug = "architectury-api"
}
}

github {
file = project.provider { project(":forge").tasks.remapJar }.flatMap { it.archiveFile }
file = project.provider { project(":neoforge").tasks.remapJar }.flatMap { it.archiveFile }
additionalFiles.from project.provider { project(":fabric").tasks.remapJar }.flatMap { it.archiveFile }
additionalFiles.from project.provider { project(":forge").tasks.remapJar }.flatMap { it.archiveFile }

repository = "${project.github_repo}"
accessToken = providers.environmentVariable("GITHUB_TOKEN")
Expand Down
1 change: 1 addition & 0 deletions fabric/src/main/resources/accelerateddecay.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"required": true,
"package": "pro.mikey.accelerateddecay.mixin.fabric",
"compatibilityLevel": "JAVA_17",
"minVersion": "0.7",
"client": [],
"mixins": [],
"injectors": {
Expand Down
4 changes: 2 additions & 2 deletions forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ architectury {
}

repositories {
maven { url "https://maven.neoforged.net/releases" }
maven { url "https://files.minecraftforge.net/" }
maven { url "https://maven.creeperhost.net/" }
}

Expand All @@ -33,7 +33,7 @@ configurations {
}

dependencies {
forge "net.neoforged:forge:${rootProject.minecraft_version}-${rootProject.forge_version}"
forge "net.minecraftforge:forge:${rootProject.minecraft_version}-${rootProject.forge_version}"
// Remove the next line if you don't want to depend on the API
modApi "dev.architectury:architectury-forge:${rootProject.architectury_version}"

Expand Down
3 changes: 2 additions & 1 deletion forge/src/main/resources/accelerateddecay.mixins.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"required": true,
"package": "pro.mikey.accelerateddecay.mixin.forge",
"package": "pro.mikey.accelerateddecay.mixin.neoforge",
"compatibilityLevel": "JAVA_17",
"minVersion": "0.7",
"client": [],
"mixins": [],
"injectors": {
Expand Down
15 changes: 8 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
org.gradle.jvmargs=-Xmx2048M

minecraft_version=1.20.1
enabled_platforms=fabric,forge
minecraft_version=1.20.4
enabled_platforms=fabric,forge,neoforge

archives_base_name=accelerated-decay
mod_version=3.0.1
mod_version=84.0.0
maven_group=pro.mikey.mods

architectury_version=9.1.12
fabric_loader_version=0.15.3
fabric_api_version=0.92.0+1.20.4
forge_version=49.0.12
neoforge_version=20.4.62-beta

fabric_loader_version=0.14.22
fabric_api_version=0.88.1+1.20.1
forge_version=47.1.76
architectury_version=11.0.9

curseforge_id=699872
modrinth_id=laX5CckD
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
91 changes: 91 additions & 0 deletions neoforge/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
plugins {
id "com.github.johnrengelman.shadow" version "7.1.2"
}

architectury {
platformSetupLoomIde()
neoForge()
}

repositories {
maven { url "https://maven.neoforged.net/releases" }
maven { url "https://maven.creeperhost.net/" }
}

loom {
accessWidenerPath = project(":common").loom.accessWidenerPath

neoForge {}
}

configurations {
common
shadowCommon // Don't use shadow from the shadow plugin because we don't want IDEA to index this.
compileClasspath.extendsFrom common
runtimeClasspath.extendsFrom common
developmentNeoForge.extendsFrom common
}

dependencies {
neoForge "net.neoforged:neoforge:${rootProject.neoforge_version}"
// Remove the next line if you don't want to depend on the API
modApi "dev.architectury:architectury-neoforge:${rootProject.architectury_version}"

common(project(path: ":common", configuration: "namedElements")) { transitive false }
shadowCommon(project(path: ":common", configuration: "transformProductionNeoForge")) { transitive = false }
}

processResources {
inputs.property "version", project.version

filesMatching("META-INF/mods.toml") {
expand "version": project.version
}
}

shadowJar {
exclude "fabric.mod.json"
exclude "architectury.common.json"

configurations = [project.configurations.shadowCommon]
setArchiveClassifier "dev-shadow"
}

remapJar {
input.set shadowJar.archiveFile
dependsOn shadowJar
setArchiveClassifier null
setArchivesBaseName("${rootProject.archivesBaseName}-${project.name}") // adds fabric to the maven and curse name
atAccessWideners.add('accelerateddecay.accesswidener')
}

jar {
setArchiveClassifier "dev"
}

sourcesJar {
def commonSources = project(":common").sourcesJar
dependsOn commonSources
from commonSources.archiveFile.map { zipTree(it) }
}

components.java {
withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) {
skip()
}
}

publishing {
publications {
mavenForge(MavenPublication) {
artifactId = "${rootProject.archivesBaseName}-${project.name}"
from components.java
}
}
}

sourceSets.each {
def dir = layout.buildDirectory.dir("sourcesSets/$it.name")
it.output.resourcesDir = dir
it.java.destinationDirectory = dir
}
1 change: 1 addition & 0 deletions neoforge/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
loom.platform=neoforge
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package pro.mikey.accelerateddecay.neoforge;

import net.neoforged.fml.common.Mod;
import pro.mikey.accelerateddecay.AcceleratedDecay;

@Mod(AcceleratedDecay.MOD_ID)
public class AcceleratedDecayNeoforge {
public AcceleratedDecayNeoforge() {
// EventBuses.registerModEventBus(AcceleratedDecay.MOD_ID, FMLJavaModLoadingContext.get().getModEventBus());
AcceleratedDecay.init();
}
}
41 changes: 41 additions & 0 deletions neoforge/src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
modLoader = "javafml"
loaderVersion = "[1,)"
#issueTrackerURL = ""
license = "GPL3"

[[mods]]
modId = "accelerateddecay"
version = "${version}"
displayName = "Accelerated Decay"
authors = "ErrorMikey"
description = '''
Speeds up the decay of leaves
'''
#logoFile = ""

[[dependencies.accelerateddecay]]
modId = "neoforge"
required = true
versionRange = "[20.2,)"
ordering = "NONE"
side = "BOTH"

[[dependencies.accelerateddecay]]
modId = "minecraft"
required = true
versionRange = "[1.20.2,)"
ordering = "NONE"
side = "BOTH"

[[dependencies.accelerateddecay]]
modId = "architectury"
required = true
versionRange = "[9.1.12,)"
ordering = "AFTER"
side = "BOTH"

[[mixins]]
config = "accelerateddecay-common.mixins.json"

[[mixins]]
config = "accelerateddecay.mixins.json"
10 changes: 10 additions & 0 deletions neoforge/src/main/resources/accelerateddecay.mixins.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"required": true,
"package": "pro.mikey.accelerateddecay.mixin.neoforge",
"compatibilityLevel": "JAVA_17",
"client": [],
"mixins": [],
"injectors": {
"defaultRequire": 1
}
}
6 changes: 6 additions & 0 deletions neoforge/src/main/resources/pack.mcmeta
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"pack": {
"description": "accelerateddecay Mod",
"pack_format": 8
}
}
17 changes: 6 additions & 11 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,29 +1,24 @@
pluginManagement {
repositories {
gradlePluginPortal()

maven {
url "https://files.minecraftforge.net/"
}

maven {
url "https://maven.neoforged.net/releases"
content {
includeGroup "net.neoforged"
}
}

maven {
url "https://maven.creeperhost.net/"
content {
includeGroup "net.minecraftforge"
includeGroup "net.fabricmc"
includeGroup "de.oceanlabs.mcp"
includeGroup "dev.architectury"
includeGroup "dev.architectury.loom"
includeGroup "architectury-plugin"
}
}
}
}

include("common")
include("fabric")
include("forge")
include("neoforge")

rootProject.name = "accelerated-decay"

0 comments on commit 19bd8b6

Please sign in to comment.