Skip to content

Commit 2bfa68b

Browse files
authored
Merge pull request #21 from FTBTeam/dev
Dev
2 parents da19efa + 9d61db0 commit 2bfa68b

File tree

13 files changed

+122
-205
lines changed

13 files changed

+122
-205
lines changed

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
!contains(github.event.head_commit.message, '[ciskip]')
1111
uses: FTBTeam/mods-meta/.github/workflows/standard-release.yml@main
1212
with:
13-
curse-publish-task: curseforge
13+
curse-publish-task: publishMods
1414
java-version: 21
1515
secrets:
1616
ftb-maven-token: ${{ secrets.FTB_MAVEN_TOKEN }}

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [3.2.0]
8+
9+
### Changed
10+
* Ported to Minecraft 1.21. Support for Fabric and NeoForge.
11+
* Forge support may be re-added if/when Architectury adds support for Forge
12+
713
## [3.1.0]
814

915
### Changed

build.gradle

+82-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
plugins {
22
id "architectury-plugin" version "3.4-SNAPSHOT"
33
id "dev.architectury.loom" version "1.6-SNAPSHOT" apply false
4+
id "me.modmuss50.mod-publish-plugin" version "0.5.1"
45
}
56

67
architectury {
@@ -81,14 +82,93 @@ allprojects {
8182
}
8283
}
8384

84-
tasks.withType(JavaCompile) {
85+
tasks.withType(JavaCompile).configureEach {
8586
options.encoding = "UTF-8"
8687
options.release = 21
8788
}
8889

8990
java {
9091
withSourcesJar()
9192
}
93+
94+
publishing {
95+
repositories {
96+
if (ftbPublishing.ftbToken) {
97+
maven {
98+
url ftbPublishing.ftbURL
99+
credentials {
100+
username = ftbPublishing.ftbUser
101+
password = ftbPublishing.ftbToken
102+
}
103+
}
104+
}
105+
106+
if (ftbPublishing.sapsToken) {
107+
maven {
108+
url ftbPublishing.sapsURL
109+
credentials {
110+
username = ftbPublishing.sapsUser
111+
password = ftbPublishing.sapsToken
112+
}
113+
}
114+
}
115+
}
116+
}
92117
}
93118

94-
task curseforgePublish
119+
publishMods {
120+
dryRun = providers.environmentVariable("CURSEFORGE_KEY").getOrNull() == null
121+
changelog = providers.environmentVariable("CHANGELOG").getOrElse("No changelog provided")
122+
version = "${mod_version}"
123+
124+
// TODO: Migrate to something else
125+
def tag = providers.environmentVariable("TAG").getOrElse("release")
126+
type = tag == "beta" ? BETA : (tag == "alpha" ? ALPHA : STABLE)
127+
128+
def createOptions = (String projectName) -> {
129+
publishOptions {
130+
file = project.provider { project(":$projectName").tasks.remapJar }.flatMap { it.archiveFile }
131+
displayName = "[${projectName.toUpperCase()}][${minecraft_version}] ${readable_name} ${mod_version}"
132+
modLoaders.add(projectName.toLowerCase())
133+
}
134+
}
135+
136+
def fabricOptions = createOptions("fabric")
137+
def neoForgeOptions = createOptions("neoforge")
138+
// def forgeOptions = createOptions("forge")
139+
140+
def curseForgeOptions = curseforgeOptions {
141+
accessToken = providers.environmentVariable("CURSEFORGE_KEY")
142+
projectId = curseforge_id
143+
minecraftVersions.add("${minecraft_version}")
144+
requires('architectury-api')
145+
optional('jei')
146+
optional('roughly-enough-items')
147+
}
148+
149+
curseforge("curseforgeFabric") {
150+
from(curseForgeOptions, fabricOptions)
151+
requires('fabric-api')
152+
requires('ftb-library-fabric')
153+
optional('ftb-quests-fabric')
154+
optional('ftb-ranks-fabric')
155+
optional('waystones-fabric')
156+
}
157+
158+
curseforge("curseforgeNeoForge") {
159+
from(curseForgeOptions, neoForgeOptions)
160+
requires('ftb-library-neoforge')
161+
optional('ftb-quests-neoforge')
162+
optional('ftb-ranks-neoforge')
163+
optional('waystones')
164+
optional('kubejs')
165+
}
166+
167+
// curseforge("curseforgeForge") {
168+
// from(curseForgeOptions, forgeOptions)
169+
// requires('ftb-library-forge')
170+
// optional('ftb-quests-forge')
171+
// optional('ftb-ranks-forge')
172+
// optional('waystones')
173+
// }
174+
}

common/build.gradle

+1-23
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ dependencies {
2222
modApi("dev.ftb.mods:ftb-filter-system:${rootProject.ftb_filter_system_version}")
2323

2424
modCompileOnly("me.shedaniel:RoughlyEnoughItems-api:${rootProject.rei_version}")
25-
modCompileOnly("mezz.jei:jei-1.20.4-common-api:${rootProject.jei_version}")
25+
modCompileOnly("mezz.jei:jei-${rootProject.minecraft_version}-common-api:${rootProject.jei_version}")
2626

2727
compileOnly("net.luckperms:api:${rootProject.luckperms_api_version}")
2828

@@ -37,26 +37,4 @@ publishing {
3737
from components.java
3838
}
3939
}
40-
41-
repositories {
42-
if (ftbPublishing.ftbToken) {
43-
maven {
44-
url ftbPublishing.ftbURL
45-
credentials {
46-
username = ftbPublishing.ftbUser
47-
password = ftbPublishing.ftbToken
48-
}
49-
}
50-
}
51-
52-
if (ftbPublishing.sapsToken) {
53-
maven {
54-
url ftbPublishing.sapsURL
55-
credentials {
56-
username = ftbPublishing.sapsUser
57-
password = ftbPublishing.sapsToken
58-
}
59-
}
60-
}
61-
}
6240
}

common/src/main/java/dev/ftb/mods/ftbxmodcompat/ftbquests/QuestItems.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
import net.minecraft.world.item.Item;
88

99
public class QuestItems {
10-
private static final ResourceKey<Item> QUEST_BOOK = ResourceKey.create(Registries.ITEM, new ResourceLocation("ftbquests:book"));
11-
private static final ResourceKey<Item> LOOT_CRATE = ResourceKey.create(Registries.ITEM, new ResourceLocation("ftbquests:lootcrate"));
10+
private static final ResourceKey<Item> QUEST_BOOK = ResourceKey.create(Registries.ITEM, ResourceLocation.parse("ftbquests:book"));
11+
private static final ResourceKey<Item> LOOT_CRATE = ResourceKey.create(Registries.ITEM, ResourceLocation.parse("ftbquests:lootcrate"));
1212

1313
private static Item questBook;
1414
private static Item lootCrate;

common/src/main/java/dev/ftb/mods/ftbxmodcompat/ftbquests/jei/FTBQuestsJEIIntegration.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
@JeiPlugin
2020
public class FTBQuestsJEIIntegration implements IModPlugin {
21-
private static final ResourceLocation UID = new ResourceLocation(FTBXModCompat.MOD_ID, "ftbquests_jei");
21+
private static final ResourceLocation UID = ResourceLocation.fromNamespaceAndPath(FTBXModCompat.MOD_ID, "ftbquests_jei");
2222
public static IJeiRuntime runtime;
2323

2424
@Override

common/src/main/java/dev/ftb/mods/ftbxmodcompat/ftbquests/jei/QuestCategory.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import net.minecraft.world.item.ItemStack;
2323

2424
public class QuestCategory implements IRecipeCategory<WrappedQuest> {
25-
public static final ResourceLocation TEXTURE = new ResourceLocation(FTBQuestsAPI.MOD_ID + ":textures/gui/jei/quest.png");
25+
public static final ResourceLocation TEXTURE = ResourceLocation.fromNamespaceAndPath(FTBQuestsAPI.MOD_ID, "textures/gui/jei/quest.png");
2626

2727
private final IDrawable background;
2828
private final IDrawable icon;

fabric/build.gradle

+1-50
Original file line numberDiff line numberDiff line change
@@ -111,59 +111,10 @@ components.java {
111111

112112
publishing {
113113
publications {
114-
mavenForge(MavenPublication) {
114+
mavenFabric(MavenPublication) {
115115
artifactId = "${rootProject.archives_base_name}-${project.name}"
116116
version ftbPublishing.mavenVersion
117117
from components.java
118118
}
119119
}
120-
121-
repositories {
122-
if (ftbPublishing.ftbToken) {
123-
maven {
124-
url ftbPublishing.ftbURL
125-
credentials {
126-
username = ftbPublishing.ftbUser
127-
password = ftbPublishing.ftbToken
128-
}
129-
}
130-
}
131-
132-
if (ftbPublishing.sapsToken) {
133-
maven {
134-
url ftbPublishing.sapsURL
135-
credentials {
136-
username = ftbPublishing.sapsUser
137-
password = ftbPublishing.sapsToken
138-
}
139-
}
140-
}
141-
}
142120
}
143-
144-
if (ENV.CURSEFORGE_KEY) {
145-
curseforge {
146-
apiKey = ENV.CURSEFORGE_KEY
147-
project {
148-
id = project.curseforge_id
149-
releaseType = ftbPublishing.relType
150-
addGameVersion "Fabric"
151-
addGameVersion project.minecraft_version
152-
mainArtifact(remapJar.archiveFile)
153-
relations {
154-
requiredDependency 'architectury-api'
155-
requiredDependency 'ftb-library-fabric'
156-
optionalDependency 'ftb-quests-fabric'
157-
optionalDependency 'ftb-ranks-fabric'
158-
optionalDependency 'kubejs'
159-
optionalDependency 'jei'
160-
optionalDependency 'roughly-enough-items'
161-
optionalDependency 'waystones-fabric'
162-
}
163-
changelog = ENV.CHANGELOG // expected to exist if ENV.CURSEFORGE_KEY does
164-
changelogType = 'markdown'
165-
}
166-
}
167-
}
168-
169-
rootProject.tasks.getByName("curseforgePublish").dependsOn tasks.getByName("curseforge")

fabric/src/main/java/dev/ftb/mods/ftbxmodcompat/fabric/ftbchunks/commonprot/FTBChunksProtectionProvider.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
import java.util.concurrent.TimeUnit;
3333

3434
public class FTBChunksProtectionProvider implements ProtectionProvider {
35-
public static ResourceLocation ID = new ResourceLocation(FTBChunks.MOD_ID, "provider");
35+
public static ResourceLocation ID = ResourceLocation.fromNamespaceAndPath(FTBChunks.MOD_ID, "provider");
3636
private static LoadingCache<GameProfile, ServerPlayer> FAKE_PLAYERS = null;
3737

3838
public static void init() {

forge/build.gradle

-49
Original file line numberDiff line numberDiff line change
@@ -103,54 +103,5 @@ publishing {
103103
from components.java
104104
}
105105
}
106-
107-
repositories {
108-
if (ftbPublishing.ftbToken) {
109-
maven {
110-
url ftbPublishing.ftbURL
111-
credentials {
112-
username = ftbPublishing.ftbUser
113-
password = ftbPublishing.ftbToken
114-
}
115-
}
116-
}
117-
118-
if (ftbPublishing.sapsToken) {
119-
maven {
120-
url ftbPublishing.sapsURL
121-
credentials {
122-
username = ftbPublishing.sapsUser
123-
password = ftbPublishing.sapsToken
124-
}
125-
}
126-
}
127-
}
128-
}
129-
130-
if (ENV.CURSEFORGE_KEY) {
131-
curseforge {
132-
apiKey = ENV.CURSEFORGE_KEY
133-
project {
134-
id = project.curseforge_id
135-
releaseType = ftbPublishing.relType
136-
addGameVersion "Forge"
137-
addGameVersion project.minecraft_version
138-
mainArtifact(remapJar.archiveFile)
139-
relations {
140-
requiredDependency 'architectury-api'
141-
requiredDependency 'ftb-library-forge'
142-
optionalDependency 'ftb-quests-forge'
143-
optionalDependency 'ftb-ranks-forge'
144-
optionalDependency 'kubejs'
145-
optionalDependency 'jei'
146-
optionalDependency 'roughly-enough-items'
147-
optionalDependency 'game-stages'
148-
optionalDependency 'waystones'
149-
}
150-
changelog = ENV.CHANGELOG // expected to exist if ENV.CURSEFORGE_KEY does
151-
changelogType = 'markdown'
152-
}
153-
}
154106
}
155107

156-
rootProject.tasks.getByName("curseforgePublish").dependsOn tasks.getByName("curseforge")

gradle.properties

+23-22
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,42 @@
11
org.gradle.jvmargs=-Xmx2048M
22

3-
minecraft_version=1.20.6
3+
minecraft_version=1.21
44
#enabled_platforms=fabric,forge,neoforge
55
enabled_platforms=fabric,neoforge
66

77
archives_base_name=ftb-xmod-compat
8-
mod_version=3.1.0
8+
readable_name=FTB XMod Compat
9+
mod_version=3.2.0
910
maven_group=dev.ftb.mods
1011
curseforge_id=889915
1112

1213
forge_version=50.0.9
13-
neoforge_version=20.6.100-beta
14-
neoforge_loader_version=1
15-
fabric_loader_version=0.15.10
16-
fabric_api_version=0.97.8+1.20.6
14+
neoforge_version=21.0.14-beta
15+
neoforge_loader_version=4
16+
fabric_loader_version=0.15.11
17+
fabric_api_version=0.100.1+1.21
1718

18-
architectury_version=12.1.3
19+
architectury_version=13.0.1
1920

20-
ftb_library_version=2006.1.1
21-
ftb_quests_version=2006.1.0-SNAPSHOT
22-
ftb_chunks_version=2006.1.0
23-
ftb_ranks_version=2006.1.0
24-
ftb_essentials_version=2006.1.0
25-
ftb_teams_version=2006.1.0
26-
ftb_filter_system_version=2.1.0
21+
ftb_library_version=2100.1.1
22+
ftb_quests_version=2100.1.1
23+
ftb_chunks_version=2100.1.0
24+
ftb_ranks_version=2100.1.0
25+
ftb_essentials_version=2100.1.0
26+
ftb_teams_version=2100.1.0
27+
ftb_filter_system_version=3.0.0
2728

28-
rei_version=15.0.728
29+
rei_version=16.0.729
2930
common_prot_api_version=1.0.0
3031
luckperms_api_version=5.4
31-
waystones_neoforge_version=5389804
32-
waystones_forge_version=5389798
33-
waystones_fabric_version=5389793
34-
balm_neoforge_version=5389055
35-
balm_forge_version=5389054
36-
balm_fabric_version=5389051
32+
waystones_neoforge_version=5427156
33+
waystones_forge_version=5427151
34+
waystones_fabric_version=5427150
35+
balm_neoforge_version=5438018
36+
balm_forge_version=5438000
37+
balm_fabric_version=5437997
38+
jei_version=19.0.0.11
3739

3840
# TODO compiling against 1.20.4 version for now
39-
jei_version=17.3.0.49
4041
kubejs_version=2004.7.0-build.16
4142
gamestages_version=15.0.1

0 commit comments

Comments
 (0)