ERROR: Cannot find symbol Registry

Started by _Null7235768 on

Topic category: Troubleshooting, bugs, and solutions

Last seen on 23:59, 17. Apr 2024
Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
ERROR: Cannot find symbol Registry

I could not find a solution to this in the forums or in the knowledge base. I have a mod that I started working on recently. I am using the Fabric Creator 1.19.2 plugin. When I try to run it, it says:

One or more of your main mod files did not compile properly.
This is usually caused by inconsistencies in the mod code during builds.
MCreator may be able to solve this for you by regenerating entire mod's code.
If you have locked mod elements or mod base files, they can cause this error too.
Click Regenerate code button to proceed with this action.

 

Regenerating code does not fix it. There are no locked files.


I have tried everything I can think of and have seen online and nothing solves it. Here is the console error message:

 

Executing Gradle task: build 
Build info: MCreator 2024.1.15713, fabric-1.19.2, 64-bit, 16173 MB, Windows 11, JVM 17.0.10, JAVA_HOME: C:\Program Files\Pylo\MCreator\jdk, started on: 2024-04-08-16:45:17 
 
 
BUILD FAILED 
Task completed in 3 minutes and 35 seconds 
 
> Configure project : 
Fabric Loom: 1.0.18 
Not publishing sources jar as it was not found. Use java.withSourcesJar() to fix. 
> Task :compileJava FAILED 
C:\Users\jaked\MCreatorWorkspaces\exit_sign\src\main\java\net\mcreator\exitsign\init\ExitSignModBlocks.java:16: error: cannot find symbol 
        WHITE_EXIT_SIGN = Registry.register(Registry.BLOCK, new ResourceLocation(ExitSignMod.MODID, "white_exit_sign"), new WhiteExitSignBlock()); 
                                            ^ 
  symbol:   variable Registry 
  location: class ExitSignModBlocks 
C:\Users\jaked\MCreatorWorkspaces\exit_sign\src\main\java\net\mcreator\exitsign\init\ExitSignModBlocks.java:16: error: cannot find symbol 
        WHITE_EXIT_SIGN = Registry.register(Registry.BLOCK, new ResourceLocation(ExitSignMod.MODID, "white_exit_sign"), new WhiteExitSignBlock()); 
                                                                                 ^ 
  symbol:   variable ExitSignMod 
  location: class ExitSignModBlocks 
C:\Users\jaked\MCreatorWorkspaces\exit_sign\src\main\java\net\mcreator\exitsign\init\ExitSignModBlocks.java:16: error: cannot find symbol 
        WHITE_EXIT_SIGN = Registry.register(Registry.BLOCK, new ResourceLocation(ExitSignMod.MODID, "white_exit_sign"), new WhiteExitSignBlock()); 
                          ^ 
  symbol:   variable Registry 
  location: class ExitSignModBlocks 
3 errors 
FAILURE: Build failed with an exception. 
* What went wrong: 
Execution failed for task ':compileJava'. 
> Compilation failed; see the compiler error output for details. 
* 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 
BUILD FAILED in 1s 
1 actionable task: 1 executed 
 
BUILD FAILED 
Task completed in 3 seconds 
 

 

Here is the java file from the error:

/*
 *	MCreator note: This file will be REGENERATED on each build.
 */
package net.mcreator.exitsign.init;

import net.minecraft.world.level.block.Block;
import net.minecraft.resources.ResourceLocation;

import net.mcreator.exitsign.block.WhiteExitSignBlock;

public class ExitSignModBlocks {
	public static Block WHITE_EXIT_SIGN;

	public static void load() {
		WHITE_EXIT_SIGN = Registry.register(Registry.BLOCK, new ResourceLocation(ExitSignMod.MODID, "white_exit_sign"), new WhiteExitSignBlock());
	}

	public static void clientLoad() {
		WhiteExitSignBlock.clientInit();
	}
}

 

I would recommend getting in…
Tue, 04/09/2024 - 16:57

I would recommend getting in touch with the plugin author to make sure this is not the plugin bug