Skip to content

Commit

Permalink
update to 1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
Sunekaer committed Jun 19, 2024
1 parent 2379386 commit 3c4a90d
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 47 deletions.
3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
# Changelog

Fix mixin on neo
Update to 1.21
43 changes: 14 additions & 29 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id "architectury-plugin" version "3.4-SNAPSHOT"
id "dev.architectury.loom" version "1.4-SNAPSHOT" apply false
id "dev.architectury.loom" version "1.6-SNAPSHOT" apply false
id "me.modmuss50.mod-publish-plugin" version "0.4.5"
}

Expand All @@ -10,7 +10,6 @@ architectury {

subprojects {
apply plugin: "dev.architectury.loom"
apply plugin: "maven-publish"

loom {
silentMojangMappingsLicense()
Expand All @@ -20,20 +19,6 @@ subprojects {
minecraft "com.mojang:minecraft:${rootProject.minecraft_version}"
mappings loom.officialMojangMappings()
}

publishing {
repositories {
if (providers.environmentVariable("NANITE_TOKEN").isPresent()) {
maven {
url "https://maven.nanite.dev/releases"
credentials {
username = "nanite"
password = providers.environmentVariable("NANITE_TOKEN").get()
}
}
}
}
}
}

allprojects {
Expand All @@ -50,7 +35,7 @@ allprojects {

tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
options.release = 17
options.release = 21
}

java {
Expand All @@ -64,11 +49,11 @@ publishMods {
version = "${mod_version}"
type = STABLE

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

def neoForge = publishOptions {
file = project.provider { project(":neoforge").tasks.remapJar }.flatMap { it.archiveFile }
Expand All @@ -87,19 +72,19 @@ publishMods {
projectId = "${modrinth_id}"
minecraftVersions.add("${minecraft_version}")
}

curseforge("curseforgeForge") {
from(curseForgeOptions, forgeOptions)
}
//
// curseforge("curseforgeForge") {
// from(curseForgeOptions, forgeOptions)
// }

curseforge("curseforgeNeoForge") {
from(curseForgeOptions, neoForge)
}

if (providers.environmentVariable("MODRINTH_TOKEN").getOrNull() != null) {
modrinth("modrinthForge") {
from(modrinthOptions, forgeOptions)
}
// modrinth("modrinthForge") {
// from(modrinthOptions, forgeOptions)
// }

modrinth("modrinthNeoforge") {
from(modrinthOptions, neoForge)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class CommandClean {
private static int cleanStruc(CommandSourceStack source, String file) {
ServerLevel worldServer = source.getLevel();
StructureTemplateManager templateManager = worldServer.getStructureManager();
ResourceLocation name = new ResourceLocation(file);
ResourceLocation name = ResourceLocation.withDefaultNamespace(file);
StructureTemplate template = templateManager.getOrCreate(name);

template.palettes.forEach(e ->{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

@Mixin(StructureBlockEntity.class)
public abstract class StructureBlockEntityMixin {
@ModifyConstant(method = "load", constant = {@Constant(intValue = 48), @Constant(intValue = -48)})
@ModifyConstant(method = "loadAdditional", constant = {@Constant(intValue = 48), @Constant(intValue = -48)})
private int getMaxSizePos(int value) {
return value > 0 ? StructureExpansion.NEW_LIMIT_POS : StructureExpansion.NEW_LIMIT_NEG;
}
Expand Down
16 changes: 8 additions & 8 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
org.gradle.jvmargs=-Xmx8G
org.gradle.daemon=false

enabled_platforms=neoforge,forge
enabled_platforms=neoforge

mod_version=84.0.1
mod_version=87.0.0

# Dependencies
minecraft_version=1.20.4
minecraft_version=1.21

# ForgeGradle
forge_gradle_version=6.0.18
# NeoForgeGradle
neoforge_gradle_version=7.0.80
neoforge_gradle_version=7.0.145
# Mod loaders
# NeoForge
neoforge_version=20.4.80-beta
neoforge_version=21.0.19-beta
# Forge
forge_version=49.0.14

fabric_loader_version=0.15.3
fabric_api_version=0.91.2+1.20.4
fabric_loader_version=0.15.11
fabric_api_version=0.100.3+1.21

# Architectury
architectury_version=11.0.10
architectury_version=13.0.1

archives_base_name=structure-expansion
maven_group=com.sunekaer.mods
Expand Down
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.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion neoforge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ processResources {
duplicatesStrategy(DuplicatesStrategy.EXCLUDE)
inputs.property "version", project.version

filesMatching("META-INF/mods.toml") {
filesMatching("META-INF/neoforge.mods.toml") {
expand "version": project.version
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
modLoader = "javafml"
loaderVersion = "[1,)"
loaderVersion = "[4,)"
issueTrackerURL = "https://github.com/nanite/Structure-Expansion/issues"
license = "MIT License"

Expand All @@ -19,14 +19,14 @@ Increases the size limit of the structure block from 48x48x48 to 127x127x127
[[dependencies.structureexpansion]]
modId = "neoforge"
required = true
versionRange = "[20.4,)"
versionRange = "[21,)"
ordering="NONE"
side="BOTH"

[[dependencies.structureexpansion]]
modId="minecraft"
required=true
versionRange="[1.20.4,)"
versionRange="[1.21,)"
ordering="NONE"
side="BOTH"

Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ pluginManagement {
}
}

include "common", "forge", "neoforge",
include "common", "neoforge",

rootProject.name = 'StructureExpansion'

0 comments on commit 3c4a90d

Please sign in to comment.