1

PLEASE HELP!

plumppuffypig's Avatar plumppuffypig10/4/14 4:36 pm
1 emeralds 2.1k 3
10/5/2014 9:06 am
duke_Frans's Avatar duke_Frans
Hi!
I've recently started forge modding. Im programming a custom furnace for my mod, but when i click on the furnace it crashes. by the way im using the gradle thingy to test run my mod from eclipse.
This might be a noob problem, but plz help.

Console
Click to reveal
[13:43] [main/INFO]: No arguments specified, assuming client.
[13:43] [main/INFO]: Extra: []
[13:43] [main/INFO]: Running with arguments: [--userProperties, {}, --tweakClass, cpw.mods.fml.common.launcher.FMLTweaker, --accessToken, {REDACTED}, --assetIndex, 1.7.10, --assetsDir, C:/.gradle/caches/minecraft/assets, --version, 1.7.10]
[13:43] [main/INFO]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker
[13:43] [main/INFO]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker
[13:43] [main/INFO]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker
[13:43] [main/INFO]: Forge Mod Loader version 7.10.84.1217 for Minecraft 1.7.10 loading
[13:43] [main/INFO]: Java is Java HotSpot(TM) Client VM, version 1.7.0_67, running on Windows 7:x86:6.1, installed at C:\Program Files\Java\jdk1.7.0_67\jre
[13:43] [main/INFO]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
[13:43] [main/INFO]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[13:43] [main/INFO]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker
[13:43] [main/INFO]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[13:43] [main/INFO]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[13:43] [main/INFO]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
[13:43] [main/ERROR]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!
[13:43] [main/ERROR]: FML appears to be missing any signature data. This is not a good thing
[13:43] [main/INFO]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
[13:43] [main/INFO]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker
[13:43] [main/INFO]: Loading tweak class name cpw.mods.fml.common.launcher.TerminalTweaker
[13:43] [main/INFO]: Calling tweak class cpw.mods.fml.common.launcher.TerminalTweaker
[13:43] [main/INFO]: Launching wrapped minecraft {net.minecraft.client.main.Main}
[13:43] [main/INFO]: Setting user: Player817
[13:43] [Client thread/INFO]: LWJGL Version: 2.9.1
[13:43] [Client thread/ERROR]: Unable to determine registrant mod for cpw.mods.fml.common.eventhandler.EventBus@138e64. This is a critical error and should be impossible
java.lang.Throwable
at cpw.mods.fml.common.eventhandler.EventBus.register(EventBus.java:56) [EventBus.class:?]
at cpw.mods.fml.common.eventhandler.EventBus.<init>(EventBus.java:36) [EventBus.class:?]
at net.minecraftforge.common.MinecraftForge.<clinit>(MinecraftForge.java:21) [MinecraftForge.class:?]
at net.minecraftforge.fluids.FluidRegistry.registerFluid(FluidRegistry.java:83) [FluidRegistry.class:?]
at net.minecraftforge.fluids.FluidRegistry.<clinit>(FluidRegistry.java:50) [FluidRegistry.class:?]
at net.minecraftforge.client.ForgeHooksClient.<clinit>(ForgeHooksClient.java:425) [ForgeHooksClient.class:?]
at net.minecraft.client.Minecraft.startGame(Minecraft.java:432) [Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:867) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(SourceFile:148) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_67]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_67]
at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_67]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_67]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_67]
at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_67]
at GradleStart.bounce(GradleStart.java:107) [start/:?]
at GradleStart.startClient(GradleStart.java:100) [start/:?]
at GradleStart.main(GradleStart.java:55) [start/:?]
[13:43] [Client thread/ERROR]: Unable to determine registrant mod for cpw.mods.fml.common.eventhandler.EventBus@18f2ef7. This is a critical error and should be impossible
java.lang.Throwable
at cpw.mods.fml.common.eventhandler.EventBus.register(EventBus.java:56) [EventBus.class:?]
at cpw.mods.fml.common.eventhandler.EventBus.<init>(EventBus.java:36) [EventBus.class:?]
at net.minecraftforge.common.MinecraftForge.<clinit>(MinecraftForge.java:22) [MinecraftForge.class:?]
at net.minecraftforge.fluids.FluidRegistry.registerFluid(FluidRegistry.java:83) [FluidRegistry.class:?]
at net.minecraftforge.fluids.FluidRegistry.<clinit>(FluidRegistry.java:50) [FluidRegistry.class:?]
at net.minecraftforge.client.ForgeHooksClient.<clinit>(ForgeHooksClient.java:425) [ForgeHooksClient.class:?]
at net.minecraft.client.Minecraft.startGame(Minecraft.java:432) [Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:867) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(SourceFile:148) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_67]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_67]
at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_67]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_67]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_67]
at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_67]
at GradleStart.bounce(GradleStart.java:107) [start/:?]
at GradleStart.startClient(GradleStart.java:100) [start/:?]
at GradleStart.main(GradleStart.java:55) [start/:?]
[13:43] [Client thread/ERROR]: Unable to determine registrant mod for cpw.mods.fml.common.eventhandler.EventBus@15479b4. This is a critical error and should be impossible
java.lang.Throwable
at cpw.mods.fml.common.eventhandler.EventBus.register(EventBus.java:56) [EventBus.class:?]
at cpw.mods.fml.common.eventhandler.EventBus.<init>(EventBus.java:36) [EventBus.class:?]
at net.minecraftforge.common.MinecraftForge.<clinit>(MinecraftForge.java:23) [MinecraftForge.class:?]
at net.minecraftforge.fluids.FluidRegistry.registerFluid(FluidRegistry.java:83) [FluidRegistry.class:?]
at net.minecraftforge.fluids.FluidRegistry.<clinit>(FluidRegistry.java:50) [FluidRegistry.class:?]
at net.minecraftforge.client.ForgeHooksClient.<clinit>(ForgeHooksClient.java:425) [ForgeHooksClient.class:?]
at net.minecraft.client.Minecraft.startGame(Minecraft.java:432) [Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:867) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(SourceFile:148) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_67]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_67]
at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_67]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_67]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_67]
at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_67]
at GradleStart.bounce(GradleStart.java:107) [start/:?]
at GradleStart.startClient(GradleStart.java:100) [start/:?]
at GradleStart.main(GradleStart.java:55) [start/:?]
[13:43] [Client thread/ERROR]: Unable to determine registrant mod for cpw.mods.fml.common.eventhandler.EventBus@1e43847. This is a critical error and should be impossible
java.lang.Throwable
at cpw.mods.fml.common.eventhandler.EventBus.register(EventBus.java:56) [EventBus.class:?]
at cpw.mods.fml.common.eventhandler.EventBus.<init>(EventBus.java:36) [EventBus.class:?]
at cpw.mods.fml.common.FMLCommonHandler.<init>(FMLCommonHandler.java:90) [FMLCommonHandler.class:?]
at cpw.mods.fml.common.FMLCommonHandler.<clinit>(FMLCommonHandler.java:77) [FMLCommonHandler.class:?]
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:188) [FMLClientHandler.class:?]
at net.minecraft.client.Minecraft.startGame(Minecraft.java:480) [Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:867) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(SourceFile:148) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_67]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_67]
at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_67]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_67]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_67]
at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_67]
at GradleStart.bounce(GradleStart.java:107) [start/:?]
at GradleStart.startClient(GradleStart.java:100) [start/:?]
at GradleStart.main(GradleStart.java:55) [start/:?]
[13:43] [Client thread/INFO]: Attempting early MinecraftForge initialization
[13:43] [Client thread/INFO]: MinecraftForge v10.13.1.1217 Initialized
[13:43] [Client thread/INFO]: Replaced 182 ore recipies
[13:43] [Client thread/INFO]: Completed early MinecraftForge initialization
[13:43] [Client thread/INFO]: Searching C:\Desktop\forge\eclipse\mods for mods
[13:43] [Client thread/INFO]: Forge Mod Loader has identified 5 mods to load
[13:43] [Client thread/INFO]: Attempting connection with missing mods [mcp, FML, Forge, examplemod, morefood] at CLIENT
[13:43] [Client thread/INFO]: Attempting connection with missing mods [mcp, FML, Forge, examplemod, morefood] at SERVER
[13:43] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Example Mod, FMLFileResourcePack:More Food Mod
[13:43] [Client thread/INFO]: Processing ObjectHolder annotations
[13:43] [Client thread/INFO]: Found 341 ObjectHolder annotations
[13:43] [Client thread/INFO]: Configured a dormant chunk cache size of 0
[13:43] [Client thread/INFO]: Applying holder lookups
[13:43] [Client thread/INFO]: Holder lookups applied
[13:43] [Sound Library Loader/INFO]: [paulscode.sound.SoundSystemLogger:message]:
[13:43] [Sound Library Loader/INFO]: [paulscode.sound.SoundSystemLogger:message]: Starting up SoundSystem...
[13:43] [Thread-6/INFO]: [paulscode.sound.SoundSystemLogger:message]: Initializing LWJGL OpenAL
[13:43] [Thread-6/INFO]: [paulscode.sound.SoundSystemLogger:message]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org)
[13:43] [Thread-6/INFO]: [paulscode.sound.SoundSystemLogger:message]: OpenAL initialized.
[13:43] [Sound Library Loader/INFO]: [paulscode.sound.SoundSystemLogger:message]:
[13:43] [Sound Library Loader/INFO]: Sound engine started
[13:43] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas
[13:43] [Client thread/INFO]: Created: 256x256 textures/items-atlas
[13:43] [Client thread/INFO]: [com.example.examplemod.ExampleMod:init]: DIRT BLOCK >> tile.dirt
[13:43] [Client thread/INFO]: Forge Mod Loader has successfully loaded 5 mods
[13:43] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Example Mod, FMLFileResourcePack:More Food Mod
[13:43] [Client thread/INFO]: Created: 512x256 textures/items-atlas
[13:43] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas
[13:43] [Client thread/INFO]: [paulscode.sound.SoundSystemLogger:message]:
[13:43] [Client thread/INFO]: [paulscode.sound.SoundSystemLogger:message]: SoundSystem shutting down...
[13:43] [Client thread/INFO]: [paulscode.sound.SoundSystemLogger:importantMessage]: Author: Paul Lamb, http://www.paulscode.com
[13:43] [Client thread/INFO]: [paulscode.sound.SoundSystemLogger:message]:
[13:43] [Sound Library Loader/INFO]: [paulscode.sound.SoundSystemLogger:message]:
[13:43] [Sound Library Loader/INFO]: [paulscode.sound.SoundSystemLogger:message]: Starting up SoundSystem...
[13:43] [Thread-8/INFO]: [paulscode.sound.SoundSystemLogger:message]: Initializing LWJGL OpenAL
[13:43] [Thread-8/INFO]: [paulscode.sound.SoundSystemLogger:message]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org)
[13:43] [Thread-8/INFO]: [paulscode.sound.SoundSystemLogger:message]: OpenAL initialized.
[13:43] [Sound Library Loader/INFO]: [paulscode.sound.SoundSystemLogger:message]:
[13:43] [Sound Library Loader/INFO]: Sound engine started
[13:43] [Server thread/INFO]: Starting integrated minecraft server version 1.7.10
[13:43] [Server thread/INFO]: Generating keypair
[13:43] [Server thread/INFO]: Injecting existing block and item data into this server instance
[13:43] [Server thread/INFO]: Applying holder lookups
[13:43] [Server thread/INFO]: Holder lookups applied
[13:43] [Server thread/INFO]: Loading dimension 0 (New World) (net.minecraft.server.integrated.IntegratedServer@8d4247)
[13:43] [Server thread/INFO]: Loading dimension 1 (New World) (net.minecraft.server.integrated.IntegratedServer@8d4247)
[13:43] [Server thread/INFO]: Loading dimension -1 (New World) (net.minecraft.server.integrated.IntegratedServer@8d4247)
[13:43] [Server thread/INFO]: Preparing start region for level 0
[13:43] [Server thread/INFO]: Preparing spawn area: 4%
[13:43] [Server thread/INFO]: Preparing spawn area: 45%
[13:43] [Server thread/INFO]: Preparing spawn area: 81%
[13:43] [Server thread/INFO]: Changing view distance to 2, from 10
[13:44] [Netty Client IO #0/INFO]: Server protocol version 1
[13:44] [Netty IO #1/INFO]: Client protocol version 1
[13:44] [Netty IO #1/INFO]: Client attempting to join with 5 mods : mcp@9.05,FML@7.10.84.1217,morefood@1.0,examplemod@1.0,Forge@10.13.1.1217
[13:44] [Netty IO #1/INFO]: Attempting connection with missing mods [] at CLIENT
[13:44] [Netty Client IO #0/INFO]: Attempting connection with missing mods [] at SERVER
[13:44] [Client thread/INFO]: [Client thread] Client side modded connection established
[13:44] [Server thread/INFO]: [Server thread] Server side modded connection established
[13:44] [Server thread/INFO]: Player817[local:E] logged in with entity id 134 at (0.7477497789977159, 94.1230047079385, 17.833116524011537)
[13:44] [Server thread/INFO]: Player817 joined the game
[13:44] [Server thread/ERROR]: Encountered an unexpected exception
net.minecraft.util.ReportedException: Ticking memory connection
at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:181) ~[NetworkSystem.class:?]
at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:659) ~[MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:547) ~[MinecraftServer.class:?]
at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:111) ~[IntegratedServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:427) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685) [MinecraftServer$2.class:?]
Caused by: java.lang.NullPointerException
at net.minecraft.inventory.Slot.getStack(Slot.java:67) ~[Slot.class:?]
at net.minecraft.inventory.Container.getInventory(SourceFile:64) ~[Container.class:?]
at net.minecraft.inventory.Container.addCraftingToCrafters(SourceFile:53) ~[Container.class:?]
at com.plumppuffypig.morefood.inventory.ContainerOven.addCraftingToCrafters(ContainerOven.java:43) ~[ContainerOven.class:?]
at cpw.mods.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:88) ~[FMLNetworkHandler.class:?]
at net.minecraft.entity.player.EntityPlayer.openGui(EntityPlayer.java:2208) ~[EntityPlayer.class:?]
at com.plumppuffypig.morefood.Oven.onBlockActivated(Oven.java:56) ~[Oven.class:?]
at net.minecraft.server.management.ItemInWorldManager.activateBlockOrUseItem(ItemInWorldManager.java:376) ~[ItemInWorldManager.class:?]
at net.minecraft.network.NetHandlerPlayServer.processPlayerBlockPlacement(NetHandlerPlayServer.java:554) ~[NetHandlerPlayServer.class:?]
at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(SourceFile:60) ~[C08PacketPlayerBlockPlacement.class:?]
at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(SourceFile:9) ~[C08PacketPlayerBlockPlacement.class:?]
at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:212) ~[NetworkManager.class:?]
at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:165) ~[NetworkSystem.class:?]
... 5 more
[13:44] [Client thread/WARN]: Failed to load texture: minecraft:textures/gui/container/Oven.png
java.io.FileNotFoundException: minecraft:textures/gui/container/Oven.png
at net.minecraft.client.resources.FallbackResourceManager.getResource(SourceFile:51) ~[FallbackResourceManager.class:?]
at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SourceFile:55) ~[SimpleReloadableResourceManager.class:?]
at net.minecraft.client.renderer.texture.SimpleTexture.loadTexture(SourceFile:29) ~[SimpleTexture.class:?]
at net.minecraft.client.renderer.texture.TextureManager.loadTexture(SourceFile:72) [TextureManager.class:?]
at net.minecraft.client.renderer.texture.TextureManager.bindTexture(SourceFile:40) [TextureManager.class:?]
at com.plumppuffypig.morefood.gui.GuiOven.drawGuiContainerBackgroundLayer(GuiOven.java:36) [GuiOven.class:?]
at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:78) [GuiContainer.class:?]
at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1061) [EntityRenderer.class:?]
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:990) [Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:887) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(SourceFile:148) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_67]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_67]
at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_67]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_67]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_67]
at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_67]
at GradleStart.bounce(GradleStart.java:107) [start/:?]
at GradleStart.startClient(GradleStart.java:100) [start/:?]
at GradleStart.main(GradleStart.java:55) [start/:?]
[13:44] [Server thread/ERROR]: This crash report has been saved to: C:\Desktop\forge\eclipse\.\crash-reports\crash-2014-10-04_13.44.03-server.txt
[13:44] [Server thread/INFO]: Stopping server
[13:44] [Server thread/INFO]: Saving players
[13:44] [Server thread/INFO]: Saving worlds
[13:44] [Server thread/INFO]: Saving chunks for level 'New World'/Overworld
[13:44] [Server thread/INFO]: Saving chunks for level 'New World'/Nether
[13:44] [Server thread/INFO]: Saving chunks for level 'New World'/The End
[13:44] [Server thread/INFO]: Unloading dimension 0
[13:44] [Server thread/INFO]: Unloading dimension -1
[13:44] [Server thread/INFO]: Unloading dimension 1
[13:44] [Server thread/INFO]: Applying holder lookups
[13:44] [Server thread/INFO]: Holder lookups applied
[13:44] [Server thread/INFO]: The state engine was in incorrect state SERVER_STOPPING and forced into state SERVER_STOPPED. Errors may have been discarded.
[13:44] [Client thread/FATAL]: Reported exception thrown!
net.minecraft.util.ReportedException: Rendering screen
at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1092) ~[EntityRenderer.class:?]
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:990) ~[Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:887) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(SourceFile:148) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_67]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_67]
at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_67]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_67]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_67]
at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_67]
at GradleStart.bounce(GradleStart.java:107) [start/:?]
at GradleStart.startClient(GradleStart.java:100) [start/:?]
at GradleStart.main(GradleStart.java:55) [start/:?]
Caused by: java.lang.NullPointerException
at com.plumppuffypig.morefood.gui.GuiOven.drawGuiContainerBackgroundLayer(GuiOven.java:42) ~[GuiOven.class:?]
at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:78) ~[GuiContainer.class:?]
at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1061) ~[EntityRenderer.class:?]
... 16 more
[13:44] [Client thread/INFO]: [net.minecraft.client.Minecraft:displayCrashReport]: ---- Minecraft Crash Report ----
// Don't be sad. I'll do better next time, I promise!

Time: 10/4/14 1:44 PM
Description: Rendering screen

java.lang.NullPointerException: Rendering screen
at com.plumppuffypig.morefood.gui.GuiOven.drawGuiContainerBackgroundLayer(GuiOven.java:42)
at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:78)
at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1061)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:990)
at net.minecraft.client.Minecraft.run(Minecraft.java:887)
at net.minecraft.client.main.Main.main(SourceFile:148)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at GradleStart.bounce(GradleStart.java:107)
at GradleStart.startClient(GradleStart.java:100)
at GradleStart.main(GradleStart.java:55)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Stacktrace:
at com.plumppuffypig.morefood.gui.GuiOven.drawGuiContainerBackgroundLayer(GuiOven.java:42)
at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:78)

-- Screen render details --
Details:
Screen name: com.plumppuffypig.morefood.gui.GuiOven
Mouse location: Scaled: (213, 119). Absolute: (427, 240)
Screen size: Scaled: (427, 240). Absolute: (854, 480). Scale factor of 2

-- Affected level --
Details:
Level name: MpServer
All players: 1 total; [EntityClientPlayerMP['Player817'/134, l='MpServer', x=0.75, y=95.74, z=17.83]]
Chunk stats: MultiplayerChunkCache: 25, 25
Level seed: 0
Level generator: ID 00 - default, ver 1. Features enabled: false
Level generator options:
Level spawn location: World: (0,64,0), Chunk: (at 0,4,0 in 0,0; contains blocks 0,0,0 to 15,255,15), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
Level time: 3341 game time, 3341 day time
Level dimension: 0
Level storage version: 0x00000 - Unknown?
Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false
Forced entities: 13 total; [EntityChicken['Chicken'/100, l='MpServer', x=30.63, y=66.00, z=11.53], EntityChicken['Chicken'/64, l='MpServer', x=-18.47, y=91.00, z=10.56], EntityChicken['Chicken'/99, l='MpServer', x=28.59, y=66.00, z=9.63], EntityChicken['Chicken'/65, l='MpServer', x=-19.50, y=96.00, z=45.50], EntityChicken['Chicken'/66, l='MpServer', x=-19.09, y=96.00, z=41.66], EntityChicken['Chicken'/67, l='MpServer', x=-27.47, y=94.00, z=50.73], EntityChicken['Chicken'/110, l='MpServer', x=35.59, y=64.00, z=13.53], EntityChicken['Chicken'/111, l='MpServer', x=40.97, y=64.00, z=8.41], EntityChicken['Chicken'/77, l='MpServer', x=-12.59, y=89.00, z=-3.41], EntityChicken['Chicken'/78, l='MpServer', x=-7.59, y=91.00, z=54.59], EntityClientPlayerMP['Player817'/134, l='MpServer', x=0.75, y=95.74, z=17.83], EntityChicken['Chicken'/63, l='MpServer', x=-18.56, y=89.00, z=-13.44], EntityBat['Bat'/91, l='MpServer', x=9.47, y=22.59, z=-23.62]]
Retry entities: 0 total; []
Server brand: fml,forge
Server type: Integrated singleplayer server
Stacktrace:
at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:373)
at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2433)
at net.minecraft.client.Minecraft.run(Minecraft.java:908)
at net.minecraft.client.main.Main.main(SourceFile:148)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at GradleStart.bounce(GradleStart.java:107)
at GradleStart.startClient(GradleStart.java:100)
at GradleStart.main(GradleStart.java:55)

-- System Details --
Details:
Minecraft Version: 1.7.10
Operating System: Windows 7 (x86) version 6.1
Java Version: 1.7.0_67, Oracle Corporation
Java VM Version: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation
Memory: 869295904 bytes (829 MB) / 1060372480 bytes (1011 MB) up to 1060372480 bytes (1011 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95
FML: MCP v9.05 FML v7.10.84.1217 Minecraft Forge 10.13.1.1217 5 mods loaded, 5 mods active
mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
FML{7.10.84.1217} [Forge Mod Loader] (forgeBin-1.7.10-10.13.1.1217.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Forge{10.13.1.1217} [Minecraft Forge] (forgeBin-1.7.10-10.13.1.1217.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
examplemod{1.0} [Example Mod] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
morefood{1.0} [More Food Mod] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Launched Version: 1.7.10
LWJGL: 2.9.1
OpenGL: Intel(R) Q45/Q43 Express Chipset GL version 2.1.0 - Build 8.15.10.2869, Intel
GL Caps: Using GL 1.3 multitexturing.
Using framebuffer objects because EXT_framebuffer_object is supported.
Anisotropic filtering is supported and maximum anisotropy is 2.
Shaders are available because OpenGL 2.1 is supported.

Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Resource Packs: []
Current Language: English (US)
Profiler Position: N/A (disabled)
Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Anisotropic Filtering: Off (1)
[13:44] [Client thread/INFO]: [net.minecraft.client.Minecraft:displayCrashReport]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Desktop\forge\eclipse\.\crash-reports\crash-2014-10-04_13.44.07-client.txt
AL lib: (EE) alc_cleanup: 1 device not closed


MoreFoodMod.java
Click to reveal
package com.plumppuffypig.morefood;

import com.plumppuffypig.morefood.books.ItemBlankBook;
import com.plumppuffypig.morefood.books.ItemSteakAndPotatoesRecipe;
import com.plumppuffypig.morefood.books.ItemSteakAndPotatoesRecipeBook;
import com.plumppuffypig.morefood.handler.MFGuiHandler;

import net.minecraft.block.Block;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;

@Mod(modid = MoreFoodMod.MODID, version = MoreFoodMod.VERSION)
public class MoreFoodMod {
public static final String MODID = "morefood";
public static final String VERSION = "1.0";

public static Item blankrecipebook;
public static Item steakandpotatoesrecipebook;
public static Item steakandpotatoesrecipe;

public static Block oven;
public static Block ovenActive;



@Instance(MoreFoodMod.MODID)
public static MoreFoodMod modInstance;



public static CreativeTabs tabStandard;

@EventHandler
public void load(FMLInitializationEvent event)
{
tabStandard = new CreativeTabCustomized(CreativeTabs.getNextID(), "standard");



blankrecipebook = new ItemBlankBook();
GameRegistry.registerItem(blankrecipebook, ItemBlankBook.ITEM_NAME);

steakandpotatoesrecipebook = new ItemSteakAndPotatoesRecipeBook();
GameRegistry.registerItem(steakandpotatoesrecipebook, ItemSteakAndPotatoesRecipeBook.ITEM_NAME);



steakandpotatoesrecipe = new ItemSteakAndPotatoesRecipe();
GameRegistry.registerItem(steakandpotatoesrecipe, ItemSteakAndPotatoesRecipe.ITEM_NAME);



steakandpotatoesrecipebook.setContainerItem(steakandpotatoesrecipebook);


NetworkRegistry.INSTANCE.registerGuiHandler(MoreFoodMod.modInstance, new MFGuiHandler());
GameRegistry.registerTileEntity(TileEntityOven.class, MoreFoodMod.MODID + "TileEntityOven");




oven = new Oven(false).setBlockName("Oven").setCreativeTab(MoreFoodMod.tabStandard);
ovenActive = new Oven(true).setBlockName("OvenActive");
GameRegistry.registerBlock(oven, oven.getUnlocalizedName());
GameRegistry.registerBlock(ovenActive, ovenActive.getUnlocalizedName());



MoreFoodModRecipes.addRecipes();



}

}


Oven.java
Click to reveal
package com.plumppuffypig.morefood;

import java.util.Random;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

public class Oven extends Block{

@SideOnly(Side.CLIENT)
private IIcon top;
@SideOnly(Side.CLIENT)
private IIcon front;

private static boolean isBurning;
private final boolean isBurning2;
private final Random random = new Random();


protected Oven(boolean isActive) {
super(Material.rock);
isBurning2 = isActive;
}

@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconregister) {
this.blockIcon = iconregister.registerIcon(MoreFoodMod.MODID + ":OvenSide");
this.front = iconregister.registerIcon(this.isBurning2 ? MoreFoodMod.MODID + ":OvenActive" : MoreFoodMod.MODID + ":OvenInactive");
this.top = iconregister.registerIcon(MoreFoodMod.MODID + ":OvenTop");
}

public IIcon getIcon(int side, int meta){
if(side == 1){
return top;
}else if(side == 3){
return front;
}else{
return this.blockIcon;
}
}

public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){
player.openGui(MoreFoodMod.modInstance, 0, world, x, y, z);
return true;
}

public Item getItemDropped(int par1, Random random, int par3){
return Item.getItemFromBlock(MoreFoodMod.oven);
}

public Item getItem(World world, int par2, int par3, int par4){
return Item.getItemFromBlock(MoreFoodMod.oven);
}

@SideOnly(Side.CLIENT)
public void onBlockAdded(World world, int x, int y, int z){
super.onBlockAdded(world, x, y, z);
this.direction(world, x, y, z);
}

private void direction(World world, int x, int y, int z) {
if(!world.isRemote){
Block direction = world.getBlock(x, y, z -1);
Block direction1 = world.getBlock(x, y, z +1);
Block direction2 = world.getBlock(x -1, y, z);
Block direction3 = world.getBlock(x +1, y, z -1);
byte byte0 = 3;

if(direction.func_149730_j() && direction.func_149730_j()) {
byte0 = 3;
}

if(direction1.func_149730_j() && direction1.func_149730_j()) {
byte0 = 2;
}

if(direction2.func_149730_j() && direction2.func_149730_j()) {
byte0 = 5;
}

if(direction3.func_149730_j() && direction3.func_149730_j()) {
byte0 = 4;
}

world.setBlockMetadataWithNotify(x, y, z, byte0, 2);
}

}

public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entity, ItemStack itemstack){
int direction = MathHelper.floor_double((double)(entity.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3;

if(direction == 0) {
world.setBlockMetadataWithNotify(x, y, z, 2, 2);
}

if(direction == 1) {
world.setBlockMetadataWithNotify(x, y, z, 5, 2);
}

if(direction == 2) {
world.setBlockMetadataWithNotify(x, y, z, 3, 2);
}

if(direction == 3) {
world.setBlockMetadataWithNotify(x, y, z, 4, 2);
}

if(itemstack.hasDisplayName()){
((TileEntityOven) world.getTileEntity(x, y, z)).furnaceName(itemstack.getDisplayName());
}

}


public static void updateBlockState(boolean burning, World world, int x, int y, int z){
int direction = world.getBlockMetadata(x, y, z);
TileEntity tileentity = world.getTileEntity(x, y, z);
isBurning = true;

if(burning){
world.setBlock(x, y, z, MoreFoodMod.ovenActive);
} else {
world.setBlock(x, y, z, MoreFoodMod.oven);
}

isBurning = false;
world.setBlockMetadataWithNotify(x, y, z, direction, 2);

if(tileentity != null){
tileentity.validate();
world.setTileEntity(x, y, z, tileentity);
}
}

public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
if(!isBurning){
TileEntityOven tileentityoven = (TileEntityOven) world.getTileEntity(x, y, z);

if(tileentityoven != null){
for(int i = 0; i < tileentityoven.getSizeInventory(); ++i){
ItemStack itemstack = tileentityoven.getStackInSlot(i);

if(itemstack != null){
float f = this.random.nextFloat() * 0.6F + 0.1F;
float f1 = this.random.nextFloat() * 0.6F + 0.1F;
float f2 = this.random.nextFloat() * 0.6F + 0.1F;

while(itemstack.stackSize > 0){
int j = this.random.nextInt(21) + 10;

if(j > itemstack.stackSize){
j = itemstack.stackSize;
}

itemstack.stackSize -= j;
EntityItem entityitem = new EntityItem(world, (double) ((float) x + f), (double) ((float) y + f1), (double) ((float) z + f2), new ItemStack(itemstack.getItem(), j, itemstack.getItemDamage()));

if(itemstack.hasTagCompound()){
entityitem.getEntityItem().setTagCompound(((NBTTagCompound) itemstack.getTagCompound().copy()));
}

float f3 = 0.025F;
entityitem.motionX = (double) ((float) this.random.nextGaussian() * f3);
entityitem.motionY = (double) ((float) this.random.nextGaussian() * f3 + 0.1F);
entityitem.motionZ = (double) ((float) this.random.nextGaussian() * f3);
world.spawnEntityInWorld(entityitem);
}
}
}
world.func_147453_f(x, y, z, block);
}
}
super.breakBlock(world, x, y, z, block, meta);
}

@SideOnly(Side.CLIENT)
public void randomDisplayTick(World world, int x, int y, int z, Random random) {
if (this.isBurning2) {
int direction = world.getBlockMetadata(x, y, z);

float xx = (float) x + 0.5F, yy = (float) y + random.nextFloat() * 6.0F / 16.0F, zz = (float) z + 0.5F, xx2 = random.nextFloat() * 0.3F - 0.2F, zz2 = 0.5F;

if (direction == 4) {
world.spawnParticle("smoke", (double) (xx - zz2), (double) yy, (double) (zz + xx2), 0.0F, 0.0F, 0.0F);
world.spawnParticle("flame", (double) (xx - zz2), (double) yy, (double) (zz + xx2), 0.0F, 0.0F, 0.0F);
} else if (direction == 5) {
world.spawnParticle("smoke", (double) (xx - zz2), (double) yy, (double) (zz + xx2), 0.0F, 0.0F, 0.0F);
world.spawnParticle("flame", (double) (xx - zz2), (double) yy, (double) (zz + xx2), 0.0F, 0.0F, 0.0F);
} else if (direction == 3) {
world.spawnParticle("smoke", (double) (xx - zz2), (double) yy, (double) (zz + xx2), 0.0F, 0.0F, 0.0F);
world.spawnParticle("flame", (double) (xx - zz2), (double) yy, (double) (zz + xx2), 0.0F, 0.0F, 0.0F);
} else if (direction == 2) {
world.spawnParticle("smoke", (double) (xx - zz2), (double) yy, (double) (zz + xx2), 0.0F, 0.0F, 0.0F);
world.spawnParticle("flame", (double) (xx - zz2), (double) yy, (double) (zz + xx2), 0.0F, 0.0F, 0.0F);
}
}
}

}


TileEntityOven.java
[spoiler]package com.plumppuffypig.morefood;

import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.FurnaceRecipes;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.tileentity.TileEntity;

public class TileEntityOven extends TileEntity implements ISidedInventory{

private static final int[] slotsTop = new int[] { 0 };
private static final int[] slotsBottom = new int[] { 2, 1 };
private static final int[] slotsSides = new int[] { 1 };

private ItemStack[] furnaceItemStacks = new ItemStack[3];

public int furnaceBurnTime;
public int currentBurnTime;
public int furnaceCookTime;

private String furnaceName;

public void furnaceName(String string){
this.furnaceName = string;
}

@Override
public int getSizeInventory() {
return this.furnaceItemStacks.length;
}

@Override
public ItemStack getStackInSlot(int slot) {
return this.furnaceItemStacks[slot];

}

@Override
public ItemStack decrStackSize(int par1, int par2) {
if(this.furnaceItemStacks[par1] != null){
ItemStack itemstack;
if(this.furnaceItemStacks[par1].stackSize <= par2){
itemstack = this.furnaceItemStacks[par1];
this.furnaceItemStacks[par1] = null;
return itemstack;
}else{
itemstack = this.furnaceItemStacks[par1].splitStack(par2);

if(this.furnaceItemStacks[par1].stackSize == 0){
this.furnaceItemStacks[par1] = null;
}

return itemstack;
}
} else {
return null;
}
}

@Override
public ItemStack getStackInSlotOnClosing(int slot) {
if(this.furnaceItemStacks[slot] != null){
ItemStack itemstack = this.furnaceItemStacks[slot];
this.furnaceItemStacks[slot] = null;
return itemstack;
}else{
return null;
}
}

@Override
public void setInventorySlotContents(int slot, ItemStack itemstack) {
this.furnaceItemStacks[slot] = itemstack;

if(itemstack != null && itemstack.stackSize > this.getInventoryStackLimit()){
itemstack.stackSize = this.getInventoryStackLimit();
}
}

@Override
public String getInventoryName() {
return this.hasCustomInventoryName() ? this.furnaceName : "Oven";

}

@Override
public boolean hasCustomInventoryName() {
return this.furnaceName != null && this.furnaceName.length() > 0;

}

@Override
public int getInventoryStackLimit() {
return 64;

}

public void readFromNBT(NBTTagCompound tagCompound) {
super.readFromNBT(tagCompound);
NBTTagList tagList = tagCompound.getTagList("Items", 10);
this.furnaceItemStacks = new ItemStack[this.getSizeInventory()];

for(int i = 0; i < tagList.tagCount(); ++i){
NBTTagCompound tagCompound1 = tagList.getCompoundTagAt(i);
byte byte0 = tagCompound1.getByte("Slot");

if(byte0 >= 0 && byte0 < this.furnaceItemStacks.length){
this.furnaceItemStacks[byte0] = ItemStack.loadItemStackFromNBT(tagCompound1);
}
}

this.furnaceBurnTime = tagCompound.getShort("BurnTime");
this.furnaceCookTime = tagCompound.getShort("CookTime");
this.currentBurnTime = getItemBurnTime(this.furnaceItemStacks[1]);

if(tagCompound.hasKey("CustomName", 8)){
this.furnaceName = tagCompound.getString("CustomName");
}
}

public void writeToNBT(NBTTagCompound tagCompound) {
super.writeToNBT(tagCompound);

tagCompound.setShort("BurnTime", (short) this.furnaceBurnTime);
tagCompound.setShort("CookTime", (short) this.furnaceBurnTime);
NBTTagList tagList = new NBTTagList();

for(int i = 0; i < this.furnaceItemStacks.length; ++i){
if(this.furnaceItemStacks[i] != null){
NBTTagCompound tagCompound1 = new NBTTagCompound();
tagCompound1.setByte("Slot", (byte) i);
this.furnaceItemStacks[i].writeToNBT(tagCompound1);
tagList.appendTag(tagCompound1);
}
}

tagCompound.setTag("Items", tagList);

if(this.hasCustomInventoryName()){
tagCompound.setString("CustomName", this.furnaceName);
}
}

@SideOnly(Side.CLIENT)
public int getCookProgressScaled(int par1) {
return this.furnaceCookTime * par1 / 200;
}

@SideOnly(Side.CLIENT)
public int getBurnTimeRemainingScaled(int par1) {
if(this.currentBurnTime == 0){
this.currentBurnTime = 200;
}

return this.furnaceBurnTime * par1 / this.currentBurnTime;
}

public boolean isBurning() {
return this.furnaceBurnTime > 0;
}

public void updateEntity() {
boolean flag = this.furnaceBurnTime > 0;
boolean flag1 = false;

if(this.furnaceBurnTime > 0){
--this.furnaceBurnTime;
}

if(!this.worldObj.isRemote){
if(this.furnaceBurnTime == 0 && this.canSmelt()){
this.currentBurnTime = this.furnaceBurnTime = getItemBurnTime(this.furnaceItemStacks[1]);

if(this.furnaceBurnTime > 0){
flag1 = true;
if(this.furnaceItemStacks[1] != null){
--this.furnaceItemStacks[1].stackSize;
if(this.furnaceItemStacks[1].stackSize == 0){
this.furnaceItemStacks[1] = furnaceItemStacks[1].getItem().getContainerItem(this.furnaceItemStacks[1]);
}
}
}
}

if(this.isBurning() && this.canSmelt()){
++this.furnaceCookTime;
if(this.furnaceCookTime == 200){
this.furnaceCookTime = 0;
this.smeltItem();
flag1 = true;
}
}else{
this.furnaceCookTime = 0;
}
}

if(flag != this.furnaceBurnTime > 0){
flag1 = true;
Oven.updateBlockState(this.furnaceBurnTime > 0, this.worldObj, this.xCoord, this.yCoord, this.zCoord);
}

if(flag1 == true){
this.markDirty();
}
}

private boolean canSmelt() {
if(this.furnaceItemStacks[0] == null){
return false;
}else{
ItemStack itemstack = FurnaceRecipes.smelting().getSmeltingResult(this.furnaceItemStacks[0]);
if(itemstack == null) return false;
if(this.furnaceItemStacks[2] == null) return true;
if(!this.furnaceItemStacks[2].isItemEqual(itemstack)) return false;
int result = furnaceItemStacks[2].stackSize + itemstack.stackSize;
return result <= getInventoryStackLimit() && result <= this.furnaceItemStacks[2].getMaxStackSize();
}
}

public void smeltItem() {
if(this.canSmelt()){
ItemStack itemstack = FurnaceRecipes.smelting().getSmeltingResult(this.furnaceItemStacks[0]);

if(this.furnaceItemStacks[2] == null){
this.furnaceItemStacks[2] = itemstack.copy();
}else if(this.furnaceItemStacks[2].getItem() == itemstack.getItem()){
this.furnaceItemStacks[2].stackSize += itemstack.stackSize;
}
}
}

public static int getItemBurnTime(ItemStack itemstack){
if(itemstack == null){
return 0;
}else{
Item item = itemstack.getItem();

if(item instanceof ItemBlock && Block.getBlockFromItem(item) != Blocks.air){
Block block = Block.getBlockFromItem(item);

if(block == Blocks.wooden_slab){
return 150;
}

if(block.getMaterial() == Material.wood){
return 300;
}

if(block == Blocks.coal_block){
return 16000;
}
}

if(item == Items.stick) return 100;
if(item == Items.coal) return 1600;
if(item == Items.lava_bucket) return 20000;
if(item == Item.getItemFromBlock(Blocks.sapling)) return 100;
if(item == Items.blaze_rod) return 2400;
return GameRegistry.getFuelValue(itemstack);
}
}

public static boolean isItemFuel(ItemStack itemstack){
return getItemBurnTime(itemstack) > 0;
}

@Override
public boolean isUseableByPlayer(EntityPlayer player) {
return this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : player.getDistanceSq((double) this.xCoord + 0.5D, (double) this.yCoord + 0.5D, (double) this.zCoord + 0.5D) <= 64.0D;
}

@Override
public void openInventory() {

}

@Override
public void closeInventory() {

}

@Override
public boolean isItemValidForSlot(int par1, ItemStack itemstack) {
return par1 == 2 ? false : (par1 == 1 ? isItemFuel(itemstack): true);
}

@Override
public int[] getAccessibleSlotsFromSide(int par1) {
return par1 == 0 ? slotsBottom : (par1 == 1 ? slotsTop : slotsSides);
}

@Override
public boolean canInsertItem(int par1, ItemStack itemstack, int par3) {
return this.isItemValidForSlot(par1, itemstack);
}

@Override
public boolean canExtractItem(int par1, ItemStack itemstack, int par3) {
return par3 != 0 || par1 != 1 || itemstack.getItem() == Items.bucket;
}

}[/spoiler]

MFGuiHandler.java
[spoiler]package com.plumppuffypig.morefood.handler;

import com.plumppuffypig.morefood.TileEntityOven;
import com.plumppuffypig.morefood.gui.GuiOven;
import com.plumppuffypig.morefood.inventory.ContainerOven;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import cpw.mods.fml.common.network.IGuiHandler;

public class MFGuiHandler implements IGuiHandler {

public MFGuiHandler(){

}

@Override
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
if(ID == 0){
TileEntityOven tileEntityFurnace = (TileEntityOven) world.getTileEntity(x, y, z);
return new ContainerOven(player.inventory, tileEntityFurnace);
}
return null;
}

@Override
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
if(ID == 0){
TileEntityOven tileEntityTestContainer = (TileEntityOven) world.getTileEntity(x, y, z);
return new GuiOven(player.inventory, tileEntityTestContainer);
}
return null;
}

}[/spoiler]

GuiOven
[spoiler]package com.plumppuffypig.morefood.gui;

import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;

import org.lwjgl.opengl.GL11;

import com.plumppuffypig.morefood.TileEntityOven;
import com.plumppuffypig.morefood.inventory.ContainerOven;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

@SideOnly(Side.CLIENT)
public class GuiOven extends GuiContainer{
private static final ResourceLocation OvenGuiTextures = new ResourceLocation("textures/gui/container/Oven.png");
private TileEntityOven tileOven;

public GuiOven(InventoryPlayer invPlayer, TileEntityOven tile) {
super(new ContainerOven(invPlayer, tile));
this.tileOven = tile;

}

protected void drawGuiContainerForegroundLayer(int par1, int par2){
String string = this.tileOven.hasCustomInventoryName() ? this.tileOven.getInventoryName() : I18n.format(this.tileOven.getInventoryName(), new Object[0]);
this.fontRendererObj.drawString(string, this.xSize / 2 - this.fontRendererObj.getStringWidth(string), 6, 4210752);
this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 94, 4210752);
}

@Override
protected void drawGuiContainerBackgroundLayer(float var1, int var2, int var3) {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
this.mc.getTextureManager().bindTexture(OvenGuiTextures);
int k = (this.width - this.xSize) / 2;
int l = (this.height - this.ySize) / 2;
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
int i1;

if (this.tileOven.isBurning())
{
i1 = this.tileOven.getBurnTimeRemainingScaled(12);
this.drawTexturedModalRect(k + 56, l + 36 + 12 - i1, 176, 12 - i1, 14, i1 + 2);
}

i1 = this.tileOven.getCookProgressScaled(24);
this.drawTexturedModalRect(k + 79, l + 34, 176, 14, i1 + 1, 16);
}
}[/spoiler]

ContainerOven.java
[spoiler]package com.plumppuffypig.morefood.inventory;

import com.plumppuffypig.morefood.TileEntityOven;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.ICrafting;
import net.minecraft.inventory.Slot;
import net.minecraft.inventory.SlotFurnace;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.FurnaceRecipes;

public class ContainerOven extends Container{


private TileEntityOven tileOven;
private int lastCookTime;
private int lastBurnTime;
private int lastItemBurnTime;

public ContainerOven(InventoryPlayer player, TileEntityOven tileEntityFurnace){
this.tileOven = tileEntityFurnace;
this.addSlotToContainer(new Slot(tileEntityFurnace, 0, 56, 17));
this.addSlotToContainer(new Slot(tileEntityFurnace, 1, 56, 53));
this.addSlotToContainer(new SlotFurnace(player.player, tileEntityFurnace, 2, 116, 35));
int i;

for(i = 0; i < 3; ++i){
for(int j = 0; j < 9; ++j){
this.addSlotToContainer(new Slot(player, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
}
}

for(i = 0; i < 9; ++i){
this.addSlotToContainer(new Slot(player, i , 8 + i * 18 , 142));
}
}

public void addCraftingToCrafters(ICrafting craft){
super.addCraftingToCrafters(craft);
craft.sendProgressBarUpdate(this, 0, this.tileOven.furnaceCookTime);
craft.sendProgressBarUpdate(this, 1, this.tileOven.furnaceBurnTime);
craft.sendProgressBarUpdate(this, 2, this.tileOven.currentBurnTime);
}

public void detectAndSendChanges(){
super.detectAndSendChanges();
for(int i = 0; i < this.crafters.size(); ++i){
ICrafting craft = (ICrafting) this.crafters.get(i);

if(this.lastCookTime != this.tileOven.furnaceCookTime){
craft.sendProgressBarUpdate(this, 0, this.tileOven.furnaceCookTime);
}

if(this.lastBurnTime != this.tileOven.furnaceBurnTime){
craft.sendProgressBarUpdate(this, 1, this.tileOven.furnaceBurnTime);
}

if(this.lastItemBurnTime != this.tileOven.currentBurnTime){
craft.sendProgressBarUpdate(this, 2, this.tileOven.currentBurnTime);
}
}

this.lastBurnTime = this.tileOven.furnaceBurnTime;
this.lastCookTime = this.tileOven.furnaceCookTime;
this.lastItemBurnTime = this.tileOven.currentBurnTime;
}

@SideOnly(Side.CLIENT)
public void updateProgressBar(int par1, int par2){
if(par1 == 0){
this.tileOven.furnaceCookTime = par2;
}

if(par1 == 1){
this.tileOven.furnaceBurnTime = par2;
}

if(par1 == 2){
this.tileOven.currentBurnTime = par2;
}
}

@Override
public boolean canInteractWith(EntityPlayer player) {
return this.tileOven.isUseableByPlayer(player);
}

public ItemStack transferStackInSlot(EntityPlayer player, int par2){
ItemStack itemstack = null;
Slot slot = (Slot) this.inventorySlots.get(par2);

if(slot != null && slot.getHasStack()){
ItemStack itemstack1 = slot.getStack();
itemstack = itemstack1.copy();

if(par2 == 2){
if(!this.mergeItemStack(itemstack1, 3, 39, true)){
return null;
}
slot.onSlotChange(itemstack1, itemstack);
}else if(par2 != 1 && par2 != 0){
if(FurnaceRecipes.smelting().getSmeltingResult(itemstack1) != null){
if(!this.mergeItemStack(itemstack1, 0, 1, false)){
return null;
}
}else if(TileEntityOven.isItemFuel(itemstack1)){
if(!this.mergeItemStack(itemstack1, 1, 2, false)){
return null;
}
}else if(par2 >=3 && par2 < 30){
if(!this.mergeItemStack(itemstack1, 30, 39, false)){
return null;
}
}else if(par2 >= 30 && par2 < 39 && !this.mergeItemStack(itemstack1, 3, 30, false)){
return null;
}
}else if(!this.mergeItemStack(itemstack1, 3, 39, false)){
return null;
}
if(itemstack1.stackSize == 0){
slot.putStack((ItemStack)null);
}else{
slot.onSlotChanged();
}
if(itemstack1.stackSize == itemstack.stackSize){
return null;
}
slot.onPickupFromSlot(player, itemstack1);
}
return itemstack;
}

}[/spoiler]
Posted by plumppuffypig's Avatar
plumppuffypig
Level 3 : Apprentice Explorer
9

Create an account or sign in to comment.

3

1
10/05/2014 9:06 am
Level 66 : High Grandmaster Modder
duke_Frans
duke_Frans's Avatar
java.lang.NullPointerException: Rendering screen
at com.plumppuffypig.morefood.gui.GuiOven.drawGuiContainerBackgroundLayer(GuiOven.java:42)

Something is wrong in this file
1
10/04/2014 6:33 pm
Level 54 : Grandmaster Modder
Eria8
Eria8's Avatar
I suggest learning Forge...
If you used a tutorial it was a pretty bad one or you skipped a lot.
Just a quick glance at your main class and you don't have any proxies or even an ID for the GUI.
1
10/04/2014 6:09 pm
Level 7 : Apprentice Pig
sso2
sso2's Avatar
mabey you should recustomize the furnace. Ive never made a mod before but just a thought.
I hope this helps
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome