mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-22 02:47:43 +01:00
39 lines
2.2 KiB
Diff
39 lines
2.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: oharass <oharass@bk.ru>
|
|
Date: Mon, 6 Sep 2021 05:13:09 +0300
|
|
Subject: [PATCH] horses tempted by gold config
|
|
|
|
|
|
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 c9daf65ce500e29ce8f73d1ec6379fc2e172ae64..ea6b49cb000fb94e51df087fcc051d1cc50c05d1 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
|
|
@@ -169,6 +169,7 @@ public abstract class AbstractHorse extends Animal implements ContainerListener,
|
|
|
|
protected void addBehaviourGoals() {
|
|
this.goalSelector.addGoal(0, new FloatGoal(this));
|
|
+ if (this.level.purpurConfig.horseTemptedByGold) // Purpur
|
|
this.goalSelector.addGoal(3, new TemptGoal(this, 1.25D, Ingredient.of(Items.GOLDEN_CARROT, Items.GOLDEN_APPLE, Items.ENCHANTED_GOLDEN_APPLE), false));
|
|
}
|
|
|
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
index 57093b3c8b9cb6836dc4a9b8a91205d343a9d8f9..bf4f17f3d419f80a20ada67d063d528b672d03d3 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
@@ -1534,6 +1534,7 @@ public class PurpurWorldConfig {
|
|
public int horseBreedingTicks = 6000;
|
|
public boolean horseTakeDamageFromWater = false;
|
|
public boolean horseStandWithRider = true;
|
|
+ public boolean horseTemptedByGold = true;
|
|
private void horseSettings() {
|
|
horseRidableInWater = getBoolean("mobs.horse.ridable-in-water", horseRidableInWater);
|
|
if (PurpurConfig.version < 10) {
|
|
@@ -1552,6 +1553,7 @@ public class PurpurWorldConfig {
|
|
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);
|
|
+ horseTemptedByGold = getBoolean("mobs.horse.tempted-by-gold", horseTemptedByGold);
|
|
}
|
|
|
|
public boolean huskRidable = false;
|