Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Frontear

Members
  • Posts

    54
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Frontear

  1. The documentation isn't clear about how to implement them. It's only telling me the format, the maven support, and some other stuff about modifying the Manifest INF. How exactly am I supposed to accept this? Am I supposed to modify files outside of the build.gradle?
  2. I have done that, correct? Inside the build.gradle, in the `dependencies` area, I've added compile group: 'org.reflections', name: 'reflections', version: '0.9.11' It works in the dev env, but doesn't compile alongside the Java Jar.
  3. I've already modified the build.gradle to compile org.reflections, which can be found here. The problem is while the dev environment can build it, it will not work after using `gradle build`. I've tried running `gradle buildDependents` as well, and nothing will solve the issue. How can I correctly compile an external library into my mod? Edit: What I mean to say is that the official Minecraft Client will not run the mod, throwing a NoClassDefFound, meaning org.reflections isn't compiling with my mod. How can I make it so?
  4. Just checked for such an event. It does not exist. Probably should've mentioned im using 1.10 Forge, but I dont see any ClientChatEvent at all. What would be an alternative plan?
  5. "You can cancel it and then it won't be sent". I assume you mean the text message the player sends won't be added to chat, correct? If so, great.
  6. Example: If I type `Ping`, I want the mod to respond with `Pong`. I've already figured I can use `ClientChatRecievedEvent` to be able to see when the user sends a message, but this doesn't exactly return favourable results. `event.message` doesn't have the option to simply return just the text, effectively, instead of returning "Ping", it'll return either "<PlayerName> Ping" or "<> Ping". I want only "Ping", and another problem arises. Servers often format text messages to display a users rank. That will change the expected format of `event.message.getFormatted (or unformatted whatever)` text and would require a different method of handling. Additionally, I don't want the users message to make it to the server. Basically, it needs to be a client side message with a client side response. tl;dr is there any way I can get a message typed by the player in chat, make sure it doesn't get published to server or public chat, and issue a client sided response?
  7. What about in other cases? Sure, I can ping a server for an updated mod file now, but what about in cases where'd I'd like to perform some final changes. Maybe perhaps a fancy closing animation.
  8. No no, not on a crash. Check when the user is manually exiting the game, through 'exit game'
  9. Mod called Journey Map is causing the error. Try removing it and see if the server works. If it does, take it to the developer of Journeymap
  10. Is there any sort of Event for Forge when it is exiting? I'd like to perform some options on exit, such as check for an updated mod version by comparing to a website and such.
  11. The code is executing perfectly. It's definitely the event
  12. Alright, so I've tried doing some janky stuff, and here are my results. First, I completely made a new class, and had the event binded to `EVENT_BUS.post()` a MouseEvent. This worked, as the reximian9k mod fired. Now here are the issues: The Event will stop posting if any other keys are pressed and the Event itself won't always fire. Edit: It'll stop firing if you change your mouse coordinates, so move it across the screen
  13. Yes, the imports are both pointing to the exact same class.
  14. I've tried that, and it still doesn't seem to update the cps counter on reximian9k's mod. I'm certain he uses MouseEvent as well, as it's part of his code. import net.minecraftforge.client.event.MouseEvent; //... @SubscribeEvent public void onClick(MouseEvent e) { dx = e.dx; dy = e.dy; mX = e.x; mX = e.y; if(e.buttonstate && e.button == Minecraft.getMinecraft().gameSettings.keyBindAttack.getKeyCode() + 100) { this.addClick(); Mainframe.onClick(); } lastEvent = System.currentTimeMillis(); }
  15. Effectively, `MinecraftForge.EVENT_BUS.post(new MouseEvent());`?
  16. I've created a mod that automatically clicks/uses the item in hand, for people like me who suffer from RSI. The problem here is that I want it to fire a MouseEvent (the forge one) every time it clicks. The reason for this is that another mod, coded by reximian9k, called KeyMod, relies on MouseEvent to update it's cps counter, and I'd like my mod to work correctly with it. Is there a way to manually trigger the MouseEvent, so that any SubscribedMethods will automatically run their code correctly when I use this mod of mine?
  17. So, say I've got a `Keybinding testBind = new Keybinding("TestKeybind", Keyboard.KEY_F, "")`, and I'd like to change the key that it responds to. The problem is, even if I use `testBind.setKeyCode(Keyboard.KEY_P)` or something, it won't stop responding to 'F'. How can I change it?
  18. Thank you for your response, however the hunger bar continues to be artifacted with Post. I'll try Pre and reupdate this comment. If I use Pre, everything will once again be artifacted, as you said, since it uses a different texture. Post will also artifact the hunger bar still. Edit: I've solved the issue by checking `event.getType()`. Thank you!
  19. I have isolated the issue in the following line of code: Minecraft.getMinecraft().fontRenderer.drawStringWithShadow(etc) I'm extremely confused as to why it's artifacting the xp bar, health bar, food bar and armour bar. Here's a portion of my code: // the main code public void postInit(FMLPostInitializationEvent event) { MinecraftForge.EVENT_BUS.register(new MyMod()); } // MyMod class public uiCreator; public MyMod() { uiCreator = new UICreator(); } @SubscribeEvent public void onGui(RenderGameOverlayEvent event) { uiCreator.Create(); } // UICreator class public void Create() { Minecraft.getMinecraft().fontRenderer.drawStringWithShadow("MyMod", 2, 2, 0xffffff); } Effectively, the line which is causing the artifacting is `Minecraft.getMinecraft().fontRenderer.drawStringWithShadow("MyMod", 2, 2, 0xffffff);`. I don't understand why. I'm certain it's this line, as removing/commenting out any other portions of code do not fix the artifacting until I comment this line out. I'm extremely confused as to why this is occuring. If anyone has any form of insight, I'd greatly appreciate it Image of the Artifacting bar
  20. To preface, this is my code: // the main class: @EventHandler public void postInit(FMLPostInitialization event) { MinecraftForge.EVENT_BUS.register(new SomeClass()); } // the 'SomeClass': @SubscribeEvent public void onGui(RenderGameOverlayEvent event) { someUI.Draw("Hello There"); for (int i = 0; i < arrayList.size(); i++) { arrayList.get(i).guiRender(i); } } // the someUI.Draw(): public void Draw(String text) { Minecraft.fontRendererObj.drawString(text, 2, 2, 0xffffff); } // the arrayList: public ArrayList<thisClass> arrayList = new ArrayList<thisClass>(); //... arrayList.add(thisClass); // and other classes which extend thisClass // thisClass: public class thisClass { public void guiRender(int offset) { Minecraft.getMinecraft().fontRendererObj.drawString("Test", 2, 12 + (offset * 10), 0xffffff); } } The problem here is while someUI.Draw() will correctly create the text in the top right (2, 2), arrayList.get(i).guiRender(i) will not create anything. I've tried many things, from directly calling it (`new thisClass().guiRender(1)`) to merging it with someUI.Draw(). Nothing solves this problem. I'm extremely confused why it isn't creating anything, considering it should be properly creating text. I'd appreciate any help possible.
  21. So, I've tried to make an autoclicker in Minecraft. It's worked, for the most part. Here is the code: private void MouseClick() { if (minecraft.gameSettings.keyBindAttack.isKeyDown()) { // if 'mouse 1' is being pressed down minecraft.thePlayer.swingItem(); // just the visual part switch (minecraft.objectMouseOver.typeOfHit) { case ENTITY: // attack the entity internally minecraft.playerController.attackEntity(minecraft.thePlayer, minecraft.objectMouseOver.entityHit); break; case BLOCK: // don't spam attack the block, break it instead minecraft.playerController.clickBlock(minecraft.objectMouseOver.getBlockPos(), minecraft.objectMouseOver.sideHit); break; } } } My problem stems from compatibility with other mods, specifically Reximian9k's KeyMod. I want my mod to be able to update the counter, but it's not going to. Why? Simple: // Reximian9k's KeyMod code @SubscribeEvent public void onClick(MouseEvent e) { if(e.buttonstate && e.button == Minecraft.getMinecraft().gameSettings.keyBindAttack.getKeyCode() + 100) { this.addClick(); Mainframe.onClick(); } } The problem is that his code will check if the mouse button is pressed, not if an attack is being called. Due to the way my mod implements the autoclicker, where it allows the user to hold down the key and spam attack/breaking, reximian's code will check for the mouse being pressed. KeyMod won't be able to update with the current AutoClicker code. My question is, would it somehow be possible for me to implement a internal click mechanism which will still trigger MouseEvent, allowing for KeyMod to properly update when my autoclicker is in effect?
  22. I've tried to import the forge project in IntelliJ. I've followed the README accurately (running Manjaro), and it has not generated a proper configuration. Normally I would just make one, but I'm not even sure which class is the main starting class, so I can't generate any configuration. If anyone can point me in a direction, I'd really appreciate it. Edit: Trying to rebuild it again, at the part where I use `./gradlew genIntelliJRuns`, this exception is thrown: This mapping 'stable_20' was designed for MC 1.8.8! Use at your own peril. ################################################# ForgeGradle 2.1-SNAPSHOT-eed8c6b https://github.com/MinecraftForge/ForgeGradle ################################################# Powered by MCP unknown http://modcoderpack.com by: Searge, ProfMobius, Fesh0r, R4wk, ZeuX, IngisKahn, bspkrs ################################################# :genIntellijRunsjava.lang.NullPointerException at net.minecraftforge.gradle.common.Constants.addXml(Constants.java:290) at net.minecraftforge.gradle.user.UserBasePlugin.injectIntellijRuns(UserBasePlugin.java:1272) at net.minecraftforge.gradle.user.UserBasePlugin$16.execute(UserBasePlugin.java:1180) at net.minecraftforge.gradle.user.UserBasePlugin$16.execute(UserBasePlugin.java:1143) at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:585) at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:568) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46) at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35) at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64) at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58) at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52) at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52) at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53) at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185) at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:62) at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:25) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:110) at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37) at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37) at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23) at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43) at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32) at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37) at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30) at org.gradle.initialization.DefaultGradleLauncher$4.run(DefaultGradleLauncher.java:155) at org.gradle.internal.Factories$1.create(Factories.java:22) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:52) at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:152) at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:33) at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:100) at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:94) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:62) at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:94) at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:83) at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:94) at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28) at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:43) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:28) at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:77) at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:47) at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:51) at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:28) at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:43) at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:170) at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237) at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210) at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35) at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24) at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206) at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169) at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33) at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22) at org.gradle.launcher.Main.doAction(Main.java:33) at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45) 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:498) at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54) at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35) at org.gradle.launcher.GradleMain.main(GradleMain.java:23) 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:498) at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30) at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:127) at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61) Edit 2: I've fixed the issue. Rather than using the shell terminal, I used IntelliJ directly and it fixed my issue completely. For future reference, import the `build.gradle` into IntelliJ, press the "Gradle" sidebar located on the right-side, find the 'setupDecompWorkspace' (or whatever type of workspace you want), run it, then run the 'genIntelliJRuns' and it'll work. If you get an error at the Workspace part, press the wrench icon inside the gradle panel, and in 'Gradle VM Options', type in '-Xmx4G' where 4G represents 4 GB of RAM. You can reduce that if you don't have that much, but it won't need more than that.
  23. Thank you for your assistance thus far. You have been extremely helpful!
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.