Skip to content

Commit

Permalink
port to 1.21.1
Browse files Browse the repository at this point in the history
fixes #8
  • Loading branch information
rlnt committed Oct 21, 2024
1 parent acb5bb2 commit 52f2488
Show file tree
Hide file tree
Showing 63 changed files with 1,148 additions and 1,268 deletions.
48 changes: 15 additions & 33 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,64 +5,49 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog],
and this project adheres to [Semantic Versioning].

## Unreleased

Initial 1.21.1 release!

- added support for new recipe types like Vat Fermenting
- added support for registering custom conduits, including modded variants
- added binding for Sag Mill outputs to fully support all properties
- added support for replacement block in Fire Crafting recipes
- changed minimum EnderIO version to 7.0.8-alpha
- reworked recipe schemas for internal recipe changes

## [0.6.0] - 2024-09-29

This update adjusts recipe schemas and introduces changes to the Alloy Smelter filtering.
Please read the [wiki](https://github.com/AlmostReliable/kubejs-enderio/wiki) for more information.

### Added
- added automatic smelting recipe inheritance

### Changed
- updated to new EnderIO version
- new minimum version is 6.2.0-beta

### Fixed
- changed minimum EnderIO version to 6.2.0-beta
- fixed custom energy conduits not connecting to some modded blocks ([#6](https://github.com/AlmostReliable/kubejs-enderio/issues/6))

### Removed
- removed manual synchronization of filtered smelting recipes
- removed KubeJS binding for utility methods

## [0.5.0] - 2024-08-04

### Changed
- updated to new EnderIO version
- new minimum version is 6.1.7-beta
- changed minimum EnderIO version to 6.1.7-beta

## [0.4.1] - 2023-11-16

### Fixed
- fixed custom conduit registry not detecting IDs correctly

## [0.4.0] - 2023-11-10

### Added
- added `EnderIOEvents.conduits` event to allow adding custom energy conduits
- read more about it in the [wiki][energy-conduit]

<!-- Links -->
[energy-conduit]: https://github.com/AlmostReliable/kubejs-enderio/wiki/Events#registering-custom-energy-conduits
- read more about it in the [wiki](https://github.com/AlmostReliable/kubejs-enderio/wiki/Events#registering-custom-energy-conduits)

## [0.3.1] - 2023-09-22

### Changed
- changed minimum EnderIO version to 6.0.20-alpha

### Fixed
- fixed a crash caused by the alloy smelter mixin ([enderio#520], [#1], [#2])

<!-- Links -->
[enderio#520]: https://github.com/Team-EnderIO/EnderIO/issues/520
[#1]: https://github.com/AlmostReliable/kubejs-enderio/issues/1
[#2]: https://github.com/AlmostReliable/kubejs-enderio/pull/2
- fixed a crash caused by the Alloy Smelter mixin ([enderio#520](https://github.com/Team-EnderIO/EnderIO/issues/520), [#1](https://github.com/AlmostReliable/kubejs-enderio/issues/1), [#2](https://github.com/AlmostReliable/kubejs-enderio/pull/2))

## [0.3.0] - 2023-09-20

### Added
- added `max_item_drops` property to fire crafting recipes to limit loot table drops

### Changed
- changed minimum EnderIO version to 6.0.19-alpha
- changed name of exposed binding from `EIOBonusType` to `EnderIOBonusType`
- changed id of sag mill recipes from `sagmilling` to `sag_milling`
Expand All @@ -71,11 +56,8 @@ Please read the [wiki](https://github.com/AlmostReliable/kubejs-enderio/wiki) fo

## [0.2.0] - 2023-09-13

### Added
- added utility method for fire crafting to add single dimensions
- added ability to remove vanilla smelting recipes from the alloy smelter

### Fixed
- fixed swallowed exception when slicer recipes have not exactly 6 inputs

## [0.1.0] - 2023-09-05
Expand Down
150 changes: 18 additions & 132 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,149 +1,35 @@
@file:Suppress("UnstableApiUsage")

import net.fabricmc.loom.api.LoomGradleExtensionAPI

val license: String by project
val minecraftVersion: String by project
val modVersion: String by project
val modPackage: String by project
val modId: String by project
val modName: String by project
val modAuthor: String by project
val modDescription: String by project
val parchmentVersion: String by project
val forgeVersion: String by project
val kjsVersion: String by project
val eioVersion: String by project
val jeiVersion: String by project
val githubUser: String by project
val githubRepo: String by project

plugins {
id("dev.architectury.loom") version "1.2.+" // TODO: update to 1.3.+ when JiJ fix is forward ported
id("io.github.juuxel.loom-vineflower") version "1.11.0"
id("com.github.gmazzo.buildconfig") version "4.0.4"
java
`maven-publish`
id("net.neoforged.moddev") version "2.0.30-beta"
id("com.almostreliable.almostgradle") version "1.1.1"
}

base {
version = "$minecraftVersion-$modVersion"
archivesName.set("$modId-forge")
almostgradle.setup {
withSourcesJar = false
}

loom {
silentMojangMappingsLicense()

forge {
mixinConfig("$modId.mixins.json")
}

if (project.findProperty("enableAccessWidener") == "true") {
accessWidenerPath.set(file("src/main/resources/$modId.accesswidener"))
forge {
convertAccessWideners.set(true)
extraAccessWideners.add(loom.accessWidenerPath.get().asFile.name)
repositories {
// KubeJS
maven("https://maven.latvian.dev/releases")
maven("https://jitpack.io") { // Animated Gif Library
content {
includeGroup("com.github.rtyley")
}
println("Access widener enabled for project. Access widener path: ${loom.accessWidenerPath.get()}")
}
}

repositories {
maven("https://maven.parchmentmc.org") // Parchment
maven("https://maven.latvian.dev/releases") // KubeJS
maven("https://maven.rover656.dev/releases") // EnderIO
maven("https://dogforce-games.com/maven") // GraphLib for EnderIO
maven("https://maven.tterrag.com") // Registrate for EnderIO
maven("https://maven.blamejared.com") // JEI
// EnderIO
maven("https://maven.rover656.dev/releases")

mavenLocal()
}

dependencies {
// Minecraft
minecraft("com.mojang:minecraft:$minecraftVersion")
mappings(loom.layered {
officialMojangMappings()
parchment("org.parchmentmc.data:parchment-$minecraftVersion:$parchmentVersion@zip")
})

// Forge
forge("net.minecraftforge:forge:$minecraftVersion-$forgeVersion")

// KubeJS
modImplementation("dev.latvian.mods:kubejs-forge:$kjsVersion")
localRuntime("io.github.llamalad7:mixinextras-forge:0.2.0-rc.4")
implementation("dev.latvian.mods:kubejs-neoforge:${almostgradle.getProperty("kjsVersion")}")

// EnderIO
modImplementation("com.enderio:EnderIO:$minecraftVersion-$eioVersion")
modLocalRuntime("com.tterrag.registrate:Registrate:MC1.20-1.3.11")
localRuntime("dev.gigaherz.graph:GraphLib3:3.0.4")

// JEI
modLocalRuntime("mezz.jei:jei-$minecraftVersion-forge:$jeiVersion") { isTransitive = false }
}

tasks {
processResources {
val resourceTargets = listOf("META-INF/mods.toml", "pack.mcmeta")

val replaceProperties = mapOf(
"license" to license,
"minecraftVersion" to minecraftVersion,
"version" to project.version as String,
"modId" to modId,
"modName" to modName,
"modAuthor" to modAuthor,
"modDescription" to modDescription,
"forgeVersion" to forgeVersion,
// use major version for FML only because wrong Forge version error message
// is way better than FML error message
"forgeFMLVersion" to forgeVersion.substringBefore("."),
"kjsVersion" to kjsVersion,
"eioVersion" to eioVersion,
"githubUser" to githubUser,
"githubRepo" to githubRepo
)

println("[Process Resources] Replacing resource properties: ")
replaceProperties.forEach { (key, value) -> println("\t -> $key = $value") }

inputs.properties(replaceProperties)
filesMatching(resourceTargets) {
expand(replaceProperties)
}
}

withType<JavaCompile> {
options.encoding = "UTF-8"
options.release.set(17)
}

withType<GenerateModuleMetadata> {
enabled = false
implementation("com.enderio:enderio-machines:${almostgradle.getProperty("eioVersion")}")
implementation("com.enderio:enderio-conduits:${almostgradle.getProperty("eioVersion")}")
implementation("com.enderio:enderio-conduits-modded:${almostgradle.getProperty("eioVersion")}") {
isTransitive = false
}
}

extensions.configure<JavaPluginExtension> {
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
}

extensions.configure<LoomGradleExtensionAPI> {
runs {
forEach {
val dir = "run/${it.environment}"
println("[Run Config] '${it.name}' directory: $dir")
it.runDir(dir)
// allows DCEVM hot-swapping when using the JBR (https://github.com/JetBrains/JetBrainsRuntime)
it.vmArgs("-XX:+IgnoreUnrecognizedVMOptions", "-XX:+AllowEnhancedClassRedefinition")
}
}
}

buildConfig {
buildConfigField("String", "MOD_ID", "\"$modId\"")
buildConfigField("String", "MOD_NAME", "\"$modName\"")
buildConfigField("String", "MOD_VERSION", "\"$version\"")
packageName(modPackage)
className("KubeIOConstants")
useJavaOutput()
}
51 changes: 21 additions & 30 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,35 +1,26 @@
# Project
group = com.almostreliable.mods
license = All Rights Reserved
loom.platform = forge
enableAccessWidener = false

# Minecraft
minecraftVersion = 1.20.1

# Mod
modVersion = 0.6.0
modPackage = com.almostreliable.kubeio
# required properties
group = com.almostreliable
modId = kubejs_enderio
modName = KubeJS-EnderIO
modName = KubeJS EnderIO
modVersion = 0.6.0
minecraftVersion = 1.21.1
neoforgeVersion = 21.1.71

# replacement properties
modAuthor = Almost Reliable
modDescription = KubeJS integration for EnderIO.

# Project Dependencies
parchmentVersion = 2023.09.03

# Forge Dependencies
forgeVersion = 47.1.3

# Mod Dependencies
kjsVersion = 2001.6.5-build.14
eioVersion = 6.2.0-beta
jeiVersion = 15.2.0.27

# Github
license = All Rights Reserved
githubUser = AlmostReliable
githubRepo = kubejs-enderio
githubRepo = kubejs_enderio

# mod dependencies
kjsVersion = 2101.7.1-build.181
eioVersion = 7.0.8-alpha

# Gradle
org.gradle.jvmargs = -Xmx3G
org.gradle.daemon = false
# settings
neoForge.parchment.minecraftVersion = 1.21
neoForge.parchment.mappingsVersion = 2024.07.28
almostgradle.buildconfig.name = ModConstants
almostgradle.launchArgs.autoWorldJoin = true
almostgradle.recipeViewers.jei.runConfig = true
almostgradle.recipeViewers.jei.version = 19.21.0.246
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.1.1-bin.zip
distributionUrl = https\://services.gradle.org/distributions/gradle-8.8-bin.zip
zipStoreBase = GRADLE_USER_HOME
zipStorePath = wrapper/dists
16 changes: 6 additions & 10 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
pluginManagement {
repositories {
maven("https://maven.architectury.dev/")
maven("https://maven.fabricmc.net/")
maven("https://maven.minecraftforge.net/")
maven("https://maven.moddingx.org")
gradlePluginPortal()
}
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0"
}

val modName = extra.get("modName").toString().replace(" ", "-")
val modName: String by extra
val minecraftVersion: String by extra
rootProject.name = "$modName-$minecraftVersion-Forge"
rootProject.name = "${modName.replace(" ", "-")}-$minecraftVersion-NeoForge"

enableFeaturePreview("STABLE_CONFIGURATION_CACHE")
Loading

0 comments on commit 52f2488

Please sign in to comment.