geforkt von Mirrors/Paper
Config option for Piglins guarding chests (#4829)
Dieser Commit ist enthalten in:
Ursprung
5ba8143d59
Commit
c3a36117a8
34
patches/server/Config-option-for-Piglins-guarding-chests.patch
Normale Datei
34
patches/server/Config-option-for-Piglins-guarding-chests.patch
Normale Datei
@ -0,0 +1,34 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
|
||||
Date: Wed, 2 Dec 2020 03:07:58 -0800
|
||||
Subject: [PATCH] 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 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
|
||||
@@ -0,0 +0,0 @@ public class PiglinAi {
|
||||
}
|
||||
|
||||
public static void angerNearbyPiglins(Player player, boolean blockOpen) {
|
||||
+ if (!player.level.paperConfig.piglinsGuardChests) return; // Paper
|
||||
List<AbstractPiglin> list = (List) player.level.getEntitiesOfClass(Piglin.class, player.getBoundingBox().inflate(16.0D)); // CraftBukkit - decompile error
|
||||
|
||||
list.stream().filter(PiglinAi::isIdle).filter((entitypiglin) -> {
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren