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: PaperMC/Paper@7b3b593 [ci skip] Update checkout action in workflow (#8510) PaperMC/Paper@36869cc Fix new block data in EntityChangeBlockEvent for silverfish when mobGriefing isn't enabled (#8099) PaperMC/Paper@2432233 Add allow server listing & text filtering client options (#7595) PaperMC/Paper@954e6f0 Fix a bunch more forceDrops for dropping items (#8095) PaperMC/Paper@32d95e9 Track projectile source for fireworks from dispensers (#8044) PaperMC/Paper@0249750 Fix EntityArgument suggestion permissions to align with EntitySelector#checkPermissions (#8511) PaperMC/Paper@8acb05d Make CommandSyntaxException implement ComponentMessageThrowable (#8513) PaperMC/Paper@c264018 [ci skip] Undo modification to removed patches in latest commit (#8512) PaperMC/Paper@304ab35 [ci skip] Remove old todo file PaperMC/Paper@8a4b752 Fix wrong descriptor in ASMEventExecutorGenerator (#8506) PaperMC/Paper@b743144 Fix MC-147659 (#8423) PaperMC/Paper@aaf5e39 Deprecate unused VehicleEntityCollisionEvent methods (#8498)
42 lines
2.5 KiB
Diff
42 lines
2.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Encode42 <me@encode42.dev>
|
|
Date: Wed, 28 Jul 2021 15:52:32 -0400
|
|
Subject: [PATCH] Config to prevent horses from standing with riders
|
|
|
|
Horses have a chance to stand (rear) when their ambient noise is played.
|
|
This can happen while the horse is moving with a rider, which will cause the horse to suddenly stop for a moment.
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java
|
|
index a1ffa88c3796df2973a2fc0aeafda5f78208bf85..7466c437b2e996f16a08aaefc5c2b7cba216a14c 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java
|
|
@@ -398,7 +398,7 @@ public abstract class AbstractHorse extends Animal implements ContainerListener,
|
|
@Nullable
|
|
@Override
|
|
protected SoundEvent getAmbientSound() {
|
|
- if (this.random.nextInt(10) == 0 && !this.isImmobile()) {
|
|
+ if (this.random.nextInt(10) == 0 && !this.isImmobile() && !(!this.level.purpurConfig.horseStandWithRider && this.getControllingPassenger() != null)) { // Purpur
|
|
this.stand();
|
|
}
|
|
|
|
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
index 700c40fd0ba469ba034153f422ad179ece61e330..209e92b0588ddfc820647710e443173b1e78887e 100644
|
|
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
@@ -1538,6 +1538,7 @@ public class PurpurWorldConfig {
|
|
public double horseMovementSpeedMax = 0.3375D;
|
|
public int horseBreedingTicks = 6000;
|
|
public boolean horseTakeDamageFromWater = false;
|
|
+ public boolean horseStandWithRider = true;
|
|
private void horseSettings() {
|
|
horseRidableInWater = getBoolean("mobs.horse.ridable-in-water", horseRidableInWater);
|
|
if (PurpurConfig.version < 10) {
|
|
@@ -1555,6 +1556,7 @@ public class PurpurWorldConfig {
|
|
horseMovementSpeedMax = getDouble("mobs.horse.attributes.movement_speed.max", horseMovementSpeedMax);
|
|
horseBreedingTicks = getInt("mobs.horse.breeding-delay-ticks", horseBreedingTicks);
|
|
horseTakeDamageFromWater = getBoolean("mobs.horse.takes-damage-from-water", horseTakeDamageFromWater);
|
|
+ horseStandWithRider = getBoolean("mobs.horse.stand-with-rider", horseStandWithRider);
|
|
}
|
|
|
|
public boolean huskRidable = false;
|