Skip to content

Package net.minecraft.server.packs

Part 1/1


AbstractPackResources

  • Full name: net.minecraft.server.packs.AbstractPackResources
  • Package: net.minecraft.server.packs
  • Source: commonnet/minecraft/server/packs/AbstractPackResources.java
  • Type: class
  • Modifiers: public abstract
  • Implements: PackResources

net.minecraft.server.packs.AbstractPackResources#AbstractPackResources(PackLocationInfo)

  • Origin: common
  • Source: net/minecraft/server/packs/AbstractPackResources.java:21
  • Modifiers: protected
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: location.

Parameters

  • PackLocationInfo packLocationInfo

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

PackLocationInfo packLocationInfo = ...;
AbstractPackResources instance = new AbstractPackResources(packLocationInfo);

net.minecraft.server.packs.AbstractPackResources#getMetadataFromStream(MetadataSectionType<T>,InputStream)

  • Origin: common
  • Source: net/minecraft/server/packs/AbstractPackResources.java:38
  • Modifiers: public static
  • Return: T

คืออะไร

อ่านค่า Metadata From Stream

ทำงานยังไง

มีการจัดการ exception. เรียกต่อ: parse(), error(), name(), has(), codec(), get(), ifError(), result(). สร้างออบเจ็กต์: BufferedReader, InputStreamReader. คืนค่า: null.

Parameters

  • MetadataSectionType<T> metadataSectionType
  • InputStream inputStream

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

MetadataSectionType<T> metadataSectionType = ...;
InputStream inputStream = ...;
T result = AbstractPackResources.getMetadataFromStream(metadataSectionType, inputStream);

net.minecraft.server.packs.AbstractPackResources#getMetadataSection(MetadataSectionType<T>)

  • Origin: common
  • Source: net/minecraft/server/packs/AbstractPackResources.java:25
  • Modifiers: public
  • Return: T

คืออะไร

อ่านค่า Metadata Section

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการจัดการ exception. เรียกต่อ: getRootResource(), get(), getMetadataFromStream(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • MetadataSectionType<T> metadataSectionType

Throws

  • IOException

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

AbstractPackResources instance = ...;
MetadataSectionType<T> metadataSectionType = ...;
T result = instance.getMetadataSection(metadataSectionType);

net.minecraft.server.packs.AbstractPackResources#location()

  • Origin: common
  • Source: net/minecraft/server/packs/AbstractPackResources.java:57
  • Modifiers: public
  • Return: PackLocationInfo

คืออะไร

ดำเนินการ location ตาม implementation ของ AbstractPackResources

ทำงานยังไง

คืนค่า: this.location.

Parameters

  • ไม่มี

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

AbstractPackResources instance = ...;
PackLocationInfo result = instance.location();

BuiltInMetadata

  • Full name: net.minecraft.server.packs.BuiltInMetadata
  • Package: net.minecraft.server.packs
  • Source: commonnet/minecraft/server/packs/BuiltInMetadata.java
  • Type: class
  • Modifiers: public

net.minecraft.server.packs.BuiltInMetadata#get(MetadataSectionType<T>)

  • Origin: common
  • Source: net/minecraft/server/packs/BuiltInMetadata.java:14
  • Modifiers: public
  • Return: T

คืออะไร

อ่านค่า get

ทำงานยังไง

คืนค่า: (T)this.values.get(metadataSectionType).

Parameters

  • MetadataSectionType<T> metadataSectionType

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

BuiltInMetadata instance = ...;
MetadataSectionType<T> metadataSectionType = ...;
T result = instance.get(metadataSectionType);

net.minecraft.server.packs.BuiltInMetadata#of()

  • Origin: common
  • Source: net/minecraft/server/packs/BuiltInMetadata.java:18
  • Modifiers: public static
  • Return: BuiltInMetadata

คืออะไร

ดำเนินการ of ตาม implementation ของ BuiltInMetadata

ทำงานยังไง

คืนค่า: EMPTY.

Parameters

  • ไม่มี

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

BuiltInMetadata result = BuiltInMetadata.of();

net.minecraft.server.packs.BuiltInMetadata#of(MetadataSectionType<T1>,T1,MetadataSectionType<T2>,T2)

  • Origin: common
  • Source: net/minecraft/server/packs/BuiltInMetadata.java:26
  • Modifiers: public static
  • Return: BuiltInMetadata

คืออะไร

ดำเนินการ of ตาม implementation ของ BuiltInMetadata

ทำงานยังไง

สร้างออบเจ็กต์: BuiltInMetadata. คืนค่า: new BuiltInMetadata(Map.of(metadataSectionType, object, metadataSectionType2, (T1)object2)).

Parameters

  • MetadataSectionType<T1> metadataSectionType
  • T1 object
  • MetadataSectionType<T2> metadataSectionType2
  • T2 object2

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

MetadataSectionType<T1> metadataSectionType = ...;
T1 object = ...;
MetadataSectionType<T2> metadataSectionType2 = ...;
T2 object2 = ...;
BuiltInMetadata result = BuiltInMetadata.of(metadataSectionType, object, metadataSectionType2, object2);

net.minecraft.server.packs.BuiltInMetadata#of(MetadataSectionType<T>,T)

  • Origin: common
  • Source: net/minecraft/server/packs/BuiltInMetadata.java:22
  • Modifiers: public static
  • Return: BuiltInMetadata

คืออะไร

ดำเนินการ of ตาม implementation ของ BuiltInMetadata

ทำงานยังไง

สร้างออบเจ็กต์: BuiltInMetadata. คืนค่า: new BuiltInMetadata(Map.of(metadataSectionType, object)).

Parameters

  • MetadataSectionType<T> metadataSectionType
  • T object

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

MetadataSectionType<T> metadataSectionType = ...;
T object = ...;
BuiltInMetadata result = BuiltInMetadata.of(metadataSectionType, object);

CompositePackResources

  • Full name: net.minecraft.server.packs.CompositePackResources
  • Package: net.minecraft.server.packs
  • Source: commonnet/minecraft/server/packs/CompositePackResources.java
  • Type: class
  • Modifiers: public
  • Implements: PackResources

net.minecraft.server.packs.CompositePackResources#close()

  • Origin: common
  • Source: net/minecraft/server/packs/CompositePackResources.java:81
  • Modifiers: public
  • Return: void

คืออะไร

ปิด close

ทำงานยังไง

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

Parameters

  • ไม่มี

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

CompositePackResources instance = ...;
instance.close();

net.minecraft.server.packs.CompositePackResources#CompositePackResources(PackResources,List<PackResources>)

  • Origin: common
  • Source: net/minecraft/server/packs/CompositePackResources.java:21
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: primaryPackResources, packResourcesStack. เรียกต่อ: size(), addAll(), reverse(), add(), copyOf(). สร้างออบเจ็กต์: ArrayList<>.

Parameters

  • PackResources packResources
  • List<PackResources> list

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

PackResources packResources = ...;
List<PackResources> list = ...;
CompositePackResources instance = new CompositePackResources(packResources, list);

net.minecraft.server.packs.CompositePackResources#getMetadataSection(MetadataSectionType<T>)

  • Origin: common
  • Source: net/minecraft/server/packs/CompositePackResources.java:70
  • Modifiers: public
  • Return: T

คืออะไร

อ่านค่า Metadata Section

ทำงานยังไง

คืนค่า: this.primaryPackResources.getMetadataSection(metadataSectionType).

Parameters

  • MetadataSectionType<T> metadataSectionType

Throws

  • IOException

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

CompositePackResources instance = ...;
MetadataSectionType<T> metadataSectionType = ...;
T result = instance.getMetadataSection(metadataSectionType);

net.minecraft.server.packs.CompositePackResources#getNamespaces(PackType)

  • Origin: common
  • Source: net/minecraft/server/packs/CompositePackResources.java:59
  • Modifiers: public
  • Return: Set<String>

คืออะไร

อ่านค่า Namespaces

ทำงานยังไง

มีการวนลูป. เรียกต่อ: addAll(). สร้างออบเจ็กต์: HashSet<>. คืนค่า: set.

Parameters

  • PackType packType

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

CompositePackResources instance = ...;
PackType packType = ...;
Set<String> result = instance.getNamespaces(packType);

net.minecraft.server.packs.CompositePackResources#getResource(PackType,ResourceLocation)

  • Origin: common
  • Source: net/minecraft/server/packs/CompositePackResources.java:35
  • Modifiers: public
  • Return: IoSupplier<InputStream>

คืออะไร

อ่านค่า Resource

ทำงานยังไง

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

Parameters

  • PackType packType
  • ResourceLocation resourceLocation

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

CompositePackResources instance = ...;
PackType packType = ...;
ResourceLocation resourceLocation = ...;
IoSupplier<InputStream> result = instance.getResource(packType, resourceLocation);

net.minecraft.server.packs.CompositePackResources#getRootResource(String[])

  • Origin: common
  • Source: net/minecraft/server/packs/CompositePackResources.java:29
  • Modifiers: public
  • Return: IoSupplier<InputStream>

คืออะไร

อ่านค่า Root Resource

ทำงานยังไง

คืนค่า: this.primaryPackResources.getRootResource(strings).

Parameters

  • String[] strings

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

CompositePackResources instance = ...;
String[] strings = ...;
IoSupplier<InputStream> result = instance.getRootResource(strings);

net.minecraft.server.packs.CompositePackResources#listResources(PackType,String,String,PackResources.ResourceOutput)

  • Origin: common
  • Source: net/minecraft/server/packs/CompositePackResources.java:48
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ listResources ตาม implementation ของ CompositePackResources

ทำงานยังไง

มีการวนลูป. เรียกต่อ: forEach(). สร้างออบเจ็กต์: HashMap<>.

Parameters

  • PackType packType
  • String string
  • String string2
  • PackResources.ResourceOutput resourceOutput

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

CompositePackResources instance = ...;
PackType packType = ...;
PackResources.ResourceOutput resourceOutput = ...;
instance.listResources(packType, "value", "value", resourceOutput);

net.minecraft.server.packs.CompositePackResources#location()

  • Origin: common
  • Source: net/minecraft/server/packs/CompositePackResources.java:76
  • Modifiers: public
  • Return: PackLocationInfo

คืออะไร

ดำเนินการ location ตาม implementation ของ CompositePackResources

ทำงานยังไง

คืนค่า: this.primaryPackResources.location().

Parameters

  • ไม่มี

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

CompositePackResources instance = ...;
PackLocationInfo result = instance.location();

DownloadCacheCleaner

  • Full name: net.minecraft.server.packs.DownloadCacheCleaner
  • Package: net.minecraft.server.packs
  • Source: commonnet/minecraft/server/packs/DownloadCacheCleaner.java
  • Type: class
  • Modifiers: public

net.minecraft.server.packs.DownloadCacheCleaner#vacuumCacheDir(Path,int)

  • Origin: common
  • Source: net/minecraft/server/packs/DownloadCacheCleaner.java:26
  • Modifiers: public static
  • Return: void

คืออะไร

ดำเนินการ vacuumCacheDir ตาม implementation ของ DownloadCacheCleaner

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป ; มีการจัดการ exception. เรียกต่อ: listFilesWithModificationTimes(), size(), sort(), prioritizeFilesInDirs(), reverse(), get(), delete(), add(). สร้างออบเจ็กต์: HashSet<>.

Parameters

  • Path path
  • int i

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

Path path = ...;
DownloadCacheCleaner.vacuumCacheDir(path, 0);

DownloadQueue

  • Full name: net.minecraft.server.packs.DownloadQueue
  • Package: net.minecraft.server.packs
  • Source: commonnet/minecraft/server/packs/DownloadQueue.java
  • Type: class
  • Modifiers: public
  • Implements: AutoCloseable

net.minecraft.server.packs.DownloadQueue#close()

  • Origin: common
  • Source: net/minecraft/server/packs/DownloadQueue.java:104
  • Modifiers: public
  • Return: void

คืออะไร

ปิด close

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 2 statement).

Parameters

  • ไม่มี

Throws

  • IOException

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

DownloadQueue instance = ...;
instance.close();

net.minecraft.server.packs.DownloadQueue#downloadBatch(DownloadQueue.BatchConfig,Map<UUID, DownloadQueue.DownloadRequest>)

  • Origin: common
  • Source: net/minecraft/server/packs/DownloadQueue.java:100
  • Modifiers: public
  • Return: CompletableFuture<DownloadQueue.BatchResult>

คืออะไร

ดำเนินการ downloadBatch ตาม implementation ของ DownloadQueue

ทำงานยังไง

เรียกต่อ: supplyAsync(), runDownload(). คืนค่า: CompletableFuture.supplyAsync(() -> this.runDownload(batchConfig, map), this.tasks::schedule).

Parameters

  • DownloadQueue.BatchConfig batchConfig
  • Map<UUID, DownloadQueue.DownloadRequest> map

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

DownloadQueue instance = ...;
DownloadQueue.BatchConfig batchConfig = ...;
Map<UUID, DownloadQueue.DownloadRequest> map = ...;
CompletableFuture<DownloadQueue.BatchResult> result = instance.downloadBatch(batchConfig, map);

net.minecraft.server.packs.DownloadQueue#DownloadQueue(Path)

  • Origin: common
  • Source: net/minecraft/server/packs/DownloadQueue.java:39
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: cacheDir, eventLog. เรียกต่อ: createDirectoriesSafe(), open(), resolve(), vacuumCacheDir().

Parameters

  • Path path

Throws

  • IOException

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

Path path = ...;
DownloadQueue instance = new DownloadQueue(path);

DownloadQueue$BatchResult

  • Full name: net.minecraft.server.packs.DownloadQueue$BatchResult
  • Package: net.minecraft.server.packs
  • Source: commonnet/minecraft/server/packs/DownloadQueue.java
  • Type: record
  • Modifiers: public

net.minecraft.server.packs.DownloadQueue$BatchResult#BatchResult()

  • Origin: common
  • Source: net/minecraft/server/packs/DownloadQueue.java:115
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

สร้างออบเจ็กต์: HashMap<>, HashSet<>.

Parameters

  • ไม่มี

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

DownloadQueue.BatchResult instance = new DownloadQueue.BatchResult();

FilePackResources

  • Full name: net.minecraft.server.packs.FilePackResources
  • Package: net.minecraft.server.packs
  • Source: commonnet/minecraft/server/packs/FilePackResources.java
  • Type: class
  • Modifiers: public
  • Extends: AbstractPackResources

net.minecraft.server.packs.FilePackResources#close()

  • Origin: common
  • Source: net/minecraft/server/packs/FilePackResources.java:103
  • Modifiers: public
  • Return: void

คืออะไร

ปิด close

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • ไม่มี

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

FilePackResources instance = ...;
instance.close();

net.minecraft.server.packs.FilePackResources#extractNamespace(String,String)

  • Origin: common
  • Source: net/minecraft/server/packs/FilePackResources.java:92
  • Modifiers: public static
  • Return: String

คืออะไร

ดำเนินการ extractNamespace ตาม implementation ของ FilePackResources

ทำงานยังไง

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

Parameters

  • String string
  • String string2

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

String result = FilePackResources.extractNamespace("value", "value");

net.minecraft.server.packs.FilePackResources#getNamespaces(PackType)

  • Origin: common
  • Source: net/minecraft/server/packs/FilePackResources.java:65
  • Modifiers: public
  • Return: Set<String>

คืออะไร

อ่านค่า Namespaces

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getOrCreateZipFile(), of(), entries(), newHashSet(), addPrefix(), getDirectory(), hasMoreElements(), nextElement(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • PackType packType

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

FilePackResources instance = ...;
PackType packType = ...;
Set<String> result = instance.getNamespaces(packType);

net.minecraft.server.packs.FilePackResources#getResource(PackType,ResourceLocation)

  • Origin: common
  • Source: net/minecraft/server/packs/FilePackResources.java:45
  • Modifiers: public
  • Return: IoSupplier<InputStream>

คืออะไร

อ่านค่า Resource

ทำงานยังไง

เรียกต่อ: getPathFromLocation(). คืนค่า: this.getResource(getPathFromLocation(packType, resourceLocation)).

Parameters

  • PackType packType
  • ResourceLocation resourceLocation

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

FilePackResources instance = ...;
PackType packType = ...;
ResourceLocation resourceLocation = ...;
IoSupplier<InputStream> result = instance.getResource(packType, resourceLocation);

net.minecraft.server.packs.FilePackResources#getRootResource(String[])

  • Origin: common
  • Source: net/minecraft/server/packs/FilePackResources.java:39
  • Modifiers: public
  • Return: IoSupplier<InputStream>

คืออะไร

อ่านค่า Root Resource

ทำงานยังไง

เรียกต่อ: getResource(), join(). คืนค่า: this.getResource(String.join("/", strings)).

Parameters

  • String[] strings

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

FilePackResources instance = ...;
String[] strings = ...;
IoSupplier<InputStream> result = instance.getRootResource(strings);

net.minecraft.server.packs.FilePackResources#listResources(PackType,String,String,PackResources.ResourceOutput)

  • Origin: common
  • Source: net/minecraft/server/packs/FilePackResources.java:108
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ listResources ตาม implementation ของ FilePackResources

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getOrCreateZipFile(), entries(), addPrefix(), getDirectory(), hasMoreElements(), nextElement(), isDirectory(), getName().

Parameters

  • PackType packType
  • String string
  • String string2
  • PackResources.ResourceOutput resourceOutput

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

FilePackResources instance = ...;
PackType packType = ...;
PackResources.ResourceOutput resourceOutput = ...;
instance.listResources(packType, "value", "value", resourceOutput);

FilePackResources$FileResourcesSupplier

  • Full name: net.minecraft.server.packs.FilePackResources$FileResourcesSupplier
  • Package: net.minecraft.server.packs
  • Source: commonnet/minecraft/server/packs/FilePackResources.java
  • Type: class
  • Modifiers: public static
  • Implements: Pack.ResourcesSupplier

net.minecraft.server.packs.FilePackResources$FileResourcesSupplier#FileResourcesSupplier(File)

  • Origin: common
  • Source: net/minecraft/server/packs/FilePackResources.java:141
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: content.

Parameters

  • File file

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

File file = ...;
FilePackResources.FileResourcesSupplier instance = new FilePackResources.FileResourcesSupplier(file);

net.minecraft.server.packs.FilePackResources$FileResourcesSupplier#FileResourcesSupplier(Path)

  • Origin: common
  • Source: net/minecraft/server/packs/FilePackResources.java:137
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • Path path

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

Path path = ...;
FilePackResources.FileResourcesSupplier instance = new FilePackResources.FileResourcesSupplier(path);

net.minecraft.server.packs.FilePackResources$FileResourcesSupplier#openFull(PackLocationInfo,Pack.Metadata)

  • Origin: common
  • Source: net/minecraft/server/packs/FilePackResources.java:151
  • Modifiers: public
  • Return: PackResources

คืออะไร

เปิด Full

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: SharedZipFileAccess(), overlays(), isEmpty(), size(), add(). สร้างออบเจ็กต์: FilePackResources.SharedZipFileAccess, FilePackResources, ArrayList<>, CompositePackResources. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • PackLocationInfo packLocationInfo
  • Pack.Metadata metadata

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

FilePackResources.FileResourcesSupplier instance = ...;
PackLocationInfo packLocationInfo = ...;
Pack.Metadata metadata = ...;
PackResources result = instance.openFull(packLocationInfo, metadata);

net.minecraft.server.packs.FilePackResources$FileResourcesSupplier#openPrimary(PackLocationInfo)

  • Origin: common
  • Source: net/minecraft/server/packs/FilePackResources.java:145
  • Modifiers: public
  • Return: PackResources

คืออะไร

เปิด Primary

ทำงานยังไง

เรียกต่อ: SharedZipFileAccess(). สร้างออบเจ็กต์: FilePackResources.SharedZipFileAccess, FilePackResources. คืนค่า: new FilePackResources(packLocationInfo, sharedZipFileAccess, "").

Parameters

  • PackLocationInfo packLocationInfo

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

FilePackResources.FileResourcesSupplier instance = ...;
PackLocationInfo packLocationInfo = ...;
PackResources result = instance.openPrimary(packLocationInfo);

OverlayMetadataSection

  • Full name: net.minecraft.server.packs.OverlayMetadataSection
  • Package: net.minecraft.server.packs
  • Source: commonnet/minecraft/server/packs/OverlayMetadataSection.java
  • Type: record
  • Modifiers: public

net.minecraft.server.packs.OverlayMetadataSection#overlaysForVersion(int)

  • Origin: common
  • Source: net/minecraft/server/packs/OverlayMetadataSection.java:23
  • Modifiers: public
  • Return: List<String>

คืออะไร

ดำเนินการ overlaysForVersion ตาม implementation ของ OverlayMetadataSection

ทำงานยังไง

เรียกต่อ: stream(), filter(), isApplicable(), map(), toList(). คืนค่า: this.overlays.stream().filter(overlayEntry -> overlayEntry.isApplicable(i)).map(OverlayMetadataSection.OverlayEntry::overlay).toList().

Parameters

  • int i

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

OverlayMetadataSection instance = ...;
List<String> result = instance.overlaysForVersion(0);

OverlayMetadataSection$OverlayEntry

  • Full name: net.minecraft.server.packs.OverlayMetadataSection$OverlayEntry
  • Package: net.minecraft.server.packs
  • Source: commonnet/minecraft/server/packs/OverlayMetadataSection.java
  • Type: record
  • Modifiers: public

net.minecraft.server.packs.OverlayMetadataSection$OverlayEntry#isApplicable(int)

  • Origin: common
  • Source: net/minecraft/server/packs/OverlayMetadataSection.java:36
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

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

Parameters

  • int i

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

OverlayMetadataSection.OverlayEntry instance = ...;
boolean result = instance.isApplicable(0);

PackLocationInfo

  • Full name: net.minecraft.server.packs.PackLocationInfo
  • Package: net.minecraft.server.packs
  • Source: commonnet/minecraft/server/packs/PackLocationInfo.java
  • Type: record
  • Modifiers: public

net.minecraft.server.packs.PackLocationInfo#createChatLink(boolean,Component)

  • Origin: common
  • Source: net/minecraft/server/packs/PackLocationInfo.java:13
  • Modifiers: public
  • Return: Component

คืออะไร

สร้าง Chat Link

ทำงานยังไง

เรียกต่อ: wrapInSquareBrackets(), decorate(), literal(), withStyle(), withColor(), withInsertion(), escapeIfRequired(), withHoverEvent(). สร้างออบเจ็กต์: HoverEvent.

Parameters

  • boolean bl
  • Component component

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

PackLocationInfo instance = ...;
Component component = ...;
Component result = instance.createChatLink(true, component);

PackResources

  • Full name: net.minecraft.server.packs.PackResources
  • Package: net.minecraft.server.packs
  • Source: commonnet/minecraft/server/packs/PackResources.java
  • Type: interface
  • Modifiers: public
  • Implements: AutoCloseable

net.minecraft.server.packs.PackResources#close()

  • Origin: common
  • Source: net/minecraft/server/packs/PackResources.java:41
  • Modifiers: ``
  • Return: void

คืออะไร

ปิด close

ทำงานยังไง

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

Parameters

  • ไม่มี

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

PackResources instance = ...;
instance.close();

net.minecraft.server.packs.PackResources#getMetadataSection(MetadataSectionType<T>)

  • Origin: common
  • Source: net/minecraft/server/packs/PackResources.java:28
  • Modifiers: ``
  • Return: T

คืออะไร

อ่านค่า Metadata Section

ทำงานยังไง

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

Parameters

  • MetadataSectionType<T> metadataSectionType

Throws

  • IOException

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

PackResources instance = ...;
MetadataSectionType<T> metadataSectionType = ...;
T result = instance.getMetadataSection(metadataSectionType);

net.minecraft.server.packs.PackResources#getNamespaces(PackType)

  • Origin: common
  • Source: net/minecraft/server/packs/PackResources.java:26
  • Modifiers: ``
  • Return: Set<String>

คืออะไร

อ่านค่า Namespaces

ทำงานยังไง

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

Parameters

  • PackType packType

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

PackResources instance = ...;
PackType packType = ...;
Set<String> result = instance.getNamespaces(packType);

net.minecraft.server.packs.PackResources#getResource(PackType,ResourceLocation)

  • Origin: common
  • Source: net/minecraft/server/packs/PackResources.java:21
  • Modifiers: ``
  • Return: IoSupplier<InputStream>

คืออะไร

อ่านค่า Resource

ทำงานยังไง

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

Parameters

  • PackType packType
  • ResourceLocation resourceLocation

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

PackResources instance = ...;
PackType packType = ...;
ResourceLocation resourceLocation = ...;
IoSupplier<InputStream> result = instance.getResource(packType, resourceLocation);

net.minecraft.server.packs.PackResources#getRootResource(String[])

  • Origin: common
  • Source: net/minecraft/server/packs/PackResources.java:18
  • Modifiers: ``
  • Return: IoSupplier<InputStream>

คืออะไร

อ่านค่า Root Resource

ทำงานยังไง

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

Parameters

  • String[] strings

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

PackResources instance = ...;
String[] strings = ...;
IoSupplier<InputStream> result = instance.getRootResource(strings);

net.minecraft.server.packs.PackResources#knownPackInfo()

  • Origin: common
  • Source: net/minecraft/server/packs/PackResources.java:37
  • Modifiers: default
  • Return: Optional<KnownPack>

คืออะไร

ดำเนินการ knownPackInfo ตาม implementation ของ PackResources

ทำงานยังไง

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

Parameters

  • ไม่มี

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

PackResources instance = ...;
Optional<KnownPack> result = instance.knownPackInfo();

net.minecraft.server.packs.PackResources#listResources(PackType,String,String,PackResources.ResourceOutput)

  • Origin: common
  • Source: net/minecraft/server/packs/PackResources.java:24
  • Modifiers: ``
  • Return: void

คืออะไร

ดำเนินการ listResources ตาม implementation ของ PackResources

ทำงานยังไง

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

Parameters

  • PackType packType
  • String string
  • String string2
  • PackResources.ResourceOutput resourceOutput

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

PackResources instance = ...;
PackType packType = ...;
PackResources.ResourceOutput resourceOutput = ...;
instance.listResources(packType, "value", "value", resourceOutput);

net.minecraft.server.packs.PackResources#location()

  • Origin: common
  • Source: net/minecraft/server/packs/PackResources.java:31
  • Modifiers: ``
  • Return: PackLocationInfo

คืออะไร

ดำเนินการ location ตาม implementation ของ PackResources

ทำงานยังไง

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

Parameters

  • ไม่มี

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

PackResources instance = ...;
PackLocationInfo result = instance.location();

net.minecraft.server.packs.PackResources#packId()

  • Origin: common
  • Source: net/minecraft/server/packs/PackResources.java:33
  • Modifiers: default
  • Return: String

คืออะไร

ดำเนินการ packId ตาม implementation ของ PackResources

ทำงานยังไง

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

Parameters

  • ไม่มี

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

PackResources instance = ...;
String result = instance.packId();

PackType

  • Full name: net.minecraft.server.packs.PackType
  • Package: net.minecraft.server.packs
  • Source: commonnet/minecraft/server/packs/PackType.java
  • Type: enum
  • Modifiers: public

net.minecraft.server.packs.PackType#getDirectory()

  • Origin: common
  • Source: net/minecraft/server/packs/PackType.java:13
  • Modifiers: public
  • Return: String

คืออะไร

อ่านค่า Directory

ทำงานยังไง

คืนค่า: this.directory.

Parameters

  • ไม่มี

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

PackType instance = ...;
String result = instance.getDirectory();

PathPackResources

  • Full name: net.minecraft.server.packs.PathPackResources
  • Package: net.minecraft.server.packs
  • Source: commonnet/minecraft/server/packs/PathPackResources.java
  • Type: class
  • Modifiers: public
  • Extends: AbstractPackResources

net.minecraft.server.packs.PathPackResources#close()

  • Origin: common
  • Source: net/minecraft/server/packs/PathPackResources.java:120
  • Modifiers: public
  • Return: void

คืออะไร

ปิด close

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • ไม่มี

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

PathPackResources instance = ...;
instance.close();

net.minecraft.server.packs.PathPackResources#getNamespaces(PackType)

  • Origin: common
  • Source: net/minecraft/server/packs/PathPackResources.java:98
  • Modifiers: public
  • Return: Set<String>

คืออะไร

อ่านค่า Namespaces

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป ; มีการจัดการ exception. เรียกต่อ: newHashSet(), resolve(), getDirectory(), newDirectoryStream(), getFileName(), toString(), isValidNamespace(), add(). คืนค่า: set.

Parameters

  • PackType packType

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

PathPackResources instance = ...;
PackType packType = ...;
Set<String> result = instance.getNamespaces(packType);

net.minecraft.server.packs.PathPackResources#getResource(PackType,ResourceLocation)

  • Origin: common
  • Source: net/minecraft/server/packs/PathPackResources.java:48
  • Modifiers: public
  • Return: IoSupplier<InputStream>

คืออะไร

อ่านค่า Resource

ทำงานยังไง

เรียกต่อ: resolve(), getDirectory(), getNamespace(). คืนค่า: getResource(resourceLocation, path).

Parameters

  • PackType packType
  • ResourceLocation resourceLocation

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

PathPackResources instance = ...;
PackType packType = ...;
ResourceLocation resourceLocation = ...;
IoSupplier<InputStream> result = instance.getResource(packType, resourceLocation);

net.minecraft.server.packs.PathPackResources#getResource(ResourceLocation,Path)

  • Origin: common
  • Source: net/minecraft/server/packs/PathPackResources.java:55
  • Modifiers: public static
  • Return: IoSupplier<InputStream>

คืออะไร

อ่านค่า Resource

ทำงานยังไง

เรียกต่อ: decomposePath(), getPath(), mapOrElse(), resolvePath(), returnFileIfExists(), error(), message(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • ResourceLocation resourceLocation
  • Path path

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

ResourceLocation resourceLocation = ...;
Path path = ...;
IoSupplier<InputStream> result = PathPackResources.getResource(resourceLocation, path);

net.minecraft.server.packs.PathPackResources#getRootResource(String[])

  • Origin: common
  • Source: net/minecraft/server/packs/PathPackResources.java:36
  • Modifiers: public
  • Return: IoSupplier<InputStream>

คืออะไร

อ่านค่า Root Resource

ทำงานยังไง

เรียกต่อ: validatePath(), resolvePath(), of(), exists(), create(). คืนค่า: Files.exists(path) ? IoSupplier.create(path) : null.

Parameters

  • String[] strings

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

PathPackResources instance = ...;
String[] strings = ...;
IoSupplier<InputStream> result = instance.getRootResource(strings);

net.minecraft.server.packs.PathPackResources#listPath(String,Path,List<String>,PackResources.ResourceOutput)

  • Origin: common
  • Source: net/minecraft/server/packs/PathPackResources.java:79
  • Modifiers: public static
  • Return: void

คืออะไร

ดำเนินการ listPath ตาม implementation ของ PathPackResources

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการจัดการ exception. เรียกต่อ: resolvePath(), find(), isRegularFile(), forEach(), join(), relativize(), tryBuild(), logAndPauseIfInIde().

Parameters

  • String string
  • Path path
  • List<String> list
  • PackResources.ResourceOutput resourceOutput

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

Path path = ...;
List<String> list = ...;
PackResources.ResourceOutput resourceOutput = ...;
PathPackResources.listPath("value", path, list, resourceOutput);

net.minecraft.server.packs.PathPackResources#listResources(PackType,String,String,PackResources.ResourceOutput)

  • Origin: common
  • Source: net/minecraft/server/packs/PathPackResources.java:71
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ listResources ตาม implementation ของ PathPackResources

ทำงานยังไง

เรียกต่อ: decomposePath(), ifSuccess(), resolve(), getDirectory(), listPath(), ifError(), error(), message().

Parameters

  • PackType packType
  • String string
  • String string2
  • PackResources.ResourceOutput resourceOutput

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

PathPackResources instance = ...;
PackType packType = ...;
PackResources.ResourceOutput resourceOutput = ...;
instance.listResources(packType, "value", "value", resourceOutput);

net.minecraft.server.packs.PathPackResources#PathPackResources(PackLocationInfo,Path)

  • Origin: common
  • Source: net/minecraft/server/packs/PathPackResources.java:31
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: root.

Parameters

  • PackLocationInfo packLocationInfo
  • Path path

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

PackLocationInfo packLocationInfo = ...;
Path path = ...;
PathPackResources instance = new PathPackResources(packLocationInfo, path);

net.minecraft.server.packs.PathPackResources#validatePath(Path)

  • Origin: common
  • Source: net/minecraft/server/packs/PathPackResources.java:44
  • Modifiers: public static
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: true.

Parameters

  • Path path

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

Path path = ...;
boolean result = PathPackResources.validatePath(path);

PathPackResources$PathResourcesSupplier

  • Full name: net.minecraft.server.packs.PathPackResources$PathResourcesSupplier
  • Package: net.minecraft.server.packs
  • Source: commonnet/minecraft/server/packs/PathPackResources.java
  • Type: class
  • Modifiers: public static
  • Implements: Pack.ResourcesSupplier

net.minecraft.server.packs.PathPackResources$PathResourcesSupplier#openFull(PackLocationInfo,Pack.Metadata)

  • Origin: common
  • Source: net/minecraft/server/packs/PathPackResources.java:136
  • Modifiers: public
  • Return: PackResources

คืออะไร

เปิด Full

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: openPrimary(), overlays(), isEmpty(), size(), resolve(), add(). สร้างออบเจ็กต์: ArrayList<>, PathPackResources, CompositePackResources. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • PackLocationInfo packLocationInfo
  • Pack.Metadata metadata

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

PathPackResources.PathResourcesSupplier instance = ...;
PackLocationInfo packLocationInfo = ...;
Pack.Metadata metadata = ...;
PackResources result = instance.openFull(packLocationInfo, metadata);

net.minecraft.server.packs.PathPackResources$PathResourcesSupplier#openPrimary(PackLocationInfo)

  • Origin: common
  • Source: net/minecraft/server/packs/PathPackResources.java:131
  • Modifiers: public
  • Return: PackResources

คืออะไร

เปิด Primary

ทำงานยังไง

สร้างออบเจ็กต์: PathPackResources. คืนค่า: new PathPackResources(packLocationInfo, this.content).

Parameters

  • PackLocationInfo packLocationInfo

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

PathPackResources.PathResourcesSupplier instance = ...;
PackLocationInfo packLocationInfo = ...;
PackResources result = instance.openPrimary(packLocationInfo);

net.minecraft.server.packs.PathPackResources$PathResourcesSupplier#PathResourcesSupplier(Path)

  • Origin: common
  • Source: net/minecraft/server/packs/PathPackResources.java:127
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: content.

Parameters

  • Path path

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

Path path = ...;
PathPackResources.PathResourcesSupplier instance = new PathPackResources.PathResourcesSupplier(path);

VanillaPackResources

  • Full name: net.minecraft.server.packs.VanillaPackResources
  • Package: net.minecraft.server.packs
  • Source: commonnet/minecraft/server/packs/VanillaPackResources.java
  • Type: class
  • Modifiers: public
  • Implements: PackResources

net.minecraft.server.packs.VanillaPackResources#asProvider()

  • Origin: common
  • Source: net/minecraft/server/packs/VanillaPackResources.java:147
  • Modifiers: public
  • Return: ResourceProvider

คืออะไร

ดำเนินการ asProvider ตาม implementation ของ VanillaPackResources

ทำงานยังไง

เรียกต่อ: ofNullable(), getResource(), map(). สร้างออบเจ็กต์: Resource.

Parameters

  • ไม่มี

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

VanillaPackResources instance = ...;
ResourceProvider result = instance.asProvider();

net.minecraft.server.packs.VanillaPackResources#close()

  • Origin: common
  • Source: net/minecraft/server/packs/VanillaPackResources.java:143
  • Modifiers: public
  • Return: void

คืออะไร

ปิด close

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • ไม่มี

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

VanillaPackResources instance = ...;
instance.close();

net.minecraft.server.packs.VanillaPackResources#getMetadataSection(MetadataSectionType<T>)

  • Origin: common
  • Source: net/minecraft/server/packs/VanillaPackResources.java:121
  • Modifiers: public
  • Return: T

คืออะไร

อ่านค่า Metadata Section

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการจัดการ exception. เรียกต่อ: getRootResource(), get(), getMetadataFromStream(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • MetadataSectionType<T> metadataSectionType

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

VanillaPackResources instance = ...;
MetadataSectionType<T> metadataSectionType = ...;
T result = instance.getMetadataSection(metadataSectionType);

net.minecraft.server.packs.VanillaPackResources#getNamespaces(PackType)

  • Origin: common
  • Source: net/minecraft/server/packs/VanillaPackResources.java:116
  • Modifiers: public
  • Return: Set<String>

คืออะไร

อ่านค่า Namespaces

ทำงานยังไง

คืนค่า: this.namespaces.

Parameters

  • PackType packType

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

VanillaPackResources instance = ...;
PackType packType = ...;
Set<String> result = instance.getNamespaces(packType);

net.minecraft.server.packs.VanillaPackResources#getResource(PackType,ResourceLocation)

  • Origin: common
  • Source: net/minecraft/server/packs/VanillaPackResources.java:96
  • Modifiers: public
  • Return: IoSupplier<InputStream>

คืออะไร

อ่านค่า Resource

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: decomposePath(), getPath(), mapOrElse(), getNamespace(), get(), resolvePath(), resolve(), exists(). มีจุด return อย่างน้อย 4 จุด.

Parameters

  • PackType packType
  • ResourceLocation resourceLocation

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

VanillaPackResources instance = ...;
PackType packType = ...;
ResourceLocation resourceLocation = ...;
IoSupplier<InputStream> result = instance.getResource(packType, resourceLocation);

net.minecraft.server.packs.VanillaPackResources#getRootResource(String[])

  • Origin: common
  • Source: net/minecraft/server/packs/VanillaPackResources.java:39
  • Modifiers: public
  • Return: IoSupplier<InputStream>

คืออะไร

อ่านค่า Root Resource

ทำงานยังไง

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

Parameters

  • String[] strings

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

VanillaPackResources instance = ...;
String[] strings = ...;
IoSupplier<InputStream> result = instance.getRootResource(strings);

net.minecraft.server.packs.VanillaPackResources#listRawPaths(PackType,ResourceLocation,Consumer<Path>)

  • Origin: common
  • Source: net/minecraft/server/packs/VanillaPackResources.java:55
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ listRawPaths ตาม implementation ของ VanillaPackResources

ทำงานยังไง

มีการวนลูป. เรียกต่อ: decomposePath(), getPath(), ifSuccess(), getNamespace(), get(), resolve(), accept(), resolvePath().

Parameters

  • PackType packType
  • ResourceLocation resourceLocation
  • Consumer<Path> consumer

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

VanillaPackResources instance = ...;
PackType packType = ...;
ResourceLocation resourceLocation = ...;
Consumer<Path> consumer = ...;
instance.listRawPaths(packType, resourceLocation, consumer);

net.minecraft.server.packs.VanillaPackResources#listResources(PackType,String,String,PackResources.ResourceOutput)

  • Origin: common
  • Source: net/minecraft/server/packs/VanillaPackResources.java:66
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ listResources ตาม implementation ของ VanillaPackResources

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: decomposePath(), ifSuccess(), get(), size(), getResources(), isEmpty(), forEach(), ifError(). สร้างออบเจ็กต์: HashMap<>.

Parameters

  • PackType packType
  • String string
  • String string2
  • PackResources.ResourceOutput resourceOutput

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

VanillaPackResources instance = ...;
PackType packType = ...;
PackResources.ResourceOutput resourceOutput = ...;
instance.listResources(packType, "value", "value", resourceOutput);

net.minecraft.server.packs.VanillaPackResources#location()

  • Origin: common
  • Source: net/minecraft/server/packs/VanillaPackResources.java:138
  • Modifiers: public
  • Return: PackLocationInfo

คืออะไร

ดำเนินการ location ตาม implementation ของ VanillaPackResources

ทำงานยังไง

คืนค่า: this.location.

Parameters

  • ไม่มี

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

VanillaPackResources instance = ...;
PackLocationInfo result = instance.location();

VanillaPackResourcesBuilder

  • Full name: net.minecraft.server.packs.VanillaPackResourcesBuilder
  • Package: net.minecraft.server.packs
  • Source: commonnet/minecraft/server/packs/VanillaPackResourcesBuilder.java
  • Type: class
  • Modifiers: public

net.minecraft.server.packs.VanillaPackResourcesBuilder#applyDevelopmentConfig()

  • Origin: common
  • Source: net/minecraft/server/packs/VanillaPackResourcesBuilder.java:138
  • Modifiers: public
  • Return: VanillaPackResourcesBuilder

คืออะไร

นำไปใช้ Development Config

ทำงานยังไง

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

Parameters

  • ไม่มี

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

VanillaPackResourcesBuilder instance = ...;
VanillaPackResourcesBuilder result = instance.applyDevelopmentConfig();

net.minecraft.server.packs.VanillaPackResourcesBuilder#build(PackLocationInfo)

  • Origin: common
  • Source: net/minecraft/server/packs/VanillaPackResourcesBuilder.java:169
  • Modifiers: public
  • Return: VanillaPackResources

คืออะไร

สร้าง build

ทำงานยังไง

มีการวนลูป. เรียกต่อ: values(), copyAndReverse(), getOrDefault(), of(), put(), copyOf(). สร้างออบเจ็กต์: EnumMap<>, VanillaPackResources. คืนค่า: new VanillaPackResources(packLocationInfo, this.metadata, Set.copyOf(this.namespaces), copyAndReverse(this.rootPaths), map).

Parameters

  • PackLocationInfo packLocationInfo

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

VanillaPackResourcesBuilder instance = ...;
PackLocationInfo packLocationInfo = ...;
VanillaPackResources result = instance.build(packLocationInfo);

net.minecraft.server.packs.VanillaPackResourcesBuilder#exposeNamespace(String[])

  • Origin: common
  • Source: net/minecraft/server/packs/VanillaPackResourcesBuilder.java:164
  • Modifiers: public
  • Return: VanillaPackResourcesBuilder

คืออะไร

ดำเนินการ exposeNamespace ตาม implementation ของ VanillaPackResourcesBuilder

ทำงานยังไง

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

Parameters

  • String[] strings

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

VanillaPackResourcesBuilder instance = ...;
String[] strings = ...;
VanillaPackResourcesBuilder result = instance.exposeNamespace(strings);

net.minecraft.server.packs.VanillaPackResourcesBuilder#pushAssetPath(PackType,Path)

  • Origin: common
  • Source: net/minecraft/server/packs/VanillaPackResourcesBuilder.java:153
  • Modifiers: public
  • Return: VanillaPackResourcesBuilder

คืออะไร

ดำเนินการ pushAssetPath ตาม implementation ของ VanillaPackResourcesBuilder

ทำงานยังไง

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

Parameters

  • PackType packType
  • Path path

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

VanillaPackResourcesBuilder instance = ...;
PackType packType = ...;
Path path = ...;
VanillaPackResourcesBuilder result = instance.pushAssetPath(packType, path);

net.minecraft.server.packs.VanillaPackResourcesBuilder#pushClasspathResources(PackType,Class<?>)

  • Origin: common
  • Source: net/minecraft/server/packs/VanillaPackResourcesBuilder.java:112
  • Modifiers: public
  • Return: VanillaPackResourcesBuilder

คืออะไร

ดำเนินการ pushClasspathResources ตาม implementation ของ VanillaPackResourcesBuilder

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป ; มีการจัดการ exception. เรียกต่อ: getClassLoader(), getResources(), getDirectory(), hasMoreElements(), nextElement(), toURI(), equals(), getScheme(). คืนค่า: this.

Parameters

  • PackType packType
  • Class<?> class_

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

VanillaPackResourcesBuilder instance = ...;
PackType packType = ...;
Class<?> class_ = ...;
VanillaPackResourcesBuilder result = instance.pushClasspathResources(packType, class_);

net.minecraft.server.packs.VanillaPackResourcesBuilder#pushJarResources()

  • Origin: common
  • Source: net/minecraft/server/packs/VanillaPackResourcesBuilder.java:104
  • Modifiers: public
  • Return: VanillaPackResourcesBuilder

คืออะไร

ดำเนินการ pushJarResources ตาม implementation ของ VanillaPackResourcesBuilder

ทำงานยังไง

เรียกต่อ: forEach(), pushRootPath(), getParent(), pushPathForType(). คืนค่า: this.

Parameters

  • ไม่มี

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

VanillaPackResourcesBuilder instance = ...;
VanillaPackResourcesBuilder result = instance.pushJarResources();

net.minecraft.server.packs.VanillaPackResourcesBuilder#pushUniversalPath(Path)

  • Origin: common
  • Source: net/minecraft/server/packs/VanillaPackResourcesBuilder.java:143
  • Modifiers: public
  • Return: VanillaPackResourcesBuilder

คืออะไร

ดำเนินการ pushUniversalPath ตาม implementation ของ VanillaPackResourcesBuilder

ทำงานยังไง

มีการวนลูป. เรียกต่อ: pushRootPath(), values(), pushPathForType(), resolve(), getDirectory(). คืนค่า: this.

Parameters

  • Path path

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

VanillaPackResourcesBuilder instance = ...;
Path path = ...;
VanillaPackResourcesBuilder result = instance.pushUniversalPath(path);

net.minecraft.server.packs.VanillaPackResourcesBuilder#setMetadata(BuiltInMetadata)

  • Origin: common
  • Source: net/minecraft/server/packs/VanillaPackResourcesBuilder.java:159
  • Modifiers: public
  • Return: VanillaPackResourcesBuilder

คืออะไร

กำหนดค่า Metadata

ทำงานยังไง

แก้ state: metadata. คืนค่า: this.

Parameters

  • BuiltInMetadata builtInMetadata

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

VanillaPackResourcesBuilder instance = ...;
BuiltInMetadata builtInMetadata = ...;
VanillaPackResourcesBuilder result = instance.setMetadata(builtInMetadata);