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
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/ItemWorldMap.java b/src/main/java/net/minecraft/server/ItemWorldMap.java
|
2020-06-26 03:58:00 +02:00
|
|
|
index 90be8c6091dc590a020721f45c7ff7b137cc806d..faa556d4358bc9890ae80c18ee10c38a8d46548e 100644
|
2020-06-08 01:28:58 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/ItemWorldMap.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/ItemWorldMap.java
|
|
|
|
@@ -229,7 +229,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
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
2020-08-07 04:49:50 +02:00
|
|
|
index c920cfbfdf50bec3a64793bf1058a4c856c3ba7c..a54e3ed06a7a1757d3c4ce96b21bed0177e1fa86 100644
|
2020-06-08 01:28:58 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
2020-06-26 08:29:44 +02:00
|
|
|
@@ -302,8 +302,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);
|
|
|
|
}
|
|
|
|
|