Skip to content

Commit

Permalink
Update to 1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
Erdragh committed Jun 17, 2024
2 parents 292a6c8 + 5374192 commit 2d7db37
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 19 deletions.
11 changes: 10 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,22 @@ plugins {
id("eclipse")
id("idea")
id("maven-publish")
id("net.neoforged.gradle.userdev") version "7.0.133"
id("net.neoforged.gradle.userdev") version "7.0.143"
// Kotlin Dependencies
kotlin("jvm") version "1.9.23"
// OPTIONAL:
// kotlin("plugin.serialization") version "1.9.23"
}

tasks.named<Wrapper>("wrapper") {
// Define wrapper values here so as to not have to always do so when updating gradlew.properties.
// Switching this to Wrapper.DistributionType.ALL will download the full gradle sources that comes with
// documentation attached on cursor hover of gradle classes and methods. However, this comes with increased
// file size for Gradle. If you do switch this to ALL, run the Gradle wrapper task twice afterwards.
// (Verify by checking gradle/wrapper/gradle-wrapper.properties to see if distributionUrl now points to `-all`)
distributionType = Wrapper.DistributionType.BIN
}

val mod_version: String by project
val mod_group_id: String by project
val mod_id: String by project
Expand Down
14 changes: 7 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ neogradle.subsystems.parchment.mappingsVersion=2024.05.01
# Environment Properties
# You can find the latest versions here: https://projects.neoforged.net/neoforged/neoforge
# The Minecraft version must agree with the Neo version to get a valid artifact
minecraft_version=1.20.6
minecraft_version=1.21
# The Minecraft version range can use any release version of Minecraft as bounds.
# Snapshots, pre-releases, and release candidates are not guaranteed to sort properly
# as they do not follow standard versioning conventions.
minecraft_version_range=[1.20.6,1.21)
minecraft_version_range=[1.21,1.21.1)
# The Neo version must agree with the Minecraft version to get a valid artifact
neo_version=20.6.62-beta
neo_version=21.0.0-beta
# The Neo version range can use any version of Neo as bounds
neo_version_range=[20.6,)
neo_version_range=[21.0.0-beta,)
# The loader version range can only use the major version of FML as bounds
loader_version_range=[2,)
loader_version_range=[4,)
# Mods using Kotlin entrypoints use KFF as a loader, which has different versioning
kff_version=5.1.0
kff_version_range=[5.1,6)
kff_version=5.3.0
kff_version_range=[5.3,6)

## Mod Properties

Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions src/main/kotlin/com/example/examplemod/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ object Config {
lateinit var items: Set<Item>

private fun validateItemName(obj: Any): Boolean {
return obj is String && BuiltInRegistries.ITEM.containsKey(ResourceLocation(obj))
return obj is String && BuiltInRegistries.ITEM.containsKey(ResourceLocation.parse(obj))
}

@SubscribeEvent
Expand All @@ -53,7 +53,7 @@ object Config {
// convert the list of strings into a set of items
items = ITEM_STRINGS.get().stream()
.map { itemName: String ->
BuiltInRegistries.ITEM[ResourceLocation(
BuiltInRegistries.ITEM[ResourceLocation.parse(
itemName
)]
}
Expand Down
10 changes: 1 addition & 9 deletions src/main/resources/META-INF/neoforge.mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# For Kotlin entrypoints, it should be kotlinforforge
modLoader="kotlinforforge" #mandatory

# A version range to match for said mod loader - for regular FML @Mod it will be the the FML version. This is currently 47.
# A version range to match for said mod loader - for regular FML @Mod it will be the FML version. This is currently 2.
# The KFF language loader is at version >= 5 for Neo >= 20.5 currently
loaderVersion="${kff_version_range}" #mandatory

Expand Down Expand Up @@ -45,14 +45,6 @@ displayName="${mod_name}" #mandatory
# A text field displayed in the mod UI
authors="${mod_authors}" #optional

# Display Test controls the display for your mod in the server connection screen
# MATCH_VERSION means that your mod will cause a red X if the versions on client and server differ. This is the default behaviour and should be what you choose if you have server and client elements to your mod.
# IGNORE_SERVER_VERSION means that your mod will not cause a red X if it's present on the server but not on the client. This is what you should use if you're a server only mod.
# IGNORE_ALL_VERSION means that your mod will not cause a red X if it's present on the client or the server. This is a special case and should only be used if your mod has no server component.
# NONE means that no display test is set on your mod. You need to do this yourself, see IExtensionPoint.DisplayTest for more information. You can define any scheme you wish with this value.
# IMPORTANT NOTE: this is NOT an instruction as to which environments (CLIENT or DEDICATED SERVER) your mod loads on. Your mod should load (and maybe do nothing!) whereever it finds itself.
#displayTest="MATCH_VERSION" # MATCH_VERSION is the default if nothing is specified (#optional)

# The description text for the mod (multi line!) (#mandatory)
description='''${mod_description}'''

Expand Down

0 comments on commit 2d7db37

Please sign in to comment.