mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 05:47:45 +01:00
Make discovered maps config work in treasure maps from loot tables too
This commit is contained in:
parent
2fdb229830
commit
6e29351ca9
@ -35,6 +35,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
|
||||
if (vec3d != null) {
|
||||
WorldServer worldserver = loottableinfo.getWorld();
|
||||
- BlockPosition blockposition = worldserver.a(this.e, new BlockPosition(vec3d), this.h, this.i);
|
||||
+ // Paper start
|
||||
+ if (!worldserver.paperConfig.enableTreasureMaps) {
|
||||
+ /*
|
||||
@ -44,9 +45,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ return itemstack;
|
||||
+ }
|
||||
+ // Paper end
|
||||
BlockPosition blockposition = worldserver.a(this.e, new BlockPosition(vec3d), this.h, this.i);
|
||||
+ BlockPosition blockposition = worldserver.a(this.e, new BlockPosition(vec3d), this.h, !worldserver.paperConfig.treasureMapsAlreadyDiscovered && this.i); // Paper
|
||||
|
||||
if (blockposition != null) {
|
||||
ItemStack itemstack1 = ItemWorldMap.createFilledMapView(worldserver, blockposition.getX(), blockposition.getZ(), this.g, true, true);
|
||||
diff --git a/src/main/java/net/minecraft/server/VillagerTrades.java b/src/main/java/net/minecraft/server/VillagerTrades.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/VillagerTrades.java
|
||||
|
Loading…
Reference in New Issue
Block a user