Make discovered maps config work in treasure maps from loot tables too
This commit is contained in:
@@ -35,6 +35,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
|
|
||||||
if (vec3d != null) {
|
if (vec3d != null) {
|
||||||
WorldServer worldserver = loottableinfo.getWorld();
|
WorldServer worldserver = loottableinfo.getWorld();
|
||||||
|
- BlockPosition blockposition = worldserver.a(this.e, new BlockPosition(vec3d), this.h, this.i);
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ if (!worldserver.paperConfig.enableTreasureMaps) {
|
+ if (!worldserver.paperConfig.enableTreasureMaps) {
|
||||||
+ /*
|
+ /*
|
||||||
@@ -44,9 +45,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ return itemstack;
|
+ return itemstack;
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // 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) {
|
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
|
diff --git a/src/main/java/net/minecraft/server/VillagerTrades.java b/src/main/java/net/minecraft/server/VillagerTrades.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/VillagerTrades.java
|
--- a/src/main/java/net/minecraft/server/VillagerTrades.java
|
||||||
|
|||||||
Reference in New Issue
Block a user