Started by
Kostya_Swiftkey
on
Topic category: Help with Minecraft modding (Java Edition)
I want to create (register) a custom armor trim item, but I get an error:
Executing Gradle task: runClient
Build info: MCreator 2024.3.42716, neoforge-1.21.1, 64-bit, 16332 MB, Windows 10, JVM 21.0.4, JAVA_HOME: C:\Program Files\Pylo\MCreator\jdk, started on: 2024-10-22-14:33:41
Reusing configuration cache.
> Task :createArtifactManifest UP-TO-DATE
> Task :downloadAssets UP-TO-DATE
> Task :createMinecraftArtifacts UP-TO-DATE
> Task :writeClientLegacyClasspath UP-TO-DATE
> Task :prepareClientRun UP-TO-DATE
> Task :processResources UP-TO-DATE
> Task :compileJava FAILED
C:\Users\d1\MCreatorWorkspaces\ddfabfm\src\main\java\net\mcreator\ddfabfm\init\DdfabfmModItems.java:237: error: no suitable method found for register(String,SmithingTemplateItem)
public static final DeferredItem<Item> CHECKERED_ARMOR_TRIM_SMITHING_TEMPLATE = REGISTRY.register("checkered_armor_trim_smithing_template", SmithingTemplateItem.createArmorTrimTemplate(TrimPatterns.CHECKERED));
^
method Items.<I#1>register(String,Function<ResourceLocation,? extends I#1>) is not applicable
(cannot infer type-variable(s) I#1
(argument mismatch; SmithingTemplateItem cannot be converted to Function<ResourceLocation,? extends I#1>))
method Items.<I#2>register(String,Supplier<? extends I#2>) is not applicable
(cannot infer type-variable(s) I#2
(argument mismatch; SmithingTemplateItem cannot be converted to Supplier<? extends I#2>))
where I#1,I#2 are type-variables:
I#1 extends Item declared in method <I#1>register(String,Function<ResourceLocation,? extends I#1>)
I#2 extends Item declared in method <I#2>register(String,Supplier<? extends I#2>)
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
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 1s
7 actionable tasks: 1 executed, 6 up-to-date
Configuration cache entry reused.
BUILD FAILED
Task completed in 2 seconds
Can you help me create a custom armor trim item
This sounds like a bug with the plugin that adds you trims. I would advise getting in touch with plugin author