mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 17:07:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: 5b20df6bf added PlayerNameEntityEvent ff9c82444 Add worldborder events 616b1f3cd consider enchants for destroy speed aaef1d5cc fix file conversion 674d8f7f7 Make discovered maps config work in treasure maps from loot tables too be1687914 stop firing pressure plate EntityInteractEvent for ignored entities (fixes #4962) 7d56f38ed Do not use the bukkit singleton for the GUI (Fixes #5301) 4c9bdf53a Updated Upstream (Bukkit/CraftBukkit/Spigot) (#5299) 8647bd130 Improve ServerGUI fcc6d3359 Throw proper exception on empty JsonList file 17d2e1291 Fix interact event in adventure mode 964e0bf42 MC-29274: Fix Wither hostility towards players 9e24a5213 Fixed furnace cook-speed multiplier losing precision when calculating cook time c7e42faa3 Do not create unnecessary copies of the passenger list 40881ad67 added tnt minecarts to the tnt height nerf 26be708f4 Remove streams from SensorNearest 5b5989b21 fix nullability of playerlist header/footer, closes #5290 45bc531dd Fix Material#getTranslationKey for Block Materials (#5294)
35 lines
1.8 KiB
Diff
35 lines
1.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: jmp <jasonpenilla2@me.com>
|
|
Date: Wed, 2 Dec 2020 03:07:58 -0800
|
|
Subject: [PATCH] PaperPR - Config option for Piglins guarding chests
|
|
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
index b473709774fbbd502d5e04c98041ae7c829b4083..a8215289c2be60c0e1301b928bc4f8a89f3aa1a6 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -704,6 +704,11 @@ public class PaperWorldConfig {
|
|
zombiesTargetTurtleEggs = getBoolean("zombies-target-turtle-eggs", zombiesTargetTurtleEggs);
|
|
}
|
|
|
|
+ public boolean piglinsGuardChests = true;
|
|
+ private void piglinsGuardChests() {
|
|
+ piglinsGuardChests = getBoolean("piglins-guard-chests", piglinsGuardChests);
|
|
+ }
|
|
+
|
|
public boolean useEigencraftRedstone = false;
|
|
private void useEigencraftRedstone() {
|
|
useEigencraftRedstone = this.getBoolean("use-faster-eigencraft-redstone", false);
|
|
diff --git a/src/main/java/net/minecraft/server/PiglinAI.java b/src/main/java/net/minecraft/server/PiglinAI.java
|
|
index 0407fa1751d89a037da8cb01f5ceef9b9833dd18..df5aafec9a5844a1ae3e948d8a787051a8903bce 100644
|
|
--- a/src/main/java/net/minecraft/server/PiglinAI.java
|
|
+++ b/src/main/java/net/minecraft/server/PiglinAI.java
|
|
@@ -357,6 +357,7 @@ public class PiglinAI {
|
|
}
|
|
|
|
public static void a(EntityHuman entityhuman, boolean flag) {
|
|
+ if (!entityhuman.world.paperConfig.piglinsGuardChests) return; // Paper
|
|
List<EntityPiglinAbstract> list = entityhuman.world.a(EntityPiglin.class, entityhuman.getBoundingBox().g(16.0D)); // CraftBukkit - decompile error
|
|
|
|
list.stream().filter(PiglinAI::d).filter((entitypiglin) -> {
|