From 68150643982ff2b640c1b98cace25992eb5a088a Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 7 Jun 2020 19:25:13 -0400 Subject: [PATCH] Use seed based lookup for Treasure Maps - Fixes lag from carto/sunken maps --- .../sources/net/minecraft/world/item/MapItem.java.patch | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/paper-server/patches/sources/net/minecraft/world/item/MapItem.java.patch b/paper-server/patches/sources/net/minecraft/world/item/MapItem.java.patch index 0227d18101..5374da2aa0 100644 --- a/paper-server/patches/sources/net/minecraft/world/item/MapItem.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/item/MapItem.java.patch @@ -11,3 +11,12 @@ int t = 0; double e = 0.0; if (world.dimensionType().hasCeiling()) { +@@ -205,7 +205,7 @@ + + for (int n = 0; n < 128; n++) { + for (int o = 0; o < 128; o++) { +- Holder holder = world.getBiome(mutableBlockPos.set((l + o) * i, 0, (m + n) * i)); ++ Holder 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); + } + }