Jump to content

Help with SMP guis


happyPenguin

Recommended Posts

As guis for servers have changed so many times I'm getting very confused to how I can get my stove to work again on smp and wondering if anyone is kind enough to give a brother a hand :)

 

On the server Im guessing i need to return the cooker container but Im tiny bit lost to how i would do this  :-[

 

Client Mod_Cooker

 



public class mod_Cooker extends NetworkMod implements IGuiHandler
{	

public void load()
{
MinecraftForge.setGuiHandler(this, this);
}

public Object getGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) 
{
	System.out.println("Test Gui1");
	if (ID == 1)//Cooker 1
	{
		ModLoader.getMinecraftInstance().displayGuiScreen(new GuiCooker(player.inventory, (TileEntityCooker)player.worldObj.getBlockTileEntity(x, y, z)));
	}
	return null;
}
}

 

Server BlockCooker

 


public static mod_Cooker instance;

public boolean blockActivated(World world, int i, int j, int k, EntityPlayer entityplayer)
    {
        if(world.isRemote)
        {
            return true;
        } else
        {
            entityplayer.openGui(instance, 1, world,i, j, k );
            
            return true;
        }
    }
            

 

Link to comment
Share on other sites

Im an idiot, didn't notice i added that in :/ copied the returns from modloaderMp

 

I didn't want to make another topic but I'm not sure why Im randomly getting a checksum has no scope error at the moment.

 

Both version of my mods are bringing this error up when the config is loaded but was working fine few days ago when I write the config using forge :/

 

I can post the code if it helps but the codes matches the tutorial code part from the extra hundreds of blocks and items

 

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.



×
×
  • Create New...

Important Information

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