Skip to content

Package net.minecraft.util.worldupdate

Part 1/1


WorldUpgrader

  • Full name: net.minecraft.util.worldupdate.WorldUpgrader
  • Package: net.minecraft.util.worldupdate
  • Source: commonnet/minecraft/util/worldupdate/WorldUpgrader.java
  • Type: class
  • Modifiers: public
  • Implements: AutoCloseable

net.minecraft.util.worldupdate.WorldUpgrader#cancel()

  • Origin: common
  • Source: net/minecraft/util/worldupdate/WorldUpgrader.java:95
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ cancel ตาม implementation ของ WorldUpgrader

ทำงานยังไง

มีการจัดการ exception. แก้ state: running. เรียกต่อ: join().

Parameters

  • ไม่มี

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

WorldUpgrader instance = ...;
instance.cancel();

net.minecraft.util.worldupdate.WorldUpgrader#close()

  • Origin: common
  • Source: net/minecraft/util/worldupdate/WorldUpgrader.java:150
  • Modifiers: public
  • Return: void

คืออะไร

ปิด close

ทำงานยังไง

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

Parameters

  • ไม่มี

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

WorldUpgrader instance = ...;
instance.close();

net.minecraft.util.worldupdate.WorldUpgrader#dimensionProgress(ResourceKey<Level>)

  • Origin: common
  • Source: net/minecraft/util/worldupdate/WorldUpgrader.java:126
  • Modifiers: public
  • Return: float

คืออะไร

ดำเนินการ dimensionProgress ตาม implementation ของ WorldUpgrader

ทำงานยังไง

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

Parameters

  • ResourceKey<Level> resourceKey

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

WorldUpgrader instance = ...;
ResourceKey<Level> resourceKey = ...;
float result = instance.dimensionProgress(resourceKey);

net.minecraft.util.worldupdate.WorldUpgrader#getConverted()

  • Origin: common
  • Source: net/minecraft/util/worldupdate/WorldUpgrader.java:138
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Converted

ทำงานยังไง

คืนค่า: this.converted.

Parameters

  • ไม่มี

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

WorldUpgrader instance = ...;
int result = instance.getConverted();

net.minecraft.util.worldupdate.WorldUpgrader#getProgress()

  • Origin: common
  • Source: net/minecraft/util/worldupdate/WorldUpgrader.java:130
  • Modifiers: public
  • Return: float

คืออะไร

อ่านค่า Progress

ทำงานยังไง

คืนค่า: this.progress.

Parameters

  • ไม่มี

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

WorldUpgrader instance = ...;
float result = instance.getProgress();

net.minecraft.util.worldupdate.WorldUpgrader#getSkipped()

  • Origin: common
  • Source: net/minecraft/util/worldupdate/WorldUpgrader.java:142
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Skipped

ทำงานยังไง

คืนค่า: this.skipped.

Parameters

  • ไม่มี

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

WorldUpgrader instance = ...;
int result = instance.getSkipped();

net.minecraft.util.worldupdate.WorldUpgrader#getStatus()

  • Origin: common
  • Source: net/minecraft/util/worldupdate/WorldUpgrader.java:146
  • Modifiers: public
  • Return: Component

คืออะไร

อ่านค่า Status

ทำงานยังไง

คืนค่า: this.status.

Parameters

  • ไม่มี

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

WorldUpgrader instance = ...;
Component result = instance.getStatus();

net.minecraft.util.worldupdate.WorldUpgrader#getTotalChunks()

  • Origin: common
  • Source: net/minecraft/util/worldupdate/WorldUpgrader.java:134
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Total Chunks

ทำงานยังไง

คืนค่า: this.totalChunks.

Parameters

  • ไม่มี

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

WorldUpgrader instance = ...;
int result = instance.getTotalChunks();

net.minecraft.util.worldupdate.WorldUpgrader#isFinished()

  • Origin: common
  • Source: net/minecraft/util/worldupdate/WorldUpgrader.java:118
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: this.finished.

Parameters

  • ไม่มี

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

WorldUpgrader instance = ...;
boolean result = instance.isFinished();

net.minecraft.util.worldupdate.WorldUpgrader#levels()

  • Origin: common
  • Source: net/minecraft/util/worldupdate/WorldUpgrader.java:122
  • Modifiers: public
  • Return: Set<ResourceKey<Level>>

คืออะไร

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

ทำงานยังไง

คืนค่า: this.levels.

Parameters

  • ไม่มี

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

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

net.minecraft.util.worldupdate.WorldUpgrader#WorldUpgrader(LevelStorageSource.LevelStorageAccess,DataFixer,RegistryAccess,boolean,boolean)

  • Origin: common
  • Source: net/minecraft/util/worldupdate/WorldUpgrader.java:78
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: dimensions, levels, eraseCache, dataFixer, levelStorage, overworldDataStorage. เรียกต่อ: lookupOrThrow(), registryKeySet(), stream(), map(), collect(), toUnmodifiableSet(), getDimensionPath(), resolve(). สร้างออบเจ็กต์: DimensionDataStorage.

Parameters

  • LevelStorageSource.LevelStorageAccess levelStorageAccess
  • DataFixer dataFixer
  • RegistryAccess registryAccess
  • boolean bl
  • boolean bl2

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

LevelStorageSource.LevelStorageAccess levelStorageAccess = ...;
DataFixer dataFixer = ...;
RegistryAccess registryAccess = ...;
WorldUpgrader instance = new WorldUpgrader(levelStorageAccess, dataFixer, registryAccess, true, true);