Mod elements don't compile properly

Started by liam4710 on

Topic category: Help with MCreator software

Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Mod elements don't compile properly

Hi there. I started using mcreator last night on a whim with 0 modding experience, and so far my experience has been fairly good. All I wanted to do was make a money mod for a server my friend is trying to start, and I was able to make the money items with no problem. My issues started when I tried to make a storage block for the money. I followed every tutorial I could find, I've scoured the forums, and I haven't been able to find anything to help me. Whenever I save the mod element of my vault storage block, I get this message: Your workspace contains mod elements that don't compile properly. This was most likely caused by the last mod element you added or edited. Try altering the settings of mod elements that cause build errors (such elements are listed below) to try and fix the problem. 

In the console, I'm getting this message:

> Configure project : 
Fabric Loom: 0.7.34 
> Task :compileJava FAILED 
F:\More Program Files\MCreator\Workspaces\Cash_Grabber_Fabric\src\main\java\net\mcreator\cashgrabber\block\VaultBlock.java:47: error: a type with the same simple name is already defined by the single-type-import of FabricBlockSettings 
import net.fabricmc.fabric.api.block.FabricBlockSettings; 

F:\More Program Files\MCreator\Workspaces\Cash_Grabber_Fabric\src\main\java\net\mcreator\cashgrabber\block\VaultBlock.java:57: error: cannot find symbol 
      super(FabricBlockSettings.of(Material.ANVIL).sounds(BlockSoundGroup.ANVIL).strength(6f, 10f).luminance(0)); 
                                           ^ 
  symbol:   variable ANVIL 
  location: class Material 
F:\More Program Files\MCreator\Workspaces\Cash_Grabber_Fabric\src\main\java\net\mcreator\cashgrabber\block\VaultBlock.java:57: error: reference to FabricBlockSettings is ambiguous 
      super(FabricBlockSettings.of(Material.ANVIL).sounds(BlockSoundGroup.ANVIL).strength(6f, 10f).luminance(0)); 
            ^ 
  both class net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings in net.fabricmc.fabric.api.object.builder.v1.block and class net.fabricmc.fabric.api.block.FabricBlockSettings in net.fabricmc.fabric.api.block match 
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 1 minute and 18 seconds

 

I'm at a loss for what to do. I've followed every tutorial I can find to the T, and still get this error. I've regenerated the code, cleared the gradle cache, spent hours staring at the block settings, and I really have no idea. Any advice or help would be greatly appreciated.