mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@c1b4899 Fix dupe uuid check on entity add (#6735) PaperMC/Paper@3f043f7 Async catch modifications to critical entity state PaperMC/Paper@bc43f40 Update jline and TCA (#6829) PaperMC/Paper@d9e2817 Update paperweight to 1.1.13 (#6866) PaperMC/Paper@3e310e0 Remove redundant and unneeded repos, reorder repos (#6867) PaperMC/Paper@485d15f Update paperweight to 1.1.14 (#6868) PaperMC/Paper@09d50a9 Added missing mappings (#6810) PaperMC/Paper@0968cdd Move async catches back to where they were (#6869) PaperMC/Paper@6f71b7c Deduplicate strings in ObfHelper (#6841) PaperMC/Paper@ada930b Updated Upstream (Bukkit/CraftBukkit) (#6872) PaperMC/Paper@06d82e0 Cache palette array (#6767) PaperMC/Paper@70fe58d Expose the potential player cause of a lightning (#6782) PaperMC/Paper@c20c9d3 Fix CraftNamespacedKey shenanigans (#6825) PaperMC/Paper@29bb5a9 Add PlayerDeathEvent#getPlayer for clarity (#6859) PaperMC/Paper@124d079 Fix issues with mob conversion (#6831) PaperMC/Paper@22b0238 Add API for checking if a zombie has the option to break doors (#6855) PaperMC/Paper@5af80b0 Add isCollidable methods to various places (#6870) PaperMC/Paper@32ba088 Fix setPatternColor on tropical fish bucket meta (#6877) PaperMC/Paper@87121ce Move `getTrackedPlayers` up from Player to Entity (#6569) PaperMC/Paper@a923e33 Make despawn distance configs per-category, improve per category spawn limit config (#6717) PaperMC/Paper@3f17694 Goat ram API (#6336) PaperMC/Paper@cc2ecbc Add Raw Byte Entity Serialization (#6826) Airplane Changes: TECHNOVE/Airplane@e47949b Ty Penple <3 TECHNOVE/Airplane@86fee6b Update upstream
39 lines
2.3 KiB
Diff
39 lines
2.3 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 6e3f56843c47bc58eaf3d8e3b75299b36acd47d1..311c18145a3c01d0105f81f32d5f7fe49c016500 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 c6cb7c1de2eccfea27281d76be336a3e680c5dad..b8146303d1f079f0a75fde23c6c1be8abbd1ac8c 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
@@ -1558,6 +1558,7 @@ public class PurpurWorldConfig {
|
|
public int horseBreedingTicks = 6000;
|
|
public boolean horseTakeDamageFromWater = false;
|
|
public boolean horseStandWithRider = true;
|
|
+ public boolean horseTemptedByGold = false;
|
|
private void horseSettings() {
|
|
horseRidableInWater = getBoolean("mobs.horse.ridable-in-water", horseRidableInWater);
|
|
if (PurpurConfig.version < 10) {
|
|
@@ -1576,6 +1577,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;
|