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

ArrayIndexOutOfBoundsException: 0. In Location.getWorldByEncodedAltitude #43

Open
xuetaolu opened this issue Jun 8, 2019 · 0 comments

Comments

@xuetaolu
Copy link

xuetaolu commented Jun 8, 2019

While using mc.entity.spawnEntity("falling_block", ... ) frequently, like spawn 5 to 10 times per game tick, that is 40 to 200 times per second. It may occur java.lang.ArrayIndexOutOfBoundsException: 0.

[11:08:36] [Thread-24/INFO] [STDOUT]: [mobi.omegacentauri.raspberryjammod.APIHandler:spawnEntity:923]: Helo
[11:08:36] [Thread-24/INFO] [STDOUT]: [mobi.omegacentauri.raspberryjammod.APIHandler:spawnEntity:925]: ren
[11:08:36] [Thread-24/INFO] [STDOUT]: [mobi.omegacentauri.raspberryjammod.APIHandler:rename111:909]: Searching for FallingSand
[11:08:36] [Thread-24/INFO] [STDOUT]: [mobi.omegacentauri.raspberryjammod.APIHandler:rename111:913]: found minecraft:falling_block
[11:08:36] [Thread-24/INFO] [STDOUT]: [mobi.omegacentauri.raspberryjammod.APIHandler:process:515]: java.lang.ArrayIndexOutOfBoundsException: 0
[11:08:36] [Thread-24/INFO] [STDERR]: [mobi.omegacentauri.raspberryjammod.APIHandler:process:516]: java.lang.ArrayIndexOutOfBoundsException: 0
[11:08:36] [Thread-24/INFO] [STDERR]: [mobi.omegacentauri.raspberryjammod.APIHandler:process:516]: at mobi.omegacentauri.raspberryjammod.Location.getWorldByEncodedAltitude(Location.java:26)
[11:08:36] [Thread-24/INFO] [STDERR]: [mobi.omegacentauri.raspberryjammod.APIHandler:process:516]: at mobi.omegacentauri.raspberryjammod.Location.decodeVec3w(Location.java:72)
[11:08:36] [Thread-24/INFO] [STDERR]: [mobi.omegacentauri.raspberryjammod.APIHandler:process:516]: at mobi.omegacentauri.raspberryjammod.APIHandler.spawnEntity(APIHandler.java:932)
[11:08:36] [Thread-24/INFO] [STDERR]: [mobi.omegacentauri.raspberryjammod.APIHandler:process:516]: at mobi.omegacentauri.raspberryjammod.APIHandler.runCommand(APIHandler.java:779)
[11:08:36] [Thread-24/INFO] [STDERR]: [mobi.omegacentauri.raspberryjammod.APIHandler:process:516]: at mobi.omegacentauri.raspberryjammod.APIHandler.process(APIHandler.java:504)
[11:08:36] [Thread-24/INFO] [STDERR]: [mobi.omegacentauri.raspberryjammod.APIHandler:process:516]: at mobi.omegacentauri.raspberryjammod.APIServer.socketCommunicate(APIServer.java:146)
[11:08:36] [Thread-24/INFO] [STDERR]: [mobi.omegacentauri.raspberryjammod.APIHandler:process:516]: at mobi.omegacentauri.raspberryjammod.APIServer.access$000(APIServer.java:41)
[11:08:36] [Thread-24/INFO] [STDERR]: [mobi.omegacentauri.raspberryjammod.APIHandler:process:516]: at mobi.omegacentauri.raspberryjammod.APIServer$1.run(APIServer.java:113)
[11:08:36] [Thread-24/INFO] [STDERR]: [mobi.omegacentauri.raspberryjammod.APIHandler:process:516]: at java.lang.Thread.run(Unknown Source)
[11:08:36] [Server thread/INFO] [FML]: Applying holder lookups
[11:08:36] [Server thread/INFO] [FML]: Holder lookups applied
[11:08:36] [Server thread/INFO] [FML]: The state engine was in incorrect state SERVER_STOPPING and forced into state SERVER_STOPPED. Errors may have been discarded.
[11:08:36] [main/INFO] [FML]: Server terminated.
[11:08:36] [Client Shutdown Thread/INFO] [net.minecraft.server.MinecraftServer]: Stopping server
[11:08:36] [Client Shutdown Thread/INFO] [net.minecraft.server.MinecraftServer]: Saving players

Maybe, if the game lag due to using spawnEntity command frequently, the length of var serverWorlds will be 0, in Location.getWorldByEncodedAltitude.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant