Skip to content

ArrayIndexOutOfBounds with cover (Inverted Lamp from ProjectedRed) on attempt to break. #406

Description

@winterroberts

Basically, you hit the microblock with anything and getStrength method of Microblock is called, as then is the getStrength method of BlockMicroMaterial which in turn calls player.getBreakSpeed (an internal Minecraft method). Several more steps down the track An ArrayIndexOutOfBounds Exception occurs looking for the element at index 16 which does not exist.

Here is a complete error stack trace as removed from the Minecraft crash-report:
java.lang.ArrayIndexOutOfBoundsException: 16 at net.minecraft.block.Block.isToolEffective(Block.java:2226) at net.minecraftforge.common.ForgeHooks.isToolEffective(ForgeHooks.java:146) at net.minecraft.item.ItemTool.getDigSpeed(ItemTool.java:128) at net.minecraft.entity.player.EntityPlayer.getBreakSpeed(EntityPlayer.java:811) at codechicken.microblock.BlockMicroMaterial.getStrength(BlockMicroMaterial.scala:98) at codechicken.microblock.Microblock.getStrength(Microblock.scala:44) at codechicken.multipart.BlockMultipart.func_149737_a(BlockMultipart.scala:205) at net.minecraft.client.multiplayer.PlayerControllerMP.func_78743_b(PlayerControllerMP.java:177) at net.minecraft.client.Minecraft.func_147116_af(Minecraft.java:1409) at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1948) at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:973) at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:898) at net.minecraft.client.main.Main.main(SourceFile:148) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) 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(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:196) at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:231) at org.multimc.EntryPoint.listen(EntryPoint.java:143) at org.multimc.EntryPoint.main(EntryPoint.java:34)

I wish I could blame ProjectRed but nothing is noted to have run through any of its classes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions