User Tools

Site Tools


zh_cn:tutorial:command_argument_types

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
zh_cn:tutorial:command_argument_types [2023/04/20 11:06] solidblockzh_cn:tutorial:command_argument_types [2023/04/20 11:09] – 没有必要使用 SystemUtil solidblock
Line 73: Line 73:
 import com.mojang.brigadier.exceptions.SimpleCommandExceptionType; import com.mojang.brigadier.exceptions.SimpleCommandExceptionType;
 import net.minecraft.text.Text; import net.minecraft.text.Text;
-import net.minecraft.util.SystemUtil; 
  
 import java.util.ArrayList; import java.util.ArrayList;
Line 93: Line 92:
     }     }
  
-    private static final Collection<String> EXAMPLES = SystemUtil.consume(new ArrayList<>(), list -> { +    private static final Collection<String> EXAMPLES = List.of
-        list.add("765e5d33-c991-454f-8775-b6a7a394c097"); // i509VCB: 用户名 The_1_gamers +        "765e5d33-c991-454f-8775-b6a7a394c097"// i509VCB: 用户名 The_1_gamers 
-        list.add("069a79f4-44e9-4726-a5be-fca90e38aaf5"); // Notch +        "069a79f4-44e9-4726-a5be-fca90e38aaf5"// Notch 
-        list.add("61699b2e-d327-4a01-9f1e-0ea8c3f06bc6"); // Dinnerbone +        "61699b2e-d327-4a01-9f1e-0ea8c3f06bc6"  // Dinnerbone 
-    });+    );
  
     @Override     @Override
zh_cn/tutorial/command_argument_types.txt · Last modified: 2024/04/15 07:24 by solidblock