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

Hi there!

 

I'm currently working on a mod and am having a bit of trouble with something. I'm adding the ability for signs to be edited just by right clicking (in the future I'll be using a specific item with right click to edit, but this doesn't matter). I've got the function to open the GUI sign editor and I can edit the sign fine in singleplayer. The problem is, on my multiplayer server, when I right click and edit the sign, the sign goes back to its original value. Is there a way to fix this? Would I have to have a mod on the server to handle this or is there a way to just take care of this only on the client.

I've looked around all over the place, but can't seem to find anything about this

Appreciate some guidance, cheers :)

  • Author
13 minutes ago, diesieben07 said:

Signs cannot be updated once they are placed. You have to specifically allow it server side. So yes, you need a server portion of the mod.

Huh I see, so would it be best to create the sign myself then with text preset?

  • Author
7 minutes ago, diesieben07 said:

Not sure what you mean by this exactly. What I mean is that you cannot do this with a purely client side mod. A server side mod can obviously edit the sign.

Yeah I understand that. Disregarding editing the sign, since I'd have to do stuff on the server side, could I instead just create a sign and assign text to it?

I'm basically trying to have sign templates. At this point, I'd want it to work in the sense a player has a sign in their hand, if they place the sign, it'll automatically set the text that way. Would this work since it's creating and not editing?

  • Author
6 minutes ago, diesieben07 said:

I guess you could do that client-side, yes. You'd have to detect the sign editing GUI popping up and then send out the packet that is sent when the player finishes setting the text.

Ah cool, sounds like it would work. Apologies for the follow-up question, but how would one detect the sign editing GUI popping up? I know there's currentScreen but not sure if that's applicable in this case, just skimming through some examples online of that usage

 

Edited by smokyb00

  • Author
16 minutes ago, diesieben07 said:

GuiOpenEvent

Woops, thanks! Can detect the Edit Sign GUI fine, I guess to store this in a variable, I'd do something like this?

GuiEditSign sign = (GuiEditSign) openGuiEvent.getGui();

 

  • Author
17 minutes ago, Luis_ST said:

yes, if you check before whether the Gui is an instance of GuiEditSign

Yeah sorry that's what I meant by detecting the Edit GUI sign, doing an if instanceof statement. I don't understand how the text would be set though, would I just replicate a Keyboard judging by the GuiEditSign class? I know with a tile sign, you have signText or something along those lines, but I guess with the GUI, it's a bit different?

  • Author
4 minutes ago, diesieben07 said:

GuiEditSign is not a class. What version are you using?

Sorry should have stated this from before, using 1.12.2 - going to be doing this on the latest version but just modifying an old mod of mine to understand this before upgrading my mod completely

Guest
This topic is now closed to further replies.

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.