-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parchment not working in VSCode #235
Comments
plugins {
id 'java-library'
id 'eclipse'
id 'idea'
id 'maven-publish'
id 'net.neoforged.gradle.userdev' version '7.0.156'
}
version = mod_version
group = mod_group_id
repositories {
mavenLocal()
maven { // JEI
url "https://maven.blamejared.com"
}
maven { // TOP
url "https://maven.k-4u.nl"
}
}
base {
archivesName = mod_id
}
java.toolchain.languageVersion = JavaLanguageVersion.of(21)
//minecraft.accessTransformers.file rootProject.file('src/main/resources/META-INF/accesstransformer.cfg')
//minecraft.accessTransformers.entry public net.minecraft.client.Minecraft textureManager # textureManager
runs {
// applies to all the run configs below
configureEach {
// Recommended logging data for a userdev environment
// The markers can be added/remove as needed separated by commas.
// "SCAN": For mods scan.
// "REGISTRIES": For firing of registry events.
// "REGISTRYDUMP": For getting the contents of all registries.
systemProperty 'forge.logging.markers', 'REGISTRIES'
// Recommended logging level for the console
// You can set various levels here.
// Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
systemProperty 'forge.logging.console.level', 'debug'
modSource project.sourceSets.main
}
client {
// Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
systemProperty 'forge.enabledGameTestNamespaces', project.mod_id
}
server {
systemProperty 'forge.enabledGameTestNamespaces', project.mod_id
programArgument '--nogui'
}
// This run config launches GameTestServer and runs all registered gametests, then exits.
// By default, the server will crash when no gametests are provided.
// The gametest system is also enabled by default for other run configs under the /test command.
gameTestServer {
systemProperty 'forge.enabledGameTestNamespaces', project.mod_id
}
data {
// example of overriding the workingDirectory set in configureEach above, uncomment if you want to use it
// workingDirectory project.file('run-data')
// Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources.
programArguments.addAll '--mod', project.mod_id, '--all', '--output', file('src/generated/resources/').getAbsolutePath(), '--existing', file('src/main/resources/').getAbsolutePath()
}
}
// Include resources generated by data generators.
sourceSets.main.resources { srcDir 'src/generated/resources' }
// Sets up a dependency configuration called 'localRuntime'.
// This configuration should be used instead of 'runtimeOnly' to declare
// a dependency that will be present for runtime testing but that is
// "optional", meaning it will not be pulled by dependents of this mod.
configurations {
runtimeClasspath.extendsFrom localRuntime
}
dependencies {
// Specify the version of Minecraft to use.
// Depending on the plugin applied there are several options. We will assume you applied the userdev plugin as shown above.
// The group for userdev is net.neoforged, the module name is neoforge, and the version is the same as the neoforge version.
// You can however also use the vanilla plugin (net.neoforged.gradle.vanilla) to use a version of Minecraft without the neoforge loader.
// And its provides the option to then use net.minecraft as the group, and one of; client, server or joined as the module name, plus the game version as version.
// For all intends and purposes: You can treat this dependency as if it is a normal library you would use.
implementation "net.neoforged:neoforge:${neo_version}"
// Example optional mod dependency with JEI
// The JEI API is declared for compile time use, while the full JEI artifact is used at runtime
compileOnly "mezz.jei:jei-${minecraft_version}-common-api:${jei_version}"
compileOnly "mezz.jei:jei-${minecraft_version}-neoforge-api:${jei_version}"
localRuntime "mezz.jei:jei-${minecraft_version}-neoforge:${jei_version}"
implementation "mcjty.theoneprobe:theoneprobe:${top_version}"
// Example mod dependency using a mod jar from ./libs with a flat dir repository
// This maps to ./libs/coolmod-${mc_version}-${coolmod_version}.jar
// The group id is ignored when searching -- in this case, it is "blank"
// implementation "blank:coolmod-${mc_version}:${coolmod_version}"
// Example mod dependency using a file as dependency
// implementation files("libs/coolmod-${mc_version}-${coolmod_version}.jar")
// Example project dependency using a sister or child project:
// implementation project(":myproject")
// For more info:
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
// http://www.gradle.org/docs/current/userguide/dependency_management.html
}
// This block of code expands all declared replace properties in the specified resource targets.
// A missing property will result in an error. Properties are expanded using ${} Groovy notation.
// When "copyIdeResources" is enabled, this will also run before the game launches in IDE environments.
// See https://docs.gradle.org/current/dsl/org.gradle.language.jvm.tasks.ProcessResources.html
tasks.withType(ProcessResources).configureEach {
var replaceProperties = [
minecraft_version : minecraft_version,
minecraft_version_range: minecraft_version_range,
neo_version : neo_version,
neo_version_range : neo_version_range,
loader_version_range : loader_version_range,
mod_id : mod_id,
mod_name : mod_name,
mod_license : mod_license,
mod_version : mod_version,
mod_authors : mod_authors,
mod_description : mod_description
]
inputs.properties replaceProperties
filesMatching(['META-INF/neoforge.mods.toml']) {
expand replaceProperties
}
}
// Example configuration to allow publishing using the maven-publish plugin
publishing {
publications {
register('mavenJava', MavenPublication) {
from components.java
}
}
repositories {
maven {
url "file://${project.projectDir}/repo"
}
}
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
}
// IDEA no longer automatically downloads sources/javadoc jars for dependencies, so we need to explicitly enable the behavior.
idea {
module {
downloadSources = true
downloadJavadoc = true
}
}
tasks.named('wrapper', Wrapper).configure {
// Define wrapper values here so as to not have to always do so when updating gradlew.properties.
// Switching this to Wrapper.DistributionType.ALL will download the full gradle sources that comes with
// documentation attached on cursor hover of gradle classes and methods. However, this comes with increased
// file size for Gradle. If you do switch this to ALL, run the Gradle wrapper task twice afterwards.
// (Verify by checking gradle/wrapper/gradle-wrapper.properties to see if distributionUrl now points to `-all`)
distributionType = Wrapper.DistributionType.ALL
}
task copyVSCodeResources (dependsOn: 'processResources', type: Copy) {
from 'build/resources'
into 'bin/'
}
# Sets default memory used for gradle commands. Can be overridden by user or command line properties.
org.gradle.jvmargs=-Xmx5G
org.gradle.daemon=false
org.gradle.debug=false
neogradle.subsystems.parchment.minecraftVersion=1.21
neogradle.subsystems.parchment.mappingsVersion=2024.07.28
minecraft_version=1.21
minecraft_version_range=[1.21,1.21.1)
neo_version=21.0.167
neo_version_range=[21.0.0-beta,)
loader_version_range=[4,)
## Mod Properties
mod_id=modid
mod_name=mymod
mod_license=All Rights Reserved
mod_version=0.0.1
mod_group_id=groupid
mod_authors=author
mod_description=TBD
## Dev Dependencies
top_version=1.21_neo-12.0.0-1
jei_version=19.8.2.99
{
"editor.fontSize": 21,
"editor.tabSize": 2,
// "prettier.printWidth": 100,
// "editor.wordWrapColumn": 100,
"liveServer.settings.donotVerifyTags": true,
"files.autoSave": "off",
"editor.wordWrap": "on",
"editor.fontFamily": "'Dank Mono'",
"editor.fontWeight": "600",
"editor.fontLigatures": true,
"terminal.integrated.fontSize": 16,
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.minimap.enabled": false,
"workbench.settings.editor": "json",
"workbench.editor.enablePreview": false,
"explorer.confirmDragAndDrop": false,
"prettier.singleQuote": true,
"prettier.jsxSingleQuote": false,
"editor.formatOnSave": true,
"editor.acceptSuggestionOnCommitCharacter": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.addMissingImports": "explicit"
// "source.organizeImports": "explicit"
},
"javascript.updateImportsOnFileMove.enabled": "always",
"editor.suggestSelection": "first",
"files.exclude": {
"**/.classpath": true,
"**/.project": true,
"**/.settings": true,
"**/.factorypath": true
},
"editor.quickSuggestions": {
"other": true,
"comments": true,
"strings": true
},
"workbench.editorAssociations": {
"*.ipynb": "jupyter-notebook",
"*.class": "default"
},
"diffEditor.ignoreTrimWhitespace": false,
"editor.inlineSuggest.enabled": true,
"notebook.cellToolbarLocation": {
"default": "right",
"jupyter-notebook": "left"
},
"security.workspace.trust.untrustedFiles": "open",
"liveServer.settings.donotShowInfoMsg": true,
"[git-commit]": {
"editor.rulers": [72, 80]
},
"workbench.colorTheme": "Tokyo Night",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[markdown]": {
"editor.formatOnSave": false
},
"workbench.iconTheme": "vscode-icons",
"tailwindCSS.includeLanguages": {
"html": "html",
"javascript": "javascript",
"css": "css",
"plaintext": "jsx"
},
"javascript.preferences.quoteStyle": "double",
"totalTypeScript.hideAllTips": false,
"totalTypeScript.hideBasicTips": false,
"totalTypeScript.hiddenTips": [
"typing-function-parameters",
"readonly-object-property",
"basic-types",
"type-alias-declaration",
"interface-declaration",
"ts-object-type",
"array-type",
"variable-type-annotation",
"union-type",
"null-keyword",
"as-const",
"passing-generics-to-types",
"optional-object-property",
"returntype-utility-type",
"typeof",
"literal-type",
"record-utility-type",
"undefined-keyword",
"tuple-type",
"as-assertion",
"any-type",
"omit-utility-type",
"function-return-type",
"mapped-type",
"never-keyword",
"non-null-expression",
"generic-slots-in-functions",
"type-alias-with-generics",
"in-operator-narrowing",
"type-alias-with-multiple-generics"
],
"github.copilot.enable": {
"*": true,
"plaintext": true,
"markdown": true,
"scminput": false,
"yaml": false
},
"[python]": {
"editor.formatOnType": true,
"editor.defaultFormatter": "ms-python.black-formatter"
},
"breadcrumbs.enabled": false,
"editor.accessibilitySupport": "off",
"editor.stickyScroll.enabled": true,
"editor.linkedEditing": true,
"editor.suggest.insertMode": "replace",
"typescript.preferences.importModuleSpecifier": "non-relative",
"extensions.autoUpdate": "onlyEnabledExtensions",
"extensions.ignoreRecommendations": true,
"redhat.telemetry.enabled": false,
"explorer.confirmDelete": false,
"typescript.updateImportsOnFileMove.enabled": "always",
"window.zoomLevel": 1,
"window.titleBarStyle": "custom",
"java.autobuild.enabled": true,
"java.debug.settings.hotCodeReplace": "manual",
"[java]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.organizeImports": "always",
"editor.formatOnSave": "always"
}
},
"editor.inlayHints.enabled": "off",
"java.gradle.buildServer.enabled": "off",
"terminal.integrated.env.osx": {
"FIG_NEW_SESSION": "1"
},
"java.completion.importOrder": ["#"],
"files.watcherExclude": {
"**/build/**": true
}
} |
🚀 This issue has been resolved in NeoGradle version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
parchment is not working for me in VSCode after version 7.0.157.
7.0.158 and 7.0.159 doesn't work for me in those versions
The text was updated successfully, but these errors were encountered: