Jump to content

[SOLVED] Custom Furnace - Slots not appearing due to IndexOutOfBoundsException


HarryTechReviews

Recommended Posts

Edit: The problem was some functions in the Block class weren't overriden

 

 

I'm making my custom furnace (microwave) and when I open it, the inventory slots and hotbar slots appear but my furnace slots do not. It gives an index out of bounds exception with a limit of 36 but I haven't set that limit anywhere in my code. There are no hints to where it is in the error except it's to do with container (which is quite obvious). Any ideas. Here is my github repository:  https://github.com/HarryTechRevs/MinecraftModding/tree/HarryTechRevs-FurnaceDevelopment

 

Quote

2017-08-06 18:31:03,528 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream2017-08-06 18:31:03,528 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream2017-08-06 18:31:03,532 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream[18:31:03] [main/INFO] [GradleStart]: Extra: [][18:31:03] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, {}, --assetsDir, C:/Users/harry/.gradle/caches/minecraft/assets, --assetIndex, 1.12, --accessToken{REDACTED}, --version, 1.12, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker][18:31:03] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker[18:31:03] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker[18:31:03] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker[18:31:03] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker[18:31:03] [main/INFO] [FML]: Forge Mod Loader version 14.21.1.2415 for Minecraft 1.12 loading[18:31:03] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_131, running on Windows 10:amd64:10.0, installed at C:\Program Files\Java\jre1.8.0_131[18:31:03] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation[18:31:03] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker[18:31:03] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin[18:31:03] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin[18:31:03] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker[18:31:03] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker[18:31:03] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker[18:31:03] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker[18:31:03] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker[18:31:03] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper2017-08-06 18:31:04,288 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream2017-08-06 18:31:04,576 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream2017-08-06 18:31:04,577 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream[18:31:05] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing[18:31:05] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper[18:31:05] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker[18:31:06] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker[18:31:06] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker[18:31:06] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker[18:31:06] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}[18:31:06] [main/INFO]: Setting user: Player546[18:31:10] [main/WARN]: Skipping bad option: lastServer:[18:31:10] [main/INFO]: LWJGL Version: 2.9.4[18:31:12] [main/INFO] [FML]: -- System Details --Details: Minecraft Version: 1.12 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_131, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 682718136 bytes (651 MB) / 865075200 bytes (825 MB) up to 3810525184 bytes (3634 MB) JVM Flags: 0 total; IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: Loaded coremods (and transformers): GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.5.0 NVIDIA 382.05' Renderer: 'GeForce GTX 1060 3GB/PCIe/SSE2'[18:31:12] [main/INFO] [FML]: MinecraftForge v14.21.1.2415 Initialized[18:31:12] [main/INFO] [FML]: Replaced 921 ore ingredients[18:31:12] [main/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer[18:31:12] [main/INFO] [FML]: Searching C:\Minecraft Modding\TestFurnace\mods for mods[18:31:13] [main/INFO] [FML]: Forge Mod Loader has identified 5 mods to load[18:31:14] [main/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, tm] at CLIENT[18:31:14] [main/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, tm] at SERVER[18:31:14] [Thread-3/INFO] [FML]: Using sync timing. 200 frames of Display.update took 82824571 nanos[18:31:15] [main/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:testmod[18:31:15] [main/INFO] [FML]: Processing ObjectHolder annotations[18:31:15] [main/INFO] [FML]: Found 1168 ObjectHolder annotations[18:31:15] [main/INFO] [FML]: Identifying ItemStackHolder annotations[18:31:15] [main/INFO] [FML]: Found 0 ItemStackHolder annotations[18:31:15] [main/INFO] [FML]: Configured a dormant chunk cache size of 0[18:31:15] [Forge Version Check/INFO] [ForgeVersionCheck]: [forge] Starting version check at http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json[18:31:15] [main/INFO] [FML]: Applying holder lookups[18:31:15] [main/INFO] [FML]: Holder lookups applied[18:31:15] [main/INFO] [FML]: Applying holder lookups[18:31:15] [main/INFO] [FML]: Holder lookups applied[18:31:15] [main/INFO] [FML]: Applying holder lookups[18:31:15] [main/INFO] [FML]: Holder lookups applied[18:31:15] [main/INFO] [FML]: Applying holder lookups[18:31:15] [main/INFO] [FML]: Holder lookups applied[18:31:15] [main/INFO] [FML]: Injecting itemstacks[18:31:15] [main/INFO] [FML]: Itemstack injection complete[18:31:16] [Forge Version Check/INFO] [ForgeVersionCheck]: [forge] Found status: OUTDATED Target: 14.21.1.2443[18:31:18] [Sound Library Loader/INFO]: Starting up SoundSystem...[18:31:18] [Thread-5/INFO]: Initializing LWJGL OpenAL[18:31:18] [Thread-5/INFO]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org)[18:31:18] [Thread-5/INFO]: OpenAL initialized.[18:31:19] [Sound Library Loader/INFO]: Sound engine started[18:31:22] [main/INFO] [FML]: Max texture size: 16384[18:31:22] [main/INFO]: Created: 512x512 textures-atlas[18:31:24] [main/INFO] [FML]: Applying holder lookups[18:31:24] [main/INFO] [FML]: Holder lookups applied[18:31:24] [main/INFO] [FML]: Injecting itemstacks[18:31:24] [main/INFO] [FML]: Itemstack injection complete[18:31:24] [main/INFO] [FML]: Forge Mod Loader has successfully loaded 5 mods[18:31:24] [main/WARN]: Skipping bad option: lastServer:[18:31:24] [main/INFO]: Narrator library for x64 successfully loaded[18:31:27] [Realms Notification Availability checker #1/INFO]: Could not authorize you against Realms server: Invalid session id[18:31:27] [Server thread/INFO]: Starting integrated minecraft server version 1.12[18:31:27] [Server thread/INFO]: Generating keypair[18:31:27] [Server thread/INFO] [FML]: Injecting existing registry data into this server instance[18:31:28] [Server thread/INFO] [FML]: Applying holder lookups[18:31:28] [Server thread/INFO] [FML]: Holder lookups applied[18:31:28] [Server thread/INFO] [FML]: Loading dimension 0 (New World) (net.minecraft.server.integrated.IntegratedServer@6a6b014c)[18:31:28] [Server thread/INFO]: Loaded 488 advancements[18:31:28] [Server thread/INFO] [FML]: Loading dimension 1 (New World) (net.minecraft.server.integrated.IntegratedServer@6a6b014c)[18:31:28] [Server thread/INFO] [FML]: Loading dimension -1 (New World) (net.minecraft.server.integrated.IntegratedServer@6a6b014c)[18:31:28] [Server thread/INFO]: Preparing start region for level 0[18:31:29] [Server thread/INFO]: Preparing spawn area: 50%[18:31:30] [Server thread/INFO]: Changing view distance to 12, from 10[18:31:38] [Netty Local Client IO #0/INFO] [FML]: Server protocol version 2[18:31:38] [Netty Server IO #1/INFO] [FML]: Client protocol version 2[18:31:38] [Netty Server IO #1/INFO] [FML]: Client attempting to join with 5 mods : [email protected],[email protected],[email protected],[email protected],[email protected][18:31:38] [Netty Local Client IO #0/INFO] [FML]: [Netty Local Client IO #0] Client side modded connection established[18:31:38] [Server thread/INFO] [FML]: [Server thread] Server side modded connection established[18:31:38] [Server thread/INFO]: Player546[local:E:0f09d9aa] logged in with entity id 371 at (73.42888928975962, 70.0, 257.889556423496)[18:31:38] [Server thread/INFO]: Player546 joined the game[18:31:40] [Server thread/INFO]: Saving and pausing game...[18:31:40] [Server thread/INFO]: Saving chunks for level 'New World'/overworld[18:31:40] [Server thread/INFO]: Saving chunks for level 'New World'/the_nether[18:31:40] [Server thread/INFO]: Saving chunks for level 'New World'/the_end[18:31:41] [pool-2-thread-1/WARN]: Couldn't look up profile properties for com.mojang.authlib.GameProfile@764addc5[id=f2ba1573-0c0d-3978-bb86-e2dc9c0eb9a4,name=Player546,properties={},legacy=false]com.mojang.authlib.exceptions.AuthenticationException: The client has sent too many requests within a certain amount of time at com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService.makeRequest(YggdrasilAuthenticationService.java:79) ~[YggdrasilAuthenticationService.class:?] at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSess
ionService.fillGameProfile(YggdrasilMinecraftSessionService.java:180) [YggdrasilMinecraftSessionService.class:?] at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService$1.load(YggdrasilMinecraftSessionService.java:60) [YggdrasilMinecraftSessionService$1.class:?] at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService$1.load(YggdrasilMinecraftSessionService.java:57) [YggdrasilMinecraftSessionService$1.class:?] at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3716) [guava-21.0.jar:?] at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2424) [guava-21.0.jar:?] at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2298) [guava-21.0.jar:?] at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2211) [guava-21.0.jar:?] at com.google.common.cache.LocalCache.get(LocalCache.java:4154) [guava-21.0.jar:?] at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:4158) [guava-21.0.jar:?] at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:5147) [guava-21.0.jar:?] at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:5153) [guava-21.0.jar:?] at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillProfileProperties(YggdrasilMinecraftSessionService.java:170) [YggdrasilMinecraftSessionService.class:?] at net.minecraft.client.Minecraft.getProfileProperties(Minecraft.java:3161) [Minecraft.class:?] at net.minecraft.client.resources.SkinManager$3.run(SkinManager.java:138) [SkinManager$3.class:?] at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_131] at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_131] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_131] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_131] at java.lang.Thread.run(Unknown Source) [?:1.8.0_131][18:31:42] [main/FATAL]: Error executing taskjava.util.concurrent.ExecutionException: java.lang.IndexOutOfBoundsException: Index: 36, Size: 36 at java.util.concurrent.FutureTask.report(Unknown Source) ~[?:1.8.0_131] at java.util.concurrent.FutureTask.get(Unknown Source) ~[?:1.8.0_131] at net.minecraft.util.Util.runTask(Util.java:54) [Util.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1161) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:436) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_131] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_131] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_131] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_131] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_131] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_131] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_131] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_131] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:26) [start/:?]Caused by: java.lang.IndexOutOfBoundsException: Index: 36, Size: 36 at java.util.ArrayList.rangeCheck(Unknown Source) ~[?:1.8.0_131] at java.util.ArrayList.get(Unknown Source) ~[?:1.8.0_131] at net.minecraft.inventory.Container.getSlot(Container.java:139) ~[Container.class:?] at net.minecraft.inventory.Container.setAll(Container.java:577) ~[Container.class:?] at net.minecraft.client.network.NetHandlerPlayClient.handleWindowItems(NetHandlerPlayClient.java:1312) ~[NetHandlerPlayClient.class:?] at net.minecraft.network.play.server.SPacketWindowItems.processPacket(SPacketWindowItems.java:68) ~[SPacketWindowItems.class:?] at net.minecraft.network.play.server.SPacketWindowItems.processPacket(SPacketWindowItems.java:13) ~[SPacketWindowItems.class:?] at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:21) ~[PacketThreadUtil$1.class:?] at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:1.8.0_131] at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:1.8.0_131] at net.minecraft.util.Util.runTask(Util.java:53) ~[Util.class:?] ... 15 more

 

Edited by HarryTechReviews
Link to comment
Share on other sites

Slot 36 (the 37th slot) in a furnace?

The array is being allocated somewhere. Find out where. Then find out why your index is 36. Finally, remember that array indices start at 0.

Try setting a breakpoint so you can examine variable and parameter values on the verge of the exception.

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Link to comment
Share on other sites

Yeah, I even checked your "handle player inventory" code and it matches my own perfectly.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Start commenting out various lines in the container that add slots. You'll narrow it down eventually.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.