Topic category: Troubleshooting, bugs, and solutions
I am creating a new mob called "Shadow skeleton", but it don't compile or something. Mod worked perfectly before adding it. It's a common problem but i cannot find any topic with this in console:
Executing Gradle task: build
Build info: MCreator 2021.3.53117, forge-1.16.5, 64-bit, 3989 MB, Windows 10, JVM 16.0.2, JAVA_HOME: C:\Program Files\Pylo\MCreator\jdk
> Task :compileJava
C:\Users\Jan\MCreatorWorkspaces\Atfar\src\main\java\net\mcreator\atfar\entity\ShadowSkeletonEntity.java:224: error: no suitable constructor found for ItemStack(no arguments) return new ItemStack();
^
constructor net.minecraft.item.ItemStack.ItemStack(net.minecraft.util.IItemProvider) is not applicable
(actual and formal argument lists differ in length)
constructor net.minecraft.item.ItemStack.ItemStack(net.minecraft.util.IItemProvider,int,java.util.Optional<net.minecraft.nbt.CompoundNBT>) is not applicable
(actual and formal argument lists differ in length)
constructor net.minecraft.item.ItemStack.ItemStack(net.minecraft.util.IItemProvider,int) is not applicable
(actual and formal argument lists differ in length)
constructor net.minecraft.item.ItemStack.ItemStack(net.minecraft.util.IItemProvider,int,net.minecraft.nbt.CompoundNBT) is not applicable
(actual and formal argument lists differ in length)
constructor net.minecraft.item.ItemStack.ItemStack(net.minecraft.nbt.CompoundNBT) is not applicable
(actual and formal argument lists differ in length)
C:\Users\Jan\MCreatorWorkspaces\Atfar\src\main\java\net\mcreator\atfar\entity\ShadowSkeletonEntity.java:229: error: no suitable constructor found for ItemStack(no arguments) return new ItemStack();
^
constructor net.minecraft.item.ItemStack.ItemStack(net.minecraft.util.IItemProvider) is not applicable
(actual and formal argument lists differ in length)
constructor net.minecraft.item.ItemStack.ItemStack(net.minecraft.util.IItemProvider,int,java.util.Optional<net.minecraft.nbt.CompoundNBT>) is not applicable
(actual and formal argument lists differ in length)
constructor net.minecraft.item.ItemStack.ItemStack(net.minecraft.util.IItemProvider,int) is not applicable
(actual and formal argument lists differ in length)
constructor net.minecraft.item.ItemStack.ItemStack(net.minecraft.util.IItemProvider,int,net.minecraft.nbt.CompoundNBT) is not applicable
(actual and formal argument lists differ in length)
constructor net.minecraft.item.ItemStack.ItemStack(net.minecraft.nbt.CompoundNBT) is not applicable
(actual and formal argument lists differ in length)
2 errors
> Task :compileJava FAILED
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 9s
1 actionable task: 1 executed
BUILD FAILED
Task completed in 4 minutes and 31 seconds
Try deleting the Mob. And then adding him again, with almost the same A.I. tasks , triggers, spawning conditions, ect..
I had the same issue, and it mostly helped. :)