Package net.minecraft.commands.functions
Part 1/1
CommandFunction
- Full name:
net.minecraft.commands.functions.CommandFunction - Package:
net.minecraft.commands.functions - Source:
common—net/minecraft/commands/functions/CommandFunction.java - Type:
interface - Modifiers:
public
net.minecraft.commands.functions.CommandFunction#checkCommandLineLength(CharSequence)
- Origin:
common - Source:
net/minecraft/commands/functions/CommandFunction.java:87 - Modifiers:
static - Return:
void
คืออะไร
ตรวจสอบ Command Line Length
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: length(), subSequence(), min(). สร้างออบเจ็กต์: IllegalStateException.
Parameters
CharSequence charSequence
ตัวอย่างใช้งาน
net.minecraft.commands.functions.CommandFunction#fromLines(ResourceLocation,CommandDispatcher<T>,T,List<String>)
- Origin:
common - Source:
net/minecraft/commands/functions/CommandFunction.java:29 - Modifiers:
static - Return:
CommandFunction<T>
คืออะไร
ดำเนินการ fromLines ตาม implementation ของ CommandFunction
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป ; มีการจัดการ exception. เรียกต่อ: size(), get(), trim(), shouldConcatenateNextLine(), deleteCharAt(), length(), append(), checkCommandLineLength(). สร้างออบเจ็กต์: FunctionBuilder<>, StringBuilder, IllegalArgumentException, StringReader. คืนค่า: functionBuilder.build(resourceLocation).
Parameters
ResourceLocation resourceLocationCommandDispatcher<T> commandDispatcherT executionCommandSourceList<String> list
ตัวอย่างใช้งาน
ResourceLocation resourceLocation = ...;
CommandDispatcher<T> commandDispatcher = ...;
T executionCommandSource = ...;
List<String> list = ...;
CommandFunction<T> result = CommandFunction.fromLines(resourceLocation, commandDispatcher, executionCommandSource, list);
net.minecraft.commands.functions.CommandFunction#id()
- Origin:
common - Source:
net/minecraft/commands/functions/CommandFunction.java:20 - Modifiers: ``
- Return:
ResourceLocation
คืออะไร
ดำเนินการ id ตาม implementation ของ CommandFunction
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.commands.functions.CommandFunction#instantiate(CompoundTag,CommandDispatcher<T>)
- Origin:
common - Source:
net/minecraft/commands/functions/CommandFunction.java:22 - Modifiers: ``
- Return:
InstantiatedFunction<T>
คืออะไร
ดำเนินการ instantiate ตาม implementation ของ CommandFunction
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
CompoundTag compoundTagCommandDispatcher<T> commandDispatcher
Throws
FunctionInstantiationException
ตัวอย่างใช้งาน
CommandFunction instance = ...;
CompoundTag compoundTag = ...;
CommandDispatcher<T> commandDispatcher = ...;
InstantiatedFunction<T> result = instance.instantiate(compoundTag, commandDispatcher);
net.minecraft.commands.functions.CommandFunction#parseCommand(CommandDispatcher<T>,T,StringReader)
- Origin:
common - Source:
net/minecraft/commands/functions/CommandFunction.java:94 - Modifiers:
static - Return:
UnboundEntryAction<T>
คืออะไร
แปลง/วิเคราะห์ข้อมูล Command
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: parse(), validateParseResults(), tryFlatten(), getContext(), build(), getString(), isEmpty(), dispatcherUnknownCommand(). สร้างออบเจ็กต์: BuildContexts.Unbound<>. คืนค่า: new BuildContexts.Unbound<>(stringReader.getString(), optional.get()).
Parameters
CommandDispatcher<T> commandDispatcherT executionCommandSourceStringReader stringReader
Throws
CommandSyntaxException
ตัวอย่างใช้งาน
CommandDispatcher<T> commandDispatcher = ...;
T executionCommandSource = ...;
StringReader stringReader = ...;
UnboundEntryAction<T> result = CommandFunction.parseCommand(commandDispatcher, executionCommandSource, stringReader);
InstantiatedFunction
- Full name:
net.minecraft.commands.functions.InstantiatedFunction - Package:
net.minecraft.commands.functions - Source:
common—net/minecraft/commands/functions/InstantiatedFunction.java - Type:
interface - Modifiers:
public
net.minecraft.commands.functions.InstantiatedFunction#entries()
- Origin:
common - Source:
net/minecraft/commands/functions/InstantiatedFunction.java:10 - Modifiers: ``
- Return:
List<UnboundEntryAction<T>>
คืออะไร
ดำเนินการ entries ตาม implementation ของ InstantiatedFunction
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.commands.functions.InstantiatedFunction#id()
- Origin:
common - Source:
net/minecraft/commands/functions/InstantiatedFunction.java:8 - Modifiers: ``
- Return:
ResourceLocation
คืออะไร
ดำเนินการ id ตาม implementation ของ InstantiatedFunction
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
- ไม่มี
ตัวอย่างใช้งาน
MacroFunction
- Full name:
net.minecraft.commands.functions.MacroFunction - Package:
net.minecraft.commands.functions - Source:
common—net/minecraft/commands/functions/MacroFunction.java - Type:
class - Modifiers:
public - Implements:
CommandFunction<T>
net.minecraft.commands.functions.MacroFunction#id()
- Origin:
common - Source:
net/minecraft/commands/functions/MacroFunction.java:46 - Modifiers:
public - Return:
ResourceLocation
คืออะไร
ดำเนินการ id ตาม implementation ของ MacroFunction
ทำงานยังไง
คืนค่า: this.id.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.commands.functions.MacroFunction#instantiate(CompoundTag,CommandDispatcher<T>)
- Origin:
common - Source:
net/minecraft/commands/functions/MacroFunction.java:51 - Modifiers:
public - Return:
InstantiatedFunction<T>
คืออะไร
ดำเนินการ instantiate ตาม implementation ของ MacroFunction
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: translatable(), translationArg(), id(), size(), get(), add(), stringify(), getAndMoveToLast(). สร้างออบเจ็กต์: FunctionInstantiationException, ArrayList<>. มีจุด return อย่างน้อย 2 จุด.
Parameters
CompoundTag compoundTagCommandDispatcher<T> commandDispatcher
Throws
FunctionInstantiationException
ตัวอย่างใช้งาน
MacroFunction instance = ...;
CompoundTag compoundTag = ...;
CommandDispatcher<T> commandDispatcher = ...;
InstantiatedFunction<T> result = instance.instantiate(compoundTag, commandDispatcher);
net.minecraft.commands.functions.MacroFunction#MacroFunction(ResourceLocation,List<MacroFunction.Entry<T>>,List<String>)
- Origin:
common - Source:
net/minecraft/commands/functions/MacroFunction.java:40 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ MacroFunction ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: id, entries, parameters.
Parameters
ResourceLocation resourceLocationList<MacroFunction.Entry<T>> listList<String> list2
ตัวอย่างใช้งาน
ResourceLocation resourceLocation = ...;
List<MacroFunction.Entry<T>> list = ...;
List<String> list2 = ...;
MacroFunction instance = new MacroFunction(resourceLocation, list, list2);
PlainTextFunction
- Full name:
net.minecraft.commands.functions.PlainTextFunction - Package:
net.minecraft.commands.functions - Source:
common—net/minecraft/commands/functions/PlainTextFunction.java - Type:
record - Modifiers:
public - Implements:
CommandFunction<T>,InstantiatedFunction<T>
net.minecraft.commands.functions.PlainTextFunction#instantiate(CompoundTag,CommandDispatcher<T>)
- Origin:
common - Source:
net/minecraft/commands/functions/PlainTextFunction.java:12 - Modifiers:
public - Return:
InstantiatedFunction<T>
คืออะไร
ดำเนินการ instantiate ตาม implementation ของ PlainTextFunction
ทำงานยังไง
คืนค่า: this.
Parameters
CompoundTag compoundTagCommandDispatcher<T> commandDispatcher
Throws
FunctionInstantiationException
ตัวอย่างใช้งาน
PlainTextFunction instance = ...;
CompoundTag compoundTag = ...;
CommandDispatcher<T> commandDispatcher = ...;
InstantiatedFunction<T> result = instance.instantiate(compoundTag, commandDispatcher);
StringTemplate
- Full name:
net.minecraft.commands.functions.StringTemplate - Package:
net.minecraft.commands.functions - Source:
common—net/minecraft/commands/functions/StringTemplate.java - Type:
record - Modifiers:
public
net.minecraft.commands.functions.StringTemplate#fromString(String,int)
- Origin:
common - Source:
net/minecraft/commands/functions/StringTemplate.java:8 - Modifiers:
public static - Return:
StringTemplate
คืออะไร
ดำเนินการ fromString ตาม implementation ของ StringTemplate
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: builder(), length(), indexOf(), charAt(), add(), substring(), isValidVariableName(), build(). สร้างออบเจ็กต์: IllegalArgumentException, StringTemplate. คืนค่า: new StringTemplate(builder.build(), builder2.build()).
Parameters
String stringint i
ตัวอย่างใช้งาน
net.minecraft.commands.functions.StringTemplate#substitute(List<String>)
- Origin:
common - Source:
net/minecraft/commands/functions/StringTemplate.java:58 - Modifiers:
public - Return:
String
คืออะไร
ดำเนินการ substitute ตาม implementation ของ StringTemplate
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: size(), append(), get(), checkCommandLineLength(), toString(). สร้างออบเจ็กต์: StringBuilder. คืนค่า: stringBuilder.toString().
Parameters
List<String> list