2020-06-08 01:28:58 +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
|
|
|
|
|
|
|
|
|
2021-03-16 08:19:45 +01:00
|
|
|
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
|
|
|
|
index b294337a586193870fcdbfe1697703137f4ae626..117772867eede63646d80bb7af4792a2db16d815 100644
|
|
|
|
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
|
|
|
|
@@ -416,8 +416,8 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
2020-06-26 03:58:00 +02:00
|
|
|
this.worldDataServer.setThundering(flag1);
|
2020-06-08 01:28:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
- @Override
|
|
|
|
- public BiomeBase a(int i, int j, int k) {
|
|
|
|
+ public BiomeBase getBiomeBySeed(int i, int j, int k) { return a(i, j, k); } // Paper - OBFHELPER
|
|
|
|
+ @Override public BiomeBase a(int i, int j, int k) {
|
|
|
|
return this.getChunkProvider().getChunkGenerator().getWorldChunkManager().getBiome(i, j, k);
|
|
|
|
}
|
|
|
|
|
2021-03-16 08:19:45 +01:00
|
|
|
diff --git a/src/main/java/net/minecraft/world/item/ItemWorldMap.java b/src/main/java/net/minecraft/world/item/ItemWorldMap.java
|
|
|
|
index a1945e9ac1dd8961c5758a22bef3908d3adf0704..3aa0f19d4a924d40005a38bb95a08d4a109c5b2e 100644
|
|
|
|
--- a/src/main/java/net/minecraft/world/item/ItemWorldMap.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/item/ItemWorldMap.java
|
|
|
|
@@ -253,7 +253,7 @@ public class ItemWorldMap extends ItemWorldMapBase {
|
|
|
|
|
|
|
|
for (l = 0; l < 128 * i; ++l) {
|
|
|
|
for (i1 = 0; i1 < 128 * i; ++i1) {
|
|
|
|
- abiomebase[l * 128 * i + i1] = worldserver.getBiome(new BlockPosition((j / i - 64) * i + i1, 0, (k / i - 64) * i + l));
|
|
|
|
+ abiomebase[l * 128 * i + i1] = worldserver.getBiomeBySeed((j / i - 64) * i + i1, 0, (k / i - 64) * i + l); // Paper
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|