PaperMC/patches/server/0357-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch

21 lines
1.1 KiB
Diff
Raw Normal View History

2024-04-24 08:44:48 +02:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 7 Jun 2020 19:25:13 -0400
Subject: [PATCH] Use seed based lookup for Treasure Maps - Fixes lag from
carto/sunken maps
diff --git a/src/main/java/net/minecraft/world/item/MapItem.java b/src/main/java/net/minecraft/world/item/MapItem.java
2024-12-03 19:21:12 +01:00
index adec25694820189b6f77913db1bf7c581458d2ab..8ff50a4c7461bbd9f469d503f6b5ee482d2463d7 100644
2024-04-24 08:44:48 +02:00
--- a/src/main/java/net/minecraft/world/item/MapItem.java
+++ b/src/main/java/net/minecraft/world/item/MapItem.java
2024-10-23 16:08:40 +02:00
@@ -205,7 +205,7 @@ public class MapItem extends Item {
2024-04-24 08:44:48 +02:00
for (int n = 0; n < 128; n++) {
for (int o = 0; o < 128; o++) {
- Holder<Biome> holder = world.getBiome(mutableBlockPos.set((l + o) * i, 0, (m + n) * i));
+ Holder<Biome> holder = world.getUncachedNoiseBiome((l + o) * i, 0, (m + n) * i); // Paper - Perf: Use seed based lookup for treasure maps
bls[n * 128 + o] = holder.is(BiomeTags.WATER_ON_MAP_OUTLINES);
}
}