mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 01:17:42 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: b94a99b03 Updated Upstream (CraftBukkit) (#5762) f5cb169e0 [Auto] Updated Upstream (CraftBukkit) Tuinity Changes: 3eda860f4 Updated Upstream (Paper) e9c834821 Revert entity ticking chunk map for tracker Airplane Changes: 3e07ea8cf Patch container checks for WildChests compat d04adc933 Updated Upstream (Tuinity) 489bb761c Update gradle 0d5670e62 Merge pull request #24 from HexedHero/spelling-mistake-lightning c605be6dc Fix typo
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 1a368df78feb4afdf522527af5ed1652afffcd15..aaeb6396597ddce3a2eebf7d76c7d1e654300f0b 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 44ecce39996cc4e7baad543803e1b5cfc22f8cf0..b7213d5a9c3d0f60a8f8f725cef6506d5b22d0ed 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
|
|
@@ -437,6 +437,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) -> {
|