default branch (1.21) does not compile #1

Closed
opened 2024-10-17 17:01:10 +02:00 by papaj-na-wrotkach · 12 comments
papaj-na-wrotkach commented 2024-10-17 17:01:10 +02:00 (Migrated from github.com)

Output of $ ./gradlew jar

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.5/userguide/gradle_daemon.html#sec:disabling_the_daemon in the Gradle documentation.
Daemon will be stopped at the end of the build 

> Configure project :
[Unimined] Plugin Version: 1.2.9
[Unimined/MinecraftDownloader] retrieving version metadata
[Unimined/MinecraftDownloader] retrieving launcher metadata
[Unimined] Plugin Version: 1.2.9
[Unimined/MinecraftDownloader] retrieving version metadata
[Unimined/MinecraftDownloader] retrieving launcher metadata
[Unimined] Plugin Version: 1.2.9
[Unimined/MinecraftDownloader] retrieving version metadata
[Unimined/MinecraftDownloader] retrieving launcher metadata

> Configure project :Common
[Unimined/Minecraft :Common:main] Applying minecraft config for source set 'main'
[Unimined/Minecraft :Common:main] Applying AccessWidenerMinecraftTransformer
[Unimined/MappingsProvider] Resolving mappings for source set 'main'
[Unimined/MappingsProvider] Mapping tree initialized, official -> [intermediary, mojmap]
[Unimined/Minecraft :Common:main] Applying run configs
[Unimined/FabricLike] fabric.mod.json not found in sourceSet :Common main
[Unimined/ModRemapper] Remapping mods from intermediary/intermediary to mojmap/intermediary
[Unimined/ModRemapper] No mods found for remapping
[Unimined/Fabric] Generating intermediary classpath.
[Unimined/FabricLike] fabric.mod.json not found in sourceSet :Common main
[Unimined/Runs] Applying runs

> Configure project :Fabric
[Unimined/Minecraft :Fabric:main] Applying minecraft config for source set 'main'
[Unimined/Minecraft :Fabric:main] Applying AccessWidenerMinecraftTransformer
[Unimined/MappingsProvider] Resolving mappings for source set 'main'
[Unimined/MappingsProvider] Mapping tree initialized, official -> [intermediary, mojmap]
[Unimined/Minecraft :Fabric:main] Applying run configs
[Unimined/ModRemapper] Remapping mods from intermediary/intermediary to mojmap/intermediary
[Unimined/ModRemapper] Found 49 mods for remapping
[Unimined/Fabric] Generating intermediary classpath.
[Unimined/Runs] Applying runs

> Configure project :NeoForge
[Unimined/Minecraft :NeoForge:main] Applying minecraft config for source set 'main'
[Unimined/Forge] Using FG3 transformer
[Unimined/Minecraft :NeoForge:main] Applying FG3MinecraftTransformer
[Unimined/Minecraft :NeoForge:main] Applying run configs
Merging client and server jars...
[Unimined/Forge] transforming minecraft jar for FG3
[Unimined/ForgeTransformer] Applying ATs [META-INF/accesstransformer.cfg]
[Unimined/ModRemapper] Remapping mods from mojmap/mojmap to mojmap/official
[Unimined/ModRemapper] No mods found for remapping
[Unimined/Runs] Applying runs

> Task :compileJava NO-SOURCE
> Task :processResources NO-SOURCE
> Task :classes UP-TO-DATE
> Task :jar

> Task :Common:compileJava
[REDACTED]/Repos/fdd-xplat/Common/src/main/java/com/author/examplemod/ExampleModCommon.java:4: error: package net.minecraft.core.registries does not exist
import net.minecraft.core.registries.BuiltInRegistries;
                                    ^
[REDACTED]/Repos/fdd-xplat/Common/src/main/java/com/author/examplemod/ExampleModCommon.java:5: error: package net.minecraft.network.chat does not exist
import net.minecraft.network.chat.Component;
                                 ^
[REDACTED]/Repos/fdd-xplat/Common/src/main/java/com/author/examplemod/ExampleModCommon.java:6: error: package net.minecraft.world.food does not exist
import net.minecraft.world.food.FoodProperties;
                               ^
[REDACTED]/Repos/fdd-xplat/Common/src/main/java/com/author/examplemod/ExampleModCommon.java:7: error: package net.minecraft.world.item does not exist
import net.minecraft.world.item.ItemStack;
                               ^
[REDACTED]/Repos/fdd-xplat/Common/src/main/java/com/author/examplemod/ExampleModCommon.java:8: error: package net.minecraft.world.item does not exist
import net.minecraft.world.item.Items;
                               ^
[REDACTED]/Repos/fdd-xplat/Common/src/main/java/com/author/examplemod/ExampleModCommon.java:9: error: package net.minecraft.world.item does not exist
import net.minecraft.world.item.TooltipFlag;
                               ^
[REDACTED]/Repos/fdd-xplat/Common/src/main/java/com/author/examplemod/ExampleModCommon.java:23: error: cannot find symbol
    public static void onItemTooltip(ItemStack stack, TooltipFlag context, List<Component> tooltip) {
                                     ^
  symbol:   class ItemStack
  location: class ExampleModCommon
[REDACTED]/Repos/fdd-xplat/Common/src/main/java/com/author/examplemod/ExampleModCommon.java:23: error: cannot find symbol
    public static void onItemTooltip(ItemStack stack, TooltipFlag context, List<Component> tooltip) {
                                                      ^
  symbol:   class TooltipFlag
  location: class ExampleModCommon
[REDACTED]/Repos/fdd-xplat/Common/src/main/java/com/author/examplemod/ExampleModCommon.java:23: error: cannot find symbol
    public static void onItemTooltip(ItemStack stack, TooltipFlag context, List<Component> tooltip) {
                                                                                ^
  symbol:   class Component
  location: class ExampleModCommon
[REDACTED]/Repos/fdd-xplat/Common/src/main/java/com/author/examplemod/mixin/client/ExampleMixin.java:4: error: package net.minecraft.client.gui.screens does not exist
import net.minecraft.client.gui.screens.TitleScreen;
                                       ^
[REDACTED]/Repos/fdd-xplat/Common/src/main/java/com/author/examplemod/mixin/client/ExampleMixin.java:10: error: cannot find symbol
@Mixin(TitleScreen.class)
       ^
  symbol: class TitleScreen
[REDACTED]/Repos/fdd-xplat/Common/src/main/java/com/author/examplemod/ExampleModCommon.java:17: error: cannot find symbol
        ModConstants.LOGGER.info("Diamond Item >> {}", BuiltInRegistries.ITEM.getKey(Items.DIAMOND));
                                                                                     ^
  symbol:   variable Items
  location: class ExampleModCommon
[REDACTED]/Repos/fdd-xplat/Common/src/main/java/com/author/examplemod/ExampleModCommon.java:17: error: package BuiltInRegistries does not exist
        ModConstants.LOGGER.info("Diamond Item >> {}", BuiltInRegistries.ITEM.getKey(Items.DIAMOND));
                                                                        ^
[REDACTED]/Repos/fdd-xplat/Common/src/main/java/com/author/examplemod/ExampleModCommon.java:25: error: cannot find symbol
            final FoodProperties food = stack.getItem().getFoodProperties();
                  ^
  symbol:   class FoodProperties
  location: class ExampleModCommon
[REDACTED]/Repos/fdd-xplat/Common/src/main/java/com/author/examplemod/ExampleModCommon.java:28: error: cannot find symbol
                tooltip.add(Component.literal("Nutrition: " + food.getNutrition()));
                            ^
  symbol:   variable Component
  location: class ExampleModCommon
[REDACTED]/Repos/fdd-xplat/Common/src/main/java/com/author/examplemod/ExampleModCommon.java:29: error: cannot find symbol
                tooltip.add(Component.literal("Saturation: " + food.getSaturationModifier()));
                            ^
  symbol:   variable Component
  location: class ExampleModCommon
16 errors

> Task :Common:compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':Common:compileJava'.
> Compilation failed; see the compiler error output for details.

* Try:
> Run with --info option to get more log output.
> 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.5/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD FAILED in 1m 18s
2 actionable tasks: 2 executed

As you can see, there are some import-related errors. Launching any Gradle task which requires :Common:compileJava in IntelliJ IDEA also fails with the same message.

System info:

  • OS: up-to-date Manjaro Linux
  • JDK Temurin-21.0.5+11 (also tried Oracle GraalVM 21.0.4+8.1)
  • Gradle repository included
Output of `$ ./gradlew jar` ``` 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.5/userguide/gradle_daemon.html#sec:disabling_the_daemon in the Gradle documentation. Daemon will be stopped at the end of the build > Configure project : [Unimined] Plugin Version: 1.2.9 [Unimined/MinecraftDownloader] retrieving version metadata [Unimined/MinecraftDownloader] retrieving launcher metadata [Unimined] Plugin Version: 1.2.9 [Unimined/MinecraftDownloader] retrieving version metadata [Unimined/MinecraftDownloader] retrieving launcher metadata [Unimined] Plugin Version: 1.2.9 [Unimined/MinecraftDownloader] retrieving version metadata [Unimined/MinecraftDownloader] retrieving launcher metadata > Configure project :Common [Unimined/Minecraft :Common:main] Applying minecraft config for source set 'main' [Unimined/Minecraft :Common:main] Applying AccessWidenerMinecraftTransformer [Unimined/MappingsProvider] Resolving mappings for source set 'main' [Unimined/MappingsProvider] Mapping tree initialized, official -> [intermediary, mojmap] [Unimined/Minecraft :Common:main] Applying run configs [Unimined/FabricLike] fabric.mod.json not found in sourceSet :Common main [Unimined/ModRemapper] Remapping mods from intermediary/intermediary to mojmap/intermediary [Unimined/ModRemapper] No mods found for remapping [Unimined/Fabric] Generating intermediary classpath. [Unimined/FabricLike] fabric.mod.json not found in sourceSet :Common main [Unimined/Runs] Applying runs > Configure project :Fabric [Unimined/Minecraft :Fabric:main] Applying minecraft config for source set 'main' [Unimined/Minecraft :Fabric:main] Applying AccessWidenerMinecraftTransformer [Unimined/MappingsProvider] Resolving mappings for source set 'main' [Unimined/MappingsProvider] Mapping tree initialized, official -> [intermediary, mojmap] [Unimined/Minecraft :Fabric:main] Applying run configs [Unimined/ModRemapper] Remapping mods from intermediary/intermediary to mojmap/intermediary [Unimined/ModRemapper] Found 49 mods for remapping [Unimined/Fabric] Generating intermediary classpath. [Unimined/Runs] Applying runs > Configure project :NeoForge [Unimined/Minecraft :NeoForge:main] Applying minecraft config for source set 'main' [Unimined/Forge] Using FG3 transformer [Unimined/Minecraft :NeoForge:main] Applying FG3MinecraftTransformer [Unimined/Minecraft :NeoForge:main] Applying run configs Merging client and server jars... [Unimined/Forge] transforming minecraft jar for FG3 [Unimined/ForgeTransformer] Applying ATs [META-INF/accesstransformer.cfg] [Unimined/ModRemapper] Remapping mods from mojmap/mojmap to mojmap/official [Unimined/ModRemapper] No mods found for remapping [Unimined/Runs] Applying runs > Task :compileJava NO-SOURCE > Task :processResources NO-SOURCE > Task :classes UP-TO-DATE > Task :jar > Task :Common:compileJava [REDACTED]/Repos/fdd-xplat/Common/src/main/java/com/author/examplemod/ExampleModCommon.java:4: error: package net.minecraft.core.registries does not exist import net.minecraft.core.registries.BuiltInRegistries; ^ [REDACTED]/Repos/fdd-xplat/Common/src/main/java/com/author/examplemod/ExampleModCommon.java:5: error: package net.minecraft.network.chat does not exist import net.minecraft.network.chat.Component; ^ [REDACTED]/Repos/fdd-xplat/Common/src/main/java/com/author/examplemod/ExampleModCommon.java:6: error: package net.minecraft.world.food does not exist import net.minecraft.world.food.FoodProperties; ^ [REDACTED]/Repos/fdd-xplat/Common/src/main/java/com/author/examplemod/ExampleModCommon.java:7: error: package net.minecraft.world.item does not exist import net.minecraft.world.item.ItemStack; ^ [REDACTED]/Repos/fdd-xplat/Common/src/main/java/com/author/examplemod/ExampleModCommon.java:8: error: package net.minecraft.world.item does not exist import net.minecraft.world.item.Items; ^ [REDACTED]/Repos/fdd-xplat/Common/src/main/java/com/author/examplemod/ExampleModCommon.java:9: error: package net.minecraft.world.item does not exist import net.minecraft.world.item.TooltipFlag; ^ [REDACTED]/Repos/fdd-xplat/Common/src/main/java/com/author/examplemod/ExampleModCommon.java:23: error: cannot find symbol public static void onItemTooltip(ItemStack stack, TooltipFlag context, List<Component> tooltip) { ^ symbol: class ItemStack location: class ExampleModCommon [REDACTED]/Repos/fdd-xplat/Common/src/main/java/com/author/examplemod/ExampleModCommon.java:23: error: cannot find symbol public static void onItemTooltip(ItemStack stack, TooltipFlag context, List<Component> tooltip) { ^ symbol: class TooltipFlag location: class ExampleModCommon [REDACTED]/Repos/fdd-xplat/Common/src/main/java/com/author/examplemod/ExampleModCommon.java:23: error: cannot find symbol public static void onItemTooltip(ItemStack stack, TooltipFlag context, List<Component> tooltip) { ^ symbol: class Component location: class ExampleModCommon [REDACTED]/Repos/fdd-xplat/Common/src/main/java/com/author/examplemod/mixin/client/ExampleMixin.java:4: error: package net.minecraft.client.gui.screens does not exist import net.minecraft.client.gui.screens.TitleScreen; ^ [REDACTED]/Repos/fdd-xplat/Common/src/main/java/com/author/examplemod/mixin/client/ExampleMixin.java:10: error: cannot find symbol @Mixin(TitleScreen.class) ^ symbol: class TitleScreen [REDACTED]/Repos/fdd-xplat/Common/src/main/java/com/author/examplemod/ExampleModCommon.java:17: error: cannot find symbol ModConstants.LOGGER.info("Diamond Item >> {}", BuiltInRegistries.ITEM.getKey(Items.DIAMOND)); ^ symbol: variable Items location: class ExampleModCommon [REDACTED]/Repos/fdd-xplat/Common/src/main/java/com/author/examplemod/ExampleModCommon.java:17: error: package BuiltInRegistries does not exist ModConstants.LOGGER.info("Diamond Item >> {}", BuiltInRegistries.ITEM.getKey(Items.DIAMOND)); ^ [REDACTED]/Repos/fdd-xplat/Common/src/main/java/com/author/examplemod/ExampleModCommon.java:25: error: cannot find symbol final FoodProperties food = stack.getItem().getFoodProperties(); ^ symbol: class FoodProperties location: class ExampleModCommon [REDACTED]/Repos/fdd-xplat/Common/src/main/java/com/author/examplemod/ExampleModCommon.java:28: error: cannot find symbol tooltip.add(Component.literal("Nutrition: " + food.getNutrition())); ^ symbol: variable Component location: class ExampleModCommon [REDACTED]/Repos/fdd-xplat/Common/src/main/java/com/author/examplemod/ExampleModCommon.java:29: error: cannot find symbol tooltip.add(Component.literal("Saturation: " + food.getSaturationModifier())); ^ symbol: variable Component location: class ExampleModCommon 16 errors > Task :Common:compileJava FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':Common:compileJava'. > Compilation failed; see the compiler error output for details. * Try: > Run with --info option to get more log output. > 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.5/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation. BUILD FAILED in 1m 18s 2 actionable tasks: 2 executed ``` As you can see, there are some import-related errors. Launching any Gradle task which requires `:Common:compileJava` in IntelliJ IDEA also fails with the same message. ## System info: - **OS**: up-to-date Manjaro Linux - **JDK** Temurin-21.0.5+11 (also tried Oracle GraalVM 21.0.4+8.1) - **Gradle** repository included
Kaleidio commented 2024-10-17 17:03:15 +02:00 (Migrated from github.com)

Looks like our example mod needs some updates to its resource registers, especially for the changes to foods and tooltips. These were changes only added recently to 1.21.

Not sure who we'll assign this to but I'll ping @hypherionmc about it for now.

Looks like our example mod needs some updates to its resource registers, especially for the changes to foods and tooltips. These were changes only added recently to 1.21. Not sure who we'll assign this to but I'll ping @hypherionmc about it for now.
Kaleidio commented 2024-10-17 17:07:25 +02:00 (Migrated from github.com)

Theoretically though, if you ditch the example mod, you should be able to code things as normal.

Theoretically though, if you ditch the example mod, you should be able to code things as normal.
papaj-na-wrotkach commented 2024-10-17 18:22:58 +02:00 (Migrated from github.com)

Hmm... I deleted the lines related to tooltip listener and I still have some errors:

18:13:54: Executing 'jar'...


> Configure project :
[Unimined] Plugin Version: 1.2.9
[Unimined/MinecraftDownloader] retrieving version metadata
[Unimined/MinecraftDownloader] retrieving launcher metadata
[Unimined] Plugin Version: 1.2.9
[Unimined/MinecraftDownloader] retrieving version metadata
[Unimined/MinecraftDownloader] retrieving launcher metadata
[Unimined] Plugin Version: 1.2.9
[Unimined/MinecraftDownloader] retrieving version metadata
[Unimined/MinecraftDownloader] retrieving launcher metadata

> Configure project :Common
[Unimined/Minecraft :Common:main] Applying minecraft config for source set 'main'
[Unimined/Minecraft :Common:main] Applying AccessWidenerMinecraftTransformer
[Unimined/MappingsProvider] Resolving mappings for source set 'main'
[Unimined/MappingsProvider] Mapping tree initialized, official -> [intermediary, mojmap]
[Unimined/Minecraft :Common:main] Applying run configs
[Unimined/FabricLike] fabric.mod.json not found in sourceSet :Common main
[Unimined/ModRemapper] Remapping mods from intermediary/intermediary to mojmap/intermediary
[Unimined/ModRemapper] No mods found for remapping
[Unimined/Fabric] Generating intermediary classpath.
[Unimined/FabricLike] fabric.mod.json not found in sourceSet :Common main
[Unimined/Runs] Applying runs

> Configure project :Fabric
[Unimined/Minecraft :Fabric:main] Applying minecraft config for source set 'main'
[Unimined/Minecraft :Fabric:main] Applying AccessWidenerMinecraftTransformer
[Unimined/MappingsProvider] Resolving mappings for source set 'main'
[Unimined/MappingsProvider] Mapping tree initialized, official -> [intermediary, mojmap]
[Unimined/Minecraft :Fabric:main] Applying run configs
[Unimined/ModRemapper] Remapping mods from intermediary/intermediary to mojmap/intermediary
[Unimined/ModRemapper] Found 49 mods for remapping
[Unimined/Fabric] Generating intermediary classpath.
[Unimined/Runs] Applying runs

> Configure project :NeoForge
[Unimined/Minecraft :NeoForge:main] Applying minecraft config for source set 'main'
[Unimined/Forge] Using FG3 transformer
[Unimined/Minecraft :NeoForge:main] Applying FG3MinecraftTransformer
[Unimined/Minecraft :NeoForge:main] Applying run configs
Merging client and server jars...
[Unimined/Forge] transforming minecraft jar for FG3
[Unimined/ForgeTransformer] Applying ATs [META-INF/accesstransformer.cfg]
[Unimined/ModRemapper] Remapping mods from mojmap/mojmap to mojmap/official
[Unimined/ModRemapper] No mods found for remapping
[Unimined/Runs] Applying runs

> Task :compileJava NO-SOURCE
> Task :processResources NO-SOURCE
> Task :classes UP-TO-DATE
> Task :jar UP-TO-DATE

> Task :Common:compileJava
[REDACTED]/Repos/fdd-xplat/Common/src/main/java/com/author/examplemod/mixin/client/ExampleMixin.java:4: error: package net.minecraft.client.gui.screens does not exist
import net.minecraft.client.gui.screens.TitleScreen;
                                       ^
[REDACTED]/Repos/fdd-xplat/Common/src/main/java/com/author/examplemod/ExampleModCommon.java:4: error: package net.minecraft.core.registries does not exist
import net.minecraft.core.registries.BuiltInRegistries;
                                    ^
[REDACTED]/Repos/fdd-xplat/Common/src/main/java/com/author/examplemod/ExampleModCommon.java:5: error: package net.minecraft.world.item does not exist
import net.minecraft.world.item.Items;
                               ^
[REDACTED]/Repos/fdd-xplat/Common/src/main/java/com/author/examplemod/mixin/client/ExampleMixin.java:10: error: cannot find symbol
@Mixin(TitleScreen.class)
       ^
  symbol: class TitleScreen
[REDACTED]/Repos/fdd-xplat/Common/src/main/java/com/author/examplemod/ExampleModCommon.java:11: error: cannot find symbol
        ModConstants.LOGGER.info("Diamond Item >> {}", BuiltInRegistries.ITEM.getKey(Items.DIAMOND));
                                                                                     ^
  symbol:   variable Items
  location: class ExampleModCommon
[REDACTED]/Repos/fdd-xplat/Common/src/main/java/com/author/examplemod/ExampleModCommon.java:11: error: package BuiltInRegistries does not exist
        ModConstants.LOGGER.info("Diamond Item >> {}", BuiltInRegistries.ITEM.getKey(Items.DIAMOND));
                                                                        ^
6 errors

> Task :Common:compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':Common:compileJava'.
> Compilation failed; see the compiler error output for details.

* Try:
> Run with --info option to get more log output.
> Run with --scan to get full insights.

BUILD FAILED in 33s

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.5/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
2 actionable tasks: 1 executed, 1 up-to-date
18:14:29: Execution finished 'jar'.

It seems like Java cannot find anything from net.minecraft namespace in the Common module.

Hmm... I deleted the lines related to tooltip listener and I still have some errors: ``` 18:13:54: Executing 'jar'... > Configure project : [Unimined] Plugin Version: 1.2.9 [Unimined/MinecraftDownloader] retrieving version metadata [Unimined/MinecraftDownloader] retrieving launcher metadata [Unimined] Plugin Version: 1.2.9 [Unimined/MinecraftDownloader] retrieving version metadata [Unimined/MinecraftDownloader] retrieving launcher metadata [Unimined] Plugin Version: 1.2.9 [Unimined/MinecraftDownloader] retrieving version metadata [Unimined/MinecraftDownloader] retrieving launcher metadata > Configure project :Common [Unimined/Minecraft :Common:main] Applying minecraft config for source set 'main' [Unimined/Minecraft :Common:main] Applying AccessWidenerMinecraftTransformer [Unimined/MappingsProvider] Resolving mappings for source set 'main' [Unimined/MappingsProvider] Mapping tree initialized, official -> [intermediary, mojmap] [Unimined/Minecraft :Common:main] Applying run configs [Unimined/FabricLike] fabric.mod.json not found in sourceSet :Common main [Unimined/ModRemapper] Remapping mods from intermediary/intermediary to mojmap/intermediary [Unimined/ModRemapper] No mods found for remapping [Unimined/Fabric] Generating intermediary classpath. [Unimined/FabricLike] fabric.mod.json not found in sourceSet :Common main [Unimined/Runs] Applying runs > Configure project :Fabric [Unimined/Minecraft :Fabric:main] Applying minecraft config for source set 'main' [Unimined/Minecraft :Fabric:main] Applying AccessWidenerMinecraftTransformer [Unimined/MappingsProvider] Resolving mappings for source set 'main' [Unimined/MappingsProvider] Mapping tree initialized, official -> [intermediary, mojmap] [Unimined/Minecraft :Fabric:main] Applying run configs [Unimined/ModRemapper] Remapping mods from intermediary/intermediary to mojmap/intermediary [Unimined/ModRemapper] Found 49 mods for remapping [Unimined/Fabric] Generating intermediary classpath. [Unimined/Runs] Applying runs > Configure project :NeoForge [Unimined/Minecraft :NeoForge:main] Applying minecraft config for source set 'main' [Unimined/Forge] Using FG3 transformer [Unimined/Minecraft :NeoForge:main] Applying FG3MinecraftTransformer [Unimined/Minecraft :NeoForge:main] Applying run configs Merging client and server jars... [Unimined/Forge] transforming minecraft jar for FG3 [Unimined/ForgeTransformer] Applying ATs [META-INF/accesstransformer.cfg] [Unimined/ModRemapper] Remapping mods from mojmap/mojmap to mojmap/official [Unimined/ModRemapper] No mods found for remapping [Unimined/Runs] Applying runs > Task :compileJava NO-SOURCE > Task :processResources NO-SOURCE > Task :classes UP-TO-DATE > Task :jar UP-TO-DATE > Task :Common:compileJava [REDACTED]/Repos/fdd-xplat/Common/src/main/java/com/author/examplemod/mixin/client/ExampleMixin.java:4: error: package net.minecraft.client.gui.screens does not exist import net.minecraft.client.gui.screens.TitleScreen; ^ [REDACTED]/Repos/fdd-xplat/Common/src/main/java/com/author/examplemod/ExampleModCommon.java:4: error: package net.minecraft.core.registries does not exist import net.minecraft.core.registries.BuiltInRegistries; ^ [REDACTED]/Repos/fdd-xplat/Common/src/main/java/com/author/examplemod/ExampleModCommon.java:5: error: package net.minecraft.world.item does not exist import net.minecraft.world.item.Items; ^ [REDACTED]/Repos/fdd-xplat/Common/src/main/java/com/author/examplemod/mixin/client/ExampleMixin.java:10: error: cannot find symbol @Mixin(TitleScreen.class) ^ symbol: class TitleScreen [REDACTED]/Repos/fdd-xplat/Common/src/main/java/com/author/examplemod/ExampleModCommon.java:11: error: cannot find symbol ModConstants.LOGGER.info("Diamond Item >> {}", BuiltInRegistries.ITEM.getKey(Items.DIAMOND)); ^ symbol: variable Items location: class ExampleModCommon [REDACTED]/Repos/fdd-xplat/Common/src/main/java/com/author/examplemod/ExampleModCommon.java:11: error: package BuiltInRegistries does not exist ModConstants.LOGGER.info("Diamond Item >> {}", BuiltInRegistries.ITEM.getKey(Items.DIAMOND)); ^ 6 errors > Task :Common:compileJava FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':Common:compileJava'. > Compilation failed; see the compiler error output for details. * Try: > Run with --info option to get more log output. > Run with --scan to get full insights. BUILD FAILED in 33s 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.5/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation. 2 actionable tasks: 1 executed, 1 up-to-date 18:14:29: Execution finished 'jar'. ``` It seems like Java cannot find anything from `net.minecraft` namespace in the `Common` module.
Kaleidio commented 2024-10-17 18:26:04 +02:00 (Migrated from github.com)

Right, something else must be going on here then. Hyph will have to have a look as it's beyond my capabilities

Right, something else must be going on here then. Hyph will have to have a look as it's beyond my capabilities
hypherionmc commented 2024-10-17 18:55:49 +02:00 (Migrated from github.com)

Pushed a fix for the compile issue, and also updated fabric/neoforge.

Regarding the missing MC classes, if you are using IntelliJ idea, go into Settings -> Build, Execution, Deployment -> Build Tools -> Gradle and make sure that gradle jvm is set to Project SDK, instead of your system default.

Image

Pushed a fix for the compile issue, and also updated fabric/neoforge. Regarding the missing MC classes, if you are using IntelliJ idea, go into Settings -> Build, Execution, Deployment -> Build Tools -> Gradle and make sure that gradle jvm is set to Project SDK, instead of your system default. ![Image](https://github.com/user-attachments/assets/57d3705c-212e-4913-a5f0-5ed4307e4c17)
papaj-na-wrotkach commented 2024-10-17 19:59:25 +02:00 (Migrated from github.com)

@hypherionmc I already changed it to Project SDK and I still get errors (re-cloned the repo btw)

Image

@hypherionmc I already changed it to `Project SDK` and I still get errors (re-cloned the repo btw) ![Image](https://github.com/user-attachments/assets/66dbc09f-b66b-47c7-9cbd-420a69bdf325)
hypherionmc commented 2024-10-17 22:46:53 +02:00 (Migrated from github.com)

Try running ./gradlew --stop in a terminal. After that is complete, reload the project in intellij.

If that still doesn't work, do ./gradlew --refresh-dependencies. Reload the project again after that

Try running `./gradlew --stop` in a terminal. After that is complete, reload the project in intellij. If that still doesn't work, do `./gradlew --refresh-dependencies`. Reload the project again after that
papaj-na-wrotkach commented 2024-10-18 11:53:24 +02:00 (Migrated from github.com)

Unfortunately, none of these solutions worked. I even restarted the machine, re-cloned the repo (yet again) and the errors are still present.

IntelliJ IDEA suggests (Alt-Enter) adding neoforge library to the classpath 🤔. From what I understand, the Common module should use the Fabric-provided net.minecraft namespace, right?

I am closing this issue. The main problem caused by the food and tooltip changes has been fixed. The other one seems to be unique to my machine. It does not occur on my other machine.

Unfortunately, none of these solutions worked. I even restarted the machine, re-cloned the repo (yet again) and the errors are still present. IntelliJ IDEA suggests (Alt-Enter) adding `neoforge` library to the classpath 🤔. From what I understand, the `Common` module should use the Fabric-provided `net.minecraft` namespace, right? I am closing this issue. The main problem caused by the food and tooltip changes has been fixed. The other one seems to be unique to my machine. It does not occur on my other machine.
hypherionmc commented 2024-10-18 11:55:36 +02:00 (Migrated from github.com)

IntelliJ IDEA suggests (Alt-Enter) adding neoforge library to the classpath 🤔. From what I understand, the Common module should use the Fabric-provided net.minecraft namespace, right?

Hmmm yeah that one is odd. Common should only provide the "vanilla" minecraft classes. One final solution you can try on the machine with the issue is to nuke the entire .gradle folder in your home directory. That would clear out the entire gradle cache, but also means that any other gradle projects you have would need to redownload all their dependencies and files again

> IntelliJ IDEA suggests (Alt-Enter) adding neoforge library to the classpath 🤔. From what I understand, the Common module should use the Fabric-provided net.minecraft namespace, right? Hmmm yeah that one is odd. Common should only provide the "vanilla" minecraft classes. One final solution you can try on the machine with the issue is to nuke the entire `.gradle` folder in your home directory. That would clear out the entire gradle cache, but also means that any other gradle projects you have would need to redownload all their dependencies and files again
papaj-na-wrotkach commented 2024-10-18 12:12:06 +02:00 (Migrated from github.com)

I have already tried to build the project after removing the `~/.gradle' directory...

Common should only provide the "vanilla" minecraft classes.

But the "vanilla" classes must be provided from somewhere like Fabric or (Neo)Forge. In our case, it's Fabric that provides them, right?
Common/build.gradle

unimined.minecraft {
    fabric {
        loader fabric_loader
    }
    [...]
}

I might have a wrong understanding as I am a beginner when it comes to Minecraft mod development.

I have already tried to build the project after removing the `~/.gradle' directory... > Common should only provide the "vanilla" minecraft classes. But the "vanilla" classes must be provided from somewhere like Fabric or (Neo)Forge. In our case, it's Fabric that provides them, right? `Common/build.gradle` ```gradle unimined.minecraft { fabric { loader fabric_loader } [...] } ``` I might have a wrong understanding as I am a beginner when it comes to Minecraft mod development.
hypherionmc commented 2024-10-18 12:13:10 +02:00 (Migrated from github.com)

That is correct. Although we use fabric in the common project, it is only to provide the vanilla classes, and nothing else

That is correct. Although we use fabric in the common project, it is only to provide the vanilla classes, and nothing else
papaj-na-wrotkach commented 2024-10-18 12:16:03 +02:00 (Migrated from github.com)

Understood. Thank you for your assistance and time, have a nice day!

Understood. Thank you for your assistance and time, have a nice day!
Sign in to join this conversation.
No description provided.