mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-26 15:03:30 +00:00
Refine mount role rider positioning and home behavior
This commit is contained in:
1 parent
11e326de48
commit
d00c1cf156
4 files changed
+91
-14
No files matched your search
@@ -62,6 +62,7 @@ public class RoleMount extends RoleInterface {
|
||||
@Override
|
||||
public boolean aiShouldExecute() {
|
||||
if (npc.ais.returnToStart) {
|
||||
storedReturnToStart = true;
|
||||
npc.ais.returnToStart = false;
|
||||
}
|
||||
return false;
|
||||
@@ -91,6 +92,15 @@ public class RoleMount extends RoleInterface {
|
||||
return offsetZ;
|
||||
}
|
||||
|
||||
public void setReturnToStartPreference(boolean value) {
|
||||
this.storedReturnToStart = value;
|
||||
npc.ais.returnToStart = false;
|
||||
}
|
||||
|
||||
public boolean getReturnToStartPreference() {
|
||||
return storedReturnToStart;
|
||||
}
|
||||
|
||||
private float clamp(float value) {
|
||||
return ValueUtil.clamp(value, -5.0F, 5.0F);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user