@@ -234,58 +234,59 @@ public PatternBrush getPreviousBrush(@Nullable PatternBrush brush) {
234234 }
235235
236236 @ Override
237- public void exportSettings (ItemStack itemStack ) {
238- var lore = new ArrayList <Component >();
239- lore .add (Component .empty ());
240- lore .add (plugin .bundle ().component (player , "brush.exported.size" ,
241- Placeholder .parsed ("size" , String .valueOf (getBrushSize ()))));
242- if (getBrush () instanceof SprayBrush ) {
243- lore .add (plugin .bundle ().component (player , "brush.exported.chance" ,
244- Placeholder .parsed ("chance" , String .valueOf (getChance ()))));
245- } else if (getBrush () instanceof OverlayBrush || getBrush () instanceof UnderlayBrush ) {
246- lore .add (plugin .bundle ().component (player , "brush.exported.thickness" ,
247- Placeholder .parsed ("thickness" , String .valueOf (getThickness ()))));
248- } else if (getBrush () instanceof DiscBrush ) {
249- lore .add (plugin .bundle ().component (player , "brush.exported.axis" ,
250- Placeholder .parsed ("axis" , getAxis ().name ())));
251- } else if (getBrush () instanceof AngleBrush ) {
252- lore .add (plugin .bundle ().component (player , "brush.exported.angle.distance" ,
253- Placeholder .parsed ("distance" , String .valueOf (getAngleDistance ()))));
254- lore .add (plugin .bundle ().component (player , "brush.exported.angle.height" ,
255- Placeholder .parsed ("height" , String .valueOf (getAngleHeightDifference ()))));
256- } else if (getBrush () instanceof SplatterBrush || getBrush () instanceof PaintBrush ) {
257- lore .add (plugin .bundle ().component (player , "brush.exported.falloff" ,
258- Placeholder .parsed ("falloff" , String .valueOf (getFalloffStrength ()))));
259- } else if (getBrush () instanceof GradientBrush ) {
260- lore .add (plugin .bundle ().component (player , "brush.exported.mixing" ,
261- Placeholder .parsed ("mixing" , String .valueOf (getMixingStrength ()))));
262- lore .add (plugin .bundle ().component (player , "brush.exported.falloff" ,
263- Placeholder .parsed ("falloff" , String .valueOf (getFalloffStrength ()))));
264- } else if (getBrush () instanceof FractureBrush ) {
265- lore .add (plugin .bundle ().component (player , "brush.exported.fracture" ,
266- Placeholder .parsed ("fracture" , String .valueOf (getFractureStrength ()))));
267- }
268- if (!blocks .isEmpty ()) {
269- var blocks = getBlocks ().stream ()
270- .map (Material ::translationKey )
271- .map (Component ::translatable )
272- .toList ();
273- lore .add (plugin .bundle ().component (player , "brush.exported.blocks" ,
274- Placeholder .component ("blocks" , Component .join (JoinConfiguration .commas (true ), blocks ))));
275- }
276-
277- if (isMaskEnabled ()) {
278- lore .add (plugin .bundle ().component (player , "brush.exported.mask" ,
279- Placeholder .component ("mask" , Component .translatable (getMask ().translationKey ()))));
280- }
281-
282- if (!getSurfaceMode ().equals (SurfaceMode .DISABLED )) {
283- var mode = plugin .bundle ().component (player , getSurfaceMode ().translationKey ());
284- lore .add (plugin .bundle ().component (player , "brush.exported.surface-mode" ,
285- Placeholder .component ("mode" , mode )));
286- }
287-
288- itemStack .editMeta (itemMeta -> {
237+ public boolean exportSettings (ItemStack itemStack ) {
238+ if (itemStack .getType ().equals (plugin .config ().brushConfig ().defaultBrushType ())) return false ;
239+ return !itemStack .getType ().isBlock () && itemStack .editMeta (itemMeta -> {
240+ var lore = new ArrayList <Component >();
241+ lore .add (Component .empty ());
242+ lore .add (plugin .bundle ().component (player , "brush.exported.size" ,
243+ Placeholder .parsed ("size" , String .valueOf (getBrushSize ()))));
244+ if (getBrush () instanceof SprayBrush ) {
245+ lore .add (plugin .bundle ().component (player , "brush.exported.chance" ,
246+ Placeholder .parsed ("chance" , String .valueOf (getChance ()))));
247+ } else if (getBrush () instanceof OverlayBrush || getBrush () instanceof UnderlayBrush ) {
248+ lore .add (plugin .bundle ().component (player , "brush.exported.thickness" ,
249+ Placeholder .parsed ("thickness" , String .valueOf (getThickness ()))));
250+ } else if (getBrush () instanceof DiskBrush ) {
251+ lore .add (plugin .bundle ().component (player , "brush.exported.axis" ,
252+ Placeholder .parsed ("axis" , getAxis ().name ())));
253+ } else if (getBrush () instanceof AngleBrush ) {
254+ lore .add (plugin .bundle ().component (player , "brush.exported.angle.distance" ,
255+ Placeholder .parsed ("distance" , String .valueOf (getAngleDistance ()))));
256+ lore .add (plugin .bundle ().component (player , "brush.exported.angle.height" ,
257+ Placeholder .parsed ("height" , String .valueOf (getAngleHeightDifference ()))));
258+ } else if (getBrush () instanceof SplatterBrush || getBrush () instanceof PaintBrush ) {
259+ lore .add (plugin .bundle ().component (player , "brush.exported.falloff" ,
260+ Placeholder .parsed ("falloff" , String .valueOf (getFalloffStrength ()))));
261+ } else if (getBrush () instanceof GradientBrush ) {
262+ lore .add (plugin .bundle ().component (player , "brush.exported.mixing" ,
263+ Placeholder .parsed ("mixing" , String .valueOf (getMixingStrength ()))));
264+ lore .add (plugin .bundle ().component (player , "brush.exported.falloff" ,
265+ Placeholder .parsed ("falloff" , String .valueOf (getFalloffStrength ()))));
266+ } else if (getBrush () instanceof FractureBrush ) {
267+ lore .add (plugin .bundle ().component (player , "brush.exported.fracture" ,
268+ Placeholder .parsed ("fracture" , String .valueOf (getFractureStrength ()))));
269+ }
270+ if (!blocks .isEmpty ()) {
271+ var blocks = getBlocks ().stream ()
272+ .map (Material ::translationKey )
273+ .map (Component ::translatable )
274+ .toList ();
275+ lore .add (plugin .bundle ().component (player , "brush.exported.blocks" ,
276+ Placeholder .component ("blocks" , Component .join (JoinConfiguration .commas (true ), blocks ))));
277+ }
278+
279+ if (isMaskEnabled ()) {
280+ lore .add (plugin .bundle ().component (player , "brush.exported.mask" ,
281+ Placeholder .component ("mask" , Component .translatable (getMask ().translationKey ()))));
282+ }
283+
284+ if (!getSurfaceMode ().equals (SurfaceMode .DISABLED )) {
285+ var mode = plugin .bundle ().component (player , getSurfaceMode ().translationKey ());
286+ lore .add (plugin .bundle ().component (player , "brush.exported.surface-mode" ,
287+ Placeholder .component ("mode" , mode )));
288+ }
289+
289290 itemMeta .itemName (plugin .bundle ().component (player , "brush.exported.name" ,
290291 Placeholder .component ("brush" , getBrush ().getName (player ))));
291292 itemMeta .lore (lore );
0 commit comments