File tree Expand file tree Collapse file tree
src/main/java/appeng/helpers/patternprovider Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -747,24 +747,29 @@ public PatternContainerGroup getTerminalGroup() {
747747 return groups .iterator ().next ();
748748 }
749749
750+ // If nothing is adjacent, just use itself
751+ var icon = this .host .getTerminalIcon ();
750752 List <Component > tooltip = List .of ();
751753 // If there are multiple groups, show that in the tooltip
752754 if (groups .size () > 1 ) {
753755 tooltip = new ArrayList <>();
754756 tooltip .add (GuiText .AdjacentToDifferentMachines .text ().withStyle (ChatFormatting .BOLD ));
757+ // If all groups share the same icon use that
758+ icon = groups .getFirst ().icon ();
755759 for (var group : groups ) {
760+ if (!icon .getId ().equals (group .icon ().getId ())) {
761+ icon = this .host .getTerminalIcon ();
762+ }
756763 tooltip .add (group .name ());
757764 for (var line : group .tooltip ()) {
758765 tooltip .add (Component .literal (" " ).append (line ));
759766 }
760767 }
761768 }
762769
763- // If nothing is adjacent, just use itself
764- var hostIcon = this .host .getTerminalIcon ();
765770 return new PatternContainerGroup (
766- hostIcon ,
767- hostIcon .getDisplayName (),
771+ icon ,
772+ icon .getDisplayName (),
768773 tooltip );
769774 }
770775
You can’t perform that action at this time.
0 commit comments