mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 13:25:10 +00:00
Adjusted bard distance calc
This commit is contained in:
1 parent
a3e74f2ea5
commit
2637d9de26
2 files changed
+3
-3
No files matched your search
@@ -73,8 +73,8 @@ public class ScriptClientSound extends MovingSound implements ITickableSound {
|
||||
this.zPosF = z;
|
||||
}
|
||||
|
||||
public double getDistanceSq() {
|
||||
return Minecraft.getMinecraft().thePlayer.getDistanceSq(this.xPosF, this.yPosF, this.zPosF);
|
||||
public double getDistance() {
|
||||
return Minecraft.getMinecraft().thePlayer.getDistance(this.xPosF, this.yPosF, this.zPosF);
|
||||
}
|
||||
|
||||
public void setVolume(float volume) {
|
||||
|
||||
@@ -97,7 +97,7 @@ public class JobBard extends JobInterface{
|
||||
}
|
||||
else if(MusicController.Instance.sound.getEntity() != npc){
|
||||
EntityPlayer player = CustomNpcs.proxy.getPlayer();
|
||||
if(npc.getDistanceSqToEntity(player) < MusicController.Instance.sound.getDistanceSq()){
|
||||
if(npc.getDistanceToEntity(player) < MusicController.Instance.sound.getDistance()){
|
||||
MusicController.Instance.stopMusic();
|
||||
this.play();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user