9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-31 04:46:38 +00:00

[ci skip] rebuild patches

This commit is contained in:
Taiyou06
2025-03-17 14:18:43 +01:00
parent 472a1c5c19
commit e2331e0d71
3 changed files with 9 additions and 2 deletions

View File

@@ -2,6 +2,9 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Taiyou06 <kaandindar21@gmail.com>
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

View File

@@ -2,6 +2,9 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Taiyou06 <kaandindar21@gmail.com>
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

View File

@@ -2,12 +2,14 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Taiyou06 <kaandindar21@gmail.com>
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