@@ -46,6 +46,7 @@ public CustomChestField(TextRenderer textRender, int x, int y, int width, int he
4646 text .setMaxLength (10000 );
4747 text .setText (named .getName ());
4848 text .setFocused (false );
49+ text .setCursorToStart (false );
4950 widgets .add (0 ,text );
5051 }
5152 if (item instanceof GameValue value ) {
@@ -77,6 +78,7 @@ public CustomChestField(TextRenderer textRender, int x, int y, int width, int he
7778 var field = new NumberFieldWidget (textRender ,x + (textboxWidth * i ),y ,textboxWidth ,height ,Text .literal ("" ));
7879 field .setMaxLength (10 );
7980 field .setNumber (values [i ]);
81+ field .setCursorToStart (false );
8082 widgets .add (field );
8183 }
8284 }
@@ -88,6 +90,7 @@ public CustomChestField(TextRenderer textRender, int x, int y, int width, int he
8890 field .setMaxLength (10 );
8991 field .setNumber (values [i ]);
9092 field .setCursorToStart (false );
93+ field .setCursorToStart (false );
9194 widgets .add (field );
9295 }
9396 }
@@ -97,12 +100,15 @@ public CustomChestField(TextRenderer textRender, int x, int y, int width, int he
97100 int textboxWidth = width - durationWidth - potencyWidth ;
98101 var text = new TextFieldWidget (textRender ,x ,y ,textboxWidth ,height ,Text .literal ("" ));
99102 text .setText (pot .getPotion ());
103+ text .setCursorToStart (false );
100104 widgets .add (text );
101105 var potency = new NumberFieldWidget (textRender ,x +textboxWidth ,y ,potencyWidth ,height ,Text .empty ()).integer ().min (-255 ).max (255 );
102106 potency .setNumber (pot .getAmplifier () + 1 );
107+ potency .setCursorToStart (false );
103108 widgets .add (potency );
104109 var duration = new TextFieldWidget (textRender ,x +textboxWidth +potencyWidth ,y ,durationWidth ,height ,Text .empty ());
105110 duration .setText (pot .duration ().replaceAll (" ticks" ,"" ));
111+ duration .setCursorToStart (false );
106112 widgets .add (duration );
107113 }
108114 if (item instanceof Sound sound ) {
@@ -111,12 +117,15 @@ public CustomChestField(TextRenderer textRender, int x, int y, int width, int he
111117 int textboxWidth = width - volumeWidth - pitchWidth ;
112118 var text = new TextFieldWidget (textRender ,x ,y ,textboxWidth ,height ,Text .literal ("" ));
113119 text .setText (sound .getSound ());
120+ text .setCursorToStart (false );
114121 widgets .add (text );
115122 var volume = new NumberFieldWidget (textRender ,x +textboxWidth ,y ,volumeWidth ,height ,Text .empty ()).min (0 );
116123 volume .setNumber (sound .getVolume ());
124+ volume .setCursorToStart (false );
117125 widgets .add (volume );
118126 var pitch = new NumberFieldWidget (textRender ,x +textboxWidth +volumeWidth ,y ,pitchWidth ,height ,Text .empty ()).min (0 ).max (2 );
119127 pitch .setNumber (sound .getPitch ());
128+ pitch .setCursorToStart (false );
120129 widgets .add (pitch );
121130 }
122131 if (item instanceof BlockTag tag ) {
0 commit comments