@@ -88,11 +88,12 @@ private static MineTaleRecipeBookComponent createRecipeBookComponent(ArmorersWor
8888 }
8989
9090 /**
91- * Initialises the screen size and adds the three crafting buttons.
91+ * Initialises the screen size and creates three crafting buttons.
9292 *
93- * Sets the GUI image dimensions, delegates further initialisation to the superclass,
94- * and creates/registers three buttons wired to craft one, ten or all items
95- * (they invoke handleCraftRequest with 1, 10 and -1 respectively; -1 signifies "All").
93+ * Sets the GUI image dimensions, performs superclass initialisation, and adds
94+ * three buttons that request crafting of 1, 10 or all items. Each button calls
95+ * {@code handleCraftRequest} with arguments 1, 10 and -1 respectively; -1
96+ * signifies "craft all".
9697 */
9798 @ Override
9899 protected void init () {
@@ -105,15 +106,15 @@ protected void init() {
105106 int defaultLeft = this .leftPos + 90 ;
106107 int defaultTop = this .topPos + 25 ;
107108
108- this .craftOneBtn = addRenderableWidget (Button .builder (Component .literal ( "Craft " ), (button ) -> {
109+ this .craftOneBtn = addRenderableWidget (Button .builder (Component .translatable ( "gui.minetale.craftbtn " ), (button ) -> {
109110 handleCraftRequest (1 );
110111 }).bounds (defaultLeft , defaultTop , 75 , 20 ).build ());
111112
112113 this .craftTenBtn = addRenderableWidget (Button .builder (Component .literal ("x10" ), (button ) -> {
113114 handleCraftRequest (10 );
114115 }).bounds (defaultLeft , defaultTop + 22 , 35 , 20 ).build ());
115116
116- this .craftAllBtn = addRenderableWidget (Button .builder (Component .literal ( "All " ), (button ) -> {
117+ this .craftAllBtn = addRenderableWidget (Button .builder (Component .translatable ( "gui.minetale.allbtn " ), (button ) -> {
117118 handleCraftRequest (-1 ); // -1 represents "All" logic
118119 }).bounds (defaultLeft + 40 , defaultTop + 22 , 35 , 20 ).build ());
119120 }
0 commit comments