aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0371-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch
blob: 27672e59d75d36060b0bc96b420a16b0b0ea54fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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
index 36de7c63370c529579d31ba1d77ec12b754ef313..ce461b1a8d7fab87ae28e30205f6fab67f1808b6 100644
--- a/src/main/java/net/minecraft/world/item/MapItem.java
+++ b/src/main/java/net/minecraft/world/item/MapItem.java
@@ -206,7 +206,7 @@ public class MapItem extends ComplexItem {
 
                 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);
                     }
                 }