Jump to content

Recommended Posts

Posted

Hi Guys!

 

I want to create a Gui for a new Sign, which is shown when te sign is placed, but it won't work.

I don't really know why and I need some help..

 

My Code:

 

  Reveal hidden contents

 

 

I hope, anybody knows, which mistake I made.

 

Thanks in Advance!

 

Posted
  On 9/21/2013 at 10:22 AM, SenpaiSubaraki said:

dont return null on server side. you want to add your tileentity there, or a container.

sign gui's are bound to their TE and edit strings from the TE to show the message.

For a strictly client side GUI that shouldnt be necessary. Its probably not working because the vanilla sign GUI notices that it doesnt have a container.

Posted

You seriously need to do something here

public void onGuiClosed()
    {
    	//TODO: Need to be edited! 
    	/*
        Keyboard.enableRepeatEvents(false);
        NetClientHandler netclienthandler = this.mc.getNetHandler();

        if (netclienthandler != null)
        {
            netclienthandler.addToSendQueue(new Packet130UpdateSign(this.entitySign.xCoord, this.entitySign.yCoord, this.entitySign.zCoord, this.entitySign.signText));
        }

        this.entitySign.setEditable(true); */
    }

Posted

I don't limit the Call to the server side..

 

I do it like this:

 

 public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10)
    {
      [...]
                par2EntityPlayer.openGui(Main.instance, 0, par3World, par4, par5, par6);

                return true;
            }
        }
    }

 

And I don't know, which container to use, because I actually don't have one

Posted

I added

System.out.println(par3World.isRemote);

And it only prints out false on server side and nothing on client side.

I got the same problem in another project: http://www.minecraftforge.net/forum/index.php/topic,12543.0.html

Have I done something wrong in the Initialisation of the Mod?

 

  Reveal hidden contents

 

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.