Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix llama not moving when ridden
  • Loading branch information
mxuexe committed Jun 30, 2025
commit 11e7dd94d4ed1a4f683424106e0c1f2b84a039f0
14 changes: 13 additions & 1 deletion purpur-server/minecraft-patches/features/0001-Ridables.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2384,7 +2384,7 @@ index 2a1d720557c0bd4895a32723e34512c0a557e4f2..f1cb2e315e1d86f9fcd87db11d3ee7a8
protected void randomizeAttributes(RandomSource random) {
this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(generateMaxHealth(random::nextInt));
diff --git a/net/minecraft/world/entity/animal/horse/Llama.java b/net/minecraft/world/entity/animal/horse/Llama.java
index 5e3382351b1b5728750534f64babc85c4da3ac54..da6450f7573ca9797577d5afae2bb1365d112177 100644
index 5e3382351b1b5728750534f64babc85c4da3ac54..cb7af093a452b6febf6727e934e1492b67fbc18b 100644
--- a/net/minecraft/world/entity/animal/horse/Llama.java
+++ b/net/minecraft/world/entity/animal/horse/Llama.java
@@ -84,7 +84,51 @@ public class Llama extends AbstractChestedHorse implements RangedAttackMob {
Expand Down Expand Up @@ -2455,6 +2455,18 @@ index 5e3382351b1b5728750534f64babc85c4da3ac54..da6450f7573ca9797577d5afae2bb136
this.targetSelector.addGoal(1, new Llama.LlamaHurtByTargetGoal(this));
this.targetSelector.addGoal(2, new Llama.LlamaAttackWolfGoal(this));
}
@@ -540,4 +586,11 @@ public class Llama extends AbstractChestedHorse implements RangedAttackMob {
return this.name;
}
}
+
+ @Nullable
+ @Override
+ public LivingEntity getControllingPassenger() {
+ Entity firstPassenger = this.getFirstPassenger();
+ return !this.isNoAi() && firstPassenger instanceof net.minecraft.world.entity.Mob mob && firstPassenger.canControlVehicle() ? mob : null;
+ }
}
diff --git a/net/minecraft/world/entity/animal/horse/Mule.java b/net/minecraft/world/entity/animal/horse/Mule.java
index 39725b7a6bac9390406733cd51d7341d0cb363d1..b1c96936ba8dcba4435a649dd7e6ec3c921c3702 100644
--- a/net/minecraft/world/entity/animal/horse/Mule.java
Expand Down