From 6698d64ab926178400b7b9da60a3dbe54d3f5a05 Mon Sep 17 00:00:00 2001 From: Jonathan Frederick Date: Fri, 18 Oct 2019 08:14:43 -0700 Subject: [PATCH] Re-implement treasure-maps-return-already-discovered for 1.14 (#2636) --- .../Configurable-Cartographer-Treasure-Maps.patch | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Spigot-Server-Patches/Configurable-Cartographer-Treasure-Maps.patch b/Spigot-Server-Patches/Configurable-Cartographer-Treasure-Maps.patch index e27e7eaa39..0db0d796ef 100644 --- a/Spigot-Server-Patches/Configurable-Cartographer-Treasure-Maps.patch +++ b/Spigot-Server-Patches/Configurable-Cartographer-Treasure-Maps.patch @@ -28,15 +28,17 @@ index 11b0f11a8..46d525223 100644 + } } diff --git a/src/main/java/net/minecraft/server/VillagerTrades.java b/src/main/java/net/minecraft/server/VillagerTrades.java -index 2a4e4f785..0b6632369 100644 +index 8cee460bd..99374fe2a 100644 --- a/src/main/java/net/minecraft/server/VillagerTrades.java +++ b/src/main/java/net/minecraft/server/VillagerTrades.java @@ -0,0 +0,0 @@ public class VillagerTrades { @Override public MerchantRecipe a(Entity entity, Random random) { World world = entity.world; +- BlockPosition blockposition = world.a(this.b, new BlockPosition(entity), 100, true); + if (!world.paperConfig.enableTreasureMaps) return null; //Paper - BlockPosition blockposition = world.a(this.b, new BlockPosition(entity), 100, true); ++ BlockPosition blockposition = world.a(this.b, new BlockPosition(entity), 100, !world.paperConfig.treasureMapsAlreadyDiscovered); //Paper if (blockposition != null) { + ItemStack itemstack = ItemWorldMap.createFilledMapView(world, blockposition.getX(), blockposition.getZ(), (byte) 2, true, true); -- \ No newline at end of file