mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-04 18:12:09 +01:00
22 lines
1.5 KiB
Diff
22 lines
1.5 KiB
Diff
--- a/net/minecraft/world/item/MapItem.java
|
|
+++ b/net/minecraft/world/item/MapItem.java
|
|
@@ -97,8 +97,8 @@
|
|
int r = (j / i + o - 64) * i;
|
|
int s = (k / i + p - 64) * i;
|
|
Multiset<MapColor> multiset = LinkedHashMultiset.create();
|
|
- LevelChunk levelChunk = world.getChunk(SectionPos.blockToSectionCoord(r), SectionPos.blockToSectionCoord(s));
|
|
- if (!levelChunk.isEmpty()) {
|
|
+ LevelChunk levelChunk = world.getChunkIfLoaded(SectionPos.blockToSectionCoord(r), SectionPos.blockToSectionCoord(s)); // Paper - Maps shouldn't load chunks
|
|
+ if (levelChunk != null && !levelChunk.isEmpty()) { // Paper - Maps shouldn't load chunks
|
|
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<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);
|
|
}
|
|
}
|