Jump to content

RedBobKid

Members
  • Posts

    2
  • Joined

  • Last visited

RedBobKid's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. 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: javafml@36.2 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
  2. My custom block has its hitbox facing the opposite direction from where it is placed, while the model itself faces towards the player, the hitbox faces away from the player. package sword.red.main.init; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.HorizontalBlock; import net.minecraft.item.BlockItemUseContext; import net.minecraft.state.StateContainer; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.shapes.IBooleanFunction; import net.minecraft.util.math.shapes.ISelectionContext; import net.minecraft.util.math.shapes.VoxelShape; import net.minecraft.util.math.shapes.VoxelShapes; import net.minecraft.world.IBlockReader; import javax.annotation.Nullable; import java.util.stream.Stream; public class ModSimpBlock extends HorizontalBlock { public ModSimpBlock(Properties builder) { super(builder); } private static final VoxelShape SHAPE_S = Stream.of( Block.box(5, 17, 6, 11, 18, 11), Block.box(7, 16, 7, 9, 17, 9), Block.box(5, 8, 7, 11, 16, 10), Block.box(5, 9, 6, 11, 12, 7), Block.box(2, 8, 7, 4, 16, 10), Block.box(4, 14, 8, 5, 15, 9), Block.box(11, 14, 8, 12, 15, 9), Block.box(12, 8, 7, 14, 16, 10), Block.box(5, 0, 7, 7, 8, 9), Block.box(9, 0, 7, 11, 8, 9), Block.box(9, 0, 9, 11, 1, 11), Block.box(5, 0, 9, 7, 1, 11), Block.box(5, 9, 10, 11, 15, 11), Block.box(5, 10, 11, 11, 15, 12), Block.box(5, 19, 6, 11, 24, 12), Block.box(5, 18, 6, 11, 19, 12), Block.box(5, 24, 9, 8, 25, 10), Block.box(8, 24, 12, 11, 25, 13), Block.box(5, 24, 11, 8, 25, 12), Block.box(8, 24, 10, 11, 25, 11), Block.box(8, 24, 8, 11, 25, 9), Block.box(5, 24, 7, 8, 25, 8), Block.box(8, 24, 6, 11, 25, 7), Block.box(5, 24, 5, 8, 25, 6), Block.box(9, 21, 12, 10, 22, 13), Block.box(6, 22, 12, 7, 23, 13), Block.box(7, 19, 12, 9, 20, 13) ).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); private static final VoxelShape SHAPE_E = Stream.of( Block.box(5, 17, 6, 10, 18, 12), Block.box(6, 16, 8, 8, 17, 10), Block.box(6, 8, 6, 9, 16, 12), Block.box(5, 9, 6, 6, 12, 12), Block.box(6, 8, 13, 9, 16, 15), Block.box(7, 14, 12, 8, 15, 13), Block.box(7, 14, 5, 8, 15, 6), Block.box(6, 8, 3, 9, 16, 5), Block.box(6, 0, 10, 8, 8, 12), Block.box(6, 0, 6, 8, 8, 8), Block.box(8, 0, 6, 10, 1, 8), Block.box(8, 0, 10, 10, 1, 12), Block.box(9, 9, 6, 10, 15, 12), Block.box(10, 10, 6, 11, 15, 12), Block.box(5, 19, 6, 11, 24, 12), Block.box(5, 18, 6, 11, 19, 12), Block.box(8, 24, 9, 9, 25, 12), Block.box(11, 24, 6, 12, 25, 9), Block.box(10, 24, 9, 11, 25, 12), Block.box(9, 24, 6, 10, 25, 9), Block.box(7, 24, 6, 8, 25, 9), Block.box(6, 24, 9, 7, 25, 12), Block.box(5, 24, 6, 6, 25, 9), Block.box(4, 24, 9, 5, 25, 12), Block.box(11, 21, 7, 12, 22, 8), Block.box(11, 22, 10, 12, 23, 11), Block.box(11, 19, 8, 12, 20, 10) ).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); private static final VoxelShape SHAPE_N = Stream.of( Block.box(5, 17, 7, 11, 18, 12), Block.box(7, 16, 9, 9, 17, 11), Block.box(5, 8, 8, 11, 16, 11), Block.box(5, 9, 11, 11, 12, 12), Block.box(12, 8, 8, 14, 16, 11), Block.box(11, 14, 9, 12, 15, 10), Block.box(4, 14, 9, 5, 15, 10), Block.box(2, 8, 8, 4, 16, 11), Block.box(9, 0, 9, 11, 8, 11), Block.box(5, 0, 9, 7, 8, 11), Block.box(5, 0, 7, 7, 1, 9), Block.box(9, 0, 7, 11, 1, 9), Block.box(5, 9, 7, 11, 15, 8), Block.box(5, 10, 6, 11, 15, 7), Block.box(5, 19, 6, 11, 24, 12), Block.box(5, 18, 6, 11, 19, 12), Block.box(8, 24, 8, 11, 25, 9), Block.box(5, 24, 5, 8, 25, 6), Block.box(8, 24, 6, 11, 25, 7), Block.box(5, 24, 7, 8, 25, 8), Block.box(5, 24, 9, 8, 25, 10), Block.box(8, 24, 10, 11, 25, 11), Block.box(5, 24, 11, 8, 25, 12), Block.box(8, 24, 12, 11, 25, 13), Block.box(6, 21, 5, 7, 22, 6), Block.box(9, 22, 5, 10, 23, 6), Block.box(7, 19, 5, 9, 20, 6) ).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); private static final VoxelShape SHAPE_W = Stream.of( Block.box(6, 17, 6, 11, 18, 12), Block.box(8, 16, 8, 10, 17, 10), Block.box(7, 8, 6, 10, 16, 12), Block.box(10, 9, 6, 11, 12, 12), Block.box(7, 8, 3, 10, 16, 5), Block.box(8, 14, 5, 9, 15, 6), Block.box(8, 14, 12, 9, 15, 13), Block.box(7, 8, 13, 10, 16, 15), Block.box(8, 0, 6, 10, 8, 8), Block.box(8, 0, 10, 10, 8, 12), Block.box(6, 0, 10, 8, 1, 12), Block.box(6, 0, 6, 8, 1, 8), Block.box(6, 9, 6, 7, 15, 12), Block.box(5, 10, 6, 6, 15, 12), Block.box(5, 19, 6, 11, 24, 12), Block.box(5, 18, 6, 11, 19, 12), Block.box(7, 24, 6, 8, 25, 9), Block.box(4, 24, 9, 5, 25, 12), Block.box(5, 24, 6, 6, 25, 9), Block.box(6, 24, 9, 7, 25, 12), Block.box(8, 24, 9, 9, 25, 12), Block.box(9, 24, 6, 10, 25, 9), Block.box(10, 24, 9, 11, 25, 12), Block.box(11, 24, 6, 12, 25, 9), Block.box(4, 21, 10, 5, 22, 11), Block.box(4, 22, 7, 5, 23, 8), Block.box(4, 19, 8, 5, 20, 10) ).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); @Override public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { switch (state.getValue(FACING)) { case NORTH: return SHAPE_N; case SOUTH: return SHAPE_S; case WEST: return SHAPE_W; case EAST: return SHAPE_E; default: return SHAPE_N; } } @Override protected void createBlockStateDefinition(StateContainer.Builder<Block, BlockState> builder) { builder.add(FACING); } @Nullable @Override public BlockState getStateForPlacement(BlockItemUseContext context) { return this.defaultBlockState().setValue(FACING, context.getHorizontalDirection()); } }
×
×
  • Create New...

Important Information

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