Skip to content

Commit 9067dd7

Browse files
committed
Merge branch '2023.1' into 2023.2
2 parents 4327920 + 74bd051 commit 9067dd7

File tree

102 files changed

+4358
-350
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+4358
-350
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 = 2023.2.2
2525
ideaVersionName = 2023.2.2
2626

27-
coreVersion = 1.6.12
27+
coreVersion = 1.7.0
2828
downloadIdeaSources = true
2929

3030
pluginTomlVersion = 232.8660.88

readme.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ Minecraft Development for IntelliJ
2323
<td align="left">2023.3</td>
2424
<td align="left"><a href="https://ci.mcdev.io/viewType.html?buildTypeId=MinecraftDev_Nightly_20233"><img src="https://ci.mcdev.io/app/rest/builds/buildType:(id:MinecraftDev_Nightly_20233)/statusIcon.svg" alt="2023.3 Nightly Status" /></a></td>
2525
</tr>
26+
<tr>
27+
<td align="left">2024.1</td>
28+
<td align="left"><a href="https://ci.mcdev.io/viewType.html?buildTypeId=MinecraftDev_Nightly_20241"><img src="https://ci.mcdev.io/app/rest/builds/buildType:(id:MinecraftDev_Nightly_20241)/statusIcon.svg" alt="2024.1 Nightly Status" /></a></td>
29+
</tr>
2630
<tr>
2731
<td align="right"><b>OS Tests</b></td>
2832
<td align="left" colspan="2">
@@ -31,7 +35,7 @@ Minecraft Development for IntelliJ
3135
</tr>
3236
</table>
3337

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

3741
<a href="https://discord.gg/j6UNcfr"><img src="https://i.imgur.com/JXu9C1G.png" height="48px"></img></a>
@@ -133,6 +137,7 @@ Supported Platforms
133137
- [![Sponge Icon](src/main/resources/assets/icons/platform/Sponge_dark.png?raw=true) **Sponge**](https://www.spongepowered.org/)
134138
- [![Architectury Icon](src/main/resources/assets/icons/platform/Architectury.png?raw=true) **Architectury**](https://github.com/architectury/architectury-api)
135139
- [![Forge Icon](src/main/resources/assets/icons/platform/Forge.png?raw=true) **Minecraft Forge**](https://forums.minecraftforge.net/)
140+
- <a href="https://neoforged.net/"><img src="src/main/resources/assets/icons/platform/NeoForge.png?raw=true" width="16" height="16"/> <b>Neoforge</b><a/>
136141
- [![Fabric Icon](src/main/resources/assets/icons/platform/Fabric.png?raw=true) **Fabric**](https://fabricmc.net)
137142
- [![Mixins Icon](src/main/resources/assets/icons/platform/Mixins_dark.png?raw=true) **Mixins**](https://github.com/SpongePowered/Mixin)
138143
- [![BungeeCord Icon](src/main/resources/assets/icons/platform/BungeeCord.png?raw=true) **BungeeCord**](https://www.spigotmc.org/wiki/bungeecord/) ([![Waterfall Icon](src/main/resources/assets/icons/platform/Waterfall.png?raw=true) Waterfall](https://github.com/PaperMC/Waterfall))
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
/*
2+
* Minecraft Development for IntelliJ
3+
*
4+
* https://mcdev.io/
5+
*
6+
* Copyright (C) 2024 minecraft-dev
7+
*
8+
* This program is free software: you can redistribute it and/or modify
9+
* it under the terms of the GNU Lesser General Public License as published
10+
* by the Free Software Foundation, version 3.0 only.
11+
*
12+
* This program is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU Lesser General Public License
18+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
19+
*/
20+
21+
package com.demonwav.mcdev.platform.mcp.gradle.tooling.neogradle
22+
23+
import com.demonwav.mcdev.platform.mcp.gradle.tooling.McpModelNG7
24+
import org.gradle.api.Project
25+
import org.jetbrains.annotations.NotNull
26+
import org.jetbrains.plugins.gradle.tooling.ErrorMessageBuilder
27+
import org.jetbrains.plugins.gradle.tooling.ModelBuilderService
28+
29+
final class NeoGradle7ModelBuilderImpl implements ModelBuilderService {
30+
31+
@Override
32+
boolean canBuild(String modelName) {
33+
return McpModelNG7.name == modelName
34+
}
35+
36+
@Override
37+
Object buildAll(String modelName, Project project) {
38+
def extension = project.extensions.findByName('minecraft')
39+
if (extension == null) {
40+
return null
41+
}
42+
43+
if (!project.plugins.findPlugin("net.neoforged.gradle.userdev")) {
44+
return null
45+
}
46+
47+
// NG userdev
48+
def runtimes = project.extensions.findByName('userDevRuntime').runtimes.get()
49+
def neoforgeVersion = null
50+
for (def entry in runtimes) {
51+
neoforgeVersion = entry.value.specification.forgeVersion
52+
break
53+
}
54+
if (neoforgeVersion == null) {
55+
return null
56+
}
57+
58+
def mappingsFile = project.tasks.neoFormMergeMappings.output.get().asFile
59+
60+
def accessTransformers = extension.accessTransformers.files.asList()
61+
62+
//noinspection GroovyAssignabilityCheck
63+
return new NeoGradle7ModelImpl(neoforgeVersion, mappingsFile, accessTransformers)
64+
}
65+
66+
@Override
67+
ErrorMessageBuilder getErrorMessageBuilder(@NotNull Project project, @NotNull Exception e) {
68+
return ErrorMessageBuilder.create(
69+
project, e, "MinecraftDev import errors"
70+
).withDescription("Unable to build MinecraftDev MCP project configuration")
71+
}
72+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*
2+
* Minecraft Development for IntelliJ
3+
*
4+
* https://mcdev.io/
5+
*
6+
* Copyright (C) 2024 minecraft-dev
7+
*
8+
* This program is free software: you can redistribute it and/or modify
9+
* it under the terms of the GNU Lesser General Public License as published
10+
* by the Free Software Foundation, version 3.0 only.
11+
*
12+
* This program is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU Lesser General Public License
18+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
19+
*/
20+
21+
package com.demonwav.mcdev.platform.mcp.gradle.tooling.neogradle
22+
23+
24+
import com.demonwav.mcdev.platform.mcp.gradle.tooling.McpModelNG7
25+
import groovy.transform.CompileStatic
26+
27+
@CompileStatic
28+
final class NeoGradle7ModelImpl implements McpModelNG7, Serializable {
29+
30+
final String neoForgeVersion
31+
final File mappingsFile
32+
final List<File> accessTransformers
33+
34+
NeoGradle7ModelImpl(
35+
final String neoForgeVersion,
36+
final File mappingsFile,
37+
final List<File> accessTransformers
38+
) {
39+
this.neoForgeVersion = neoForgeVersion
40+
this.mappingsFile = mappingsFile
41+
this.accessTransformers = accessTransformers
42+
}
43+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* Minecraft Development for IntelliJ
3+
*
4+
* https://mcdev.io/
5+
*
6+
* Copyright (C) 2024 minecraft-dev
7+
*
8+
* This program is free software: you can redistribute it and/or modify
9+
* it under the terms of the GNU Lesser General Public License as published
10+
* by the Free Software Foundation, version 3.0 only.
11+
*
12+
* This program is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU Lesser General Public License
18+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
19+
*/
20+
21+
package com.demonwav.mcdev.platform.mcp.gradle.tooling;
22+
23+
import java.io.File;
24+
import java.util.List;
25+
26+
public interface McpModelNG7 {
27+
String getNeoForgeVersion();
28+
File getMappingsFile();
29+
List<File> getAccessTransformers();
30+
}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
com.demonwav.mcdev.platform.mcp.gradle.tooling.archloom.ArchitecturyModelBuilderImpl
22
com.demonwav.mcdev.platform.mcp.gradle.tooling.fabricloom.FabricLoomModelBuilderImpl
3+
com.demonwav.mcdev.platform.mcp.gradle.tooling.neogradle.NeoGradle7ModelBuilderImpl
34
com.demonwav.mcdev.platform.mcp.gradle.tooling.vanillagradle.VanillaGradleModelBuilderImpl
45
com.demonwav.mcdev.platform.mcp.gradle.tooling.McpModelFG2BuilderImpl
56
com.demonwav.mcdev.platform.mcp.gradle.tooling.McpModelFG3BuilderImpl

src/main/kotlin/MinecraftConfigurable.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,13 @@ class MinecraftConfigurable : Configurable {
8484
}
8585
}
8686

87+
group(MCDevBundle("minecraft.settings.mixin")) {
88+
row {
89+
checkBox(MCDevBundle("minecraft.settings.mixin.shadow_annotation_same_line"))
90+
.bindSelected(settings::isShadowAnnotationsSameLine)
91+
}
92+
}
93+
8794
onApply {
8895
for (project in ProjectManager.getInstance().openProjects) {
8996
ProjectView.getInstance(project).refresh()

src/main/kotlin/MinecraftSettings.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ class MinecraftSettings : PersistentStateComponent<MinecraftSettings.State> {
3535
var isShowChatColorGutterIcons: Boolean = true,
3636
var isShowChatColorUnderlines: Boolean = false,
3737
var underlineType: UnderlineType = UnderlineType.DOTTED,
38+
39+
var isShadowAnnotationsSameLine: Boolean = true,
3840
)
3941

4042
private var state = State()
@@ -78,6 +80,12 @@ class MinecraftSettings : PersistentStateComponent<MinecraftSettings.State> {
7880
state.underlineType = underlineType
7981
}
8082

83+
var isShadowAnnotationsSameLine: Boolean
84+
get() = state.isShadowAnnotationsSameLine
85+
set(shadowAnnotationsSameLine) {
86+
state.isShadowAnnotationsSameLine = shadowAnnotationsSameLine
87+
}
88+
8189
enum class UnderlineType(private val regular: String, val effectType: EffectType) {
8290

8391
NORMAL("Normal", EffectType.LINE_UNDERSCORE),

src/main/kotlin/asset/PlatformAssets.kt

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

2121
package com.demonwav.mcdev.asset
2222

23+
import com.intellij.util.IconUtil
24+
2325
@Suppress("unused")
2426
object PlatformAssets : Assets() {
2527
val MINECRAFT_ICON = loadIcon("/assets/icons/platform/Minecraft.png")
@@ -62,6 +64,9 @@ object PlatformAssets : Assets() {
6264
val MIXIN_ICON_DARK = loadIcon("/assets/icons/platform/Mixins_dark.png")
6365
val MIXIN_ICON_2X_DARK = loadIcon("/assets/icons/platform/Mixins@2x_dark.png")
6466

67+
val NEOFORGE_ICON = IconUtil.scale(loadIcon("/assets/icons/platform/NeoForge.png"), null, 0.125f)
68+
val NEOFORGE_ICON_2X = IconUtil.scale(loadIcon("/assets/icons/platform/NeoForge.png"), null, 0.25f)
69+
6570
val MCP_ICON = loadIcon("/assets/icons/platform/MCP.png")
6671
val MCP_ICON_2X = loadIcon("/assets/icons/platform/MCP@2x.png")
6772
val MCP_ICON_DARK = loadIcon("/assets/icons/platform/MCP_dark.png")

0 commit comments

Comments
 (0)