Posted August 18, 201312 yr I tried making a furnace in 1.6.2 and in the Block class for the furnace I get an error on the .displayGUIFurnace because there is no method like that for my furnace in the entityplayer class. public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) { if (par1World.isRemote) { return true; } else { TileEntityVoidFurnace tileEntityVoidFurnace = (TileEntityVoidFurnace)par1World.getBlockTileEntity(par2, par3, par4); if (tileEntityVoidFurnace != null) { par5EntityPlayer.displayGUIFurnace(tileEntityVoidFurnace); } return true; } } If I change it to TileEntityFurnace and I right click on my furnace in game, the game crashes. The error is in the block furnace exactly on that GUIfurnace line. ---- Minecraft Crash Report ---- Time: 8/18/13 1:31 PM Description: Ticking memory connection java.lang.ClassCastException: magicelements.furnace.TileEntityVoidFurnace cannot be cast to net.minecraft.tileentity.TileEntityFurnace at magicelements.furnace.BlockVoidFurnace.onBlockActivated(BlockVoidFurnace.java:111) at net.minecraft.item.ItemInWorldManager.activateBlockOrUseItem(ItemInWorldManager.java:416) at net.minecraft.network.NetServerHandler.handlePlace(NetServerHandler.java:554) at net.minecraft.network.packet.Packet15Place.processPacket(Packet15Place.java:79) at net.minecraft.network.MemoryConnection.processReadPackets(MemoryConnection.java:89) at net.minecraft.network.NetServerHandler.networkTick(NetServerHandler.java:141) at net.minecraft.network.NetworkListenThread.networkTick(NetworkListenThread.java:54) at net.minecraft.server.integrated.IntegratedServerListenThread.networkTick(IntegratedServerListenThread.java:109) at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:689) at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:585) at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:129) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:482) at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at magicelements.furnace.BlockVoidFurnace.onBlockActivated(BlockVoidFurnace.java:111) at net.minecraft.item.ItemInWorldManager.activateBlockOrUseItem(ItemInWorldManager.java:416) at net.minecraft.network.NetServerHandler.handlePlace(NetServerHandler.java:554) at net.minecraft.network.packet.Packet15Place.processPacket(Packet15Place.java:79) at net.minecraft.network.MemoryConnection.processReadPackets(MemoryConnection.java:89) at net.minecraft.network.NetServerHandler.networkTick(NetServerHandler.java:141) -- Ticking connection -- Details: Connection: net.minecraft.network.NetServerHandler@79220f71 Stacktrace: at net.minecraft.network.NetworkListenThread.networkTick(NetworkListenThread.java:54) at net.minecraft.server.integrated.IntegratedServerListenThread.networkTick(IntegratedServerListenThread.java:109) at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:689) at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:585) at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:129) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:482) at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16) i can't figure out how to fix that GUI thing.
August 18, 201312 yr You need to use the openGUI thingy. Not sure of it's proper name but I think that's it. Anyways for this you will need to be a @NetworkMod and you will need a GUI handler. As you are unfamiliar with GUI's I recommend courses.vswe.se these courses which introduces you to the basics before storming into GUI's and rather advance GUI's as well by the end. You will be quite familiar with both GUI's, Java and TileEntities If you guys dont get it.. then well ya.. try harder...
August 18, 201312 yr Thanks Ill start reading If you encounter any problems are are having trouble with the assignments then feel free to yell out on the boards of that site. Me and others (including vswe himself) do try to help out and reply as often as we can Good luck to you If you guys dont get it.. then well ya.. try harder...
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.