Posted April 6, 20187 yr So, me again. When running the client in Intellij everything works as expected. however when i build my jar, add it to my mods folder start up my game and load in any world everything works fine untill i press any key then it just crashes Spoiler Crashlog: ---- Minecraft Crash Report ---- // I blame Dinnerbone. Time: 4/6/18 1:22 PM Description: Unexpected error java.lang.NoSuchMethodError: net.minecraft.client.settings.KeyBinding.isPressed()Z at com.darkeyedragon.screenshotuploader.client.Events.KeyPressEvent.onKeyInput(KeyPressEvent.java:27) at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_12_KeyPressEvent_onKeyInput_KeyInputEvent.invoke(.dynamic) at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:179) at net.minecraftforge.fml.common.FMLCommonHandler.fireKeyInput(FMLCommonHandler.java:564) at net.minecraft.client.Minecraft.func_184118_az(Minecraft.java:2015) at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1806) at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1096) at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:397) at net.minecraft.client.main.Main.main(SourceFile:123) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Client thread Stacktrace: at com.darkeyedragon.screenshotuploader.client.Events.KeyPressEvent.onKeyInput(KeyPressEvent.java:27) at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_12_KeyPressEvent_onKeyInput_KeyInputEvent.invoke(.dynamic) at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:179) at net.minecraftforge.fml.common.FMLCommonHandler.fireKeyInput(FMLCommonHandler.java:564) at net.minecraft.client.Minecraft.func_184118_az(Minecraft.java:2015) -- Affected level -- Details: Level name: MpServer All players: 1 total; [EntityPlayerSP['DarkEyeDragon'/383, l='MpServer', x=117.49, y=98.63, z=276.43]] Chunk stats: MultiplayerChunkCache: 590, 590 Level seed: 0 Level generator: ID 00 - default, ver 1. Features enabled: false Level generator options: Level spawn location: World: (84,64,248), Chunk: (at 4,4,8 in 5,15; contains blocks 80,0,240 to 95,255,255), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511) Level time: 5292 game time, 5292 day time Level dimension: 0 Level storage version: 0x00000 - Unknown? Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false) Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false Forced entities: 71 total; [EntityPig['Pig'/264, l='MpServer', x=120.68, y=81.00, z=207.53], EntityPig['Pig'/265, l='MpServer', x=117.68, y=77.00, z=226.55], EntityPig['Pig'/266, l='MpServer', x=113.60, y=85.00, z=266.23], EntityZombie['Zombie'/267, l='MpServer', x=120.88, y=63.00, z=304.49], EntityCreeper['Creeper'/268, l='MpServer', x=121.64, y=64.00, z=302.65], EntityEnderman['Enderman'/269, l='MpServer', x=114.50, y=61.00, z=312.50], EntityBat['Bat'/270, l='MpServer', x=117.93, y=60.92, z=307.82], EntityBat['Bat'/271, l='MpServer', x=116.69, y=60.77, z=307.18], EntityPlayerSP['DarkEyeDragon'/383, l='MpServer', x=117.49, y=98.63, z=276.43], EntityCreeper['Creeper'/282, l='MpServer', x=142.18, y=31.00, z=223.47], EntitySkeleton['Skeleton'/283, l='MpServer', x=147.29, y=75.00, z=323.51], EntityCreeper['Creeper'/296, l='MpServer', x=157.45, y=22.00, z=220.54], EntityCreeper['Creeper'/297, l='MpServer', x=159.50, y=37.00, z=254.50], EntityCreeper['Creeper'/298, l='MpServer', x=148.50, y=35.00, z=246.50], EntitySkeleton['Skeleton'/299, l='MpServer', x=157.62, y=36.00, z=252.53], EntityBat['Bat'/300, l='MpServer', x=153.18, y=35.61, z=255.65], EntityZombie['Zombie'/301, l='MpServer', x=150.47, y=27.00, z=262.30], EntitySquid['Squid'/302, l='MpServer', x=159.87, y=59.02, z=287.78], EntityBat['Bat'/182, l='MpServer', x=39.67, y=30.96, z=230.75], EntityZombie['Zombie'/184, l='MpServer', x=39.92, y=59.00, z=270.41], EntitySkeleton['Skeleton'/185, l='MpServer', x=48.71, y=45.00, z=278.43], EntitySkeleton['Skeleton'/313, l='MpServer', x=169.03, y=40.00, z=230.27], EntitySkeleton['Skeleton'/186, l='MpServer', x=45.98, y=44.00, z=288.43], EntitySkeleton['Skeleton'/314, l='MpServer', x=169.49, y=40.00, z=235.00], EntityCreeper['Creeper'/187, l='MpServer', x=38.23, y=38.00, z=335.47], EntitySkeleton['Skeleton'/315, l='MpServer', x=168.30, y=40.00, z=230.86], EntitySkeleton['Skeleton'/316, l='MpServer', x=162.56, y=38.00, z=247.42], EntitySkeleton['Skeleton'/317, l='MpServer', x=160.27, y=37.00, z=253.52], EntityCreeper['Creeper'/318, l='MpServer', x=165.30, y=38.00, z=246.47], EntitySkeleton['Skeleton'/191, l='MpServer', x=41.59, y=34.00, z=352.30], EntityBat['Bat'/319, l='MpServer', x=164.70, y=38.58, z=250.36], EntitySquid['Squid'/320, l='MpServer', x=166.75, y=55.38, z=267.68], EntitySquid['Squid'/321, l='MpServer', x=170.78, y=61.89, z=301.00], EntityZombie['Zombie'/322, l='MpServer', x=164.51, y=20.00, z=304.80], EntityZombie['Zombie'/323, l='MpServer', x=174.50, y=19.00, z=324.50], EntityCreeper['Creeper'/324, l='MpServer', x=170.50, y=18.00, z=331.50], EntityZombie['Zombie'/325, l='MpServer', x=177.77, y=40.00, z=218.48], EntityZombie['Zombie'/326, l='MpServer', x=183.46, y=41.00, z=213.56], EntityZombie['Zombie'/327, l='MpServer', x=179.46, y=40.00, z=223.60], EntityCreeper['Creeper'/328, l='MpServer', x=178.45, y=41.00, z=216.99], EntityZombie['Zombie'/329, l='MpServer', x=179.20, y=40.00, z=224.55], EntitySquid['Squid'/331, l='MpServer', x=178.07, y=62.69, z=234.57], EntitySkeleton['Skeleton'/205, l='MpServer', x=60.50, y=40.00, z=227.50], EntitySquid['Squid'/333, l='MpServer', x=181.56, y=58.28, z=257.27], EntityBat['Bat'/206, l='MpServer', x=59.32, y=40.09, z=229.61], EntityBat['Bat'/207, l='MpServer', x=57.07, y=62.81, z=227.08], EntitySpider['Spider'/335, l='MpServer', x=178.08, y=21.00, z=343.30], EntityBat['Bat'/208, l='MpServer', x=52.25, y=61.97, z=223.46], EntityCreeper['Creeper'/209, l='MpServer', x=54.45, y=30.00, z=243.05], EntityBat['Bat'/210, l='MpServer', x=62.25, y=35.10, z=244.43], EntityBat['Bat'/211, l='MpServer', x=62.25, y=36.10, z=247.36], EntityCreeper['Creeper'/212, l='MpServer', x=62.56, y=34.00, z=246.41], EntitySkeleton['Skeleton'/213, l='MpServer', x=47.88, y=45.00, z=278.30], EntityPig['Pig'/214, l='MpServer', x=58.61, y=66.25, z=283.45], EntitySkeleton['Skeleton'/344, l='MpServer', x=192.43, y=37.00, z=211.29], EntityCreeper['Creeper'/348, l='MpServer', x=193.10, y=42.00, z=208.52], EntityZombie['Zombie'/229, l='MpServer', x=69.51, y=49.00, z=197.20], EntityCreeper['Creeper'/230, l='MpServer', x=77.50, y=41.00, z=233.81], EntityZombie['Zombie'/231, l='MpServer', x=74.77, y=41.00, z=240.58], EntityBat['Bat'/232, l='MpServer', x=69.43, y=42.89, z=250.11], EntityPig['Pig'/233, l='MpServer', x=65.46, y=63.00, z=266.28], EntityPig['Pig'/234, l='MpServer', x=72.82, y=74.00, z=278.33], EntityPig['Pig'/235, l='MpServer', x=64.80, y=75.00, z=295.60], EntityBat['Bat'/237, l='MpServer', x=85.19, y=35.00, z=309.31], EntityBat['Bat'/238, l='MpServer', x=82.87, y=32.13, z=321.62], EntityPig['Pig'/244, l='MpServer', x=109.45, y=78.00, z=233.59], EntityPig['Pig'/245, l='MpServer', x=100.55, y=81.00, z=270.58], EntityPig['Pig'/246, l='MpServer', x=101.49, y=88.00, z=276.25], EntityPig['Pig'/247, l='MpServer', x=104.25, y=87.00, z=273.51], EntityCreeper['Creeper'/248, l='MpServer', x=109.48, y=27.00, z=315.54], EntitySkeleton['Skeleton'/249, l='MpServer', x=105.88, y=27.00, z=316.69]] Retry entities: 0 total; [] Server brand: fml,forge Server type: Integrated singleplayer server Stacktrace: at net.minecraft.client.multiplayer.WorldClient.func_72914_a(WorldClient.java:420) at net.minecraft.client.Minecraft.func_71396_d(Minecraft.java:2748) at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:426) at net.minecraft.client.main.Main.main(SourceFile:123) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) -- System Details -- Details: Minecraft Version: 1.12.2 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_25, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 350751328 bytes (334 MB) / 872415232 bytes (832 MB) up to 1073741824 bytes (1024 MB) JVM Flags: 8 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx1G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=16M IntCache: cache: 4, tcache: 1, allocated: 12, tallocated: 94 FML: MCP 9.42 Powered by Forge 14.23.2.2611 6 mods loaded, 6 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored | State | ID | Version | Source | Signature | |:--------- |:------------------ |:------------ |:------------------------------------ |:---------------------------------------- | | UCHIJAAAA | minecraft | 1.12.2 | minecraft.jar | None | | UCHIJAAAA | mcp | 9.42 | minecraft.jar | None | | UCHIJAAAA | FML | 8.0.99.99 | forge-1.12.2-14.23.2.2611.jar | e3c3d50c7c986df74c645c0ac54639741c90a557 | | UCHIJAAAA | forge | 14.23.2.2611 | forge-1.12.2-14.23.2.2611.jar | e3c3d50c7c986df74c645c0ac54639741c90a557 | | UCHIJAAAA | mercurius_updater | 1.0 | MercuriusUpdater-1.12.2.jar | None | | UCHIJAAAA | screenshotuploader | 1.1.0 | ScreenshotUploader-Release-1.1.0.jar | None | Loaded coremods (and transformers): GL info: ' Vendor: 'ATI Technologies Inc.' Version: '4.5.13507 Compatibility Profile Context 23.20.15033.5003' Renderer: 'Radeon (TM) RX 470 Graphics' Launched Version: 1.12.2-forge1.12.2-14.23.2.2611 LWJGL: 2.9.4 OpenGL: Radeon (TM) RX 470 Graphics GL version 4.5.13507 Compatibility Profile Context 23.20.15033.5003, ATI Technologies Inc. GL Caps: Using GL 1.3 multitexturing. Using GL 1.3 texture combiners. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Shaders are available because OpenGL 2.1 is supported. VBOs are available because OpenGL 1.5 is supported. Using VBOs: Yes Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: Current Language: English (US) Profiler Position: N/A (disabled) CPU: 8x Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz I am think i'm missing an dependancy? my build.graddle looks like this: buildscript { repositories { jcenter() maven { url = "http://files.minecraftforge.net/maven" } } dependencies { classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT' classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.3' } } apply plugin: 'net.minecraftforge.gradle.forge' //Only edit below this line, the above code adds and enables the necessary things for Forge to be setup. apply plugin: 'com.github.johnrengelman.shadow' apply plugin: 'java' version = "1.1.0" group = "com.darkeyedragon.screenshotuploader" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "ScreenshotUploader" sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly. compileJava { sourceCompatibility = targetCompatibility = '1.8' } minecraft { version = "1.12.2-14.23.2.2611" runDir = "run" // the mappings can be changed at any time, and must be in the following format. // snapshot_YYYYMMDD snapshot are built nightly. // stable_# stables are built at the discretion of the MCP team. // Use non-default mappings at your own risk. they may not always work. // simply re-run your setup task after changing the mappings to update your workspace. mappings = "snapshot_20171003" // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable. } dependencies { compile group: 'org.apache.httpcomponents', name: 'fluent-hc', version: '4.5.5' compile group: 'org.apache.httpcomponents', name: 'httpmime', version: '4.3.1' } processResources { // this will ensure that this task is redone when the versions change. inputs.property "version", project.version inputs.property "mcversion", project.minecraft.version // replace stuff in mcmod.info, nothing else from(sourceSets.main.resources.srcDirs) { include 'mcmod.info' // replace version and mcversion expand 'version':project.version, 'mcversion':project.minecraft.version } // copy everything else except the mcmod.info from(sourceSets.main.resources.srcDirs) { exclude 'mcmod.info' } } shadowJar { baseName = 'ScreenshotUploader-Release' classifier = null version = '1.1.0' } Note: i'm using a custom graddle version (the latest from their website) as shadowjar doesnt work with versions under 3.0 package com.darkeyedragon.screenshotuploader.client.Events; import com.darkeyedragon.screenshotuploader.client.KeyBindings; import com.darkeyedragon.screenshotuploader.client.ModConfig; import com.darkeyedragon.screenshotuploader.client.gui.CustomGui; import com.darkeyedragon.screenshotuploader.client.imageuploaders.CustomUploader; import com.darkeyedragon.screenshotuploader.client.imageuploaders.ImgurUploader; import net.minecraft.client.Minecraft; import net.minecraft.util.ScreenShotHelper; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.InputEvent; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import java.awt.image.BufferedImage; import java.util.Timer; public class KeyPressEvent{ private ImgurUploader imgurUploader = new ImgurUploader(); private CustomUploader customUploader = new CustomUploader(); @SubscribeEvent @SideOnly(Side.CLIENT) public void onKeyInput(InputEvent.KeyInputEvent event){ if(KeyBindings.screenshotUploadKey.isPressed()){ //this is line 27 BufferedImage screenshot = ScreenShotHelper.createScreenshot(Minecraft.getMinecraft().displayWidth,Minecraft.getMinecraft().displayHeight, Minecraft.getMinecraft().getFramebuffer()); if(ModConfig.CustomServer){ if(!ModConfig.ServerSettings.server.isEmpty()) if(ModConfig.ServerSettings.postData.length > 0) customUploader.uploadImage(screenshot, ModConfig.ServerSettings.server); else customUploader.uploadImage(screenshot, ModConfig.ServerSettings.server); else System.out.println("Invalid URL"); }else{ imgurUploader.uploadImage(screenshot); } } } }
April 6, 20187 yr Author configurations { shade compile.extendsFrom shade } buildscript { repositories { jcenter() maven { url = "http://files.minecraftforge.net/maven" } maven { name = 'Tethys (drakon.io)' url = "http://tethys.drakon.io/maven" } } dependencies { classpath 'io.drakon:pulsar:1.2.1' classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT' } } apply plugin: 'net.minecraftforge.gradle.forge' //Only edit below this line, the above code adds and enables the necessary things for Forge to be setup. version = "1.1.0" group = "com.darkeyedragon.screenshotuploader" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "ScreenshotUploader" sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly. compileJava { sourceCompatibility = targetCompatibility = '1.8' } minecraft { srgExtra = "PK: io/drakon/pulsar com/darkeyedragon/screenshotuploader/client/pulsar" version = "1.12.2-14.23.2.2611" runDir = "run" // the mappings can be changed at any time, and must be in the following format. // snapshot_YYYYMMDD snapshot are built nightly. // stable_# stables are built at the discretion of the MCP team. // Use non-default mappings at your own risk. they may not always work. // simply re-run your setup task after changing the mappings to update your workspace. mappings = "snapshot_20171003" // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable. } dependencies { shade 'io.drakon:pulsar:1.2.1' compile group: 'org.apache.httpcomponents', name: 'fluent-hc', version: '4.5.5' compile group: 'org.apache.httpcomponents', name: 'httpmime', version: '4.3.1' } processResources { // this will ensure that this task is redone when the versions change. inputs.property "version", project.version inputs.property "mcversion", project.minecraft.version // replace stuff in mcmod.info, nothing else from(sourceSets.main.resources.srcDirs) { include 'mcmod.info' // replace version and mcversion expand 'version':project.version, 'mcversion':project.minecraft.version } // copy everything else except the mcmod.info from(sourceSets.main.resources.srcDirs) { exclude 'mcmod.info' } } jar { configurations.shade.each { dep -> from(project.zipTree(dep)){ exclude 'META-INF', 'META-INF/**' } } } Okay so that works, however i'm not sure what the "srgExtra" is for, it gives me this error: Could not set unknown property 'srgExtra' for object of type net.minecraftforge.gradle.user.patcherUser.forge.ForgeExtension. Also, do i need to shade my other dependencies now too? Edited April 6, 20187 yr by DarkEyeDragon
April 6, 20187 yr Author 14 minutes ago, diesieben07 said: Seems this is more up to date: https://forgegradle.readthedocs.io/en/latest/user-guide/shading/ do i still need to include Pulsar then? i tried just shading in my dependancies but that didnt seem to work dependencies { shade group: 'org.apache.httpcomponents', name: 'fluent-hc', version: '4.5.5' shade group: 'org.apache.httpcomponents', name: 'httpmime', version: '4.3.1' } intellij gives me this: 'add' in 'org.gradle.api.artifacts.dsl.DependencyHandler' cannot be applied to '(['group':java.lang.String, 'name':java.lang.String,...])' This inspection reports assignments with incompatible types
April 6, 20187 yr Author 3 minutes ago, diesieben07 said: Nobody ever said anything about Pulsar... IntelliJ's warnings for Gradle are not flawless, since Gradle is based on Groovy, a dynamically-typed language, therefor IntelliJ has to guess often. well either way.it seems to work now. Thanks
April 6, 20187 yr Author Okay scratch that. Regular uploading works (using the imgur API) my custom uploading (wich uses libraries) doesn't do anything. i get the message an upload is started. however nothing happens. (i checked my mod and all the required libs were there). Nothing from the process is logged either. And even if the upload server was unreachable it should still give me a message that uploading has failed. Any idea why this is happening? Edit: it works all fine when ran in intellij Edited April 6, 20187 yr by DarkEyeDragon
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.