@@ -52,10 +52,12 @@ protected void init() {
5252 button .active = value != tab ;
5353 }
5454 JsonObject placement = session .biomePlacement (dimension , biomeId );
55- addRenderableWidget (CycleButton .onOffBuilder (bool (placement , "enabled" , true ))
56- .create (left , 64 , contentWidth , 20 ,
55+ addRenderableWidget (OreSpawnScreenLayout .explain (
56+ CycleButton .onOffBuilder (bool (placement , "enabled" , true )).create (
57+ left , 64 , contentWidth , 20 ,
5758 Component .translatable ("option.orespawn.enabled" ),
58- (button , value ) -> placement .addProperty ("enabled" , value )));
59+ (button , value ) -> placement .addProperty ("enabled" , value )),
60+ "guide.orespawn.biomes.1" ));
5961 if (tab == Tab .PLACEMENT ) initPlacement (left , half , placement );
6062 else if (tab == Tab .CLIMATE ) initClimate (left , half , placement );
6163 else initSurface (left , contentWidth , placement );
@@ -71,36 +73,45 @@ protected void init() {
7173 private void initPlacement (int left , int half , JsonObject placement ) {
7274 int y = 90 ;
7375 weight = field (left + half + 5 , y , half , decimal (placement , "weight" , 1.0D ));
76+ OreSpawnScreenLayout .explain (weight , "guide.orespawn.biomes.3" );
7477 label (left , y + 6 , half , "option.orespawn.weight" );
7578 y += 28 ;
76- addRenderableWidget (OreSpawnScreenLayout .button (this , font , left , y , half , 20 ,
79+ addRenderableWidget (OreSpawnScreenLayout .explain (OreSpawnScreenLayout .button (
80+ this , font , left , y , half , 20 ,
7781 Component .translatable ("button.orespawn.similar_biomes" ,
7882 array (placement , "similar_biomes" ).size ()),
7983 button -> { saveFields (); minecraft .setScreen (new BiomeReferenceScreen (
80- this , session , placement , "similar_biomes" )); }));
81- addRenderableWidget (OreSpawnScreenLayout .button (this , font , left + half + 5 , y ,
84+ this , session , placement , "similar_biomes" )); }),
85+ "guide.orespawn.biomes.3" ));
86+ addRenderableWidget (OreSpawnScreenLayout .explain (OreSpawnScreenLayout .button (
87+ this , font , left + half + 5 , y ,
8288 half , 20 , Component .translatable ("button.orespawn.required_biomes" ,
8389 array (placement , "required_similar_biomes" ).size ()),
8490 button -> { saveFields (); minecraft .setScreen (new BiomeReferenceScreen (
85- this , session , placement , "required_similar_biomes" )); }));
91+ this , session , placement , "required_similar_biomes" )); }),
92+ "guide.orespawn.biomes.3" ));
8693 }
8794
8895 private void initClimate (int left , int half , JsonObject placement ) {
8996 int y = 90 ;
9097 minTemperature = field (left + half + 5 , y , half ,
9198 decimal (placement , "min_temperature" , -2.0D ));
99+ OreSpawnScreenLayout .explain (minTemperature , "guide.orespawn.biomes.3" );
92100 label (left , y + 6 , half , "option.orespawn.min_temperature" );
93101 y += 24 ;
94102 maxTemperature = field (left + half + 5 , y , half ,
95103 decimal (placement , "max_temperature" , 2.0D ));
104+ OreSpawnScreenLayout .explain (maxTemperature , "guide.orespawn.biomes.3" );
96105 label (left , y + 6 , half , "option.orespawn.max_temperature" );
97106 y += 24 ;
98107 minDownfall = field (left + half + 5 , y , half ,
99108 decimal (placement , "min_downfall" , 0.0D ));
109+ OreSpawnScreenLayout .explain (minDownfall , "guide.orespawn.biomes.3" );
100110 label (left , y + 6 , half , "option.orespawn.min_downfall" );
101111 y += 24 ;
102112 maxDownfall = field (left + half + 5 , y , half ,
103113 decimal (placement , "max_downfall" , 1.0D ));
114+ OreSpawnScreenLayout .explain (maxDownfall , "guide.orespawn.biomes.3" );
104115 label (left , y + 6 , half , "option.orespawn.max_downfall" );
105116 }
106117
@@ -110,19 +121,23 @@ private void initSurface(int left, int width, JsonObject placement) {
110121 for (String key : Arrays .asList ("top_block" , "filler_block" ,
111122 "underwater_block" , "ceiling_block" )) {
112123 String current = string (surface , key , "" );
113- addRenderableWidget (OreSpawnScreenLayout .button (this , font , left , y ,
124+ addRenderableWidget (OreSpawnScreenLayout .explain (OreSpawnScreenLayout .button (
125+ this , font , left , y ,
114126 width - 65 , 20 , materialLabel (key , current ), button -> {
115127 saveFields ();
116128 minecraft .setScreen (new MaterialBlockPickerScreen (this , session ,
117129 false , id -> surface .addProperty (key , id )));
118- }));
119- addRenderableWidget (OreSpawnScreenLayout .plainButton (left + width - 60 , y , 60 , 20 ,
130+ }), "guide.orespawn.biomes.3" ));
131+ Button clear = addRenderableWidget (OreSpawnScreenLayout .plainButton (
132+ left + width - 60 , y , 60 , 20 ,
120133 Component .translatable ("button.orespawn.clear" ),
121134 button -> { surface .remove (key ); rebuildWidgets (); }));
135+ clear .active = !current .isEmpty ();
122136 y += 24 ;
123137 }
124138 fillerDepth = field (left + width / 2 , y , width / 2 ,
125139 integer (surface , "filler_depth" , 3 ));
140+ OreSpawnScreenLayout .explain (fillerDepth , "guide.orespawn.biomes.3" );
126141 label (left , y + 6 , width / 2 - 5 , "option.orespawn.filler_depth" );
127142 }
128143
0 commit comments