Skip to content

Commit

Permalink
feat: back ported to 1.20.1
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelHillcox committed Nov 11, 2024
1 parent 1e5d7c2 commit b006f53
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 75 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Kube Utils Changelog

## [20.4.0]
## [20.1.0]

### Changed

- Updated to 1.20.4
- Backported to 1.20.1
48 changes: 3 additions & 45 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ base {

java.toolchain.languageVersion = JavaLanguageVersion.of(17)

//def MAVEN_URL = "https://maven.saps.dev/${SNAPSHOT ? "snapshots" : "releases"}"
//def MAVEN_VERSION = project.version + (SNAPSHOT ? "-SNAPSHOT" : "")

runs {
configureEach {
systemProperty 'forge.logging.markers', 'REGISTRIES'
Expand Down Expand Up @@ -51,30 +48,10 @@ configurations {
runtimeClasspath.extendsFrom localRuntime
}

//loom {
// silentMojangMappingsLicense()
//
// forge {
// mixinConfigs = [
// "kubeutils.mixins.json"
// ]
//
// dataGen {
// mod project.mod_id
// }
// }
//
// launches {
// data {
// arg "--existing", file("src/main/resources").absolutePath
// }
// }
//}

dependencies {
implementation "net.neoforged:neoforge:${mcBase}.${neoforge_version}"
implementation "net.neoforged:forge:${minecraft_version}-${neoforge_version}"

implementation "dev.latvian.mods:kubejs-neoforge:${kubejs_version}"
implementation "dev.latvian.mods:kubejs-forge:${kubejs_version}"
}

repositories {
Expand Down Expand Up @@ -122,25 +99,6 @@ idea {
downloadJavadoc = true
}
}
//
//if (ENV.CURSEFORGE_KEY) {
// curseforge {
// apiKey = ENV.CURSEFORGE_KEY
// project {
// id = project.curseforge_id
// releaseType = "release"
// addGameVersion "Forge"
// addGameVersion "Java 17"
// addGameVersion project.minecraft_version
// mainArtifact(remapJar.archiveFile)
// relations {
// requiredDependency 'kubejs'
// }
// changelog = file("./CHANGELOG.md")
// changelogType = 'markdown'
// }
// }
//}

publishing {
publications {
Expand All @@ -167,7 +125,7 @@ publishMods {
changelog = file("./CHANGELOG.md").text
version = project.version
file = project.provider { project.tasks.jar }.flatMap { it.archiveFile }
modLoaders.add("neoforge")
modLoaders.add("forge")
type = STABLE
displayName = "[${minecraft_version}] KubeUtils ${project.version}"

Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
org.gradle.jvmargs=-Xmx2G

# The MC version is used to determine the base the version for neo and the mod
minecraft_version=1.20.4
minecraft_version=1.20.1

neoforge_version=237
neoforge_loader_version=2
neoforge_version=47.1.28
neoforge_loader_version=47
mod_version=0

maven_group=pro.mikey.mods
Expand All @@ -16,4 +16,4 @@ mod_author=ErrorMikey/Mikey
curseforge_id=678815
modrinth_id=JHdL51WR

kubejs_version=2004.7.0-build.24
kubejs_version=2001.6.5-build.16
7 changes: 3 additions & 4 deletions src/main/java/pro/mikey/kubeutils/KubeUtils.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package pro.mikey.kubeutils;

import net.neoforged.fml.common.Mod;
import net.neoforged.neoforge.common.NeoForge;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.Mod;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import pro.mikey.kubeutils.events.OnPlayerLoginEvent;
Expand All @@ -11,9 +11,8 @@ public class KubeUtils {
public static final String MOD_ID = "kubeutils";
public static final Logger LOGGER = LogManager.getLogger();


public KubeUtils() {
NeoForge.EVENT_BUS.register(new OnPlayerLoginEvent());
MinecraftForge.EVENT_BUS.register(new OnPlayerLoginEvent());
}

public static String getId() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package pro.mikey.kubeutils.events;

import dev.latvian.mods.kubejs.core.EntityKJS;
import net.neoforged.bus.api.SubscribeEvent;
import net.neoforged.neoforge.event.entity.player.PlayerEvent;
import net.minecraftforge.event.entity.player.PlayerEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import pro.mikey.kubeutils.kubejs.events.KuEventsGroup;
import pro.mikey.kubeutils.kubejs.events.PlayerStarterItems;

Expand Down
13 changes: 5 additions & 8 deletions src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,22 @@ Provides extra methods and tools to the standard KubeJS mod
'''

[[dependencies.kubeutils]]
modId = "neoforge"
required = true
versionRange = "[${neoforge_base_two},)"
modId = "forge"
mandatory = true
versionRange = "[47,)"
ordering = "NONE"
side = "BOTH"

[[dependencies.kubeutils]]
modId = "minecraft"
required = true
mandatory = true
versionRange = "[${minecraft_version},)"
ordering = "NONE"
side = "BOTH"

[[dependencies.kubeutils]]
modId = "kubejs"
required = true
mandatory = true
versionRange = "[${kubejs_version},)"
ordering = "NONE"
side = "BOTH"

[[mixins]]
config = "kubeutils.mixins.json"
10 changes: 0 additions & 10 deletions src/main/resources/kubeutils.mixins.json

This file was deleted.

0 comments on commit b006f53

Please sign in to comment.