Package net.minecraft.server.commands.data
Part 1/1
BlockDataAccessor
- Full name:
net.minecraft.server.commands.data.BlockDataAccessor - Package:
net.minecraft.server.commands.data - Source:
common—net/minecraft/server/commands/data/BlockDataAccessor.java - Type:
class - Modifiers:
public - Implements:
DataAccessor
net.minecraft.server.commands.data.BlockDataAccessor#BlockDataAccessor(BlockEntity,BlockPos)
- Origin:
common - Source:
net/minecraft/server/commands/data/BlockDataAccessor.java:45 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ BlockDataAccessor ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: entity, pos.
Parameters
BlockEntity blockEntityBlockPos blockPos
ตัวอย่างใช้งาน
BlockEntity blockEntity = ...;
BlockPos blockPos = ...;
BlockDataAccessor instance = new BlockDataAccessor(blockEntity, blockPos);
net.minecraft.server.commands.data.BlockDataAccessor#getData()
- Origin:
common - Source:
net/minecraft/server/commands/data/BlockDataAccessor.java:58 - Modifiers:
public - Return:
CompoundTag
คืออะไร
อ่านค่า Data
ทำงานยังไง
เรียกต่อ: saveWithFullMetadata(), getLevel(), registryAccess(). คืนค่า: this.entity.saveWithFullMetadata(this.entity.getLevel().registryAccess()).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.server.commands.data.BlockDataAccessor#getModifiedSuccess()
- Origin:
common - Source:
net/minecraft/server/commands/data/BlockDataAccessor.java:63 - Modifiers:
public - Return:
Component
คืออะไร
อ่านค่า Modified Success
ทำงานยังไง
เรียกต่อ: translatable(), getX(), getY(), getZ(). คืนค่า: Component.translatable("commands.data.block.modified", this.pos.getX(), this.pos.getY(), this.pos.getZ()).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.server.commands.data.BlockDataAccessor#getPrintSuccess(NbtPathArgument.NbtPath,double,int)
- Origin:
common - Source:
net/minecraft/server/commands/data/BlockDataAccessor.java:73 - Modifiers:
public - Return:
Component
คืออะไร
อ่านค่า Print Success
ทำงานยังไง
เรียกต่อ: translatable(), asString(), getX(), getY(), getZ(), format().
Parameters
NbtPathArgument.NbtPath nbtPathdouble dint i
ตัวอย่างใช้งาน
BlockDataAccessor instance = ...;
NbtPathArgument.NbtPath nbtPath = ...;
Component result = instance.getPrintSuccess(nbtPath, 0.0D, 0);
net.minecraft.server.commands.data.BlockDataAccessor#getPrintSuccess(Tag)
- Origin:
common - Source:
net/minecraft/server/commands/data/BlockDataAccessor.java:68 - Modifiers:
public - Return:
Component
คืออะไร
อ่านค่า Print Success
ทำงานยังไง
เรียกต่อ: translatable(), getX(), getY(), getZ(), toPrettyComponent(). คืนค่า: Component.translatable("commands.data.block.query", this.pos.getX(), this.pos.getY(), this.pos.getZ(), NbtUtils.toPrettyComponent(tag)).
Parameters
Tag tag
ตัวอย่างใช้งาน
net.minecraft.server.commands.data.BlockDataAccessor#setData(CompoundTag)
- Origin:
common - Source:
net/minecraft/server/commands/data/BlockDataAccessor.java:50 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Data
ทำงานยังไง
เรียกต่อ: getLevel(), getBlockState(), loadWithComponents(), registryAccess(), setChanged(), sendBlockUpdated().
Parameters
CompoundTag compoundTag
ตัวอย่างใช้งาน
DataAccessor
- Full name:
net.minecraft.server.commands.data.DataAccessor - Package:
net.minecraft.server.commands.data - Source:
common—net/minecraft/server/commands/data/DataAccessor.java - Type:
interface - Modifiers:
public
net.minecraft.server.commands.data.DataAccessor#getData()
- Origin:
common - Source:
net/minecraft/server/commands/data/DataAccessor.java:12 - Modifiers: ``
- Return:
CompoundTag
คืออะไร
อ่านค่า Data
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
- ไม่มี
Throws
CommandSyntaxException
ตัวอย่างใช้งาน
net.minecraft.server.commands.data.DataAccessor#getModifiedSuccess()
- Origin:
common - Source:
net/minecraft/server/commands/data/DataAccessor.java:14 - Modifiers: ``
- Return:
Component
คืออะไร
อ่านค่า Modified Success
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.server.commands.data.DataAccessor#getPrintSuccess(NbtPathArgument.NbtPath,double,int)
- Origin:
common - Source:
net/minecraft/server/commands/data/DataAccessor.java:18 - Modifiers: ``
- Return:
Component
คืออะไร
อ่านค่า Print Success
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
NbtPathArgument.NbtPath nbtPathdouble dint i
ตัวอย่างใช้งาน
DataAccessor instance = ...;
NbtPathArgument.NbtPath nbtPath = ...;
Component result = instance.getPrintSuccess(nbtPath, 0.0D, 0);
net.minecraft.server.commands.data.DataAccessor#getPrintSuccess(Tag)
- Origin:
common - Source:
net/minecraft/server/commands/data/DataAccessor.java:16 - Modifiers: ``
- Return:
Component
คืออะไร
อ่านค่า Print Success
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
Tag tag
ตัวอย่างใช้งาน
net.minecraft.server.commands.data.DataAccessor#setData(CompoundTag)
- Origin:
common - Source:
net/minecraft/server/commands/data/DataAccessor.java:10 - Modifiers: ``
- Return:
void
คืออะไร
กำหนดค่า Data
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
CompoundTag compoundTag
Throws
CommandSyntaxException
ตัวอย่างใช้งาน
DataCommands
- Full name:
net.minecraft.server.commands.data.DataCommands - Package:
net.minecraft.server.commands.data - Source:
common—net/minecraft/server/commands/data/DataCommands.java - Type:
class - Modifiers:
public
net.minecraft.server.commands.data.DataCommands#getSingleTag(NbtPathArgument.NbtPath,DataAccessor)
- Origin:
common - Source:
net/minecraft/server/commands/data/DataCommands.java:340 - Modifiers:
public static - Return:
Tag
คืออะไร
อ่านค่า Single Tag
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: get(), getData(), iterator(), next(), hasNext(), create(). คืนค่า: tag.
Parameters
NbtPathArgument.NbtPath nbtPathDataAccessor dataAccessor
Throws
CommandSyntaxException
ตัวอย่างใช้งาน
NbtPathArgument.NbtPath nbtPath = ...;
DataAccessor dataAccessor = ...;
Tag result = DataCommands.getSingleTag(nbtPath, dataAccessor);
net.minecraft.server.commands.data.DataCommands#register(CommandDispatcher<CommandSourceStack>)
- Origin:
common - Source:
net/minecraft/server/commands/data/DataCommands.java:63 - Modifiers:
public static - Return:
void
คืออะไร
ลงทะเบียน register
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: literal(), requires(), hasPermission(), then(), wrap(), argument(), compoundTag(), executes(). สร้างออบเจ็กต์: CompoundTag. คืนค่า: i.
Parameters
CommandDispatcher<CommandSourceStack> commandDispatcher
ตัวอย่างใช้งาน
CommandDispatcher<CommandSourceStack> commandDispatcher = ...;
DataCommands.register(commandDispatcher);
DataCommands$DataProvider
- Full name:
net.minecraft.server.commands.data.DataCommands$DataProvider - Package:
net.minecraft.server.commands.data - Source:
common—net/minecraft/server/commands/data/DataCommands.java - Type:
interface - Modifiers:
public
net.minecraft.server.commands.data.DataCommands$DataProvider#access(CommandContext<CommandSourceStack>)
- Origin:
common - Source:
net/minecraft/server/commands/data/DataCommands.java:416 - Modifiers: ``
- Return:
DataAccessor
คืออะไร
ดำเนินการ access ตาม implementation ของ DataCommands$DataProvider
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
CommandContext<CommandSourceStack> commandContext
Throws
CommandSyntaxException
ตัวอย่างใช้งาน
DataCommands.DataProvider instance = ...;
CommandContext<CommandSourceStack> commandContext = ...;
DataAccessor result = instance.access(commandContext);
net.minecraft.server.commands.data.DataCommands$DataProvider#wrap(ArgumentBuilder<CommandSourceStack, ?>,Function<ArgumentBuilder<CommandSourceStack, ?>, ArgumentBuilder<CommandSourceStack, ?>>)
- Origin:
common - Source:
net/minecraft/server/commands/data/DataCommands.java:418 - Modifiers: ``
- Return:
ArgumentBuilder<CommandSourceStack, ?>
คืออะไร
ดำเนินการ wrap ตาม implementation ของ DataCommands$DataProvider
ทำงานยังไง
ไม่มี body ใน source declaration นี้
Parameters
ArgumentBuilder<CommandSourceStack, ?> argumentBuilderFunction<ArgumentBuilder<CommandSourceStack, ?>, ArgumentBuilder<CommandSourceStack, ?>> function
ตัวอย่างใช้งาน
DataCommands.DataProvider instance = ...;
ArgumentBuilder<CommandSourceStack, ?> argumentBuilder = ...;
Function<ArgumentBuilder<CommandSourceStack, ?>, ArgumentBuilder<CommandSourceStack, ?>> function = ...;
ArgumentBuilder<CommandSourceStack, ?> result = instance.wrap(argumentBuilder, function);
EntityDataAccessor
- Full name:
net.minecraft.server.commands.data.EntityDataAccessor - Package:
net.minecraft.server.commands.data - Source:
common—net/minecraft/server/commands/data/EntityDataAccessor.java - Type:
class - Modifiers:
public - Implements:
DataAccessor
net.minecraft.server.commands.data.EntityDataAccessor#EntityDataAccessor(Entity)
- Origin:
common - Source:
net/minecraft/server/commands/data/EntityDataAccessor.java:39 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ EntityDataAccessor ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: entity.
Parameters
Entity entity
ตัวอย่างใช้งาน
net.minecraft.server.commands.data.EntityDataAccessor#getData()
- Origin:
common - Source:
net/minecraft/server/commands/data/EntityDataAccessor.java:54 - Modifiers:
public - Return:
CompoundTag
คืออะไร
อ่านค่า Data
ทำงานยังไง
เรียกต่อ: getEntityTagToCompare(). คืนค่า: NbtPredicate.getEntityTagToCompare(this.entity).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.server.commands.data.EntityDataAccessor#getModifiedSuccess()
- Origin:
common - Source:
net/minecraft/server/commands/data/EntityDataAccessor.java:59 - Modifiers:
public - Return:
Component
คืออะไร
อ่านค่า Modified Success
ทำงานยังไง
เรียกต่อ: translatable(), getDisplayName(). คืนค่า: Component.translatable("commands.data.entity.modified", this.entity.getDisplayName()).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.server.commands.data.EntityDataAccessor#getPrintSuccess(NbtPathArgument.NbtPath,double,int)
- Origin:
common - Source:
net/minecraft/server/commands/data/EntityDataAccessor.java:69 - Modifiers:
public - Return:
Component
คืออะไร
อ่านค่า Print Success
ทำงานยังไง
เรียกต่อ: translatable(), asString(), getDisplayName(), format(). คืนค่า: Component.translatable("commands.data.entity.get", nbtPath.asString(), this.entity.getDisplayName(), String.format(Locale.ROOT, "%.2f", d), i).
Parameters
NbtPathArgument.NbtPath nbtPathdouble dint i
ตัวอย่างใช้งาน
EntityDataAccessor instance = ...;
NbtPathArgument.NbtPath nbtPath = ...;
Component result = instance.getPrintSuccess(nbtPath, 0.0D, 0);
net.minecraft.server.commands.data.EntityDataAccessor#getPrintSuccess(Tag)
- Origin:
common - Source:
net/minecraft/server/commands/data/EntityDataAccessor.java:64 - Modifiers:
public - Return:
Component
คืออะไร
อ่านค่า Print Success
ทำงานยังไง
เรียกต่อ: translatable(), getDisplayName(), toPrettyComponent(). คืนค่า: Component.translatable("commands.data.entity.query", this.entity.getDisplayName(), NbtUtils.toPrettyComponent(tag)).
Parameters
Tag tag
ตัวอย่างใช้งาน
net.minecraft.server.commands.data.EntityDataAccessor#setData(CompoundTag)
- Origin:
common - Source:
net/minecraft/server/commands/data/EntityDataAccessor.java:43 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Data
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: create(), getUUID(), load(), setUUID().
Parameters
CompoundTag compoundTag
Throws
CommandSyntaxException
ตัวอย่างใช้งาน
StorageDataAccessor
- Full name:
net.minecraft.server.commands.data.StorageDataAccessor - Package:
net.minecraft.server.commands.data - Source:
common—net/minecraft/server/commands/data/StorageDataAccessor.java - Type:
class - Modifiers:
public - Implements:
DataAccessor
net.minecraft.server.commands.data.StorageDataAccessor#getData()
- Origin:
common - Source:
net/minecraft/server/commands/data/StorageDataAccessor.java:56 - Modifiers:
public - Return:
CompoundTag
คืออะไร
อ่านค่า Data
ทำงานยังไง
เรียกต่อ: get(). คืนค่า: this.storage.get(this.id).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.server.commands.data.StorageDataAccessor#getModifiedSuccess()
- Origin:
common - Source:
net/minecraft/server/commands/data/StorageDataAccessor.java:61 - Modifiers:
public - Return:
Component
คืออะไร
อ่านค่า Modified Success
ทำงานยังไง
เรียกต่อ: translatable(), translationArg(). คืนค่า: Component.translatable("commands.data.storage.modified", Component.translationArg(this.id)).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.server.commands.data.StorageDataAccessor#getPrintSuccess(NbtPathArgument.NbtPath,double,int)
- Origin:
common - Source:
net/minecraft/server/commands/data/StorageDataAccessor.java:71 - Modifiers:
public - Return:
Component
คืออะไร
อ่านค่า Print Success
ทำงานยังไง
เรียกต่อ: translatable(), asString(), translationArg(), format(). คืนค่า: Component.translatable("commands.data.storage.get", nbtPath.asString(), Component.translationArg(this.id), String.format(Locale.ROOT, "%.2f", d), i).
Parameters
NbtPathArgument.NbtPath nbtPathdouble dint i
ตัวอย่างใช้งาน
StorageDataAccessor instance = ...;
NbtPathArgument.NbtPath nbtPath = ...;
Component result = instance.getPrintSuccess(nbtPath, 0.0D, 0);
net.minecraft.server.commands.data.StorageDataAccessor#getPrintSuccess(Tag)
- Origin:
common - Source:
net/minecraft/server/commands/data/StorageDataAccessor.java:66 - Modifiers:
public - Return:
Component
คืออะไร
อ่านค่า Print Success
ทำงานยังไง
เรียกต่อ: translatable(), translationArg(), toPrettyComponent(). คืนค่า: Component.translatable("commands.data.storage.query", Component.translationArg(this.id), NbtUtils.toPrettyComponent(tag)).
Parameters
Tag tag
ตัวอย่างใช้งาน
StorageDataAccessor instance = ...;
Tag tag = ...;
Component result = instance.getPrintSuccess(tag);
net.minecraft.server.commands.data.StorageDataAccessor#setData(CompoundTag)
- Origin:
common - Source:
net/minecraft/server/commands/data/StorageDataAccessor.java:51 - Modifiers:
public - Return:
void
คืออะไร
กำหนดค่า Data
ทำงานยังไง
เรียกต่อ: set().
Parameters
CompoundTag compoundTag