File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
src/main/java/com/portingdeadmods/researchd/client/screens/lines Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -63,8 +63,10 @@ public static UniqueArray<ResearchHead> inputsOf(ResearchNode node) {
6363 int parentCount = node .getParents ().size ();
6464 int width = ResearchScreenWidget .PANEL_WIDTH ; // Node width
6565
66- // If no parents or just one, create a centered head
67- if (parentCount == 0 || parentCount == 1 ) {
66+ if (parentCount == 0 ) return positions ;
67+
68+ // If one, create a centered head
69+ if (parentCount == 1 ) {
6870 int x = node .getX () + width / 2 ;
6971 int y = node .getY ();
7072 positions .add (new ResearchHead (x , y , true ));
@@ -91,8 +93,10 @@ public static UniqueArray<ResearchHead> outputsOf(ResearchNode node) {
9193 int childCount = node .getChildren ().size ();
9294 int width = ResearchScreenWidget .PANEL_WIDTH ; // Node width
9395
94- // If no children or just one, create a centered head
95- if (childCount == 0 || childCount == 1 ) {
96+ if (childCount == 0 ) return positions ;
97+
98+ // If one, create a centered head
99+ if (childCount == 1 ) {
96100 int x = node .getX () + width / 2 ;
97101 int y = node .getY () + ResearchScreenWidget .PANEL_HEIGHT - 1 ;
98102 positions .add (new ResearchHead (x , y , false ));
You can’t perform that action at this time.
0 commit comments