Skip to content

Package net.minecraft.client.resources

Part 1/1


ClientPackSource

  • Full name: net.minecraft.client.resources.ClientPackSource
  • Package: net.minecraft.client.resources
  • Source: clientOnlynet/minecraft/client/resources/ClientPackSource.java
  • Type: class
  • Modifiers: public
  • Extends: BuiltInPackSource

net.minecraft.client.resources.ClientPackSource#ClientPackSource(Path,DirectoryValidator)

  • Origin: clientOnly
  • Source: net/minecraft/client/resources/ClientPackSource.java:51
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: externalAssetDir. เรียกต่อ: createVanillaPackSource(), findExplodedAssetPacks().

Parameters

  • Path path
  • DirectoryValidator directoryValidator

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

Path path = ...;
DirectoryValidator directoryValidator = ...;
ClientPackSource instance = new ClientPackSource(path, directoryValidator);

net.minecraft.client.resources.ClientPackSource#createBuiltinPack(String,ResourcesSupplier,Component)

  • Origin: clientOnly
  • Source: net/minecraft/client/resources/ClientPackSource.java:89
  • Modifiers: protected
  • Return: Pack

คืออะไร

สร้าง Builtin Pack

ทำงานยังไง

เรียกต่อ: readMetaAndCreate(), createBuiltInPackLocation(). คืนค่า: Pack.readMetaAndCreate(createBuiltInPackLocation(string, component), resourcesSupplier, PackType.CLIENT_RESOURCES, BUILT_IN_SELECTION_CONFIG).

Parameters

  • String string
  • ResourcesSupplier resourcesSupplier
  • Component component

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

ResourcesSupplier resourcesSupplier = ...;
Component component = ...;
@Override
protected Pack createBuiltinPack(String string, ResourcesSupplier resourcesSupplier, Component component) {
    return super.createBuiltinPack(string, resourcesSupplier, component);
}

net.minecraft.client.resources.ClientPackSource#createVanillaPack(PackResources)

  • Origin: clientOnly
  • Source: net/minecraft/client/resources/ClientPackSource.java:84
  • Modifiers: protected
  • Return: Pack

คืออะไร

สร้าง Vanilla Pack

ทำงานยังไง

เรียกต่อ: readMetaAndCreate(), fixedResources(). คืนค่า: Pack.readMetaAndCreate(VANILLA_PACK_INFO, fixedResources(packResources), PackType.CLIENT_RESOURCES, VANILLA_SELECTION_CONFIG).

Parameters

  • PackResources packResources

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

PackResources packResources = ...;
@Override
protected Pack createVanillaPack(PackResources packResources) {
    return super.createVanillaPack(packResources);
}

net.minecraft.client.resources.ClientPackSource#getPackTitle(String)

  • Origin: clientOnly
  • Source: net/minecraft/client/resources/ClientPackSource.java:79
  • Modifiers: protected
  • Return: Component

คืออะไร

อ่านค่า Pack Title

ทำงานยังไง

เรียกต่อ: get(), literal(). คืนค่า: (Component)(component != null ? component : Component.literal(string)).

Parameters

  • String string

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

@Override
protected Component getPackTitle(String string) {
    return super.getPackTitle(string);
}

net.minecraft.client.resources.ClientPackSource#populatePackList(BiConsumer<String, Function<String, Pack>>)

  • Origin: clientOnly
  • Source: net/minecraft/client/resources/ClientPackSource.java:94
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ populatePackList ตาม implementation ของ ClientPackSource

ทำงานยังไง

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

Parameters

  • BiConsumer<String, Function<String, Pack>> biConsumer

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

BiConsumer<String, Function<String, Pack>> biConsumer = ...;
@Override
protected void populatePackList(BiConsumer<String, Function<String, Pack>> biConsumer) {
    super.populatePackList(biConsumer);
}

DefaultPlayerSkin

  • Full name: net.minecraft.client.resources.DefaultPlayerSkin
  • Package: net.minecraft.client.resources
  • Source: clientOnlynet/minecraft/client/resources/DefaultPlayerSkin.java
  • Type: class
  • Modifiers: public

net.minecraft.client.resources.DefaultPlayerSkin#get(GameProfile)

  • Origin: clientOnly
  • Source: net/minecraft/client/resources/DefaultPlayerSkin.java:44
  • Modifiers: public static
  • Return: PlayerSkin

คืออะไร

อ่านค่า get

ทำงานยังไง

เรียกต่อ: getId(). คืนค่า: get(gameProfile.getId()).

Parameters

  • GameProfile gameProfile

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

GameProfile gameProfile = ...;
PlayerSkin result = DefaultPlayerSkin.get(gameProfile);

net.minecraft.client.resources.DefaultPlayerSkin#get(UUID)

  • Origin: clientOnly
  • Source: net/minecraft/client/resources/DefaultPlayerSkin.java:40
  • Modifiers: public static
  • Return: PlayerSkin

คืออะไร

อ่านค่า get

ทำงานยังไง

เรียกต่อ: floorMod(), hashCode(). คืนค่า: DEFAULT_SKINS[Math.floorMod(uUID.hashCode(), DEFAULT_SKINS.length)].

Parameters

  • UUID uUID

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

UUID uUID = ...;
PlayerSkin result = DefaultPlayerSkin.get(uUID);

net.minecraft.client.resources.DefaultPlayerSkin#getDefaultSkin()

  • Origin: clientOnly
  • Source: net/minecraft/client/resources/DefaultPlayerSkin.java:36
  • Modifiers: public static
  • Return: PlayerSkin

คืออะไร

อ่านค่า Default Skin

ทำงานยังไง

คืนค่า: DEFAULT_SKINS[6].

Parameters

  • ไม่มี

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

PlayerSkin result = DefaultPlayerSkin.getDefaultSkin();

net.minecraft.client.resources.DefaultPlayerSkin#getDefaultTexture()

  • Origin: clientOnly
  • Source: net/minecraft/client/resources/DefaultPlayerSkin.java:32
  • Modifiers: public static
  • Return: ResourceLocation

คืออะไร

อ่านค่า Default Texture

ทำงานยังไง

เรียกต่อ: getDefaultSkin(), texture(). คืนค่า: getDefaultSkin().texture().

Parameters

  • ไม่มี

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

ResourceLocation result = DefaultPlayerSkin.getDefaultTexture();

FoliageColorReloadListener

  • Full name: net.minecraft.client.resources.FoliageColorReloadListener
  • Package: net.minecraft.client.resources
  • Source: clientOnlynet/minecraft/client/resources/FoliageColorReloadListener.java
  • Type: class
  • Modifiers: public
  • Extends: SimplePreparableReloadListener<int[]>

net.minecraft.client.resources.FoliageColorReloadListener#apply(int[],ResourceManager,ProfilerFiller)

  • Origin: clientOnly
  • Source: net/minecraft/client/resources/FoliageColorReloadListener.java:24
  • Modifiers: protected
  • Return: void

คืออะไร

นำไปใช้ apply

ทำงานยังไง

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

Parameters

  • int[] is
  • ResourceManager resourceManager
  • ProfilerFiller profilerFiller

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

int[] is = ...;
ResourceManager resourceManager = ...;
ProfilerFiller profilerFiller = ...;
@Override
protected void apply(int[] is, ResourceManager resourceManager, ProfilerFiller profilerFiller) {
    super.apply(is, resourceManager, profilerFiller);
}

net.minecraft.client.resources.FoliageColorReloadListener#prepare(ResourceManager,ProfilerFiller)

  • Origin: clientOnly
  • Source: net/minecraft/client/resources/FoliageColorReloadListener.java:16
  • Modifiers: protected
  • Return: int[]

คืออะไร

ดำเนินการ prepare ตาม implementation ของ FoliageColorReloadListener

ทำงานยังไง

มีการจัดการ exception. เรียกต่อ: getPixels(). สร้างออบเจ็กต์: IllegalStateException. คืนค่า: LegacyStuffWrapper.getPixels(resourceManager, LOCATION).

Parameters

  • ResourceManager resourceManager
  • ProfilerFiller profilerFiller

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

ResourceManager resourceManager = ...;
ProfilerFiller profilerFiller = ...;
@Override
protected int[] prepare(ResourceManager resourceManager, ProfilerFiller profilerFiller) {
    return super.prepare(resourceManager, profilerFiller);
}

GrassColorReloadListener

  • Full name: net.minecraft.client.resources.GrassColorReloadListener
  • Package: net.minecraft.client.resources
  • Source: clientOnlynet/minecraft/client/resources/GrassColorReloadListener.java
  • Type: class
  • Modifiers: public
  • Extends: SimplePreparableReloadListener<int[]>

net.minecraft.client.resources.GrassColorReloadListener#apply(int[],ResourceManager,ProfilerFiller)

  • Origin: clientOnly
  • Source: net/minecraft/client/resources/GrassColorReloadListener.java:24
  • Modifiers: protected
  • Return: void

คืออะไร

นำไปใช้ apply

ทำงานยังไง

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

Parameters

  • int[] is
  • ResourceManager resourceManager
  • ProfilerFiller profilerFiller

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

int[] is = ...;
ResourceManager resourceManager = ...;
ProfilerFiller profilerFiller = ...;
@Override
protected void apply(int[] is, ResourceManager resourceManager, ProfilerFiller profilerFiller) {
    super.apply(is, resourceManager, profilerFiller);
}

net.minecraft.client.resources.GrassColorReloadListener#prepare(ResourceManager,ProfilerFiller)

  • Origin: clientOnly
  • Source: net/minecraft/client/resources/GrassColorReloadListener.java:16
  • Modifiers: protected
  • Return: int[]

คืออะไร

ดำเนินการ prepare ตาม implementation ของ GrassColorReloadListener

ทำงานยังไง

มีการจัดการ exception. เรียกต่อ: getPixels(). สร้างออบเจ็กต์: IllegalStateException. คืนค่า: LegacyStuffWrapper.getPixels(resourceManager, LOCATION).

Parameters

  • ResourceManager resourceManager
  • ProfilerFiller profilerFiller

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

ResourceManager resourceManager = ...;
ProfilerFiller profilerFiller = ...;
@Override
protected int[] prepare(ResourceManager resourceManager, ProfilerFiller profilerFiller) {
    return super.prepare(resourceManager, profilerFiller);
}

IndexedAssetSource

  • Full name: net.minecraft.client.resources.IndexedAssetSource
  • Package: net.minecraft.client.resources
  • Source: clientOnlynet/minecraft/client/resources/IndexedAssetSource.java
  • Type: class
  • Modifiers: public

net.minecraft.client.resources.IndexedAssetSource#createIndexFs(Path,String)

  • Origin: clientOnly
  • Source: net/minecraft/client/resources/IndexedAssetSource.java:27
  • Modifiers: public static
  • Return: Path

คืออะไร

สร้าง Index Fs

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป ; มีการจัดการ exception. เรียกต่อ: resolve(), builder(), newBufferedReader(), parse(), getAsJsonObject(), entrySet(), getValue(), getKey(). คืนค่า: builder.build("index-" + string).getPath("/").

Parameters

  • Path path
  • String string

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

Path path = ...;
Path result = IndexedAssetSource.createIndexFs(path, "value");

LegacyStuffWrapper

  • Full name: net.minecraft.client.resources.LegacyStuffWrapper
  • Package: net.minecraft.client.resources
  • Source: clientOnlynet/minecraft/client/resources/LegacyStuffWrapper.java
  • Type: class
  • Modifiers: public

net.minecraft.client.resources.LegacyStuffWrapper#getPixels(ResourceManager,ResourceLocation)

  • Origin: clientOnly
  • Source: net/minecraft/client/resources/LegacyStuffWrapper.java:13
  • Modifiers: public static
  • Return: int[]

คืออะไร

อ่านค่า Pixels

ทำงานยังไง

มีการจัดการ exception. เรียกต่อ: open(), read(), makePixelArray(). คืนค่า: nativeImage.makePixelArray().

Parameters

  • ResourceManager resourceManager
  • ResourceLocation resourceLocation

Throws

  • IOException

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

ResourceManager resourceManager = ...;
ResourceLocation resourceLocation = ...;
int[] result = LegacyStuffWrapper.getPixels(resourceManager, resourceLocation);

MapDecorationTextureManager

  • Full name: net.minecraft.client.resources.MapDecorationTextureManager
  • Package: net.minecraft.client.resources
  • Source: clientOnlynet/minecraft/client/resources/MapDecorationTextureManager.java
  • Type: class
  • Modifiers: public
  • Extends: TextureAtlasHolder

net.minecraft.client.resources.MapDecorationTextureManager#get(MapDecoration)

  • Origin: clientOnly
  • Source: net/minecraft/client/resources/MapDecorationTextureManager.java:16
  • Modifiers: public
  • Return: TextureAtlasSprite

คืออะไร

อ่านค่า get

ทำงานยังไง

เรียกต่อ: getSprite(), getSpriteLocation(). คืนค่า: this.getSprite(mapDecoration.getSpriteLocation()).

Parameters

  • MapDecoration mapDecoration

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

MapDecorationTextureManager instance = ...;
MapDecoration mapDecoration = ...;
TextureAtlasSprite result = instance.get(mapDecoration);

net.minecraft.client.resources.MapDecorationTextureManager#MapDecorationTextureManager(TextureManager)

  • Origin: clientOnly
  • Source: net/minecraft/client/resources/MapDecorationTextureManager.java:12
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • TextureManager textureManager

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

TextureManager textureManager = ...;
MapDecorationTextureManager instance = new MapDecorationTextureManager(textureManager);

MapTextureManager

  • Full name: net.minecraft.client.resources.MapTextureManager
  • Package: net.minecraft.client.resources
  • Source: clientOnlynet/minecraft/client/resources/MapTextureManager.java
  • Type: class
  • Modifiers: public
  • Implements: AutoCloseable

net.minecraft.client.resources.MapTextureManager#close()

  • Origin: clientOnly
  • Source: net/minecraft/client/resources/MapTextureManager.java:53
  • Modifiers: public
  • Return: void

คืออะไร

ปิด close

ทำงานยังไง

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

Parameters

  • ไม่มี

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

MapTextureManager instance = ...;
instance.close();

net.minecraft.client.resources.MapTextureManager#MapTextureManager(TextureManager)

  • Origin: clientOnly
  • Source: net/minecraft/client/resources/MapTextureManager.java:20
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: textureManager.

Parameters

  • TextureManager textureManager

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

TextureManager textureManager = ...;
MapTextureManager instance = new MapTextureManager(textureManager);

net.minecraft.client.resources.MapTextureManager#prepareMapTexture(MapId,MapItemSavedData)

  • Origin: clientOnly
  • Source: net/minecraft/client/resources/MapTextureManager.java:28
  • Modifiers: public
  • Return: ResourceLocation

คืออะไร

ดำเนินการ prepareMapTexture ตาม implementation ของ MapTextureManager

ทำงานยังไง

เรียกต่อ: getOrCreateMapInstance(), updateTextureIfNeeded(). คืนค่า: mapInstance.location.

Parameters

  • MapId mapId
  • MapItemSavedData mapItemSavedData

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

MapTextureManager instance = ...;
MapId mapId = ...;
MapItemSavedData mapItemSavedData = ...;
ResourceLocation result = instance.prepareMapTexture(mapId, mapItemSavedData);

net.minecraft.client.resources.MapTextureManager#resetData()

  • Origin: clientOnly
  • Source: net/minecraft/client/resources/MapTextureManager.java:34
  • Modifiers: public
  • Return: void

คืออะไร

รีเซ็ต Data

ทำงานยังไง

มีการวนลูป. เรียกต่อ: values(), close(), clear().

Parameters

  • ไม่มี

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

MapTextureManager instance = ...;
instance.resetData();

net.minecraft.client.resources.MapTextureManager#update(MapId,MapItemSavedData)

  • Origin: clientOnly
  • Source: net/minecraft/client/resources/MapTextureManager.java:24
  • Modifiers: public
  • Return: void

คืออะไร

อัปเดต update

ทำงานยังไง

เรียกต่อ: getOrCreateMapInstance(), forceUpload().

Parameters

  • MapId mapId
  • MapItemSavedData mapItemSavedData

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

MapTextureManager instance = ...;
MapId mapId = ...;
MapItemSavedData mapItemSavedData = ...;
instance.update(mapId, mapItemSavedData);

MobEffectTextureManager

  • Full name: net.minecraft.client.resources.MobEffectTextureManager
  • Package: net.minecraft.client.resources
  • Source: clientOnlynet/minecraft/client/resources/MobEffectTextureManager.java
  • Type: class
  • Modifiers: public
  • Extends: TextureAtlasHolder

net.minecraft.client.resources.MobEffectTextureManager#get(Holder<MobEffect>)

  • Origin: clientOnly
  • Source: net/minecraft/client/resources/MobEffectTextureManager.java:19
  • Modifiers: public
  • Return: TextureAtlasSprite

คืออะไร

อ่านค่า get

ทำงานยังไง

เรียกต่อ: getSprite(), unwrapKey(), map(), orElseGet(). คืนค่า: this.getSprite(holder.unwrapKey().<ResourceLocation>map(ResourceKey::location).orElseGet(MissingTextureAtlasSprite::getLocation)).

Parameters

  • Holder<MobEffect> holder

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

MobEffectTextureManager instance = ...;
Holder<MobEffect> holder = ...;
TextureAtlasSprite result = instance.get(holder);

net.minecraft.client.resources.MobEffectTextureManager#MobEffectTextureManager(TextureManager)

  • Origin: clientOnly
  • Source: net/minecraft/client/resources/MobEffectTextureManager.java:15
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • TextureManager textureManager

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

TextureManager textureManager = ...;
MobEffectTextureManager instance = new MobEffectTextureManager(textureManager);

PaintingTextureManager

  • Full name: net.minecraft.client.resources.PaintingTextureManager
  • Package: net.minecraft.client.resources
  • Source: clientOnlynet/minecraft/client/resources/PaintingTextureManager.java
  • Type: class
  • Modifiers: public
  • Extends: TextureAtlasHolder

net.minecraft.client.resources.PaintingTextureManager#get(PaintingVariant)

  • Origin: clientOnly
  • Source: net/minecraft/client/resources/PaintingTextureManager.java:18
  • Modifiers: public
  • Return: TextureAtlasSprite

คืออะไร

อ่านค่า get

ทำงานยังไง

เรียกต่อ: getSprite(), assetId(). คืนค่า: this.getSprite(paintingVariant.assetId()).

Parameters

  • PaintingVariant paintingVariant

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

PaintingTextureManager instance = ...;
PaintingVariant paintingVariant = ...;
TextureAtlasSprite result = instance.get(paintingVariant);

net.minecraft.client.resources.PaintingTextureManager#getBackSprite()

  • Origin: clientOnly
  • Source: net/minecraft/client/resources/PaintingTextureManager.java:22
  • Modifiers: public
  • Return: TextureAtlasSprite

คืออะไร

อ่านค่า Back Sprite

ทำงานยังไง

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

Parameters

  • ไม่มี

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

PaintingTextureManager instance = ...;
TextureAtlasSprite result = instance.getBackSprite();

net.minecraft.client.resources.PaintingTextureManager#PaintingTextureManager(TextureManager)

  • Origin: clientOnly
  • Source: net/minecraft/client/resources/PaintingTextureManager.java:14
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • TextureManager textureManager

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

TextureManager textureManager = ...;
PaintingTextureManager instance = new PaintingTextureManager(textureManager);

PlayerSkin$Model

  • Full name: net.minecraft.client.resources.PlayerSkin$Model
  • Package: net.minecraft.client.resources
  • Source: clientOnlynet/minecraft/client/resources/PlayerSkin.java
  • Type: enum
  • Modifiers: public

net.minecraft.client.resources.PlayerSkin$Model#byName(String)

  • Origin: clientOnly
  • Source: net/minecraft/client/resources/PlayerSkin.java:28
  • Modifiers: public static
  • Return: PlayerSkin.Model

คืออะไร

ดำเนินการ byName ตาม implementation ของ PlayerSkin$Model

ทำงานยังไง

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

Parameters

  • String string

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

PlayerSkin.Model result = PlayerSkin.Model.byName("value");

net.minecraft.client.resources.PlayerSkin$Model#id()

  • Origin: clientOnly
  • Source: net/minecraft/client/resources/PlayerSkin.java:39
  • Modifiers: public
  • Return: String

คืออะไร

ดำเนินการ id ตาม implementation ของ PlayerSkin$Model

ทำงานยังไง

คืนค่า: this.id.

Parameters

  • ไม่มี

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

PlayerSkin.Model instance = ...;
String result = instance.id();

SkinManager

  • Full name: net.minecraft.client.resources.SkinManager
  • Package: net.minecraft.client.resources
  • Source: clientOnlynet/minecraft/client/resources/SkinManager.java
  • Type: class
  • Modifiers: public

net.minecraft.client.resources.SkinManager#getInsecureSkin(GameProfile)

  • Origin: clientOnly
  • Source: net/minecraft/client/resources/SkinManager.java:84
  • Modifiers: public
  • Return: PlayerSkin

คืออะไร

อ่านค่า Insecure Skin

ทำงานยังไง

เรียกต่อ: getOrLoad(), getNow(), empty(), orElse(), get(). คืนค่า: playerSkin != null ? playerSkin : DefaultPlayerSkin.get(gameProfile).

Parameters

  • GameProfile gameProfile

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

SkinManager instance = ...;
GameProfile gameProfile = ...;
PlayerSkin result = instance.getInsecureSkin(gameProfile);

net.minecraft.client.resources.SkinManager#getOrLoad(GameProfile)

  • Origin: clientOnly
  • Source: net/minecraft/client/resources/SkinManager.java:89
  • Modifiers: public
  • Return: CompletableFuture<Optional<PlayerSkin>>

คืออะไร

อ่านค่า Or Load

ทำงานยังไง

เรียกต่อ: getPackedTextures(), getUnchecked(), CacheKey(), getId(). สร้างออบเจ็กต์: SkinManager.CacheKey. คืนค่า: this.skinCache.getUnchecked(new SkinManager.CacheKey(gameProfile.getId(), property)).

Parameters

  • GameProfile gameProfile

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

SkinManager instance = ...;
GameProfile gameProfile = ...;
CompletableFuture<Optional<PlayerSkin>> result = instance.getOrLoad(gameProfile);

net.minecraft.client.resources.SkinManager#lookupInsecure(GameProfile)

  • Origin: clientOnly
  • Source: net/minecraft/client/resources/SkinManager.java:78
  • Modifiers: public
  • Return: Supplier<PlayerSkin>

คืออะไร

ดำเนินการ lookupInsecure ตาม implementation ของ SkinManager

ทำงานยังไง

เรียกต่อ: getOrLoad(), get(), getNow(), empty(), orElse(). คืนค่า: () -> completableFuture.getNow(Optional.empty()).orElse(playerSkin).

Parameters

  • GameProfile gameProfile

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

SkinManager instance = ...;
GameProfile gameProfile = ...;
Supplier<PlayerSkin> result = instance.lookupInsecure(gameProfile);

net.minecraft.client.resources.SkinManager#SkinManager(Path,MinecraftSessionService,Executor)

  • Origin: clientOnly
  • Source: net/minecraft/client/resources/SkinManager.java:42
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: sessionService, skinTextures, capeTextures, elytraTextures, skinCache. เรียกต่อ: TextureCache(), newBuilder(), expireAfterAccess(), ofSeconds(), build(), load(), supplyAsync(), packedTextures(). สร้างออบเจ็กต์: SkinManager.TextureCache. มีจุด return อย่างน้อย 4 จุด.

Parameters

  • Path path
  • MinecraftSessionService minecraftSessionService
  • Executor executor

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

Path path = ...;
MinecraftSessionService minecraftSessionService = ...;
Executor executor = ...;
SkinManager instance = new SkinManager(path, minecraftSessionService, executor);

SplashManager

  • Full name: net.minecraft.client.resources.SplashManager
  • Package: net.minecraft.client.resources
  • Source: clientOnlynet/minecraft/client/resources/SplashManager.java
  • Type: class
  • Modifiers: public
  • Extends: SimplePreparableReloadListener<List<String>>

net.minecraft.client.resources.SplashManager#apply(List<String>,ResourceManager,ProfilerFiller)

  • Origin: clientOnly
  • Source: net/minecraft/client/resources/SplashManager.java:43
  • Modifiers: protected
  • Return: void

คืออะไร

นำไปใช้ apply

ทำงานยังไง

เรียกต่อ: clear(), addAll().

Parameters

  • List<String> list
  • ResourceManager resourceManager
  • ProfilerFiller profilerFiller

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

List<String> list = ...;
ResourceManager resourceManager = ...;
ProfilerFiller profilerFiller = ...;
@Override
protected void apply(List<String> list, ResourceManager resourceManager, ProfilerFiller profilerFiller) {
    super.apply(list, resourceManager, profilerFiller);
}

net.minecraft.client.resources.SplashManager#getSplash()

  • Origin: clientOnly
  • Source: net/minecraft/client/resources/SplashManager.java:48
  • Modifiers: public
  • Return: SplashRenderer

คืออะไร

อ่านค่า Splash

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getInstance(), setTime(), get(), isEmpty(), nextInt(), size(), getName(), toUpperCase(). สร้างออบเจ็กต์: Date, SplashRenderer. มีจุด return อย่างน้อย 4 จุด.

Parameters

  • ไม่มี

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

SplashManager instance = ...;
SplashRenderer result = instance.getSplash();

net.minecraft.client.resources.SplashManager#prepare(ResourceManager,ProfilerFiller)

  • Origin: clientOnly
  • Source: net/minecraft/client/resources/SplashManager.java:35
  • Modifiers: protected
  • Return: List<String>

คืออะไร

ดำเนินการ prepare ตาม implementation ของ SplashManager

ทำงานยังไง

มีการจัดการ exception. เรียกต่อ: getInstance(), getResourceManager(), openAsReader(), lines(), map(), filter(), hashCode(), collect(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ResourceManager resourceManager
  • ProfilerFiller profilerFiller

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

ResourceManager resourceManager = ...;
ProfilerFiller profilerFiller = ...;
@Override
protected List<String> prepare(ResourceManager resourceManager, ProfilerFiller profilerFiller) {
    return super.prepare(resourceManager, profilerFiller);
}

net.minecraft.client.resources.SplashManager#SplashManager(User)

  • Origin: clientOnly
  • Source: net/minecraft/client/resources/SplashManager.java:31
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: user.

Parameters

  • User user

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

User user = ...;
SplashManager instance = new SplashManager(user);

TextureAtlasHolder

  • Full name: net.minecraft.client.resources.TextureAtlasHolder
  • Package: net.minecraft.client.resources
  • Source: clientOnlynet/minecraft/client/resources/TextureAtlasHolder.java
  • Type: class
  • Modifiers: public abstract
  • Implements: PreparableReloadListener,AutoCloseable

net.minecraft.client.resources.TextureAtlasHolder#close()

  • Origin: clientOnly
  • Source: net/minecraft/client/resources/TextureAtlasHolder.java:73
  • Modifiers: public
  • Return: void

คืออะไร

ปิด close

ทำงานยังไง

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

Parameters

  • ไม่มี

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

TextureAtlasHolder instance = ...;
instance.close();

net.minecraft.client.resources.TextureAtlasHolder#getSprite(ResourceLocation)

  • Origin: clientOnly
  • Source: net/minecraft/client/resources/TextureAtlasHolder.java:39
  • Modifiers: protected
  • Return: TextureAtlasSprite

คืออะไร

อ่านค่า Sprite

ทำงานยังไง

คืนค่า: this.textureAtlas.getSprite(resourceLocation).

Parameters

  • ResourceLocation resourceLocation

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

ResourceLocation resourceLocation = ...;
@Override
protected TextureAtlasSprite getSprite(ResourceLocation resourceLocation) {
    return super.getSprite(resourceLocation);
}

net.minecraft.client.resources.TextureAtlasHolder#reload(PreparationBarrier,ResourceManager,Executor,Executor)

  • Origin: clientOnly
  • Source: net/minecraft/client/resources/TextureAtlasHolder.java:43
  • Modifiers: public final
  • Return: CompletableFuture<Void>

คืออะไร

ดำเนินการ reload ตาม implementation ของ TextureAtlasHolder

ทำงานยังไง

เรียกต่อ: create(), loadAndStitch(), thenCompose(), thenAcceptAsync().

Parameters

  • PreparationBarrier preparationBarrier
  • ResourceManager resourceManager
  • Executor executor
  • Executor executor2

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

TextureAtlasHolder instance = ...;
PreparationBarrier preparationBarrier = ...;
ResourceManager resourceManager = ...;
Executor executor = ...;
Executor executor2 = ...;
CompletableFuture<Void> result = instance.reload(preparationBarrier, resourceManager, executor, executor2);

net.minecraft.client.resources.TextureAtlasHolder#TextureAtlasHolder(TextureManager,ResourceLocation,ResourceLocation)

  • Origin: clientOnly
  • Source: net/minecraft/client/resources/TextureAtlasHolder.java:26
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • TextureManager textureManager
  • ResourceLocation resourceLocation
  • ResourceLocation resourceLocation2

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

TextureManager textureManager = ...;
ResourceLocation resourceLocation = ...;
ResourceLocation resourceLocation2 = ...;
TextureAtlasHolder instance = new TextureAtlasHolder(textureManager, resourceLocation, resourceLocation2);

net.minecraft.client.resources.TextureAtlasHolder#TextureAtlasHolder(TextureManager,ResourceLocation,ResourceLocation,Set<MetadataSectionType<?>>)

  • Origin: clientOnly
  • Source: net/minecraft/client/resources/TextureAtlasHolder.java:30
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: atlasInfoLocation, textureAtlas, metadataSections. เรียกต่อ: register(), location(). สร้างออบเจ็กต์: TextureAtlas.

Parameters

  • TextureManager textureManager
  • ResourceLocation resourceLocation
  • ResourceLocation resourceLocation2
  • Set<MetadataSectionType<?>> set

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

TextureManager textureManager = ...;
ResourceLocation resourceLocation = ...;
ResourceLocation resourceLocation2 = ...;
Set<MetadataSectionType<?>> set = ...;
TextureAtlasHolder instance = new TextureAtlasHolder(textureManager, resourceLocation, resourceLocation2, set);