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: 840e72091 [CI-SKIP] [Auto] Rebuild Patches a33232d4a Add beacon activation and deactivation events (#5121) bc7ea673a Add internal channel initialization listeners (#5557) b28ad17ac Check for world change in MoveEvent API methods 3095c7592 [Auto] Updated Upstream (CraftBukkit) f56989c97 Add RespawnFlags to PlayerRespawnEvent (#5533) 7579c2667 Add more API to PlayerMoveEvent (#5553)
35 lines
1.9 KiB
Diff
35 lines
1.9 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 921253a06daa414aed7dc6824effc65db09ea7a5..319e12c843305e62c34b1b6e2fd198d02491ca12 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/world/entity/monster/piglin/PiglinAI.java b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAI.java
|
|
index 490e749db3fc60a06fbb51347491b1ed29f3eaa0..39451d6d7a5b8cb4a29c6b3a4787979d40144cd9 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAI.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAI.java
|
|
@@ -419,6 +419,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) -> {
|