Skip to content

Package net.minecraft.commands

Part 1/1


BrigadierExceptions

  • Full name: net.minecraft.commands.BrigadierExceptions
  • Package: net.minecraft.commands
  • Source: commonnet/minecraft/commands/BrigadierExceptions.java
  • Type: class
  • Modifiers: public
  • Implements: BuiltInExceptionProvider

net.minecraft.commands.BrigadierExceptions#dispatcherExpectedArgumentSeparator()

  • Origin: common
  • Source: net/minecraft/commands/BrigadierExceptions.java:205
  • Modifiers: public
  • Return: SimpleCommandExceptionType

คืออะไร

ดำเนินการ dispatcherExpectedArgumentSeparator ตาม implementation ของ BrigadierExceptions

ทำงานยังไง

คืนค่า: DISPATCHER_EXPECTED_ARGUMENT_SEPARATOR.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BrigadierExceptions instance = ...;
SimpleCommandExceptionType result = instance.dispatcherExpectedArgumentSeparator();

net.minecraft.commands.BrigadierExceptions#dispatcherParseException()

  • Origin: common
  • Source: net/minecraft/commands/BrigadierExceptions.java:210
  • Modifiers: public
  • Return: DynamicCommandExceptionType

คืออะไร

ดำเนินการ dispatcherParseException ตาม implementation ของ BrigadierExceptions

ทำงานยังไง

คืนค่า: DISPATCHER_PARSE_EXCEPTION.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BrigadierExceptions instance = ...;
DynamicCommandExceptionType result = instance.dispatcherParseException();

net.minecraft.commands.BrigadierExceptions#dispatcherUnknownArgument()

  • Origin: common
  • Source: net/minecraft/commands/BrigadierExceptions.java:200
  • Modifiers: public
  • Return: SimpleCommandExceptionType

คืออะไร

ดำเนินการ dispatcherUnknownArgument ตาม implementation ของ BrigadierExceptions

ทำงานยังไง

คืนค่า: DISPATCHER_UNKNOWN_ARGUMENT.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BrigadierExceptions instance = ...;
SimpleCommandExceptionType result = instance.dispatcherUnknownArgument();

net.minecraft.commands.BrigadierExceptions#dispatcherUnknownCommand()

  • Origin: common
  • Source: net/minecraft/commands/BrigadierExceptions.java:195
  • Modifiers: public
  • Return: SimpleCommandExceptionType

คืออะไร

ดำเนินการ dispatcherUnknownCommand ตาม implementation ของ BrigadierExceptions

ทำงานยังไง

คืนค่า: DISPATCHER_UNKNOWN_COMMAND.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BrigadierExceptions instance = ...;
SimpleCommandExceptionType result = instance.dispatcherUnknownCommand();

net.minecraft.commands.BrigadierExceptions#doubleTooHigh()

  • Origin: common
  • Source: net/minecraft/commands/BrigadierExceptions.java:85
  • Modifiers: public
  • Return: Dynamic2CommandExceptionType

คืออะไร

ดำเนินการ doubleTooHigh ตาม implementation ของ BrigadierExceptions

ทำงานยังไง

คืนค่า: DOUBLE_TOO_BIG.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BrigadierExceptions instance = ...;
Dynamic2CommandExceptionType result = instance.doubleTooHigh();

net.minecraft.commands.BrigadierExceptions#doubleTooLow()

  • Origin: common
  • Source: net/minecraft/commands/BrigadierExceptions.java:80
  • Modifiers: public
  • Return: Dynamic2CommandExceptionType

คืออะไร

ดำเนินการ doubleTooLow ตาม implementation ของ BrigadierExceptions

ทำงานยังไง

คืนค่า: DOUBLE_TOO_SMALL.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BrigadierExceptions instance = ...;
Dynamic2CommandExceptionType result = instance.doubleTooLow();

net.minecraft.commands.BrigadierExceptions#floatTooHigh()

  • Origin: common
  • Source: net/minecraft/commands/BrigadierExceptions.java:95
  • Modifiers: public
  • Return: Dynamic2CommandExceptionType

คืออะไร

ดำเนินการ floatTooHigh ตาม implementation ของ BrigadierExceptions

ทำงานยังไง

คืนค่า: FLOAT_TOO_BIG.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BrigadierExceptions instance = ...;
Dynamic2CommandExceptionType result = instance.floatTooHigh();

net.minecraft.commands.BrigadierExceptions#floatTooLow()

  • Origin: common
  • Source: net/minecraft/commands/BrigadierExceptions.java:90
  • Modifiers: public
  • Return: Dynamic2CommandExceptionType

คืออะไร

ดำเนินการ floatTooLow ตาม implementation ของ BrigadierExceptions

ทำงานยังไง

คืนค่า: FLOAT_TOO_SMALL.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BrigadierExceptions instance = ...;
Dynamic2CommandExceptionType result = instance.floatTooLow();

net.minecraft.commands.BrigadierExceptions#integerTooHigh()

  • Origin: common
  • Source: net/minecraft/commands/BrigadierExceptions.java:105
  • Modifiers: public
  • Return: Dynamic2CommandExceptionType

คืออะไร

ดำเนินการ integerTooHigh ตาม implementation ของ BrigadierExceptions

ทำงานยังไง

คืนค่า: INTEGER_TOO_BIG.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BrigadierExceptions instance = ...;
Dynamic2CommandExceptionType result = instance.integerTooHigh();

net.minecraft.commands.BrigadierExceptions#integerTooLow()

  • Origin: common
  • Source: net/minecraft/commands/BrigadierExceptions.java:100
  • Modifiers: public
  • Return: Dynamic2CommandExceptionType

คืออะไร

ดำเนินการ integerTooLow ตาม implementation ของ BrigadierExceptions

ทำงานยังไง

คืนค่า: INTEGER_TOO_SMALL.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BrigadierExceptions instance = ...;
Dynamic2CommandExceptionType result = instance.integerTooLow();

net.minecraft.commands.BrigadierExceptions#literalIncorrect()

  • Origin: common
  • Source: net/minecraft/commands/BrigadierExceptions.java:120
  • Modifiers: public
  • Return: DynamicCommandExceptionType

คืออะไร

ดำเนินการ literalIncorrect ตาม implementation ของ BrigadierExceptions

ทำงานยังไง

คืนค่า: LITERAL_INCORRECT.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BrigadierExceptions instance = ...;
DynamicCommandExceptionType result = instance.literalIncorrect();

net.minecraft.commands.BrigadierExceptions#longTooHigh()

  • Origin: common
  • Source: net/minecraft/commands/BrigadierExceptions.java:115
  • Modifiers: public
  • Return: Dynamic2CommandExceptionType

คืออะไร

ดำเนินการ longTooHigh ตาม implementation ของ BrigadierExceptions

ทำงานยังไง

คืนค่า: LONG_TOO_BIG.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BrigadierExceptions instance = ...;
Dynamic2CommandExceptionType result = instance.longTooHigh();

net.minecraft.commands.BrigadierExceptions#longTooLow()

  • Origin: common
  • Source: net/minecraft/commands/BrigadierExceptions.java:110
  • Modifiers: public
  • Return: Dynamic2CommandExceptionType

คืออะไร

ดำเนินการ longTooLow ตาม implementation ของ BrigadierExceptions

ทำงานยังไง

คืนค่า: LONG_TOO_SMALL.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BrigadierExceptions instance = ...;
Dynamic2CommandExceptionType result = instance.longTooLow();

net.minecraft.commands.BrigadierExceptions#readerExpectedBool()

  • Origin: common
  • Source: net/minecraft/commands/BrigadierExceptions.java:185
  • Modifiers: public
  • Return: SimpleCommandExceptionType

คืออะไร

ดำเนินการ readerExpectedBool ตาม implementation ของ BrigadierExceptions

ทำงานยังไง

คืนค่า: READER_EXPECTED_BOOL.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BrigadierExceptions instance = ...;
SimpleCommandExceptionType result = instance.readerExpectedBool();

net.minecraft.commands.BrigadierExceptions#readerExpectedDouble()

  • Origin: common
  • Source: net/minecraft/commands/BrigadierExceptions.java:170
  • Modifiers: public
  • Return: SimpleCommandExceptionType

คืออะไร

ดำเนินการ readerExpectedDouble ตาม implementation ของ BrigadierExceptions

ทำงานยังไง

คืนค่า: READER_EXPECTED_DOUBLE.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BrigadierExceptions instance = ...;
SimpleCommandExceptionType result = instance.readerExpectedDouble();

net.minecraft.commands.BrigadierExceptions#readerExpectedEndOfQuote()

  • Origin: common
  • Source: net/minecraft/commands/BrigadierExceptions.java:130
  • Modifiers: public
  • Return: SimpleCommandExceptionType

คืออะไร

ดำเนินการ readerExpectedEndOfQuote ตาม implementation ของ BrigadierExceptions

ทำงานยังไง

คืนค่า: READER_EXPECTED_END_OF_QUOTE.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BrigadierExceptions instance = ...;
SimpleCommandExceptionType result = instance.readerExpectedEndOfQuote();

net.minecraft.commands.BrigadierExceptions#readerExpectedFloat()

  • Origin: common
  • Source: net/minecraft/commands/BrigadierExceptions.java:180
  • Modifiers: public
  • Return: SimpleCommandExceptionType

คืออะไร

ดำเนินการ readerExpectedFloat ตาม implementation ของ BrigadierExceptions

ทำงานยังไง

คืนค่า: READER_EXPECTED_FLOAT.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BrigadierExceptions instance = ...;
SimpleCommandExceptionType result = instance.readerExpectedFloat();

net.minecraft.commands.BrigadierExceptions#readerExpectedInt()

  • Origin: common
  • Source: net/minecraft/commands/BrigadierExceptions.java:150
  • Modifiers: public
  • Return: SimpleCommandExceptionType

คืออะไร

ดำเนินการ readerExpectedInt ตาม implementation ของ BrigadierExceptions

ทำงานยังไง

คืนค่า: READER_EXPECTED_INT.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BrigadierExceptions instance = ...;
SimpleCommandExceptionType result = instance.readerExpectedInt();

net.minecraft.commands.BrigadierExceptions#readerExpectedLong()

  • Origin: common
  • Source: net/minecraft/commands/BrigadierExceptions.java:160
  • Modifiers: public
  • Return: SimpleCommandExceptionType

คืออะไร

ดำเนินการ readerExpectedLong ตาม implementation ของ BrigadierExceptions

ทำงานยังไง

คืนค่า: READER_EXPECTED_LONG.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BrigadierExceptions instance = ...;
SimpleCommandExceptionType result = instance.readerExpectedLong();

net.minecraft.commands.BrigadierExceptions#readerExpectedStartOfQuote()

  • Origin: common
  • Source: net/minecraft/commands/BrigadierExceptions.java:125
  • Modifiers: public
  • Return: SimpleCommandExceptionType

คืออะไร

ดำเนินการ readerExpectedStartOfQuote ตาม implementation ของ BrigadierExceptions

ทำงานยังไง

คืนค่า: READER_EXPECTED_START_OF_QUOTE.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BrigadierExceptions instance = ...;
SimpleCommandExceptionType result = instance.readerExpectedStartOfQuote();

net.minecraft.commands.BrigadierExceptions#readerExpectedSymbol()

  • Origin: common
  • Source: net/minecraft/commands/BrigadierExceptions.java:190
  • Modifiers: public
  • Return: DynamicCommandExceptionType

คืออะไร

ดำเนินการ readerExpectedSymbol ตาม implementation ของ BrigadierExceptions

ทำงานยังไง

คืนค่า: READER_EXPECTED_SYMBOL.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BrigadierExceptions instance = ...;
DynamicCommandExceptionType result = instance.readerExpectedSymbol();

net.minecraft.commands.BrigadierExceptions#readerInvalidBool()

  • Origin: common
  • Source: net/minecraft/commands/BrigadierExceptions.java:140
  • Modifiers: public
  • Return: DynamicCommandExceptionType

คืออะไร

ดำเนินการ readerInvalidBool ตาม implementation ของ BrigadierExceptions

ทำงานยังไง

คืนค่า: READER_INVALID_BOOL.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BrigadierExceptions instance = ...;
DynamicCommandExceptionType result = instance.readerInvalidBool();

net.minecraft.commands.BrigadierExceptions#readerInvalidDouble()

  • Origin: common
  • Source: net/minecraft/commands/BrigadierExceptions.java:165
  • Modifiers: public
  • Return: DynamicCommandExceptionType

คืออะไร

ดำเนินการ readerInvalidDouble ตาม implementation ของ BrigadierExceptions

ทำงานยังไง

คืนค่า: READER_INVALID_DOUBLE.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BrigadierExceptions instance = ...;
DynamicCommandExceptionType result = instance.readerInvalidDouble();

net.minecraft.commands.BrigadierExceptions#readerInvalidEscape()

  • Origin: common
  • Source: net/minecraft/commands/BrigadierExceptions.java:135
  • Modifiers: public
  • Return: DynamicCommandExceptionType

คืออะไร

ดำเนินการ readerInvalidEscape ตาม implementation ของ BrigadierExceptions

ทำงานยังไง

คืนค่า: READER_INVALID_ESCAPE.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BrigadierExceptions instance = ...;
DynamicCommandExceptionType result = instance.readerInvalidEscape();

net.minecraft.commands.BrigadierExceptions#readerInvalidFloat()

  • Origin: common
  • Source: net/minecraft/commands/BrigadierExceptions.java:175
  • Modifiers: public
  • Return: DynamicCommandExceptionType

คืออะไร

ดำเนินการ readerInvalidFloat ตาม implementation ของ BrigadierExceptions

ทำงานยังไง

คืนค่า: READER_INVALID_FLOAT.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BrigadierExceptions instance = ...;
DynamicCommandExceptionType result = instance.readerInvalidFloat();

net.minecraft.commands.BrigadierExceptions#readerInvalidInt()

  • Origin: common
  • Source: net/minecraft/commands/BrigadierExceptions.java:145
  • Modifiers: public
  • Return: DynamicCommandExceptionType

คืออะไร

ดำเนินการ readerInvalidInt ตาม implementation ของ BrigadierExceptions

ทำงานยังไง

คืนค่า: READER_INVALID_INT.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BrigadierExceptions instance = ...;
DynamicCommandExceptionType result = instance.readerInvalidInt();

net.minecraft.commands.BrigadierExceptions#readerInvalidLong()

  • Origin: common
  • Source: net/minecraft/commands/BrigadierExceptions.java:155
  • Modifiers: public
  • Return: DynamicCommandExceptionType

คืออะไร

ดำเนินการ readerInvalidLong ตาม implementation ของ BrigadierExceptions

ทำงานยังไง

คืนค่า: READER_INVALID_LONG.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BrigadierExceptions instance = ...;
DynamicCommandExceptionType result = instance.readerInvalidLong();

CacheableFunction

  • Full name: net.minecraft.commands.CacheableFunction
  • Package: net.minecraft.commands
  • Source: commonnet/minecraft/commands/CacheableFunction.java
  • Type: class
  • Modifiers: public

net.minecraft.commands.CacheableFunction#CacheableFunction(ResourceLocation)

  • Origin: common
  • Source: net/minecraft/commands/CacheableFunction.java:15
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ CacheableFunction ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: id.

Parameters

  • ResourceLocation resourceLocation

ตัวอย่างใช้งาน

ResourceLocation resourceLocation = ...;
CacheableFunction instance = new CacheableFunction(resourceLocation);

net.minecraft.commands.CacheableFunction#equals(Object)

  • Origin: common
  • Source: net/minecraft/commands/CacheableFunction.java:32
  • Modifiers: public
  • Return: boolean

คืออะไร

เปรียบเทียบความเท่ากัน equals

ทำงานยังไง

เรียกต่อ: getId(). คืนค่า: object == this ? true : object instanceof CacheableFunction cacheableFunction && this.getId().equals(cacheableFunction.getId()).

Parameters

  • Object object

ตัวอย่างใช้งาน

CacheableFunction instance = ...;
Object object = ...;
boolean result = instance.equals(object);

net.minecraft.commands.CacheableFunction#get(ServerFunctionManager)

  • Origin: common
  • Source: net/minecraft/commands/CacheableFunction.java:19
  • Modifiers: public
  • Return: Optional<CommandFunction<CommandSourceStack>>

คืออะไร

อ่านค่า get

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: function, resolved. คืนค่า: this.function.

Parameters

  • ServerFunctionManager serverFunctionManager

ตัวอย่างใช้งาน

CacheableFunction instance = ...;
ServerFunctionManager serverFunctionManager = ...;
Optional<CommandFunction<CommandSourceStack>> result = instance.get(serverFunctionManager);

net.minecraft.commands.CacheableFunction#getId()

  • Origin: common
  • Source: net/minecraft/commands/CacheableFunction.java:28
  • Modifiers: public
  • Return: ResourceLocation

คืออะไร

อ่านค่า Id

ทำงานยังไง

คืนค่า: this.id.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

CacheableFunction instance = ...;
ResourceLocation result = instance.getId();

CommandBuildContext

  • Full name: net.minecraft.commands.CommandBuildContext
  • Package: net.minecraft.commands
  • Source: commonnet/minecraft/commands/CommandBuildContext.java
  • Type: interface
  • Modifiers: public
  • Implements: HolderLookup.Provider

net.minecraft.commands.CommandBuildContext#enabledFeatures()

  • Origin: common
  • Source: net/minecraft/commands/CommandBuildContext.java:30
  • Modifiers: ``
  • Return: FeatureFlagSet

คืออะไร

ดำเนินการ enabledFeatures ตาม implementation ของ CommandBuildContext

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

CommandBuildContext instance = ...;
FeatureFlagSet result = instance.enabledFeatures();

net.minecraft.commands.CommandBuildContext#simple(HolderLookup.Provider,FeatureFlagSet)

  • Origin: common
  • Source: net/minecraft/commands/CommandBuildContext.java:11
  • Modifiers: static
  • Return: CommandBuildContext

คืออะไร

ดำเนินการ simple ตาม implementation ของ CommandBuildContext

ทำงานยังไง

เรียกต่อ: listRegistryKeys(), lookup(), map(), filterFeatures(), enabledFeatures(). สร้างออบเจ็กต์: CommandBuildContext. มีจุด return อย่างน้อย 3 จุด.

Parameters

  • HolderLookup.Provider provider
  • FeatureFlagSet featureFlagSet

ตัวอย่างใช้งาน

HolderLookup.Provider provider = ...;
FeatureFlagSet featureFlagSet = ...;
CommandBuildContext result = CommandBuildContext.simple(provider, featureFlagSet);

CommandResultCallback

  • Full name: net.minecraft.commands.CommandResultCallback
  • Package: net.minecraft.commands
  • Source: commonnet/minecraft/commands/CommandResultCallback.java
  • Type: interface
  • Modifiers: public

net.minecraft.commands.CommandResultCallback#chain(CommandResultCallback,CommandResultCallback)

  • Origin: common
  • Source: net/minecraft/commands/CommandResultCallback.java:26
  • Modifiers: static
  • Return: CommandResultCallback

คืออะไร

ดำเนินการ chain ตาม implementation ของ CommandResultCallback

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: onResult(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • CommandResultCallback commandResultCallback
  • CommandResultCallback commandResultCallback2

ตัวอย่างใช้งาน

CommandResultCallback commandResultCallback = ...;
CommandResultCallback commandResultCallback2 = ...;
CommandResultCallback result = CommandResultCallback.chain(commandResultCallback, commandResultCallback2);

net.minecraft.commands.CommandResultCallback#onFailure()

  • Origin: common
  • Source: net/minecraft/commands/CommandResultCallback.java:22
  • Modifiers: default
  • Return: void

คืออะไร

จัดการเหตุการณ์ Failure

ทำงานยังไง

เรียกต่อ: onResult().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

CommandResultCallback instance = ...;
instance.onFailure();

net.minecraft.commands.CommandResultCallback#onResult(boolean,int)

  • Origin: common
  • Source: net/minecraft/commands/CommandResultCallback.java:16
  • Modifiers: ``
  • Return: void

คืออะไร

จัดการเหตุการณ์ Result

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • boolean bl
  • int i

ตัวอย่างใช้งาน

CommandResultCallback instance = ...;
instance.onResult(true, 0);

net.minecraft.commands.CommandResultCallback#onSuccess(int)

  • Origin: common
  • Source: net/minecraft/commands/CommandResultCallback.java:18
  • Modifiers: default
  • Return: void

คืออะไร

จัดการเหตุการณ์ Success

ทำงานยังไง

เรียกต่อ: onResult().

Parameters

  • int i

ตัวอย่างใช้งาน

CommandResultCallback instance = ...;
instance.onSuccess(0);

Commands

  • Full name: net.minecraft.commands.Commands
  • Package: net.minecraft.commands
  • Source: commonnet/minecraft/commands/Commands.java
  • Type: class
  • Modifiers: public

net.minecraft.commands.Commands#argument(String,ArgumentType<T>)

  • Origin: common
  • Source: net/minecraft/commands/Commands.java:406
  • Modifiers: public static
  • Return: RequiredArgumentBuilder<CommandSourceStack, T>

คืออะไร

ดำเนินการ argument ตาม implementation ของ Commands

ทำงานยังไง

คืนค่า: RequiredArgumentBuilder.argument(string, argumentType).

Parameters

  • String string
  • ArgumentType<T> argumentType

ตัวอย่างใช้งาน

ArgumentType<T> argumentType = ...;
RequiredArgumentBuilder<CommandSourceStack, T> result = Commands.argument("value", argumentType);

net.minecraft.commands.Commands#Commands(Commands.CommandSelection,CommandBuildContext)

  • Origin: common
  • Source: net/minecraft/commands/Commands.java:152
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ Commands ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: register(), isAvailable(), setConsumer(), resultConsumer().

Parameters

  • Commands.CommandSelection commandSelection
  • CommandBuildContext commandBuildContext

ตัวอย่างใช้งาน

Commands.CommandSelection commandSelection = ...;
CommandBuildContext commandBuildContext = ...;
Commands instance = new Commands(commandSelection, commandBuildContext);

net.minecraft.commands.Commands#createValidationContext(HolderLookup.Provider)

  • Origin: common
  • Source: net/minecraft/commands/Commands.java:445
  • Modifiers: public static
  • Return: CommandBuildContext

คืออะไร

สร้าง Validation Context

ทำงานยังไง

เรียกต่อ: enabledFeatures(), allFlags(), listRegistryKeys(), lookup(), map(), createLookup(), parent(), get(). สร้างออบเจ็กต์: CommandBuildContext, HolderLookup.RegistryLookup.Delegate<T>. มีจุด return อย่างน้อย 6 จุด.

Parameters

  • HolderLookup.Provider provider

ตัวอย่างใช้งาน

HolderLookup.Provider provider = ...;
CommandBuildContext result = Commands.createValidationContext(provider);

net.minecraft.commands.Commands#createValidator(Commands.ParseFunction)

  • Origin: common
  • Source: net/minecraft/commands/Commands.java:410
  • Modifiers: public static
  • Return: Predicate<String>

คืออะไร

สร้าง Validator

ทำงานยังไง

มีการจัดการ exception. เรียกต่อ: parse(). สร้างออบเจ็กต์: StringReader. มีจุด return อย่างน้อย 3 จุด.

Parameters

  • Commands.ParseFunction parseFunction

ตัวอย่างใช้งาน

Commands.ParseFunction parseFunction = ...;
Predicate<String> result = Commands.createValidator(parseFunction);

net.minecraft.commands.Commands#executeCommandInContext(CommandSourceStack,Consumer<ExecutionContext<CommandSourceStack>>)

  • Origin: common
  • Source: net/minecraft/commands/Commands.java:341
  • Modifiers: public static
  • Return: void

คืออะไร

สั่งทำงาน Command In Context

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการจัดการ exception. เรียกต่อ: getServer(), get(), max(), getGameRules(), getInt(), set(), accept(), runCommandQueue(). สร้างออบเจ็กต์: ExecutionContext<>.

Parameters

  • CommandSourceStack commandSourceStack
  • Consumer<ExecutionContext<CommandSourceStack>> consumer

ตัวอย่างใช้งาน

CommandSourceStack commandSourceStack = ...;
Consumer<ExecutionContext<CommandSourceStack>> consumer = ...;
Commands.executeCommandInContext(commandSourceStack, consumer);

net.minecraft.commands.Commands#getDispatcher()

  • Origin: common
  • Source: net/minecraft/commands/Commands.java:421
  • Modifiers: public
  • Return: CommandDispatcher<CommandSourceStack>

คืออะไร

อ่านค่า Dispatcher

ทำงานยังไง

คืนค่า: this.dispatcher.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Commands instance = ...;
CommandDispatcher<CommandSourceStack> result = instance.getDispatcher();

net.minecraft.commands.Commands#getParseException(ParseResults<S>)

  • Origin: common
  • Source: net/minecraft/commands/Commands.java:432
  • Modifiers: public static
  • Return: CommandSyntaxException

คืออะไร

อ่านค่า Parse Exception

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getReader(), canRead(), getExceptions(), size(), values(), iterator(), next(), getContext(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ParseResults<S> parseResults

ตัวอย่างใช้งาน

ParseResults<S> parseResults = ...;
CommandSyntaxException result = Commands.getParseException(parseResults);

net.minecraft.commands.Commands#literal(String)

  • Origin: common
  • Source: net/minecraft/commands/Commands.java:402
  • Modifiers: public static
  • Return: LiteralArgumentBuilder<CommandSourceStack>

คืออะไร

ดำเนินการ literal ตาม implementation ของ Commands

ทำงานยังไง

คืนค่า: LiteralArgumentBuilder.literal(string).

Parameters

  • String string

ตัวอย่างใช้งาน

LiteralArgumentBuilder<CommandSourceStack> result = Commands.literal("value");

net.minecraft.commands.Commands#mapSource(ParseResults<S>,UnaryOperator<S>)

  • Origin: common
  • Source: net/minecraft/commands/Commands.java:257
  • Modifiers: public static
  • Return: ParseResults<S>

คืออะไร

ดำเนินการ mapSource ตาม implementation ของ Commands

ทำงานยังไง

เรียกต่อ: getContext(), withSource(), apply(), getSource(), getReader(), getExceptions(). สร้างออบเจ็กต์: ParseResults<>. คืนค่า: new ParseResults<>(commandContextBuilder2, parseResults.getReader(), parseResults.getExceptions()).

Parameters

  • ParseResults<S> parseResults
  • UnaryOperator<S> unaryOperator

ตัวอย่างใช้งาน

ParseResults<S> parseResults = ...;
UnaryOperator<S> unaryOperator = ...;
ParseResults<S> result = Commands.mapSource(parseResults, unaryOperator);

net.minecraft.commands.Commands#performCommand(ParseResults<CommandSourceStack>,String)

  • Origin: common
  • Source: net/minecraft/commands/Commands.java:268
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ performCommand ตาม implementation ของ Commands

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป ; มีการจัดการ exception. เรียกต่อ: getContext(), getSource(), get(), push(), finishParsing(), executeCommandInContext(), queueInitialCommandExecution(), literal(). สร้างออบเจ็กต์: HoverEvent.

Parameters

  • ParseResults<CommandSourceStack> parseResults
  • String string

ตัวอย่างใช้งาน

Commands instance = ...;
ParseResults<CommandSourceStack> parseResults = ...;
instance.performCommand(parseResults, "value");

net.minecraft.commands.Commands#performPrefixedCommand(CommandSourceStack,String)

  • Origin: common
  • Source: net/minecraft/commands/Commands.java:263
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ performPrefixedCommand ตาม implementation ของ Commands

ทำงานยังไง

เรียกต่อ: startsWith(), substring(), performCommand(), parse().

Parameters

  • CommandSourceStack commandSourceStack
  • String string

ตัวอย่างใช้งาน

Commands instance = ...;
CommandSourceStack commandSourceStack = ...;
instance.performPrefixedCommand(commandSourceStack, "value");

net.minecraft.commands.Commands#sendCommands(ServerPlayer)

  • Origin: common
  • Source: net/minecraft/commands/Commands.java:361
  • Modifiers: public
  • Return: void

คืออะไร

ส่ง Commands

ทำงานยังไง

เรียกต่อ: newHashMap(), put(), getRoot(), fillUsableCommands(), createCommandSourceStack(), send(). สร้างออบเจ็กต์: RootCommandNode<>, ClientboundCommandsPacket.

Parameters

  • ServerPlayer serverPlayer

ตัวอย่างใช้งาน

Commands instance = ...;
ServerPlayer serverPlayer = ...;
instance.sendCommands(serverPlayer);

net.minecraft.commands.Commands#validate()

  • Origin: common
  • Source: net/minecraft/commands/Commands.java:484
  • Modifiers: public static
  • Return: void

คืออะไร

ตรวจสอบความถูกต้อง validate

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: createValidationContext(), createLookup(), getDispatcher(), getRoot(), findAmbiguities(), warn(), getPath(), findUsedArgumentTypes(). สร้างออบเจ็กต์: Commands, IllegalStateException.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Commands.validate();

net.minecraft.commands.Commands#validateParseResults(ParseResults<S>)

  • Origin: common
  • Source: net/minecraft/commands/Commands.java:425
  • Modifiers: public static
  • Return: void

คืออะไร

ตรวจสอบความถูกต้อง Parse Results

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getParseException().

Parameters

  • ParseResults<S> parseResults

Throws

  • CommandSyntaxException

ตัวอย่างใช้งาน

ParseResults<S> parseResults = ...;
Commands.validateParseResults(parseResults);

Commands$ParseFunction

  • Full name: net.minecraft.commands.Commands$ParseFunction
  • Package: net.minecraft.commands
  • Source: commonnet/minecraft/commands/Commands.java
  • Type: interface
  • Modifiers: public

net.minecraft.commands.Commands$ParseFunction#parse(StringReader)

  • Origin: common
  • Source: net/minecraft/commands/Commands.java:519
  • Modifiers: ``
  • Return: void

คืออะไร

แปลง/วิเคราะห์ข้อมูล parse

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • StringReader stringReader

Throws

  • CommandSyntaxException

ตัวอย่างใช้งาน

Commands.ParseFunction instance = ...;
StringReader stringReader = ...;
instance.parse(stringReader);

CommandSigningContext

  • Full name: net.minecraft.commands.CommandSigningContext
  • Package: net.minecraft.commands
  • Source: commonnet/minecraft/commands/CommandSigningContext.java
  • Type: interface
  • Modifiers: public

net.minecraft.commands.CommandSigningContext#getArgument(String)

  • Origin: common
  • Source: net/minecraft/commands/CommandSigningContext.java:16
  • Modifiers: ``
  • Return: PlayerChatMessage

คืออะไร

อ่านค่า Argument

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • String string

ตัวอย่างใช้งาน

CommandSigningContext instance = ...;
PlayerChatMessage result = instance.getArgument("value");

CommandSource

  • Full name: net.minecraft.commands.CommandSource
  • Package: net.minecraft.commands
  • Source: commonnet/minecraft/commands/CommandSource.java
  • Type: interface
  • Modifiers: public

net.minecraft.commands.CommandSource#acceptsFailure()

  • Origin: common
  • Source: net/minecraft/commands/CommandSource.java:31
  • Modifiers: ``
  • Return: boolean

คืออะไร

ดำเนินการ acceptsFailure ตาม implementation ของ CommandSource

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

CommandSource instance = ...;
boolean result = instance.acceptsFailure();

net.minecraft.commands.CommandSource#acceptsSuccess()

  • Origin: common
  • Source: net/minecraft/commands/CommandSource.java:29
  • Modifiers: ``
  • Return: boolean

คืออะไร

ดำเนินการ acceptsSuccess ตาม implementation ของ CommandSource

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

CommandSource instance = ...;
boolean result = instance.acceptsSuccess();

net.minecraft.commands.CommandSource#alwaysAccepts()

  • Origin: common
  • Source: net/minecraft/commands/CommandSource.java:35
  • Modifiers: default
  • Return: boolean

คืออะไร

ดำเนินการ alwaysAccepts ตาม implementation ของ CommandSource

ทำงานยังไง

คืนค่า: false.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

CommandSource instance = ...;
boolean result = instance.alwaysAccepts();

net.minecraft.commands.CommandSource#sendSystemMessage(Component)

  • Origin: common
  • Source: net/minecraft/commands/CommandSource.java:27
  • Modifiers: ``
  • Return: void

คืออะไร

ส่ง System Message

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • Component component

ตัวอย่างใช้งาน

CommandSource instance = ...;
Component component = ...;
instance.sendSystemMessage(component);

net.minecraft.commands.CommandSource#shouldInformAdmins()

  • Origin: common
  • Source: net/minecraft/commands/CommandSource.java:33
  • Modifiers: ``
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Inform Admins

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

CommandSource instance = ...;
boolean result = instance.shouldInformAdmins();

CommandSourceStack

  • Full name: net.minecraft.commands.CommandSourceStack
  • Package: net.minecraft.commands
  • Source: commonnet/minecraft/commands/CommandSourceStack.java
  • Type: class
  • Modifiers: public
  • Implements: ExecutionCommandSource<CommandSourceStack>,SharedSuggestionProvider

net.minecraft.commands.CommandSourceStack#callback()

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:517
  • Modifiers: public
  • Return: CommandResultCallback

คืออะไร

ดำเนินการ callback ตาม implementation ของ CommandSourceStack

ทำงานยังไง

คืนค่า: this.resultCallback.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

CommandSourceStack instance = ...;
CommandResultCallback result = instance.callback();

net.minecraft.commands.CommandSourceStack#CommandSourceStack(CommandSource,Vec3,Vec2,ServerLevel,int,String,Component,MinecraftServer,Entity)

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:67
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ CommandSourceStack ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

เรียกต่อ: immediate().

Parameters

  • CommandSource commandSource
  • Vec3 vec3
  • Vec2 vec2
  • ServerLevel serverLevel
  • int i
  • String string
  • Component component
  • MinecraftServer minecraftServer
  • Entity entity

ตัวอย่างใช้งาน

CommandSource commandSource = ...;
Vec3 vec3 = ...;
Vec2 vec2 = ...;
ServerLevel serverLevel = ...;
Component component = ...;
MinecraftServer minecraftServer = ...;
Entity entity = ...;
CommandSourceStack instance = new CommandSourceStack(commandSource, vec3, vec2, serverLevel, 0, "value", component, minecraftServer, entity);

net.minecraft.commands.CommandSourceStack#CommandSourceStack(CommandSource,Vec3,Vec2,ServerLevel,int,String,Component,MinecraftServer,Entity,boolean,CommandResultCallback,EntityAnchorArgument.Anchor,CommandSigningContext,TaskChainer)

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:96
  • Modifiers: protected
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ CommandSourceStack ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: source, worldPosition, level, silent, entity, permissionLevel.

Parameters

  • CommandSource commandSource
  • Vec3 vec3
  • Vec2 vec2
  • ServerLevel serverLevel
  • int i
  • String string
  • Component component
  • MinecraftServer minecraftServer
  • Entity entity
  • boolean bl
  • CommandResultCallback commandResultCallback
  • EntityAnchorArgument.Anchor anchor
  • CommandSigningContext commandSigningContext
  • TaskChainer taskChainer

ตัวอย่างใช้งาน

CommandSource commandSource = ...;
Vec3 vec3 = ...;
Vec2 vec2 = ...;
ServerLevel serverLevel = ...;
Component component = ...;
MinecraftServer minecraftServer = ...;
Entity entity = ...;
CommandResultCallback commandResultCallback = ...;
EntityAnchorArgument.Anchor anchor = ...;
CommandSigningContext commandSigningContext = ...;
TaskChainer taskChainer = ...;
CommandSourceStack instance = new CommandSourceStack(commandSource, vec3, vec2, serverLevel, 0, "value", component, minecraftServer, entity, true, commandResultCallback, anchor, commandSigningContext, taskChainer);

net.minecraft.commands.CommandSourceStack#customSuggestion(CommandContext<?>)

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:537
  • Modifiers: public
  • Return: CompletableFuture<Suggestions>

คืออะไร

ดำเนินการ customSuggestion ตาม implementation ของ CommandSourceStack

ทำงานยังไง

เรียกต่อ: empty(). คืนค่า: Suggestions.empty().

Parameters

  • CommandContext<?> commandContext

ตัวอย่างใช้งาน

CommandSourceStack instance = ...;
CommandContext<?> commandContext = ...;
CompletableFuture<Suggestions> result = instance.customSuggestion(commandContext);

net.minecraft.commands.CommandSourceStack#dispatcher()

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:579
  • Modifiers: public
  • Return: CommandDispatcher<CommandSourceStack>

คืออะไร

ดำเนินการ dispatcher ตาม implementation ของ CommandSourceStack

ทำงานยังไง

เรียกต่อ: getServer(), getFunctions(), getDispatcher(). คืนค่า: this.getServer().getFunctions().getDispatcher().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

CommandSourceStack instance = ...;
CommandDispatcher<CommandSourceStack> result = instance.dispatcher();

net.minecraft.commands.CommandSourceStack#enabledFeatures()

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:574
  • Modifiers: public
  • Return: FeatureFlagSet

คืออะไร

ดำเนินการ enabledFeatures ตาม implementation ของ CommandSourceStack

ทำงานยังไง

คืนค่า: this.level.enabledFeatures().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

CommandSourceStack instance = ...;
FeatureFlagSet result = instance.enabledFeatures();

net.minecraft.commands.CommandSourceStack#facing(Entity,EntityAnchorArgument.Anchor)

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:347
  • Modifiers: public
  • Return: CommandSourceStack

คืออะไร

ดำเนินการ facing ตาม implementation ของ CommandSourceStack

ทำงานยังไง

เรียกต่อ: apply(). คืนค่า: this.facing(anchor.apply(entity)).

Parameters

  • Entity entity
  • EntityAnchorArgument.Anchor anchor

ตัวอย่างใช้งาน

CommandSourceStack instance = ...;
Entity entity = ...;
EntityAnchorArgument.Anchor anchor = ...;
CommandSourceStack result = instance.facing(entity, anchor);

net.minecraft.commands.CommandSourceStack#facing(Vec3)

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:351
  • Modifiers: public
  • Return: CommandSourceStack

คืออะไร

ดำเนินการ facing ตาม implementation ของ CommandSourceStack

ทำงานยังไง

เรียกต่อ: apply(), sqrt(), wrapDegrees(), atan2(), withRotation(). สร้างออบเจ็กต์: Vec2. คืนค่า: this.withRotation(new Vec2(h, i)).

Parameters

  • Vec3 vec3

ตัวอย่างใช้งาน

CommandSourceStack instance = ...;
Vec3 vec3 = ...;
CommandSourceStack result = instance.facing(vec3);

net.minecraft.commands.CommandSourceStack#getAllTeams()

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:527
  • Modifiers: public
  • Return: Collection<String>

คืออะไร

อ่านค่า All Teams

ทำงานยังไง

เรียกต่อ: getScoreboard(), getTeamNames(). คืนค่า: this.server.getScoreboard().getTeamNames().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

CommandSourceStack instance = ...;
Collection<String> result = instance.getAllTeams();

net.minecraft.commands.CommandSourceStack#getAnchor()

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:442
  • Modifiers: public
  • Return: EntityAnchorArgument.Anchor

คืออะไร

อ่านค่า Anchor

ทำงานยังไง

คืนค่า: this.anchor.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

CommandSourceStack instance = ...;
EntityAnchorArgument.Anchor result = instance.getAnchor();

net.minecraft.commands.CommandSourceStack#getAvailableSounds()

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:532
  • Modifiers: public
  • Return: Stream<ResourceLocation>

คืออะไร

อ่านค่า Available Sounds

ทำงานยังไง

เรียกต่อ: stream(), map(). คืนค่า: BuiltInRegistries.SOUND_EVENT.stream().map(SoundEvent::location).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

CommandSourceStack instance = ...;
Stream<ResourceLocation> result = instance.getAvailableSounds();

net.minecraft.commands.CommandSourceStack#getChatMessageChainer()

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:450
  • Modifiers: public
  • Return: TaskChainer

คืออะไร

อ่านค่า Chat Message Chainer

ทำงานยังไง

คืนค่า: this.chatMessageChainer.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

CommandSourceStack instance = ...;
TaskChainer result = instance.getChatMessageChainer();

net.minecraft.commands.CommandSourceStack#getDisplayName()

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:383
  • Modifiers: public
  • Return: Component

คืออะไร

อ่านค่า Display Name

ทำงานยังไง

คืนค่า: this.displayName.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

CommandSourceStack instance = ...;
Component result = instance.getDisplayName();

net.minecraft.commands.CommandSourceStack#getEntity()

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:404
  • Modifiers: public
  • Return: Entity

คืออะไร

อ่านค่า Entity

ทำงานยังไง

คืนค่า: this.entity.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

CommandSourceStack instance = ...;
Entity result = instance.getEntity();

net.minecraft.commands.CommandSourceStack#getEntityOrException()

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:409
  • Modifiers: public
  • Return: Entity

คืออะไร

อ่านค่า Entity Or Exception

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: entity. เรียกต่อ: create(). คืนค่า: this.entity.

Parameters

  • ไม่มี

Throws

  • CommandSyntaxException

ตัวอย่างใช้งาน

CommandSourceStack instance = ...;
Entity result = instance.getEntityOrException();

net.minecraft.commands.CommandSourceStack#getLevel()

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:400
  • Modifiers: public
  • Return: ServerLevel

คืออะไร

อ่านค่า Level

ทำงานยังไง

คืนค่า: this.level.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

CommandSourceStack instance = ...;
ServerLevel result = instance.getLevel();

net.minecraft.commands.CommandSourceStack#getOnlinePlayerNames()

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:522
  • Modifiers: public
  • Return: Collection<String>

คืออะไร

อ่านค่า Online Player Names

ทำงานยังไง

เรียกต่อ: newArrayList(), getPlayerNames(). คืนค่า: Lists.newArrayList(this.server.getPlayerNames()).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

CommandSourceStack instance = ...;
Collection<String> result = instance.getOnlinePlayerNames();

net.minecraft.commands.CommandSourceStack#getPlayer()

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:425
  • Modifiers: public
  • Return: ServerPlayer

คืออะไร

อ่านค่า Player

ทำงานยังไง

คืนค่า: this.entity instanceof ServerPlayer serverPlayer ? serverPlayer : null.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

CommandSourceStack instance = ...;
ServerPlayer result = instance.getPlayer();

net.minecraft.commands.CommandSourceStack#getPlayerOrException()

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:417
  • Modifiers: public
  • Return: ServerPlayer

คืออะไร

อ่านค่า Player Or Exception

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: create(). คืนค่า: serverPlayer.

Parameters

  • ไม่มี

Throws

  • CommandSyntaxException

ตัวอย่างใช้งาน

CommandSourceStack instance = ...;
ServerPlayer result = instance.getPlayerOrException();

net.minecraft.commands.CommandSourceStack#getPosition()

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:396
  • Modifiers: public
  • Return: Vec3

คืออะไร

อ่านค่า Position

ทำงานยังไง

คืนค่า: this.worldPosition.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

CommandSourceStack instance = ...;
Vec3 result = instance.getPosition();

net.minecraft.commands.CommandSourceStack#getRotation()

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:434
  • Modifiers: public
  • Return: Vec2

คืออะไร

อ่านค่า Rotation

ทำงานยังไง

คืนค่า: this.rotation.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

CommandSourceStack instance = ...;
Vec2 result = instance.getRotation();

net.minecraft.commands.CommandSourceStack#getServer()

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:438
  • Modifiers: public
  • Return: MinecraftServer

คืออะไร

อ่านค่า Server

ทำงานยังไง

คืนค่า: this.server.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

CommandSourceStack instance = ...;
MinecraftServer result = instance.getServer();

net.minecraft.commands.CommandSourceStack#getSigningContext()

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:446
  • Modifiers: public
  • Return: CommandSigningContext

คืออะไร

อ่านค่า Signing Context

ทำงานยังไง

คืนค่า: this.signingContext.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

CommandSourceStack instance = ...;
CommandSigningContext result = instance.getSigningContext();

net.minecraft.commands.CommandSourceStack#getTextName()

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:387
  • Modifiers: public
  • Return: String

คืออะไร

อ่านค่า Text Name

ทำงานยังไง

คืนค่า: this.textName.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

CommandSourceStack instance = ...;
String result = instance.getTextName();

net.minecraft.commands.CommandSourceStack#handleError(CommandExceptionType,Message,boolean,TraceCallbacks)

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:584
  • Modifiers: public
  • Return: void

คืออะไร

จัดการ Error

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: onError(), getString(), sendFailure(), fromMessage().

Parameters

  • CommandExceptionType commandExceptionType
  • Message message
  • boolean bl
  • TraceCallbacks traceCallbacks

ตัวอย่างใช้งาน

CommandSourceStack instance = ...;
CommandExceptionType commandExceptionType = ...;
Message message = ...;
TraceCallbacks traceCallbacks = ...;
instance.handleError(commandExceptionType, message, true, traceCallbacks);

net.minecraft.commands.CommandSourceStack#hasPermission(int)

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:391
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่ามี Permission

ทำงานยังไง

คืนค่า: this.permissionLevel >= i.

Parameters

  • int i

ตัวอย่างใช้งาน

CommandSourceStack instance = ...;
boolean result = instance.hasPermission(0);

net.minecraft.commands.CommandSourceStack#isPlayer()

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:430
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Player

ทำงานยังไง

คืนค่า: this.entity instanceof ServerPlayer.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

CommandSourceStack instance = ...;
boolean result = instance.isPlayer();

net.minecraft.commands.CommandSourceStack#isSilent()

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:595
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Silent

ทำงานยังไง

คืนค่า: this.silent.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

CommandSourceStack instance = ...;
boolean result = instance.isSilent();

net.minecraft.commands.CommandSourceStack#levels()

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:564
  • Modifiers: public
  • Return: Set<ResourceKey<Level>>

คืออะไร

ดำเนินการ levels ตาม implementation ของ CommandSourceStack

ทำงานยังไง

เรียกต่อ: levelKeys(). คืนค่า: this.server.levelKeys().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

CommandSourceStack instance = ...;
Set<ResourceKey<Level>> result = instance.levels();

net.minecraft.commands.CommandSourceStack#registryAccess()

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:569
  • Modifiers: public
  • Return: RegistryAccess

คืออะไร

ดำเนินการ registryAccess ตาม implementation ของ CommandSourceStack

ทำงานยังไง

คืนค่า: this.server.registryAccess().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

CommandSourceStack instance = ...;
RegistryAccess result = instance.registryAccess();

net.minecraft.commands.CommandSourceStack#sendChatMessage(OutgoingChatMessage,boolean,ChatType.Bound)

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:459
  • Modifiers: public
  • Return: void

คืออะไร

ส่ง Chat Message

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getPlayer(), sendSystemMessage(), decorate(), content().

Parameters

  • OutgoingChatMessage outgoingChatMessage
  • boolean bl
  • ChatType.Bound bound

ตัวอย่างใช้งาน

CommandSourceStack instance = ...;
OutgoingChatMessage outgoingChatMessage = ...;
ChatType.Bound bound = ...;
instance.sendChatMessage(outgoingChatMessage, true, bound);

net.minecraft.commands.CommandSourceStack#sendFailure(Component)

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:511
  • Modifiers: public
  • Return: void

คืออะไร

ส่ง Failure

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: acceptsFailure(), sendSystemMessage(), empty(), append(), withStyle().

Parameters

  • Component component

ตัวอย่างใช้งาน

CommandSourceStack instance = ...;
Component component = ...;
instance.sendFailure(component);

net.minecraft.commands.CommandSourceStack#sendSuccess(Supplier<Component>,boolean)

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:481
  • Modifiers: public
  • Return: void

คืออะไร

ส่ง Success

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: acceptsSuccess(), shouldInformAdmins(), get(), sendSystemMessage(), broadcastToAdmins().

Parameters

  • Supplier<Component> supplier
  • boolean bl

ตัวอย่างใช้งาน

CommandSourceStack instance = ...;
Supplier<Component> supplier = ...;
instance.sendSuccess(supplier, true);

net.minecraft.commands.CommandSourceStack#sendSystemMessage(Component)

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:470
  • Modifiers: public
  • Return: void

คืออะไร

ส่ง System Message

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getPlayer().

Parameters

  • Component component

ตัวอย่างใช้งาน

CommandSourceStack instance = ...;
Component component = ...;
instance.sendSystemMessage(component);

net.minecraft.commands.CommandSourceStack#shouldFilterMessageTo(ServerPlayer)

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:454
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Filter Message To

ทำงานยังไง

เรียกต่อ: getPlayer(), isTextFilteringEnabled(). คืนค่า: serverPlayer == serverPlayer2 ? false : serverPlayer2 != null && serverPlayer2.isTextFilteringEnabled() || serverPlayer.isTextFilteringEnabled().

Parameters

  • ServerPlayer serverPlayer

ตัวอย่างใช้งาน

CommandSourceStack instance = ...;
ServerPlayer serverPlayer = ...;
boolean result = instance.shouldFilterMessageTo(serverPlayer);

net.minecraft.commands.CommandSourceStack#suggestRegistryElements(ResourceKey<? extends Registry<?>>,SharedSuggestionProvider.ElementSuggestionType,SuggestionsBuilder,CommandContext<?>)

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:542
  • Modifiers: public
  • Return: CompletableFuture<Suggestions>

คืออะไร

ดำเนินการ suggestRegistryElements ตาม implementation ของ CommandSourceStack

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: suggestResource(), getRecipeManager(), getRecipes(), stream(), map(), id(), location(), getAdvancements(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • ResourceKey<? extends Registry<?>> resourceKey
  • SharedSuggestionProvider.ElementSuggestionType elementSuggestionType
  • SuggestionsBuilder suggestionsBuilder
  • CommandContext<?> commandContext

ตัวอย่างใช้งาน

CommandSourceStack instance = ...;
ResourceKey<? extends Registry<?>> resourceKey = ...;
SharedSuggestionProvider.ElementSuggestionType elementSuggestionType = ...;
SuggestionsBuilder suggestionsBuilder = ...;
CommandContext<?> commandContext = ...;
CompletableFuture<Suggestions> result = instance.suggestRegistryElements(resourceKey, elementSuggestionType, suggestionsBuilder, commandContext);

net.minecraft.commands.CommandSourceStack#withAnchor(EntityAnchorArgument.Anchor)

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:301
  • Modifiers: public
  • Return: CommandSourceStack

คืออะไร

ดำเนินการ withAnchor ตาม implementation ของ CommandSourceStack

ทำงานยังไง

สร้างออบเจ็กต์: CommandSourceStack.

Parameters

  • EntityAnchorArgument.Anchor anchor

ตัวอย่างใช้งาน

CommandSourceStack instance = ...;
EntityAnchorArgument.Anchor anchor = ...;
CommandSourceStack result = instance.withAnchor(anchor);

net.minecraft.commands.CommandSourceStack#withCallback(CommandResultCallback)

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:212
  • Modifiers: public
  • Return: CommandSourceStack

คืออะไร

ดำเนินการ withCallback ตาม implementation ของ CommandSourceStack

ทำงานยังไง

เรียกต่อ: equals(). สร้างออบเจ็กต์: CommandSourceStack.

Parameters

  • CommandResultCallback commandResultCallback

ตัวอย่างใช้งาน

CommandSourceStack instance = ...;
CommandResultCallback commandResultCallback = ...;
CommandSourceStack result = instance.withCallback(commandResultCallback);

net.minecraft.commands.CommandSourceStack#withCallback(CommandResultCallback,BinaryOperator<CommandResultCallback>)

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:233
  • Modifiers: public
  • Return: CommandSourceStack

คืออะไร

ดำเนินการ withCallback ตาม implementation ของ CommandSourceStack

ทำงานยังไง

เรียกต่อ: apply(). คืนค่า: this.withCallback(commandResultCallback2).

Parameters

  • CommandResultCallback commandResultCallback
  • BinaryOperator<CommandResultCallback> binaryOperator

ตัวอย่างใช้งาน

CommandSourceStack instance = ...;
CommandResultCallback commandResultCallback = ...;
BinaryOperator<CommandResultCallback> binaryOperator = ...;
CommandSourceStack result = instance.withCallback(commandResultCallback, binaryOperator);

net.minecraft.commands.CommandSourceStack#withEntity(Entity)

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:149
  • Modifiers: public
  • Return: CommandSourceStack

คืออะไร

ดำเนินการ withEntity ตาม implementation ของ CommandSourceStack

ทำงานยังไง

แก้ state: entity. เรียกต่อ: getName(), getString(), getDisplayName(). สร้างออบเจ็กต์: CommandSourceStack.

Parameters

  • Entity entity

ตัวอย่างใช้งาน

CommandSourceStack instance = ...;
Entity entity = ...;
CommandSourceStack result = instance.withEntity(entity);

net.minecraft.commands.CommandSourceStack#withLevel(ServerLevel)

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:322
  • Modifiers: public
  • Return: CommandSourceStack

คืออะไร

ดำเนินการ withLevel ตาม implementation ของ CommandSourceStack

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getTeleportationScale(), dimensionType(). สร้างออบเจ็กต์: Vec3, CommandSourceStack. คืนค่า: this.

Parameters

  • ServerLevel serverLevel

ตัวอย่างใช้งาน

CommandSourceStack instance = ...;
ServerLevel serverLevel = ...;
CommandSourceStack result = instance.withLevel(serverLevel);

net.minecraft.commands.CommandSourceStack#withMaximumPermission(int)

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:280
  • Modifiers: public
  • Return: CommandSourceStack

คืออะไร

ดำเนินการ withMaximumPermission ตาม implementation ของ CommandSourceStack

ทำงานยังไง

สร้างออบเจ็กต์: CommandSourceStack.

Parameters

  • int i

ตัวอย่างใช้งาน

CommandSourceStack instance = ...;
CommandSourceStack result = instance.withMaximumPermission(0);

net.minecraft.commands.CommandSourceStack#withPermission(int)

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:259
  • Modifiers: public
  • Return: CommandSourceStack

คืออะไร

ดำเนินการ withPermission ตาม implementation ของ CommandSourceStack

ทำงานยังไง

สร้างออบเจ็กต์: CommandSourceStack.

Parameters

  • int i

ตัวอย่างใช้งาน

CommandSourceStack instance = ...;
CommandSourceStack result = instance.withPermission(0);

net.minecraft.commands.CommandSourceStack#withPosition(Vec3)

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:170
  • Modifiers: public
  • Return: CommandSourceStack

คืออะไร

ดำเนินการ withPosition ตาม implementation ของ CommandSourceStack

ทำงานยังไง

เรียกต่อ: equals(). สร้างออบเจ็กต์: CommandSourceStack.

Parameters

  • Vec3 vec3

ตัวอย่างใช้งาน

CommandSourceStack instance = ...;
Vec3 vec3 = ...;
CommandSourceStack result = instance.withPosition(vec3);

net.minecraft.commands.CommandSourceStack#withRotation(Vec2)

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:191
  • Modifiers: public
  • Return: CommandSourceStack

คืออะไร

ดำเนินการ withRotation ตาม implementation ของ CommandSourceStack

ทำงานยังไง

เรียกต่อ: equals(). สร้างออบเจ็กต์: CommandSourceStack.

Parameters

  • Vec2 vec2

ตัวอย่างใช้งาน

CommandSourceStack instance = ...;
Vec2 vec2 = ...;
CommandSourceStack result = instance.withRotation(vec2);

net.minecraft.commands.CommandSourceStack#withSigningContext(CommandSigningContext,TaskChainer)

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:362
  • Modifiers: public
  • Return: CommandSourceStack

คืออะไร

ดำเนินการ withSigningContext ตาม implementation ของ CommandSourceStack

ทำงานยังไง

สร้างออบเจ็กต์: CommandSourceStack.

Parameters

  • CommandSigningContext commandSigningContext
  • TaskChainer taskChainer

ตัวอย่างใช้งาน

CommandSourceStack instance = ...;
CommandSigningContext commandSigningContext = ...;
TaskChainer taskChainer = ...;
CommandSourceStack result = instance.withSigningContext(commandSigningContext, taskChainer);

net.minecraft.commands.CommandSourceStack#withSource(CommandSource)

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:128
  • Modifiers: public
  • Return: CommandSourceStack

คืออะไร

ดำเนินการ withSource ตาม implementation ของ CommandSourceStack

ทำงานยังไง

แก้ state: source. สร้างออบเจ็กต์: CommandSourceStack.

Parameters

  • CommandSource commandSource

ตัวอย่างใช้งาน

CommandSourceStack instance = ...;
CommandSource commandSource = ...;
CommandSourceStack result = instance.withSource(commandSource);

net.minecraft.commands.CommandSourceStack#withSuppressedOutput()

  • Origin: common
  • Source: net/minecraft/commands/CommandSourceStack.java:238
  • Modifiers: public
  • Return: CommandSourceStack

คืออะไร

ดำเนินการ withSuppressedOutput ตาม implementation ของ CommandSourceStack

ทำงานยังไง

เรียกต่อ: alwaysAccepts(). สร้างออบเจ็กต์: CommandSourceStack.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

CommandSourceStack instance = ...;
CommandSourceStack result = instance.withSuppressedOutput();

ExecutionCommandSource

  • Full name: net.minecraft.commands.ExecutionCommandSource
  • Package: net.minecraft.commands
  • Source: commonnet/minecraft/commands/ExecutionCommandSource.java
  • Type: interface
  • Modifiers: public

net.minecraft.commands.ExecutionCommandSource#callback()

  • Origin: common
  • Source: net/minecraft/commands/ExecutionCommandSource.java:16
  • Modifiers: ``
  • Return: CommandResultCallback

คืออะไร

ดำเนินการ callback ตาม implementation ของ ExecutionCommandSource

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ExecutionCommandSource instance = ...;
CommandResultCallback result = instance.callback();

net.minecraft.commands.ExecutionCommandSource#clearCallbacks()

  • Origin: common
  • Source: net/minecraft/commands/ExecutionCommandSource.java:18
  • Modifiers: default
  • Return: T

คืออะไร

ล้าง Callbacks

ทำงานยังไง

เรียกต่อ: withCallback(). คืนค่า: this.withCallback(CommandResultCallback.EMPTY).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ExecutionCommandSource instance = ...;
T result = instance.clearCallbacks();

net.minecraft.commands.ExecutionCommandSource#dispatcher()

  • Origin: common
  • Source: net/minecraft/commands/ExecutionCommandSource.java:22
  • Modifiers: ``
  • Return: CommandDispatcher<T>

คืออะไร

ดำเนินการ dispatcher ตาม implementation ของ ExecutionCommandSource

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ExecutionCommandSource instance = ...;
CommandDispatcher<T> result = instance.dispatcher();

net.minecraft.commands.ExecutionCommandSource#handleError(CommandExceptionType,Message,boolean,TraceCallbacks)

  • Origin: common
  • Source: net/minecraft/commands/ExecutionCommandSource.java:24
  • Modifiers: ``
  • Return: void

คืออะไร

จัดการ Error

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • CommandExceptionType commandExceptionType
  • Message message
  • boolean bl
  • TraceCallbacks traceCallbacks

ตัวอย่างใช้งาน

ExecutionCommandSource instance = ...;
CommandExceptionType commandExceptionType = ...;
Message message = ...;
TraceCallbacks traceCallbacks = ...;
instance.handleError(commandExceptionType, message, true, traceCallbacks);

net.minecraft.commands.ExecutionCommandSource#handleError(CommandSyntaxException,boolean,TraceCallbacks)

  • Origin: common
  • Source: net/minecraft/commands/ExecutionCommandSource.java:28
  • Modifiers: default
  • Return: void

คืออะไร

จัดการ Error

ทำงานยังไง

เรียกต่อ: getType(), getRawMessage().

Parameters

  • CommandSyntaxException commandSyntaxException
  • boolean bl
  • TraceCallbacks traceCallbacks

ตัวอย่างใช้งาน

ExecutionCommandSource instance = ...;
CommandSyntaxException commandSyntaxException = ...;
TraceCallbacks traceCallbacks = ...;
instance.handleError(commandSyntaxException, true, traceCallbacks);

net.minecraft.commands.ExecutionCommandSource#hasPermission(int)

  • Origin: common
  • Source: net/minecraft/commands/ExecutionCommandSource.java:12
  • Modifiers: ``
  • Return: boolean

คืออะไร

ตรวจสอบว่ามี Permission

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • int i

ตัวอย่างใช้งาน

ExecutionCommandSource instance = ...;
boolean result = instance.hasPermission(0);

net.minecraft.commands.ExecutionCommandSource#isSilent()

  • Origin: common
  • Source: net/minecraft/commands/ExecutionCommandSource.java:26
  • Modifiers: ``
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Silent

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ExecutionCommandSource instance = ...;
boolean result = instance.isSilent();

net.minecraft.commands.ExecutionCommandSource#resultConsumer()

  • Origin: common
  • Source: net/minecraft/commands/ExecutionCommandSource.java:32
  • Modifiers: static
  • Return: ResultConsumer<T>

คืออะไร

ดำเนินการ resultConsumer ตาม implementation ของ ExecutionCommandSource

ทำงานยังไง

เรียกต่อ: getSource(), callback(), onResult(). คืนค่า: (commandContext, bl, i) -> commandContext.getSource().callback().onResult(bl, i).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ResultConsumer<T> result = ExecutionCommandSource.resultConsumer();

net.minecraft.commands.ExecutionCommandSource#withCallback(CommandResultCallback)

  • Origin: common
  • Source: net/minecraft/commands/ExecutionCommandSource.java:14
  • Modifiers: ``
  • Return: T

คืออะไร

ดำเนินการ withCallback ตาม implementation ของ ExecutionCommandSource

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • CommandResultCallback commandResultCallback

ตัวอย่างใช้งาน

ExecutionCommandSource instance = ...;
CommandResultCallback commandResultCallback = ...;
T result = instance.withCallback(commandResultCallback);

FunctionInstantiationException

  • Full name: net.minecraft.commands.FunctionInstantiationException
  • Package: net.minecraft.commands
  • Source: commonnet/minecraft/commands/FunctionInstantiationException.java
  • Type: class
  • Modifiers: public
  • Extends: Exception

net.minecraft.commands.FunctionInstantiationException#FunctionInstantiationException(Component)

  • Origin: common
  • Source: net/minecraft/commands/FunctionInstantiationException.java:8
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ FunctionInstantiationException ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: messageComponent. เรียกต่อ: getString().

Parameters

  • Component component

ตัวอย่างใช้งาน

Component component = ...;
FunctionInstantiationException instance = new FunctionInstantiationException(component);

net.minecraft.commands.FunctionInstantiationException#messageComponent()

  • Origin: common
  • Source: net/minecraft/commands/FunctionInstantiationException.java:13
  • Modifiers: public
  • Return: Component

คืออะไร

ดำเนินการ messageComponent ตาม implementation ของ FunctionInstantiationException

ทำงานยังไง

คืนค่า: this.messageComponent.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

FunctionInstantiationException instance = ...;
Component result = instance.messageComponent();

ParserUtils

  • Full name: net.minecraft.commands.ParserUtils
  • Package: net.minecraft.commands
  • Source: commonnet/minecraft/commands/ParserUtils.java
  • Type: class
  • Modifiers: public

net.minecraft.commands.ParserUtils#parseJson(HolderLookup.Provider,StringReader,Codec<T>)

  • Origin: common
  • Source: net/minecraft/commands/ParserUtils.java:43
  • Modifiers: public static
  • Return: T

คืออะไร

แปลง/วิเคราะห์ข้อมูล Json

ทำงานยังไง

มีการจัดการ exception. เรียกต่อ: StringReader(), getRemaining(), setLenient(), parse(), createSerializationContext(), getOrThrow(), setCursor(), getCursor(). สร้างออบเจ็กต์: JsonReader, java.io.StringReader, JsonParseException. คืนค่า: codec.parse(provider.createSerializationContext(JsonOps.INSTANCE), jsonElement).getOrThrow(JsonParseException::new).

Parameters

  • HolderLookup.Provider provider
  • StringReader stringReader
  • Codec<T> codec

ตัวอย่างใช้งาน

HolderLookup.Provider provider = ...;
StringReader stringReader = ...;
Codec<T> codec = ...;
T result = ParserUtils.parseJson(provider, stringReader, codec);

net.minecraft.commands.ParserUtils#readWhile(StringReader,CharPredicate)

  • Origin: common
  • Source: net/minecraft/commands/ParserUtils.java:57
  • Modifiers: public static
  • Return: String

คืออะไร

อ่าน While

ทำงานยังไง

มีการวนลูป. เรียกต่อ: getCursor(), canRead(), test(), peek(), skip(), getString(), substring(). คืนค่า: stringReader.getString().substring(i, stringReader.getCursor()).

Parameters

  • StringReader stringReader
  • CharPredicate charPredicate

ตัวอย่างใช้งาน

StringReader stringReader = ...;
CharPredicate charPredicate = ...;
String result = ParserUtils.readWhile(stringReader, charPredicate);

SharedSuggestionProvider

  • Full name: net.minecraft.commands.SharedSuggestionProvider
  • Package: net.minecraft.commands
  • Source: commonnet/minecraft/commands/SharedSuggestionProvider.java
  • Type: interface
  • Modifiers: public

net.minecraft.commands.SharedSuggestionProvider#customSuggestion(CommandContext<?>)

  • Origin: common
  • Source: net/minecraft/commands/SharedSuggestionProvider.java:44
  • Modifiers: ``
  • Return: CompletableFuture<Suggestions>

คืออะไร

ดำเนินการ customSuggestion ตาม implementation ของ SharedSuggestionProvider

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • CommandContext<?> commandContext

ตัวอย่างใช้งาน

SharedSuggestionProvider instance = ...;
CommandContext<?> commandContext = ...;
CompletableFuture<Suggestions> result = instance.customSuggestion(commandContext);

net.minecraft.commands.SharedSuggestionProvider#enabledFeatures()

  • Origin: common
  • Source: net/minecraft/commands/SharedSuggestionProvider.java:58
  • Modifiers: ``
  • Return: FeatureFlagSet

คืออะไร

ดำเนินการ enabledFeatures ตาม implementation ของ SharedSuggestionProvider

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SharedSuggestionProvider instance = ...;
FeatureFlagSet result = instance.enabledFeatures();

net.minecraft.commands.SharedSuggestionProvider#filterResources(Iterable<T>,String,Function<T, ResourceLocation>,Consumer<T>)

  • Origin: common
  • Source: net/minecraft/commands/SharedSuggestionProvider.java:81
  • Modifiers: static
  • Return: void

คืออะไร

ดำเนินการ filterResources ตาม implementation ของ SharedSuggestionProvider

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: indexOf(), apply(), toString(), matchesSubStr(), accept(), getNamespace(), equals(), getPath().

Parameters

  • Iterable<T> iterable
  • String string
  • Function<T, ResourceLocation> function
  • Consumer<T> consumer

ตัวอย่างใช้งาน

Iterable<T> iterable = ...;
Function<T, ResourceLocation> function = ...;
Consumer<T> consumer = ...;
SharedSuggestionProvider.filterResources(iterable, "value", function, consumer);

net.minecraft.commands.SharedSuggestionProvider#filterResources(Iterable<T>,String,String,Function<T, ResourceLocation>,Consumer<T>)

  • Origin: common
  • Source: net/minecraft/commands/SharedSuggestionProvider.java:98
  • Modifiers: static
  • Return: void

คืออะไร

ดำเนินการ filterResources ตาม implementation ของ SharedSuggestionProvider

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isEmpty(), forEach(), commonPrefix(), substring(), length().

Parameters

  • Iterable<T> iterable
  • String string
  • String string2
  • Function<T, ResourceLocation> function
  • Consumer<T> consumer

ตัวอย่างใช้งาน

Iterable<T> iterable = ...;
Function<T, ResourceLocation> function = ...;
Consumer<T> consumer = ...;
SharedSuggestionProvider.filterResources(iterable, "value", "value", function, consumer);

net.minecraft.commands.SharedSuggestionProvider#getAbsoluteCoordinates()

  • Origin: common
  • Source: net/minecraft/commands/SharedSuggestionProvider.java:50
  • Modifiers: default
  • Return: Collection<SharedSuggestionProvider.TextCoordinates>

คืออะไร

อ่านค่า Absolute Coordinates

ทำงานยังไง

เรียกต่อ: singleton(). คืนค่า: Collections.singleton(SharedSuggestionProvider.TextCoordinates.DEFAULT_GLOBAL).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SharedSuggestionProvider instance = ...;
Collection<SharedSuggestionProvider.TextCoordinates> result = instance.getAbsoluteCoordinates();

net.minecraft.commands.SharedSuggestionProvider#getAllTeams()

  • Origin: common
  • Source: net/minecraft/commands/SharedSuggestionProvider.java:40
  • Modifiers: ``
  • Return: Collection<String>

คืออะไร

อ่านค่า All Teams

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SharedSuggestionProvider instance = ...;
Collection<String> result = instance.getAllTeams();

net.minecraft.commands.SharedSuggestionProvider#getAvailableSounds()

  • Origin: common
  • Source: net/minecraft/commands/SharedSuggestionProvider.java:42
  • Modifiers: ``
  • Return: Stream<ResourceLocation>

คืออะไร

อ่านค่า Available Sounds

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SharedSuggestionProvider instance = ...;
Stream<ResourceLocation> result = instance.getAvailableSounds();

net.minecraft.commands.SharedSuggestionProvider#getCustomTabSugggestions()

  • Origin: common
  • Source: net/minecraft/commands/SharedSuggestionProvider.java:32
  • Modifiers: default
  • Return: Collection<String>

คืออะไร

อ่านค่า Custom Tab Sugggestions

ทำงานยังไง

เรียกต่อ: getOnlinePlayerNames(). คืนค่า: this.getOnlinePlayerNames().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SharedSuggestionProvider instance = ...;
Collection<String> result = instance.getCustomTabSugggestions();

net.minecraft.commands.SharedSuggestionProvider#getOnlinePlayerNames()

  • Origin: common
  • Source: net/minecraft/commands/SharedSuggestionProvider.java:30
  • Modifiers: ``
  • Return: Collection<String>

คืออะไร

อ่านค่า Online Player Names

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SharedSuggestionProvider instance = ...;
Collection<String> result = instance.getOnlinePlayerNames();

net.minecraft.commands.SharedSuggestionProvider#getRelevantCoordinates()

  • Origin: common
  • Source: net/minecraft/commands/SharedSuggestionProvider.java:46
  • Modifiers: default
  • Return: Collection<SharedSuggestionProvider.TextCoordinates>

คืออะไร

อ่านค่า Relevant Coordinates

ทำงานยังไง

เรียกต่อ: singleton(). คืนค่า: Collections.singleton(SharedSuggestionProvider.TextCoordinates.DEFAULT_GLOBAL).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SharedSuggestionProvider instance = ...;
Collection<SharedSuggestionProvider.TextCoordinates> result = instance.getRelevantCoordinates();

net.minecraft.commands.SharedSuggestionProvider#getSelectedEntities()

  • Origin: common
  • Source: net/minecraft/commands/SharedSuggestionProvider.java:36
  • Modifiers: default
  • Return: Collection<String>

คืออะไร

อ่านค่า Selected Entities

ทำงานยังไง

เรียกต่อ: emptyList(). คืนค่า: Collections.emptyList().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SharedSuggestionProvider instance = ...;
Collection<String> result = instance.getSelectedEntities();

net.minecraft.commands.SharedSuggestionProvider#hasPermission(int)

  • Origin: common
  • Source: net/minecraft/commands/SharedSuggestionProvider.java:79
  • Modifiers: ``
  • Return: boolean

คืออะไร

ตรวจสอบว่ามี Permission

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • int i

ตัวอย่างใช้งาน

SharedSuggestionProvider instance = ...;
boolean result = instance.hasPermission(0);

net.minecraft.commands.SharedSuggestionProvider#levels()

  • Origin: common
  • Source: net/minecraft/commands/SharedSuggestionProvider.java:54
  • Modifiers: ``
  • Return: Set<ResourceKey<Level>>

คืออะไร

ดำเนินการ levels ตาม implementation ของ SharedSuggestionProvider

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SharedSuggestionProvider instance = ...;
Set<ResourceKey<Level>> result = instance.levels();

net.minecraft.commands.SharedSuggestionProvider#matchesSubStr(String,String)

  • Origin: common
  • Source: net/minecraft/commands/SharedSuggestionProvider.java:252
  • Modifiers: static
  • Return: boolean

คืออะไร

ดำเนินการ matchesSubStr ตาม implementation ของ SharedSuggestionProvider

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: startsWith(), indexIn(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • String string
  • String string2

ตัวอย่างใช้งาน

boolean result = SharedSuggestionProvider.matchesSubStr("value", "value");

net.minecraft.commands.SharedSuggestionProvider#registryAccess()

  • Origin: common
  • Source: net/minecraft/commands/SharedSuggestionProvider.java:56
  • Modifiers: ``
  • Return: RegistryAccess

คืออะไร

ดำเนินการ registryAccess ตาม implementation ของ SharedSuggestionProvider

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SharedSuggestionProvider instance = ...;
RegistryAccess result = instance.registryAccess();

net.minecraft.commands.SharedSuggestionProvider#suggest(Iterable<String>,SuggestionsBuilder)

  • Origin: common
  • Source: net/minecraft/commands/SharedSuggestionProvider.java:207
  • Modifiers: static
  • Return: CompletableFuture<Suggestions>

คืออะไร

ดำเนินการ suggest ตาม implementation ของ SharedSuggestionProvider

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getRemaining(), toLowerCase(), matchesSubStr(), buildFuture(). คืนค่า: suggestionsBuilder.buildFuture().

Parameters

  • Iterable<String> iterable
  • SuggestionsBuilder suggestionsBuilder

ตัวอย่างใช้งาน

Iterable<String> iterable = ...;
SuggestionsBuilder suggestionsBuilder = ...;
CompletableFuture<Suggestions> result = SharedSuggestionProvider.suggest(iterable, suggestionsBuilder);

net.minecraft.commands.SharedSuggestionProvider#suggest(Iterable<T>,SuggestionsBuilder,Function<T, String>,Function<T, Message>)

  • Origin: common
  • Source: net/minecraft/commands/SharedSuggestionProvider.java:237
  • Modifiers: static
  • Return: CompletableFuture<Suggestions>

คืออะไร

ดำเนินการ suggest ตาม implementation ของ SharedSuggestionProvider

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getRemaining(), toLowerCase(), apply(), matchesSubStr(), buildFuture(). คืนค่า: suggestionsBuilder.buildFuture().

Parameters

  • Iterable<T> iterable
  • SuggestionsBuilder suggestionsBuilder
  • Function<T, String> function
  • Function<T, Message> function2

ตัวอย่างใช้งาน

Iterable<T> iterable = ...;
SuggestionsBuilder suggestionsBuilder = ...;
Function<T, String> function = ...;
Function<T, Message> function2 = ...;
CompletableFuture<Suggestions> result = SharedSuggestionProvider.suggest(iterable, suggestionsBuilder, function, function2);

net.minecraft.commands.SharedSuggestionProvider#suggest(Stream<String>,SuggestionsBuilder)

  • Origin: common
  • Source: net/minecraft/commands/SharedSuggestionProvider.java:219
  • Modifiers: static
  • Return: CompletableFuture<Suggestions>

คืออะไร

ดำเนินการ suggest ตาม implementation ของ SharedSuggestionProvider

ทำงานยังไง

เรียกต่อ: getRemaining(), toLowerCase(), filter(), matchesSubStr(), forEach(), buildFuture(). คืนค่า: suggestionsBuilder.buildFuture().

Parameters

  • Stream<String> stream
  • SuggestionsBuilder suggestionsBuilder

ตัวอย่างใช้งาน

Stream<String> stream = ...;
SuggestionsBuilder suggestionsBuilder = ...;
CompletableFuture<Suggestions> result = SharedSuggestionProvider.suggest(stream, suggestionsBuilder);

net.minecraft.commands.SharedSuggestionProvider#suggest(String[],SuggestionsBuilder)

  • Origin: common
  • Source: net/minecraft/commands/SharedSuggestionProvider.java:225
  • Modifiers: static
  • Return: CompletableFuture<Suggestions>

คืออะไร

ดำเนินการ suggest ตาม implementation ของ SharedSuggestionProvider

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getRemaining(), toLowerCase(), matchesSubStr(), buildFuture(). คืนค่า: suggestionsBuilder.buildFuture().

Parameters

  • String[] strings
  • SuggestionsBuilder suggestionsBuilder

ตัวอย่างใช้งาน

String[] strings = ...;
SuggestionsBuilder suggestionsBuilder = ...;
CompletableFuture<Suggestions> result = SharedSuggestionProvider.suggest(strings, suggestionsBuilder);

net.minecraft.commands.SharedSuggestionProvider#suggest2DCoordinates(String,Collection<SharedSuggestionProvider.TextCoordinates>,SuggestionsBuilder,Predicate<String>)

  • Origin: common
  • Source: net/minecraft/commands/SharedSuggestionProvider.java:180
  • Modifiers: static
  • Return: CompletableFuture<Suggestions>

คืออะไร

ดำเนินการ suggest2DCoordinates ตาม implementation ของ SharedSuggestionProvider

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: newArrayList(), isNullOrEmpty(), test(), add(), split(), suggest(). คืนค่า: suggest(list, suggestionsBuilder).

Parameters

  • String string
  • Collection<SharedSuggestionProvider.TextCoordinates> collection
  • SuggestionsBuilder suggestionsBuilder
  • Predicate<String> predicate

ตัวอย่างใช้งาน

Collection<SharedSuggestionProvider.TextCoordinates> collection = ...;
SuggestionsBuilder suggestionsBuilder = ...;
Predicate<String> predicate = ...;
CompletableFuture<Suggestions> result = SharedSuggestionProvider.suggest2DCoordinates("value", collection, suggestionsBuilder, predicate);

net.minecraft.commands.SharedSuggestionProvider#suggestCoordinates(String,Collection<SharedSuggestionProvider.TextCoordinates>,SuggestionsBuilder,Predicate<String>)

  • Origin: common
  • Source: net/minecraft/commands/SharedSuggestionProvider.java:144
  • Modifiers: static
  • Return: CompletableFuture<Suggestions>

คืออะไร

ดำเนินการ suggestCoordinates ตาม implementation ของ SharedSuggestionProvider

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: newArrayList(), isNullOrEmpty(), test(), add(), split(), suggest(). คืนค่า: suggest(list, suggestionsBuilder).

Parameters

  • String string
  • Collection<SharedSuggestionProvider.TextCoordinates> collection
  • SuggestionsBuilder suggestionsBuilder
  • Predicate<String> predicate

ตัวอย่างใช้งาน

Collection<SharedSuggestionProvider.TextCoordinates> collection = ...;
SuggestionsBuilder suggestionsBuilder = ...;
Predicate<String> predicate = ...;
CompletableFuture<Suggestions> result = SharedSuggestionProvider.suggestCoordinates("value", collection, suggestionsBuilder, predicate);

net.minecraft.commands.SharedSuggestionProvider#suggestRegistryElements(Registry<?>,SharedSuggestionProvider.ElementSuggestionType,SuggestionsBuilder)

  • Origin: common
  • Source: net/minecraft/commands/SharedSuggestionProvider.java:60
  • Modifiers: default
  • Return: void

คืออะไร

ดำเนินการ suggestRegistryElements ตาม implementation ของ SharedSuggestionProvider

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: shouldSuggestTags(), suggestResource(), getTags(), map(), key(), location(), shouldSuggestElements(), keySet().

Parameters

  • Registry<?> registry
  • SharedSuggestionProvider.ElementSuggestionType elementSuggestionType
  • SuggestionsBuilder suggestionsBuilder

ตัวอย่างใช้งาน

SharedSuggestionProvider instance = ...;
Registry<?> registry = ...;
SharedSuggestionProvider.ElementSuggestionType elementSuggestionType = ...;
SuggestionsBuilder suggestionsBuilder = ...;
instance.suggestRegistryElements(registry, elementSuggestionType, suggestionsBuilder);

net.minecraft.commands.SharedSuggestionProvider#suggestRegistryElements(ResourceKey<? extends Registry<?>>,SharedSuggestionProvider.ElementSuggestionType,SuggestionsBuilder,CommandContext<?>)

  • Origin: common
  • Source: net/minecraft/commands/SharedSuggestionProvider.java:72
  • Modifiers: ``
  • Return: CompletableFuture<Suggestions>

คืออะไร

ดำเนินการ suggestRegistryElements ตาม implementation ของ SharedSuggestionProvider

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • ResourceKey<? extends Registry<?>> resourceKey
  • SharedSuggestionProvider.ElementSuggestionType elementSuggestionType
  • SuggestionsBuilder suggestionsBuilder
  • CommandContext<?> commandContext

ตัวอย่างใช้งาน

SharedSuggestionProvider instance = ...;
ResourceKey<? extends Registry<?>> resourceKey = ...;
SharedSuggestionProvider.ElementSuggestionType elementSuggestionType = ...;
SuggestionsBuilder suggestionsBuilder = ...;
CommandContext<?> commandContext = ...;
CompletableFuture<Suggestions> result = instance.suggestRegistryElements(resourceKey, elementSuggestionType, suggestionsBuilder, commandContext);

net.minecraft.commands.SharedSuggestionProvider#suggestResource(Iterable<ResourceLocation>,SuggestionsBuilder)

  • Origin: common
  • Source: net/minecraft/commands/SharedSuggestionProvider.java:120
  • Modifiers: static
  • Return: CompletableFuture<Suggestions>

คืออะไร

ดำเนินการ suggestResource ตาม implementation ของ SharedSuggestionProvider

ทำงานยังไง

เรียกต่อ: getRemaining(), toLowerCase(), filterResources(), suggest(), toString(), buildFuture(). คืนค่า: suggestionsBuilder.buildFuture().

Parameters

  • Iterable<ResourceLocation> iterable
  • SuggestionsBuilder suggestionsBuilder

ตัวอย่างใช้งาน

Iterable<ResourceLocation> iterable = ...;
SuggestionsBuilder suggestionsBuilder = ...;
CompletableFuture<Suggestions> result = SharedSuggestionProvider.suggestResource(iterable, suggestionsBuilder);

net.minecraft.commands.SharedSuggestionProvider#suggestResource(Iterable<ResourceLocation>,SuggestionsBuilder,String)

  • Origin: common
  • Source: net/minecraft/commands/SharedSuggestionProvider.java:110
  • Modifiers: static
  • Return: CompletableFuture<Suggestions>

คืออะไร

ดำเนินการ suggestResource ตาม implementation ของ SharedSuggestionProvider

ทำงานยังไง

เรียกต่อ: getRemaining(), toLowerCase(), filterResources(), suggest(), buildFuture(). คืนค่า: suggestionsBuilder.buildFuture().

Parameters

  • Iterable<ResourceLocation> iterable
  • SuggestionsBuilder suggestionsBuilder
  • String string

ตัวอย่างใช้งาน

Iterable<ResourceLocation> iterable = ...;
SuggestionsBuilder suggestionsBuilder = ...;
CompletableFuture<Suggestions> result = SharedSuggestionProvider.suggestResource(iterable, suggestionsBuilder, "value");

net.minecraft.commands.SharedSuggestionProvider#suggestResource(Iterable<T>,SuggestionsBuilder,Function<T, ResourceLocation>,Function<T, Message>)

  • Origin: common
  • Source: net/minecraft/commands/SharedSuggestionProvider.java:126
  • Modifiers: static
  • Return: CompletableFuture<Suggestions>

คืออะไร

ดำเนินการ suggestResource ตาม implementation ของ SharedSuggestionProvider

ทำงานยังไง

เรียกต่อ: getRemaining(), toLowerCase(), filterResources(), suggest(), apply(), toString(), buildFuture(). คืนค่า: suggestionsBuilder.buildFuture().

Parameters

  • Iterable<T> iterable
  • SuggestionsBuilder suggestionsBuilder
  • Function<T, ResourceLocation> function
  • Function<T, Message> function2

ตัวอย่างใช้งาน

Iterable<T> iterable = ...;
SuggestionsBuilder suggestionsBuilder = ...;
Function<T, ResourceLocation> function = ...;
Function<T, Message> function2 = ...;
CompletableFuture<Suggestions> result = SharedSuggestionProvider.suggestResource(iterable, suggestionsBuilder, function, function2);

net.minecraft.commands.SharedSuggestionProvider#suggestResource(Stream<ResourceLocation>,SuggestionsBuilder)

  • Origin: common
  • Source: net/minecraft/commands/SharedSuggestionProvider.java:134
  • Modifiers: static
  • Return: CompletableFuture<Suggestions>

คืออะไร

ดำเนินการ suggestResource ตาม implementation ของ SharedSuggestionProvider

ทำงานยังไง

คืนค่า: suggestResource(stream::iterator, suggestionsBuilder).

Parameters

  • Stream<ResourceLocation> stream
  • SuggestionsBuilder suggestionsBuilder

ตัวอย่างใช้งาน

Stream<ResourceLocation> stream = ...;
SuggestionsBuilder suggestionsBuilder = ...;
CompletableFuture<Suggestions> result = SharedSuggestionProvider.suggestResource(stream, suggestionsBuilder);

net.minecraft.commands.SharedSuggestionProvider#suggestResource(Stream<ResourceLocation>,SuggestionsBuilder,String)

  • Origin: common
  • Source: net/minecraft/commands/SharedSuggestionProvider.java:116
  • Modifiers: static
  • Return: CompletableFuture<Suggestions>

คืออะไร

ดำเนินการ suggestResource ตาม implementation ของ SharedSuggestionProvider

ทำงานยังไง

คืนค่า: suggestResource(stream::iterator, suggestionsBuilder, string).

Parameters

  • Stream<ResourceLocation> stream
  • SuggestionsBuilder suggestionsBuilder
  • String string

ตัวอย่างใช้งาน

Stream<ResourceLocation> stream = ...;
SuggestionsBuilder suggestionsBuilder = ...;
CompletableFuture<Suggestions> result = SharedSuggestionProvider.suggestResource(stream, suggestionsBuilder, "value");

net.minecraft.commands.SharedSuggestionProvider#suggestResource(Stream<T>,SuggestionsBuilder,Function<T, ResourceLocation>,Function<T, Message>)

  • Origin: common
  • Source: net/minecraft/commands/SharedSuggestionProvider.java:138
  • Modifiers: static
  • Return: CompletableFuture<Suggestions>

คืออะไร

ดำเนินการ suggestResource ตาม implementation ของ SharedSuggestionProvider

ทำงานยังไง

คืนค่า: suggestResource(stream::iterator, suggestionsBuilder, function, function2).

Parameters

  • Stream<T> stream
  • SuggestionsBuilder suggestionsBuilder
  • Function<T, ResourceLocation> function
  • Function<T, Message> function2

ตัวอย่างใช้งาน

Stream<T> stream = ...;
SuggestionsBuilder suggestionsBuilder = ...;
Function<T, ResourceLocation> function = ...;
Function<T, Message> function2 = ...;
CompletableFuture<Suggestions> result = SharedSuggestionProvider.suggestResource(stream, suggestionsBuilder, function, function2);