Creating an effect in fabric generator causes build error

Started by superdiamondsky665 on

Topic category: Help with modding (Java Edition)

Last seen on 05:32, 17. May 2024
Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Creating an effect in fabric generator causes build error

I tried creating an effect that deals 1 custom damage at random intervals.

When I saved it, it caused a build error. Regenerating the code doesn't work.

The problem doesn't seem to come from the procedure nor the damage. Deleting the potion effect itself stopped the build error, meaning the problem has to come from there.

Here's what the console read:

Executing Gradle task: build
Build info: MCreator 2023.4.52316, fabric-1.20.1, 64-bit, 7996 MB, Windows 10, JVM 17.0.9, JAVA_HOME: C:\Program Files\Pylo\MCreator\jdk, started on: 2024-05-02-14:41:01

> Configure project :
Fabric Loom: 1.4.6
> Task :compileJava FAILED
C:\Users\NotSoupBowl\MCreatorWorkspaces\adminium_blocks\src\main\java\net\mcreator\adminiumblocks\init\AdminiumBlocksModMobEffects.java:20: error: incompatible types: Item cannot be converted to MobEffect  RED_ILLNESS = register("red_illness", new RedIllnessMobEffect());
   ^
C:\Users\NotSoupBowl\MCreatorWorkspaces\adminium_blocks\src\main\java\net\mcreator\adminiumblocks\init\AdminiumBlocksModMobEffects.java:24: error: incompatible types: inference variable T has incompatible bounds  return Registry.register(BuiltInRegistries.MOB_EFFECT, new ResourceLocation(AdminiumBlocksMod.MODID, registryName), element);
    ^
lower bounds: Item,MobEffect,Object,V
lower bounds: MobEffect
where T,V are type-variables:
T extends V declared in method <V,T>register(Registry<V>,ResourceLocation,T)
V extends Object declared in method <V,T>register(Registry<V>,ResourceLocation,T)
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 --info option to get more log output.
> Run with --scan to get full insights.
BUILD FAILED in 3s
1 actionable task: 1 executed

BUILD FAILED
Task completed in 6 seconds