Skip to content

Package net.minecraft.commands.arguments.selector

Part 1/1


EntitySelector

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

net.minecraft.commands.arguments.selector.EntitySelector#EntitySelector(int,boolean,boolean,List<Predicate<Entity>>,MinMaxBounds.Doubles,Function<Vec3, Vec3>,AABB,BiConsumer<Vec3, List<? extends Entity>>,boolean,String,UUID,EntityType<?>,boolean)

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelector.java:56
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: maxResults, includesEntities, worldLimited, contextFreePredicates, range, position.

Parameters

  • int i
  • boolean bl
  • boolean bl2
  • List<Predicate<Entity>> list
  • MinMaxBounds.Doubles doubles
  • Function<Vec3, Vec3> function
  • AABB aABB
  • BiConsumer<Vec3, List<? extends Entity>> biConsumer
  • boolean bl3
  • String string
  • UUID uUID
  • EntityType<?> entityType
  • boolean bl4

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

List<Predicate<Entity>> list = ...;
MinMaxBounds.Doubles doubles = ...;
Function<Vec3, Vec3> function = ...;
AABB aABB = ...;
BiConsumer<Vec3, List<? extends Entity>> biConsumer = ...;
UUID uUID = ...;
EntityType<?> entityType = ...;
EntitySelector instance = new EntitySelector(0, true, true, list, doubles, function, aABB, biConsumer, true, "value", uUID, entityType, true);

net.minecraft.commands.arguments.selector.EntitySelector#findEntities(CommandSourceStack)

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelector.java:124
  • Modifiers: public
  • Return: List<? extends Entity>

คืออะไร

ค้นหา Entities

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: checkPermissions(), findPlayers(), getServer(), getPlayerList(), getPlayerByName(), of(), getAllLevels(), getEntity(). สร้างออบเจ็กต์: ObjectArrayList<>. มีจุด return อย่างน้อย 6 จุด.

Parameters

  • CommandSourceStack commandSourceStack

Throws

  • CommandSyntaxException

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

EntitySelector instance = ...;
CommandSourceStack commandSourceStack = ...;
List<? extends Entity> result = instance.findEntities(commandSourceStack);

net.minecraft.commands.arguments.selector.EntitySelector#findPlayers(CommandSourceStack)

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelector.java:194
  • Modifiers: public
  • Return: List<ServerPlayer>

คืออะไร

ค้นหา Players

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: checkPermissions(), getServer(), getPlayerList(), getPlayerByName(), of(), getPlayer(), apply(), getPosition(). สร้างออบเจ็กต์: ObjectArrayList<>. มีจุด return อย่างน้อย 5 จุด.

Parameters

  • CommandSourceStack commandSourceStack

Throws

  • CommandSyntaxException

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

EntitySelector instance = ...;
CommandSourceStack commandSourceStack = ...;
List<ServerPlayer> result = instance.findPlayers(commandSourceStack);

net.minecraft.commands.arguments.selector.EntitySelector#findSingleEntity(CommandSourceStack)

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelector.java:112
  • Modifiers: public
  • Return: Entity

คืออะไร

ค้นหา Single Entity

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: checkPermissions(), findEntities(), isEmpty(), create(), size(), get(). คืนค่า: list.get(0).

Parameters

  • CommandSourceStack commandSourceStack

Throws

  • CommandSyntaxException

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

EntitySelector instance = ...;
CommandSourceStack commandSourceStack = ...;
Entity result = instance.findSingleEntity(commandSourceStack);

net.minecraft.commands.arguments.selector.EntitySelector#findSinglePlayer(CommandSourceStack)

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelector.java:184
  • Modifiers: public
  • Return: ServerPlayer

คืออะไร

ค้นหา Single Player

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: checkPermissions(), findPlayers(), size(), create(), get(). คืนค่า: list.get(0).

Parameters

  • CommandSourceStack commandSourceStack

Throws

  • CommandSyntaxException

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

EntitySelector instance = ...;
CommandSourceStack commandSourceStack = ...;
ServerPlayer result = instance.findSinglePlayer(commandSourceStack);

net.minecraft.commands.arguments.selector.EntitySelector#getMaxResults()

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelector.java:86
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Max Results

ทำงานยังไง

คืนค่า: this.maxResults.

Parameters

  • ไม่มี

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

EntitySelector instance = ...;
int result = instance.getMaxResults();

net.minecraft.commands.arguments.selector.EntitySelector#includesEntities()

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelector.java:90
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ includesEntities ตาม implementation ของ EntitySelector

ทำงานยังไง

คืนค่า: this.includesEntities.

Parameters

  • ไม่มี

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

EntitySelector instance = ...;
boolean result = instance.includesEntities();

net.minecraft.commands.arguments.selector.EntitySelector#isSelfSelector()

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelector.java:94
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Self Selector

ทำงานยังไง

คืนค่า: this.currentEntity.

Parameters

  • ไม่มี

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

EntitySelector instance = ...;
boolean result = instance.isSelfSelector();

net.minecraft.commands.arguments.selector.EntitySelector#isWorldLimited()

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelector.java:98
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ World Limited

ทำงานยังไง

คืนค่า: this.worldLimited.

Parameters

  • ไม่มี

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

EntitySelector instance = ...;
boolean result = instance.isWorldLimited();

net.minecraft.commands.arguments.selector.EntitySelector#joinNames(List<? extends Entity>)

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelector.java:275
  • Modifiers: public static
  • Return: Component

คืออะไร

รวม/เข้าร่วม Names

ทำงานยังไง

เรียกต่อ: formatList(). คืนค่า: ComponentUtils.formatList(list, Entity::getDisplayName).

Parameters

  • List<? extends Entity> list

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

List<? extends Entity> list = ...;
Component result = EntitySelector.joinNames(list);

net.minecraft.commands.arguments.selector.EntitySelector#usesSelector()

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelector.java:102
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ usesSelector ตาม implementation ของ EntitySelector

ทำงานยังไง

คืนค่า: this.usesSelector.

Parameters

  • ไม่มี

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

EntitySelector instance = ...;
boolean result = instance.usesSelector();

EntitySelectorParser

  • Full name: net.minecraft.commands.arguments.selector.EntitySelectorParser
  • Package: net.minecraft.commands.arguments.selector
  • Source: commonnet/minecraft/commands/arguments/selector/EntitySelectorParser.java
  • Type: class
  • Modifiers: public
  • Implements: FabricEntitySelectorReader

net.minecraft.commands.arguments.selector.EntitySelectorParser#addPredicate(Predicate<Entity>)

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

คืออะไร

เพิ่ม Predicate

ทำงานยังไง

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

Parameters

  • Predicate<Entity> predicate

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

EntitySelectorParser instance = ...;
Predicate<Entity> predicate = ...;
instance.addPredicate(predicate);

net.minecraft.commands.arguments.selector.EntitySelectorParser#allowSelectors(S)

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:126
  • Modifiers: public static
  • Return: boolean

คืออะไร

ดำเนินการ allowSelectors ตาม implementation ของ EntitySelectorParser

ทำงานยังไง

เรียกต่อ: hasPermission(). คืนค่า: object instanceof SharedSuggestionProvider sharedSuggestionProvider && sharedSuggestionProvider.hasPermission(2).

Parameters

  • S object

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

S object = ...;
boolean result = EntitySelectorParser.allowSelectors(object);

net.minecraft.commands.arguments.selector.EntitySelectorParser#EntitySelectorParser(StringReader,boolean)

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:121
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: reader, allowSelectors.

Parameters

  • StringReader stringReader
  • boolean bl

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

StringReader stringReader = ...;
EntitySelectorParser instance = new EntitySelectorParser(stringReader, true);

net.minecraft.commands.arguments.selector.EntitySelectorParser#fillSuggestions(SuggestionsBuilder,Consumer<SuggestionsBuilder>)

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:555
  • Modifiers: public
  • Return: CompletableFuture<Suggestions>

คืออะไร

ดำเนินการ fillSuggestions ตาม implementation ของ EntitySelectorParser

ทำงานยังไง

เรียกต่อ: apply(), createOffset(), getCursor(). คืนค่า: this.suggestions.apply(suggestionsBuilder.createOffset(this.reader.getCursor()), consumer).

Parameters

  • SuggestionsBuilder suggestionsBuilder
  • Consumer<SuggestionsBuilder> consumer

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

EntitySelectorParser instance = ...;
SuggestionsBuilder suggestionsBuilder = ...;
Consumer<SuggestionsBuilder> consumer = ...;
CompletableFuture<Suggestions> result = instance.fillSuggestions(suggestionsBuilder, consumer);

net.minecraft.commands.arguments.selector.EntitySelectorParser#getDeltaX()

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:440
  • Modifiers: public
  • Return: Double

คืออะไร

อ่านค่า Delta X

ทำงานยังไง

คืนค่า: this.deltaX.

Parameters

  • ไม่มี

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

EntitySelectorParser instance = ...;
Double result = instance.getDeltaX();

net.minecraft.commands.arguments.selector.EntitySelectorParser#getDeltaY()

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:445
  • Modifiers: public
  • Return: Double

คืออะไร

อ่านค่า Delta Y

ทำงานยังไง

คืนค่า: this.deltaY.

Parameters

  • ไม่มี

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

EntitySelectorParser instance = ...;
Double result = instance.getDeltaY();

net.minecraft.commands.arguments.selector.EntitySelectorParser#getDeltaZ()

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:450
  • Modifiers: public
  • Return: Double

คืออะไร

อ่านค่า Delta Z

ทำงานยังไง

คืนค่า: this.deltaZ.

Parameters

  • ไม่มี

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

EntitySelectorParser instance = ...;
Double result = instance.getDeltaZ();

net.minecraft.commands.arguments.selector.EntitySelectorParser#getDistance()

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:369
  • Modifiers: public
  • Return: MinMaxBounds.Doubles

คืออะไร

อ่านค่า Distance

ทำงานยังไง

คืนค่า: this.distance.

Parameters

  • ไม่มี

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

EntitySelectorParser instance = ...;
MinMaxBounds.Doubles result = instance.getDistance();

net.minecraft.commands.arguments.selector.EntitySelectorParser#getLevel()

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:377
  • Modifiers: public
  • Return: MinMaxBounds.Ints

คืออะไร

อ่านค่า Level

ทำงานยังไง

คืนค่า: this.level.

Parameters

  • ไม่มี

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

EntitySelectorParser instance = ...;
MinMaxBounds.Ints result = instance.getLevel();

net.minecraft.commands.arguments.selector.EntitySelectorParser#getOrder()

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:463
  • Modifiers: public
  • Return: BiConsumer<Vec3, List<? extends Entity>>

คืออะไร

อ่านค่า Order

ทำงานยังไง

คืนค่า: this.order.

Parameters

  • ไม่มี

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

EntitySelectorParser instance = ...;
BiConsumer<Vec3, List<? extends Entity>> result = instance.getOrder();

net.minecraft.commands.arguments.selector.EntitySelectorParser#getReader()

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:357
  • Modifiers: public
  • Return: StringReader

คืออะไร

อ่านค่า Reader

ทำงานยังไง

คืนค่า: this.reader.

Parameters

  • ไม่มี

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

EntitySelectorParser instance = ...;
StringReader result = instance.getReader();

net.minecraft.commands.arguments.selector.EntitySelectorParser#getRotX()

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:385
  • Modifiers: public
  • Return: WrappedMinMaxBounds

คืออะไร

อ่านค่า Rot X

ทำงานยังไง

คืนค่า: this.rotX.

Parameters

  • ไม่มี

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

EntitySelectorParser instance = ...;
WrappedMinMaxBounds result = instance.getRotX();

net.minecraft.commands.arguments.selector.EntitySelectorParser#getRotY()

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:393
  • Modifiers: public
  • Return: WrappedMinMaxBounds

คืออะไร

อ่านค่า Rot Y

ทำงานยังไง

คืนค่า: this.rotY.

Parameters

  • ไม่มี

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

EntitySelectorParser instance = ...;
WrappedMinMaxBounds result = instance.getRotY();

net.minecraft.commands.arguments.selector.EntitySelectorParser#getSelector()

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:130
  • Modifiers: public
  • Return: EntitySelector

คืออะไร

อ่านค่า Selector

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: deltaX, deltaY, deltaZ, x, y, z. เรียกต่อ: max(), isPresent(), get(), createAabb(), copyOf(). สร้างออบเจ็กต์: AABB, Vec3, EntitySelector.

Parameters

  • ไม่มี

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

EntitySelectorParser instance = ...;
EntitySelector result = instance.getSelector();

net.minecraft.commands.arguments.selector.EntitySelectorParser#getX()

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:401
  • Modifiers: public
  • Return: Double

คืออะไร

อ่านค่า X

ทำงานยังไง

คืนค่า: this.x.

Parameters

  • ไม่มี

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

EntitySelectorParser instance = ...;
Double result = instance.getX();

net.minecraft.commands.arguments.selector.EntitySelectorParser#getY()

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:406
  • Modifiers: public
  • Return: Double

คืออะไร

อ่านค่า Y

ทำงานยังไง

คืนค่า: this.y.

Parameters

  • ไม่มี

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

EntitySelectorParser instance = ...;
Double result = instance.getY();

net.minecraft.commands.arguments.selector.EntitySelectorParser#getZ()

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:411
  • Modifiers: public
  • Return: Double

คืออะไร

อ่านค่า Z

ทำงานยังไง

คืนค่า: this.z.

Parameters

  • ไม่มี

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

EntitySelectorParser instance = ...;
Double result = instance.getZ();

net.minecraft.commands.arguments.selector.EntitySelectorParser#hasAdvancements()

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:647
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: this.hasAdvancements.

Parameters

  • ไม่มี

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

EntitySelectorParser instance = ...;
boolean result = instance.hasAdvancements();

net.minecraft.commands.arguments.selector.EntitySelectorParser#hasGamemodeEquals()

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:591
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่ามี Gamemode Equals

ทำงานยังไง

คืนค่า: this.hasGamemodeEquals.

Parameters

  • ไม่มี

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

EntitySelectorParser instance = ...;
boolean result = instance.hasGamemodeEquals();

net.minecraft.commands.arguments.selector.EntitySelectorParser#hasGamemodeNotEquals()

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:599
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่ามี Gamemode Not Equals

ทำงานยังไง

คืนค่า: this.hasGamemodeNotEquals.

Parameters

  • ไม่มี

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

EntitySelectorParser instance = ...;
boolean result = instance.hasGamemodeNotEquals();

net.minecraft.commands.arguments.selector.EntitySelectorParser#hasNameEquals()

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:559
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่ามี Name Equals

ทำงานยังไง

คืนค่า: this.hasNameEquals.

Parameters

  • ไม่มี

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

EntitySelectorParser instance = ...;
boolean result = instance.hasNameEquals();

net.minecraft.commands.arguments.selector.EntitySelectorParser#hasNameNotEquals()

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:567
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่ามี Name Not Equals

ทำงานยังไง

คืนค่า: this.hasNameNotEquals.

Parameters

  • ไม่มี

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

EntitySelectorParser instance = ...;
boolean result = instance.hasNameNotEquals();

net.minecraft.commands.arguments.selector.EntitySelectorParser#hasScores()

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:639
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: this.hasScores.

Parameters

  • ไม่มี

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

EntitySelectorParser instance = ...;
boolean result = instance.hasScores();

net.minecraft.commands.arguments.selector.EntitySelectorParser#hasTeamEquals()

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:607
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่ามี Team Equals

ทำงานยังไง

คืนค่า: this.hasTeamEquals.

Parameters

  • ไม่มี

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

EntitySelectorParser instance = ...;
boolean result = instance.hasTeamEquals();

net.minecraft.commands.arguments.selector.EntitySelectorParser#hasTeamNotEquals()

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:615
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่ามี Team Not Equals

ทำงานยังไง

คืนค่า: this.hasTeamNotEquals.

Parameters

  • ไม่มี

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

EntitySelectorParser instance = ...;
boolean result = instance.hasTeamNotEquals();

net.minecraft.commands.arguments.selector.EntitySelectorParser#isCurrentEntity()

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:547
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Current Entity

ทำงานยังไง

คืนค่า: this.currentEntity.

Parameters

  • ไม่มี

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

EntitySelectorParser instance = ...;
boolean result = instance.isCurrentEntity();

net.minecraft.commands.arguments.selector.EntitySelectorParser#isLimited()

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:575
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: this.isLimited.

Parameters

  • ไม่มี

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

EntitySelectorParser instance = ...;
boolean result = instance.isLimited();

net.minecraft.commands.arguments.selector.EntitySelectorParser#isSorted()

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:583
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: this.isSorted.

Parameters

  • ไม่มี

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

EntitySelectorParser instance = ...;
boolean result = instance.isSorted();

net.minecraft.commands.arguments.selector.EntitySelectorParser#isTag()

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:346
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

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

Parameters

  • ไม่มี

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

EntitySelectorParser instance = ...;
boolean result = instance.isTag();

net.minecraft.commands.arguments.selector.EntitySelectorParser#isTypeLimited()

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:631
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Type Limited

ทำงานยังไง

คืนค่า: this.type != null.

Parameters

  • ไม่มี

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

EntitySelectorParser instance = ...;
boolean result = instance.isTypeLimited();

net.minecraft.commands.arguments.selector.EntitySelectorParser#isTypeLimitedInversely()

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:635
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Type Limited Inversely

ทำงานยังไง

คืนค่า: this.typeInverse.

Parameters

  • ไม่มี

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

EntitySelectorParser instance = ...;
boolean result = instance.isTypeLimitedInversely();

net.minecraft.commands.arguments.selector.EntitySelectorParser#limitToType(EntityType<?>)

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:623
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ limitToType ตาม implementation ของ EntitySelectorParser

ทำงานยังไง

แก้ state: type.

Parameters

  • EntityType<?> entityType

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

EntitySelectorParser instance = ...;
EntityType<?> entityType = ...;
instance.limitToType(entityType);

net.minecraft.commands.arguments.selector.EntitySelectorParser#parse()

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:471
  • Modifiers: public
  • Return: EntitySelector

คืออะไร

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

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: startPosition, suggestions. เรียกต่อ: getCursor(), canRead(), peek(), createWithContext(), skip(), parseSelector(), parseNameOrUUID(), finalizePredicates(). คืนค่า: this.getSelector().

Parameters

  • ไม่มี

Throws

  • CommandSyntaxException

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

EntitySelectorParser instance = ...;
EntitySelector result = instance.parse();

net.minecraft.commands.arguments.selector.EntitySelectorParser#parseNameOrUUID()

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:269
  • Modifiers: protected
  • Return: void

คืออะไร

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

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการจัดการ exception. แก้ state: suggestions, entityUUID, includesEntities, playerName, maxResults. เรียกต่อ: canRead(), getCursor(), readString(), fromString(), isEmpty(), length(), setCursor(), createWithContext().

Parameters

  • ไม่มี

Throws

  • CommandSyntaxException

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

@Override
protected void parseNameOrUUID() {
    super.parseNameOrUUID();
}

net.minecraft.commands.arguments.selector.EntitySelectorParser#parseOptions()

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:293
  • Modifiers: protected
  • Return: void

คืออะไร

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

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: suggestions. เรียกต่อ: skipWhitespace(), canRead(), peek(), getCursor(), readString(), get(), setCursor(), createWithContext().

Parameters

  • ไม่มี

Throws

  • CommandSyntaxException

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

@Override
protected void parseOptions() {
    super.parseOptions();
}

net.minecraft.commands.arguments.selector.EntitySelectorParser#parseSelector()

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:203
  • Modifiers: protected
  • Return: void

คืออะไร

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

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; แยกกรณีด้วย switch. แก้ state: usesSelectors, suggestions, maxResults, includesEntities, order, currentEntity. เรียกต่อ: canRead(), createWithContext(), getCursor(), read(), limitToType(), setCursor(), add(), peek().

Parameters

  • ไม่มี

Throws

  • CommandSyntaxException

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

@Override
protected void parseSelector() {
    super.parseSelector();
}

net.minecraft.commands.arguments.selector.EntitySelectorParser#setDeltaX(double)

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:428
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Delta X

ทำงานยังไง

แก้ state: deltaX.

Parameters

  • double d

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

EntitySelectorParser instance = ...;
instance.setDeltaX(0.0D);

net.minecraft.commands.arguments.selector.EntitySelectorParser#setDeltaY(double)

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:432
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Delta Y

ทำงานยังไง

แก้ state: deltaY.

Parameters

  • double d

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

EntitySelectorParser instance = ...;
instance.setDeltaY(0.0D);

net.minecraft.commands.arguments.selector.EntitySelectorParser#setDeltaZ(double)

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:436
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Delta Z

ทำงานยังไง

แก้ state: deltaZ.

Parameters

  • double d

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

EntitySelectorParser instance = ...;
instance.setDeltaZ(0.0D);

net.minecraft.commands.arguments.selector.EntitySelectorParser#setDistance(MinMaxBounds.Doubles)

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:373
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Distance

ทำงานยังไง

แก้ state: distance.

Parameters

  • MinMaxBounds.Doubles doubles

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

EntitySelectorParser instance = ...;
MinMaxBounds.Doubles doubles = ...;
instance.setDistance(doubles);

net.minecraft.commands.arguments.selector.EntitySelectorParser#setHasAdvancements(boolean)

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:651
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Has Advancements

ทำงานยังไง

แก้ state: hasAdvancements.

Parameters

  • boolean bl

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

EntitySelectorParser instance = ...;
instance.setHasAdvancements(true);

net.minecraft.commands.arguments.selector.EntitySelectorParser#setHasGamemodeEquals(boolean)

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:595
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Has Gamemode Equals

ทำงานยังไง

แก้ state: hasGamemodeEquals.

Parameters

  • boolean bl

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

EntitySelectorParser instance = ...;
instance.setHasGamemodeEquals(true);

net.minecraft.commands.arguments.selector.EntitySelectorParser#setHasGamemodeNotEquals(boolean)

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:603
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Has Gamemode Not Equals

ทำงานยังไง

แก้ state: hasGamemodeNotEquals.

Parameters

  • boolean bl

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

EntitySelectorParser instance = ...;
instance.setHasGamemodeNotEquals(true);

net.minecraft.commands.arguments.selector.EntitySelectorParser#setHasNameEquals(boolean)

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:563
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Has Name Equals

ทำงานยังไง

แก้ state: hasNameEquals.

Parameters

  • boolean bl

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

EntitySelectorParser instance = ...;
instance.setHasNameEquals(true);

net.minecraft.commands.arguments.selector.EntitySelectorParser#setHasNameNotEquals(boolean)

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:571
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Has Name Not Equals

ทำงานยังไง

แก้ state: hasNameNotEquals.

Parameters

  • boolean bl

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

EntitySelectorParser instance = ...;
instance.setHasNameNotEquals(true);

net.minecraft.commands.arguments.selector.EntitySelectorParser#setHasScores(boolean)

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:643
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Has Scores

ทำงานยังไง

แก้ state: hasScores.

Parameters

  • boolean bl

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

EntitySelectorParser instance = ...;
instance.setHasScores(true);

net.minecraft.commands.arguments.selector.EntitySelectorParser#setHasTeamEquals(boolean)

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:611
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Has Team Equals

ทำงานยังไง

แก้ state: hasTeamEquals.

Parameters

  • boolean bl

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

EntitySelectorParser instance = ...;
instance.setHasTeamEquals(true);

net.minecraft.commands.arguments.selector.EntitySelectorParser#setHasTeamNotEquals(boolean)

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:619
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Has Team Not Equals

ทำงานยังไง

แก้ state: hasTeamNotEquals.

Parameters

  • boolean bl

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

EntitySelectorParser instance = ...;
instance.setHasTeamNotEquals(true);

net.minecraft.commands.arguments.selector.EntitySelectorParser#setIncludesEntities(boolean)

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

คืออะไร

กำหนดค่า Includes Entities

ทำงานยังไง

แก้ state: includesEntities.

Parameters

  • boolean bl

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

EntitySelectorParser instance = ...;
instance.setIncludesEntities(true);

net.minecraft.commands.arguments.selector.EntitySelectorParser#setLevel(MinMaxBounds.Ints)

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:381
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Level

ทำงานยังไง

แก้ state: level.

Parameters

  • MinMaxBounds.Ints ints

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

EntitySelectorParser instance = ...;
MinMaxBounds.Ints ints = ...;
instance.setLevel(ints);

net.minecraft.commands.arguments.selector.EntitySelectorParser#setLimited(boolean)

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:579
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Limited

ทำงานยังไง

แก้ state: isLimited.

Parameters

  • boolean bl

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

EntitySelectorParser instance = ...;
instance.setLimited(true);

net.minecraft.commands.arguments.selector.EntitySelectorParser#setMaxResults(int)

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:455
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Max Results

ทำงานยังไง

แก้ state: maxResults.

Parameters

  • int i

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

EntitySelectorParser instance = ...;
instance.setMaxResults(0);

net.minecraft.commands.arguments.selector.EntitySelectorParser#setOrder(BiConsumer<Vec3, List<? extends Entity>>)

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:467
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Order

ทำงานยังไง

แก้ state: order.

Parameters

  • BiConsumer<Vec3, List<? extends Entity>> biConsumer

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

EntitySelectorParser instance = ...;
BiConsumer<Vec3, List<? extends Entity>> biConsumer = ...;
instance.setOrder(biConsumer);

net.minecraft.commands.arguments.selector.EntitySelectorParser#setRotX(WrappedMinMaxBounds)

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:389
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Rot X

ทำงานยังไง

แก้ state: rotX.

Parameters

  • WrappedMinMaxBounds wrappedMinMaxBounds

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

EntitySelectorParser instance = ...;
WrappedMinMaxBounds wrappedMinMaxBounds = ...;
instance.setRotX(wrappedMinMaxBounds);

net.minecraft.commands.arguments.selector.EntitySelectorParser#setRotY(WrappedMinMaxBounds)

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:397
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Rot Y

ทำงานยังไง

แก้ state: rotY.

Parameters

  • WrappedMinMaxBounds wrappedMinMaxBounds

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

EntitySelectorParser instance = ...;
WrappedMinMaxBounds wrappedMinMaxBounds = ...;
instance.setRotY(wrappedMinMaxBounds);

net.minecraft.commands.arguments.selector.EntitySelectorParser#setSorted(boolean)

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:587
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Sorted

ทำงานยังไง

แก้ state: isSorted.

Parameters

  • boolean bl

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

EntitySelectorParser instance = ...;
instance.setSorted(true);

net.minecraft.commands.arguments.selector.EntitySelectorParser#setSuggestions(BiFunction<SuggestionsBuilder, Consumer<SuggestionsBuilder>, CompletableFuture<Suggestions>>)

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:551
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Suggestions

ทำงานยังไง

แก้ state: suggestions.

Parameters

  • BiFunction<SuggestionsBuilder, Consumer<SuggestionsBuilder>, CompletableFuture<Suggestions>> biFunction

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

EntitySelectorParser instance = ...;
BiFunction<SuggestionsBuilder, Consumer<SuggestionsBuilder>, CompletableFuture<Suggestions>> biFunction = ...;
instance.setSuggestions(biFunction);

net.minecraft.commands.arguments.selector.EntitySelectorParser#setTypeLimitedInversely()

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:627
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Type Limited Inversely

ทำงานยังไง

แก้ state: typeInverse.

Parameters

  • ไม่มี

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

EntitySelectorParser instance = ...;
instance.setTypeLimitedInversely();

net.minecraft.commands.arguments.selector.EntitySelectorParser#setWorldLimited()

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:365
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า World Limited

ทำงานยังไง

แก้ state: worldLimited.

Parameters

  • ไม่มี

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

EntitySelectorParser instance = ...;
instance.setWorldLimited();

net.minecraft.commands.arguments.selector.EntitySelectorParser#setX(double)

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:416
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า X

ทำงานยังไง

แก้ state: x.

Parameters

  • double d

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

EntitySelectorParser instance = ...;
instance.setX(0.0D);

net.minecraft.commands.arguments.selector.EntitySelectorParser#setY(double)

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:420
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Y

ทำงานยังไง

แก้ state: y.

Parameters

  • double d

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

EntitySelectorParser instance = ...;
instance.setY(0.0D);

net.minecraft.commands.arguments.selector.EntitySelectorParser#setZ(double)

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:424
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Z

ทำงานยังไง

แก้ state: z.

Parameters

  • double d

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

EntitySelectorParser instance = ...;
instance.setZ(0.0D);

net.minecraft.commands.arguments.selector.EntitySelectorParser#shouldInvertValue()

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/EntitySelectorParser.java:335
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Invert Value

ทำงานยังไง

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

Parameters

  • ไม่มี

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

EntitySelectorParser instance = ...;
boolean result = instance.shouldInvertValue();

SelectorPattern

  • Full name: net.minecraft.commands.arguments.selector.SelectorPattern
  • Package: net.minecraft.commands.arguments.selector
  • Source: commonnet/minecraft/commands/arguments/selector/SelectorPattern.java
  • Type: record
  • Modifiers: public

net.minecraft.commands.arguments.selector.SelectorPattern#equals(Object)

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/SelectorPattern.java:20
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: object instanceof SelectorPattern selectorPattern && this.pattern.equals(selectorPattern.pattern).

Parameters

  • Object object

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

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

net.minecraft.commands.arguments.selector.SelectorPattern#hashCode()

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/SelectorPattern.java:25
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ hashCode ตาม implementation ของ SelectorPattern

ทำงานยังไง

คืนค่า: this.pattern.hashCode().

Parameters

  • ไม่มี

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

SelectorPattern instance = ...;
int result = instance.hashCode();

net.minecraft.commands.arguments.selector.SelectorPattern#parse(String)

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/SelectorPattern.java:11
  • Modifiers: public static
  • Return: DataResult<SelectorPattern>

คืออะไร

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

ทำงานยังไง

มีการจัดการ exception. เรียกต่อ: success(), error(), getMessage(). สร้างออบเจ็กต์: EntitySelectorParser, StringReader, SelectorPattern. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • String string

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

DataResult<SelectorPattern> result = SelectorPattern.parse("value");

net.minecraft.commands.arguments.selector.SelectorPattern#toString()

  • Origin: common
  • Source: net/minecraft/commands/arguments/selector/SelectorPattern.java:30
  • Modifiers: public
  • Return: String

คืออะไร

ดำเนินการ toString ตาม implementation ของ SelectorPattern

ทำงานยังไง

คืนค่า: this.pattern.

Parameters

  • ไม่มี

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

SelectorPattern instance = ...;
String result = instance.toString();