double x_new = POSITIONX+ 0.5D;
double y_new = POSITIONY + 1;
double z_new = POSITIONZ;
double x_old = mc.thePlayer.posX;
double y_old = mc.thePlayer.posY;
double z_old = mc.thePlayer.posZ;
double distance = mc.thePlayer.getDistance(x_new, y_new, z_new);
for (double d = 0.0D; d < distance; d += 2.0D) {
setPos(mc.thePlayer.posX
+ (x_new - mc.thePlayer.getHorizontalFacing().getFrontOffsetX() - mc.thePlayer.posX) * d
/ distance,
mc.thePlayer.posY + (y_new - mc.thePlayer.posY) * d / distance,
mc.thePlayer.posZ + (z_new - mc.thePlayer.getHorizontalFacing().getFrontOffsetZ()
- mc.thePlayer.posZ) * d / distance);
}
setPos(x_new, y_new, z_new);
//HITTEN
double distanceold = mc.thePlayer.getDistance(x_old, y_old, z_old);
for (double d = 0.0D; d < distanceold; d += 2.0D) {
setPos(mc.thePlayer.posX
+ (x_old - mc.thePlayer.getHorizontalFacing().getFrontOffsetX() - mc.thePlayer.posX) * d
/ distanceold,
mc.thePlayer.posY + (z_old - mc.thePlayer.posY) * d / distanceold,
mc.thePlayer.posZ
+ (z_old - mc.thePlayer.getHorizontalFacing().getFrontOffsetZ() - mc.thePlayer.posZ)
* d / distanceold);
}
setPos(x_old, y_old + 1, z_old);
Formatier den Code doch bitte xdJava:double x_new = POSITIONX+ 0.5D; double y_new = POSITIONY + 1; double z_new = POSITIONZ; double x_old = mc.thePlayer.posX; double y_old = mc.thePlayer.posY; double z_old = mc.thePlayer.posZ; double distance = mc.thePlayer.getDistance(x_new, y_new, z_new); for (double d = 0.0D; d < distance; d += 2.0D) { setPos(mc.thePlayer.posX + (x_new - mc.thePlayer.getHorizontalFacing().getFrontOffsetX() - mc.thePlayer.posX) * d / distance, mc.thePlayer.posY + (y_new - mc.thePlayer.posY) * d / distance, mc.thePlayer.posZ + (z_new - mc.thePlayer.getHorizontalFacing().getFrontOffsetZ() - mc.thePlayer.posZ) * d / distance); } setPos(x_new, y_new, z_new); //HITTEN double distanceold = mc.thePlayer.getDistance(x_old, y_old, z_old); for (double d = 0.0D; d < distanceold; d += 2.0D) { setPos(mc.thePlayer.posX + (x_old - mc.thePlayer.getHorizontalFacing().getFrontOffsetX() - mc.thePlayer.posX) * d / distanceold, mc.thePlayer.posY + (z_old - mc.thePlayer.posY) * d / distanceold, mc.thePlayer.posZ + (z_old - mc.thePlayer.getHorizontalFacing().getFrontOffsetZ() - mc.thePlayer.posZ) * d / distanceold); } setPos(x_old, y_old + 1, z_old);
Hab mir den Code nicht genau angeschaut aber sollte eigentlich nur n Swing und n AttackPacket sein:c ja wow ohne die hit mathode bringt es mir ja nix