Skip to content

Commit 1f9687f

Browse files
committed
Merge branch 'refs/heads/2023.3' into 2024.1
2 parents 3e005a6 + 616bec2 commit 1f9687f

File tree

13 files changed

+63
-23
lines changed

13 files changed

+63
-23
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ kotlin.code.style=official
2424
ideaVersion = 2024.1
2525
ideaVersionName = 2024.1
2626

27-
coreVersion = 1.7.4
27+
coreVersion = 1.7.5
2828
downloadIdeaSources = true
2929

3030
pluginTomlVersion = 241.14494.150

readme.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ Minecraft Development for IntelliJ
1111
<td align="right"><b>Main Build</b></td>
1212
<td colspan="2"><a href="https://ci.mcdev.io/viewType.html?buildTypeId=MinecraftDev_Build"><img src="https://ci.mcdev.io/app/rest/builds/buildType:(id:MinecraftDev_Build)/statusIcon.svg" alt="Teamcity Build Status" /></a></td>
1313
</tr>
14-
<tr>
15-
<td align="left">2023.1</td>
16-
<td align="left"><a href="https://ci.mcdev.io/viewType.html?buildTypeId=MinecraftDev_Nightly_20231"><img src="https://ci.mcdev.io/app/rest/builds/buildType:(id:MinecraftDev_Nightly_20231)/statusIcon.svg" alt="2023.1 Nightly Status" /></a></td>
17-
</tr>
1814
<tr>
1915
<td align="left">2023.2</td>
2016
<td align="left"><a href="https://ci.mcdev.io/viewType.html?buildTypeId=MinecraftDev_Nightly_20232"><img src="https://ci.mcdev.io/app/rest/builds/buildType:(id:MinecraftDev_Nightly_20232)/statusIcon.svg" alt="2023.2 Nightly Status" /></a></td>
@@ -35,7 +31,7 @@ Minecraft Development for IntelliJ
3531
</tr>
3632
</table>
3733

38-
Info and Documentation [![Current Release](https://img.shields.io/badge/release-1.7.4-orange.svg?style=flat-square)](https://plugins.jetbrains.com/plugin/8327)
34+
Info and Documentation [![Current Release](https://img.shields.io/badge/release-1.7.5-orange.svg?style=flat-square)](https://plugins.jetbrains.com/plugin/8327)
3935
----------------------
4036

4137
<a href="https://discord.gg/j6UNcfr"><img src="https://i.imgur.com/JXu9C1G.png" height="48px"></img></a>

src/main/kotlin/creator/buildsystem/gradle-steps.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ import org.jetbrains.plugins.gradle.service.execution.GradleRunConfiguration
6161
import org.jetbrains.plugins.gradle.service.project.open.canLinkAndRefreshGradleProject
6262
import org.jetbrains.plugins.gradle.service.project.open.linkAndRefreshGradleProject
6363

64-
val DEFAULT_GRADLE_VERSION = SemanticVersion.release(8, 5)
64+
val DEFAULT_GRADLE_VERSION = SemanticVersion.release(8, 7)
6565
val GRADLE_VERSION_KEY = Key.create<SemanticVersion>("mcdev.gradleVersion")
6666

6767
fun FixedAssetsNewProjectWizardStep.addGradleWrapperProperties(project: Project) {

src/main/kotlin/platform/fabric/creator/gradle-steps.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class FabricGradleFilesStep(parent: NewProjectWizardStep) : AbstractLongRunningA
5757
val mcVersion = data.getUserData(FabricVersionChainStep.MC_VERSION_KEY) ?: return
5858
val yarnVersion = data.getUserData(FabricVersionChainStep.YARN_VERSION_KEY) ?: return
5959
val loaderVersion = data.getUserData(FabricVersionChainStep.LOADER_VERSION_KEY) ?: return
60-
val loomVersion = "1.5-SNAPSHOT"
60+
val loomVersion = "1.6-SNAPSHOT"
6161
val javaVersion = findStep<JdkProjectSetupFinalizer>().preferredJdk.ordinal
6262
val apiVersion = data.getUserData(FabricVersionChainStep.API_VERSION_KEY)
6363
val officialMappings = data.getUserData(FabricVersionChainStep.OFFICIAL_MAPPINGS_KEY) ?: false

src/main/kotlin/platform/forge/util/ForgePackDescriptor.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ data class ForgePackDescriptor(val format: Int, val comment: String) {
5555
val FORMAT_15 = ForgePackDescriptor(15, "")
5656
val FORMAT_18 = ForgePackDescriptor(18, "")
5757
val FORMAT_26 = ForgePackDescriptor(26, "")
58+
val FORMAT_41 = ForgePackDescriptor(26, "")
5859

5960
// See https://minecraft.gamepedia.com/Tutorials/Creating_a_resource_pack#.22pack_format.22
6061
fun forMcVersion(version: SemanticVersion): ForgePackDescriptor? = when {
@@ -69,7 +70,8 @@ data class ForgePackDescriptor(val format: Int, val comment: String) {
6970
version < MinecraftVersions.MC1_20 -> FORMAT_12
7071
version < MinecraftVersions.MC1_20_2 -> FORMAT_15
7172
version < MinecraftVersions.MC1_20_3 -> FORMAT_18
72-
version >= MinecraftVersions.MC1_20_3 -> FORMAT_26
73+
version < MinecraftVersions.MC1_20_5 -> FORMAT_26
74+
version >= MinecraftVersions.MC1_20_5 -> FORMAT_41
7375
else -> null
7476
}
7577
}

src/main/kotlin/platform/mixin/inspection/MixinClassReferenceInspection.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,17 @@
2020

2121
package com.demonwav.mcdev.platform.mixin.inspection
2222

23+
import com.demonwav.mcdev.platform.mixin.util.MixinConstants
2324
import com.demonwav.mcdev.platform.mixin.util.isAccessorMixin
2425
import com.demonwav.mcdev.platform.mixin.util.isMixin
2526
import com.demonwav.mcdev.util.findContainingClass
2627
import com.intellij.codeInspection.ProblemsHolder
2728
import com.intellij.psi.JavaElementVisitor
29+
import com.intellij.psi.PsiAnnotation
2830
import com.intellij.psi.PsiClassType
2931
import com.intellij.psi.PsiElementVisitor
3032
import com.intellij.psi.PsiTypeElement
33+
import com.intellij.psi.util.parentOfType
3134

3235
class MixinClassReferenceInspection : MixinInspection() {
3336

@@ -58,6 +61,11 @@ class MixinClassReferenceInspection : MixinInspection() {
5861
return
5962
}
6063

64+
val annotation = type.parentOfType<PsiAnnotation>()
65+
if (annotation != null && annotation.hasQualifiedName(MixinConstants.Annotations.DYNAMIC)) {
66+
return
67+
}
68+
6169
holder.registerProblem(type, "Mixin class cannot be referenced directly")
6270
}
6371
}

src/main/kotlin/platform/neoforge/creator/gradle-steps.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ import com.intellij.openapi.vfs.LocalFileSystem
4949
import com.intellij.openapi.vfs.VfsUtil
5050
import com.intellij.util.lang.JavaVersion
5151

52-
private val ngWrapperVersion = SemanticVersion.release(8, 4)
52+
private val ngWrapperVersion = SemanticVersion.release(8, 6)
5353

5454
const val MAGIC_RUN_CONFIGS_FILE = ".hello_from_mcdev"
5555

src/main/kotlin/util/MinecraftVersions.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,12 @@ object MinecraftVersions {
3838
val MC1_20_2 = SemanticVersion.release(1, 20, 2)
3939
val MC1_20_3 = SemanticVersion.release(1, 20, 3)
4040
val MC1_20_4 = SemanticVersion.release(1, 20, 4)
41+
val MC1_20_5 = SemanticVersion.release(1, 20, 5)
4142

4243
fun requiredJavaVersion(minecraftVersion: SemanticVersion) = when {
4344
minecraftVersion <= MC1_16_5 -> JavaSdkVersion.JDK_1_8
4445
minecraftVersion <= MC1_17_1 -> JavaSdkVersion.JDK_16
45-
else -> JavaSdkVersion.JDK_17
46+
minecraftVersion <= MC1_20_4 -> JavaSdkVersion.JDK_17
47+
else -> JavaSdkVersion.JDK_21
4648
}
4749
}

src/main/resources/fileTemplates/j2ee/fabric/fabric_build.gradle.ft

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ jar {
7979
// configure the maven publication
8080
publishing {
8181
publications {
82-
mavenJava(MavenPublication) {
82+
create("mavenJava", MavenPublication) {
83+
artifactId = project.archives_base_name
8384
from components.java
8485
}
8586
}

src/main/resources/fileTemplates/j2ee/neoforge/NeoForge Main Class.java.ft

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import com.mojang.logging.LogUtils;
44
import net.minecraft.client.Minecraft;
55
import net.minecraft.core.registries.BuiltInRegistries;
66
import net.minecraft.core.registries.Registries;
7+
import net.minecraft.network.chat.Component;
78
import net.minecraft.world.food.FoodProperties;
89
import net.minecraft.world.item.BlockItem;
910
import net.minecraft.world.item.CreativeModeTab;
@@ -56,6 +57,7 @@ public class ${CLASS_NAME}
5657

5758
// Creates a creative tab with the id "${MOD_ID}:example_tab" for the example item, that is placed after the combat tab
5859
public static final DeferredHolder<CreativeModeTab, CreativeModeTab> EXAMPLE_TAB = CREATIVE_MODE_TABS.register("example_tab", () -> CreativeModeTab.builder()
60+
.title(Component.translatable("itemGroup.${MOD_ID}"))
5961
.withTabsBefore(CreativeModeTabs.COMBAT)
6062
.icon(() -> EXAMPLE_ITEM.get().getDefaultInstance())
6163
.displayItems((parameters, output) -> {
@@ -76,7 +78,9 @@ public class ${CLASS_NAME}
7678
// Register the Deferred Register to the mod event bus so tabs get registered
7779
CREATIVE_MODE_TABS.register(modEventBus);
7880

79-
// Register ourselves for server and other game events we are interested in
81+
// Register ourselves for server and other game events we are interested in.
82+
// Note that this is necessary if and only if we want *this* class (ExampleMod) to respond directly to events.
83+
// Do not add this line if there are no @SubscribeEvent-annotated functions in this class, like onServerStarting() below.
8084
NeoForge.EVENT_BUS.register(this);
8185

8286
// Register the item to a creative tab

0 commit comments

Comments
 (0)