Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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.

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...

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.

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.