mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 08:27:43 +01:00
horses tempted by gold config (#645)
This commit is contained in:
38
patches/server/0255-horses-tempted-by-gold-config.patch
Normal file
38
patches/server/0255-horses-tempted-by-gold-config.patch
Normal file
@@ -0,0 +1,38 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Oharass <90105244+Oharass@users.noreply.github.com>
|
||||
Date: Sun, 5 Sep 2021 21:13:09 -0500
|
||||
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 03ae6519a523ee73cce664d85074b5f9525de6d6..206be7e1fc85fed99118020490d8494d197597ab 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
|
||||
@@ -168,6 +168,7 @@ public abstract class AbstractHorse extends Animal implements ContainerListener,
|
||||
|
||||
protected void addBehaviourGoals() {
|
||||
this.goalSelector.addGoal(0, new FloatGoal(this));
|
||||
+ if (this.level.purpurConfig.horseTemptedByGold) this.goalSelector.addGoal(3, new net.minecraft.world.entity.ai.goal.TemptGoal(this, 1.25D, Ingredient.of(Items.GOLDEN_CARROT, Items.GOLDEN_APPLE, Items.ENCHANTED_GOLDEN_APPLE), false)); // Purpur
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index 467cc1e7166875c929b4d39f7ed3d7c2f12991e6..d4afe73a81b770d3151f21bd5d85089a2511fd1b 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -1496,6 +1496,7 @@ public class PurpurWorldConfig {
|
||||
public double horseMovementSpeedMax = 0.3375D;
|
||||
public int horseBreedingTicks = 6000;
|
||||
public boolean horseStandWithRider = true;
|
||||
+ public boolean horseTemptedByGold = false;
|
||||
private void horseSettings() {
|
||||
horseRidableInWater = getBoolean("mobs.horse.ridable-in-water", horseRidableInWater);
|
||||
if (PurpurConfig.version < 10) {
|
||||
@@ -1513,6 +1514,7 @@ public class PurpurWorldConfig {
|
||||
horseMovementSpeedMax = getDouble("mobs.horse.attributes.movement_speed.max", horseMovementSpeedMax);
|
||||
horseBreedingTicks = getInt("mobs.horse.breeding-delay-ticks", horseBreedingTicks);
|
||||
horseStandWithRider = getBoolean("mobs.horse.stand-with-rider", horseStandWithRider);
|
||||
+ horseTemptedByGold = getBoolean("mobs.horse.tempted-by-gold", horseTemptedByGold);
|
||||
}
|
||||
|
||||
public boolean huskRidable = false;
|
||||
Reference in New Issue
Block a user