cabaletta / cabaletta/baritone

`IndexOutOfBoundsException` in `ElytraBehavior`

Open
#4,723 3 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
9.2k
Forks
2.1k
Avg merge
4d 3h
Merged PRs (30d)
3

Description

## Some information
Operating system: Linux
Java version: 21
Minecraft version: 1.21.1 + Neoforge 21.1.162
Baritone version: aff430ac5, unoptimized neoforge build
Other mods (if used): None

## Exception, error or logs
log excerpt

[02:06:35] [Render thread/INFO] [minecraft/ChatComponent]: [CHAT] [Baritone] > thisway 1000

[02:06:35] [Render thread/INFO] [minecraft/ChatComponent]: [CHAT] [Baritone] Goal: GoalXZ{x=-474,z=-897}
[02:06:36] [Render thread/INFO] [minecraft/ChatComponent]: [CHAT] [Baritone] > elytra
Saving region 0,-1 to disk /home/user/Downloads/PrismLauncher-Linux-Qt6-Portable-9.4/instances/1.21.1/minecraft/saves/New World/./baritone/minecraft/the_nether_128/cache
Saving region 0,0 to disk /home/user/Downloads/PrismLauncher-Linux-Qt6-Portable-9.4/instances/1.21.1/minecraft/saves/New World/./baritone/minecraft/the_nether_128/cache
Saving region -1,0 to disk /home/user/Downloads/PrismLauncher-Linux-Qt6-Portable-9.4/instances/1.21.1/minecraft/saves/New World/./baritone/minecraft/the_nether_128/cache
Saving region -1,-1 to disk /home/user/Downloads/PrismLauncher-Linux-Qt6-Portable-9.4/instances/1.21.1/minecraft/saves/New World/./baritone/minecraft/the_nether_128/cache
Saved region successfully
Saved region successfully
Saved region successfully
Saved region successfully
World save took 274ms
[02:07:17] [Render thread/INFO] [minecraft/AdvancementTree]: Loaded 35 advancements
java.lang.IndexOutOfBoundsException: Index -9 out of bounds for length 26
at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:100)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:106)
at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:302)
at java.base/java.util.Objects.checkIndex(Objects.java:385)
at java.base/java.util.ArrayList.get(ArrayList.java:427)
at TRANSFORMER/baritoe@1.10.2-12-gaff430ac5/baritone.process.elytra.NetherPath.get(NetherPath.java:42)
at TRANSFORMER/baritoe@1.10.2-12-gaff430ac5/baritone.process.elytra.ElytraBehavior$PathManager.lambda$pathNextSegment$5(ElytraBehavior.java:236)
at java.base/java.util.concurrent.CompletableFuture$UniRun.tryFire(CompletableFuture.java:787)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
at java.base/java.util.concurrent.CompletableFuture.postFire(CompletableFuture.java:614)
at java.base/java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:726)
at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482)
at TRANSFORMER/minecraft@1.21.1/net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:148)
at TRANSFORMER/minecraft@1.21.1/net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:23)
at TRANSFORMER/minecraft@1.21.1/net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:122)
at TRANSFORMER/minecraft@1.21.1/net.minecraft.util.thread.BlockableEventLoop.runAllTasks(BlockableEventLoop.java:111)
at TRANSFORMER/minecraft@1.21.1/net.minecraft.client.Minecraft.runTick(Minecraft.java:1155)
at TRANSFORMER/minecraft@1.21.1/net.minecraft.client.Minecraft.run(Minecraft.java:807)
at TRANSFORMER/minecraft@1.21.1/net.minecraft.client.main.Main.main(Main.java:230)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at MC-BOOTSTRAP/fml_loader@4.0.38/net.neoforged.fml.loading.targets.CommonLaunchHandler.runTarget(CommonLaunchHandler.java:136)
at MC-BOOTSTRAP/fml_loader@4.0.38/net.neoforged.fml.loading.targets.CommonLaunchHandler.clientService(CommonLaunchHandler.java:124)
at MC-BOOTSTRAP/fml_loader@4.0.38/net.neoforged.fml.loading.targets.CommonClientLaunchHandler.runService(CommonClientLaunchHandler.java:32)
at MC-BOOTSTRAP/fml_loader@4.0.38/net.neoforged.fml.loading.targets.CommonLaunchHandler.lambda$launchService$4(CommonLaunchHandler.java:118)
at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30)
at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53)
at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71)
at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.Launcher.run(Launcher.java:103)
at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.Launcher.main(Launcher.java:74)
at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26)
at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23)
at cpw.mods.bootstraplauncher@2.0.2/cpw.mods.bootstraplauncher.BootstrapLauncher.run(BootstrapLauncher.java:210)
at cpw.mods.bootstraplauncher@2.0.2/cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:69)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at io.github.zekerzhayard.forgewrapper.installer.Main.main(Main.java:67)
at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:105)
at org.prismlauncher.EntryPoint.listen(EntryPoint.java:129)
at org.prismlauncher.EntryPoint.main(EntryPoint.java:70)
[02:07:17] [Render thread/INFO] [minecraft/ChatComponent]: [CHAT] [Baritone] An unhandled exception occurred. The error is in your game's log, please report this at https://github.com/cabaletta/baritone/issues
[02:07:19] [Server thread/INFO] [minecraft/MinecraftServer]: Player has completed the challenge [Hot Tourist Destinations]
[02:07:19] [Render thread/INFO] [minecraft/AdvancementTree]: Loaded 35 advancements
[02:07:22] [Render thread/INFO] [minecraft/ChatComponent]: [CHAT] [Baritone] Path complete, picking a nearby safe landing spot...
[02:07:28] [Render thread/INFO] [minecraft/ChatComponent]: [CHAT] [Baritone] Above the landing spot, landing...
[02:07:32] [Render thread/INFO] [minecraft/ChatComponent]: [CHAT] [Baritone] Landed, but still moving, waiting for velocity to die down...
[02:07:32] [Render thread/INFO] [minecraft/ChatComponent]: [CHAT] [Baritone] Landed, but still moving, waiting for velocity to die down...
[02:07:32] [Render thread/INFO] [minecraft/ChatComponent]: [CHAT] [Baritone] Landed, but still moving, waiting for velocity to die down...
[02:07:32] [Render thread/INFO] [minecraft/ChatComponent]: [CHAT] [Baritone] Landed, but still moving, waiting for velocity to die down...
[02:07:33] [Render thread/INFO] [minecraft/ChatComponent]: [CHAT] [Baritone] Landed, but still moving, waiting for velocity to die down...
[02:07:33] [Render thread/INFO] [minecraft/ChatComponent]: [CHAT] [Baritone] Landed, but still moving, waiting for velocity to die down...
[02:07:33] [Render thread/INFO] [minecraft/ChatComponent]: [CHAT] [Baritone] Done :)

## How to reproduce

When I was testing with the standalone build I got an exception during a 1k block long elytra flight so I switched to unoptimized and had it happen again, which is where the log above comes from. It does however not seem to be reliable since after I added printouts to the methods in question the exception was not thrown again.

## Modified settings
```
elytraTermsAccepted true
```

## Final checklist
- [x] I know how to properly use check boxes
- [x] I have included the version of Minecraft I'm running, baritone's version and forge mods (if used).
- [x] I have included logs, exceptions and / or steps to reproduce the issue.
- [x] I have not changed the amount of OwO's or UwU's in this issue.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.