@@ -181,20 +181,19 @@ public String[] getSignText()
181181 }
182182 }
183183
184- // If we already captured a template from the first edited sign while
185- // the
186- // hack is enabled, use that for subsequent signs.
187- if (signText != null )
188- return signText ;
189-
190- // Otherwise fall back to the persisted preset, if any.
191- String preset = presetText .getValue ();
192- if (preset == null || preset .isEmpty ())
193- return null ;
194-
195- String [] wrapped = wrapToSign (preset );
196- return wrapped == null ? null : wrapped ;
197- }
184+ // Next, prefer the persisted preset text from the GUI text box.
185+ // This lets text changes apply immediately without toggling the hack.
186+ String preset = presetText .getValue ();
187+ if (preset == null || preset .isEmpty ())
188+ {
189+ // If no preset text is configured, use the first manually edited
190+ // sign as a temporary template while the hack stays enabled.
191+ return signText ;
192+ }
193+
194+ String [] wrapped = wrapToSign (preset );
195+ return wrapped == null ? null : wrapped ;
196+ }
198197
199198 public void setSignText (String [] signText )
200199 {
@@ -407,7 +406,7 @@ public void onUpdate()
407406 }
408407
409408 String [] oldText = readSign (signEntity );
410- if (linesMatch ( oldText , newText ))
409+ if (signHasDesiredText ( signEntity , newText ))
411410 {
412411 auraTimer = Math .max (1 , auraDelay .getValueI ());
413412 return ;
@@ -481,6 +480,19 @@ private boolean linesMatch(String[] current, String[] desired)
481480 return true ;
482481 }
483482
483+ private boolean signHasDesiredText (SignBlockEntity sign , String [] desired )
484+ {
485+ if (sign == null || desired == null )
486+ return false ;
487+
488+ String [] front = readSign (sign .getFrontText ());
489+ if (linesMatch (front , desired ))
490+ return true ;
491+
492+ String [] back = readSign (sign .getBackText ());
493+ return linesMatch (back , desired );
494+ }
495+
484496 private boolean canUseHandNoClip ()
485497 {
486498 if (!auraThroughWalls .isChecked ())
@@ -492,15 +504,15 @@ private boolean canUseHandNoClip()
492504
493505 private String [] readSign (SignBlockEntity sign )
494506 {
495- String [] lines = new String [MAX_LINES ];
496507 if (sign == null )
497- {
498- for (int i = 0 ; i < MAX_LINES ; i ++)
499- lines [i ] = "" ;
500- return lines ;
501- }
508+ return readSign ((SignText )null );
502509
503- SignText signText = sign .getFrontText ();
510+ return readSign (sign .getFrontText ());
511+ }
512+
513+ private String [] readSign (SignText signText )
514+ {
515+ String [] lines = new String [MAX_LINES ];
504516 for (int i = 0 ; i < MAX_LINES ; i ++)
505517 {
506518 net .minecraft .network .chat .Component component =
0 commit comments