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
143 Replies
⌛
This post has been reserved for your question.
Hey @Butcher! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose 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.
if anyone can help it would be really awesome
Can you include the whole exception as text in a code block?
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?
yes just a sec
those are the problems
what do u mean
am sorry I just started I Just wanna make a simple mod for my server
ok that's a Gradle issue as it seems
Can you right-click the project and select Gradle > Refresh Gradle project?
I did it
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?
nope
u mean the ones in the circle?
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
it doesnt open but if i hover on it this is what it says
what should I look for
oh
hold on
would it be easier for u if I screen share?
on vc?
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.So you are using Java 23?
I dont think so
how do I know
I downloaded jdk8
and forge for the version 1.16.5
Go to Window>Preferences>Installed JREs
there's a search in the preferences
pretty sure its 23 yeah
Can you show it?
wouldnt it be easier for u if I screen share this?
I can't go in a VC and look at screenshares rn
oh gotchu
ok that isn't 23
Can you show your build.gradle file?
where is that?
A file in your project
oh gotchu
u wanna see whats written there?
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
is this ok?
that one looks fine
Can you show the contents of the gradle folder?
it has a folder in it called warpper
with a jar in it and propreties
Can you show the properties file there?
yup
Can you change the 8.4 to 8.10?
yeah
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
now do I save it?
and refresh?
nvm the second one is
yes
how do I refresh again?
yes the Gradle>Refresh Gradle project again
right click on the project, then that
the error is still there
Can you click on the project and press ctrl+alt+T?
That should open a terminal
yeah
done
If you type
gradlew build
, it should try to build the project with Gradle (outside Eclipse)
What happens when doing that?ill try
outside eclipse means it isn't controlled by Eclipse but running it in a terminal in Eclipse
it is saying build failed
Can you copy the whole output?
and paste it here
yeah
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
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 FAILEDFAILURE: 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
Is there something mentioning
shinobirealm
in your build.gradle, settings.gradle or similar?what do you mean
how do I check that
or in your mods.toml
modLoader="javafml"
ordering="NONE"
side="BOTH"
This message has been formatted automatically. You can disable this using
/preferences
.open the files, press ctrl+f and look for the text "shinobirealm"
I guess it does
in modid
and display name
Did you change the modid?
yeah
What was it before?
thats what it said on the tutorial
I dont remember but it was a lot of stuff
I think it should stay
${modId}
but idkI can undo everything I did
if u want
What exactly did you change to that file?
I deleted the stuff that are not needed and changed the modid
maybe change that one file back
okay
this is what it says now
yeah, that looks better
now should I try refreshing
?
I think if you want to change the mod id and display name, you have to change it somewhere else
yooooo the problem is gone
where is that
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 workshit
I launched it
why that?
if you can launch it, it's a good thing I guess?
and its saying mods.toml missing metadata for modid shinobirealm
ok so I have no idea about Minecraft
ah damn
but its something wit hthe same file
so I cannot really answer that
what does missing metadata for modid shinobirealm mean
I think there are other files you can configure
its says mods.toml tho
Do you know what metadata means?
nope
Metadata is additional information about data
essentially data describing data
in your case, it's data describing the mod
I see
ok ill figure it out but I got another question
lets say I wanna add a code
how do I do that?
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?
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
The code might consist of multiple classes
Did your friend write that code?
I think so
I can send it over
I don't know how much that would help
because I don't know Minecraft modding
ah I see
well thanks a lot man
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.
Does their code consist of multiple files?
help me a ton
its really small
like 3 codes
3 codes means 3 files?
I think 3 classes?
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")
This message has been formatted automatically. You can disable this using
/preferences
.this is the first thing
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)
This message has been formatted automatically. You can disable this using
/preferences
.this is the second
Modify Player Capabilities: Create methods to handle the player’s ability to walk on water and climb walls.
@SubscribeEvent
This message has been formatted automatically. You can disable this using
/preferences
.and this is the third
Do these files have a line starting with
package
at the top?only the first one
this one
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
cant it be the same package?
you can change the package as you want
can I just create a new class in the same package
?
but the
package
line at the top must match
yes
.oh ok
gotchu
if it doesn't, you'd get an error
yeah they match
that one is its own class named KeyInputHandler
so I need to make another class for that?
And I guess that can be in
ModEvents
yeswhat is that
You see the
modid = "walkonwater"
there?yeah
it's within the first file from your friend
I think you want to replace that with your own mod id
gotchu
ill try it out
thanks a ton man
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.
Can you show the settings.gradle and gradle.properties files?
where are those?
files in your project
these are for configuring gradle
oh yeah
for sure
and I think your mod ID could maybe be there
This message has been formatted automatically. You can disable this using
/preferences
.these are props
this is settings
exactly
that one
yeah what about it
that's where you can change your mod id etc to whatever you want to
and make sure the
modid
here matchesalrighty
perfect
lemme try it out
it worked
amazing
thanks man
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.
Post Closed
This post has been closed by <@1052638812532129812>.