diff options
author | Emilia Kond <[email protected]> | 2023-06-13 01:00:12 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2023-06-12 15:00:12 -0700 |
commit | 2d09115b3a73b27a760dfe7debdbd88b279b29e2 (patch) | |
tree | f9dc39849e410c23536b4f94221b08d8337b13cd /patches/server/0573-Add-fast-alternative-constructor-for-Rotations.patch | |
parent | 87dfff4cfabefe329d6b6f6b8e2985e4778bd8d3 (diff) | |
download | Paper-2d09115b3a73b27a760dfe7debdbd88b279b29e2.tar.gz Paper-2d09115b3a73b27a760dfe7debdbd88b279b29e2.zip |
Use net.kyori.ansi for console logging (#9313)
Uses the new ANSIComponentSerializer introduced in Adventure 4.14.0 to
serialize components when logging them via the ComponentLogger, or when
sending messages to the console.
This replaces the old solution which uses legacy jank and custom color
conversions, with a new library that handles the conversion and config
Diffstat (limited to 'patches/server/0573-Add-fast-alternative-constructor-for-Rotations.patch')
-rw-r--r-- | patches/server/0573-Add-fast-alternative-constructor-for-Rotations.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/patches/server/0573-Add-fast-alternative-constructor-for-Rotations.patch b/patches/server/0573-Add-fast-alternative-constructor-for-Rotations.patch new file mode 100644 index 0000000000..bbdcc665bb --- /dev/null +++ b/patches/server/0573-Add-fast-alternative-constructor-for-Rotations.patch @@ -0,0 +1,30 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Irmo van den Berge <[email protected]> +Date: Wed, 10 Mar 2021 21:26:31 +0100 +Subject: [PATCH] Add fast alternative constructor for Rotations + +Signed-off-by: Irmo van den Berge <[email protected]> + +diff --git a/src/main/java/net/minecraft/core/Rotations.java b/src/main/java/net/minecraft/core/Rotations.java +index e4b4e78de933b93be87805501d9cbfec429cf68c..152b1a2cb88c6456282b537611c18975d6da5f57 100644 +--- a/src/main/java/net/minecraft/core/Rotations.java ++++ b/src/main/java/net/minecraft/core/Rotations.java +@@ -19,6 +19,18 @@ public class Rotations { + this(serialized.getFloat(0), serialized.getFloat(1), serialized.getFloat(2)); + } + ++ // Paper start - faster alternative constructor ++ private Rotations(float x, float y, float z, Void dummy_var) { ++ this.x = x; ++ this.y = y; ++ this.z = z; ++ } ++ ++ public static Rotations createWithoutValidityChecks(float x, float y, float z) { ++ return new Rotations(x, y, z, null); ++ } ++ // Paper end ++ + public ListTag save() { + ListTag listTag = new ListTag(); + listTag.add(FloatTag.valueOf(this.x)); |