2323public class ShardCollectedToast implements Toast {
2424 public static final int TITLE_COLOR = 0xFF_FFFF00 ;
2525 public static final Text TITLE = Text .translatable ("toast.scattered_shards.collected" );
26- public static final Text HINT = Text .translatable ("toast.scattered_shards.collected.prompt" , Text .keybind (ScatteredShardsClient .VIEW_COLLECTION .getTranslationKey ()).formatted (Formatting .GOLD ).formatted (Formatting .BOLD ));
2726 private static final Identifier TEXTURE = Identifier .ofVanilla ("toast/advancement" );
2827 public static final int DURATION = 5000 ;
2928
@@ -33,9 +32,24 @@ public class ShardCollectedToast implements Toast {
3332 private final int height ;
3433
3534 public ShardCollectedToast (Shard shard ) {
35+
36+ Text hint ;
37+
38+ if (ScatteredShardsClient .VIEW_COLLECTION .isUnbound ()) {
39+ hint = Text .translatable (
40+ "toast.scattered_shards.collected.prompt_without_key" ,
41+ Text .literal ("/shards" ).formatted (Formatting .AQUA ).formatted (Formatting .BOLD )
42+ );
43+ } else {
44+ hint = Text .translatable (
45+ "toast.scattered_shards.collected.prompt" ,
46+ Text .keybind (ScatteredShardsClient .VIEW_COLLECTION .getTranslationKey ()).formatted (Formatting .GOLD ).formatted (Formatting .BOLD )
47+ );
48+ }
49+
3650 this .icon = shard .icon ();
3751 this .descLines = wrap (List .of (shard .name ().copy ().withColor (ScatteredShardsAPI .getClientLibrary ().shardTypes ().get (shard .shardTypeId ()).orElse (ShardType .MISSING ).textColor ())));
38- this .hintLines = wrap (List .of (HINT ));
52+ this .hintLines = wrap (List .of (hint ));
3953 this .height = 32 + Math .max (0 , Math .max (this .descLines .size (), this .hintLines .size ()) - 1 ) * 11 ;
4054 icon .ifRight (ModMetaUtil ::touchIconTexture );
4155 }
0 commit comments