Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 04:20:04 +01:00
0d3b35c339
This option does not set the absolute speed of the entity as the name implies. It sets a modifier. The default (vanilla) value of `0.5` sets the baby zombie to move at 50% faster than the base speed. A negative value like `-0.4` would set them to move at 40% slower. There should be no functional changes as a result of this change, it's just clarifying the config name.
38 Zeilen
1.7 KiB
Diff
38 Zeilen
1.7 KiB
Diff
From 7478cfc72f66b5391dc408b2f71d8c53c5129ccc Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Fri, 18 Mar 2016 14:19:19 -0400
|
|
Subject: [PATCH] Undead horse leashing
|
|
|
|
default false to match vanilla, but option to allow undead horse types to be leashed.
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
index 970de3fe8..aaa1b60f9 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -206,4 +206,9 @@ public class PaperWorldConfig {
|
|
private void nonPlayerEntitiesOnScoreboards() {
|
|
nonPlayerEntitiesOnScoreboards = getBoolean("allow-non-player-entities-on-scoreboards", false);
|
|
}
|
|
+
|
|
+ public boolean allowLeashingUndeadHorse = false;
|
|
+ private void allowLeashingUndeadHorse() {
|
|
+ allowLeashingUndeadHorse = getBoolean("allow-leashing-undead-horse", false);
|
|
+ }
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/server/EntityHorseAbstract.java b/src/main/java/net/minecraft/server/EntityHorseAbstract.java
|
|
index 9c7e2437f..8aa60e95f 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityHorseAbstract.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityHorseAbstract.java
|
|
@@ -107,7 +107,7 @@ public abstract class EntityHorseAbstract extends EntityAnimal implements IInven
|
|
|
|
@Override
|
|
public boolean a(EntityHuman entityhuman) {
|
|
- return super.a(entityhuman) && this.getMonsterType() != EnumMonsterType.UNDEAD;
|
|
+ return world.paperConfig.allowLeashingUndeadHorse ? super.a(entityhuman) : super.a(entityhuman) && this.getMonsterType() != EnumMonsterType.UNDEAD; // Paper
|
|
}
|
|
|
|
@Override
|
|
--
|
|
2.23.0
|
|
|