Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-16 21:10:17 +01:00
Add PathfinderGoalSit for diff visibility
Dieser Commit ist enthalten in:
Ursprung
95098c9435
Commit
05512942db
39
src/main/java/net/minecraft/server/PathfinderGoalSit.java
Normale Datei
39
src/main/java/net/minecraft/server/PathfinderGoalSit.java
Normale Datei
@ -0,0 +1,39 @@
|
|||||||
|
package net.minecraft.server;
|
||||||
|
|
||||||
|
public class PathfinderGoalSit extends PathfinderGoal {
|
||||||
|
|
||||||
|
private EntityTameableAnimal a;
|
||||||
|
private boolean b = false;
|
||||||
|
|
||||||
|
public PathfinderGoalSit(EntityTameableAnimal entitytameableanimal) {
|
||||||
|
this.a = entitytameableanimal;
|
||||||
|
this.a(5);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean a() {
|
||||||
|
if (!this.a.isTamed()) {
|
||||||
|
return false;
|
||||||
|
} else if (this.a.H()) {
|
||||||
|
return false;
|
||||||
|
} else if (!this.a.onGround) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
EntityLiving entityliving = this.a.getOwner();
|
||||||
|
|
||||||
|
return entityliving == null ? true : (this.a.e(entityliving) < 144.0D && entityliving.aC() != null ? false : this.b);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void c() {
|
||||||
|
this.a.getNavigation().g();
|
||||||
|
this.a.setSitting(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void d() {
|
||||||
|
this.a.setSitting(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void a(boolean flag) {
|
||||||
|
this.b = flag;
|
||||||
|
}
|
||||||
|
}
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren