geforkt von Mirrors/Paper
b62dfa0bf9
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 39ce5d3a SPIGOT-4399: ItemMeta.equals broken with AttributeModifiers CraftBukkit Changes:1cf8b5dc
SPIGOT-4400: Populators running on existing chunks116cb9a1
SPIGOT-4399: Add attribute modifier equality test5ee1c18a
SPIGOT-4398: Set ASM7_EXPERIMENTAL flag
45 Zeilen
2.1 KiB
Diff
45 Zeilen
2.1 KiB
Diff
From 5d9e532c8ca78b64531e4ed45574da9f12805cd7 Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Tue, 20 Dec 2016 15:26:27 -0500
|
|
Subject: [PATCH] Configurable Cartographer Treasure Maps
|
|
|
|
Allow configuring for cartographers to return the same map location
|
|
|
|
Also allow turning off treasure maps all together as they can eat up Map ID's
|
|
which are limited in quantity.
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
index 5e51aef84c..5d152af154 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -345,4 +345,14 @@ public class PaperWorldConfig {
|
|
Bukkit.getLogger().warning("Spawn Egg and Armor Stand NBT filtering disabled, this is a potential security risk");
|
|
}
|
|
}
|
|
+
|
|
+ public boolean enableTreasureMaps = true;
|
|
+ public boolean treasureMapsAlreadyDiscovered = false;
|
|
+ private void treasureMapsAlreadyDiscovered() {
|
|
+ enableTreasureMaps = getBoolean("enable-treasure-maps", true);
|
|
+ treasureMapsAlreadyDiscovered = getBoolean("treasure-maps-return-already-discovered", false);
|
|
+ if (treasureMapsAlreadyDiscovered) {
|
|
+ log("Treasure Maps will return already discovered locations");
|
|
+ }
|
|
+ }
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
|
|
index 5aebdba56c..f03092f4d1 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityVillager.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
|
|
@@ -755,6 +755,7 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant {
|
|
public void a(IMerchant imerchant, MerchantRecipeList merchantrecipelist, Random random) {
|
|
int i = this.a.a(random);
|
|
World world = imerchant.getWorld();
|
|
+ if (!world.paperConfig.enableTreasureMaps) return; //Paper
|
|
BlockPosition blockposition = world.a(this.b, imerchant.getPosition(), 100, true);
|
|
|
|
if (blockposition != null) {
|
|
--
|
|
2.19.0
|
|
|