mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 17:37:42 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: 466820160 Upstream Update (#5211) 2a0ee4b65 Add support for hex color codes in console 4e958e229 We're going on an Adventure! (#4842) 1a9735611 Stop loop when flags set to false (#5101) a5928db4a [Auto] Updated Upstream (CraftBukkit)
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 0776e68340b0510cc99084bea80791d562dfea40..39f297a968f3ff31119cefcc629ec459f263d426 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) -> {
|