Code Compiling Error: cannot find symbol

Started by lexuigi on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Code Compiling Error: cannot find symbol

Upon generating my code, I am getting an error that says it cannot find a symbol. Below is the error:

> Task :compileJava FAILED
C:\Users\user\.mcreator\workspaces\nether_bomb\src\main\java\net\mcreator\netherbomb\world\features\NetherBombFeatureFeature.java:14: error: cannot find symbol public boolean place(FeaturePlaceContext<StructureFeatureConfiguration> context) {
^
symbol: class StructureFeatureConfiguration
location: class NetherBombFeatureFeature
C:\Users\user\.mcreator\workspaces\nether_bomb\src\main\java\net\mcreator\netherbomb\world\features\NetherBombFeatureFeature.java:11: error: cannot find symbol super(StructureFeatureConfiguration.CODEC);
^
symbol: variable StructureFeatureConfiguration
location: class NetherBombFeatureFeature
2 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 2s

 

Below is the code it references to. This is automatically generated, so I am confused as to why it is not importing the code it needs. Any help is appreciated.

package net.mcreator.netherbomb.world.features;


import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
import net.minecraft.world.level.WorldGenLevel;

import net.mcreator.netherbomb.procedures.NetherBombStructureAdditionalGenerationConditionProcedure;

public class NetherBombFeatureFeature extends StructureFeature {
public NetherBombFeatureFeature() {
super(StructureFeatureConfiguration.CODEC);
}

public boolean place(FeaturePlaceContext<StructureFeatureConfiguration> context) {
WorldGenLevel world = context.level();
int x = context.origin().getX();
int y = context.origin().getY();
int z = context.origin().getZ();
if (!NetherBombStructureAdditionalGenerationConditionProcedure.execute(world, x, y, z))
return false;
return super.place(context);
}
}
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
My apologies, I should have…
Sun, 01/07/2024 - 18:46

My apologies, I should have made those into a pastebin.
I am on MCreator version 2023.4, and Minecraft Forge for 1.20.1 (47.2.0)