i want to make my Seal entity (water entity) walks when its on land, atm it only stands on land it wont move, i know i must prb change something here maybe?
@Override
public void tick() {
if (CustomEntity.this.areEyesInFluid(FluidTags.WATER))
CustomEntity.this.setMotion(CustomEntity.this.getMotion().add(0, 0.005, 0));
if (this.action == MovementController.Action.MOVE_TO && !CustomEntity.this.getNavigator().noPath()) {
double dx = this.posX - CustomEntity.this.getPosX();
double dy = this.posY - CustomEntity.this.getPosY();
double dz = this.posZ - CustomEntity.this.getPosZ();
dy = dy / (double) MathHelper.sqrt(dx * dx + dy * dy + dz * dz);
CustomEntity.this.rotationYaw = this.limitAngle(CustomEntity.this.rotationYaw,
(float) (MathHelper.atan2(dz, dx) * (double) (180 / (float) Math.PI)) - 90, 90);
CustomEntity.this.renderYawOffset = CustomEntity.this.rotationYaw;
CustomEntity.this.setAIMoveSpeed(MathHelper.lerp(0.125f, CustomEntity.this.getAIMoveSpeed(),
(float) (this.speed * CustomEntity.this.getAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).getValue())));
CustomEntity.this.setMotion(CustomEntity.this.getMotion().add(0, CustomEntity.this.getAIMoveSpeed() * dy * 0.1, 0));
} else {
CustomEntity.this.setAIMoveSpeed(0F);
}
}
};
this.navigator = new SwimmerPathNavigator(this, this.world);
}
i want to make my Seal entity (water entity) walks when its on land, atm it only stands on land it wont move, i know i must prb change something here maybe?
nobody? swim + walk mob? please
i need to make a land path movment for it on this part here:
} else {
CustomEntity.this.setAIMoveSpeed(0F);
}
can someone gimme a hand?
thanks!