Проблема с импортами

Версия Minecraft
1.21.0
API
Forge
Я создаю мод, и не могу понять в чём проблема, ии говорит импорты неправильные, исправляет, а билд говорит неправильно.
.../ModForge/ForgeQuests $ gradle build
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.14.2/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: 21.0.7, JVM: 21.0.7 (Termux), Arch: aarch64

> Task :compileJava /storage/emulated/0/Download/ModForge/ForgeQuests/src/main/java/com/example/questmod/QuestMod.java:14: error: cannot find symbol
import net.minecraftforge.client.event.RegisterGuiOverlaysEvent; ^ symbol: class RegisterGuiOverlaysEvent
location: package net.minecraftforge.client.event
/storage/emulated/0/Download/ModForge/ForgeQuests/src/main/java/com/example/questmod/QuestMod.java:15: error: package net.minecraftforge.client.gui.overlay does not exist
import net.minecraftforge.client.gui.overlay.ForgeGui;
^
/storage/emulated/0/Download/ModForge/ForgeQuests/src/main/java/com/example/questmod/QuestMod.java:16: error: package net.minecraftforge.client.gui.overlay does not exist
import net.minecraftforge.client.gui.overlay.IGuiOverlay;
^
/storage/emulated/0/Download/ModForge/ForgeQuests/src/main/java/com/example/questmod/QuestMod.java:206: error: cannot find symbol
private void registerOverlays(RegisterGuiOverlaysEvent event) {
^
symbol: class RegisterGuiOverlaysEvent
location: class QuestMod
/storage/emulated/0/Download/ModForge/ForgeQuests/src/main/java/com/example/questmod/QuestMod.java:212: error: cannot find symbol
public static class QuestOverlay implements IGuiOverlay {
^
symbol: class IGuiOverlay
location: class QuestMod
/storage/emulated/0/Download/ModForge/ForgeQuests/src/main/java/com/example/questmod/QuestMod.java:214: error: cannot find symbol
public void render(ForgeGui gui, GuiGraphics guiGraphics, float partialTick, int screenWidth, int screenHeight) {
^
symbol: class ForgeGui
location: class QuestOverlay
/storage/emulated/0/Download/ModForge/ForgeQuests/src/main/java/com/example/questmod/QuestMod.java:193: error: cannot find symbol
SimpleSoundInstance.forUI(sound, pitch)
^
symbol: variable SimpleSoundInstance
location: class QuestMod
/storage/emulated/0/Download/ModForge/ForgeQuests/src/main/java/com/example/questmod/QuestMod.java:213: error: method does not override or implement a method from a supertype
@Override
^
8 errors

> Task :compileJava FAILED

[Incubating] Problems report is available at: file:///storage/emulated/0/Download/ModForge/ForgeQuests/build/reports/problems/problems-report.html

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler output below.
/storage/emulated/0/Download/ModForge/ForgeQuests/src/main/java/com/example/questmod/QuestMod.java:14: error: cannot find symbol
import net.minecraftforge.client.event.RegisterGuiOverlaysEvent;
^
symbol: class RegisterGuiOverlaysEvent
location: package net.minecraftforge.client.event
/storage/emulated/0/Download/ModForge/ForgeQuests/src/main/java/com/example/questmod/QuestMod.java:206: error: cannot find symbol
private void registerOverlays(RegisterGuiOverlaysEvent event) {
^
symbol: class RegisterGuiOverlaysEvent
location: class QuestMod
/storage/emulated/0/Download/ModForge/ForgeQuests/src/main/java/com/example/questmod/QuestMod.java:212: error: cannot find symbol
public static class QuestOverlay implements IGuiOverlay {
^
symbol: class IGuiOverlay
location: class QuestMod
/storage/emulated/0/Download/ModForge/ForgeQuests/src/main/java/com/example/questmod/QuestMod.java:214: error: cannot find symbol
public void render(ForgeGui gui, GuiGraphics guiGraphics, float partialTick, int screenWidth, int screenHeight) {
^
symbol: class ForgeGui
location: class QuestOverlay
/storage/emulated/0/Download/ModForge/ForgeQuests/src/main/java/com/example/questmod/QuestMod.java:193: error: cannot find symbol
SimpleSoundInstance.forUI(sound, pitch)
^
symbol: variable SimpleSoundInstance
location: class QuestMod
/storage/emulated/0/Download/ModForge/ForgeQuests/src/main/java/com/example/questmod/QuestMod.java:213: error: method does not override or implement a method from a supertype
@Override
^
/storage/emulated/0/Download/ModForge/ForgeQuests/src/main/java/com/example/questmod/QuestMod.java:15: error: package net.minecraftforge.client.gui.overlay does not exist
import net.minecraftforge.client.gui.overlay.ForgeGui;
^
/storage/emulated/0/Download/ModForge/ForgeQuests/src/main/java/com/example/questmod/QuestMod.java:16: error: package net.minecraftforge.client.gui.overlay does not exist
import net.minecraftforge.client.gui.overlay.IGuiOverlay;
^
8 errors

* Try:
> Check your code and dependencies to fix the compilation error(s)
> Run with --scan to get full insights.

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.14.2/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD FAILED in 39s
1 actionable task: 1 executed
.../ModForge/ForgeQuests $
 

Вложения

  • QuestMod.java
    5.4 KB · Просмотры: 1
изыди))
 
Назад
Сверху