Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClassCastException while executing #gc #2

Closed
5 tasks done
ZacSharp opened this issue Sep 19, 2022 · 2 comments
Closed
5 tasks done

ClassCastException while executing #gc #2

ZacSharp opened this issue Sep 19, 2022 · 2 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@ZacSharp
Copy link
Owner

Some information

Operating system: Linux 5.15.0-47-generic
Java version: 1.8.0_342
Minecraft version: 1.12.2 Minecraft 1.12.2
Baritone version: 1.2.15
Other mods (if used):

Exception, error or logs

stacktrace
baritone.api.command.exception.CommandUnhandledException: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String
	at baritone.command.manager.CommandManager$ExecutionWrapper.execute(CommandManager.java:143)
	at baritone.command.manager.CommandManager$ExecutionWrapper.access$000(CommandManager.java:127)
	at baritone.command.manager.CommandManager.execute(CommandManager.java:83)
	at baritone.command.ExampleBaritoneControl.runCommand(ExampleBaritoneControl.java:146)
	at baritone.command.ExampleBaritoneControl.onSendChatMessage(ExampleBaritoneControl.java:74)
	at baritone.event.GameEventHandler.lambda$onSendChatMessage$2(GameEventHandler.java:69)
	at java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:895)
	at baritone.event.GameEventHandler.onSendChatMessage(GameEventHandler.java:69)
	at net.minecraft.client.entity.EntityPlayerSP.handler$sendChatMessage$zze000(EntityPlayerSP.java:1416)
	at net.minecraft.client.entity.EntityPlayerSP.sendChatMessage(EntityPlayerSP.java)
	at net.minecraft.client.gui.GuiScreen.sendChatMessage(GuiScreen.java:456)
	at net.minecraft.client.gui.GuiScreen.sendChatMessage(GuiScreen.java:446)
	at net.minecraft.client.gui.GuiChat.keyTyped(GuiChat.java:126)
	at net.minecraft.client.gui.GuiScreen.handleKeyboardInput(GuiScreen.java:607)
	at net.minecraft.client.gui.GuiScreen.handleInput(GuiScreen.java:556)
	at net.minecraft.client.Minecraft.runTick(Minecraft.java:1852)
	at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1165)
	at net.minecraft.client.Minecraft.run(Minecraft.java:439)
	at net.minecraft.client.main.Main.main(Main.java:115)
	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 net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
	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 net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
	at GradleStart.main(GradleStart.java:25)
Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String
	at baritone.command.defaults.GcCommand.execute(GcCommand.java:38)
	at baritone.command.manager.CommandManager$ExecutionWrapper.execute(CommandManager.java:140)
	... 30 more


Exception UID: 956213166

How to reproduce

  1. Add
    ((String)(Object)5).hashCode();
    to GcCommand.java
  2. Build
  3. Install
  4. Start the game
  5. Join a world or server
  6. Run gc

Why? To mark something as a duplicate you need a duplicate.

Modified settings

Final checklist

  • I know how to properly use check boxes
  • I have included the version of Minecraft I'm running, baritone's version and forge mods (if used).
  • I have included logs, exceptions and / or steps to reproduce the issue.
  • I have not messed with any OwO's or UwU's in this issue.
  • I have filled in any useful information the autegenerated issue was missing
@ZacSharp ZacSharp added the bug Something isn't working label Sep 19, 2022
@ZacSharp
Copy link
Owner Author

Duplicate of #1

@ZacSharp ZacSharp added the duplicate This issue or pull request already exists label Sep 19, 2022
@ZacSharp ZacSharp marked this as a duplicate of #1 Sep 19, 2022
@ZacSharp ZacSharp marked this as not a duplicate of #1 Sep 27, 2022
@ZacSharp
Copy link
Owner Author

Duplicate of #1

@ZacSharp ZacSharp marked this as a duplicate of #1 Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

1 participant