From e2331e0d71a110d1ec789f4183f71df95274b2d8 Mon Sep 17 00:00:00 2001 From: Taiyou06 Date: Mon, 17 Mar 2025 14:18:43 +0100 Subject: [PATCH] [ci skip] rebuild patches --- .../features/0124-Slightly-optimise-getNearestPlayer.patch | 4 +++- .../features/0133-Optimize-LinearPalette.patch | 3 +++ .../0135-Rewrite-ClientboundLightUpdatePacketData.patch | 4 +++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/leaf-server/minecraft-patches/features/0124-Slightly-optimise-getNearestPlayer.patch b/leaf-server/minecraft-patches/features/0124-Slightly-optimise-getNearestPlayer.patch index 3e80b556..ac9e99a1 100644 --- a/leaf-server/minecraft-patches/features/0124-Slightly-optimise-getNearestPlayer.patch +++ b/leaf-server/minecraft-patches/features/0124-Slightly-optimise-getNearestPlayer.patch @@ -2,6 +2,9 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Taiyou06 Date: Sun, 16 Feb 2025 09:21:50 +0100 Subject: [PATCH] Slightly optimise getNearestPlayer +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit Original: @@ -16,7 +19,6 @@ Calculations per iteration: Distance calculation One-time operation: Convert distance to squared distance Total operations: ~3 × n (in the no-predicate case) or ~4 × n (with predicate) - diff --git a/net/minecraft/world/level/EntityGetter.java b/net/minecraft/world/level/EntityGetter.java index 670860df81a3abfc1b8b53be505fce0ee32ee2c4..083a2b5da246113913bcd5d0b2b9be42cf0554d9 100644 --- a/net/minecraft/world/level/EntityGetter.java diff --git a/leaf-server/minecraft-patches/features/0133-Optimize-LinearPalette.patch b/leaf-server/minecraft-patches/features/0133-Optimize-LinearPalette.patch index 3b698212..b6a553ea 100644 --- a/leaf-server/minecraft-patches/features/0133-Optimize-LinearPalette.patch +++ b/leaf-server/minecraft-patches/features/0133-Optimize-LinearPalette.patch @@ -2,6 +2,9 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Taiyou06 Date: Fri, 21 Feb 2025 18:05:09 +0100 Subject: [PATCH] Optimize LinearPalette +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit getSerializedSize is 76% faster: 70.3ns → 17.2ns getSerializedSize.write is 13-21% faster: 659.5ns → 523.1ns diff --git a/leaf-server/minecraft-patches/features/0135-Rewrite-ClientboundLightUpdatePacketData.patch b/leaf-server/minecraft-patches/features/0135-Rewrite-ClientboundLightUpdatePacketData.patch index 0dd12e5e..c239da6c 100644 --- a/leaf-server/minecraft-patches/features/0135-Rewrite-ClientboundLightUpdatePacketData.patch +++ b/leaf-server/minecraft-patches/features/0135-Rewrite-ClientboundLightUpdatePacketData.patch @@ -2,12 +2,14 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Taiyou06 Date: Mon, 24 Feb 2025 21:33:24 +0100 Subject: [PATCH] Rewrite ClientboundLightUpdatePacketData +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit On writing operations: At 256 sections with 0.75 fill ratio: 18x faster (333.489 μs → 18.606 μs) At 256 sections with 0.5 fill ratio: 13.5x faster (147.804 μs → 10.962 μs) - diff --git a/net/minecraft/network/protocol/game/ClientboundLightUpdatePacketData.java b/net/minecraft/network/protocol/game/ClientboundLightUpdatePacketData.java index a0b54f3a3d11e0f0f1cb806406a870ba36da8f07..234280499fe1bc495bcdd4c3e144d1f99b7e6975 100644 --- a/net/minecraft/network/protocol/game/ClientboundLightUpdatePacketData.java