Jump to content

Mod runs in Eclipse, but crashes when loading built jar mod. (1.16.5)


RedBobKid

Recommended Posts

My mod works and is able to fully load when in Eclipse, the runClient task works without issue, but when I build the mod and run the jar file on the same Forge version as my MDK (36.2.34) it crashes with the error "java.lang.ClassFormatError: Duplicate method name "func_200929_c" with signature "()F" in class file sword/red/main/init/ModItemTier$ModItemTiers"

 

This is the crash report and file stated from the mod.


package sword.red.main.init;

import java.util.function.Supplier;
import net.minecraft.item.IItemTier;
import net.minecraft.item.crafting.Ingredient;
import net.minecraft.util.IItemProvider;
import net.minecraft.util.LazyValue;

public class ModItemTier {

    public static enum ModItemTiers implements IItemTier
    {
        PHOCKTONIUM(4, 4500, 12.0f, 8.0f, 100, () -> Ingredient.of((IItemProvider[])new IItemProvider[]{ModItemRegistry.PHOCKTONIUM_INGOT.get()}));
        
        private final int harvestLevel;
        private final int maxUses;
        private final int enchantability;
        private final float attackDamage;
        private final float efficiency;
        private final LazyValue<Ingredient> repairMaterial;

        private ModItemTiers(int harvestLevel, int maxUses, float efficency, float attackDamage, int enchantability, Supplier<Ingredient> repairMaterial) {
            this.harvestLevel = harvestLevel;
            this.maxUses = maxUses;
            this.efficiency = efficency;
            this.attackDamage = attackDamage;
            this.enchantability = enchantability;
            this.repairMaterial = new LazyValue<Ingredient>(repairMaterial);
        }

        public float func_200929_c() {
            return this.attackDamage;
        }

        public float func_200928_b() {
            return this.efficiency;
        }

        public int func_200927_e() {
            return this.enchantability;
        }

        public int func_200925_d() {
            return this.harvestLevel;
        }

        public int func_200926_a() {
            return this.maxUses;
        }

        public Ingredient func_200924_f() {
            return (Ingredient)this.repairMaterial.get();
        }

		@Override
		public float getAttackDamageBonus() {
			// TODO Auto-generated method stub
			return 0;
		}

		@Override
		public int getEnchantmentValue() {
			// TODO Auto-generated method stub
			return 0;
		}

		@Override
		public int getLevel() {
			// TODO Auto-generated method stub
			return 0;
		}

		@Override
		public Ingredient getRepairIngredient() {
			// TODO Auto-generated method stub
			return null;
		}

		@Override
		public float getSpeed() {
			// TODO Auto-generated method stub
			return 0;
		}

		@Override
		public int getUses() {
			// TODO Auto-generated method stub
			return 0;
		}
    }

}
---- Minecraft Crash Report ----
// You should try our sister game, Minceraft!

Time: 4/26/22 6:43 PM
Description: Mod loading error has occurred

java.lang.Exception: Mod Loading has failed
	at net.minecraftforge.fml.CrashReportExtender.dumpModLoadingCrashReport(CrashReportExtender.java:85) ~[forge:?] {re:classloading}
	at net.minecraftforge.fml.client.ClientModLoader.completeModLoading(ClientModLoader.java:188) ~[forge:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.lambda$null$1(Minecraft.java:508) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.util.Util.func_215077_a(Util.java:320) ~[?:?] {re:classloading}
	at net.minecraft.client.Minecraft.lambda$new$2(Minecraft.java:504) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.gui.ResourceLoadProgressGui.func_230430_a_(ResourceLoadProgressGui.java:113) ~[?:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.renderer.GameRenderer.func_195458_a(GameRenderer.java:481) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.func_195542_b(Minecraft.java:977) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:607) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.main.Main.main(Main.java:184) ~[client-1.16.5.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_281] {}
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_281] {}
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_281] {}
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_281] {}
	at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:51) ~[forge-1.16.5-36.2.34.jar:36.2] {}
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.1.3.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.1.3.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.1.3.jar:?] {}
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.1.3.jar:?] {}
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.1.3.jar:?] {}


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Render thread
Stacktrace:
	at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_281] {}
-- MOD phocktoniumtoolsmod --
Details:
	Mod File: output.jar
	Failure message: Phocktonium Tools (phocktoniumtoolsmod) encountered an error during the load_registries event phase
		java.lang.ClassFormatError: Duplicate method name "func_200929_c" with signature "()F" in class file sword/red/main/init/ModItemTier$ModItemTiers
	Mod Version: 2.2
	Mod Issue URL: http://my.issue.tracker/
	Exception message: java.lang.ClassFormatError: Duplicate method name "func_200929_c" with signature "()F" in class file sword/red/main/init/ModItemTier$ModItemTiers
Stacktrace:
	at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_281] {}
	at java.lang.ClassLoader.defineClass(ClassLoader.java:756) ~[?:1.8.0_281] {}
	at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:138) ~[modlauncher-8.1.3.jar:?] {re:classloading}
	at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:98) ~[modlauncher-8.1.3.jar:?] {re:classloading}
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[?:1.8.0_281] {}
	at sword.red.main.ModEventSubscriber.onRegisterItems(ModEventSubscriber.java:34) ~[phocktoniumtoolsmod:2.2] {re:classloading}
	at net.minecraftforge.eventbus.ASMEventHandler_7_ModEventSubscriber_onRegisterItems_Register.invoke(.dynamic) ~[?:?] {}
	at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85) ~[eventbus-4.0.0.jar:?] {}
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302) ~[eventbus-4.0.0.jar:?] {}
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283) ~[eventbus-4.0.0.jar:?] {}
	at net.minecraftforge.fml.javafmlmod.FMLModContainer.acceptEvent(FMLModContainer.java:120) ~[forge:36.2] {re:classloading}
	at net.minecraftforge.fml.ModContainer.lambda$buildTransitionHandler$4(ModContainer.java:121) ~[forge:?] {re:classloading}
	at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1640) ~[?:1.8.0_281] {}
	at net.minecraftforge.fml.ModWorkManager$SyncExecutor.driveOne(ModWorkManager.java:56) ~[forge:?] {re:classloading}
	at net.minecraftforge.fml.ModWorkManager$DrivenExecutor.drive(ModWorkManager.java:40) ~[forge:?] {re:classloading}
	at net.minecraftforge.fml.ModLoader.waitForTransition(ModLoader.java:249) ~[forge:?] {re:classloading}
	at net.minecraftforge.fml.ModLoader.dispatchAndHandleError(ModLoader.java:236) ~[forge:?] {re:classloading}
	at net.minecraftforge.fml.ModLoader.gatherAndInitializeMods(ModLoader.java:202) ~[forge:?] {re:classloading}
	at net.minecraftforge.fml.client.ClientModLoader.lambda$begin$1(ClientModLoader.java:103) ~[forge:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$4(ClientModLoader.java:123) ~[forge:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraftforge.fml.client.ClientModLoader.begin(ClientModLoader.java:103) ~[forge:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.<init>(Minecraft.java:437) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.main.Main.main(Main.java:149) ~[client-1.16.5.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_281] {}
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_281] {}
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_281] {}
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_281] {}
	at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:51) ~[forge-1.16.5-36.2.34.jar:36.2] {}
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.1.3.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.1.3.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.1.3.jar:?] {}
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.1.3.jar:?] {}
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.1.3.jar:?] {}


-- System Details --
Details:
	Minecraft Version: 1.16.5
	Minecraft Version ID: 1.16.5
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 1.8.0_281, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 1283733216 bytes (1224 MB) / 2235039744 bytes (2131 MB) up to 5249695744 bytes (5006 MB)
	CPUs: 4
	JVM Flags: 7 total; -XX:-OmitStackTraceInFastThrow -Xms512M -Xmx5632M -XX:MetaspaceSize=352M -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xss1M -XX:+IgnoreUnrecognizedVMOptions
	ModLauncher: 8.1.3+8.1.3+main-8.1.x.c94d18ec
	ModLauncher launch target: fmlclient
	ModLauncher naming: srg
	ModLauncher services: 
		/mixin-0.8.4.jar mixin PLUGINSERVICE 
		/eventbus-4.0.0.jar eventbus PLUGINSERVICE 
		/forge-1.16.5-36.2.34.jar object_holder_definalize PLUGINSERVICE 
		/forge-1.16.5-36.2.34.jar runtime_enum_extender PLUGINSERVICE 
		/accesstransformers-3.0.1.jar accesstransformer PLUGINSERVICE 
		/forge-1.16.5-36.2.34.jar capability_inject_definalize PLUGINSERVICE 
		/forge-1.16.5-36.2.34.jar runtimedistcleaner PLUGINSERVICE 
		/mixin-0.8.4.jar mixin TRANSFORMATIONSERVICE 
		/forge-1.16.5-36.2.34.jar fml TRANSFORMATIONSERVICE 
	FML: 36.2
	Forge: net.minecraftforge:36.2.34
	FML Language Providers: 
		[email protected]
		minecraft@1
	Mod List: 
		forge-1.16.5-36.2.34-client.jar                   |Minecraft                     |minecraft                     |1.16.5              |COMMON_SET|Manifest: NOSIGNATURE
		output.jar                                        |Phocktonium Tools             |phocktoniumtoolsmod           |2.2                 |VALIDATE  |Manifest: NOSIGNATURE
		forge-1.16.5-36.2.34-universal.jar                |Forge                         |forge                         |36.2.34             |COMMON_SET|Manifest: 22:af:21:d8:19:82:7f:93:94:fe:2b:ac:b7:e4:41:57:68:39:87:b1:a7:5c:c6:44:f9:25:74:21:14:f5:0d:90
	Crash Report UUID: 6d8b3ea4-ac40-4eb7-9735-02f80058dc20

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.