Re-implement treasure-maps-return-already-discovered for 1.14 (#2636)

This commit is contained in:
Jonathan Frederick 2019-10-18 08:14:43 -07:00
parent eacc91f30d
commit 6698d64ab9

View file

@ -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);
--