Class ServerResourcePackProvider

java.lang.Object
net.minecraft.client.resource.ServerResourcePackProvider
All Implemented Interfaces:
ResourcePackProvider

@Environment(CLIENT) public class ServerResourcePackProvider extends Object implements ResourcePackProvider
Mappings:
Namespace Name
official fuw
intermediary net/minecraft/class_1066
named net/minecraft/client/resource/ServerResourcePackProvider
  • Field Details

    • LOGGER

      private static final Logger LOGGER
      Mappings:
      Namespace Name Mixin selector
      official a Lfuw;a:Lorg/slf4j/Logger;
      intermediary field_5298 Lnet/minecraft/class_1066;field_5298:Lorg/slf4j/Logger;
      named LOGGER Lnet/minecraft/client/resource/ServerResourcePackProvider;LOGGER:Lorg/slf4j/Logger;
    • SHA1_PATTERN

      private static final Pattern SHA1_PATTERN
      Mappings:
      Namespace Name Mixin selector
      official b Lfuw;b:Ljava/util/regex/Pattern;
      intermediary field_5296 Lnet/minecraft/class_1066;field_5296:Ljava/util/regex/Pattern;
      named SHA1_PATTERN Lnet/minecraft/client/resource/ServerResourcePackProvider;SHA1_PATTERN:Ljava/util/regex/Pattern;
    • MAX_FILE_SIZE

      private static final int MAX_FILE_SIZE
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official c Lfuw;c:I
      intermediary field_32958 Lnet/minecraft/class_1066;field_32958:I
      named MAX_FILE_SIZE Lnet/minecraft/client/resource/ServerResourcePackProvider;MAX_FILE_SIZE:I
    • MAX_SAVED_PACKS

      private static final int MAX_SAVED_PACKS
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official d Lfuw;d:I
      intermediary field_32959 Lnet/minecraft/class_1066;field_32959:I
      named MAX_SAVED_PACKS Lnet/minecraft/client/resource/ServerResourcePackProvider;MAX_SAVED_PACKS:I
    • SERVER

      private static final String SERVER
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official e Lfuw;e:Ljava/lang/String;
      intermediary field_32961 Lnet/minecraft/class_1066;field_32961:Ljava/lang/String;
      named SERVER Lnet/minecraft/client/resource/ServerResourcePackProvider;SERVER:Ljava/lang/String;
    • SERVER_NAME_TEXT

      private static final Text SERVER_NAME_TEXT
      Mappings:
      Namespace Name Mixin selector
      official f Lfuw;f:Lsw;
      intermediary field_40562 Lnet/minecraft/class_1066;field_40562:Lnet/minecraft/class_2561;
      named SERVER_NAME_TEXT Lnet/minecraft/client/resource/ServerResourcePackProvider;SERVER_NAME_TEXT:Lnet/minecraft/text/Text;
    • APPLYING_PACK_TEXT

      private static final Text APPLYING_PACK_TEXT
      Mappings:
      Namespace Name Mixin selector
      official g Lfuw;g:Lsw;
      intermediary field_33633 Lnet/minecraft/class_1066;field_33633:Lnet/minecraft/class_2561;
      named APPLYING_PACK_TEXT Lnet/minecraft/client/resource/ServerResourcePackProvider;APPLYING_PACK_TEXT:Lnet/minecraft/text/Text;
    • serverPacksRoot

      private final File serverPacksRoot
      Mappings:
      Namespace Name Mixin selector
      official h Lfuw;h:Ljava/io/File;
      intermediary field_5292 Lnet/minecraft/class_1066;field_5292:Ljava/io/File;
      named serverPacksRoot Lnet/minecraft/client/resource/ServerResourcePackProvider;serverPacksRoot:Ljava/io/File;
    • lock

      private final ReentrantLock lock
      Mappings:
      Namespace Name Mixin selector
      official i Lfuw;i:Ljava/util/concurrent/locks/ReentrantLock;
      intermediary field_5297 Lnet/minecraft/class_1066;field_5297:Ljava/util/concurrent/locks/ReentrantLock;
      named lock Lnet/minecraft/client/resource/ServerResourcePackProvider;lock:Ljava/util/concurrent/locks/ReentrantLock;
    • downloadTask

      @Nullable private @Nullable CompletableFuture<?> downloadTask
      Mappings:
      Namespace Name Mixin selector
      official j Lfuw;j:Ljava/util/concurrent/CompletableFuture;
      intermediary field_5294 Lnet/minecraft/class_1066;field_5294:Ljava/util/concurrent/CompletableFuture;
      named downloadTask Lnet/minecraft/client/resource/ServerResourcePackProvider;downloadTask:Ljava/util/concurrent/CompletableFuture;
    • serverContainer

      @Nullable private @Nullable ResourcePackProfile serverContainer
      Mappings:
      Namespace Name Mixin selector
      official k Lfuw;k:Lake;
      intermediary field_5295 Lnet/minecraft/class_1066;field_5295:Lnet/minecraft/class_3288;
      named serverContainer Lnet/minecraft/client/resource/ServerResourcePackProvider;serverContainer:Lnet/minecraft/resource/ResourcePackProfile;
  • Constructor Details

    • ServerResourcePackProvider

      public ServerResourcePackProvider(File serverPacksRoot)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lfuw;<init>(Ljava/io/File;)V
      intermediary <init> Lnet/minecraft/class_1066;<init>(Ljava/io/File;)V
      named <init> Lnet/minecraft/client/resource/ServerResourcePackProvider;<init>(Ljava/io/File;)V
  • Method Details

    • register

      public void register(Consumer<ResourcePackProfile> profileAdder)
      Register resource pack profiles created with the factory to the profileAdder.
      Specified by:
      register in interface ResourcePackProvider
      Parameters:
      profileAdder - the profile adder that accepts created resource pack profiles
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Laki;a(Ljava/util/function/Consumer;)V
      intermediary method_14453 Lnet/minecraft/class_3285;method_14453(Ljava/util/function/Consumer;)V
      named register Lnet/minecraft/resource/ResourcePackProvider;register(Ljava/util/function/Consumer;)V
    • getDownloadHeaders

      private static Map<String,String> getDownloadHeaders()
      Mappings:
      Namespace Name Mixin selector
      official b Lfuw;b()Ljava/util/Map;
      intermediary method_4636 Lnet/minecraft/class_1066;method_4636()Ljava/util/Map;
      named getDownloadHeaders Lnet/minecraft/client/resource/ServerResourcePackProvider;getDownloadHeaders()Ljava/util/Map;
    • download

      public CompletableFuture<?> download(URL url, String packSha1, boolean closeAfterDownload)
      Mappings:
      Namespace Name Mixin selector
      official a Lfuw;a(Ljava/net/URL;Ljava/lang/String;Z)Ljava/util/concurrent/CompletableFuture;
      intermediary method_4640 Lnet/minecraft/class_1066;method_4640(Ljava/net/URL;Ljava/lang/String;Z)Ljava/util/concurrent/CompletableFuture;
      named download Lnet/minecraft/client/resource/ServerResourcePackProvider;download(Ljava/net/URL;Ljava/lang/String;Z)Ljava/util/concurrent/CompletableFuture;
    • delete

      private static void delete(File file)
      Mappings:
      Namespace Name Mixin selector
      official a Lfuw;a(Ljava/io/File;)V
      intermediary method_19437 Lnet/minecraft/class_1066;method_19437(Ljava/io/File;)V
      named delete Lnet/minecraft/client/resource/ServerResourcePackProvider;delete(Ljava/io/File;)V
    • clear

      public CompletableFuture<Void> clear()
      Mappings:
      Namespace Name Mixin selector
      official a Lfuw;a()Ljava/util/concurrent/CompletableFuture;
      intermediary method_4642 Lnet/minecraft/class_1066;method_4642()Ljava/util/concurrent/CompletableFuture;
      named clear Lnet/minecraft/client/resource/ServerResourcePackProvider;clear()Ljava/util/concurrent/CompletableFuture;
    • verifyFile

      private boolean verifyFile(String expectedSha1, File file)
      Mappings:
      Namespace Name Mixin selector
      official a Lfuw;a(Ljava/lang/String;Ljava/io/File;)Z
      intermediary method_4641 Lnet/minecraft/class_1066;method_4641(Ljava/lang/String;Ljava/io/File;)Z
      named verifyFile Lnet/minecraft/client/resource/ServerResourcePackProvider;verifyFile(Ljava/lang/String;Ljava/io/File;)Z
    • deleteOldServerPack

      private void deleteOldServerPack()
      Mappings:
      Namespace Name Mixin selector
      official c Lfuw;c()V
      intermediary method_4643 Lnet/minecraft/class_1066;method_4643()V
      named deleteOldServerPack Lnet/minecraft/client/resource/ServerResourcePackProvider;deleteOldServerPack()V
    • loadServerPack

      public CompletableFuture<Void> loadServerPack(File packZip, ResourcePackSource packSource)
      Mappings:
      Namespace Name Mixin selector
      official a Lfuw;a(Ljava/io/File;Lakh;)Ljava/util/concurrent/CompletableFuture;
      intermediary method_4638 Lnet/minecraft/class_1066;method_4638(Ljava/io/File;Lnet/minecraft/class_5352;)Ljava/util/concurrent/CompletableFuture;
      named loadServerPack Lnet/minecraft/client/resource/ServerResourcePackProvider;loadServerPack(Ljava/io/File;Lnet/minecraft/resource/ResourcePackSource;)Ljava/util/concurrent/CompletableFuture;
    • loadServerPack

      public CompletableFuture<Void> loadServerPack(LevelStorage.Session session)
      Mappings:
      Namespace Name Mixin selector
      official a Lfuw;a(Ldyq$c;)Ljava/util/concurrent/CompletableFuture;
      intermediary method_43339 Lnet/minecraft/class_1066;method_43339(Lnet/minecraft/class_32$class_5143;)Ljava/util/concurrent/CompletableFuture;
      named loadServerPack Lnet/minecraft/client/resource/ServerResourcePackProvider;loadServerPack(Lnet/minecraft/world/level/storage/LevelStorage$Session;)Ljava/util/concurrent/CompletableFuture;