This package path should be right, as seen in the documentation, but using it is unresolved in my Mod?
https://maven.fabricmc.net/docs/yarn-1.19.1+build.1/net/minecraft/item/package-summary.html
declaration: package: net.minecraft.item
38 messages · Page 1 of 1 (latest)
This package path should be right, as seen in the documentation, but using it is unresolved in my Mod?
https://maven.fabricmc.net/docs/yarn-1.19.1+build.1/net/minecraft/item/package-summary.html
declaration: package: net.minecraft.item
show your build.gradle
Sure. One moment.
Are there components I should cut down that irrelevant?
Ill get rid of whats unimportant actuallly. 1 second.
no just post the full thing
oh
!!paste
When sharing a large piece of code or a log, you should use a paste site instead of uploading a file or dumping it in a large codeblock.
Dumping your code/log in a code block or a message can make it difficult for other people to read previous messages.
Paste sites and their size limits:
» GitHub Gist: 100 MiB / Requires an account
» Paste.gg: 15 MiB / Account is optional
» Mclo.gs: 10 MiB / Anonymous (designed specifically for Minecraft logs)
» Paste.ee: 1 MiB / Account is optional (raises limit to 6 MiB)
» Pastebin.com: 512 KiB / Account is optional
» Hastebin.com: 400 KiB / Anonymous
if it's too big
Am I right to post it here? its not too long to fit
yes
plugins {
id 'fabric-loom' version '1.6-SNAPSHOT'
id 'maven-publish'
}
version = project.mod_version
group = project.maven_group
base {
archivesName = project.archives_base_name
}
repositories {
}
dependencies {
}
processResources {
inputs.property "version", project.version
inputs.property "minecraft_version", project.minecraft_version
inputs.property "loader_version", project.loader_version
filteringCharset "UTF-8"
filesMatching("fabric.mod.json") {
expand "version": project.version,
"minecraft_version": project.minecraft_version,
"loader_version": project.loader_version
}
}
def targetJavaVersion = 21
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
it.options.release.set(targetJavaVersion)
}
}
java {
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
if (JavaVersion.current() < javaVersion) {
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
}
withSourcesJar()
}
jar {
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}"}
}
}
publishing {
publications {
create("mavenJava", MavenPublication) {
artifactId = project.archives_base_name
from components.java
}
}
repositories {
}
}
where are the contents of the dependencies block?
Yeah so, mainly my experience with MC development is Spigot, I've always used the intellij Plugin called "Minecraft Development", and I trust it to generate proper build.gradles.
When it generated the gradle it said:
// Add repositories to retrieve artifacts from in here.
// You should only use this when depending on other mods because
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
// for more information about repositories.
}
so I just assumed that loom is already sourcing the MC repo
Appreciate it. Uno Momento
So is what it says wrong?
loom sources it from the build.gradle
you need to have the declared dependencies as they're the bare minimum needed
(excluding fabric-api, which is optional and can be removed. but you likely want it)
👍
also there's no "mc repo". loom decompiles and maps the minecraft jar
When writing a strictly client-side mod, should I still have this option selected?
you can turn it off but make sure to set the environment to client in fabric.mod.json
otherwise it will load on servers and crash
So that will auto-disable the mod I assume?
if it's set to client, yes. it will be ignored on servers
Thank yuou.
Also, do you know why "@Inject" is resolving:
Cannot resolve any target instructions in target class
is this a mixin you wrote?
Yeah, it's only idea thats getting it wrong. it doesn't crash