Skip to content

Commit 7258d21

Browse files
committed
Merge branch '2025.2' into 2025.3
2 parents e2365e6 + eba8b42 commit 7258d21

File tree

7 files changed

+41
-20
lines changed

7 files changed

+41
-20
lines changed

buildSrc/src/main/kotlin/mcdev-core.gradle.kts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ version = "$ideaVersionName-$coreVersion"
4343
if (buildNumber != null) {
4444
version = "$version-nightly+$buildNumber"
4545
}
46+
if (System.getenv("CI") != "true") {
47+
version = "$version-local"
48+
}
4649

4750
java {
4851
toolchain {

changelog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Minecraft Development for IntelliJ
22

3+
## [1.8.9]
4+
5+
### Fixed
6+
7+
- Fixed freeze in project creator
8+
- Fixed ModifyExpressionValue sometimes being detected as disallowed if MixinExtras expressions are used
9+
310
## [1.8.8]
411

512
### Fixed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ org.gradle.jvmargs=-Xmx1g
2323

2424
ideaVersionName = 2025.3
2525

26-
coreVersion = 1.8.8
26+
coreVersion = 1.8.9
2727

2828
# Silences a build-time warning because we are bundling our own kotlin library
2929
kotlin.stdlib.default.dependency = false

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Minecraft Development for IntelliJ
3131
</tr>
3232
</table>
3333

34-
Info and Documentation [![Current Release](https://img.shields.io/badge/release-1.8.8-orange.svg?style=flat-square)](https://plugins.jetbrains.com/plugin/8327)
34+
Info and Documentation [![Current Release](https://img.shields.io/badge/release-1.8.9-orange.svg?style=flat-square)](https://plugins.jetbrains.com/plugin/8327)
3535
----------------------
3636

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

src/main/kotlin/creator/custom/providers/TemplateProvider.kt

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -82,34 +82,38 @@ interface TemplateProvider {
8282
bundle: ResourceBundle? = null
8383
): List<VfsLoadedTemplate> {
8484
val bundle = bundle ?: loadMessagesBundle(modalityState, repoRoot)
85+
val templatesToLoad = mutableListOf<VirtualFile>()
8586
val visitor = object : VirtualFileVisitor<Unit>() {
8687
override fun visitFile(file: VirtualFile): Boolean {
8788
if (!file.isFile || !file.name.endsWith(".mcdev.template.json")) {
8889
return true
8990
}
9091

91-
runBlocking(Dispatchers.Unconfined) {
92-
try {
93-
createVfsLoadedTemplate(modalityState, file.parent, file, bundle = bundle)
94-
?.let(templates::add)
95-
} catch (t: Throwable) {
96-
if (t is ControlFlowException) {
97-
throw t
98-
}
99-
100-
val attachment = runCatching { Attachment(file.name, file.readText()) }.getOrNull()
101-
if (attachment != null) {
102-
thisLogger().error("Failed to load template ${file.path}", t, attachment)
103-
} else {
104-
thisLogger().error("Failed to load template ${file.path}", t)
105-
}
106-
}
107-
}
92+
templatesToLoad += file
10893

10994
return true
11095
}
11196
}
11297
VfsUtilCore.visitChildrenRecursively(repoRoot, visitor)
98+
99+
for (file in templatesToLoad) {
100+
try {
101+
createVfsLoadedTemplate(modalityState, file.parent, file, bundle = bundle)
102+
?.let(templates::add)
103+
} catch (t: Throwable) {
104+
if (t is ControlFlowException) {
105+
throw t
106+
}
107+
108+
val attachment = runCatching { Attachment(file.name, file.readText()) }.getOrNull()
109+
if (attachment != null) {
110+
thisLogger().error("Failed to load template ${file.path}", t, attachment)
111+
} else {
112+
thisLogger().error("Failed to load template ${file.path}", t)
113+
}
114+
}
115+
}
116+
113117
return templates
114118
}
115119

src/main/kotlin/platform/mcp/vanillagradle/VanillaGradleProjectResolverExtension.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
package com.demonwav.mcdev.platform.mcp.vanillagradle
2222

2323
import com.demonwav.mcdev.platform.mcp.gradle.tooling.vanillagradle.VanillaGradleModel
24+
import com.intellij.openapi.application.runReadAction
2425
import com.intellij.openapi.externalSystem.model.DataNode
2526
import com.intellij.openapi.externalSystem.model.project.ModuleData
2627
import org.gradle.tooling.model.idea.IdeaModule
@@ -34,7 +35,9 @@ class VanillaGradleProjectResolverExtension : AbstractProjectResolverExtension()
3435
override fun getToolingExtensionsClasses() = extraProjectModelClasses
3536

3637
override fun populateModuleExtraModels(gradleModule: IdeaModule, ideModule: DataNode<ModuleData>) {
37-
val vgData = resolverCtx.getExtraProject(gradleModule, VanillaGradleModel::class.java)
38+
val vgData = runReadAction {
39+
resolverCtx.getExtraProject(gradleModule, VanillaGradleModel::class.java)
40+
}
3841
if (vgData != null && vgData.hasVanillaGradle()) {
3942
val gradleProjectPath = gradleModule.gradleProject.projectIdentifier.projectPath
4043
val suffix = if (gradleProjectPath.endsWith(':')) "" else ":"

src/main/kotlin/platform/mixin/handlers/mixinextras/ModifyExpressionValueHandler.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ class ModifyExpressionValueHandler : MixinExtrasInjectorAnnotationHandler() {
4646
return false
4747
}
4848

49+
if (decorations[ExpressionDecorations.SIMPLE_EXPRESSION_TYPE] != null) {
50+
return true
51+
}
52+
4953
val returnType = getInsnReturnType(insn) ?: return false
5054
return returnType != Type.VOID_TYPE
5155
}

0 commit comments

Comments
 (0)