I am getting an error when on my workspace in eclipse

I just finished setting up my workspace and was about to launch the game and then it shows me this
No description
143 Replies
JavaBot
JavaBot2mo ago
This post has been reserved for your question.
Hey @Butcher! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
! Slayer
! SlayerOP2mo ago
if anyone can help it would be really awesome
dan1st
dan1st2mo ago
Can you include the whole exception as text in a code block?
JavaBot
JavaBot2mo ago
Please format your code & make it more readable. For the java programming language, it should look like this:
```java public class Main { public static void main(String[] args){ System.out.println("Hello World!"); } ```
• These are backticks, not quotes.
dan1st
dan1st2mo ago
And there's also a "Problems" view in eclipse. You can show it with Window>Show View>Problems or Ctrl+3, "Problems". This view should display all warnings and errors Eclipse detects. Can you show these?
! Slayer
! SlayerOP2mo ago
yes just a sec
! Slayer
! SlayerOP2mo ago
No description
! Slayer
! SlayerOP2mo ago
those are the problems what do u mean am sorry I just started I Just wanna make a simple mod for my server
dan1st
dan1st2mo ago
ok that's a Gradle issue as it seems Can you right-click the project and select Gradle > Refresh Gradle project?
! Slayer
! SlayerOP2mo ago
I did it
dan1st
dan1st2mo ago
You shared the console output with the error logs. I was asking to include these here but as text instead of using an image Did that change anything in the problems view?
! Slayer
! SlayerOP2mo ago
nope u mean the ones in the circle?
dan1st
dan1st2mo ago
Can you double-click on the error in the problems view? that should open another window with more details about the error yes but there should also be more if you scroll up
! Slayer
! SlayerOP2mo ago
it doesnt open but if i hover on it this is what it says
No description
! Slayer
! SlayerOP2mo ago
what should I look for
dan1st
dan1st2mo ago
oh hold on
! Slayer
! SlayerOP2mo ago
would it be easier for u if I screen share? on vc?
JavaBot
JavaBot2mo ago
When compiling Java applications to .class files, javac adds an integer representing the version it has been compiled for to the class file. Each Java version has a class file (major) version associated with it. A list with Java versions and the matching class file major version numbers can be found in this Stack Overflow question. In order to use a class, the JVM must be of a newer or equal version to the one specified in the class file.
dan1st
dan1st2mo ago
So you are using Java 23?
! Slayer
! SlayerOP2mo ago
I dont think so how do I know I downloaded jdk8 and forge for the version 1.16.5
dan1st
dan1st2mo ago
Go to Window>Preferences>Installed JREs there's a search in the preferences
! Slayer
! SlayerOP2mo ago
pretty sure its 23 yeah
dan1st
dan1st2mo ago
Can you show it?
! Slayer
! SlayerOP2mo ago
No description
! Slayer
! SlayerOP2mo ago
wouldnt it be easier for u if I screen share this?
dan1st
dan1st2mo ago
I can't go in a VC and look at screenshares rn
! Slayer
! SlayerOP2mo ago
oh gotchu
dan1st
dan1st2mo ago
ok that isn't 23 Can you show your build.gradle file?
! Slayer
! SlayerOP2mo ago
where is that?
dan1st
dan1st2mo ago
A file in your project
! Slayer
! SlayerOP2mo ago
oh gotchu u wanna see whats written there?
dan1st
dan1st2mo ago
and there's also a gradle folder. If you expand that, there should be a gradle-wrapper.properties or something like that. Can you show that as well? yes
! Slayer
! SlayerOP2mo ago
is this ok?
dan1st
dan1st2mo ago
that one looks fine Can you show the contents of the gradle folder?
! Slayer
! SlayerOP2mo ago
it has a folder in it called warpper with a jar in it and propreties
dan1st
dan1st2mo ago
Can you show the properties file there?
! Slayer
! SlayerOP2mo ago
yup
! Slayer
! SlayerOP2mo ago
No description
dan1st
dan1st2mo ago
Can you change the 8.4 to 8.10?
! Slayer
! SlayerOP2mo ago
yeah
dan1st
dan1st2mo ago
According to https://docs.gradle.org/current/userguide/compatibility.html, Gradle 8.10 supports Java 23 I think that for some reason, you are running Gradle with Java 23
! Slayer
! SlayerOP2mo ago
now do I save it? and refresh?
dan1st
dan1st2mo ago
nvm the second one is yes
! Slayer
! SlayerOP2mo ago
how do I refresh again?
dan1st
dan1st2mo ago
yes the Gradle>Refresh Gradle project again right click on the project, then that
! Slayer
! SlayerOP2mo ago
the error is still there
dan1st
dan1st2mo ago
Can you click on the project and press ctrl+alt+T? That should open a terminal
! Slayer
! SlayerOP2mo ago
yeah done
dan1st
dan1st2mo ago
If you type gradlew build, it should try to build the project with Gradle (outside Eclipse) What happens when doing that?
! Slayer
! SlayerOP2mo ago
ill try
dan1st
dan1st2mo ago
outside eclipse means it isn't controlled by Eclipse but running it in a terminal in Eclipse
! Slayer
! SlayerOP2mo ago
it is saying build failed
dan1st
dan1st2mo ago
Can you copy the whole output? and paste it here
! Slayer
! SlayerOP2mo ago
yeah
! Slayer
! SlayerOP2mo ago
C:\Users\Army Freak\Desktop\Shinobi Realm Mod\Shinobi Realm>gradlew build Welcome to Gradle 8.10! Here are the highlights of this release: - Support for Java 23 - Faster configuration cache - Better configuration cache reports
For more details see https://docs.gradle.org/8.10/release-notes.html To honour the JVM settings for this build a single-use Daemon process will be forked. For more on this, please refer to https://docs.gradle.org/8.10/userguide/gradle_daemon.html#sec:disabling_the_daemon in the Gradle documentation. Daemon will be stopped at the end of the build
Configure project :
Java: 1.8.0_422, JVM: 25.422-b05 (Temurin), Arch: amd64
Task :processResources FAILED
FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':processResources'.
Could not copy file 'C:\Users\Army Freak\Desktop\Shinobi Realm Mod\Shinobi Realm\src\main\resources\META-INF\mods.toml' to 'C:\Users\Army Freak\Desktop\Shinobi Realm Mod\Shinobi Realm\build\resources\
main\META-INF\mods.toml'.
Missing property (shinobirealm) for Groovy template expansion. Defined keys [minecraft_version, minecraft_version_range, forge_version, forge_version_range, loader_version_range, mod_id, mod_name,
mod_license, mod_version, mod_authors, mod_description, project]. * Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. Get more help at https://help.gradle.org.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0. You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. For more on this, please refer to https://docs.gradle.org/8.10/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation. BUILD FAILED in 11s 2 actionable tasks: 2 executed
JavaBot
JavaBot2mo ago
C:\Users\Army Freak\Desktop\Shinobi Realm Mod\Shinobi Realm>gradlew build

Welcome to Gradle 8.10!

Here are the highlights of this release:
- Support for Java 23
- Faster configuration cache
- Better configuration cache reports

For more details see https://docs.gradle.org/8.10/release-notes.html

To honour the JVM settings for this build a single-use Daemon process will be forked. For more on this, please refer to https://docs.gradle.org/8.10/userguide/gradle_daemon.html#sec:disabling_the_daemon
in the Gradle documentation.
Daemon will be stopped at the end of the build

> Configure project :
Java: 1.8.0_422, JVM: 25.422-b05 (Temurin), Arch: amd64

> Task :processResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processResources'.
> Could not copy file 'C:\Users\Army Freak\Desktop\Shinobi Realm Mod\Shinobi Realm\src\main\resources\META-INF\mods.toml' to 'C:\Users\Army Freak\Desktop\Shinobi Realm Mod\Shinobi Realm\build\resources\
main\META-INF\mods.toml'.
> Missing property (shinobirealm) for Groovy template expansion. Defined keys [minecraft_version, minecraft_version_range, forge_version, forge_version_range, loader_version_range, mod_id, mod_name,
mod_license, mod_version, mod_authors, mod_description, project].

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.10/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD FAILED in 11s
2 actionable tasks: 2 executed
C:\Users\Army Freak\Desktop\Shinobi Realm Mod\Shinobi Realm>gradlew build

Welcome to Gradle 8.10!

Here are the highlights of this release:
- Support for Java 23
- Faster configuration cache
- Better configuration cache reports

For more details see https://docs.gradle.org/8.10/release-notes.html

To honour the JVM settings for this build a single-use Daemon process will be forked. For more on this, please refer to https://docs.gradle.org/8.10/userguide/gradle_daemon.html#sec:disabling_the_daemon
in the Gradle documentation.
Daemon will be stopped at the end of the build

> Configure project :
Java: 1.8.0_422, JVM: 25.422-b05 (Temurin), Arch: amd64

> Task :processResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processResources'.
> Could not copy file 'C:\Users\Army Freak\Desktop\Shinobi Realm Mod\Shinobi Realm\src\main\resources\META-INF\mods.toml' to 'C:\Users\Army Freak\Desktop\Shinobi Realm Mod\Shinobi Realm\build\resources\
main\META-INF\mods.toml'.
> Missing property (shinobirealm) for Groovy template expansion. Defined keys [minecraft_version, minecraft_version_range, forge_version, forge_version_range, loader_version_range, mod_id, mod_name,
mod_license, mod_version, mod_authors, mod_description, project].

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.10/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD FAILED in 11s
2 actionable tasks: 2 executed
dan1st
dan1st2mo ago
Is there something mentioning shinobirealm in your build.gradle, settings.gradle or similar?
! Slayer
! SlayerOP2mo ago
what do you mean how do I check that
dan1st
dan1st2mo ago
or in your mods.toml
john
john2mo ago
modLoader="javafml"
loaderVersion="${loader_version_range}"
license="${mod_license}"
# A URL to refer people to when problems occur with this mod
#issueTrackerURL="https://change.me.to.your.issue.tracker.example.invalid/" #optional
[[mods]]
modId="${shinobirealm}"
version="${mod_version}"
displayName="${shinobirealm}"
authors="${mod_authors}"

description='''${mod_description}'''
# A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional.
[[dependencies.${shinobirealm}]] #optional
modId="forge" #mandatory
mandatory=true #mandatory
versionRange="${forge_version_range}" #mandatory
ordering="NONE"
side="BOTH"
[[dependencies.${shinobirealm}]]
modId="minecraft"
mandatory=true
versionRange="${minecraft_version_range}"
loaderVersion="${loader_version_range}"
license="${mod_license}"
# A URL to refer people to when problems occur with this mod
#issueTrackerURL="https://change.me.to.your.issue.tracker.example.invalid/" #optional
[[mods]]
modId="${shinobirealm}"
version="${mod_version}"
displayName="${shinobirealm}"
authors="${mod_authors}"

description='''${mod_description}'''
# A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional.
[[dependencies.${shinobirealm}]] #optional
modId="forge" #mandatory
mandatory=true #mandatory
versionRange="${forge_version_range}" #mandatory
ordering="NONE"
side="BOTH"
[[dependencies.${shinobirealm}]]
modId="minecraft"
mandatory=true
versionRange="${minecraft_version_range}"
ordering="NONE" side="BOTH"
This message has been formatted automatically. You can disable this using /preferences.
dan1st
dan1st2mo ago
open the files, press ctrl+f and look for the text "shinobirealm"
! Slayer
! SlayerOP2mo ago
I guess it does in modid and display name
dan1st
dan1st2mo ago
Did you change the modid?
! Slayer
! SlayerOP2mo ago
yeah
dan1st
dan1st2mo ago
What was it before?
! Slayer
! SlayerOP2mo ago
thats what it said on the tutorial I dont remember but it was a lot of stuff
dan1st
dan1st2mo ago
I think it should stay ${modId} but idk
! Slayer
! SlayerOP2mo ago
I can undo everything I did if u want
dan1st
dan1st2mo ago
What exactly did you change to that file?
! Slayer
! SlayerOP2mo ago
I deleted the stuff that are not needed and changed the modid
dan1st
dan1st2mo ago
maybe change that one file back
! Slayer
! SlayerOP2mo ago
okay
! Slayer
! SlayerOP2mo ago
this is what it says now
dan1st
dan1st2mo ago
yeah, that looks better
! Slayer
! SlayerOP2mo ago
now should I try refreshing ?
dan1st
dan1st2mo ago
I think if you want to change the mod id and display name, you have to change it somewhere else
! Slayer
! SlayerOP2mo ago
yooooo the problem is gone where is that
dan1st
dan1st2mo ago
I would have told you to run gradlew build again in the terminal and then refreshing if it succeeded xd because I didn't expect it to work
! Slayer
! SlayerOP2mo ago
shit I launched it
dan1st
dan1st2mo ago
why that? if you can launch it, it's a good thing I guess?
! Slayer
! SlayerOP2mo ago
and its saying mods.toml missing metadata for modid shinobirealm
dan1st
dan1st2mo ago
ok so I have no idea about Minecraft
! Slayer
! SlayerOP2mo ago
ah damn but its something wit hthe same file
dan1st
dan1st2mo ago
so I cannot really answer that
! Slayer
! SlayerOP2mo ago
what does missing metadata for modid shinobirealm mean
dan1st
dan1st2mo ago
I think there are other files you can configure
! Slayer
! SlayerOP2mo ago
its says mods.toml tho
dan1st
dan1st2mo ago
Do you know what metadata means?
! Slayer
! SlayerOP2mo ago
nope
dan1st
dan1st2mo ago
Metadata is additional information about data essentially data describing data in your case, it's data describing the mod
! Slayer
! SlayerOP2mo ago
I see ok ill figure it out but I got another question lets say I wanna add a code how do I do that?
dan1st
dan1st2mo ago
It seems like Gradle takes the mods.toml, does some modifications to the file and then gives the file to Minecraft or forge or whatever needs the file it might be possible that the file itself is ok but the thing that's used as a helper for generating it has some issues well you can add additional classes?
! Slayer
! SlayerOP2mo ago
like I mean a friend sent me a code like its ready and all so I create a new class or put it in the main one
dan1st
dan1st2mo ago
The code might consist of multiple classes Did your friend write that code?
! Slayer
! SlayerOP2mo ago
I think so I can send it over
dan1st
dan1st2mo ago
I don't know how much that would help because I don't know Minecraft modding
! Slayer
! SlayerOP2mo ago
ah I see well thanks a lot man
JavaBot
JavaBot2mo ago
If you are finished with your post, please close it. If you are not, please ignore this message. Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
dan1st
dan1st2mo ago
Does their code consist of multiple files?
! Slayer
! SlayerOP2mo ago
help me a ton its really small like 3 codes
dan1st
dan1st2mo ago
3 codes means 3 files?
! Slayer
! SlayerOP2mo ago
I think 3 classes?
john
john2mo ago
Create Your Mod Class: This class will be the main entry point for your mod. package com.example.walkonwater; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.EventBusSubscriber; import net.minecraftforge.event.TickEvent; import net.minecraftforge.event.entity.player.PlayerEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; import net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus; @Mod("walkonwater")
public class WalkOnWaterMod {
public WalkOnWaterMod() {
MinecraftForge.EVENT_BUS.register(this);
}

@Mod.EventBusSubscriber(modid = "walkonwater", bus = Bus.MOD)
public static class ModEvents {
@SubscribeEvent
public static void onClientSetup(FMLClientSetupEvent event) {
// Register key binding
}
}
}
public class WalkOnWaterMod {
public WalkOnWaterMod() {
MinecraftForge.EVENT_BUS.register(this);
}

@Mod.EventBusSubscriber(modid = "walkonwater", bus = Bus.MOD)
public static class ModEvents {
@SubscribeEvent
public static void onClientSetup(FMLClientSetupEvent event) {
// Register key binding
}
}
}
This message has been formatted automatically. You can disable this using /preferences.
! Slayer
! SlayerOP2mo ago
this is the first thing
john
john2mo ago
Register a Key Binding: Use the ClientRegistry to create a key binding for the "K" key. import net.minecraftforge.fml.client.registry.ClientRegistry; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.event.InputEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus; import net.minecraftforge.fml.common.Mod.EventBusSubscriber; import net.minecraft.client.options.KeyBinding; @EventBusSubscriber(modid = "walkonwater", value = Dist.CLIENT)
public class KeyInputHandler {
public static KeyBinding toggleAbility;

public static void registerKeyBindings() {
toggleAbility = new KeyBinding("Toggle Walk on Water", InputUtil.Type.KEYSYM, GLFW.GLFW_KEY_K, "key.categories.misc");
ClientRegistry.registerKeyBinding(toggleAbility);
}

@SubscribeEvent
public static void onKeyInput(InputEvent.KeyInputEvent event) {
if (toggleAbility.isPressed()) {
// Toggle walk on water and wall climbing ability
}
}
}
public class KeyInputHandler {
public static KeyBinding toggleAbility;

public static void registerKeyBindings() {
toggleAbility = new KeyBinding("Toggle Walk on Water", InputUtil.Type.KEYSYM, GLFW.GLFW_KEY_K, "key.categories.misc");
ClientRegistry.registerKeyBinding(toggleAbility);
}

@SubscribeEvent
public static void onKeyInput(InputEvent.KeyInputEvent event) {
if (toggleAbility.isPressed()) {
// Toggle walk on water and wall climbing ability
}
}
}
This message has been formatted automatically. You can disable this using /preferences.
! Slayer
! SlayerOP2mo ago
this is the second
john
john2mo ago
Modify Player Capabilities: Create methods to handle the player’s ability to walk on water and climb walls. @SubscribeEvent
public static void onPlayerTick(TickEvent.PlayerTickEvent event) {
if (event.phase == TickEvent.Phase.END) {
// Check if the ability is active and modify player's behavior
if (isAbilityActive) {
if (event.player.isInWater()) {
event.player.setMotion(event.player.getMotion().x, 0, event.player.getMotion().z); // Prevent sinking
}
// Add wall climbing logic here
}
}
}
public static void onPlayerTick(TickEvent.PlayerTickEvent event) {
if (event.phase == TickEvent.Phase.END) {
// Check if the ability is active and modify player's behavior
if (isAbilityActive) {
if (event.player.isInWater()) {
event.player.setMotion(event.player.getMotion().x, 0, event.player.getMotion().z); // Prevent sinking
}
// Add wall climbing logic here
}
}
}
This message has been formatted automatically. You can disable this using /preferences.
! Slayer
! SlayerOP2mo ago
and this is the third
dan1st
dan1st2mo ago
Do these files have a line starting with package at the top?
! Slayer
! SlayerOP2mo ago
only the first one this one
dan1st
dan1st2mo ago
ok so this file would need to be in src/main/java/com/example/walkonwater and it would need to be called WalkOnWaterMod.java you can right-click on src/main/java and select new>class in package, enter com.example.walkonwater with the class name being WalkOnWaterMod
! Slayer
! SlayerOP2mo ago
cant it be the same package?
dan1st
dan1st2mo ago
you can change the package as you want
! Slayer
! SlayerOP2mo ago
can I just create a new class in the same package ?
dan1st
dan1st2mo ago
but the package line at the top must match yes .
! Slayer
! SlayerOP2mo ago
oh ok gotchu
dan1st
dan1st2mo ago
if it doesn't, you'd get an error
! Slayer
! SlayerOP2mo ago
yeah they match
dan1st
dan1st2mo ago
that one is its own class named KeyInputHandler
! Slayer
! SlayerOP2mo ago
so I need to make another class for that?
dan1st
dan1st2mo ago
And I guess that can be in ModEvents yes
! Slayer
! SlayerOP2mo ago
what is that
dan1st
dan1st2mo ago
You see the modid = "walkonwater" there?
! Slayer
! SlayerOP2mo ago
yeah
dan1st
dan1st2mo ago
it's within the first file from your friend I think you want to replace that with your own mod id
! Slayer
! SlayerOP2mo ago
gotchu ill try it out thanks a ton man
JavaBot
JavaBot2mo ago
If you are finished with your post, please close it. If you are not, please ignore this message. Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
dan1st
dan1st2mo ago
Can you show the settings.gradle and gradle.properties files?
! Slayer
! SlayerOP2mo ago
where are those?
dan1st
dan1st2mo ago
files in your project these are for configuring gradle
! Slayer
! SlayerOP2mo ago
oh yeah for sure
dan1st
dan1st2mo ago
and I think your mod ID could maybe be there
john
john2mo ago
pluginManagement {
repositories {
gradlePluginPortal()
maven { url = 'https://maven.minecraftforge.net/' }
maven {
name = 'MinecraftForge'
url = 'https://maven.minecraftforge.net/'
}
}
}

plugins {
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.7.0'
}
pluginManagement {
repositories {
gradlePluginPortal()
maven { url = 'https://maven.minecraftforge.net/' }
maven {
name = 'MinecraftForge'
url = 'https://maven.minecraftforge.net/'
}
}
}

plugins {
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.7.0'
}
This message has been formatted automatically. You can disable this using /preferences.
! Slayer
! SlayerOP2mo ago
these are props this is settings
dan1st
dan1st2mo ago
exactly that one
! Slayer
! SlayerOP2mo ago
yeah what about it
dan1st
dan1st2mo ago
that's where you can change your mod id etc to whatever you want to and make sure the modid here matches
! Slayer
! SlayerOP2mo ago
alrighty perfect lemme try it out it worked amazing thanks man
JavaBot
JavaBot2mo ago
If you are finished with your post, please close it. If you are not, please ignore this message. Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
JavaBot
JavaBot2mo ago
Post Closed
This post has been closed by <@1052638812532129812>.
Want results from more Discord servers?
Add your server