diff options
Diffstat (limited to 'patches/server/0434-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch')
-rw-r--r-- | patches/server/0434-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/patches/server/0434-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch b/patches/server/0434-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch new file mode 100644 index 0000000000..3c0b925e52 --- /dev/null +++ b/patches/server/0434-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch @@ -0,0 +1,27 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar <[email protected]> +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 d15d87208d21173912cf489b55b1c5d226ea998b..6f86f00d33cd50a2b67409c2f0f5400c869b802a 100644 +--- a/src/main/java/net/minecraft/world/item/MapItem.java ++++ b/src/main/java/net/minecraft/world/item/MapItem.java +@@ -251,14 +251,13 @@ public class MapItem extends ComplexItem { + boolean[] aboolean = new boolean[16384]; + int l = j / i - 64; + int i1 = k / i - 64; +- BlockPos.MutableBlockPos blockposition_mutableblockposition = new BlockPos.MutableBlockPos(); + + int j1; + int k1; + + for (j1 = 0; j1 < 128; ++j1) { + for (k1 = 0; k1 < 128; ++k1) { +- Biome.BiomeCategory biomebase_geography = Biome.getBiomeCategory(world.getBiome(blockposition_mutableblockposition.set((l + k1) * i, 0, (i1 + j1) * i))); ++ Biome.BiomeCategory biomebase_geography = Biome.getBiomeCategory(world.getUncachedNoiseBiome((l + k1) * i, 0, (i1 + j1) * i)); // Paper + + aboolean[j1 * 128 + k1] = biomebase_geography == Biome.BiomeCategory.OCEAN || biomebase_geography == Biome.BiomeCategory.RIVER || biomebase_geography == Biome.BiomeCategory.SWAMP; + } |