mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
Re-implement treasure-maps-return-already-discovered for 1.14 (#2636)
This commit is contained in:
parent
eacc91f30d
commit
6698d64ab9
1 changed files with 4 additions and 2 deletions
|
@ -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);
|
||||
--
|
Loading…
Reference in a new issue