more notes

This commit is contained in:
batchprogrammer314
2021-06-28 03:14:07 -05:00
parent 86c50f24c7
commit 70490d55bb
3 changed files with 11 additions and 10 deletions

View File

@@ -126,6 +126,8 @@ public class Bot extends EntityPlayer {
}
private void updateLocation() {
// Eventually there will be a whole algorithm here to slow a player down to a certain velocity depending on the liquid a player is in
velocity.setY(velocity.getY() - 0.1);
double y;
@@ -181,15 +183,6 @@ public class Bot extends EntityPlayer {
velocity.setZ(velocity.getZ() * 0.5);
}
@Override
public void die() {
super.die();
for (Player player : Bukkit.getOnlinePlayers()) {
PlayerConnection connection = ((CraftPlayer) player).getHandle().playerConnection;
connection.sendPacket(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.REMOVE_PLAYER, this));
}
}
public void despawn() {
getBukkitEntity().remove();
}
@@ -254,6 +247,10 @@ public class Bot extends EntityPlayer {
kbTicks = 10;
}
public Location getLocation() {
return getBukkitEntity().getLocation();
}
public void faceLocation(Location loc) {
try {
CraftPlayer playerBot = this.getBukkitEntity();