Map perfcommand (incomplete) and fix zip compressor mappings (#2459)

* Map perfcommand (incomplete) and fix zip compressor mappings

Signed-off-by: liach <liach@users.noreply.github.com>

* Fix perf command (after rebasing)

Co-authored-by: liach <liach@users.noreply.github.com>
This commit is contained in:
liach 2021-06-05 04:32:32 -05:00 committed by GitHub
parent 0ffa7d2901
commit c096068118
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 41 additions and 8 deletions

View File

@ -4,6 +4,8 @@ CLASS net/minecraft/class_6413 net/minecraft/server/dedicated/command/PerfComman
FIELD field_33987 ALREADY_RUNNING_EXCEPTION Lcom/mojang/brigadier/exceptions/SimpleCommandExceptionType;
METHOD method_37331 register (Lcom/mojang/brigadier/CommandDispatcher;)V
ARG 0 dispatcher
METHOD method_37332 (Lcom/mojang/brigadier/context/CommandContext;)I
ARG 0 context
METHOD method_37333 executeStart (Lnet/minecraft/class_2168;)I
ARG 0 source
METHOD method_37334 sendProfilingStoppedMessage (Lnet/minecraft/class_2168;Lnet/minecraft/class_3696;)V
@ -13,5 +15,11 @@ CLASS net/minecraft/class_6413 net/minecraft/server/dedicated/command/PerfComman
ARG 0 source
ARG 1 tempProfilingFile
ARG 2 server
METHOD method_37337 (Lcom/mojang/brigadier/context/CommandContext;)I
ARG 0 context
METHOD method_37338 executeStop (Lnet/minecraft/class_2168;)I
ARG 0 source
METHOD method_37339 (Lnet/minecraft/class_2168;Lnet/minecraft/class_3696;)V
ARG 1 result
METHOD method_37340 (Lnet/minecraft/class_2168;)Z
ARG 0 source

View File

@ -6,7 +6,7 @@ CLASS net/minecraft/class_156 net/minecraft/util/Util
FIELD field_24477 IO_WORKER_EXECUTOR Ljava/util/concurrent/ExecutorService;
FIELD field_24622 BOOTSTRAP_EXECUTOR Ljava/util/concurrent/ExecutorService;
FIELD field_25140 NIL_UUID Ljava/util/UUID;
FIELD field_33859 zipFileSystemProvider Ljava/nio/file/spi/FileSystemProvider;
FIELD field_33859 JAR_FILE_SYSTEM_PROVIDER Ljava/nio/file/spi/FileSystemProvider;
METHOD method_17815 stream (Ljava/util/Optional;)Ljava/util/stream/Stream;
ARG 0 optional
METHOD method_17974 ifPresentOrElse (Ljava/util/Optional;Ljava/util/function/Consumer;Ljava/lang/Runnable;)Ljava/util/Optional;

View File

@ -1,18 +1,43 @@
CLASS net/minecraft/class_6397 net/minecraft/util/profiler/ZipCompressor
COMMENT A ZIP compressor builds up a ZIP file. It completes the ZIP file when it is
COMMENT {@linkplain #close() closed}. All its methods and constructors throw
COMMENT {@link java.io.UncheckedIOException} when an I/O error occurs.
COMMENT
COMMENT @implSpec The compressor writes the contents of the ZIP to a {@link #temp} file
COMMENT first; then, it replaces the desired {@link #file} with the temp file when
COMMENT closed.
FIELD field_33864 LOGGER Lorg/apache/logging/log4j/Logger;
FIELD field_33865 profilingDirectory Ljava/nio/file/Path;
FIELD field_33866 temporaryDirectory Ljava/nio/file/Path;
FIELD field_33865 file Ljava/nio/file/Path;
FIELD field_33866 temp Ljava/nio/file/Path;
FIELD field_33867 zip Ljava/nio/file/FileSystem;
METHOD <init> (Ljava/nio/file/Path;)V
ARG 1 profilingDirectory
COMMENT Creates a ZIP compressor.
ARG 1 file
COMMENT the path of the ZIP file
METHOD method_37161 copyAll (Ljava/nio/file/Path;)V
ARG 1 path
COMMENT Copies the {@code source} file or directory to the root of the ZIP.
ARG 1 source
COMMENT the source file or directory to copy
METHOD method_37162 copy (Ljava/nio/file/Path;Ljava/io/File;)V
ARG 1 path
ARG 2 file
COMMENT Copies a {@code source} file to the {@code target} path within the ZIP.
COMMENT
COMMENT <p>If the {@code source} is a directory, then an empty directory would be
COMMENT copied. The {@code target} should be a relative path, as it will be resolved
COMMENT against the root of the ZIP.
ARG 1 target
COMMENT the target path in the ZIP
ARG 2 source
COMMENT the source file to copy
METHOD method_37163 write (Ljava/nio/file/Path;Ljava/lang/String;)V
ARG 1 path
COMMENT Writes the {@code content}, in UTF-8 encoding, to the {@code target} path
COMMENT within the ZIP.
COMMENT
COMMENT <p>The {@code target} should be a relative path, as it will be resolved
COMMENT against the root of the ZIP.
ARG 1 target
COMMENT the target path in the ZIP
ARG 2 content
COMMENT the file content to write in UTF-8
METHOD method_37164 (Ljava/nio/file/Path;Ljava/nio/file/attribute/BasicFileAttributes;)Z
ARG 0 path
ARG 1 attributes